Skip to content

Instantly share code, notes, and snippets.

View ipeirotis's full-sized avatar

Panos Ipeirotis ipeirotis

View GitHub Profile
@ipeirotis
ipeirotis / WikiSynonyms-C++.json
Created February 25, 2013 22:27
Synonyms for the term C++
{
"http": 200,
"message": "success",
"terms": [
{
"term": "C++",
"canonical": 1,
"oskill": 1
},
{
@ipeirotis
ipeirotis / WikiSynonyms-HillaryClinton.json
Last active December 14, 2015 05:18
Synonyms for the term "Hillary Clinton" from the WikiSynonyms service.
{
"http": 200,
"message": "success",
"terms": [
{
"term": "Hillary Rodham Clinton",
"canonical": 1,
"oskill": 0
},
{
@ipeirotis
ipeirotis / WikiSynonyms-BarackObama.json
Created February 25, 2013 22:15
Synonyms for the term "Obama" from the WikiSynonyms service.
{
"http": 200,
"message": "success",
"terms": [
{
"term": "Barack Obama",
"canonical": 1,
"oskill": 0
},
{
Data points: 1000
Workers: 50
Low rho: 0.0
High rho: 0.5
----
Round: 1...
Average absolute estimation error for z-values: 0.7216256823227171
Average relative estimation error for z-values: 1.202467298579486
Average absolute estimation error for correlation values: 0.003948409074838416
Average relative estimation error for correlation values: 0.035579687445173605
Data points: 500
Workers: 5
Low rho: 0.1
High rho: 0.9
----
Round: 1... 2... 3... 4... 5... 6... 7... 8... 9... 10... 11... 12... 13... 14... 15... 16... Done!
----
True mu = 0.0
Estimated mu = -2.4669698323703853
True sigma = 1.0
@ipeirotis
ipeirotis / hourly-activity-percentages-odesk.R
Created June 21, 2012 19:42
Creating a smoothed activity plot
library(RPostgreSQL)
library(sqldf)
library(KernSmooth)
# Connect to the database
drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, dbname='odw', host='localhost', user='panos', password='password', port='12345')
# Retrieve the data from the database.
# Query columns: active_contractors, total_contractors, percent_activity, local_dayoftheweek, local_hour, country