- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
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 unicodedata | |
def strip_accents(unicode_string): | |
""" | |
Strip accents (all combining unicode characters) from a unicode string. | |
""" | |
ndf_string = unicodedata.normalize('NFD', unicode_string) | |
is_not_accent = lambda char: unicodedata.category(char) != 'Mn' | |
return ''.join( | |
char for char in ndf_string if is_not_accent(char) |
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 pandas as pnd | |
import numpy as np | |
import numpy.random as rnd | |
from collections import namedtuple | |
class Sampler(list): | |
def __init__(self, items, weights=None): | |
super(Sampler, self).__init__(items) |
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 redis | |
import functools | |
from collections import namedtuple | |
# TODO: | |
# - better to implement lua methods as descriptors? | |
# - get lua code from *.lua files | |
class BaseEvaluator(object): |
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
# coding=utf-8 | |
from flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
app = Flask(__name__) | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' | |
# app.config['SQLALCHEMY_BINDS'] = { | |
# 'users': 'mysqldb://localhost/users', | |
# 'appmeta': 'sqlite:////path/to/appmeta.db' | |
# } |
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
if [ $(id -u) -ne 0 ]; then | |
echo "This script must be run as root"; | |
exit 1; | |
fi | |
gsettings set org.gnome.system.proxy mode 'none' ; | |
grep PATH /etc/environment > lol.t; | |
cat lol.t > /etc/environment; |
Descendo na estação São Judas: https://goo.gl/maps/2CKSH3pDAhy
- Desça na estação São Judas da linha azul do metrô, e saia da estação para o lado par da Avenida Jabaquara (ao sair pela catraca, saia pela escada rolante à sua direita).
- Ao sair da estação siga à sua direita, no sentido bairro da Av. Jabaquara.
- Acompanhe a avenida virando à direita e passe em frente à Paróquia de São Judas Tadeu (uma igreja bem grande).
- Vire a direita na Av. Indianópolis.
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
{-# LANGUAGE RankNTypes #-} | |
import Prelude hiding ((++), length) | |
import Control.Applicative | |
import Data.Foldable | |
newtype List a = List { | |
uncons :: forall r . (a -> List a -> r) -> r -> r | |
} |
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
{-# LANGUAGE RankNTypes #-} | |
import Prelude hiding (Maybe, Just, Nothing, maybe) | |
data Maybe a = Maybe {maybe :: forall r . r -> (a -> r) -> r} | |
nothing = Maybe (\nothing' just' -> nothing') | |
just x = Maybe (\nothing' just' -> just' x) | |
instance (Show a) => (Show (Maybe a)) where |
I hereby claim:
- I am rcalsaverini on github.
- I am rcalsaverini (https://keybase.io/rcalsaverini) on keybase.
- I have a public key ASDKgpHzRwJySS-DBZgNtUG-KvIzPzeo_TrqQWoOduQvPgo
To claim this, I am signing this object: