Skip to content

Instantly share code, notes, and snippets.

View rhyolight's full-sized avatar

Matthew Taylor rhyolight

View GitHub Profile
@rhyolight
rhyolight / rdp.js
Created May 31, 2012 20:32
Ramer-Douglas-Peucker line filtering algorithm in JavaScript
function findPerpendicularDistance(point, line) {
var pointX = point[0],
pointY = point[1],
lineStart = {
x: line[0][0],
y: line[0][1]
},
lineEnd = {
x: line[1][0],
y: line[1][1]
@rhyolight
rhyolight / arg-example.sh
Created June 27, 2012 16:59
bash command argument processing
#!/bin/sh
arga=0
argb=0
argc=0
printUsage () {
echo "\nSupported options:"
echo "------------------"
echo "\t-a\targa\tDoes something called 'a'"
@rhyolight
rhyolight / python_modules.md
Last active December 24, 2015 07:39
All the Python modules I have installed on OSX 10.8.5. I'm not sure which modules are required for NuPIC.

My Python Modules

Please highlight those required by NuPIC.

  • DBUtils==1.1
  • Flask==0.9
  • Jinja2==2.6
  • Markdown==2.2.1
  • PyMySQL==0.5
  • PyYAML==3.10
@rhyolight
rhyolight / gist:8428806
Created January 15, 2014 00:42
nupic pip install permission error
------------------------------------------------------------
/usr/bin/pip run on Tue Jan 14 13:15:05 2014
Downloading/unpacking asteval==0.9.1 (from -r external/common/requirements.txt (line 2))
Running setup.py egg_info for package asteval
running egg_info
writing pip-egg-info/asteval.egg-info/PKG-INFO
writing top-level names to pip-egg-info/asteval.egg-info/top_level.txt
writing dependency_links to pip-egg-info/asteval.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
@rhyolight
rhyolight / gist:8461276
Last active January 3, 2016 12:09
todo items in encoder docs
mtaylor ~/nta/nupic/py/nupic/encoders $ ack TODO
adaptivescalar.py
90: TODO: document
arithmetic_encoder.py
46: TODO: Perhaps arithmetic coding isn't the best analogy?
51: TODO: document
52: @param w TODO: document
53: @param n TODO: document
54: @param periodic TODO: document
@rhyolight
rhyolight / gist:8468600
Created January 17, 2014 04:53
pip install error because missing python-devel?
[matt@localhost ~]$ su -c 'yum install python-devel'
Password:
Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package python-devel.x86_64 0:2.7.5-9.fc20 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
@rhyolight
rhyolight / gist:8475966
Created January 17, 2014 16:04
glibc-headers failure
[matt@localhost ~]$ sudo yum check
Loaded plugins: langpacks, refresh-packagekit
glibc-devel-2.18-11.fc20.x86_64 has missing requires of glibc-headers = ('0', '2.18', '11.fc20')
Error: check all
[matt@localhost ~]$ sudo yum install glibc-headers
Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.18-11.fc20 will be installed
--> Finished Dependency Resolution
@rhyolight
rhyolight / gist:8570473
Created January 23, 2014 00:28
Preferences.sublime-settings
{
"color_scheme": "Packages/Theme - Phoenix/Color Scheme/Phoenix Dark Orange - Eighties.tmTheme",
"draw_white_space": "all",
"font_size": 22.0,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"ignored_words":
@rhyolight
rhyolight / Balgowlah_Platinum.csv
Last active August 29, 2015 14:00
nupic swarm bug
timestamp kw_energy_consumption
datetime float
T
2010-07-02 00:00:00 5.3
2010-07-02 00:15:00 5.5
2010-07-02 00:30:00 5.1
2010-07-02 00:45:00 5.3
2010-07-02 01:00:00 5.2
2010-07-02 01:15:00 5.5
2010-07-02 01:30:00 4.5
@rhyolight
rhyolight / request-to-travis-ci.md
Last active May 13, 2020 20:16
An Open Request to Travis-CI

An Open Request to Travis-CI

I run open source projects for Numenta, and we are heavy users of Travis-CI. Most aspects of your service are oustanding. Here is a short list of the ways in which I love Travis-CI:

  • Your customer support is immediately responsive, via email and chat.
  • Your service integrates wonderfully with all the other services we use.
  • Your API is excellent and well-documented.
  • The rest of your documentation is also very complete and easy to read.
  • You provide an OS X build environment!
  • Builds are extremely customizable.