Skip to content

Instantly share code, notes, and snippets.

sudo apt-get install vagrant
git clone https://bitbucket.org/puffnfresh/vagrant-haskell-heroku.git
cd vagrant-haskell-heroku
vagrant up
vagrant ssh
cabal update
cabal install cabal-install
cabal --version
> cabal-install version 0.14.0
> using version 1.14.0 of the Cabal library
---
finish_on_last_page: false
name: Lung Information Needs Questionnaire
redirect_url: /accounts/profile/
show_progress: true
slug: linq
step_navigation: true
steps_are_sequential: true
success_message: Questionnaire complete.
---
---
finish_on_last_page: false
name: Tantrums daily phone measure
redirect_url: /profile/
show_progress: false
slug: tantrums-daily-phone-measure
step_navigation: true
steps_are_sequential: true
success_message: Questionnaire complete.
---
@puterleat
puterleat / gist:7907963
Created December 11, 2013 10:08
trying to combine markdown and latex highlighting
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Pandoc2
scopeName: text.pandoc
uuid: 8763771e-a0e5-44ea-bd14-fb3b7ee1b23d
patterns:
- include: text.html.markdown
- include: text.tex.latex
---
finish_on_last_page: true
name: The Dose Index
redirect_url: /accounts/profile/
show_progress: false
slug: dose
step_navigation: false
steps_are_sequential: true
success_message: ''
---
@puterleat
puterleat / gist:8578848
Last active January 4, 2016 05:59
stupidexample.py
# An associative mapping of desired outcomes to actions
# sometimes conditional (|) on a particular environment
goal_to_action_mapping = {
"Attract a mate": {
"Disco": ["Demonstrate virility", "Be funny", "Be a nice person"],
"Bedroom": ["Demonstrate virility", "Be a nice person"],
}
"Demonstrate virility": {
@puterleat
puterleat / pseudogoals.py
Created January 23, 2014 19:34
goals in pseudocode
# An associative mapping of desired outcomes to actions which allows
# the nesting of goals.
goal_to_habit_mapping = {
"Attract a mate": {
"Disco": ["Demonstrate virility", "Be funny", "Be a nice person"],
"Bedroom": ["Demonstrate virility", "Be a nice person"],
}
def plan_goal(desired_outcome, environment, movie_of_my_plan=[]):
possibilities = filter(outcome_to_action_mapping, desired_outcome, environment)
sort(possibilities, key=magic_inverse_inference_function_which_includes_affordances)
best_bet = possibilities.pop()
if is_an_an_actionable_thing(best_bet):
movie_of_my_plan.append(best_bet)
@puterleat
puterleat / symptomcombinations
Last active August 29, 2015 13:56
symptoms combinations program
#!python
import random
import csv
from itertools import combinations
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in xrange(0, len(l), n):
yield l[i:i+n]
. binreg compnouc c.wingage , or n(20)
Iteration 1: deviance = 1118.075
Iteration 2: deviance = 1079.917
Iteration 3: deviance = 1079.575
Iteration 4: deviance = 1079.575
Iteration 5: deviance = 1079.575
Generalized linear models No. of obs = 376