Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
👋

Paul Paczuski plpxsk

💭
👋
View GitHub Profile
View lr-requirements.txt
absl-py==0.10.0
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
fsspec==0.8.3
future==0.18.2
google-auth==1.22.1
google-auth-oauthlib==0.4.1
grpcio==1.32.0
idna==2.10
View lr.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@plpxsk
plpxsk / staticgen-archive.json
Created Sep 7, 2018
STATICGEN.COM DATA ARCHIVE
View staticgen-archive.json
{"timestamp":1536330773791,"data":{"ace":[{"timestamp":1536330773791,"stars":37,"forks":6,"issues":0}],"acrylamid":[{"timestamp":1536330773791,"stars":294,"forks":40,"issues":44}],"adm-dev-kit":[{"timestamp":1536330773791,"stars":29,"forks":4,"issues":11}],"amsf":[{"timestamp":1536330773791,"stars":162,"forks":83,"issues":2}],"anodize":[{"timestamp":1536330773791,"stars":3,"forks":0,"issues":0}],"antwar":[{"timestamp":1536330773791,"stars":393,"forks":27,"issues":7}],"asimov-static":[{"timestamp":1536330773791,"stars":4,"forks":4,"issues":0}],"assemble":[{"timestamp":1536330773791,"stars":3579,"forks":249,"issues":28}],"awestruct":[{"timestamp":1536330773791,"stars":261,"forks":73,"issues":57}],"bake":[{"timestamp":1536330773791,"stars":20,"forks":3,"issues":0}],"baker":[{"timestamp":1536330773791,"stars":41,"forks":7,"issues":1}],"bang":[{"timestamp":1536330773791,"stars":8,"forks":1,"issues":0}],"bashblog":[{"timestamp":1536330773791,"stars":711,"forks":117,"issues":21}],"blackhole":[{"timestamp":1536330773
@plpxsk
plpxsk / cancer-analysis.md
Last active Jul 27, 2021
Example project
View cancer-analysis.md

An example analysis, which follows my project template.

Some data redacted.

Makefile

makefile controls all code (except the Rmd notebooks)

all: clean data process pool
View new-workflow.Rmd
---
title: "A new analysis workflow"
output: github_document
---
# Organize your data processing program with MECE pieces
*MECE = Mutually exclusive, collectively exhaustive. From McKinsey*
## Summary
@plpxsk
plpxsk / my-flasks.md
Last active Mar 21, 2017
Flask examples and tutorial
View my-flasks.md

Quick Start

Quickly deploy a Python-Flask app to Heroku from scratch with this tutorial:

Bonus: nice styling with Bootstrap.

The above is one of the best tutorials I've seen - gives you exactly what you want and nothing you don't need. However, it may be just a tad outdated, so you may have to look at updated docs on heroku.

Examples

Here is one small Flask app that I built:

@plpxsk
plpxsk / dplyr-demo.md
Last active Jun 4, 2018
This demo will give you a flavor of `dplyr` http://bit.ly/dplyr-demo
View dplyr-demo.md

A dplyr demo

This demo is meant to give you a flavor of dplyr's functions for data manipulation in R.

After this demo, you may consider using dplyr to make your data analysis easier, faster, and more fun.

Quick Start

@plpxsk
plpxsk / functional_programming_examples.R
Last active Mar 9, 2017
Examples of new `dplyr` and `purrr` functionality
View functional_programming_examples.R
library(tibble)
library(dplyr)
## sample data
df <- frame_data(
~x, ~y, ~z, ~x1, ~x2, ~x3, ~y1, ~y2, ~y99, ~z99, ~zz,
99, 2, 3.6, 99, 2, 3.6, 99, 2, 3.6, 99, 2,
99, 2, 3.6, 99, 2, 3.6, 99, 2, 3.6, 99, 2,
99, 2, 3.6, 99, 2, 3.6, 99, 2, 3.6, 99, 2
)
@plpxsk
plpxsk / tmux-reference.md
Last active Mar 8, 2017
tmux-reference.md
View tmux-reference.md

TMUX basic commands

Scroll down for more

tmux ls

tmux new -s mysession       # create new

tmux attach -t mysession    # or attach recent:  tmux a
@plpxsk
plpxsk / indicators.sas
Created May 2, 2014
SAS: quickly generate indicator variables
View indicators.sas
/* macro to convert variables to indicators*/
/* outputs dataset "df" with patid and the indicator only for easy later merge*/
/* v = var for indicator // n = name of new var(use same prefix with consecutive #s!!) */
%MACRO INDX(v=, n=);
data df;
set bmd;
if &V > . then tt = 1; else tt =0;
rename tt=&N;
label
&N = "&V 0/1"