Skip to content

Instantly share code, notes, and snippets.

from random import randint
from operator import add
import random
def individual(length, minimum, maximum):
"Initialize population member"
return [randint(minimum, maximum) for x in range(length)]
def population(count, length, minimum, maximum):
"""
@francisbautista
francisbautista / sbtproject.sh
Last active April 25, 2016 05:45
Bash script to initialize an SBT Project from scratch.
#!/bin/sh
#------------------------------------------------------------------------------
# Name: sbtproject
# Version: 1.0
# Purpose: Create an SBT project directory structure with a few simple options.
# Author: Francis Bautista francisbautista.me
# License: Creative Commons Attribution-ShareAlike 2.5 Generic
# http://creativecommons.org/licenses/by-sa/2.5/
#------------------------------------------------------------------------------
@francisbautista
francisbautista / install.sh
Created September 7, 2015 13:43
Jupyter Install on Ubuntu
$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo apt-get install nodejs-legacy
$ pip install jupyter
### Test with the following:
$ jupyter notebook