Tested on ibsimu-1.0.6dev, OSX Yosemite, High Sierra, Catalina.
Install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install autoconf automake libtool gtk+3 gsl
| #!/bin/bash | |
| # | |
| # convert a mysql database to sqlite3 | |
| # | |
| #see https://stackoverflow.com/questions/5164033/ | |
| # export-a-mysql-database-to-sqlite-database | |
| mysql_host=localhost | |
| mysql_user=george | |
| #mysql_passwd=**************** |
| """ | |
| preprocess-twitter.py | |
| python preprocess-twitter.py "Some random text with #hashtags, @mentions and http://t.co/kdjfkdjf (links). :)" | |
| Script for preprocessing tweets by Romain Paulus | |
| with small modifications by Jeffrey Pennington | |
| with translation to Python by Motoki Wu | |
| Translation of Ruby script to create features for GloVe vectors for Twitter data. |
| # Include the Dropbox SDK | |
| import dropbox | |
| # Get your app key and secret from the Dropbox developer website | |
| # https://www.dropbox.com/developers-v1/apps | |
| app_key = 'key' | |
| app_secret = 'secret' | |
| flow = dropbox.client.DropboxOAuth2FlowNoRedirect(app_key, app_secret) |
Tested on ibsimu-1.0.6dev, OSX Yosemite, High Sierra, Catalina.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install autoconf automake libtool gtk+3 gsl
| from scipy.interpolate import UnivariateSpline | |
| import numpy as np | |
| def curvature_splines(x, y=None, error=0.1): | |
| """Calculate the signed curvature of a 2D curve at each point | |
| using interpolating splines. | |
| Parameters | |
| ---------- | |
| x,y: numpy.array(dtype=float) shape (n_points, ) |
| function (x, y = NULL, xtest = NULL, ytest = NULL, ntree = 500, | |
| mtry = if (!is.null(y) && !is.factor(y)) max(floor(ncol(x)/3), | |
| 1) else floor(sqrt(ncol(x))), replace = TRUE, classwt = NULL, | |
| cutoff, strata, sampsize = if (replace) nrow(x) else ceiling(0.632 * | |
| nrow(x)), nodesize = if (!is.null(y) && !is.factor(y)) 5 else 1, | |
| maxnodes = NULL, importance = FALSE, localImp = FALSE, nPerm = 1, | |
| proximity, oob.prox = proximity, norm.votes = TRUE, do.trace = FALSE, | |
| keep.forest = !is.null(y) && is.null(xtest), corr.bias = FALSE, | |
| keep.inbag = FALSE, ...) | |
| { |
| { | |
| "metadata": { | |
| "name": "", | |
| "signature": "sha256:f04c113accbabf25e09e5680267acfb16af33ae3a79b0992a8aea30875c51b17" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ |
| [u'0.013*species + 0.005*formation + 0.004*water + 0.004*plant + 0.004*genus + 0.003*white + 0.003*mm + 0.003*brown + 0.002*common + 0.002*sea', | |
| u'0.008*system + 0.006*data + 0.006*game + 0.004*using + 0.004*systems + 0.004*software + 0.003*model + 0.003*technology + 0.003*information + 0.003*available', | |
| u'0.014*league + 0.010*club + 0.010*round + 0.009*cup + 0.007*football + 0.007*championship + 0.006*games + 0.006*player + 0.005*teams + 0.005*match', | |
| u'0.009*party + 0.008*william + 0.008*election + 0.007*london + 0.006*james + 0.006*george + 0.005*thomas + 0.005*elected + 0.005*republican + 0.005*england', | |
| u'0.010*building + 0.008*district + 0.008*river + 0.008*road + 0.008*station + 0.007*village + 0.006*park + 0.006*town + 0.006*railway + 0.006*historic', | |
| u'0.014*air + 0.010*ship + 0.008*racing + 0.007*aircraft + 0.006*force + 0.006*car + 0.005*crew + 0.005*navy + 0.005*class + 0.005*race', | |
| u'0.025*album + 0.019*song + 0.013*band + 0.009*chart + 0.008*songs + 0.008*you + 0.008*track + 0.007*records |
| { | |
| "metadata": { | |
| "name": "", | |
| "signature": "sha256:b99bf1f68a92860ccebd342a666077e249dfb487cea12a567d68facfaa39ab39" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ |