Skip to content

Instantly share code, notes, and snippets.

View hrbrmstr's full-sized avatar
💤
#tired

boB Rudis hrbrmstr

💤
#tired
View GitHub Profile
@Sharpie
Sharpie / mRunif.c
Created March 6, 2010 04:44
An example of calling R functions from C
//myRunif.c
#include <R.h>
#include <Rinternals.h>
SEXP myRunif( SEXP n, SEXP min, SEXP max ){
SEXP statsPackage;
PROTECT(
statsPackage = eval( lang2( install("getNamespace"),
ScalarString(mkChar("stats")) ),
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)

Hacking a Twine

I got a Twine the other week because I was interested in tracking temperature and moisture readings from my house, particularly to know if something is flooding.

Once setup, the Twine sends periodic readings of its temperature sensor and any external probes (moisture sensor) to the Supermechanical site. I was disappointed to find that there isn't currently a way to access those periodic readings. You can set rules

Data sources:
CDC data on vaccine coverage: http://www.cdc.gov/flu/professionals/vaccination/reporti1112/reporti/index.htm
CDC data on current influenza situation: http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html
Historical flu data: http://www.cdc.gov/flu/weekly/pastreports.htm
Locations of hospitals in Boston: https://data.cityofboston.gov/Public-Health/Hospital-Locations/46f7-2snz
NetLogo, a simple agent based model: http://ccl.northwestern.edu/netlogo/
Nemsis, emergency medical services API (haven't used this one myself): http://www.nemsis.org/v3/downloads/v3Archive.html
Written for R, but useful for epi basics in any language: cran.r-project.org/doc/contrib/Epicalc_Book.pdf
"Provides access to health statistics and information on hospital inpatient and emergency department utilization": http://hcupnet.ahrq.gov/
Healthcare Research and Quality data directory: http://www.ahrq.gov/data/dataresources.htm
@braintreeps
braintreeps / map.R
Created February 21, 2013 16:48
This is the R code to go along with the blog post "Mapping 35 Million Credit Cards On Top of Census Data With R".
library(data.table);
library(maps);
library(maptools);
library(spatstat);
library(zipcode);
library(GISTools)
#load the zipcode dataset
data(zipcode);
@hadley
hadley / .gitignore
Last active February 25, 2024 02:10
Benchmark different ways of reading a file
.Rproj.user
.Rhistory
.RData
*.Rproj
*.html
@jfreels
jfreels / README.md
Last active December 25, 2015 02:59
R + Shiny + d3js: Blank template.
@debasishg
debasishg / gist:8172796
Last active March 15, 2024 15:05
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@leeper
leeper / update_github.R
Last active February 2, 2021 22:56
Update packages if a newer version is available from GitHub
library('devtools')
library('utils')
library('httr')
update_github <-
function(ask = TRUE, ...){
installed <- installed.packages()
oldVersion <- installed[,'Version']
urls <- sapply(names(oldVersion), function(x){
d <- packageDescription(x)
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class