Skip to content

Instantly share code, notes, and snippets.

View justquick's full-sized avatar
⚙️
Contemplating the Infinite

Justin Quick justquick

⚙️
Contemplating the Infinite
View GitHub Profile
Fri Mar 19 12:40:28 2010 mongol/profiles/top.map.prof
1431399 function calls in 9.726 CPU seconds
Ordered by: internal time
List reduced from 127 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
75273 3.709 0.000 3.709 0.000 {zlib.compress}
75273 2.108 0.000 2.108 0.000 {cPickle.dumps}
INT1675:project jquick$ ./manage.py snag "http://news.google.com/news?ned=us&amp;topic=w&amp;output=rss"
Aggregating: http://news.google.com/news?ned=us&amp;topic=w&amp;output=rss
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/Users/jquick/Downloads/django/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/Users/jquick/Downloads/django/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/jquick/Downloads/django/django/core/management/base.py", line 195, in run_from_argv
import csv
import yapgvb
graph = yapgvb.Digraph('OriginalZombie')
rows = list(csv.DictReader(open('players.csv')))
def get_victims(id):
for row in rows:
if id == row['killed_by']:
designed as a functional replacement to james benne
eliminates need for app.templatetags
all arguments/kwargs are resolved by default
comparisons
if some comparison, do somethin, otherwise do s
add negate at the end of the tag to do the oppo
{% extends 'base.html' %}
{% block extrahead %}
{% block blog_extrahead %}{% endblock %}
{% endblock %}
{% block content %}
{% block blog_content %}{% endblock %}
{% endblock %}
import importlib, os
APP_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'test')),)
sys.path.extend(APP_DIRS)
BASE_URL_CONFS = []
for app_dir in APP_DIRS:
for app in os.listdir(app_dir):
if not app.startswith('.') and app not in INSTALLED_APPS:
try:
app_settings = importlib.import_module('%s.settings' % app)
if getattr(app_settings, 'APP_NAME', '') != '':