Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
""" Small script that shows hot to do one hot encoding
of categorical columns in a pandas DataFrame.
See:
http://scikit-learn.org/dev/modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder
http://scikit-learn.org/dev/modules/generated/sklearn.feature_extraction.DictVectorizer.html
"""
import pandas
import random
@tallakt
tallakt / s7unprotect.pl
Created October 16, 2012 13:29
Step 7 unprotect blocks
#!/usr/bin/env perl -w
# To run on linux, install the following packages:
# sudo apt-get install libdbd-xbase-perl
# sudo apt-get install libdbi-perl
#
# To run without downloading and creating the perl file, type:
# cd /path/to/step7/project
# curl -s -L https://raw.github.com/gist/3899286/s7unprotect.pl | perl
#