Skip to content

Instantly share code, notes, and snippets.

Scott Hale computermacgyver

Block or report user

Report or block computermacgyver

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@computermacgyver
computermacgyver / gist:af96281bce7b8abf44567ba0bd9a5f35
Created Mar 14, 2019
Search a YouTube channel for videos within a specific date range.
View youtube_searcher.py
#!/usr/bin/python3
#Need
# https://github.com/googleapis/oauth2client
# https://github.com/googleapis/google-api-python-client
from apiclient.discovery import build
from apiclient.errors import HttpError
from oauth2client.tools import argparser
@computermacgyver
computermacgyver / bubblify.py
Created Mar 7, 2016
Bubble plot in python (saves to SVG)
View bubblify.py
"""
Read in CSV of label, value
Need two commandline arguments: csv and svg files. e.g.
python bubblify.py somefile.csv output.svg
Write SVG for circles of each value
Circle area varies with value from csv
Future:
No text labels currently
@computermacgyver
computermacgyver / bubblify.php
Last active Mar 7, 2016
PHP code to make a bubble plot SVG file
View bubblify.php
<?php
/*
Read in CSV of label, value
Need two commandline arguments: csv and svg files. e.g.,
php bubblify.php somefile.csv output.svg
Write SVG for circles of each value
Circle area varies with value from csv
Future:
@computermacgyver
computermacgyver / pebble-remote.py
Created Feb 18, 2016
Python code to use pebble as USB remote clicker (next slide/previosu slide)
View pebble-remote.py
#!/usr/bin/env python
#Disconnect your pebble from your phone
#Pair with your computer directly
#Launch the python script. Open the music app
import argparse
import os
import libpebble
import time
@computermacgyver
computermacgyver / twitter_analysis.R
Last active Jan 3, 2016
Analysis of Twitter mentions/retweets network for #CHI2014 paper "Global Connectivity and Multilinguals in the Twitter Network". #R #igraph
View twitter_analysis.R
#!/usr/bin/R
# Main analysis for "Global Connectivity and Multilinguals in the Twitter Network"
# paper. See http://www.scotthale.net/pubs/?chi2014 for details.
#
# Author: Scott A. Hale (http://www.scotthale.net/)
# License: GPLv2
# If you use this in support of an academic publication, please cite:
#
# Hale, S. A. (2014) Global Connectivity and Multilinguals in the Twitter Network.
@computermacgyver
computermacgyver / density_functions.R
Last active Jun 23, 2016
Function for R and ggplot2 to create log scale density plots from dataframe, spiting on a factor. #R #ggplot2 #densityPlot #GPLv2 #CHI2014
View density_functions.R
#!/usr/bin/R
# Functions for R and ggplot2 to create log-scale density plots
# Main function: density.log(...)
# Produce a dataframe used to produce a density plot
# Input:
# data: dataframe,
# var: variable to plot on y-axis
# split: factor to split on
You can’t perform that action at this time.