- 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 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 requests import Session # get the class to subclass | |
# setup your variables in the class | |
class BasecampSession(Session): | |
_username = '' | |
_password = '' | |
_basecamp_account_number = '' | |
_basecamp_api_url = 'https://basecamp.com/{}/api/v1/' | |
def __init__(username,password,bc_account_number,*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
#!/usr/bin/python | |
try: | |
from htmlbuilder import html | |
except ImportError: | |
import sys | |
print '\n'.join(sys.path) | |
sys.exit() | |
from flask import Flask | |
add_styles = ( |
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
(lambda flask: | |
(lambda Flask: | |
(lambda app: | |
(lambda hello: | |
[f() for f in [ | |
lambda : app.route("/")(hello), | |
lambda : app.run() if __name__ == "__main__" else None | |
] | |
][-1] | |
)(lambda : |
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 flask import Flask | |
app = Flask('__name__') | |
@app.route('/') | |
def index(): | |
return 'Hello World!' | |
app.run() |
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
######################################################## | |
# How to NOT use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda const-# | |
# ruct in Python 2.x. DO NOT USE ANY OF THIS EVER # | |
# by: e000 (13/6/11) # | |
######################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much annymous "one line" functions |
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
######################################################## | |
# How to NOT use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda const-# | |
# ruct in Python 2.x. DO NOT USE ANY OF THIS EVER # | |
# by: e000 (13/6/11) # | |
######################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much annymous "one line" functions |
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 requests | |
class BasecampApi(object): | |
_username = '' | |
_password = '' | |
_account_number = '' | |
_base_url = 'https://{}:{}@basecamp.com/{}/api/v1/' | |
def __init__(self,user,pw,acct_num): | |
self._user = user |
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 flask | |
app = flask.Flask(__name__) | |
# for this to work you need to register your redirect uri to SERVER_IP/auth/confirm | |
@app.route('/auth/confirm') | |
def get(): | |
return flask.jsonify(dict(code=flask.request.args.get('code',None))) | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer