Skip to content

Instantly share code, notes, and snippets.

Zihan Chen zchen24

Block or report user

Report or block zchen24

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
zchen24 /
Created Oct 23, 2016
Script used to extract all PDF file titles (from a conference) and put them into a txt file, which can be used to generate word cloud
#!/usr/bin/env python
from pdfrw import PdfReader
import glob
fobj = open('alltitles.txt', 'w') # output file
allpdf = glob.glob('./*.pdf') # assuming all PDF files in current dir
for fname in allpdf:
ipdf = PdfReader(fname)
title = ipdf.Info.get('/Title')
View wstool_aliases.bash
#!/usr/bin/env bash
# Set the workspace to the current directory
alias wspwd='export ROS_WORKSPACE=$(pwd)'
# Save the workspace used in this shell as the current workspace
alias wssave='echo -e "$ROS_WORKSPACE" > ~/.curws'
# Load the saved workspace into this shell
alias wsload='source $(cat ~/.curws)/setup.bash'
You can’t perform that action at this time.