Skip to content

Instantly share code, notes, and snippets.

@rpietro
rpietro / postgres_json.sql
Last active August 29, 2015 14:06
postgres with json
-- example http://clarkdave.net/2013/06/what-can-you-do-with-postgresql-and-json/
createdb json_test
psql json_test
CREATE TABLE books ( id integer, data json );
INSERT INTO books VALUES (1, '{ "name": "Book the First", "author": { "first_name": "Bob", "last_name": "White" } }');
INSERT INTO books VALUES (2, '{ "name": "Book the Second", "author": { "first_name": "Charles", "last_name": "Xavier" } }');
@rpietro
rpietro / R_commands.R
Last active August 29, 2015 14:06
R commands
?unlist # Given a list structure ‘x’, ‘unlist’ simplifies it to produce a vector which contains all the atomic components which occur in ‘x’.
install.packages('', repos='http://cran.us.r-project.org')
require(plyr)
headTail(bnames)
@rpietro
rpietro / slidify.css
Created August 20, 2014 00:27
css for slidify
<link href='http://fonts.googleapis.com/css?family=Baumans' rel='stylesheet' type='text/css'>
<style type="text/css">
.title-slide hgroup > h1{
font-family: 'Baumans', cursive;
}
<style type="text/css">
.title-slide hgroup > h2{
@rpietro
rpietro / ipython_notebook_shortcuts.md
Created June 26, 2014 17:44
shortcuts for ipython notebook

Shortcuts for iPython notebook

Command Mode (press Esc to enable)

Enter: edit mode
Shift-Enter: run cell, select below
Ctrl-Enter: run cell
Alt-Enter: run cell, insert below
y: to code
m: to markdown

@rpietro
rpietro / path_finder.md
Created February 26, 2014 01:44
useful shortcuts for pathfinder

new file - cmd alt n get info - cmd i quick look - cmd y make alias - cmd l make symbolic link - cmd shift l view as list - cmd 2 show invisible files - cmd 4 (custom) swap panes - f2 browse in next pane - f3 rpietro - cmd shift h

@rpietro
rpietro / n-of-1.markdown
Last active August 29, 2015 13:56
N-of_1 Design in Education

N-of-1 Design in Education

Ricardo Pietrobon, Uwe Heiss, Mauro Maldonato, Joao Vissoci, Bruno Melo, Jacinto Franco, Seiji Isotani

N-of-1 trials are cross-over trials where the randomization is conducted at the subject rather than the group level. This modification has a number of important implications, among them:

  1. Data from individual subjects can be analyzed on their own
  2. When putting together data from multiple N-of-1 trials, the synthesis is made following meta-analysis principles
@rpietro
rpietro / plover_list.md
Created February 9, 2014 07:19
plover list to memorize simple key positioning

is so he is you is it that to at the can could he can you can about with was would we with you had that who he uh are you are of after off every you've are or you're . up be on ebb you'll ing ago toing egg ugh the at ought ed you'd as 00 easy yous

# setting a virtual environment and getting django to run
virtualenv --no-site-packages django_hack
source django_hack/bin/activate
cd django_hack
easy_install django
ls bin
django-admin.py
django-admin.py startproject django_test
cd django_test
@rpietro
rpietro / RDF_vocabulary.md
Created January 29, 2014 05:12
RDF vocabulary list

RDF vocabulary

Classes

RDF

rdf:XMLLiteral - the class of XML literal values rdf:Property - the class of properties rdf:Statement - the class of RDF statements

@rpietro
rpietro / edx_local.sh
Created January 26, 2014 04:15
edX installation commands to play with XML
# below comes from http://people.csail.mit.edu/ichuang/edx/
cd
mkdir mitx-vagrant
cd mitx-vagrant
mkdir data
# download edx4edx_lite https://github.com/mitocw/edx4edx_lite into data directory
# download mitxvm-edx-platform-02sep13a.box
# http://people.csail.mit.edu/ichuang/edx/download.php?file=mitxvm-edx-platform-02sep13a.box