This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note – this is not a bash script (some of the steps require reboot) | |
# I named it .sh just so Github does correct syntax highlighting. | |
# | |
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5 | |
# | |
# The CUDA part is mostly based on this excellent blog post: | |
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/ | |
# Install various packages | |
sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with | |
years(year_id, year) as ( | |
select i, 'Year ' || i | |
from generate_series(0, 3) i | |
), | |
regions(region_id, region) as ( | |
select i, 'Region ' || i | |
from generate_series(0, 3) i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string[] scopes = new string[] { | |
AnalyticsService.Scope.Analytics, // view and manage your Google Analytics data | |
AnalyticsService.Scope.AnalyticsEdit, // Edit and manage Google Analytics Account | |
AnalyticsService.Scope.AnalyticsManageUsers, // Edit and manage Google Analytics Users | |
AnalyticsService.Scope.AnalyticsReadonly}; // View Google Analytics Data | |
var clientId = "[Client ID]"; // From https://console.developers.google.com | |
var clientSecret = "xxx"; // From https://console.developers.google.com | |
// here is where we Request the user to give us access, or use the Refresh Token that was previously stored in %AppData% | |
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = clientId, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Somehow Google does not provide a changelog for when they add fields to the ga_sessions table | |
# export you get with Google Analitics premium. Here's some of it by trial and error... :( | |
COLUMNS=" | |
visitorId, | |
visitNumber, | |
visitId, | |
visitStartTime, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install RStudio Server on a Google Compute Engine instance running Debian | |
# Wheezy | |
CRAN_MIRROR='cran.rstudio.com' | |
pushd /tmp | |
# Install up-to-date version of R --------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'zlib' | |
require 'yajl' | |
# References | |
# - https://developers.google.com/bigquery/preparing-data-for-bigquery#dataformats | |
# - https://developers.google.com/bigquery/docs/data#nested | |
# | |
def type(t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select repository_name, count(repository_name) as pushes, repository_description, repository_url | |
from [githubarchive:github.timeline] | |
where type="PushEvent" | |
and repository_language="Emacs Lisp" | |
and parse_utc_usec(created_at) >= parse_utc_usec('2014-01-01 00:00:00') | |
group by repository_name, repository_description, repository_url | |
order by pushes desc | |
limit 100 |