Skip to content

Instantly share code, notes, and snippets.

Avatar

Phil Snyder philerooski

  • Seattle, WA
View GitHub Profile
View get_bridge_uploads.py
import bridgeclient # https://github.com/larssono/bridgeclient
import functools
def get_bridge_client(email, password, study):
bridge = bridgeclient.bridgeConnector(email, password, study=study)
return bridge
"""
View reduce_features.py
import synapseclient
import argparse
import pandas
import json
import os
DUMMY_ARG = "dummy" # A 'None' like string we can pass to boto
View tremorModule.R
# Entry function to extract tremor features
######################
# Load Libraries
######################
library(optparse)
library(data.table)
library(plyr)
library(tidyverse)
View walkingModule.R
library("synapseClient")
synapseLogin()
library("plyr")
library("dplyr")
library("ggplot2")
library("jsonlite")
library("parallel")
library("tidyr")
library("lubridate")
View submit_jobs.py
import synapseclient
import pandas
import argparse
import boto3
import os
import json
import uuid
AWS_BATCH_ARRAY_SIZE_LIMIT = 10000
View curate_mpower.R
rm(list=ls())
options(stringsAsFactors = F)
library(synapser)
library(tidyverse)
library(lubridate)
fetch_and_prep <- function() {
mpower_f <- synGet("syn21213531") #"syn11488492")
mpower <- read_tsv(mpower_f$path)
now <- lubridate::now()
View change_sharing_scope.R
library(synapser)
library(tidyverse)
PROJECT_ID <- "syn12030321"
UDALL_USERS <- "syn18691020"
AT_HOME_PD_USERS <- "syn16786935"
get_users <- function(user_table_id) {
user_table <- as_tibble(synTableQuery(paste(
View compute_md5.py
"""
Compute MD5 hashes of files in a local directory or in an S3 bucket.
Outputs a CSV file with columns `path` and `md5`.
When computing MD5 hashes of objects in an S3 bucket, `path` corresponds
to the S3 URI.
"""
import multiprocessing as mp
import boto3 as boto
import pandas as pd
View comput_md5.py
import pandas as pd
import argparse
import hashlib
import re
import os
def read_args():
parser = argparse.ArgumentParser()
parser.add_argument("target_dir",
View neurolincs_gaps.csv
Experiment Well ObjectTrackID
AB-CS47iTDP-Survival A1 7
AB-CS47iTDP-Survival A1 11
AB-CS47iTDP-Survival A1 11
AB-CS47iTDP-Survival A10 4
AB-CS47iTDP-Survival A12 8
AB-CS47iTDP-Survival A9 5
AB-CS47iTDP-Survival B10 3
AB-CS47iTDP-Survival B9 7
AB-CS47iTDP-Survival B9 14