-
Run the command:
python pixiv_auth.py login
This will open the browser with Pixiv login page.
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
# please use python3 and flask > 1.0 | |
# run this with : python3 flask_separate_thread.py | |
# https://web.archive.org/web/20210329135424/https://pymotw.com/3/threading/ | |
# https://web.archive.org/web/20210329135553/https://eli.thegreenplace.net/2011/08/22/how-not-to-set-a-timeout-on-a-computation-in-python | |
import time | |
import threading | |
from flask import Flask | |
app = Flask(__name__) |
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
# Website: https://software.intel.com/content/www/us/en/develop/articles/pin-a-binary-instrumentation-tool-downloads.html | |
# License: https://software.intel.com/sites/landingpage/pintool/pinlicense.txt | |
# This snippet: https://gist.github.com/mrexodia/f61fead0108603d04b2ca0ab045e0952 | |
# TODO: lunix support | |
# Thanks to Francesco for showing me this method | |
CPMAddPackage( | |
NAME IntelPIN | |
VERSION 3.18 | |
URL https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.18-98332-gaebd7b1e6-msvc-windows.zip |
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: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
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 socket | |
import struct | |
import json | |
def unpack_varint(s): | |
d = 0 | |
for i in range(5): | |
b = ord(s.recv(1)) | |
d |= (b & 0x7F) << 7*i | |
if not b & 0x80: |