Skip to content

Instantly share code, notes, and snippets.

View titaneric's full-sized avatar
🎯
Focusing

Huang Chen-Yi titaneric

🎯
Focusing
View GitHub Profile
@titaneric
titaneric / data.csv
Created October 7, 2020 11:29
Solution for @loser113 at PTT
A B C D
1 2 3 4
2 3 4 5
5 6 7 8
2 3 4 6
@titaneric
titaneric / PTT.ipynb
Last active December 15, 2019 09:14
MultiIndex problem for @ck0201
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@titaneric
titaneric / test.log
Last active October 24, 2019 03:19
PTT for @ctr1
Jan 2 07:50:41 clftp1 ftpd[14459]: NOOP
Jan 2 07:50:41 clftp1 ftpd[14459]: CWD //MG11T36.1
Jan 2 07:50:41 clftp1 ftpd[14459]: PORT
Jan 2 07:50:41 clftp1 ftpd[14459]: LIST
@titaneric
titaneric / ptt.py
Created November 14, 2018 12:43
To tomdannis @ptt
l = ["1060501", "1. AAA 2. BBB", "ID1234", "1060502", "1. BBB", "ID0000"]
selected_list = [l[i] for i in range(0, len(l), 3) if "AAA" in l[i+1]]
print(selected_list)
@titaneric
titaneric / OCR.py
Last active July 1, 2019 06:33
OCR.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import urllib.request
from PIL import Image
from selenium.webdriver.support.select import Select
from PIL import ImageEnhance
import matplotlib.pyplot as plt
import cv2
import numpy as np
import urllib.request
@titaneric
titaneric / ptt.py
Created November 27, 2017 14:41
To vidmle @ptt-python
import json
from urllib.request import urlopen
with urlopen("http://opendata2.epa.gov.tw/AQI.json") as url:
text = url.read().decode("utf8")
json_list = json.loads(text)
with open("AQI.json", "w", encoding="utf8") as f:
json.dump(json_list, f, ensure_ascii=False)