Skip to content

Instantly share code, notes, and snippets.

View ulfaslak's full-sized avatar
🐝
modeling modeling

Ulf Aslak ulfaslak

🐝
modeling modeling
View GitHub Profile
source target weight
1 258 2
1 459 2
1 324 2
1 422 2
1 392 2
1 11 2
2 106 2
2 491 2
2 146 2
{
"nodes": [
{"id": "Myriel", "group": 1, "size": 31},
{"id": "Napoleon", "group": 1, "size": 1},
{"id": "Mlle.Baptistine", "group": 1, "size": 17},
{"id": "Mme.Magloire", "group": 1, "size": 19},
{"id": "CountessdeLo", "group": 1, "size": 1},
{"id": "Geborand", "group": 1, "size": 1},
{"id": "Champtercier", "group": 1, "size": 1},
{"id": "Cravatte", "group": 1, "size": 1},
@ulfaslak
ulfaslak / .nbopen
Created January 9, 2019 08:50
nbopen minimal
function nbopen(){
# For this function to work, in .jupyter/jupyter_notebook_config.py, set `c.NotebookApp.notebook_dir = '/'` so notebook always launches from root
if [ $# -eq 0 ] ; then
if lsof -Pi :8888 -sTCP:LISTEN -t > /dev/null ; then
echo "A Jupyter Notebook is already open on port 8888"
else
jupyter notebook --port 8888
fi
else
if [ "${1:0:1}" != "/" ] ; then
Twitter data around tweets with hashtags #fv19, #ft19 and #dkpol.
We can't make this file beautiful and searchable because it's too large.
source,target,datetime,id
13_Robespierre,24NYTdk,2019-05-06 14:32:32+00:00,1125408005078564865
13_Robespierre,AnneDanmark,2019-05-08 09:44:43+00:00,1126060349910859777
13_Robespierre,H38GE,2019-05-12 13:33:07+00:00,1127567381214183425
13_Robespierre,HappiSabi,2019-05-16 23:51:22+00:00,1129172519926337536
13_Robespierre,JalehTavakoli,2019-06-05 09:38:18+00:00,1136205595810381824
13_Robespierre,Kartoffelploven,2019-05-09 09:49:21+00:00,1126423906418610178
13_Robespierre,RasmusPaludan,2019-05-09 09:07:34+00:00,1126413390816133120
13_Robespierre,RasmusPaludan,2019-05-14 20:27:53+00:00,1128396535841075204
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ulfaslak
ulfaslak / main.py
Created January 10, 2024 14:37
Sphinx Documentation Scraper
import requests as rq
import os
from bs4 import BeautifulSoup
from urllib.parse import urljoin
BASE_URL = "https://www.pymc.io/projects/docs/en/stable/"
# BASE_URL = "https://www.pymc.io/projects/examples/en/latest/"
PAGES_CRAWLED = 0