Skip to content

Instantly share code, notes, and snippets.

View lethargilistic's full-sized avatar

Michael MacTaggert lethargilistic

View GitHub Profile
@lethargilistic
lethargilistic / publishers-weekly-single.py
Last active April 27, 2020 05:04
Scrape a single issue from Publishers Weekly's archive
import os
#pip dependencies
import requests
from PyPDF2 import PdfFileMerger
#-----------
#Change these values to...
SCRAPE_YEAR = 1892 #Select the year you wish to scrape. 1923 and before is public domain.
SCRAPE_MONTH = 1
@lethargilistic
lethargilistic / publishers-weekly-year.py
Last active April 27, 2020 05:08
Scraper for a year of the Publishers Weekly archive. Outputs each issue for one year as PDFs. Change global variables to configure.
import os
from calendar import weekday, monthrange, SATURDAY
#dependencies from pip
import requests
from PyPDF2 import PdfFileMerger
#-----------
#Change these values to...
SCRAPE_YEAR = 1892 #Select the year you wish to scrape. 1923 and before is public domain.
@lethargilistic
lethargilistic / librivox.csv
Created June 5, 2019 20:38
All of the audiobooks recorded by Librivox contributors as of June 5, 2019. Compiled with the Internet Archive API. Removed MB4 collections and CD cover images.
We can't make this file beautiful and searchable because it's too large.
publicdate,title,creator,identifier
8/19/2005 7:27,Librivox Background,Hugh McGuire,librivoxbackgroundaug_19_2005
10/12/2005 14:48,"An International Episode, by Henry James",Henry James,international_episode
10/17/2005 14:04,The Call of the Wild,Jack London,call_of_the_wild
10/17/2005 14:21,"The Road to Oz, by L. Frank Baum",L. Frank Baum,road_to_oz
10/19/2005 14:15,Notes from the Underground,Fyodor Dostoyevsky,notes_from_the_underground
10/19/2005 14:17,"Psmith in the City, by P.G. Wodehouse",P.G. Wodehouse,psmith_in_the_city
10/20/2005 12:34,Frankenstein,Mary W. Shelley,frankenstein_shelley
10/27/2005 15:27,"Old Christmas, by Washington Irving",Washington Irving,oldchristmas
10/30/2005 8:52,"The Secret Agent, by Joseph Conrad",Joseph Conrad,secretagent

Changes to GitHub

  • Add a server-rules repo to the progdisc GitHub.
  • The server rules could be one file, the README, or could be split into topic files.
    • I anticipate we may use one file for the rules and perhaps another for samwho's server mantras if we want those.
    • See also, maybe a code of conduct if we adopt one. There is a whole class of official documentation that we could store here.

Changes to #welcome

@lethargilistic
lethargilistic / AllJustices.wiki
Created April 5, 2018 21:44
Wikimarkup for a template showing all Justices on Supreme Court over time

Chief Justice

@lethargilistic
lethargilistic / associate.wiki
Last active April 5, 2018 20:30
An example output of my script for {{if between}} for Chief Justices
{{if between
| input = {{{1|}}}
| start = October 5, 1789
| end = February 1, 1790
| output = [[James Wilson]]
}}
{{if between
| input = {{{1|}}}
| start = February 2, 1790
| end = February 14, 1790
@lethargilistic
lethargilistic / SeriesStatus.py
Last active November 7, 2016 07:15
POC for something we shouldn't do. is_anime could come from the API call, I think.
class _SeriesStatus:
def __init__(self, is_anime):
self.is_anime = is_anime
def __repr__(self):
return '{}(is_anime={})'.format(self.__class__.__name__, self.is_anime)
def __str__(self):
if self.is_anime:
return self.anime_string