擔心制裁 盧布再創新低 by 儲蓄保險王 · 2014-09-16 擔心制裁 盧布再創新低 作者黃啟霖 | 中央廣播電台 – 2014年9月16日 下午5:52 由於投資人擔心俄羅斯受到西方制裁所引發的影響,俄國盧布(ruble)的匯率今天(16日)再度創下新低紀錄。 莫斯科時間今天中午時分,俄國盧布大幅貶值超過1%,來到1美元兌換38.80盧布。僅僅過去2天來,盧布已經貶值了超過2.7%。 美國和歐洲聯盟上星期就烏克蘭危機,對俄羅斯實施新一回合的制裁。 盧布匯率最近最近屢創新低,9月1日,創下1美元兌37.51盧布;11日再創37.57盧布的新低。 相關文章Python hashlib 快速入門:為資料建立唯一指紋import hashlib; data = "文字".encode('utf-8'); hash_obj = hashlib.sha256(data); result = hash_obj.hexdigest() #digest:「取得雜湊摘要」或「取得摘要值」Python Regex 實戰:精準抓取 XML 屬性值 (findall vs finditer 與 Group 的奧義)Python-docx 進階手術室:從底層 XML 到超連結混合技; from docx.opc.constants import RELATIONSHIP_TYPE as RT ; part = doc.part ; r_id = part.relate_to(url, RT.HYPERLINK, is_external=True)Python XML 的生死輪迴:深入理解 lxml.etree.fromstring(xml_bytes) #Bytes → Element Object 與 lxml.etree.tostring(Element, encoding= "utf-8") #Element Object → Bytes ; 處理 XML 時,盡量全程保持 Bytes (二進位) 狀態。Python Zipfile 實戰:Write vs Writestr —— 硬碟搬運工與記憶體魔術師; XML 處理的世界裡,writestr 才是真正的主角; zf.writestr(zinfo_or_arcname, data) #zinfo_or_arcname: ZipInfo | str ; data: bytes | str告別雜亂 XML!用 Python lxml 實現與 VS Code (Shift+Alt+F) 同級的「完美縮排」; from lxml import etree ; root = etree.fromstring(xml_bytes) #等效 root = etree.fromstring( xml_str.encode("utf-8") ); clean_xml_str = etree.tostring(root, pretty_print=True, encoding='unicode', xml_declaration=False) ; import xml.etree.ElementTree as ETPython tempfile 模組完全指南:安全管理臨時檔案的最佳實踐; import tempfile ; tempfile.gettempdir() ; tempfile.template ; os.access(temp_dir, os.W_OK) ; with tempfile.NamedTemporaryFile() as tmp: tmp_path = tmp.name #有檔名的臨時檔案 ; with tempfile.TemporaryDirectory() as tmpdir #臨時資料夾 ; with tempfile.TemporaryFile() as tmp #無檔名的臨時檔案python-docx 進階手術室:從高階 API 到底層 XML (w:p, w:r, w:t) 完全解析; from docx.oxml import OxmlElement ; from docx.oxml.ns import qnPython DOCX 手術刀:精準切片與瘦身 (OOXML 實戰); from lxml import etree; doc_xml = zfin.read('word/document.xml') ; doc_tree = etree.fromstring(doc_xml) ; used_rids = set( doc_tree.xpath( "//@r:embed | //@r:link | //@r:id", namespaces=ns_map)) #獲取 word/document.xml 有使用的used_rids => 讀取 document.xml.rels 建立白名單 keep_files以及黑名單 rels_to_remove ,要移除的Relationship節點 => 從 XML 樹中移除未使用的 Relationship 節點 => 重寫 Zip (過濾孤兒檔案, 更新document.xml.rels,其他原樣複製)
近期留言