Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import urllib
import libxml2
import os
import xml.etree.ElementTree as ET
import subprocess
#print subprocess.call(["ls", "-l", "/etc/resolv.conf"])
#!/usr/bin/env python
import urllib
import libxml2
import xml.etree.ElementTree as ET
OAI_URL = "http://services.kb.nl/mdo/oai?verb=GetRecord&metadataPrefix=didl&identifier=DDD:ddd:%s:mpeg21"
SRU_URL = "http://jsru.kb.nl/sru/sru?x-collection=DDD_krantnr&operation=searchRetrieve&startRecord=1&maximumRecords=1000000&recordSchema=ddd&query=ppn=%s"
#!/usr/bin/env python
import urllib
import libxml2
import os
import xml.etree.ElementTree as ET
import subprocess
#print subprocess.call(["ls", "-l", "/etc/resolv.conf"])
#!/usr/bin/env python
import os
import sys
import datetime
import socket
import nmap
from pprint import pprint
#!/usr/bin/env python
import os
import time
import urllib2
import Image
import ImageOps
t=str(time.time()).split('.')[0]
images = ['http://www.scheveningenlive.nl/cam_1.jpg',
'http://www.scheveningenlive.nl/sport.jpg',
'http://www.scheveningenlive.nl/cam2.jpg',
@WillemJan
WillemJan / mysql_spam_scan1.py
Created November 9, 2014 22:01
kill mysql spam v0.1
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. module:: Fe2.tools.
"""
import os
import re
import sys
@WillemJan
WillemJan / mysql_spam_scan.py
Created November 9, 2014 22:02
kill mysql spam v0.0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:author: WillemJan Faber
:licence: LGPLv2 or LGPLv3.
:copyright: WillemJan Faber (2012 - 2013)
This program is licensed under the LGPLv2 or LGPLv3 license,
for more info see <http://www.gnu.org/licenses/>.
@WillemJan
WillemJan / detect_ocr_noise.py
Last active August 29, 2015 14:10
Detect ocr noise
#!/usr/bin/env python
# N-gram OCR evaluation
# Succeed hackathon 2014 (Alicante)
# Willem Jan Faber
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@WillemJan
WillemJan / Code2PDF
Created December 6, 2014 19:44
Code2PDF by Joshua Steiner
#!/bin/bash
check_for_deps(){
type -P a2ps &>/dev/null || { echo "a2ps was not found. Install package \"a2ps\" on Debian or equivalent."; exit 1; }
type -P ps2pdf &>/dev/null || { echo "a2ps was not found. Install package \"ghostscript\" on Debian or equivalent."; exit 1; }
}
check_exists(){
if [ ! -f $1 ]; then
echo "File \"$1\" is missing."
#!/usr/bin/env python2.6
"""
Factbook2Couchdb, moves the content of the CIA factbook into your local
couch, now relax.
Copyright (C) 2009 Faber, Willem Jan
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or