Skip to content

Instantly share code, notes, and snippets.

View VioletVivirand's full-sized avatar
👻
Always searching for the next job 😜

Chung-Ping Huang VioletVivirand

👻
Always searching for the next job 😜
  • Chunghwa Telecom
  • Kaohsiung, Taiwan
  • 12:30 (UTC +08:00)
View GitHub Profile
@VioletVivirand
VioletVivirand / 0-revision-classify-text-into-categories-with-the-natural-language-api.txt
Last active March 23, 2021 08:14
Revision list for Qwiklabs Lab: Classify Text into Categories with the Natural Language API (https://google.qwiklabs.com/focuses/1749?parent=catalog)
Revision list for Qwiklabs Lab: Classify Text into Categories with the Natural Language API (https://google.qwiklabs.com/focuses/1749?parent=catalog)
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "黃種平",
"label": "資料工程師 @ 台灣塑膠工業股份有限公司",
"picture": "",
"email": "[email protected]",
"phone": "",
"summary": "曾擔任 6 年以上之資料分析師及資料工程師,擅長於進行機器學習領域之資料處理、收集、建立預測模型、持續整合管線、及部署推論模型事務。能快速學習新科技並應用於地端及雲端。具有醫療領域及製造業之 MLOps 建構經驗。",
"location": {
@VioletVivirand
VioletVivirand / threedoors.py
Last active December 29, 2020 07:27
三門問題模擬:換門跟不換門的中獎機率
import random
ROUNDS = 10000 # The times to re-play
COUNT_CHANGE = 0 # If we change the chosen door, the times receiving the car
COUNT_NOT_CHANGE = 0 # If we don't change the chosen door, the times receiving the car
# Play the game, and choose to change the door after first picked
for _ in range(ROUNDS):
# Create 3 doors
doors = {0: 0, 1: 0, 2: 0}
@VioletVivirand
VioletVivirand / netscience.gml
Last active February 26, 2019 08:09
binder-plotly
Creator "Mark Newman on Sat Jul 22 06:24:59 2006"
graph
[
directed 0
node
[
id 0
label "ABRAMSON, G"
]
node
@VioletVivirand
VioletVivirand / demo.py
Created February 1, 2019 08:42
BeautifulSoup with XML
from bs4 import BeautifulSoup
# Read XML with XML parser
with open('template.xml') as fp:
soup = BeautifulSoup(fp, 'xml')
# Modify value of a tag
soup.size.width.string = 'Something New'
# Equal to soup.annotation.size.width
@VioletVivirand
VioletVivirand / cudnn.md
Last active November 1, 2022 00:27
Python venv and Nvidia Driver installation instruction (https://bit.ly/2E3H9Rk)

Nvidia GPU Computing Prerequisites

Step-by-step

  1. Nvidia Driver
  2. CUDA (Compute Unified Device Architecture)
  3. cuDNN (NVIDIA CUDA® Deep Neural Network library)
  4. Install tensorflow-gpu

Nvidia Driver

@VioletVivirand
VioletVivirand / remove.sh
Last active November 2, 2018 08:45
Remove Jupyter Notebook's Output
# Ref: https://stackoverflow.com/a/47774393/2975670
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to notebook input.ipynb --output output.ipynb
jupyter nbconvert --clear-output --to notebook boston.ipynb --output output.ipynb
@VioletVivirand
VioletVivirand / 2018-10-20-CCU-Pandas-Lecture.md
Last active December 5, 2018 00:57
A README file for the lecture on 2018-10-20

中正大學 Python Pandas 初探課程

各位同學好!

這裏將會放置一些在 2018-10-20 的課程會用到的一些資源跟細節。現在我正在更新了!*・゜゚・*:.。..。.:*・'(*゚▽゚*)'・*:.。. .。.:*・゜゚・* 希望很快地可以讓全部的內容正式跟大家見面。

在上課的過程中,如果有值得一提的參考資料,我也會放在這邊,請大家隨時回來察看。

@VioletVivirand
VioletVivirand / scrap.py
Last active August 29, 2018 07:00
Taobao Web Spider Example
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
url = 'https://s.taobao.com/search?q=%E5%B0%BF%E8%A4%B2&type=p&tmhkh5=&spm=a21wu.241046-tw.a2227oh.d100&from=sea_1_searchbutton&catId=100'
@VioletVivirand
VioletVivirand / one-liner-alexa-rank.py
Last active March 29, 2018 04:37
One-liner Alexa Rank
# Reference:
# https://samelh.com/blog/2017/10/01/get-alexa-site-rank-python-php-javascript/
import requests, re
alexa = 'http://data.alexa.com/data?cli=10&dat=s&url={0}'
search_domain = 'google.com'
r = requests.get(alexa.format(search_domain))
xml = r.text
rank = int(re.search(r'<POPULARITY[^>]*TEXT="(\d+)"', xml).groups()[0])