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
var weathersleep = false; | |
var ready = false; | |
var settings; | |
var manuallongitude; | |
var manuallatitude; | |
var manuallocation; | |
var fetchtime = 60; | |
var apikey = "{API_KEY_HERE}"; | |
function iconFromWeatherId(weatherId) { |
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
for i in * | |
do | |
cd $i | |
for j in *.m4a | |
do | |
mv "$j" ${j%" 1.m4a"}.m4a | |
done | |
cd .. | |
done |
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/bash | |
# NOTE: this is a very quick and dirty script. It saves the files as the <video id>.json | |
# You will need to map this back to the actual video if you want sane filenames | |
# TODO: merge this back to the main script and make sure the script can be run to make a partial download... | |
channel="Rosemi_Lovelock" | |
stream_list_ids="streams.txt" | |
# Enable this if you did not previously download the streams with the --download-archive flag set |
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 time | |
import math | |
def prime_number(pnum): | |
primes = [2] | |
number = 1 | |
while len(primes) < pnum: | |
is_prime = True | |
number += 2 |
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
""" | |
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) | |
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 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) |
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
#include <cstdio> | |
#include <vector> | |
using namespace std; | |
class Blah { | |
private: | |
int a; | |
public: | |
Blah(int a){ | |
this->a = 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
import json | |
if __name__ == "__main__": | |
name = input("Enter your Indiegogo Pledge display name: ") | |
with open('backer_data.json') as infile: | |
data = json.load(infile) | |
backers = data['backers'] | |
for i in range(len(backers)): | |
if backers[i]['pledger_display_name'] == name: | |
print(len(backers) - i) | |
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
// 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"; |
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
## 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 |
NewerOlder