<commit_before>#!/bin/sh

operation=`basename $0|sed -e 's/.sh$//'|tr "a-z" "A-Z"`

if [ "REPROCESSING" != "$operation" -a "PROCESSING" != "$operation" -a "CALCULATE" != "$operation" -a "RECALCULATE" != "$operation" ]
then
	echo "Unknown operation: $operation"
	exit -1
fi

if [ "-h" = "$1" -o "--help" = "$1" ]; then

: <<=cut

=head1 NAME

	`basename $0` - resets a job to reprocessing state

=head1 SYNOPSIS

	`basename $0` <jobnames, expected to be file- or directory names>

=head1 DESCRIPTION

	Whenever an upload to the database of a particular file was considered
	to be problematic, it is not unlikely that the computation of that file should
	be reperformed or some sort. This script presents the SQL to perform
	an update of the status to '$operation'.

=head1 EXAMPLE

	`basename $0` . | mysql -h eqtl.org

=head1 AUTHOR

	<NAME><ouml>ller <<EMAIL>>

=head1 COPYRIGHT

	University of LE<uuml>beck, 2009

=cut
	pod2man $0 | nroff -man | less
	exit 1;
fi

function doit {
	for f in $*
	do
		probesetid=`zcat $f | head -n 1 | cut -f1 -d\) | cut -f2 -d\(`
		if [ -z "$probesetid" ]; then
			echo '# Skippted because of format: $f'
			continue;
		fi
		echo "update computation set status='$operation' where jobname='$f';"
	done
}

for i in $*
do
	if [ -d "$i" ]; then
		doit `find "$i" -name "*.csv.gz"`
	else
		if ! echo "$i" | egrep -q '.csv.gz$'; then
			echo "# Skipped since filename did not match *.csv.gz"
			continue
		else
			doit "$i"
		fi<commit_msg>Omitting path for jobname specification<commit_after>#!/bin/sh

operation=`basename $0|sed -e 's/.sh$//'|tr "a-z" "A-Z"`

if [ "REPROCESSING" != "$operation" -a "PROCESSING" != "$operation" -a "CALCULATE" != "$operation" -a "RECALCULATE" != "$operation" ]
then
	echo "Unknown operation: $operation"
	exit -1
fi

if [ "-h" = "$1" -o "--help" = "$1" ]; then

: <<=cut

=head1 NAME

	`basename $0` - resets a job to reprocessing state

=head1 SYNOPSIS

	`basename $0` <jobnames, expected to be file- or directory names>

=head1 DESCRIPTION

	Whenever an upload to the database of a particular file was considered
	to be problematic, it is not unlikely that the computation of that file should
	be reperformed or some sort. This script presents the SQL to perform
	an update of the status to '$operation'.

=head1 EXAMPLE

	`basename $0` . | mysql -h eqtl.org

=head1 AUTHOR

	<NAME><ouml>ller <<EMAIL>>

=head1 COPYRIGHT

	University of LE<uuml>beck, 2009

=cut
	pod2man $0 | nroff -man | less
	exit 1;
fi

function doit {
	for f in $*
	do
		probesetid=`zcat $f | head -n 1 | cut -f1 -d\) | cut -f2 -d\(`
		if [ -z "$probesetid" ]; then
			echo '# Skippted because of format: $f'
			continue;
		fi
		echo "update computation set status='$operation' where jobname='`basename $f`';"
	done
}

for i in $*
do
	if [ -d "$i" ]; then
		doit `find "$i" -name "*.csv.gz"`
	else
		if ! echo "$i" | egrep -q '.csv.gz$'; then
			echo "# Skipped since filename did not match *.csv.gz"
			continue
		else
			doit "$i"
		fi
{'fraction_non_alphanumeric': 0.14867137571476624, 'fraction_numerical': 0.015472586612848975, 'mean_word_length': 3.322674418604651, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7233207', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1104, 'n_words': 406}