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 asyncio | |
import requests | |
import os | |
import re | |
import time | |
progress = {} | |
chunk_size = 4096 | |
workers = 2 | |
running = 0 |
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
#!/usr/bin/env python3 | |
import argparse | |
import asyncio | |
import requests | |
import os | |
import sys | |
import re | |
import time | |
import signal | |
import configparser |
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
normal_variable = "hello I'm a normal variable" | |
def lazy_variable(): | |
from random import randint | |
return "hello I'm a lazy variable and my favorite number is {}".format(randint(0, 1000)) | |
import sys |
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
from collections import defaultdict | |
def deep_defaultdict(): | |
return defaultdict(deep_defaultdict) | |
d = deep_defaultdict() | |
d['x']['y']['z'] = 'foo' |
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
#define F_CPU 8000000UL | |
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/delay.h> | |
#include <avr/sleep.h> | |
#include <avr/power.h> | |
const uint8_t MINPWM = 1; | |
const uint8_t MAXPWM = 255; |
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
from __future__ import division, print_function | |
from gi.repository import Clutter | |
import random | |
from random import randint | |
from colorsys import rgb_to_hls, hls_to_rgb | |
from sys import argv | |
Clutter.init([]) | |
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
#!/usr/bin/env python | |
# run with get_total_history.py <(history) | |
import fileinput | |
history = [ | |
line.strip().partition(' ')[2] | |
for line in fileinput.input()] |
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
#!/usr/bin/env python3 | |
import urwid | |
palette = [ | |
('highlight', '', '', '', 'bold,#ff0', ''), | |
('item_focus','', '', '', '', '#da0'), | |
] | |
class Item(urwid.WidgetWrap): |
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
#!/usr/bin/env python3 | |
import urwid | |
palette = [ | |
('highlight', '', '', '', 'bold,#ff0', ''), | |
('highlight_focus', '', '', '', 'bold,#ff0', '#da0'), | |
('item_focus','', '', '', '', '#da0'), | |
] | |
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 urwid | |
class MyEdit(urwid.Edit): | |
def keypress(self, size, key): | |
if key == 'enter': | |
return True | |
urwid.Edit.keypress(self, size, key) | |
edit = MyEdit(edit_text='Press ENTER to see my problem!') |