Skip to content

Instantly share code, notes, and snippets.

View paulhendricks's full-sized avatar

Paul Hendricks paulhendricks

View GitHub Profile
@paulhendricks
paulhendricks / genetic.py
Created November 18, 2015 18:35 — forked from bellbind/genetic.py
[python]Genetic Algorithm example
"""Genetic Algorithmn Implementation
see:
http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php
"""
import random
class GeneticAlgorithm(object):
def __init__(self, genetics):
self.genetics = genetics
pass
@paulhendricks
paulhendricks / mario.lua
Created November 18, 2015 19:01 — forked from mathhun/mario.lua
MarI/O by SethBling http://pastebin.com/ZZmSNaHX
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
-- For SMW, make sure you have a save state named "DP1.state" at the beginning of a level,
-- and put a copy in both the Lua folder and the root directory of BizHawk.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
"A",
--
-- A simple genetic algorithm for function optimization, in lua
-- Copyright (c) 2009 Jason Brownlee
--
-- It uses a binary string representation, tournament selection,
-- one-point crossover, and point mutations. The test problem is
-- called one max (a string of all ones)
--
-- configuration
@paulhendricks
paulhendricks / miniCRAN.R
Created January 20, 2016 20:00 — forked from stephlocke/miniCRAN.R
Getting a local CRAN that combines internal and external packages
## ------------------------------------------------------------------------
# Set the repo for use throughout
cran <- "https://cran.rstudio.org"
# Install
if(!require(miniCRAN)){
install.packages("miniCRAN", repos = cran)
}
## ------------------------------------------------------------------------
install.packages('caret')
install.packages('ccd')
install.packages('d3Network')
install.packages('data.table')
install.packages('dplyr')
install.packages('DMwR')
install.packages('e1071')
install.packages('ergm')
install.packages('ff')
install.packages('foreach')
require(Mcomp)
nseries <- length(M3)
theta <- as.matrix(M3Forecast$THETA)
fpro <- as.matrix(M3Forecast$ForecastPro)
fcx <- as.matrix(M3Forecast$ForcX)
bjauto <- as.matrix(M3Forecast$`B-J auto`)
ab1 <- as.matrix(M3Forecast$AutoBox1)
ab2 <- as.matrix(M3Forecast$AutoBox2)
ab3 <- as.matrix(M3Forecast$AutoBox3)
@paulhendricks
paulhendricks / pi_ga.py
Created February 10, 2016 14:51 — forked from paulmdx/pi_ga.py
from random import randint
def create_population(create, pop_size=1000):
"""Create population list"""
return [create() for i in xrange(pop_size)]
def crossover(combine, population, pop_size):
"""Increase population size by combining"""
original_size = len(population)
while len(population) < pop_size:
@paulhendricks
paulhendricks / ssm_py_est.ipynb
Created March 10, 2016 16:44 — forked from ChadFulton/ssm_py_est.ipynb
State space models in Python: Bayesian and Classical estimation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulhendricks
paulhendricks / gist:55fd59ae60729e21f0f7a758f32a7566
Created July 13, 2016 20:29 — forked from debasishg/gist:b4df1648d3f1776abdff
another attempt to organize my ML readings ..
  1. Feature Learning
  1. Deep Learning
@paulhendricks
paulhendricks / data2.csv
Created August 2, 2016 19:26 — forked from BenHeubl/data2.csv
nuviun's Wearable Health Innovation Scoring - test
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 5 columns, instead of 4. in line 3.
innovationScore,innovationScore2,names,type,description
4.7,470,3L Labs Footlogger,medical,"The 3L Labs Footlogger is a wearable fitness tracking device that aims at spotting health problems early, as well as logging daily activity. Placed in the user's shoe, 8 sensors coupled to 1 accelerometer help identify and record exercise habits. The data is then disclosed to the user via text or smartphone app. This computing device's technology can be used for athletes training, regular everyday workouts and rehabilitation."
5.44,544,4D Force,,"The 4D Force is a wearable technology that detects brain waves and converts them into electric signals. 4D Force developed a platform that can capture and compute high quality EEG/ EOG/EMG signals. With the device, users can control games by using the power of their thoughts. 4D Force can also be used for medical purposes as it has the ability to interpret electrical signals generated by the body, and create recommendations for changes in lifestyle."
4,400,4iiii Viiiiva,Fitnes