Skip to content

Instantly share code, notes, and snippets.

View JonathanReeve's full-sized avatar

Jonathan Reeve JonathanReeve

View GitHub Profile
@JonathanReeve
JonathanReeve / gatsby-characters-PCA.ipynb
Last active November 5, 2016 19:01
Gatsby Characters PCA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / spacy-experiments.ipynb
Created February 23, 2018 21:51
Spacy Experiments
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / word-embeddings.ipynb
Created August 6, 2018 21:09
Jonathan: word embeddings
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / dhsi-twitter-bot.py
Created June 5, 2019 14:57
The Twitter Bot "Alternate DHSIs," which finds DHSI initialisms from Project Gutenberg texts.
import re
import requests
import json
import time
import tweepy
from secrets import *
# This requires that you have a file, secrets.py
# Which contains the keys below.
@JonathanReeve
JonathanReeve / data-wrangling.py
Created June 7, 2019 16:40
Getting data from a COPAC XML record
recordsList = parsedXml['modsCollection']['mods']
years = []
for record in recordsList:
originList = record['originInfo']
for origin in originList:
if 'dateIssued' in origin:
years.append(origin['dateIssued'])
sudo su
mount /dev/nvme0n1p5 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts pts /mnt/dev/pts/
pacman -Sy
pacman -S efibootmgr gosfstools grub
modprobe efivarfs
#Musicians or singers that have a genre containing 'rock'
SELECT DISTINCT ?human ?humanLabel
WHERE
{
VALUES ?professions {wd:Q177220 wd:Q639669}
?human wdt:P31 wd:Q5 .
?human wdt:P106 ?professions .
?human wikibase:statements ?statementcount .
?human wdt:P1303 wd:Q128309 .
FILTER (?statementcount > 10 ) .