This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
byr最新免费资源rss订阅工具 | |
(配合uTorrent的自动下载rss订阅功能,可刷上传流量) | |
""" | |
import requests | |
import re | |
from lxml import etree | |
import datetime | |
import PyRSS2Gen | |
from fastapi import FastAPI, Response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 网络学堂 批改作业 跳转到下一个人 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description try to take over the world! | |
// @author You | |
// @match https://learn.tsinghua.edu.cn/f/wlxt/kczy/xszy/teacher/beforePiYue?* | |
// @icon https://www.google.com/s2/favicons?domain=tsinghua.edu.cn | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_first = true | |
save_value = "<span>50<span>" | |
function update_btn() { | |
btn = $("#perPageDiv>") | |
if (btn.length == 0) { | |
is_first = true | |
return | |
} | |
if (is_first) { | |
$("#perPageDiv>")[0].innerHTML = save_value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Mar 22 23:25:50 2021 | |
@author: aqzlp | |
""" | |
#%% | |
import pyaudio | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reference: https://forums.zotero.org/discussion/82558/rdf-extra-field | |
var fieldName = "extra"; | |
var fieldID = Zotero.ItemFields.getID(fieldName); | |
var s = new Zotero.Search(); | |
s.libraryID = Zotero.Libraries.userLibraryID; | |
s.addCondition(fieldName, 'contains', ': '); | |
s.addCondition('joinMode', 'any'); | |
var ids = await s.search(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import soundfile as sf | |
from tqdm import tqdm | |
def get_info(audio_file_list): | |
res = [] | |
for wav in tqdm(audio_file_list): | |
if not Path(wav).exists(): | |
print(f"Warning: File not exists: {wav}") | |
continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import img2pdf | |
# =========== 总流程 ============ | |
# pdf --> jpg (抽取内部原有的jpg) | |
# 过滤掉不要的图片 | |
# jpg --> pdf | |
# =============================== | |
def extract_all_jpg_from_pdf(pdf_file): | |
res = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
// js code | |
function di(page) { | |
var canName = "page_" + page; | |
var canvas = document.getElementById(canName); | |
var dataUrl = canvas.toDataURL(); | |
//console.log(dataUrl) | |
$.post('http://localhost:19290/'+page+'.png', dataUrl) | |
} | |
for (let i = 69; i <= 75; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import os | |
im_list = [Image.open('abc/'+i).convert('RGB') for i in sorted(os.listdir('abc')) if i.endswith(".png")] | |
im_list[0].save('output.pdf', "PDF" ,resolution=100.0, save_all=True, append_images=im_list[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;----------------------------------- | |
; Macro Recorder v2.1 By FeiYue | |
; | |
; Description: This script records the mouse | |
; and keyboard actions and then plays back. | |
; | |
; F1 --> Record(Screen) (CoordMode, Mouse, Screen) | |
; F2 --> Record(Window) (CoordMode, Mouse, Window) | |
; F3 --> Stop Record/Play | |
; F4 --> Play LogFile |
NewerOlder