Skip to content

Instantly share code, notes, and snippets.

@cpcloud
cpcloud / pysource_check_readline
Last active August 29, 2015 14:05
Build Python 2.7.8 from source
wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz
tar xvf Python-2.7.8.tar.xz
cd Python-2.7.8
./configure --enable-shared --enable-ipv6 --enable-unicode=ucs4 --prefix=/usr
make -j `nproc`
find -name 'readline.so'
@cpcloud
cpcloud / nate_image.ipynb
Created June 21, 2014 19:40
hack cell image segmentation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cpcloud
cpcloud / repr-issue.json
Created May 20, 2014 21:06
notebook repr issue
{
"metadata": {
"name": "",
"signature": "sha256:1efaafda434deed4c4582e9da622b8c45fff909cb71c32dbc68a4422b72d3e43"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:1428f1fc4d07eeb621c648b728c7feb5f0210656024476c109e86964cb744ea9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@cpcloud
cpcloud / trunc_repr_bug
Last active August 29, 2015 14:01
trunc repr bug
{
"metadata": {
"name": "",
"signature": "sha256:1428f1fc4d07eeb621c648b728c7feb5f0210656024476c109e86964cb744ea9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
for i in range(10):
print(i)
print(i * 2)
@cpcloud
cpcloud / gist:6745173
Created September 28, 2013 18:49
Command line tool to show raised exceptions that don't have a message. Originally created for use with the pandas data analysis library codebase.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import re
import os
import fnmatch
import ast
import argparse
@cpcloud
cpcloud / gist:6650724
Created September 21, 2013 13:35
Plotting Bar/Line Weirdness
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{