Skip to content

Instantly share code, notes, and snippets.

View fljoly's full-sized avatar

François fljoly

View GitHub Profile
getqueries <- function (search_query, code_lang) {
packages <- c("XML", "httr")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
install.packages(setdiff(packages, rownames(installed.packages())))
}
# install.packages("pdftools")
library(pdftools)
test <- pdf_text(file.choose())
#option 1
# install.packages("tokenizers")
library(tokenizers)
tokenize_words(test)
@fljoly
fljoly / rdo_oxford_edges.csv
Created March 8, 2019 17:05
Blogpost: crawling with tidygraph
From To Weight Type
1 1 0 1
1 2 0 1
1 3 0 1
1 4 0 1
1 5 0 1
1 6 0 1
1 7 0 1
1 8 0 1
1 9 0 1
@fljoly
fljoly / rdo_oxford_edges.csv
Created March 8, 2019 17:05
Blogpost: crawling with tidygraph
1 1 0 1
1 2 0 1
1 3 0 1
1 4 0 1
1 5 0 1
1 6 0 1
1 7 0 1
1 8 0 1
1 9 0 1
@fljoly
fljoly / rdo_oxford_edges.csv
Created March 8, 2019 15:13
Blogpost: crawling with tidygraph
From To Weight Type
1 2 0 1
1 3 0 1
1 4 0 1
1 5 0 1
1 6 0 1
1 7 0 1
1 8 0 1
1 9 0 1
1 10 0 1
@fljoly
fljoly / google-product-english-switch-bookmarklet
Last active October 26, 2017 18:32 — forked from sgreenfield/gist:2802070
JavaScript updateQueryStringParameter
javascript: void((function() {
function updateQueryStringParameter(uri, key, value) {
var i = uri.indexOf('#');
var hash = i === -1 ? '' : uri.substr(i);
uri = i === -1 ? uri : uri.substr(0, i);
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
var separator = uri.indexOf('?') !== -1 ? "&" : "?";
if (uri.match(re)) {
uri = uri.replace(re, '$1' + key + "=" + value + '$2');
} else {
@fljoly
fljoly / tuf
Created November 10, 2010 09:46
wtf
i don't get it
@fljoly
fljoly / tuf
Created November 10, 2010 09:46
wtf
I don't get it
@fljoly
fljoly / tuf
Created November 10, 2010 09:44
haaaa
what is this thing?