Skip to content

Instantly share code, notes, and snippets.

View adilapapaya's full-sized avatar

adilapapaya

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adilapapaya
adilapapaya / index.html
Created January 19, 2016 14:58
Emanating Circles
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<div id="svg-div"></div>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script>
var DEG_TO_RADIAN = Math.PI / 180; // convert degrees to radian
@adilapapaya
adilapapaya / index.html
Last active January 6, 2016 16:27
d3: Week of year axis formatting
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: sans-serif;
color: #444;
}
@adilapapaya
adilapapaya / examples.R
Last active August 29, 2015 14:19 — forked from skranz/s_dplyr
# Examples
library(dplyr)
source("s_dplyr.R");
# Original usage of dplyr
mtcars %>%
filter(gear == 3,cyl == 8) %>%
select(mpg, cyl, hp:vs)
# Select user specified cols.
@adilapapaya
adilapapaya / TerminalCommands.md
Last active August 29, 2015 14:07
Helpful Terminal Commands

Find all files named _somethingsomething_ yy _somethingsomething_ .csv in all folders named xx and get all of the data from the second row of each file.

cat "`find . -type d -iname "xx" | find . -type f -iname "*yy*csv" | head -1`" | sed -n 1p  > SummaryOfYY.csv; 
find . -type d -iname "xx" | find . -type f -iname "*yy*csv" -exec sed -n 2p {} \; >> SummaryOfYY.csv

The first line above gets the header from the first file. The second line above grabs the second row from the files and adds it to the SummaryOfYY.csv file.

@adilapapaya
adilapapaya / README.md
Last active August 29, 2015 14:01 — forked from mbostock/.block
Wilson's Algorithm (Forked from mbostock)
@adilapapaya
adilapapaya / README.md
Created March 31, 2014 19:42
A Better Meteor Template

The Setup

Note: app-name corresponds to the name of your app

Create the app
meteor create app-name
cd app-name
rm app-name* 
@adilapapaya
adilapapaya / README
Last active June 27, 2020 11:58
Export Table Data to CSV using Javascript
Example code for exporting data in a table to a csv file.
@adilapapaya
adilapapaya / README.md
Last active August 29, 2015 13:57
Bouncing Blocks for Bl.ocks.org

A true time-waster. If it's any consolation, I wasted more time making it than you did watching it play out. :)