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
diff --git a/ezio/Ezio.h b/ezio/Ezio.h | |
index 7ff33f1..917fd9f 100644 | |
--- a/ezio/Ezio.h | |
+++ b/ezio/Ezio.h | |
@@ -54,27 +54,6 @@ static void array_xdecref(Py_ssize_t num_vars, PyObject *vars[]) { | |
} | |
} | |
-/** | |
- Basic RAII for PyObject*'s; store a pointer and a new reference, ensure |
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
PyObject * | |
PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) | |
{ | |
#ifdef DXPAIRS | |
int lastopcode = 0; | |
#endif | |
register PyObject **stack_pointer; /* Next free slot in value stack */ | |
register unsigned char *next_instr; | |
register int opcode; /* Current opcode */ | |
register int oparg; /* Current opcode argument, if any */ |
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/python | |
import sys | |
import optparse | |
from xml.dom import minidom | |
from xml.dom.minidom import parse, parseString | |
import urllib2 | |
import pprint | |
BART_DATA_URL = "http://www.bart.gov/dev/eta/bart_eta.xml" |
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/python | |
""" | |
BART departure times from the command line. Use it like this: | |
bart # departure times for Powell St, POWL | |
bart 24th # departure times for 24th and Mission | |
bart nbrk # departure times for North Berkeley | |
""" |
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
diff --git a/.gitignore b/.gitignore | |
new file mode 100644 | |
index 0000000..cbb1d4b | |
--- /dev/null | |
+++ b/.gitignore | |
@@ -0,0 +1,3 @@ | |
+build | |
+*.class | |
+*.swp | |
diff --git a/clean b/clean |
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 requests | |
import json | |
def httpbin(*suffix): | |
"""Returns url for HTTPBIN resource.""" | |
return 'http://httpbin.org/' + '/'.join(suffix) | |
s = requests.session() | |
r = s.get(httpbin('cookies', 'set', 'a', '97')) | |
assert json.loads(r.text)['cookies'] == {'a': '97'} |
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 | |
# coding:utf-8 | |
import urllib | |
import urllib2 | |
import cookielib | |
from requests import session | |
class UClient(object): |
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 | |
# coding:utf-8 | |
import urllib | |
import urllib2 | |
import cookielib | |
import requests | |
from requests import session | |
def get_cookie_from(cj, name): |
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
diff --git a/requests/models.py b/requests/models.py | |
index 62aeb9c..1104604 100644 | |
--- a/requests/models.py | |
+++ b/requests/models.py | |
@@ -299,7 +299,6 @@ class Request(object): | |
r.history = history | |
self.response = r | |
- self.response.request = self | |
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/python | |
class A(object): | |
field = 0 | |
def __hash__(self): | |
return hash(self.field) | |
def __eq__(self, other): | |
return self.field == other.field |
OlderNewer