sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
brew install git
cd /usr/local
git init
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 pstats | |
| >>> p = pstats.Stats('p.1258156459.52174278XcQE.prof') | |
| >>> p.strip_dirs().sort_stats(-1).print_stats(5) | |
| Fri Nov 13 15:54:20 2009 p.1258156459.52174278XcQE.prof | |
| 124278 function calls (122386 primitive calls) in 0.589 CPU seconds | |
| Ordered by: standard name | |
| List reduced from 1014 to 5 due to restriction <5> |
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
| from django.core.exceptions import ImproperlyConfigured | |
| from django.core.management.base import BaseCommand, CommandError | |
| from django.core import serializers | |
| from django.utils.datastructures import SortedDict | |
| from optparse import make_option | |
| class Command(BaseCommand): | |
| option_list = BaseCommand.option_list + ( | |
| make_option('--format', default='json', dest='format', |
Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
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
| #!/usr/bin/env python | |
| # Python script to make Skype co-operate with GNOME3 notifications. | |
| # | |
| # | |
| # Copyright (c) 2011, John Stowers | |
| # | |
| # Adapted from skype-notify.py | |
| # Copyright (c) 2009, Lightbreeze | |
| # | |
| # |
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
| from django.utils.html import escape | |
| from django.contrib.comments.models import Comment | |
| from django.utils.encoding import smart_str | |
| post = u'' | |
| for i in Comment.objects.order_by('submit_date'): | |
| if not i.content_object: | |
| continue | |
| post += u""" |
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
| From bbb53d927c0949246c1735baaf34aa4261cfbb3c Mon Sep 17 00:00:00 2001 | |
| From: Vlad Bokov <razum2um@mail.ru> | |
| Date: Tue, 5 Jul 2011 04:14:42 +0700 | |
| Subject: [PATCH] nested sets (level<=3) support | |
| --- | |
| django/contrib/admin/options.py | 36 +++++++++++++++ | |
| .../admin/templates/admin/edit_inline/nested.html | 48 ++++++++++++++++++++ | |
| .../admin/templates/admin/edit_inline/tabular.html | 13 +++++- | |
| 3 files changed, 96 insertions(+), 1 deletions(-) |
| Author: | Baiju Muthukadan |
|---|---|
| Email: | baiju.m.mail AT gmail.com |
| Version: | 0.3.2 |
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 ast | |
| import os | |
| from pyflakes import checker, messages | |
| import sys | |
| from django.conf import settings | |
| from django.core.management.base import BaseCommand | |
| # BlackHole, PySyntaxError and checking based on | |
| # https://github.com/patrys/gedit-pyflakes-plugin.git |
OlderNewer