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 org.wangqr.xkhelper | |
// @description 选课登录界面的功能补充,增加记住用户名功能 *仅在Firefox测试通过* | |
// @grant none | |
// @run-at document-end | |
// @include https://zhjwxk.cic.tsinghua.edu.cn/* | |
// @include https://zhjwxkyw.cic.tsinghua.edu.cn/* | |
// @include http://zhjwxk.cic.tsinghua.edu.cn/* | |
// @include http://zhjwxkyw.cic.tsinghua.edu.cn/* |
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
# x86 | |
72 03 73 01 E8 -> 0F 1F 44 00 00 |
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
#! /bin/sh | |
python3 -m pip list --outdated |cut -d ' ' -f 1 |xargs -n1 python3 -m pip install --upgrade |
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
def timeit(func, *args, **kwargs): | |
import time | |
if time.__dict__.get('perf_counter'): | |
timer = time.perf_counter | |
else: | |
timer = time.clock | |
a = timer() | |
ret = func(*args, **kwargs) | |
b = timera() | |
print('[ INFO ] Elapsed %f sec' % (b-a)) |
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
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import ctypes | |
from ctypes import wintypes | |
class SYSTEM_POWER_STATUS(ctypes.Structure): | |
_fields_ = [ | |
('ACLineStatus', wintypes.BYTE), | |
('BatteryFlag', wintypes.BYTE), |
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
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import cv2 | |
import numpy as np | |
import subprocess | |
import sys | |
adb = 'Fill your adb path here' |