Skip to content

Instantly share code, notes, and snippets.

@vlandham
vlandham / amplitude_time_density_example.R
Created February 24, 2017 19:30 — forked from memoryfull/amplitude_time_density_example.R
An example of seewave::acoustat amplitude density calculation
# Install dependencies
#install.packages(c("fftw","tuneR","rgl","rpanel", "seewave"), repos="http://cran.at.r-project.org/")
# for Fast Fourier transform (fftw) to work, install
# the fftw lib (e.g. brew install fftw)
# Load libraries
library(data.table)
library(tuneR)
library(seewave)

Command Line Basics

Rando Stuff

Find the full path of the folder you're in

pwd
@vlandham
vlandham / gist:83f796321374eceef676
Created November 12, 2015 05:56 — forked from zxcvbnm4709/gist:2656197
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@vlandham
vlandham / index.html
Last active August 27, 2015 16:31 — forked from tafsiri/index.html
2D Picking with canvas
<html lang="en">
<head>
<meta charset="utf-8">
<title>2D Picking with canvas</title>
<meta name="description" content="">
<meta name="author" content="Yannick Assogba">
<script src="//rawgit.com/mrdoob/stats.js/master/build/stats.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.js"></script>
#Script for scraping Chronicling America
import requests
import re
import csv
from bs4 import BeautifulSoup, SoupStrainer
import os
from time import sleep
from datetime import date, datetime, timedelta
#search_terms is a string of words separated by spaces.
@vlandham
vlandham / gist:fc91ee2170af1fe759f8
Created June 7, 2014 04:16 — forked from anonymous/gist:831fdfa042057b85ebf0
processing for animated gif
void setup() {
size(500, 500);
smooth(8);
noStroke();
}
float t, tt, ht, x, y;
int N = 11;
float l = 24;
float sp = l*1.5;
@vlandham
vlandham / 0_reuse_code.js
Created June 2, 2014 13:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
source target weight
sam tully 3
sam pat 8
sam kim 2
sam pris 1
roy pris 5
roy sam 1
tully sam 1
tully pris 5
tully kim 3
# Requires ImageMagick
# Converting the source from JPEG to PNG - if necessary
convert my_src_image.jpg my_src_image.png
# Option A
# - Requires a temporary intermediate file
# - Drill more than 10 might result in poor results
@vlandham
vlandham / README.md
Last active September 30, 2019 22:59 — forked from awoodruff/README.md
Head Projections Remix

A quick hack on the beautifully executed projection example from Andy Woodruff. I just wanted to see them all on one screen.

Click the Open in new window button to see them all.

Novel code Inspired once again by Jason Davies.

Andy's original text:

We've all seen the projected head from Elements of map projection with applications to map and chart construction, but the authors in 1921 did not have D3 to help them show a full range of weird distorted faces. This is based on the Map Projection Transitions example by Jason Davies.