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 http.server | |
import socketserver | |
import os.path | |
def make_http_handler(root_path): | |
class HTTPHandler(http.server.BaseHTTPRequestHandler): | |
def __init__(self, *args, **kwargs): | |
super(HTTPHandler, self).__init__(*args, **kwargs) |
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/env python | |
import random | |
from functools import reduce | |
from collections import Counter | |
class PongSim: | |
skills = [[0,0],[0,0]] |
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/env python | |
import random | |
from sys import argv | |
from functools import reduce | |
from collections import Counter | |
class PongSim: | |
skills = [[0,0],[0,0]] |
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 <cstdarg> | |
#include <string> | |
#include <iostream> | |
void debug(std::string c_fmt, ...); | |
int main() { | |
debug("Testing: %d", 12345); // Testing: -858993460 | |
} |
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
// ==UserScript== | |
// @name MyFitnessPal Percentages and Net Carbs | |
// @version 1.1 | |
// @namespace surye | |
// @description Adds display of Carb/Protein/Fat percentages to any daily food diary page. Also adds "Real Calories" calcalation based off 4/4/9 algorithm. Based on "MyFitnessPal Percentages", modified by Surye to add low carb features such as net carbs. Requires the following columns: Fat, Protein, Carbs, Fiber | |
// @include http://www.myfitnesspal.com/food/diary/* | |
// ==/UserScript== | |
/* side note - 5/30/65 Carbs/Protein/Fat is a good ratio for fat loss */ |
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
// ==UserScript== | |
// @name MyFitnessPal Percentages and Net Carbs | |
// @version 1.0.5 | |
// @namespace surye | |
// @description Adds display of Carb/Protein/Fat percentages to any daily food diary page. Also adds "Real Calories" calcalation based off 4/4/9 algorithm. Based on "MyFitnessPal Percentages", modified by Surye | |
// @include http://www.myfitnesspal.com/food/diary/* | |
// ==/UserScript== | |
/* side note - 5/30/65 Carbs/Protein/Fat is a good ratio for fat loss */ |
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
// ==UserScript== | |
// @name MyFitnessPal Percentages and Net Carbs | |
// @version 1.0.5 | |
// @namespace surye | |
// @description Adds display of Carb/Protein/Fat percentages to any daily food diary page. Also adds "Real Calories" calcalation based off 4/4/9 algorithm. Based on "MyFitnessPal Percentages", modified by Surye | |
// @include http://www.myfitnesspal.com/food/diary/* | |
// ==/UserScript== | |
/* side note - 5/30/65 Carbs/Protein/Fat is a good ratio for fat loss */ |
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
from twx.botapi import TelegramBot, ReplyKeyboardMarkup | |
""" | |
Setup the bot | |
""" | |
bot = TelegramBot('116456440:AAEys8uNPIONg-7nYWDb5Qob1K1KS2cuBjc') | |
bot.update_bot_info().wait() | |
print(bot.username) |
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 tgl | |
users = [] | |
def cinfo(success, chat): | |
for userid in chat.user_list: | |
user = tgl.Peer(type=tgl.PEER_USER, id=userid) | |
users.append(user) | |
if user.username == 'Surye': | |
tgl.create_group_chat(users, "Testing You Can leave") |
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 tgl | |
def cinfo(success, chat): | |
for userid in chat.user_list: | |
user = tgl.Peer(type=tgl.PEER_USER, id=userid) | |
print(user) | |
def dlist(success, dialog_list): | |
for dialog in dialog_list: | |
if dialog['peer'].type is tgl.PEER_CHAT: |
NewerOlder