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
def test_noqa_lines(codeString): | |
g = tokenize.generate_tokens(StringIO(codeString).readline) # tokenize the string | |
for toknum, tokval, srow, _, _ in g: | |
if toknum == N_TOKENS: | |
pass # do something |
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 collections import defaultdict | |
def autokeyed_dict(): | |
return defaultdict(autokeyed_dict) | |
mydict = autokeyed_dict() | |
mydict['properties']['recent_conversion_event_name']['value'] = 'Test Drive Form' |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html data-ember-extension="1"> | |
<head> | |
<title>Choosing a TDS protocol version</title> | |
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79"> | |
<link rel="HOME" title="FreeTDS User Guide" href="http://www.freetds.org/userguide/index.htm"> | |
<link rel="UP" title="Install FreeTDS" href="http://www.freetds.org/userguide/install.htm"> | |
<link rel="PREVIOUS" title="Install FreeTDS" href="http://www.freetds.org/userguide/install.htm"> | |
<link rel="NEXT" title="servername Lookup" href="http://www.freetds.org/userguide/name.lookup.htm"> |
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
<li> | |
<strong>tracker</strong>: | |
<span class="tracker">Tasks</span> | |
</li> |
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
The issues I had with directions for passenger and RVM on ubuntu server 9.04 from this page: http://rvm.beginrescueend.com/integration/passenger/ | |
1) The first issue I have is that it wasn't clear that I had to have a LoadModule after running passenger-install-apache2module. It says in the instructions to ignore what passengers says about passenger_ruby, so I just ignored everything. With that being true, PassengerRuby as a config item was an error, therefore I had to do LoadModule per the instructions from passenger-install-apache2-module. | |
2) Ditto for the PassengerRoot configuration. I didn't have it originally and I ended up needing to put in there what passenger-install-apache2-module told me to put in there. | |
3) The code snippet for setting GEM_HOME: | |
ENV["GEM_HOME"]=%x{"source ~/.bash_profile ; rvm ree%pancake ; rvm gemdir"}.strip | |
did not work. I got an error that 'source' was not found for the shell 'sh'. I tried the command without the source part, but `rvm gemdir` didn't give the correct gemset |
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
rsyring@antec:~/dev/onebody$ rake onebody:load_sample_data | |
(in /home/rsyring/dev/onebody) | |
no such file to load -- bson | |
<...snip backtrace...> | |
Missing these required gems: | |
mongo >= 0.20 | |
You're running: |
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
rsyring@antec:~/dev/onebody$ rake onebody:load_sample_data | |
(in /home/rsyring/dev/onebody) | |
rake aborted! | |
undefined method `symbolize_keys!' for nil:NilClass | |
(See full trace by running task with --trace) |
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 isapi import isapicon, threaded_extension | |
import sys | |
import traceback | |
try: | |
from urllib import urlopen | |
except ImportError: | |
# py3k spelling... | |
from urllib.request import urlopen | |
import win32api |
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 os import path | |
from pprint import PrettyPrinter | |
import sys | |
from traceback import format_exc | |
class ErrorApp(object): | |
""" this will be used if an exception is caused by the iwhelper import """ | |
def __init__(self, trace, debug_info): | |
self.debug_info = debug_info | |
self.trace = trace |
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 isapi_wsgi | |
from fakeecb import FakeECB | |
from random import random | |
import time | |
from profiledec import profile | |
def wsgiapp(environ, start_response): | |
'''Simple app as per PEP 333''' | |
status = '200 OK' | |
#time.sleep(.1) |
OlderNewer