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 re | |
camel_re = re.compile(r'([a-z]+[A-Z])+[a-z]+') | |
def fix_camel_case(camel_class): | |
for camel_attr in dir(camel_class): | |
if camel_re.match(camel_attr): | |
snake_attr = ''.join(char if char.islower() or char.isdigit() else "_%s" % char.lower() | |
for char in camel_attr) | |
setattr(camel_class, snake_attr, getattr(camel_class, camel_attr)) |
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 itertools | |
x = [['a', 'bcd'], ['ab', 'c']] | |
def cmp(a, b): | |
iter1 = itertools.chain(*a) | |
iter2 = itertools.chain(*b) | |
for ca, cb in itertools.izip(iter1, iter2): | |
if ca < cb: | |
return -1 | |
elif ca > cb: |
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 multidim_arr(*dims): | |
return [multidim_arr(*dims[1:]) for i in xrange(dims[0])] if dims else 0 |
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
==> Cloning git://github.com/stevedekorte/io.git | |
Updating /Users/stephen/Library/Caches/Homebrew/io--git | |
==> cmake .. -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/io/HEAD' -DCMAKE_BUILD_TY | |
==> make install | |
Scanning dependencies of target copy_basekit_headers | |
[ 0%] Copying files: /tmp/homebrew-io-HEAD-9qHX//tmp/homebrew-io-HEAD-9qHX/libs/basekit/source/*.h to /tmp/homebrew-io-HEAD-9qHX/io-build/_build/headers | |
[ 0%] Built target copy_basekit_headers | |
Scanning dependencies of target copy_coroutine_headers | |
[ 0%] Copying files: /tmp/homebrew-io-HEAD-9qHX//tmp/homebrew-io-HEAD-9qHX/libs/coroutine/source/*.h to /tmp/homebrew-io-HEAD-9qHX/io-build/_build/headers | |
[ 1%] Built target copy_coroutine_headers |
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
Warning: It appears you have MacPorts or Fink installed. | |
Software installed with MacPorts and Fink are known to cause problems. | |
If you experience issues try uninstalling these tools. | |
/usr/local/git/bin/git | |
==> Cloning git://github.com/stevedekorte/io.git | |
Updating /Users/stephen/Library/Caches/Homebrew/io--git | |
==> cmake .. -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/io/HEAD' -DCMAKE_BUILD_TY | |
==> make install | |
Scanning dependencies of target copy_basekit_headers | |
[ 0%] Copying files: /tmp/homebrew-io-HEAD-tEoL//tmp/homebrew-io-HEAD-tEoL/libs/basekit/source/*.h to /tmp/homebrew-io-HEAD-tEoL/io-build/_build/headers |
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
... | |
darwin.link.dll bin.v2/libs/python/build/darwin-4.2.1/release/threading-multi/libboost_python-mt.dylib | |
ld: warning: in /Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib, missing required architecture x86_64 in file | |
Undefined symbols: | |
"_PyErr_Occurred", referenced from: | |
boost::python::detail::list_base::insert(boost::python::api::object const&, boost::python::api::object const&)in list.o | |
boost::python::detail::str_base::startswith(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o | |
boost::python::detail::str_base::startswith(boost::python::api::object const&, boost::python::api::object const&) constin str.o | |
boost::python::detail::str_base::rfind(boost::python::api::object const&, boost::python::api::object const&) constin str.o | |
boost::python::detail::str_base::find(boost::python::api::object const&, boost::python::api::object const&) constin str.o |
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
Name | |
Type | |
Description | |
Beard Bonus | |
Paul Buchheit | |
More Than Just The Gmail Guy | |
Paul's a CWRU grad. We put him on here to try to get him to give a talk or interview at the CWRU Hacker Society. So, Paul, if you see this please email [email protected]! | |
John McCarthy |
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
Day job: Student, Python developer at Yelp, iPad freelancer | |
Favorite Python project: pyglet game programming library | |
Favorite Conference: PyOhio | |
Python Experience Level: 5 years and 100k+ lines |
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
"""A simple demonstration of class decorators. | |
Consider this example: | |
class Printer(object): | |
def print(self, string:str) -> types.NoneType: | |
pass | |
Printer.print() takes one string argument and returns None. |
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
#!/bin/sh | |
echo export SDKROOT='"'${SDKROOT}'"' | |
echo export IPHONEOS_DEPLOYMENT_TARGET='"'${IPHONEOS_DEPLOYMENT_TARGET}'"' | |
echo export NATIVE_ARCH='"'${NATIVE_ARCH}'"' | |
echo export NATIVE_ARCH_ACTUAL='"'${NATIVE_ARCH_ACTUAL}'"' | |
echo export PLATFORM_DEVELOPER_BIN_DIR='"'${PLATFORM_DEVELOPER_BIN_DIR}'"' | |
echo export OPT='"'${OPT}'"' | |
echo export SRCROOT='"'${SRCROOT}'"' |
OlderNewer