This file contains hidden or 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 | |
def render_chat(chats): | |
chat_rendered = [] | |
for chat in chats: | |
item = chat['replayChatItemAction']['actions'][0] | |
if 'addChatItemAction' not in item: | |
continue | |
item = item['addChatItemAction']['item'] | |
if 'liveChatTextMessageRenderer' in item: |
This file contains hidden or 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
Input "NUM:",M | |
If fPart(M | |
Then | |
Disp "ERR: NUM IS NOT INT" | |
Stop | |
End | |
0->C | |
2->T | |
M->I |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) | |
NewerOlder