Skip to content

Instantly share code, notes, and snippets.

View aparrish's full-sized avatar

Allison Parrish aparrish

View GitHub Profile
@aparrish
aparrish / predictive-text-concatenated-word-vectors.ipynb
Created July 18, 2018 22:24
Predictive text with concatenated word vectors. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / twitterbot.md
Last active May 23, 2022 01:03
Make-A-Twitter-Bot Workshop
@aparrish
aparrish / environment.yml
Last active April 2, 2022 19:20
Flat, randomness, curves, asemic writing
name: rwet
channels:
- conda-forge
dependencies:
- python
- numpy
@aparrish
aparrish / spacy-extraction-medley.ipynb
Created August 1, 2019 20:10
Example code for extracting things with spacy and writing them out to text files and then reading them in again.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / index.md
Last active December 2, 2021 13:26
Writing Poetry with Procedure: A Workshop

Writing Poetry with Procedure: A Workshop

Led by Allison Parrish

Description

Practitioners in the field of procedural writing have been using rules, procedures and computer programs to create innovative literary work since the invention of the digital computer. Far from the bland imitation evoked by the phrase "computer-generated poetry," these techniques facilitate the creation of work with aesthetic and emotional affordances sometimes difficult to achieve through conventional compositional techniques: serendipitous beauty, precisely imitative satire, vertiginous wonder at the infinite. In this workshop, participants will learn about the history of computer-generated writing and sample a range of off-the-shelf, freely-available tools on the web to create their own—without writing any actual lines of code. No previous programming experience is required.

Outline

@aparrish
aparrish / bot_basics_in_node.ipynb
Created February 1, 2017 02:50
Bot Basics in Node
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / moby-dick-minimalist-synonym.txt
Last active November 4, 2021 13:53
Moby Dick with every word replaced at random by another word that occurred in the same 1-word context window. More information: https://github.com/NaNoGenMo/2019/issues/97
MOBY DICK;
OR THE WHALE
by Herman Melville
CHAPTER III. Loomings
@aparrish
aparrish / chatbot.ipynb
Last active October 29, 2021 22:46
Semantic similarity chatbot (take 2).
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / index.md
Last active April 7, 2021 14:37
aparrish workshop for machine literacy at sfpc

Introduction to Natural Language Processing and Word Vectors

Nothing is more essentially human than linguistic communication. But when programmers, data scientists, and computational linguists work with language, the abstractions they work with sometimes don't line up with your intuitive understanding of spelling and grammar. In this workshop, we'll investigate the state of the art of natural language processing, including: a whirlwind tour of spaCy for parsing English into syntactic constituents; a discussion of techniques for classifying and summarizing documents; and an explanation and demonstration of "word vectors" (like Google's word2vec), an innovative language technology that allows computers to process written language less as discrete units and more like a continuous signal. Workshop participants will develop a number of small projects in text analysis and poetics using a public domain text of their choice. In becoming familiar with contemporary techniques for computational language analysis, cri

@aparrish
aparrish / three_legged_oauth_helper.py
Created January 14, 2013 04:38
interactive python script to assist in getting access tokens for OAuth v1 APIs. requires python's OAuth2 library (pip install oauth2)
# an interactive python script to assist in getting access tokens for OAuth v1
# APIs. requires python's OAuth2 library (pip install oauth2)
#
# run from the command line like so:
#
# $ python three_legged_oauth_helper.py --consumer_key=<ckey> \
# --consumer_secret=<csecret> \
# --request_token_url=<request_token_url> \
# --authorize_url=<authorize_url> \
# --access_token_url=<access_token_url>