Skip to content

Instantly share code, notes, and snippets.

View jboynyc's full-sized avatar
🍜

John Boy jboynyc

🍜
View GitHub Profile
@jboynyc
jboynyc / update_models.py
Created February 9, 2023 15:28
update spacy models in nixpkgs
#!/usr/bin/env nix-shell
#! nix-shell -i python3 -p "python3.withPackages (p: with p; [sh tqdm])"
"""
Collect metadata on spaCy language models of a particular release to update the
models.json file in nixpkgs/pkgs/development/python-modules/spacy
Run this script in the meta dir of the spacy-models repository, providing the
desired release number as its only argument.
"""
@jboynyc
jboynyc / aamachine.nix
Last active March 7, 2024 22:09
nix derivation for Dialog
with import <nixpkgs> {};
let
aamachineSrc = fetchzip {
url = "https://hd0.linusakesson.net/files/aamachine-0.5.4.zip";
sha256 = "sha256-TDAwcNwGW4GMNv8e3VuKbNMSYLHDIQNlc4REQb+FRvw=";
};
aamachineVersion = "0.5.4";
in
stdenv.mkDerivation {
@jboynyc
jboynyc / Makefile
Last active October 28, 2022 20:36
sphinx + bib minimal example
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
"AwardNumber","Title","NSFOrganization","Program(s)","StartDate","LastAmendmentDate","PrincipalInvestigator","State","Organization","AwardInstrument","ProgramManager","EndDate","AwardedAmountToDate","Co-PIName(s)","PIEmailAddress","OrganizationStreet","OrganizationCity","OrganizationState","OrganizationZip","OrganizationPhone","NSFDirectorate","ProgramElementCode(s)","ProgramReferenceCode(s)","ARRAAmount","Abstract"
"2026631","RAPID: Real time monitoring of information consumption regarding the coronavirus","SES","AIB-Acctble Institutions&Behav, Decision, Risk & Mgmt Sci, Sociology, Methodology, Measuremt & Stats, Secure &Trustworthy Cyberspace","04/15/2020","04/06/2020","David Lazer","MA","Northeastern University","Standard Grant","Toby Parcel","03/31/2021","$200,000.00","Alessandro Vespignani, Briony Swire-Thompson","d.lazer@neu.edu","360 HUNTINGTON AVE","BOSTON","MA","021155005","6173733004","SBE","120Y, 1321, 1331, 1333, 8060","025Z, 065Z, 096Z, 7434, 7914, 9179","$0.00","The COVID-19 pandemic has highlig
@jboynyc
jboynyc / git-commits-graph.py
Created January 23, 2022 15:49
Create a bar chart showing monthly commits to a Git repository over time
import altair as alt
import pandas as pd
from pydriller import Repository
repo_dates = []
for commit in Repository('/path/to/repository').traverse_commits():
repo_dates.append(commit.committer_date)
d = pd.DataFrame(dict(commit_date=pd.to_datetime(repo_dates, utc=True), commits=1))
@jboynyc
jboynyc / weborf.nix
Created March 17, 2021 11:51
nix derivation for weborf
with import <nixpkgs> {};
let
name = "weborf";
version = "0.17";
in
stdenv.mkDerivation {
name = "${name}";
configureFlags = [ "prefix=${placeholder "out"}" ];
@jboynyc
jboynyc / shell.nix
Created March 11, 2021 09:59
Running r-cade on NixOS
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "r-cade";
buildInputs = [ racket openal csfml libsndfile ];
LD_LIBRARY_PATH="${csfml}/lib:${libsndfile}/lib:${openal}/lib";
shellHook = ''
raco pkg install r-cade
'';
}
@jboynyc
jboynyc / 01-znc-containerized.md
Last active December 10, 2020 09:40
How to run ZNC and weechat-headless in containers
$ cat ~/.local/share/systemd/user/znc.service
[Unit]
Description=ZNC user server
After=network.target

[Service]
@jboynyc
jboynyc / aaa_prez.csv
Created July 8, 2020 15:20
textnets workshop example
We can't make this file beautiful and searchable because it's too large.
president,term,bio
William John McGee,1902–1904,"William John McGee, LL.D. (April 17, 1853 – September 4, 1912) was an American inventor, geologist, anthropologist, and ethnologist, born in Farley, Iowa.
== Biography ==
While largely self-taught, McGee attended a rural one-room schoolhouse north of Farley during the four winter months from about 1858 to 1867. He devoted his early years to reading law and to surveying. He invented and patented several improvements on agricultural implements.He subsequently turned his attention to geology. In 1877–1881, he executed a topographic and geological survey of 17,000 square miles (44,030 km²) in northeastern Iowa. He then undertook an examination of the loess of the Mississippi Valley, researched the great Quaternary lakes of Nevada and California and studied a recent fault movement in the middle Atlantic slope.He was appointed geologist for the United States Geological Survey (USGS) in 1881. In 1884 McGee authored the article Map of the United States exhibiting th
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.