- Update HISTORY.md
- Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
- Update version number (can also be minor or major)
bumpversion patch
| import pymssql | |
| import pandas as pd | |
| ## instance a python db connection object- same form as psycopg2/python-mysql drivers also | |
| conn = pymssql.connect(server="172.0.0.1", user="howens",password="some_fake_password", port=63642) # You can lookup the port number inside SQL server. | |
| ## Hey Look, college data | |
| stmt = "SELECT * FROM AlumniMirror..someTable" | |
| # Excute Query here | |
| df = pd.read_sql(stmt,conn) |
| '''Implementation and Demostration of Dynamic Time Warping | |
| Requires : python 2.7.x, Numpy 1.7.1, Matplotlib, 1.2.1''' | |
| from math import * | |
| import numpy as np | |
| import sys | |
| def DTW(A, B, window = sys.maxint, d = lambda x,y: abs(x-y)): | |
| # create the cost matrix | |
| A, B = np.array(A), np.array(B) |
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
bumpversion patch
| import collections | |
| def extract_top_ten(str): | |
| return collections.Counter(str.split()).most_common(10) |
This is a more wordy, narrative accompaniment to my pretty bare presentation about d3 that I gave to the jQuery DC Meetup.
Which is to say, d3 can be used for building things, but the 'atomic parts' are lower-level than bar graphs or projections or so on. This is a powerful fact. It also means that d3 is a good basis for simple interfaces, like Vega.js, that make its power accessible in other ways.
| import numpy as np | |
| I2 = 2*np.eye(8) | |
| E = -np.diag(np.ones((7)), k=-1) |
| aDictionary = {'a':3, 'b':-4, 'c':3.14} | |
| sorted(aDictionary, key=lambda x: aDictionary[x]) |
| import numba | |
| import numpy | |
| #The filter2d with the same signature as Theano | |
| #but not a class method. | |
| def filter2d_theano(node, inputs, outputs): | |
| image, filt = inputs | |
| M, N = image.shape | |
| Mf, Nf = filt.shape |
| from __future__ import division | |
| from numpy import * | |
| class AdaBoost: | |
| def __init__(self, training_set): | |
| self.training_set = training_set | |
| self.N = len(self.training_set) | |
| self.weights = ones(self.N)/self.N | |
| self.RULES = [] |