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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Video of this screencast: https://vimeo.com/57296525 | |
# | |
# | |
from __future__ import print_function, division, absolute_import | |
from PIL import Image as pImage | |
import numpy |
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
#!/usr/bin/python | |
import time, sys | |
iface="eth0" if len(sys.argv) < 2 else sys.argv[1] | |
_prev_in = 0 | |
_prev_out = 0 | |
print "With interface: " + iface | |
with open("/proc/net/dev") as f: | |
while True: | |
for row in f: |
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
# -*- coding: utf-8 -*- | |
import sys;reload(sys);sys.setdefaultencoding('utf-8') | |
import twitter | |
import time | |
import commands, itertools | |
consumer_key = ... | |
consumer_secret = ... | |
access_key = ... |
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 twisted.names import dns, server, client, cache | |
from twisted.application import service, internet | |
from twisted.internet import defer | |
from twisted.python import log | |
class disResolverBackend(client.Resolver): | |
def __init__(self, servers=None): | |
client.Resolver.__init__(self, servers=servers) | |
self.ttl = 5 | |
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
{ | |
"detect_indentation": false, | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "Cyrillic (Windows 1251)", | |
"font_face": "monofur", | |
"font_size": 18, | |
"highlight_line": true, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, | |
"use_tab_stops": true |
NewerOlder