Getting started:
Related tutorials:
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics
| // Client-side parser for .npy files | |
| // See the specification: http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html | |
| var NumpyLoader = (function () { | |
| function asciiDecode(buf) { | |
| return String.fromCharCode.apply(null, new Uint8Array(buf)); | |
| } | |
| function readUint16LE(buffer) { | |
| var view = new DataView(buffer); | |
| var val = view.getUint8(0); |
| # This script computes the total size of git-annex files with only a single local copy. | |
| # It's useful to figure out how much data will be used if all the files were to be archived. | |
| import subprocess | |
| from tqdm import tqdm | |
| import json | |
| import os | |
| def get_files_with_one_copy(): | |
| try: | |
| result = subprocess.run(['git-annex', 'find', '--copies=1', '--and', '--not', '--copies=2', '--and', '--in=here'], capture_output=True, text=True, check=True) |
| # This file should be put in ~/.jupyter/ | |
| # New notebooks will be renamed to YYYY-MM-DD_untitled-N.ipynb instead of Untitled.ipynb | |
| # Please be aware that this code has **NOT** been tested extensively, I wrote it rather quickly, | |
| # and thus your notebook might be deleted by accident. | |
| # | |
| # USE THIS CODE AT YOUR OWN RISK | |
| # | |
| import os | |
| import re |
| from mvpa2.suite import * | |
| # increase verbosity a bit for now | |
| verbose.level = 3 | |
| # pre-seed RNG if you want to investigate the effects, thus | |
| # needing reproducible results | |
| #mvpa2.seed(3) | |
| # we import Parallel and delayed from joblib to run in parallel | |
| from joblib import Parallel, delayed | |
| """ |
Getting started:
Related tutorials:
| def appendSpherical_np(xyz): | |
| ptsnew = np.hstack((xyz, np.zeros(xyz.shape))) | |
| xy = xyz[:,0]**2 + xyz[:,1]**2 | |
| ptsnew[:,3] = np.sqrt(xy + xyz[:,2]**2) | |
| ptsnew[:,4] = np.arctan2(np.sqrt(xy), xyz[:,2]) # for elevation angle defined from Z-axis down | |
| #ptsnew[:,4] = np.arctan2(xyz[:,2], np.sqrt(xy)) # for elevation angle defined from XY-plane up | |
| ptsnew[:,5] = np.arctan2(xyz[:,1], xyz[:,0]) | |
| return ptsnew |
| #!/bin/bash | |
| ### ABOUT: See: http://gist.github.com/366269 | |
| ### Runs rsync, retrying on errors up to a maximum number of tries. | |
| ### On failure script waits for internect connection to come back up by pinging google.com before continuing. | |
| ### | |
| ### Usage: $ ./rsync-retry.sh source destination | |
| ### Example: $ ./rsync-retry.sh [email protected]:~/* ~/destination/path/ | |
| ### | |
| ### INPORTANT: |