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
exports.main = function() { | |
require("widget").Widget({ | |
id: "widgetID1", | |
label: "My Mozilla Widget", | |
contentURL: "http://www.mozilla.org/favicon.ico", | |
onClick: function(event) { | |
var XMLHttpRequest = require("xhr"); | |
var request = new XMLHttpRequest(); | |
request.open("GET", "http://www.myexperiment.org/search.xml?query=goble", false); |
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
var publ = document.querySelectorAll(".gs_a"); | |
var dl =[]; | |
for(i=0; i<publ.length; i++) { | |
var n = (publ[i].innerHTML).split("-"); | |
dl[i] = n[1]; | |
} | |
var result = {}, max = 0, res; | |
for(var v in dl) { | |
result[dl[v]] = (result[dl[v]] || 0) + 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
var publ = document.querySelectorAll(".gs_rt"); | |
var dl =[]; | |
for(i=0; i<publ.length; i++) { | |
var n = publ[i].textContent; | |
dl[i] = n; | |
} | |
console.log(dl); |
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
y1 <- read.csv(file="/Users/kristian/Documents/statementforR.csv",sep=",",head=TRUE) | |
#y2 <- y1[y1$item == 'LIDL UK MANCHESTER',] | |
y3 <- y1[grep("CASH", y1$item), ] | |
plot(as.Date(y1$date, format='%d/%m/%Y'),y1$debit,type="l", col="blue", xlab="Time", ylab="Debit", ylim=range(c(y1$debit,y2$debit)), xlim=range(c(as.Date(y1$date, format='%d/%m/%Y'),as.Date(y2$date, format='%d/%m/%Y')))) |
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
var json = | |
{ | |
"max":196419, | |
"buckets": | |
[ | |
{ | |
"d":1346835600, | |
"i": | |
[ | |
[ |
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
(function() { | |
var el=document.createElement('div'), | |
b=document.getElementsByTagName('body')[0], | |
otherlib=false, | |
msg=''; | |
el.style.position='fixed'; | |
el.style.height='32px'; | |
el.style.width='220px'; |
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
df <- data.frame( | |
coun) | |
profession.code <- c(`0` = 0, "1"="mexico", Accountants=2, Veterinarians=3, | |
`Financial analysts`=4, Nurses=5) | |
df$profession.str <- names(profession.code)[match(df$coun, profession.code)] |
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
wordSearch<- "problem" | |
i<-1 | |
files<-RQDAQuery("select file from source where status=1") | |
file<-files$file[i][1] | |
lines<- unlist(strsplit(file, "\n[ \t\n]*\n*")) | |
r<-grep(wordSearch, lines) |
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
# load required libraries | |
require(maps) | |
require(RColorBrewer) | |
# Create a dataframe with the reported observations | |
# get data from https://www.cia.gov/library/publications/the-world-factbook/rankorder/rawdata_2228.txt | |
# transform it to csv | |
r <- read.csv(file=paste0("/Dropbox/Data/rawdata_2228.csv"),sep=",",head=FALSE) | |
loc<-r$V2 | |
cases<-r$V3 |
OlderNewer