Skip to content

Instantly share code, notes, and snippets.

@AmritPatel
AmritPatel / txtmining_pdf.R
Last active June 1, 2021 21:44
Reading and Text Mining a PDF-File in R
# Reading and Text Mining a PDF-File
# download pdftotxt from
# ftp://ftp.foolabs.com/pub/xpdf/xpdfbin-win-3.04.zip
# and extract to your program files folder
# here is a pdf for mining
#url <- "http://www.noisyroom.net/blog/RomneySpeech072912.pdf"
#dest <- tempfile(fileext = ".pdf")
dest <- "C:\\Users\\axp13\\Desktop\\SERs\\SNPB\\SNPB_SERs_2012-2013.pdf"
@AmritPatel
AmritPatel / packList50k.md
Last active February 27, 2018 19:35
If your're running your first 50k ultramarathon, this is a simple (and easily modifiable) checklist that may come in handy for your race day preparations.

50k Ultra Pack List

Need

  • Ziploc bag to collect aid station food
  • Hydration vest (I chose the Salomon Advanced Skin 12 Set)
  • Bodyglide
  • Gloves (light synthetic, not cotton)
  • Beanie (light, Merino wool)
  • Cell phone (fully charged!)
@AmritPatel
AmritPatel / porkShoulder.md
Last active September 1, 2017 18:44
How I Cook a Pork Shoulder on a Kamado Grill

Need

  • salt
  • black pepper
  • yellow mustard
  • worcestershire sauce (cut mustard w/)
  • rub
  • OPTIONAL pan for injecting (so doesn't make a mess), and ...
  • OPTIONAL meat injector, and ...
  • OPTIONAL injection liquid (for 2 8-10 lb. butts):
@AmritPatel
AmritPatel / brisket.md
Last active September 1, 2017 17:43
How I Cook a Beef Brisket on a Kamado Grill

Need

  • kosher salt
  • coarse black pepper
  • cayenne pepper
  • yellow mustard
  • worcestershire sauce (cut mustard w/)
  • cooler
  • towels
@AmritPatel
AmritPatel / b+wFilm.md
Last active July 31, 2017 18:27
Basic B+W Film Processing

Prep

  1. Get
    a. container with ml/oz markings and rinse well w/ water
    b. funnel and rinse well w/ water
    c. thermometer and rinse well w/ water
    d. towel to dry your hands and work area as needed
    e. the 3 chems needed for processing

  2. Pour 10 oz of deveoper PER ROLL in container

@AmritPatel
AmritPatel / bpi.csv
Last active August 29, 2015 14:13
NCAA Basketball Predictions
BPI RK TEAM CONF BPI PVA CONF RK W-L RAW RAW RK SOS SOS RK VAR VAR RK DATE
1 Kentucky SEC 95.1 23.8 1 15-0 86.6 2 58.4 61 4.3 351 2015-01-13
2 Virginia ACC 94.1 22.3 1 15-0 87.2 1 56.9 80 5.2 349 2015-01-13
3 Gonzaga WCC 91.8 19.4 1 16-1 85.4 3 56.4 90 5.4 347 2015-01-13
4 Duke ACC 90.1 17.8 2 14-1 83.1 4 57.0 77 8.5 339 2015-01-13
5 Villanova Big East 90.0 17.6 1 15-1 81.7 7 58.2 66 8.2 340 2015-01-13
6 Wisconsin Big Ten 89.5 17.2 1 15-2 81.9 6 57.5 74 9.9 329 2015-01-13
7 West Virginia Big 12 88.2 16.1 1 14-2 79.9 9 58.3 65 8.9 337 2015-01-13
8 North Carolina ACC 87.9 15.9 3 12-4 72.6 28 65.3 7 10.6 323 2015-01-13
9 Utah Pac-12 87.9 15.9 1 13-2 82.0 5 55.9 93 7.8 342 2015-01-13
@AmritPatel
AmritPatel / code.R
Last active August 29, 2015 14:02
Map of Baltimore Nursing Homes
# View @ http://rcharts.github.io/viewer/?123996510e44a6e75778
library(dplyr)
library(rCharts)
library(RDSTK)
# Read in the data
x <- getURL("https://gist.githubusercontent.com/AmritPatel/7fffd1f645df4f74aae9/raw/f2b109ed22d10e2e36e6afc3f45e6efea93b85d5/balt_nursing_homes.csv")
nursing_homes <- read.csv(text = x)
# Use dataframe wrapper
@AmritPatel
AmritPatel / balt_nursing_homes.csv
Created June 14, 2014 12:28
Baltimore Nursing Homes
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 13 columns, instead of 12. in line 8.
Provider Name,Address,City,ZipCode,State,Phone,Fax,SNF,SNF/Chronic,SNF/Long Term,SNF/Rehab,Assisted Living,Hospice/Home
Future Care Nursing Home - Irvington ,22 S Athol Ave,Baltimore,21229,MD,410-947-3052,,Yes,Yes,Yes,Yes,No,
Future Care Nursing Home - Lochearn,4800 Seton Drive,Baltimore,21215,MD,410-358-3410,,Yes,Yes,Yes,Yes,No,
Future Care Nursing Home - Northpoint,1046 South Northpoint Road,Baltimore,21224,MD,410-282-0100,,Yes,Yes,Yes,Yes,No,
Future Care Nursing Home - Old Court,5412 Old Court Road,Baltimore,21133,MD,410-922-3200,,Yes,Yes,Yes,Yes,No,
Future Care Nursing Home - Sandtown,1000 North Gilmore Street,Baltimore,21217,MD,410-669-2750,,Yes,Yes,Yes,Yes,No,
Future Care Nursing Home - Canton Harbor,1300 South Ellwood Avenue,Baltimore,21224,MD,410-342-6644,,Yes,Yes,Yes,Yes,No,
Future Care Nursing Home - Charles Village,2327 North Charles Street,Baltimore,21218,MD,410-889-8500,,Yes,Yes,Yes,Yes,No,
Future Care Nursing Home - Cold Spring,4700 Harford Road,Baltimore,21214,MD,410-254-3300,,Yes,Yes,Yes,Yes,N
@AmritPatel
AmritPatel / index.html
Created May 31, 2014 01:03
Amrit Patel's Foursquare Check-ins
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css'>
<script src='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js' type='text/javascript'></script>
<script src='https://rawgithub.com/leaflet-extras/leaflet-providers/gh-pages/leaflet-providers.js' type='text/javascript'></script>
<script src='http://harrywood.co.uk/maps/examples/leaflet/leaflet-plugins/layer/vector/KML.js' type='text/javascript'></script>
@AmritPatel
AmritPatel / index.html
Created May 27, 2014 00:31
"mt vernon va" search frequency over time to determine most popular months for visiting Washington's Mt. Vernon estate
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/assets/css/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_nvd3_tests/libraries/widgets/nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='http://nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script>