Skip to content

Instantly share code, notes, and snippets.

View Shenxiu-WU's full-sized avatar

S.WU Shenxiu-WU

  • columbia university
  • Columbia University, New York
View GitHub Profile
@Shenxiu-WU
Shenxiu-WU / convert_json_to_excel.py
Last active February 9, 2022 11:51
json数据转化为.xls存储以及修改已有的.xls
# reference: https://www.cnblogs.com/zhuminghui/p/9196773.html
import json, xlwt, xlrd
from xlutils.copy import copy
def generate_excel(jsonfile, excel_name, sheet_name):
with open(jsonfile, encoding='utf-8') as f: # 将json文件转化为字典
all_list = json.load(f)["result"]["hits"]["hit"]
https://java-er.com/blog/wget-useage-x/
@Shenxiu-WU
Shenxiu-WU / png2jpg.py
Created December 5, 2018 01:53 — forked from qingswu/png2jpg.py
Convert all png images in current folder to jpg using OpenCV cv2
#!/usr/bin/env python
from glob import glob
import cv2
pngs = glob('./*.png')
for j in pngs:
img = cv2.imread(j)
cv2.imwrite(j[:-3] + 'jpg', img)
@Shenxiu-WU
Shenxiu-WU / git_toturial
Last active April 8, 2020 06:47 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "[email protected]" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://[email protected]/VT.git # clone远程仓库