background preloader

Virtualenvwrapper 2.9 — virtualenvwrapper v2.9 documentation

Virtualenvwrapper 2.9 — virtualenvwrapper v2.9 documentation
virtualenvwrapper is a set of extensions to Ian Bicking’s virtualenv tool. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies. Features¶ Organizes all of your virtual environments in one place.Wrappers for managing your virtual environments (create, delete, copy).Use a single command to switch between environments.Tab completion for commands that take a virtual environment as argument.User-configurable hooks for all operations (see Per-User Customization).Plugin system for more creating sharable extensions (see Extending Virtualenvwrapper). Introduction¶ The best way to explain the features virtualenvwrapper gives you is to show it in use. First, some initialization steps. Now we can install some software into the environment. We can see the new package with lssitepackages: Support¶ Shell Aliases¶ License¶ Related:  Python

ronnix/fabtools - GitHub How To Install and Configure Django with Postgres, Nginx, and Gunicorn Prerequisites This tutorial assumes you have already set up your droplet (VPS) with Debian 7 or a similar distro of Linux (such as Ubuntu). If you have not already done this, please follow the tutorial on setting up a droplet here. For convenience, I've broken this tutorial into two parts. The first part (steps 1 - 6) covers installation only. Step One: Update Packages Before we do anything, we need to make sure that all the packages installed on our VPS are up to date. sudo apt-get update sudo apt-get upgrade The first command downloads any updates for packages managed through apt-get. Step Two: Install and Create Virtualenv Installing virtualenv is very simple. sudo apt-get install python-virtualenv That's all there is to it! sudo virtualenv /opt/myenv Notice that a new directory "myenv" was created in the "/opt" directory. Step Three: Install Django Now we need to activate our virtualenv so that when we install Python packages they install to our virtualenv. source /opt/myenv/bin/activate

Python Imaging Library (PIL) The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities. Status The current free version is PIL 1.1.7. Support Free Support: If you don't have a support contract, please send your question to the Python Image SIG mailing list. You can join the Image SIG via's subscription page, or by sending a mail to You can also ask on the Python mailing list,, or the newsgroup comp.lang.python. Downloads The following downloads are currently available: Additional downloads may be found here. For a full list of changes in this release, see this page. If the Windows installer cannot find a Python interpreter, you may have to register your interpreter. For a full list of changes in this release, see this page.

Git alias pour être plus productif – Exemples astuces git alias Les alias sont des raccourcis vers des commandes de Git. Fini les répétitions et autres saisies de commandes rébarbatives ! Pour ajouter de nouveaux alias, créez ou éditez la section [alias] de l’un des fichiers qui suivent (voir les exemples du billet pour avoir une information sur la syntaxe) : ~/.gitconfig pour en bénéficier dans tous vos dépôts..git/config d’un projet pour restreindre son accès à cet unique projet. Il est également possible de recourir à la commande git config : $ git config --global 'status' Ici, la commande git st devient un alias de git status. Note : supprimer le flag --global va ajouter l’alias dans le scope du projet courant. Table des matières Mes alias Voici les alias que j’utilise dans le scope global, en provenance donc de mon fichier ~/.gitconfig : Des raccourcis pour les utilisateurs de SVN [alias] st = status df = diff co = checkout ci = commit br = branch svnpull = svn rebase svnpush = svn dcommit Annuler le dernier commit Éditer le dernier commit

Parser Combinators Made Simple April 18, 2011 # Parsing theory has been around for quite a long time, but it is often thought of as magic by the swarms of people who haven't bothered to read about it, and see how plain and dry it actually is. Algorithms for parsing LR(k) grammars (meaning Left-to-right, Right-most derivation, k tokens lookahead) for instance, normally just traverse a state machine that was computed before hand (either by hand, or by using a parser generator such as bison or yacc). Sure, there are many things to trip on, tedious to track down ambiguities, and other issues, but the general theory of parsing has remained unchanged for years—one might say, it is a solved problem.[1] When learning about parsing for the first time though, the idea of a recursive descent parser is often taught first. This sounds boring and tedious, and in fact is. In order to build a parser from the ground up, we need to think about what a parser actually is. In order to use chartest, we pass it a predicate, like so: Success!

Introduction to Facebook's Flux architecture If you're like me and you wanted to go further with React, you more than likely would've checked out Flux, had a glance, closed the tab and then reassessed your life as a Javascript developer. If you're not familiar with React, please checkout my getting started with React post. What the Flux? Flux - from a distance - looks complex to get started with. Flux is, on simple terms, a glorified pub/sub architecture. Events - the blood Blood travels one way around your body. Dispatcher - the heart You only have one heart at any time in your body (most of the time). Stores - the organs Our organs take our blood and store what it needs out of it (I was never good at science). which is the same with stores in Flux. Actions - the lungs This is a bit of a stretch, but much like how our lungs oxygenate our blood and pass it through to the heart to push around, actions allow us to push events into our dispatcher to be broadcasted to the rest of our application. View - the body Let's chat Install gulp Views

Easy Facebook Scripting in Python « Heterogenous Mixture UPDATED: fbconsole Pypi Package and Github Repository Sometimes you just want to write a little script using Facebook’s api that updates your status, or downloads all your photos, or deletes all those empty albums you accidentally created. In order to streamline my writing of one-off facebook scripts, I created a micro api client that implements the client-side authentication flow and has a few utility functions for accessing the graph api and fql. To use this mini api client, all you have to do is put 4 lines of code at the top of your python script: Now you can specify the permissions you’ll need for your script (from the list of available api permissions) and authenticate yourself: By default, the api client makes requests as the “fbconsole” app. Once authenticated, you can make whatever calls to the graph api or fql that you want. Post a status update Fetch likes on a status update Delete a status update Upload a photo (why does python make this so hard?) Query FQL tables Like this:

Reference Guide — virtualenv 12.0.7 documentation Creating Your Own Bootstrap Scripts¶ While this creates an environment, it doesn’t put anything into the environment. Developers may find it useful to distribute a script that sets up a particular environment, for example a script that installs a particular web application. To create a script like this, call virtualenv.create_bootstrap_script(), and write the result to your new bootstrapping script. create_bootstrap_script(extra_text)¶ Creates a bootstrap script from extra_text, which is like this script but with extend_parser, adjust_options, and after_install hooks. This returns a string that (written to disk of course) can be used as a bootstrap script with your own customizations. If you include these functions, they will be called: extend_parser(optparse_parser)¶ You can add or remove options from the parser here. adjust_options(options, args)¶ You can change options here, or change the args (if you accept different kinds of arguments, be sure you modify args so it is only [DEST_DIR]).

a crossplatform framework for creating NUI applications Adding Compass to your project by Brandon Rhodes • Home The Compass CSS authoring framework has become one of the standard tools that gets installed when I start working on a new web application. I always version-control not only the .scss Sass source files that I myself write, but also the .css CSS files that Compass compiles from them. That way, anyone who checks out the project immediately gets a working web site without having to install Compass — or even having to know that it exists, if they are not themselves involved in writing the CSS. But those of us who work on the CSS do need Compass, so I have a standard technique that I copy from project to project that installs Compass into a small, local Ruby environment, providing the same kind of isolation and reproducibility that Python has taught me to know and love thanks to virtualenv. The process goes like this. First I create a compass/ directory, typically up at the top level of the project, that initially contains nothing but a pair of shell scripts. #! #!

python-dateutil - Labix Description The dateutil module provides powerful extensions to the standard datetime module, available in Python 2.3+. News 2011-03-24 dateutil 2.0 is out! Features Computing of relative deltas (next month, next year, next monday, last week of month, etc); Computing of relative deltas between two given date and/or datetime objects; Computing of dates based on very flexible recurrence rules, using a superset of the iCalendar specification. Quick example Here's a snapshot, just to give an idea about the power of the package. Suppose you want to know how much time is left, in years/months/days/etc, before the next easter happening on a year with a Friday 13th in August, and you want to get today's date out of the "date" unix system command. And here's the output: Today is: 2003-10-11 Year with next Aug 13th on a Friday is: 2004 How far is the Easter of that year: relativedelta(months=+6) And the Easter of that year is: 2004-04-11 Being exactly 6 months ahead was really a coincidence Download wkst

Toolkit - The Open Source PDF library The ReportLab Toolkit is a library for programatically creating documents in PDF format. It's a robust, flexible, time-proven, industry-strength solution. It's free, open-source software written in Python. It lets you quickly and easily create or automate complex or data-driven documents. It's in production use across the world as the trusted and proven foundation of existing enterprise solutions. The library implements three main layers: A graphics canvas API allowing you to 'draw' PDF pages and also create many of the special features of PDF files (outline entries, links and so on) A charts and widgets library for creating reusable data graphics, including many common business and financial charts A flexible page layout engine - PLATYPUS ("Page Layout and TYPography Using Scripts") - which builds documents from components like headlines, paragraphs, fonts, tables, images, and vector graphics. Features: