Skip to content

Instantly share code, notes, and snippets.

View wangqr's full-sized avatar
☺️
(๑╹ᆺ╹)

wangqr wangqr

☺️
(๑╹ᆺ╹)
  • University of Michigan
  • Ann Arbor
View GitHub Profile
@wangqr
wangqr / loopbot.py
Created September 17, 2017 06:31
A python bot for game com.balysv.loop (Infinite loop)
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import cv2
import numpy as np
import subprocess
import sys
adb = 'Fill your adb path here'
@wangqr
wangqr / battery.py
Created September 17, 2017 06:18
Python script to get battery status on Windows
#! /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),
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))
#! /bin/sh
python3 -m pip list --outdated |cut -d ' ' -f 1 |xargs -n1 python3 -m pip install --upgrade
# x86
72 03 73 01 E8 -> 0F 1F 44 00 00
// ==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/*