Skip to content

Instantly share code, notes, and snippets.

View christopherkullenberg's full-sized avatar

Christopher Kullenberg christopherkullenberg

View GitHub Profile
def pdfparser(fn):
import subprocess
'''Requires pdftotext to be installed on the system. Please change directories
accordingly.'''
f = "upload/" + fn # fn is the filename. upload/ is a directory, pls change.
cmd = 'python3 upload/pdf2txt.py -o %s.txt %s' % (f.split('.')[0], f)
run = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = run.communicate()
# display errors if they occur
#if err:
from subprocess import Popen, PIPE, STDOUT
from nltk.tokenize import sent_tokenize #make sure to install the full corpus.
import re
aFile = '/home/christopher/Desktop/Introduction to Computation and Programming Using Python, Revised - Guttag, John V..pdf'
def pdftoText(filename):
'''
Input: a PDF file
Output: output of pdftotext.
@christopherkullenberg
christopherkullenberg / searchaltmedia.ipynb
Created January 11, 2017 20:55
Search Alt (Right) Media
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@christopherkullenberg
christopherkullenberg / monad.ipynb
Created July 22, 2017 20:21
A little network analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@christopherkullenberg
christopherkullenberg / texlinkstomdlinks.py
Created November 22, 2017 13:37
Latex links to markdown links
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am christopherkullenberg on github.
  • I am christopherk (https://keybase.io/christopherk) on keybase.
  • I have a public key ASDboeD8TeJEQ73WqCMqh2GOG5qZyAilttRdIbkO0hQgEQo

To claim this, I am signing this object: