A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import csv | |
from tweepy import Cursor | |
from tweepy import api | |
def run(): |
import logging | |
from rpclib.application import Application | |
from rpclib.decorator import srpc | |
from rpclib.service import ServiceBase | |
from rpclib.model.primitive import String | |
from rpclib.model.primitive import Integer | |
from rpclib.model.complex import Iterable | |
from rpclib.interface.wsdl import Wsdl11 | |
from rpclib.protocol.soap import Soap11 |
#!/usr/bin/env python | |
import enum | |
from math import ceil | |
import click | |
MALE = "male" | |
FEMALE = "female" | |
CUT = "cut" |
gw0 [receiver-thread] RECEIVERTHREAD: starting to run | |
gw0 sent <Message CHANNEL_EXEC channel=1 lendata=7086> | |
gw0 sent <Message CHANNEL_DATA channel=1 lendata=1935> | |
gw1 [receiver-thread] RECEIVERTHREAD: starting to run | |
gw1 sent <Message CHANNEL_EXEC channel=1 lendata=7086> | |
gw1 sent <Message CHANNEL_DATA channel=1 lendata=1935> | |
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=390> | |
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=27> | |
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=124> | |
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=135> |
import xchat, re, requests | |
from requests.auth import HTTPBasicAuth | |
__module_name__ = "vlcnowplaying" | |
__module_version__ = "1.1" | |
__module_description__ = "sputnikus' Now playing script for vlc" | |
metare = re.compile("""<meta\-information\> | |
\<title\>\<\!\[CDATA\[(.*)\]\]\>\<\/title\> | |
\<artist\>\<\!\[CDATA\[(.*)\]\]\>\<\/artist\> | |
\<genre\>\<\!\[CDATA\[(.*)\]\]\>\<\/genre\> |
# dupla_list = list full of duplicates | |
seen = set() | |
clean_list = [] | |
for item in dupla_list: | |
props = tuple(item.items()) | |
if props not in seen: | |
seen.add(props) | |
clean_list.append(item) |
>>> import time | |
>>> format = '%d %B %Y' | |
>>> sort_dates = lambda y: sorted(y, key=lambda x: int(time.mktime(time.strptime(x, format)))) | |
>>> dates = ['13 July 2011', '13 August 2011', '3 October 2010', '13 July 2012'] | |
>>> sort_dates(dates) | |
['3 October 2010', '13 July 2011', '13 August 2011', '13 July 2012'] |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import time | |
from math import sqrt | |
def fibonacci(n): | |
root5 = sqrt(5) | |
phi = 0.5 + root5 / 2 |