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
kylemsguy / msnlog.py
Last active Jan 23, 2020 — forked from dwf/msnlog.py
A script that dumps convoluted XML log files from MSN Messenger to readable plaintext.
View msnlog.py
"""
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
kylemsguy / mpu_calc.py
Last active Aug 2, 2019
Main Power Up calculator Python script
View mpu_calc.py
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
kylemsguy / blah.cpp
Last active Sep 28, 2018
Vector of Vectors test
View blah.cpp
#include <cstdio>
#include <vector>
using namespace std;
class Blah {
private:
int a;
public:
Blah(int a){
this->a = a;
@kylemsguy
kylemsguy / indiegogo_backer_dumper.py
Last active Jun 10, 2018
Get useful Indiegogo backer data and save it as a json
View indiegogo_backer_dumper.py
import json
import requests
campaign_id = 0 # integer
api_url = "https://www.indiegogo.com/private_api/campaigns/{campaign_id}/pledges?page={page_no}"
def get_backer_data(data: dict) -> list:
"""
@kylemsguy
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].parentNode.style.display = "none";document.getElementsByTagName("body")[0].style.overflow = "auto";
View billproblem.py
## Inspired by an episode of MinutePhysics
# You can find a link to the original video here: https://www.youtube.com/watch?v=eivGlBKlK6M
# The algorithm used here is from https://www.youtube.com/watch?v=C5-I0bAuEUE
# 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
kylemsguy / test.py
Created Dec 14, 2014
Q&D automate package tracking
View test.py
import re
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
tracking_number = ('')
browser = webdriver.Firefox()
browser.get("https://www.canadapost.ca/cpotools/apps/track/personal/findByTrackNumber")
@kylemsguy
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
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
clean:
rm a2.log a2.aux a2.synctex.gz a2.pdf
@kylemsguy
kylemsguy / Makefile
Created Oct 29, 2014
Arduino Leonardo CLI Flasher
View Makefile
## Taken from
## http://nicholaskell.wordpress.com/2012/08/11/arduino-leonardo-upload-from-makefile/
PORT = /dev/ttyACM1
HEXFILE = ./LEONARDO_16664.hex
burn:
python reset.py $(PORT)
sleep 2
avrdude -patmega32u4 -cavr109 -P$(PORT) -b57600 -D -Uflash:w:./$(HEXFILE):i
You can’t perform that action at this time.