Skip to content

Instantly share code, notes, and snippets.

View dmil's full-sized avatar

Dhrumil Mehta dmil

View GitHub Profile
value date query ideology
0 1 2016-01-03 title:DeSantis mainstream
1 1 2016-01-09 title:DeSantis mainstream
2 1 2016-01-15 title:DeSantis mainstream
3 1 2016-01-19 title:DeSantis mainstream
4 1 2016-01-28 title:DeSantis mainstream
5 1 2016-03-03 title:DeSantis mainstream
6 1 2016-03-23 title:DeSantis mainstream
7 1 2016-03-25 title:DeSantis mainstream
8 1 2016-03-26 title:DeSantis mainstream
@dmil
dmil / test.md
Last active January 15, 2019 06:30

Hello [^1]Blah blha blah test footnote

Keybase proof

I hereby claim:

  • I am dmil on github.
  • I am dmil (https://keybase.io/dmil) on keybase.
  • I have a public key whose fingerprint is 14A7 D462 42C2 958A F379 3F66 645E 4140 78F1 33BC

To claim this, I am signing this object:

# delete directory if it exists
rm -rf ~/Desktop/chessdata
# make new directory
mkdir ~/Desktop/chessdata
#change into directory
cd ~/Desktop/chessdata
# download zip files
@dmil
dmil / terminal_prompt
Created March 20, 2017 21:13
Improved terminal prompt
# Drop this in ~/.bash_profile
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
@dmil
dmil / junk
Created February 5, 2017 02:51
[
{
"name" : "Molecule Man",
"age" : 29,
"secretIdentity" : "Dan Jukes",
"powers" : [
"Radiation resistance",
"Turning tiny",
"Radiation blast"
]
[
{
"name" : "Molecule Man",
"age" : 29,
"secretIdentity" : "Dan Jukes",
"powers" : [
"Radiation resistance",
"Turning tiny",
"Radiation blast"
]
@dmil
dmil / google.R
Last active November 1, 2016 16:52
parse google polls
library(dplyr)
library(tidyr)
setwd('~/Downloads')
filename <- 'GS_Election_Poll_20161101'
df <- read.csv(paste(filename,".csv",sep=""))
grouped <- group_by(df, Question..2.Answer)
summary_df = summarise(grouped, total=sum(Weight))
summary_df_mutated <- mutate(summary_df, pct=total/sum(total))
#!/usr/bin/env ruby
#
# Ruby script to access wordpress.com REST API
# For usage, see main method at end of file.
require 'wordpress-com'
require 'json'
require 'logger'
@logger = Logger.new(STDOUT)
@dmil
dmil / mirror
Created February 9, 2016 05:46
<3 Hi, Goodmorning