Skip to content

Instantly share code, notes, and snippets.

@yingziwu
yingziwu / encode.py
Created October 28, 2020 15:42 — forked from gasman/encode.py
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)
@yingziwu
yingziwu / WeiboUtil.js
Last active July 3, 2019 08:59 — forked from fengmk2/WeiboUtil.js
新浪微博mid与url互转实用工具
/**
* 新浪微博mid与url互转实用工具
* 作者: XiNGRZ (http://weibo.com/xingrz)
*/
var WeiboUtil = {
// 62进制字典
str62keys: [
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",