Skip to content

Instantly share code, notes, and snippets.

@ixtel
ixtel / octave-notebook.ipynb
Created October 19, 2015 13:11 — forked from MHenderson/octave-notebook.ipynb
MATLAB exercises from Computational and Numerical Methods 2, Winter 2013/14, Nottingham Trent University.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ixtel
ixtel / sudoku.py
Created October 19, 2015 13:11 — forked from MHenderson/sudoku.py
# sudoku.py
from __future__ import print_function
import random, itertools, string, operator, copy
import constraint, networkx, sympy, glpk
####################################################################
# Basic parameters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ixtel
ixtel / graph-colouring-noteboook.ipynb
Created October 19, 2015 13:11 — forked from MHenderson/graph-colouring-noteboook.ipynb
Graph colouring IPython Notebook.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ixtel
ixtel / colouring-simulation-notebook.ipynb
Created October 19, 2015 13:11 — forked from MHenderson/colouring-simulation-notebook.ipynb
Investigating colourings of graphs on seven or fewer vertices.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ixtel
ixtel / load_and_save.py
Created October 19, 2015 12:59 — forked from fannix/load_and_save.py
Save and load sparse matrix
"""http://stackoverflow.com/questions/6282432/load-sparse-array-from-npy-file
"""
import random
import scipy.sparse as sparse
import scipy.io
import numpy as np
def save_sparse_matrix(filename, x):
x_coo = x.tocoo()
row = x_coo.row
@ixtel
ixtel / csv.ipynb
Created October 19, 2015 12:59 — forked from bbengfort/csv.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ixtel
ixtel / jsonexplorer.py
Created October 19, 2015 12:59 — forked from bbengfort/jsonexplorer.py
Interactive JSON explorer using Python's cmd module
#!/usr/bin/env python
# jsonexplorer
# An interactive interface to explore JSON documents
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Wed Jun 17 12:15:23 2015 -0400
#
# Copyright (C) 2015 Bengfort.com
# Licensed under the OSI Approved MIT License
#
@ixtel
ixtel / edges.py
Created October 19, 2015 12:59 — forked from bbengfort/edges.py
Counting edges with non-duplicate nodes in Python
#!/usr/bin/env python
"""
Computes the number of edges on the Graph
"""
from __future__ import division
import networkx as nx
from collections import defaultdict
@ixtel
ixtel / query.py
Created October 19, 2015 12:59 — forked from bbengfort/query.py
query manager example
TABLES = {
'client',
'organization',
'employee',
'flat_email',
}
class QueryManager(object):
def __init__(self, sql, engine):