Skip to content

Instantly share code, notes, and snippets.

View howard-haowen's full-sized avatar
:octocat:
AI Engineer at IBM 💻 | Crafting solutions for client success! 🚀

Haowen Jiang howard-haowen

:octocat:
AI Engineer at IBM 💻 | Crafting solutions for client success! 🚀
View GitHub Profile
@howard-haowen
howard-haowen / AstroNvim.sh
Last active November 7, 2022 04:10
Docker run for AstroNvim
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git nodejs npm lazygit ncdu htop python3 neovim ripgrep alpine-sdk --update
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
# Uncomment the line below and replace the link with your user config repo to load a user config
# git clone https://github.com/username/AstroNvim_user ~/.config/nvim/lua/user
nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerSync"
nvim
'
@howard-haowen
howard-haowen / faq.csv
Created July 27, 2022 03:35
行政院常見問答
question answer
如何申請應用行政院檔案? 請至國家發展委員會檔案管理局機關檔案目錄查詢網,查詢檔案名稱及檔號後,至本院網站下載「行政院檔案應用申請書」(詳閱後附填寫說明),填妥後以通訊方式或親至本院(本院聯絡資訊)提出申請。
在行政院可以申請應用其他機關(如各部會、各縣市政府)的檔案嗎? 本院只提供本院院本部所管有的檔案,其他機關的檔案,則請直接向各該機關提出申請應用。
查詢到的檔案都能開放瀏覽複製嗎?為什麼還需經過審核才能取得檔案? 行政院開放檔案閱覽複製等應用,是本於政府資訊公開精神,滿足人民知的權利。然而公開資訊也必須在保障國民個人權益、國家機密,與滿足民眾知的權利間取得平衡。因此,依據檔案法第十八條規定,涉及國家機密、犯罪資料、工商秘密、學識技能檢定及資格審查之資料、人事及薪資資料、依法令或契約有保密之義務以及其他為維護公共利益或第三人之正當權益等得拒以開放。審核的目的即在確保上述國民個人隱私與權益,以及國家機密得以保障。
申請應用行政院檔案要多久?可以在提出申請當天就能應用嗎? 依據「檔案法」及「行政院檔案申請應用須知」的規定,本院將於受理三十日內完成審核,並將審核結果以院函檢附「行政院檔案申請應用審核表」(樣本)通知申請人。故無法在申請當天就提供檔案應用服務。
申請應用行政院檔案需要付費嗎? 是的。我們是依據「檔案閱覽抄錄複製收費標準」之規定收取費用。
申請應用行政院檔案需要準備那些資料或證件? 經本院審核准予應用之案件,申請人應依通知書指定之日期、時間,攜帶通知書及身分證(護照)至本院指定之處所,依核准之內容應用檔案。
我對主題式檔案有興趣,並不侷限於行政院院本部檔案,該如何取得這些檔案? 建議您到國家發展委員會檔案管理局網站取得相關資訊。檔案管理局資訊豐富,除提供全國檔案目錄查詢之外,並提供虛擬檔案展與檔案相關教學。此外,一般各部會網站為民服務項下,亦提供檔案應用服務。
@howard-haowen
howard-haowen / TSM_profile.tsv
Created March 12, 2022 16:24
Graphemes in Taiwanese Southern Min
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
Grapheme
a
i
u
e
o
oo
p
ph
b
@howard-haowen
howard-haowen / Amis_profile.tsv
Last active March 12, 2022 04:21
Graphemes in Formosan languages
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
Grapheme
a
i
e
o
p
t
k
'
^
@howard-haowen
howard-haowen / scikitlearn2pandas.py
Last active May 14, 2021 03:49 — forked from fclesio/get_classification_report.py
Scikit Learn metrics to Pandas DataFrame
from sklearn.metrics import classification_report, confusion_matrix
import pandas as pd
def get_df_classification_report(y_test, y_pred, target_names):
'''Source: https://stackoverflow.com/questions/39662398/scikit-learn-output-metrics-classification-report-into-csv-tab-delimited-format'''
report = classification_report(y_test, y_pred, output_dict=True, target_names=target_names)
df = pd.DataFrame(report).transpose()
return df.round(decimals=3)
# example
@howard-haowen
howard-haowen / GDrive-to-GitHub.md
Created March 7, 2021 10:14
Git commands for transferring data from GDrive to GitHub

Execute the following commands on Colab

Add a new repo on GitHub

Suppose it's named MY_REPO

Set the GitHub user email

!git config --global user.email '<USER_EMAIL>'

Set the GitHub user name

!git config --global user.name ''

@howard-haowen
howard-haowen / 50k_online_reviews.csv
Created February 20, 2021 07:36
50k online reviews in traditional Chinese (for text classification and sentiment analysis)
We can't make this file beautiful and searchable because it's too large.
cat,label,review
平板,1,很不錯。。。。。。很好的平板
平板,1,幫同學買的,同學說感覺挺好,質量也不錯
平板,1,東西不錯,一看就是正品包裝,還沒有開機,相信京東,都是老顧客,還是京東值得信賴,給五星好評
平板,1,總體而言,產品還是不錯的。
平板,1,好,不錯,真的很好不錯
平板,1,很好,音響效果不錯。挺喜歡的,用了一段時間才來評價的。
平板,1,包裝不是很好,裡面太空了我不塞多點汽泡袋,其它的還可以
平板,1,之前一直用華為手機,覺得不錯,想試一下平板,前天下單,昨天到貨,試了一下,感覺還不錯,家裡也有ipad,兩者不能比較,各有各的好,只是近年一直都用華為,手機,盒子用起來都不錯,現在是老媽用蘋果手機用ipad,我都用華為,用習慣了。大小也正合適,挺喜歡的,唯一欠缺的一點就是沒有耳機。後面多用幾次再追評吧。
平板,1,說實話,非常喜歡,這個是送給客戶的,之前送的蘋果派的,但是不能拷檔案,自從找到這款,物美價廉,經濟實惠,很喜歡!!!買了好幾個了
# Set the runtime to GPU first!!!
# !pip install -U ckiptagger[tf,gdown]
import os
from ckiptagger import data_utils, WS
data_utils.download_data_gdown("./")
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
ws = WS("./data", disable_cuda=False)
@howard-haowen
howard-haowen / JsonToDf.py
Created January 11, 2021 04:00
Load json files to pandas dataframes
import pandas as pd
import json
def create_df(file_path):
# read the JSON data using json.load()
with open(file_path) as json_file:
data_dict = json.load(json_file)
# convert json dataset from dictionary to dataframe