Skip to content

Instantly share code, notes, and snippets.

💪
Fighting!

Yu Hao jinyu121

💪
Fighting!
Block or report user

Report or block jinyu121

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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 Nov 29, 2018
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 Jun 24, 2019
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
@jinyu121
jinyu121 / 01_face_dataset.py
Created Jun 1, 2018
OpenCV Face Recognition Demo
View 01_face_dataset.py
import cv2
cam = cv2.VideoCapture(0)
cam.set(3, 640) # set video width
cam.set(4, 480) # set video height
face_detector = cv2.CascadeClassifier('conf/haarcascade_frontalface_default.xml')
# For each person, enter one numeric face id
names_count = [x.strip() for x in open('conf/names.txt').readlines() if x.strip() != ""]
@jinyu121
jinyu121 / ss.py
Created Apr 15, 2018
Convert shadowsocks info to ss schema
View ss.py
import base64
server = "12.34.56.78"
port = "12345"
password = "Here is the password"
encrypt_method = "chacha20-ietf-poly1305"
s = "{}:{}".format(encrypt_method, password).encode()
print("ss://{}@{}:{}".format(base64.standard_b64encode(s).decode(), server, port))
You can’t perform that action at this time.