Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# starred_to_bookmarks.py
#
# Copyright 2013 Matthieu Baerts <matttbe _@_ mail -> google>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
#!/usr/bin/env python
"""
simple example script for running and testing notebook resulting in a new workbook.
Usage: `ipnbdoctest.py foo.ipynb foo_new.ipynb`
Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook.
"""
import io
@gabstehr
gabstehr / bash
Created November 26, 2013 08:11
alias
ls -t | sed 's/ /\n/' | sort -u
@gabstehr
gabstehr / angular-filter-object
Created November 24, 2013 07:38
Angular filter to sort objects items
app.filter('orderObjectBy', function(){
return function(input, attribute) {
if (!angular.isObject(input)) return input;
var array = [];
for(var objectKey in input) {
array.push(input[objectKey]);
}
array.sort(function(a, b){