Skip to content

Instantly share code, notes, and snippets.

View tenkabuto's full-sized avatar
🤓
Contributing to a project

Brandon Hall tenkabuto

🤓
Contributing to a project
View GitHub Profile
@tenkabuto
tenkabuto / GoPro Time-Lapse Assembly
Last active October 13, 2015 00:18
Assembles Timelapse Photos into Video
#!/bin/bash
ls GOPR*.JPG -1tr > files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o output.avi -mf type=jpeg:fps=10 mf://@files.txt
ffmpeg -i output.avi -y -s hd720 -qscale 0 output-final.mp4
rm files.txt
@tenkabuto
tenkabuto / OCI Meeting Notes - 11-15-2015.md
Last active November 29, 2015 01:54
Notes from the Open Company Initiative meeting that took place November 15th, 2015

I'm starting a new issue (branching off #167) to track the decisions of this month's meeting and what needs to be done (video recording / raw meeting notes). If we agree this is a good model, we can then have one such issue for each monthly meeting. Or perhaps a wiki page would work better so we can all edit in the same place.

Here are the main topics and decisions, mostly actionable items (unchecked items have open questions to resolve or actions to take):

  • Complete domain transfer (was already in progress at the time of the meeting, so nothing needed to be done, just wait for the transfer to conclude)
  • Create canonical list of all OCI “holdings” and who handles what:
    • Question: Where will we put it? On a wiki on this repo? In the README.md?
    • Question: Is the following list complete? If not, what's missing?
  • [Website](http://www.open
  • Objetivo: Aprender sobre la cultura de donde vives, México
  1. De manera genera, ¿cómo diría que es el clima en su país?

  2. ¿Cree usted que el clima ha influido en cómo las personas de su país se acercan a ciertas cosas y valoran ciertas cosas?

  3. Si la cultura valora el consumo de verduras o carne? ¿Existe una cultura de vegetarianismo?

  4. ¿Hay alimentos en particular que su cultura valora? (Estoy adivinando maíz)

@tenkabuto
tenkabuto / Related Clubs.sql
Created June 8, 2017 21:40
Getting Related Clubs with Data Science Club (`125525`) for Test
@tenkabuto
tenkabuto / Crosstab to Dataframe.r
Last active August 5, 2017 22:52
Crosstab (contingency table) to Dataframe
# Read in CSV file that's formatted as a Crosstab (empty top left cell, top row contains column names and first column contains row names)
# `header = T` pulls column names from first row
# `row.names = 1` pulls row names from first column, so starts from 1, not 0
b2009 <- read.csv("20092009 Beer - CrossTab.csv", header = T, row.names = 1)
table <- as.table(as.matrix(b2009))
test <- data.frame(table)
# Add names to Columns, starting from leftmost column
colnames(test) <- c("Beer","Judge","Rating")
@tenkabuto
tenkabuto / 2017Fall-research-CV-data-kelly-class.md
Last active September 25, 2017 21:41
Research for CV project in Kelly's class
@tenkabuto
tenkabuto / my_template_redirect_upgrade.php
Last active December 29, 2017 20:21 — forked from strangerstudios/my_template_redirect_upgrade.php
Redirect away from the checkout page if you don't have a required level with Paid Memberships Pro.
/*
Redirect away from the checkout page if you don't have a required level.
*/
function my_template_redirect_upgrade()
{
global $pmpro_pages, $pmpro_level;
if(empty($pmpro_pages))
return;
@tenkabuto
tenkabuto / gist:2d18acf93979f6f745da5af639a20e0c
Created December 29, 2017 23:59 — forked from strangerstudios/gist:5573829
Paid Memberships Pro customization to only let members of a certain level checkout if a discount code was used.
/*
Only let level 1 members sign up if they use a discount code.
Place this code in your active theme's functions.php or a custom plugin.
*/
function my_pmpro_registration_checks_require_code_to_register($pmpro_continue_registration)
{
//only bother if things are okay so far
if(!$pmpro_continue_registration)
return $pmpro_continue_registration;
@tenkabuto
tenkabuto / unlikr.py
Last active January 29, 2018 08:50
"Unlikr" - modified from Brandon DeRosier's (@bdero) code at http://blog.cheesekeg.com/unlikr-unlike-everything-on-tumblr
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from time import sleep
from sys import argv
find_likes = lambda browser: browser.find_elements_by_css_selector('.post_control.like.liked')
def find_next_page(browser):
try:
@tenkabuto
tenkabuto / base.ipynb
Created April 12, 2018 23:44
The base for an interactive Econ Notebook in Jupyter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.