Skip to content

Instantly share code, notes, and snippets.

Avatar
💪
Fighting!

Yu Hao jinyu121

💪
Fighting!
View GitHub Profile
@jinyu121
jinyu121 / README.md
Last active Dec 25, 2020
SimpleImageHTTPServer
View README.md

SimpleImageHTTPServer

Modified from SimpleHTTPServer, this file can setup a simple image server, to view folder, image, and compare images between folders.

How to use

Start

python image_server.py --path path/to/your/image/folder
@jinyu121
jinyu121 / README.md
Created Jul 29, 2019
Batch Downloader
View README.md

Batch Downloader

Give a txt which contains urls to download, this script will download them for you.

Requre

  • tqdm
@jinyu121
jinyu121 / README.md
Last active Apr 11, 2019
Huawei midnight snack QR code generator
View README.md

Huawei midnight snack QR code generator

Just for fun.

DO NOT DO EVIL

@jinyu121
jinyu121 / README.md
Created Mar 7, 2019
网易博客图片批量下载
View README.md

网易博客停运,但是不支持打包下载。 于是可以从某个页面上下载回来所有的博客文字的xml,还可以下载出来博客配图的xml。 用这个xml配合上述脚本即可快速将图片下载回来。

@jinyu121
jinyu121 / format_bib_name.py
Created Feb 13, 2019
将bib里面的姓名格式化为简写
View format_bib_name.py
def process_name(name):
names=[]
for nm in [x.strip() for x in name.split()]:
if '-' in nm:
tmp = [x.strip() for x in nm.split('-')]
tmp = [x[0]+"." for x in tmp]
names.append("-".join(tmp))
else:
names.append(nm[0]+".")
return " ".join(names)
@jinyu121
jinyu121 / README.md
Last active Feb 11, 2019
网易邮箱问候语收集汇总
View README.md

网易邮箱问候语收集汇总

部分来源于当前接口,部分来源于豆瓣

@jinyu121
jinyu121 / ShameEyesdroper.user.js
Created Jan 23, 2019
ShameEyesdroper.user.js
View ShameEyesdroper.user.js
// ==UserScript==
// @name Shame Eyesdroper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://*/*
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @run-at document-start
@jinyu121
jinyu121 / gammuapi.py
Last active Aug 5, 2019
Huawei Dongle SMS Forward
View gammuapi.py
import configparser
import sqlite3
from os.path import join
from gammu import smsd
class ForwardTargetBase:
def send(self, message):
raise NotImplementedError()
@jinyu121
jinyu121 / README.md
Last active Oct 5, 2018
V2Ray backup
View README.md

Backup a specific binary release version of V2Ray.

@jinyu121
jinyu121 / coco_to_voc.py
Last active Apr 23, 2021
Convert COCO to VOC
View coco_to_voc.py
import json
import os
from tqdm import tqdm
from xmltodict import unparse
# BBOX_OFFSET: Switch between 0-based and 1-based bbox.
# The COCO dataset is in 0-based format, while the VOC dataset is 1-based.
# To keep 0-based, set it to 0. To convert to 1-based, set it to 1.
BBOX_OFFSET = 0