Skip to content

Instantly share code, notes, and snippets.

@InJeCTrL
InJeCTrL / index.js
Last active February 17, 2025 15:03
抖音直播录制
// ==UserScript==
// @name Tiktok Live Monitor
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Monitor live status, invoke local record server if onair
// @author InJeCTrL
// @match https://www.douyin.com/user/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=douyin.com
// @grant GM_xmlhttpRequest
// ==/UserScript==
@InJeCTrL
InJeCTrL / openai_invoker.py
Created February 12, 2023 10:45
A thread-safe OpenAI api invoker which support api_key pool
import openai
import threading
import time
from collections import OrderedDict
class OpenAIInvoker:
__unblock_time = 60 * 1000
Completion = openai.Completion()
@InJeCTrL
InJeCTrL / client.py
Created October 23, 2022 19:11
Python Remote Screen Sharing
from PIL import Image, ImageDraw
from io import BytesIO
import socket
import struct
import threading
import matplotlib.pyplot as plt
######################
IP = "xxx"
PORT = 5555
@InJeCTrL
InJeCTrL / get.py
Created April 6, 2021 03:56
凹凸租车爬虫+web
import requests
import time
import json
import pymysql
# 310100 上海
# 320100 南京
# 330100 杭州
# 440100 广州
# 440300 深圳
@InJeCTrL
InJeCTrL / extractURLs.py
Created April 6, 2021 03:53
APK提取URL
from concurrent.futures import ProcessPoolExecutor
import requests
import pandas as pd
from androguard.misc import AnalyzeAPK
import os
import re
import base64
maxCurrent = 12
@InJeCTrL
InJeCTrL / FunEnc.py
Created January 28, 2021 07:08
替换01加密
class FunEnc:
def __init__(self):
# self.__zero = 'O'
# self.__one = '0'
# self.__sep = '1'
self.__one = '1'
self.__zero = '0'
self.__sep = ' '
@InJeCTrL
InJeCTrL / yuketang.py
Created October 3, 2020 09:23
雨课堂网课视频
from selenium import webdriver
import time
url_course = "https://grsbupt.yuketang.cn/pro/lms/84eubUXLHEy/4842006/video/{0}"
ff = webdriver.Firefox()
ff.maximize_window()
time.sleep(10)
for i in range(7117140, 7117151, 1):
print(i)
ff.get(url_course.format(str(i)))
@InJeCTrL
InJeCTrL / new_byleftmenu.py
Last active March 5, 2021 10:50
北邮研究生自动选课
import bs4
import requests
import time
import random
def login(username, password):
header_prelogin = {
"Host": "auth.bupt.edu.cn",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0",
@InJeCTrL
InJeCTrL / combine.py
Last active September 19, 2020 06:13
获取&解析东方财富股票数据
import pandas as pd
import os
import time
path_eastmoney = "./data_parsed/"
path_jointquant = "./data_jq/"
path_result = "./data_comb/"
list_eastmoney = os.listdir(path_eastmoney)
@InJeCTrL
InJeCTrL / like.js
Created September 2, 2020 12:19
Bilibili动态自动点赞
// 在他人动态主页中使用
var l = $(".single-button.c-pointer.p-rel");
for(var i = 0; i < l.length; ++i){
if(l[i].children[0].children[0].className != "custom-like-icon zan-hover"){
l[i].click();
}
}