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
%brew install -v pil | |
==> Downloading http://effbot.org/downloads/Imaging-1.1.7.tar.gz | |
File already downloaded and cached to /Users/az/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/az/Library/Caches/Homebrew/pil-1.1.7.tar.gz | |
==> python setup.py build_ext | |
python setup.py build_ext | |
running build_ext | |
--- using frameworks at /System/Library/Frameworks | |
building '_imaging' extension | |
creating build |
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
Last login: Tue Apr 5 16:48:19 on ttys002 | |
az@Albert-Zeyers-MacBook-Pro 1006 (~) %brew update | |
remote: Counting objects: 17, done. | |
remote: Compressing objects: 100% (12/12), done. | |
remote: Total 12 (delta 10), reused 0 (delta 0) | |
Unpacking objects: 100% (12/12), done. | |
From http://github.com/mxcl/homebrew | |
* branch master -> FETCH_HEAD | |
Updated Homebrew from b5fad2cd to 7e7d6edb. | |
No formulae were updated. |
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 testfunc0(): print "testfunc0" | |
def testfunc1(a1): print "testfunc1", a1 | |
def testfunc2(a1,a2): print "testfunc2", a1, a2 | |
class A: | |
def func0(): print "func0" | |
def func1(a1): print "func1", a1 | |
def func2(a1,a2): print "func2", a1, a2 | |
varfunc0 = testfunc0 | |
varfunc1 = testfunc1 |
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
$ python better_exchook.py | |
EXCEPTION | |
Traceback (most recent call last): | |
File "better_exchook.py", line 478, in <module> | |
line: f() | |
locals: | |
f = <local> <function f at 0x107f1de60> | |
File "better_exchook.py", line 477, in f | |
line: x, 42, sys.stdin.__class__, sys.exc_info, y, z | |
locals: |
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
class Entry: | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
self.leftEntry = None | |
self.rightEntry = None | |
def pop(self): | |
if self.leftEntry is not None: | |
self.leftEntry.rightEntry = self.rightEntry | |
if self.rightEntry is not 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
In [1]: class Test: | |
...: def __foo(self): pass | |
...: | |
...: | |
In [2]: dir(Test) | |
Out[2]: ['_Test__foo', '__doc__', '__module__'] | |
In [3]: Test.__foo | |
--------------------------------------------------------------------------- |
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
Fun with Chrome. :) | |
Thread 0:: CrBrowserMain Dispatch queue: com.apple.main-thread | |
0 com.google.Chrome.framework 0x006e9d5b ChromeMain + 6300363 | |
1 com.google.Chrome.framework 0x0073043b ChromeMain + 6588843 | |
2 com.google.Chrome.framework 0x0072f1da ChromeMain + 6584138 | |
3 com.google.Chrome.framework 0x00760af2 ChromeMain + 6787170 | |
4 com.apple.AppKit 0x9b798ff8 -[NSWindowController setWindow:] + 278 | |
5 com.apple.CoreFoundation 0x93475901 -[NSObject performSelector:withObject:] + 65 |
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
// | |
// constr_test.cpp | |
// | |
// Created by Albert Zeyer on 08.12.11. | |
// Copyright (c) 2011 Albert Zeyer. All rights reserved. | |
// | |
#include <string> | |
#include <random> | |
#include <iostream> |
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
// g++ functor_demo.cpp -c -S | |
// With this set to `inline`, G++ will inline both examples. | |
// With this empty, G++ will inline none of them. | |
#define OPT_INLINE inline | |
OPT_INLINE int f1(int) { return 42; } | |
template< int (*f)(int) > | |
void do_sth1() { f(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
/* | |
g++ sdlimagetest.cpp -framework SDL -framework SDLimage -I /Library/Frameworks/SDL.framework/Headers -I /Library/Frameworks/SDLimage.framework/Headers -o sdlimagetest | |
*/ | |
#include <SDL.h> | |
#include <SDL_image.h> | |
#include <assert.h> | |
#include <sstream> | |
#include <string> | |
#include <iostream> |
OlderNewer