Skip to content

Instantly share code, notes, and snippets.

View kliph's full-sized avatar

Cliff Rodgers kliph

  • Philadelphia, PA
View GitHub Profile
@kliph
kliph / parser.rb
Last active September 27, 2017 01:23
class Parser
def self.parse(foo)
foo[:results] = foo[:results].reduce([]) do |acc, result|
if result[:assays].is_a? Array
res = result[:assays].reduce([]) do |coll, assay|
if assay[:range].is_a? String
coll.push({range: Hash[[:low, :high].zip(assay[:range].split('-').map(&:to_i))]})
else
coll.push assay
end
@kliph
kliph / whitecraft-williams-2010.org
Last active June 27, 2017 14:11
Notes for PromptWorks Journal Club

Why Aren’t More Women in Computer Science?

Michele A. Whitecraft & Wendy M. Williams

Original paper

Low proportions of women studying computer science

Between 2001 and 2008 there was a 79% decline in number of incoming undergraduate women interested in majoring in computer science

See https://www.heri.ucla.edu/monographs/50YearTrendsMonograph2016.pdf p. 293 ish

Trend from 2008 - 2015 grows from 0.3 to 1.7 (weighted in some way–I

Keybase proof

I hereby claim:

  • I am kliph on github.
  • I am kliph (https://keybase.io/kliph) on keybase.
  • I have a public key ASChFrirO33WcwM464OUvjv3B8-BAhiQbIvkmTSzo-ec-wo

To claim this, I am signing this object:

@kliph
kliph / tslack
Created September 8, 2016 18:40
script for publishing tmate sessions to slack
#!/bin/bash
set -e
SLACK_WEBHOOK_URL=https://wtf.bbq
DEFAULT_EMOJI=:robot_face:
CHANNEL=${1:-#remote}
AUTHOR="tmate"
tmate -S /tmp/tmate.sock new-session -d && tmate -S /tmp/tmate.sock wait tmate-ready
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
@kliph
kliph / data.R
Created March 17, 2016 03:04
summarize data
data.last10.sum <- ddply(data.last10, c("genotype", "condition"), summarise,
fepsp.slope.percent.mean = mean(fepsp.slope.percent, na.rm=T),
fepsp.slope.percent.sd = sd(fepsp.slope.percent, na.rm=T))
Ns <- ddply(data, c("genotype", "condition"), summarise,
N = sum(time == 0))
data.last10.sum$N <- cbind(Ns[,3])
data.last10.sum <- ddply(data.last10.sum, c("genotype", "condition"), transform,
(ns gol.test
(:require [clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]))
(def live-cell-with-fewer-than-two-live-neighbors-dies
(gen/sample (gen/such-that #(and (not= coords1 coords2) )) (gen/return )))
(def two-live-board
(let [coords1
@kliph
kliph / clojure-topics.md
Created February 10, 2016 20:08
Clojure Meetup Topics
  • Intro to ClojureScript
  • Figwheel / Flappy bird demo
  • Paredit
  • Onyx
  • Editor (Emacs, Vim, Cursive, Atom, Lighttable) and Environment (Lein, Boot, Java) setup
  • Om.Next
  • Hidden gems of the core libraries
  • Accessing databases (rbdms with sql libraries, and no sql)
  • Datomic
  • Kibit
@kliph
kliph / test.mpd
Created August 17, 2015 21:31
MPD with pauses between Periods
<?xml version='1.0' encoding='UTF-8'?>
<MPD
xmlns='urn:mpeg:dash:schema:mpd:2011'
profiles='urn:mpeg:dash:profile:isoff-live:2011'
type='static'
mediaPresentationDuration='PT12.000S'
minBufferTime='PT10S'>
<Period id="0" start="PT0S" duration="PT2S">
<BaseURL>http://vushaper-development.s3.amazonaws.com/PIoHFOON/</BaseURL>
<AdaptationSet mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1" lang="und">
@kliph
kliph / parameters.js
Created June 29, 2015 15:51
Javascript parameter error
vushaper.playback.init('http://vushaper-staging.s3.amazonaws.com/o0a83mfe.m3u8', {
"buttons": [{
"type": "template",
"link": "bWVkaWEtdGVtcGxhdGU6bVBsaEdmOFA",
"text": "Nieghhhhhhhh",
"tag-key": "dGFnOmpsaWNsQ2Q1",
"tag-points": "",
"url": ""
}, {
"type": "template",