Skip to content

Instantly share code, notes, and snippets.

View josefslerka's full-sized avatar

Josef Šlerka josefslerka

View GitHub Profile
<?xml version='1.0' encoding='UTF-8'?>
<gexf xmlns="http://gexf.net/1.3" version="1.3" xmlns:viz="http://gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd">
<meta lastmodifieddate="2023-05-25">
<creator>Gephi 0.10.1</creator>
<title></title>
<description></description>
</meta>
<graph defaultedgetype="directed" mode="static">
<attributes class="node" mode="static">
<attribute id="v_name" title="name" type="string"/>
library(geniusR)
library(tidyverse)
library(tidytext)
album_texty <- genius_album(artist = "The Doors", album = "The Doors")
tidy_album <- album_texty %>%
unnest_tokens(word,lyric) %>%
anti_join(stop_words)
# https://github.com/pablobarbera/Rfacebook
install.packages("devtools")
library(devtools)
install_github("pablobarbera/Rfacebook/Rfacebook")
library(Rfacebook)
# developers.facebook.com/tools/explorer/
token <- " --- here push your token ---"
me <- getUsers("me", token, private_info=TRUE)
# https://www.analyticsvidhya.com/blog/2017/03/beginners-guide-on-web-scraping-in-r-using-rvest-with-hands-on-knowledge/
library('rvest')
url <- 'http://www.imdb.com/search/title?count=300&release_date=2016,2016&title_type=feature'
webpage <- read_html(url)
rank_data_html <- html_nodes(webpage,'.text-primary')
#Converting the ranking data to text
rank_data <- html_text(rank_data_html)
https://slerka.shinyapps.io/fansstructure/
https://slerka.shinyapps.io/postoverlapnew/
https://slerka.shinyapps.io/persons-viewer/
https://slerka.shinyapps.io/matrix-viewer/
@josefslerka
josefslerka / 0_reuse_code.js
Created June 6, 2017 12:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// Image Montage v.2
// January 26, 2014
// Developed by Lev Manovich, Matias Giachino, and Jay Chow / softwarestudies.com
// this version:
// 1) user defines width and height of the montage
// 2) scales images vertically to the same size defined by the user - n_width (like in TiffViewer)
// 3) uses the full width of every image (after scaling), aligning them next to each other
// 4) error checking
// 5) 3 levels of label
https://www.facebook.com/stopmm/
https://www.facebook.com/save.donbass.czechrepublic/?fref=ts
https://www.facebook.com/AC24.cz/?fref=ts
https://www.facebook.com/svobodnenovinyeu-240233692807752/
https://www.facebook.com/NewWorldOrderOppositionOrganization/?fref=ts
https://www.facebook.com/NewWorldOrderOppositionOrganization/?fref=ts
https://www.facebook.com/svetkolemnas.info/?fref=ts
https://www.facebook.com/protiproud.cz/?fref=ts
https://www.facebook.com/cz.sputnik/?fref=ts
https://www.facebook.com/FreePub.cz/?fref=ts
library(parallel)
dfUsers <- read.csv("xxx_users.csv")
x <- cbind(x = as.vector(dfUsers$name))
numWorkers <- 8
Sys.time()
res <- mclapply(x, whatGender,mc.cores = numWorkers)
Sys.time()
dfGender <-do.call("rbind", res)
Sys.time()
require(httr)
full_url <- oauth_callback()
full_url <- gsub("(.*localhost:[0-9]{1,5}/).*", x=full_url, replacement="\\1")
print(full_url)
library(instaR)
app_id <- ""
app_secret <- ""
token <- instaOAuth(app_id, app_secret)