Skip to content

Instantly share code, notes, and snippets.

Kyle Zhou kylemsguy

  • Vancouver
Block or report user

Report or block kylemsguy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kylemsguy /
Last active Jan 23, 2020 — forked from dwf/
A script that dumps convoluted XML log files from MSN Messenger to readable plaintext.
Simple script I whipped up to dump MSN Messenger logs in XML to a readable
plaintext format. It's not very robust, nor am I sure which versions of MSN
Messenger it's compatible or incompatible with; I just had a specific
conversation I wanted to read, and this was the vehicle to that end.
By David Warde-Farley -- user AT cs dot toronto dot edu (user = dwf)
Updated for Python 3.6 by Kyle Zhou (also former CS student at UofT)
kylemsguy /
Last active Aug 2, 2019
Main Power Up calculator Python script
import argparse
import json
import math
def calc_dmg(A, base_dmg, high, mid):
_min = 1.0
B = (3.3 * A - 0.027 * A**2) / 100
C = (mid - _min) / (high - _min)
D = _min + (high - _min) * lerpN(B, C)
kylemsguy / blah.cpp
Last active Sep 28, 2018
Vector of Vectors test
View blah.cpp
#include <cstdio>
#include <vector>
using namespace std;
class Blah {
int a;
Blah(int a){
this->a = a;
kylemsguy /
Last active Jun 10, 2018
Get useful Indiegogo backer data and save it as a json
import json
import requests
campaign_id = 0 # integer
api_url = "{campaign_id}/pledges?page={page_no}"
def get_backer_data(data: dict) -> list:
kylemsguy / hide_quora_nag.js
Created Jun 16, 2017
Hide the Quora login nag screen
View hide_quora_nag.js
// Simply copy the following line into the dev console while on the page with the nag screen.
// Alternatively, paste it into a bookmarklet.
document.getElementsByClassName("modal_signup_background")[0] = "none";document.getElementsByTagName("body")[0].style.overflow = "auto";
## Inspired by an episode of MinutePhysics
# You can find a link to the original video here:
# The algorithm used here is from
# but you should really watch the first one first
import sys
from random import shuffle
class Box:
def __init__(self, bill):
self.bill = bill
kylemsguy /
Created Dec 14, 2014
Q&D automate package tracking
import re
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
tracking_number = ('')
browser = webdriver.Firefox()
kylemsguy / gist:4334cdf67d17046d39e1
Created Nov 6, 2014
Quick Verilog ASCII generator
View gist:4334cdf67d17046d39e1
def get_ascii_hex(s:str):
[print("8'h", hex(ord(i))[2:].upper(), sep='') for i in s]
kylemsguy / Makefile
Created Oct 31, 2014
LaTeX document Makefile
View Makefile
all: a2.pdf a2.log a2.aux a2.synctex.gz
a2.pdf: a2.tex
pdflatex -synctex=1 -interaction=nonstopmode "a2".tex
rm a2.log a2.aux a2.synctex.gz a2.pdf
kylemsguy / Makefile
Created Oct 29, 2014
Arduino Leonardo CLI Flasher
View Makefile
## Taken from
PORT = /dev/ttyACM1
HEXFILE = ./LEONARDO_16664.hex
python $(PORT)
sleep 2
avrdude -patmega32u4 -cavr109 -P$(PORT) -b57600 -D -Uflash:w:./$(HEXFILE):i
You can’t perform that action at this time.