Tested with a fresh Ubuntu 16.04.1 LTS
$ sudo apt-get install default-jre
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
csv2xml.py | |
Created by Justin van Wees on 2011-04-18. | |
""" | |
import sys | |
import os | |
import string |
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/' |
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 |
# 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] |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""This module's docstring summary line. | |
This is a multi-line docstring. Paragraphs are separated with blank lines. | |
Lines conform to 79-column limit. | |
Module and packages names should be short, lower_case_with_underscores. | |
Notice that this in not PEP8-cheatsheet.py |
<?php //origin: http://www.if-not-true-then-false.com/2012/php-pdo-sqlite3-example/ | |
// Kludges | |
const SQLITE3_TEXT = PDO::PARAM_STR; | |
const SQLITE3_INTEGER = PDO::PARAM_INT; | |
// Set default timezone | |
date_default_timezone_set('UTC'); | |
try { |
""" | |
A script for downloading some podcasts and tagging the files so I can import them to iTunes. | |
""" | |
import pycurl | |
import os.path | |
import sys | |
from BeautifulSoup import BeautifulStoneSoup | |
import eyed3 |
import os | |
import glob | |
dirpath = os.path.dirname(__file__) | |
filecount = 0 | |
for filename in glob.glob(os.path.join(dirpath, '*.RAF')): | |
print("processing: {}".format(filename)) | |
fh = open(filename, "r+b") | |
fh.seek(368) |