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 selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.common.exceptions import NoSuchElementException | |
from bs4 import BeautifulSoup | |
import re | |
import pandas as pd | |
import os | |
import time | |
import csv |
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 os | |
import re | |
import oyaml | |
from git import Repo | |
from github import Github | |
from datetime import datetime, timedelta | |
URL_REGEX = r"""(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|Ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg |
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 count = 0; | |
var data ="" | |
function download(filename, text) { | |
var element = document.createElement('a'); | |
element.setAttribute('href', 'data:text/csv;charset=utf8,' + encodeURIComponent(text)); | |
element.setAttribute('download', filename); | |
element.style.display = 'none'; | |
document.body.appendChild(element); | |
element.click(); | |
document.body.removeChild(element); |
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 github import Github | |
import markdown | |
from markdown.treeprocessors import Treeprocessor | |
from markdown.extensions import Extension | |
import requests | |
import oyaml | |
import re | |
from xml.etree import ElementTree | |
import os | |
from urllib.parse import urlparse |
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 dblplib as dblp | |
import oyaml as yaml | |
def getAuthor(name): | |
ret = name | |
if 'arini' in name: | |
ret = '<ins><strong>'+str(name)+'</strong></ins>' | |
return ''.join(i for i in ret if not i.isdigit()).strip() # removing numbers and trimming spaces | |
#do a simple author search for michael ley | |
authors = dblp.search('Gabriele Marini') |
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(tidyverse) | |
library(patchwork) | |
## Read first 10000 digits of prime number! | |
prime <- read_csv(file="http://www.naturalnumbers.org/P-100000.txt", col_names=F) | |
names(prime) <- c("nth_prime","prime","int") ## int = interval from previous prime number | |
## Function to Draw Frlower | |
my_flower <- function(points=5000,num_colour=9,col_option="magma",angle=pi*(3-sqrt(5)), point_size=1,...){ | |
flower <- tibble( | |
n = c(1:points), ## number of points |
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
if(!requireNamespace("remotes", quietly = TRUE)) { install.packages("remotes") } | |
if(!requireNamespace("remotes", quietly = TRUE)) { install.packages("devtools") } | |
remotes::install_github("wkmor1/doi2bib", upgrade ="never") | |
remotes::install_github("ropensci/fulltext", upgrade ="never") | |
remotes::install_github("ropensci/bibtex", upgrade ="never") | |
devtools::install_github("quanteda/readtext", upgrade ="never") | |
remotes::install_github("ropensci/rcrossref", upgrade ="never") | |
remotes::install_github("ropensci/rplos") | |
remotes:install_github("ropensci/aRxiv") | |
remotes::install.packages("RecordLinkage") |
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 getRandomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
function encrypt(plaintext, key) { | |
let cyphertext = []; | |
// Convert to hex to properly handle UTF8 | |
plaintext = Array.from(plaintext).map(function (c) { |
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 json | |
import os | |
from datetime import datetime | |
import oyaml as yaml | |
from geopy.geocoders import Nominatim | |
from geopy.adapters import AioHTTPAdapter | |
import requests #to make TMDB API calls | |
import urllib.parse | |
class InstaPhoto: |
OlderNewer