View .gitconfig
[alias]
gr = log --graph --full-history --all --color \n --pretty=tformat:\"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m\"
plog = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -n 20
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
cdiff = diff --cached
branches = branch --list -vva --color
remotes = remote --verbose
[color]
ui = auto
View .bashrc
PATH=/Users/CBare/bin:$PATH
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
alias ls='ls -alph'
alias path='echo -e ${PATH//:/\\n}'
alias libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}'
alias du='du -kh'
alias df='df -kh'
View Dockerfile
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y less && apt-get install -y octave
VOLUME ["/source"]
WORKDIR /source
CMD octave
View download_pilot_images.py
import os
from boto.s3.connection import S3Connection
from boto.s3.connection import OrdinaryCallingFormat
## retrieve AWS credentials from environment variables
aws_key = os.getenv('AWS_KEY_ID')
aws_secret = os.getenv('AWS_SECRET_KEY')
## Ordinary calling format necessary because of dots in
## bucket name. See: https://github.com/boto/boto/issues/2836
View sample_from_density.R
## Sample from an estimated probability density
sample.density <- function(dd, size, jitter=FALSE) {
x <- sample(dd$x, size=size, prob=dd$y, replace=TRUE)
if (dd$n < 2) jitter=FALSE
if (jitter) {
w <- mean(dd$x[2:length(dd$x)] - dd$x[1:(length(dd$x)-1)]) / 2.0
x <- x + runif(size,-w,w)
}
return(x)
}
View Directionality_of_mPower_features.Rmd
title author date
Directionality of mPower features
J. Christopher Bare
June 6, 2016
library(synapseClient)
library(ggplot2)
library(scales)
View spam_synapse.py
"""
=======================================================
How to access Synapse from Amazon Lambda with Python
=======================================================
Here we show an example of adding a row to a Synapse table
through an AWS Lambda script.
Caveat: Any operation that requires chunked file upload
fails on AWS Lambda. The execution environment for
View combine_features.py
"""
Combine feature extraction output .csv files
"""
import csv
import os
dir = "/home/ubuntu/mhealthx_output/feature_tables/voice_openSMILE-2.2rc1_gemaps"
data=[]
for filename in os.listdir(dir):
print filename
View messages.py
## Messages for challenge scoring script.
import string
import sys
import warnings
## Module level state. You'll need to set a synapse object at least
## before using this module.
syn = None
View create_ec2_machines.py
############################################################
##
## Create EC2 Machines
##
## Start up EC2 instances for each member of a Synapse
## team, emailing them the details of their assigned
## machine.
##
## chris.bare@sagebase.org, November 2015
##