Skip to content

Instantly share code, notes, and snippets.

View bukzor's full-sized avatar
🌥️
learning google cloud

Buck Evan bukzor

🌥️
learning google cloud
  • google.com
  • Appleton, WI
  • 09:24 (UTC -05:00)
View GitHub Profile
DISTRO:
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
KERNEL:
Linux xubuntu-try4 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
DMIDECODE:
@bukzor
bukzor / slow-pip.png
Last active August 29, 2015 14:06
pip-wheel profile
NT
@bukzor
bukzor / .gitignore
Last active August 29, 2015 14:06
find_requirements diagram
*/
@bukzor
bukzor / 01.make
Last active August 29, 2015 14:16 — forked from anonymous/01.make
2015-02-24 08:31:40 -0800
make
CC=/usr/bin/gcc-4.8
/usr/bin/gcc-4.8 -Wall -Wshadow -Wcast-align -Wunreachable-code -Winline -Wextra -Wmissing-noreturn -Os -w -pipe -march=core2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPXZ_BUILD_DATE=\"`date +%Y%m%d`\" -DPXZ_VERSION=\"4.999.9beta\" -O2 -fopenmp -L/home/buck/prefices/brew/lib -Wl,-rpath,/home/buck/prefices/brew/lib -llzma pxz.c -o pxz
/tmp/buck/ccIkHWNW.o: In function `main._omp_fn.0':
pxz.c:(.text+0xee): undefined reference to `lzma_easy_encoder'
pxz.c:(.text+0x15e): undefined reference to `lzma_code'
pxz.c:(.text+0x1f1): undefined reference to `lzma_code'
--- virtualenv.orig 2011-04-26 20:27:02.557885000 -0700
+++ virtualenv.py 2011-04-26 21:49:58.111075000 -0700
@@ -394,6 +394,14 @@
# Some bad symlink in the src
logger.warn('Cannot find file %s (bad symlink)', src)
return
+ if os.path.isdir(dest):
+ logger.debug('Directory %s already exists', dest)
+ logger.indent += 2
+ try:
# Prerequisite: python2.7-dev
# Compile with: gcc -shared -fPIC -o liboverride.so override_pydict.c -ldl
# Run as: LD_PRELOAD=./liboverride.so python
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <dlfcn.h>
// Prerequisite: python2.7-dev
// Compile with: gcc -shared -fPIC -o liboverride.so override_pydict.c -ldl
// Run as: LD_PRELOAD=./liboverride.so python
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <dlfcn.h>
@bukzor
bukzor / gist:1496028
Created December 19, 2011 08:07
Debugging dict refcount issue.
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 5cf9ad1..d6b9c8d 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -8,6 +8,7 @@
*/
#include "Python.h"
+#include "frameobject.h"
'x\x01uZ\t|\x1d\xc5y\xd7iIO\x87\x0f\xb0\xb0\xc1\x86\xb59,\x82%\xeb\xb0$\xcb\x04\xdb:|\xcaz6\xb6\x06\xcb\x10e3ow\xde\xdb\xb5\xf6\xed\xbe\x99\xdd\xd5\xd3\x13(\x01\x8a[?\xf5JH\x08\xa1@\xa1MH[\x12J\x93\xd2\x96\x84\xb6!!m\x1a\xda\x946!\xb4\x81\x84BhH\n=BB\x13\x8e\x94\xf4?\xb3\xef\x92l\xf4\xfby\xdf\xee7\xdf7\xf3\xcd\xf7}\xf3]\xe3\x9bk\x16xu\x07Y!h`\xbb)^\xb3\x7fO\xcd\xd5;o__\xfd\x06i\xb6}\xddv\xa9\x11\xd8\xb3\x8c\xd7\xe6\xc9\x1a|\'\xbcT\xe8\xebIO\xe8l\x96\xb9\x01\xaf\xcb\x93:\x93Q\x87\xd7\xc7\xc9\x8a4\xcd\x90c\x87\xf9\nr\xd4\n\x82\xcc\xcem\xdb\x00\xf0\xbbR\x9e\x97rX\x97\xe1\xa5\xd5\xf7n~M\xcf\xe5\xbd\xdd\'<\xe1\x98\xf2\x97\xe6.\xef\x1d\xc5\xcba\xcf\xc7s\xd8M1\x87\xe1M\x82F\x87\xf1\x18\xea\xee\xde\xde\xcf\x1bH\xcc\xf2B\xe1\xeb\xc2\xcb\xfa\xbcq\x9a7u,\xf0X\x07i\xf22\xcc\xd5\x03;\xcdx\xf3b\x15\x89\x19\x8e\xe7\xb3\xe8\xbbe\xb1\xe6\xfezR\x9fth\xca\xe7\xad\x18\xac\xb1M\xde\xb6X;wd\x17iN\x84\xbe\xed2\x1f\x1b4\xf9\xca\xc5\xba\x07\xd7<Z\x15.\xf0U\x1dV\xb3\xa4\xb2@\xbb\xa7\xd9\x02\x91\x05\x82\xec\x91]V\x19g\xb5\xc2\xc1(p^XU\
from pylibmc.test import make_test_client
class Foo(object):
def __getstate__(self):
return dict(a=1)
def __setstate__(self, d):
assert d['a'] == 1
def break_pickling():
global Foo