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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>D3 Test</title> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<style type="text/css"> | |
.axis path, | |
.axis line { | |
fill: none; |
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
#short version of this GIST https://gist.github.com/3980277 | |
library("ReadImages") | |
library("reshape") | |
library("ggplot2") | |
#detekce dominatnich barev | |
readImage <- read.jpeg("File5196.jpg") |
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
tbl <- read.csv("kv.csv", header=TRUE) | |
tbl <- subset(tbl, select = -X ) | |
d <- dist(tbl) | |
fit <- cmdscale(d,eig=TRUE, k=2) | |
nazev <- c("Fischer", "Sobotka", "Franz", "Roithová", "Fischerová", "Dientsbier", "Schwarzenberg","Zeman") | |
x <- fit$points[,1]*(-1) | |
y <- fit$points[,2] | |
plot(x, y, xlab="levice - pravice", ylab="konzervativni - liberalni", | |
main="Podobnost kandidátů podle postojů", type="n", ylim=c(-6,6), xlim=c(-6,6)) | |
text(x, y, labels = nazev) |
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
# | |
# | |
# https://sites.google.com/site/genbiovis/code/network | |
# | |
# natazeni knihovny | |
library(tm) | |
# nacteni korpusu |
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
# Normalized Compression Distance | |
# http://en.wikipedia.org/wiki/Normalized_Compression_Distance | |
# Quick and dirty implementation | |
ncd <- function(file1, file2) { | |
both <- "" | |
file1 <- toString(file1) | |
file2 <- toString(file2) | |
comp1 <- memCompress(file1, type=c(c("bzip2"))) |
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
library(tm) | |
library(textcat) | |
library(tm) | |
library(tau) | |
library(openNLP) | |
inspect(havel[1:2]) | |
havel[[1]] #pristup ke konkretnimu dokumentu |
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 'tweetstream' | |
require "serialport" | |
TweetStream.configure do |config| | |
config.consumer_key = 'xxxx' | |
config.consumer_secret = 'xxxx' | |
config.oauth_token = 'xxxx' | |
config.oauth_token_secret = 'xxxx' | |
config.auth_method = :oauth | |
end |
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
Pocet shares na Twitteru | |
http://urls.api.twitter.com/1/urls/count.json?url= | |
Pocet shares na LinkedInu | |
http://www.linkedin.com/countserv/count/share?url=http://www.klaboseni.cz&format=json | |
Pocet shares na Facebooku | |
http://graph.facebook.com/?id=http://www.klaboseni.cz | |
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
if(substring(value,0,3)=="RT ", substring(value,3), value) | |
value.replace(/^RT @\w+:/,' ') |
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
[ | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column Visual Properties", | |
"columnName": "Visual Properties" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column Column2", | |
"columnName": "Column2" |