This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"celltoolbar": "Raw Cell Format", | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "Sparse AutoEncoder Part1" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "Untitled0" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### mac | |
```brew install gfortran | |
brew install r | |
brew install gsl | |
R> install.packages("BTYD", dependencies = TRUE) | |
``` | |
### ubuntu | |
```sudo apt-get install libgsl0-dev``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://net.tutsplus.com/tutorials/python-tutorials/behavior-driven-development-in-python/ | |
Note: feature files needs newline at each "given", "when", etc (otherwise you get errors like below:) | |
Traceback (most recent call last): | |
File "/Library/Python/2.7/site-packages/lettuce/core.py", line 143, in __call__ | |
ret = self.function(self.step, *args, **kw) | |
File "/Users/greeness/Documents/workspace/hehe/tests/features/steps.py", line 9, in compute_its_fatorial | |
world.number = factorial(world.number) | |
AttributeError: 'thread._local' object has no attribute 'number' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat mysql-statement | |
> insert into mytable (k, v) values (1,2); | |
> insert into mytable (k, v) values (2,2); | |
> insert into mytable (k, v) values (3,2); | |
scp mysql-statement to an ec2 machine | |
ssh to the ec2 machine | |
$ mysql -h hostname -u username -p password database_name < mysql-statement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public UserIapModel Calculate(double? currentTotalIap, | |
double? currentElapsedHours, | |
double? currentPlayedTurns, | |
double newIap, | |
double newElapsedHours, | |
double newPlayedTurns) | |
{ | |
// default setting for new users: spending $0.01 in every 24 hours or 10 turns | |
double totalIap = currentTotalIap ?? 0.01; | |
double totalElapsedHours = currentElapsedHours ?? 24; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import copy | |
n_params = 5 | |
upper_bound = 5 | |
lower_bound = 0 | |
def get_neighbors(solution): | |
neighbors = [] | |
for i in range(n_params): |