Skip to content

Instantly share code, notes, and snippets.

@Xzonn
Xzonn / .gitignore
Last active June 10, 2021 06:37
FixPageLinkNames
MediaWiki.py
Data.py
__pycache__
in.txt
out.txt
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
import datetime
import json
import os
import requests
os.chdir(os.path.dirname(__file__))
// ==UserScript==
// @id CNKI-PDF-Special
// @name CNKI 中国知网 PDF 全文下载(特制版)
// @version 3.2.0.20170210
// @namespace http://yuelong.info
// @author YUE Long
// @description 参见 http://blog.yuelong.info/post/cnki-pdf-js.html
// @include http://*.cnki.net/*
// @include http://*.cnki.net.*/*
// @exclude http://image.cnki.net/*
import os
import struct
walk = os.walk("./")
data = {}
for root, dirs, files in walk:
for fileName in files:
fullName = os.path.join(root, fileName)
@Xzonn
Xzonn / extract_ptd.py
Created October 3, 2020 05:51 — forked from NWPlayer123/extract_ptd.py
Astral Chain PTD text
#Forked from NWPlayer123/extract_ptd.py
#thanks Simon for being a smartie
#unfinished, need to parse all the tables
#string_offset starts at +0x20 (header)
from struct import unpack
import sys
sys.argv.append("Hud_text_CNzh.bin")
def read16(f):
return unpack("<H", f.read(2))[0]
import math
def ZOrderX(tileSize, count):
div = tileSize // 2;
x_in = count // div & div;
while div > 1:
div = div // 2;
x_in |= count // div & div;
return x_in;
import struct
import re
import random
import json
import os
import time
from PIL import Image, ImageDraw, ImageFont
from pngToBin import getPointSequence
with open("../main.gzf", "rb") as f:
@Xzonn
Xzonn / bvtest.py
Created March 24, 2020 10:59 — forked from abc1763613206/bvtest.py
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
@Xzonn
Xzonn / Zhihuishu.user.js
Last active May 20, 2022 09:33
智慧树(zhihuishu.com)课程视频二倍速播放
// ==UserScript==
// @name 智慧树,二倍速
// @namespace http://github.com/Xzonn/
// @version 0.9.0
// @description 打开智慧树的新大门
// @author Xzonn
// @match https://studyh5.zhihuishu.com/videoStudy.html
// @grant none
// @updateURL https://gist.github.com/Xzonn/78b49d1065a2d5306761cd50b8342e49/raw/462828aeb781c440b83578a6ab3a575ac9871145/Zhihuishu.user.js
// ==/UserScript==