This file contains 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
#!perl | |
use strict; | |
use warnings; | |
use File::Basename; | |
use File::Spec; | |
use File::Copy; | |
my $file = shift; |
This file contains 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
/* top 100 owners for Perl by number of creates */ | |
SELECT repository_owner, count(repository_owner) as creates | |
FROM [githubarchive:github.timeline] | |
WHERE type="CreateEvent" | |
AND repository_language="Perl" | |
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-05-01 00:00:00') | |
GROUP BY repository_owner | |
ORDER BY creates DESC | |
LIMIT 100 |
This file contains 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
/* top 100 owners for Ruby by number of creates */ | |
SELECT repository_owner, count(repository_owner) as creates | |
FROM [githubarchive:github.timeline] | |
WHERE type="CreateEvent" | |
AND repository_language="Ruby" | |
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-05-01 00:00:00') | |
GROUP BY repository_owner | |
ORDER BY creates DESC | |
LIMIT 100 |
This file contains 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, MAX(repository_forks) as forks, repository_description, repository_url, repository_owner | |
FROM [githubarchive:github.timeline] | |
WHERE type='ForkEvent' | |
AND repository_language='JavaScript' | |
GROUP BY repository_name, repository_description, repository_url, repository_owner | |
ORDER BY forks DESC | |
LIMIT 50 |
This file contains 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, MAX(repository_forks) as forks, repository_description, repository_url, repository_owner | |
FROM [githubarchive:github.timeline] | |
WHERE type='ForkEvent' | |
AND repository_language='Ruby' | |
GROUP BY repository_name, repository_description, repository_url, repository_owner | |
ORDER BY forks DESC | |
LIMIT 100 |
This file contains 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, MAX(repository_forks) as forks, repository_description, repository_url, repository_owner | |
FROM [githubarchive:github.timeline] | |
WHERE type='ForkEvent' | |
AND repository_language='Python' | |
GROUP BY repository_name, repository_description, repository_url, repository_owner | |
ORDER BY forks DESC | |
LIMIT 100 |
This file contains 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
#!perl | |
use strict; | |
use warnings; | |
use Image::ExifTool qw(:Public); | |
use Location::GeoTool; | |
use WebService::Simple; | |
my $img = shift; |
This file contains 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
#!perl | |
use strict; | |
use warnings; | |
my $dir = shift; | |
if( ! defined($dir) ) { die "Usage: $0 <dir>"; } | |
opendir my $DIR_H, $dir or die "$dir: $!"; | |
my @dir_entrys = map{ -d $dir ? $_ : "" } readdir $DIR_H; |
This file contains 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
import bottle | |
from bottle import route, post, run, request | |
from instagram import client, subscriptions | |
bottle.debug(True) | |
CONFIG = { | |
'client_id': '' | |
'client_secret': '' | |
'redirect_uri': 'http://localhost:8515/oauth_callback' |
This file contains 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 'sinatra' | |
require 'instagram' | |
require 'pit' | |
enable :sessions | |
CALLBACK_URL = "http://localhost:4567/oauth/callback" | |
Instagram.configure do |config| | |
conf = Pit.get("api.instagram.com", :require => { |