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
from datadog import initialize, api | |
import json | |
TEMPLATE_DASHBOARD_ID = 227470 | |
options = { | |
'api_key': '**', | |
'app_key': '**' | |
} |
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
from datadog import initialize, api | |
import json | |
TEMPLATE_DASHBOARD_ID = 227470 | |
options = { | |
'api_key': '**', | |
'app_key': '**' | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
library(igraph) | |
###wget http://exposedata.com/marvel/data/hero-network.csv && mv hero-networks.csv source.csv | |
a<-read.table("~/marvel-class/source.csv",sep=",",stringsAsFactors=F) | |
a$V2<-paste(a$V2, "comic book") | |
g<-simplify(graph.data.frame(a,directed=T)) | |
#names<-V(g)$name | |
#g<-remove.vertex.attribute(g,"name") | |
#gb<-graph.bipartite(types=x,edges=c(t(get.edges(g,E(g))))) | |
x<-degree(g,mode="in")>0 |
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
library(RJSONIO) | |
library(ggplot2) | |
oo<-fromJSON("http://pregel.mat.upm.es/ErdosN500MC100.json") | |
data<-do.call(rbind,lapply(1:100,function(i){ | |
return(cbind(names(oo)[i],1:length(oo[[i]]),unlist(oo[[i]]))) | |
})) | |
mode(data)<-"numeric" | |
df<-data.frame(data) |
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
<?php | |
$checkin_url='http://eurocopa.cope.es/Eurocopa2012/eurocope/audios/especial-eurocopa'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $checkin_url); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true); | |
$result=curl_exec($ch); | |
#echo $result; |
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 sys,codecs | |
''' | |
format input sender recieverid #emails | |
format output relationship;#emails_AtoB;#emails_BtoA | |
''' | |
f=file("/dev/stdin") | |
for line in f: | |
line=line.split(";"); | |
from=line[0] | |
to=line[1] |
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 sys,codecs | |
''' | |
format emiter receiver contacts | |
example: 5767599 242682935 4 | |
''' | |
links={} | |
i=0 | |
f=file("/dev/stdin") |