Skip to content

Instantly share code, notes, and snippets.

View EnTeQuAk's full-sized avatar

Christopher Grebs EnTeQuAk

  • Mozilla
  • Berlin, Germany
View GitHub Profile
@panicsteve
panicsteve / gist:1641705
Created January 19, 2012 18:26
Form letter template for acquired startups
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
@madzen
madzen / Facewall.py
Created May 15, 2012 23:19
Create an image grid from Facebook friend profile pictures
#!/usr/bin/python
###############################################################################
# Produce a collage (grid) of friend profile images from Facebook.
# Inspired by Vipin "swvist" Nair @ https://gist.github.com/2692786
###############################################################################
# Copyright (c) 2012 Madzen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@dln
dln / inotify-cmake.sh
Created July 17, 2012 10:36
Continuous build on the cheap, using inotify, cmake and a terminal
#!/bin/bash
# Watch paths (given as arguments), automatically build when something changes.
# The script does a couple opinionated things to make my life easier:
#
# * Terminal scrollbuffer is reset before each iteration, simplifying scrolling.
# * I use a filter script to colorize gcc output (clang errors would be nicer).
# * Output is copied to a log file (/tmp/build.log).
# - I open this file in Sublime or vim, which reloads the file on change (each build).
#
# Usage:
@amueller
amueller / digits_video.py
Created October 5, 2012 19:13
Visualization of iris and digits datasets via random projections
# (c) 2012 Andreas Mueller amueller@ais.uni-bonn.de
# License: BSD 2-Clause
#
# See my blog for details: http://peekaboo-vision.blogspot.com
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
@takinbo
takinbo / paginated_collection.js
Created July 25, 2011 21:57 — forked from io41/paginated_collection.js
Pagination with Backbone.js & django-tastypie
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage', 'filtrate', 'sort_by');
typeof(options) != 'undefined' || (options = {});
typeof(this.limit) != 'undefined' || (this.limit = 20);
typeof(this.offset) != 'undefined' || (this.offset = 0);
typeof(this.filter_options) != 'undefined' || (this.filter_options = {});
typeof(this.sort_field) != 'undefined' || (this.sort_field = '');
@dcramer
dcramer / gist:3898601
Created October 16, 2012 10:40
pmp Concept
@amueller
amueller / learning_gabor_filters.py
Created April 19, 2012 11:39
Learning Gabor filters with scikit-learn and ICA or k-means
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import fetch_mldata
from sklearn.decomposition import FastICA, PCA
from sklearn.cluster import KMeans
# fetch natural image patches
image_patches = fetch_mldata("natural scenes data")
X = image_patches.data
@jorilallo
jorilallo / gist:1701845
Created January 30, 2012 01:38
Tastypie paginated search for Haystack
from django.conf.urls.defaults import *
from tastypie.paginator import Paginator
from tastypie.exceptions import BadRequest
from tastypie.resources import ModelResource
from tastypie.utils import trailing_slash
from haystack.query import SearchQuerySet, EmptySearchQuerySet
from clips.models import Clip
@nxvipin
nxvipin / imagegrid.py
Created May 14, 2012 08:45
Image grid generation similar to twilk.com
#Copyright (c) 2012 Vipin Nair <swvist@gmail.com>
#Permission is hereby granted, free of charge, to any person obtaining a copy of
#this software and associated documentation files (the "Software"), to deal in
#the Software without restriction, including without limitation the rights to
#use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
#of the Software, and to permit persons to whom the Software is furnished to do
#so, subject to the following conditions:
#The above copyright notice and this permission notice shall be included in all
@idan
idan / Default (OSX).sublime-keymap
Created October 27, 2011 17:51
Sublime Text asymmetric layout - place files in Packages/User
[
{
"keys": ["super+alt+shift+5"],
"command": "set_layout",
"caption" : "1-2 Grid",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":