This file contains 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 | |
# -*- coding: utf-8 -*- | |
# Author: Arne Neumann | |
# | |
# Purpose: extracts sentences from a Tiger XML input file and writes | |
# them to an output file (one word per line with an empty line | |
# between sentences). | |
import sys | |
import codecs |
This file contains 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 | |
import sys | |
import os | |
try: | |
from setuptools import setup | |
except ImportError: | |
from distutils.core import setup | |
here = os.path.abspath(os.path.dirname(__file__)) |
This file contains 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 bash | |
# | |
# Script for migrating from epydoc to Sphinx style docstrings. | |
# | |
# WARNING: THIS SCRIPT MODIFIES FILES IN PLACE. BE SURE TO BACKUP THEM BEFORE | |
# RUNNING IT. | |
# | |
# Forked from: https://gist.github.com/Kami/6734885 | |
DIRECTORY=$1 |
This file contains 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
# -*- coding: utf-8 -*- | |
# #!/usr/bin/python | |
# Titel: rst.py | |
# Discription: prints a rst tree as table | |
# Lizenz: GPLv3 | |
# Author: Andre Herzog | |
# vers.: 0.1c | |
# Date: 26.03.2014 | |
import sys |
This file contains 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 bash | |
url="$1" | |
wget -q "$url" | |
tarfile=${url##*/} # strip off the part before the last slash | |
dtrx "$tarfile" | |
dir=${tarfile%%.*} # strip off everything after the first dot | |
cd "$dir" | |
ls | |
# TODO: stay in $dir after the script ends |
This file contains 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 | |
# decour2paula.py: convert a DeCour XML file into a PAULA XML document | |
# usage: decour2paula.py decour_file paula_output_folder | |
import sys | |
from discoursegraphs.readwrite import DecourDocumentGraph | |
from discoursegraphs.readwrite import write_paula | |
if __name__ == '__main__': | |
ddg = DecourDocumentGraph(sys.argv[1]) |
This file contains 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
# code adapted from Lukasz Komsta's grubbs.test | |
# outlier value ("o" in grubbs.test) is stored in $outlier_value | |
# row name of the outlier ("G" in grubbs.test) is stored in $outlier_rowname | |
find_one_outlier <- function (x, opposite = FALSE) | |
{ | |
DNAME <- deparse(substitute(x)) | |
x <- sort(x[complete.cases(x)]) | |
n <- length(x) |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
# Author: Arne Neumann | |
# | |
# Purpose: prints the path where the given Python package is installed. | |
# This might be interesting if you're working with multiple environments | |
# and are unsure if/where a package was installed. | |
import os | |
import sys |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# restore_packages.R | |
# | |
# installs each package from the stored list of packages | |
# source: http://hlplab.wordpress.com/2012/06/01/transferring-installed-packages-between-different-installations-of-r/ | |
load("~/installed_packages.rda") | |
for (count in 1:length(installedpackages)) { | |
install.packages(installedpackages[count]) | |
} |
OlderNewer