This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given a list of words, remove any that are | |
# in a list of stop words. | |
def removeStopwords(wordlist, stopwords): | |
return [w for w in wordlist if w not in stopwords] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JENA_FUSEKI_VERSION=3.7.0 | |
export JENA_HOME=~/opt/apache-$JENA_FUSEKI_VERSION | |
export FUSEKI_HOME=~/opt/apache-jena-fuseki-$JENA_FUSEKI_VERSION | |
export FUSEKI_BASE=~/opt/apache-jena-fuseki-$JENA_FUSEKI_VERSION | |
export JENA_BASE=~/opt/apache-jena-$JENA_FUSEKI_VERSION | |
export JENA=~/opt/apache-jena-$JENA_FUSEKI_VERSION | |
export FUSEKI=~/opt/apache-jena-$JENA_FUSEKI_VERSION | |
export FUSEKIROOT=~/opt/apache-jena-fuseki-$JENA_FUSEKI_VERSION | |
export JENAROOT=~/opt/apache-jena-$JENA_FUSEKI_VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
# We've now imported the two packages that will do the heavy lifting | |
# for us, reqeusts and BeautifulSoup | |
# Let's put the URL of the page we want to scrape in a variable | |
# so that our code down below can be a little cleaner | |
url_to_scrape = 'http://apps2.polkcountyiowa.gov/inmatesontheweb/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
csv2xml.py | |
Created by Justin van Wees on 2011-04-18. | |
""" | |
import sys | |
import os | |
import string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
time_stamp=$(date +%Y-%m-%d) | |
mkdir -p ~/Backup/Downloads/$time_stamp | |
mv ~/Downloads/* ~/Backup/Downloads/$time_stamp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
time_stamp=$(date +%Y%m%d) | |
mkdir -p ~/Backup/Desktop/$time_stamp | |
mv ~/Desktop/* ~/Backup/Desktop/$time_stamp |
Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)
This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git-random(){ gitRan=$(curl -L -s http://whatthecommit.com/ |grep -A 1 "\"c" |tail -1 |sed 's/<p>//'); git commit -S -m "$gitRan"; } | |
if [ -z "$1" ]; then | |
git add --all . | |
git-random | |
else | |
git add --all . | |
git commit -S -m "$*" |