Skip to content

Instantly share code, notes, and snippets.

View coldestlin's full-sized avatar
🚀

Gee coldestlin

🚀
  • Shenzhen
View GitHub Profile
@coldestlin
coldestlin / remove_node_modules.py
Created April 22, 2020 13:12
gather and delete all unused node modules from specified folders
"""
gather and delete all node_modules from specified folders
node_modules是个坑,定时删除一下挺好的。
删除之前需要列出来看看有没有误删的,比如vscode里面插件的node_modules应该不能删除。
zhlin 2020-04-22
"""
import os
import shutil
import sys
import time
@coldestlin
coldestlin / capture_articles.py
Created April 7, 2020 02:40 — forked from 2019ncovmemory/capture_articles.py
Create screenshots of articles; work for WeChat articles with lazy loading.
'''
Usage: python archive_articles.py test.csv
Input: test.csv
name url
1 url1
2 url2
.....
output:
1.png
2.png
# see also https://github.com/wrobstory/pgshift
import gzip
from io import StringIO, BytesIO
from functools import wraps
import boto
from sqlalchemy import MetaData
from pandas import DataFrame
from pandas.io.sql import SQLTable, pandasSQL_builder