2015年12月24日 星期四

油價與經濟關係

2018年/4/27日:

https://gas.goodlife.tw

油價已經突破70塊,最近各國股市也的確很不穩定,對比2014年的實際觀察,因為貨幣寬鬆政策造成油價漲時,金價沒跟漲,這次的油價漲,金價沒跟漲,

的確屬於異常現象

2018年1/2日,更新:

目前油價又開始慢慢緩漲,似乎又到了可以驗收總經理論的時候了

 

==============

至從遇到上一波2008年金融風暴,因為油價上漲之後造成的經濟崩潰後,對於油價對經濟的議題就一直有特別注意,現在油價又跌到一個低點,

 

 

資料來源:2006年,藍海策略雜誌提到的

 

 

油價

影響   投資小筆記 實際觀察
油價區間 30-60 緩慢刺激經濟   可以趁機把過去的雜誌書籍拿出來研讀,寫出心得,順便驗證,可以有意想不到的收穫 2015年12月,油價創11年新低 
  60-80 油價,金價會高漲,這時候可以投資 黃金     2014油價短期內從高點跌到70以下,但各國都採取貨幣寬鬆,造成油金價格都不高
  100以上 經濟會崩潰,然後油價需求下跌,所有行業都不好   經濟衰退時,對負債比高的公司跟毛率低的公司不利 2008年 油價漲到147元,造成金融風暴,隨後油價回跌到30塊但很快就有回到70塊上下了,不知道是真的回升,還是又是人為炒作

2015年12月15日 星期二

Python Error :ERROR - failed to write data to stream: <open file '<stdout>', mode 'w' at 0x105a62150>

這原因是iPython 無法處理非utf-8 編碼的問題,

可以強制設定ipython  encoding 為utf-8,之後在執行程式,就可以看到正確有問題的程式碼位置了

export PYTHONIOENCODING=UTF-8

2015年12月14日 星期一

使用Jmeter 當proxy server 如何debug

可以開啟proxy debug log,然後再從debug log 去查詢問題
 log_level.jmeter.protocol.http.proxy.HttpRequestHdr=DEBUG
 log_file=jmeter.log

微軟OneDriver 申請維持原本的免費容量

申請網址如下

https://preview.onedrive.com/bonus/

 

其實從最近的一些雲端服務縮減提供的服務,就可以知道,天下真的沒有白吃的午餐,這也預告,也許所謂的

private cloud (or Hybrid Cloud) 會在回到主流 ,當一切都上雲端,也代表很多的掌控權不再自己身上,這趨勢

總有一天會扭轉

2015年12月11日 星期五

[Mac][python] 在Mac上使用讀卡機讀取健保卡資料

 

1.插入讀卡機跟健保卡後,使用psctest 確認讀卡機功能正常

#pcsctest

 

1. 手動安裝pyscard ,不要用pip安裝,目前預設會安裝1.7.0版,會有bug 

Download pyscard-1.9.1.tar.gz   

 

2.使用網路找到的範例檔案,讀取你的健保卡資訊

 

from smartcard.System import readers



# define the APDUs used in this script
SelectAPDU = [ 0x00, 0xA4, 0x04, 0x00, 0x10, 0xD1, 0x58, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00 ]

ReadProfileAPDU = [ 0x00, 0xca, 0x11, 0x00, 0x02, 0x00, 0x00 ]

# get all the available readers
r = readers()
print "Available readers:", r

reader = r[0]
print "Using:", reader

connection = reader.createConnection()
connection.connect()

data, sw1, sw2 = connection.transmit(
SelectAPDU)
print "Select Applet: %02X %02X" % (sw1, sw2)

data, sw1, sw2 = connection.transmit(
ReadProfileAPDU)
#print data
print "Command: %02X %02X" % (sw1, sw2)
print  'Card Number : %s' % ''.join(chr(i) for i in data[0:12])
print  'Name : %s' % ''.join(chr(i) for i in data[12:18])
print  'ID Number : %s' % ''.join(chr(i) for i in data[32:42])
print  'Birthday : %s' % ''.join(chr(i) for i in data[43:49])
print  'Sex : %s' % ''.join(chr(i) for i in data[49:50])
print  'Card Date : %s' % ''.join(chr(i) for i in data[51:57])

 

 

 

備註:

@不確定需不需要的scardservice 

http://smartcardservices.macosforge.org/post/installers-for-previous-os-x-releases-updatedreposted-v212/

How to restore a deleted onenote page

復原不小心誤刪的onenote