(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
class RidgeRegressor(object): | |
""" | |
Linear Least Squares Regression with Tikhonov regularization. |
# sudoku.py | |
from __future__ import print_function | |
import random, itertools, string, operator, copy | |
import constraint, networkx, sympy, glpk | |
#################################################################### | |
# Basic parameters |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" Sample multithreading with bottle.py | |
Requirements: requests, bottle | |
To run: | |
$ python app.py | |
To post data, open another command shell and type: |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package org.neo4j.contrib.hipster; | |
import es.usc.citius.hipster.util.graph.GraphEdge; | |
import es.usc.citius.hipster.util.graph.HipsterDirectedGraph; | |
import org.neo4j.graphdb.Direction; | |
import org.neo4j.graphdb.GraphDatabaseService; | |
import org.neo4j.graphdb.Node; | |
import org.neo4j.graphdb.Relationship; | |
public class Neo4jHipsterDirectedGraphAdapter extends Neo4jHipsterGraphAdapter implements HipsterDirectedGraph<Node, Relationship> { |
from scipy.spatial.distance import pdist, squareform | |
import numpy as np | |
from numbapro import jit, float32 | |
def distcorr(X, Y): | |
""" Compute the distance correlation function | |
>>> a = [1,2,3,4,5] | |
>>> b = np.array([1,2,9,4,4]) |
If you have a huge repository (in size and in history) and want to add a subfolder | |
to your project as a submodule you can follow this example to save time and space | |
using git's shallow clone and shallow checkout feature. It is a bit more complicated | |
in this example because I assume that you want your submodule to track a non-default | |
branch, called `mybranch`, instead of the `master` branch. Things could probably get | |
a lot simpler when using the default branch. After following the commands in these | |
examples you can use `git submodule update` and `git submodule update --remote` as normal. |