Python script to download/shallow clone the files of a directory at bitbucket. This is useful when you just want a copy of the files in a subdirectory of a repository without needing mercurial or having to download the entire repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* | |
| * New-iTerm-Window.scpt | |
| * | |
| * Intended for use with QuickSilver | |
| * I mapped option-y to running this script to create | |
| * a new iTerm window on the current workspace | |
| * | |
| * Based on much Googling - very little "original" code here | |
| * Comments/Suggestions to [email protected] | |
| *) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import sys | |
| for i in range(1,10000): | |
| response = requests.post('http://apply.embed.ly/1', data={'answer': str(i)}) | |
| if response.status_code == 302: | |
| print i | |
| sys.exit(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from hashlib import sha1 | |
| import numpy | |
| arr=numpy.zeros((256,256,4)) | |
| sha1(arr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pylab import * | |
| from pprint import pprint | |
| def arrayToList(arr): | |
| if type(arr) == type(array([])): | |
| return arrayToList(arr.tolist()) | |
| elif type(arr) == type([]): | |
| return [arrayToList(a) for a in arr] | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $values = array( | |
| 'true' => true, | |
| 'false' => false, | |
| '1' => 1, | |
| '0' => 0, | |
| '-1' => -1, | |
| '"true"' => "true", | |
| '"false"' => "false", | |
| '"1"' => "1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This is a batched LSTM forward and backward pass | |
| """ | |
| import numpy as np | |
| import code | |
| class LSTM: | |
| @staticmethod | |
| def init(input_size, hidden_size, fancy_forget_bias_init = 3): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Code example for: | |
| # Hello World - Machine Learning Recipes #1 - Google Developers | |
| # https://www.youtube.com/watch?v=cKxRvEZd3Mw | |
| from sklearn import tree | |
| # Bumpy = 0, Smooth = 1 | |
| features = [[140, 1], [130, 1], [150, 0], [170, 0]] | |
| # Apple = 0, Orange = 1 | |
| labels = [0, 0, 1, 1] |
OlderNewer