Skip to content

Instantly share code, notes, and snippets.

View ogrisel's full-sized avatar

Olivier Grisel ogrisel

View GitHub Profile
@ogrisel
ogrisel / .gitignore
Created December 16, 2012 21:52
Gist to load the amazon7 dataset as a scipy.sparse matrix with hashed features
*.pyc
@ogrisel
ogrisel / .gitignore
Last active December 10, 2015 07:48
View the IPython notebook rendering at http://nbviewer.ipython.org/4403811/
*.npy
*.pkl
@ogrisel
ogrisel / class_def_pickling.py
Last active December 10, 2015 17:48
Pickling class definitions for IPython.parallel
import inspect
from pickle import loads, dumps
from IPython.utils import pickleutil
def class_dumps(cls):
canned_dict = pickleutil.canDict(
dict((k, v) for k, v in cls.__dict__.items()
if k not in ('__weakref__', '__dict__')))
parents = tuple(cls.mro())
@ogrisel
ogrisel / Class definition shipping.ipynb
Last active December 10, 2015 17:58
Notebook to demonstrate issues with shipping class definitions using the IPython.parallel direct view in 0.13.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ogrisel
ogrisel / .gitignore
Last active December 11, 2015 12:58
Workaround for complex properties issues using the Nuxeo 5.6 Automation HTTP API
.classpath
.project
.settings/
target/
@ogrisel
ogrisel / .gitignore
Last active December 14, 2015 16:29
Demo Notebook + Helper For Distributed Model Selection with IPython.parallel and scikit-learn
*.pyc
*.npy
*.pkl
*.mmap
@ogrisel
ogrisel / provision.py
Created April 8, 2013 21:43
Tentative python script to provision a linux vm on Azure
#!/usr/bin/env python
import os
import sys
import logging
from azure import WindowsAzureConflictError
from azure import WindowsAzureError
from azure.servicemanagement import ServiceManagementService
from azure.servicemanagement import OSVirtualHardDisk
@ogrisel
ogrisel / failures.txt
Last active December 20, 2015 08:49
sklearn 0.14 packaged tests
======================================================================
FAIL: Doctest: sklearn.ensemble.partial_dependence.partial_dependence
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.3/doctest.py", line 2154, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for sklearn.ensemble.partial_dependence.partial_dependence
File "/home/vagrant/venvs/venv3/lib/python3.3/site-packages/sklearn/ensemble/partial_dependence.py", line 76, in partial_dependence
----------------------------------------------------------------------
@ogrisel
ogrisel / empty.txt
Created July 30, 2013 22:46
normalized training times
x
import os
import numpy as np
import bloscpack as bp
from sklearn.datasets import fetch_mldata
mnist = fetch_mldata('MNIST original')
data = mnist.data.astype(np.float32) / 255.
print("dtype: {}".format(data.dtype))
print("shape: {}".format(data.shape))