Followed up once, dev has fallen behind on personal work due to RL, follow up in a week.
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
@contextmanager | |
def virtualenv(): | |
with prefix(env.activate): | |
yield | |
env.activate = 'source /srv/beehive/.virtualenvs/beehive/bin/activate' | |
def meh(): | |
with virtualenv(): | |
run('./manage.py do crap') |
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/env python | |
import site, sys | |
import env.other_settings as settings | |
from django.core.management import execute_manager | |
if __name__ == "__main__": | |
execute_manager(settings) |
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 time | |
from fabric.api import puts | |
def update_agi(delay=4): | |
prep_hosts() | |
puts('waiting %s seconds for agis to cycle down' % delay) | |
time.sleep(delay) | |
fab_lib.kill_rails() | |
# where ever this is defined |
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
In [10]: timeit.Timer('Order.objects.all()[0]','from __main__ import Order').timeit(number=100) | |
Out[10]: 67.119456052780151 | |
In [11]: timeit.Timer('Order.objects.all().order_by()[0]','from __main__ import Order').timeit(number=100) | |
Out[11]: 0.34228992462158203 |
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
set nocompatible | |
set backspace=indent,eol,start | |
set incsearch | |
set ruler | |
set history=50 | |
set mouse=a | |
set number | |
set nohlsearch | |
set expandtab | |
set shiftwidth=4 |
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
""" | |
This is the Django template system. | |
How it works: | |
The Lexer.tokenize() function converts a template string (i.e., a string containing | |
markup with custom template tags) to tokens, which can be either plain text | |
(TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). | |
The Parser() class takes a list of tokens in its constructor, and its parse() |
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
Running Sphinx v1.0.8 | |
loading pickled environment... done | |
loading intersphinx inventory from http://docs.python.org/objects.inv... | |
loading intersphinx inventory from http://api.mongodb.org/python/current/objects.inv... | |
building [html]: targets for 4 source files that are out of date | |
updating environment: 0 added, 4 changed, 0 removed | |
reading sources... [ 25%] api | |
Traceback (most recent call last): | |
File "/home/docs/sites/readthedocs.org/lib/python2.6/site-packages/sphinx/ext/autodoc.py", line 329, in import_object | |
__import__(self.modname) |
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
NAMES #pdxWebDev | |
:sendak.freenode.net 353 Wraithan = #pdxWebDev :brennannovak axolx_ zrobo MarcinM ahhrrr Loqi anth0ny nijotz jedediah plamb Metroknow austinh martin_c soycamo rozwell dcamp racicot brett dietricha ZenWraithBot dukeleto edrex selenamarie mshadle jeremydei lisamusing johnmetta-away keturn adaburrows wajiii-afk christiekoehler neophiliac onewheelskyward JoelBernstein aaronpk adabot vhost- ChrisPitzer tyler-iphone ericholscher wagle robotadam mpacific GDorn mwehner bkero ubiquill clouserw reidab pdxleif | |
:sendak.freenode.net 353 Wraithan = #pdxWebDev :Wraithan jslabaugh donpdonp manimal paulproteus maxogden | |
:sendak.freenode.net 366 Wraithan #pdxWebDev :End of /NAMES list. |
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
$ python2 replace.py | |
woof | |
woof | |
meow |