code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/dis/sh
load std
if {~ $#* 0} {
echo usage: runns path0 path1 ... pathn
raise usage
}
grid/register -a resource Namespace 'grid/srv/ns '^$"* | grid/srv/monitor 1 'Namespace'
| Shell |
#!/dis/sh.dis
load std
port=$1
DIR=/dis/demo/lego
pctl forkns newpgrp
cd $DIR
if { firmdl $port /dis/demo/lego/styx.srec } {
legolink $port
memfs /tmp
cd /tmp
mount -o -A /net/legolink /n/remote
$DIR/clockface /n/remote
echo reset > clockface
grid/register -a resource Robot -a name 'Lego Clock' {export /tmp}
}... | Shell |
#!/dis/sh
mount -A {demo/camera/camera.dis -v 2 -p 0} /n/remote
| Shell |
#!/dis/sh
grid/register -a resource Camera -a name Y2K -a model 'Kodak DC260' -a 'Image resource' 1 {demo/camera/camera.dis -v 2 -p 0 -n Y2K -f /dis/demo/camera/tkinterface.dis -f /dis/demo/camera/readjpg.dis -f /dis/demo/camera/camload.bit -f /dis/demo/camera/camproc.bit}
| Shell |
#!/dis/sh
fn bindfs {
# this may be useful as a general purpose cmd
(mntpt dirs)=$*
memfs $mntpt
for d in $dirs {
parts=${split / $d}
fpath=''
for p in $parts {
fpath=$fpath^/^$p
if {! ftest -e $mntpt^$fpath} {
if {ftest -d $fpath} {
mkdir $mntpt^$fpath
} {
if {! ftest -e $fpath} {
... | Shell |
#!/dis/sh
mount -A {auxi/odbcmnt -a tcp!200.1.1.113} /mnt/odbc
fn splitrun {
if {! ~ $#* 0} {
(hd tl) = $*
echo Registering $hd
grid/register -a resource ODBC -a name $hd '{export /mnt/odbc/'^$hd^'}'
splitrun $tl
}
}
cd /mnt/odbc
sources=`{ls}
splitrun $sources
| Shell |
#!/dis/sh
load std
autoload=std
ndb/cs
chatroom=$1
fn ck {
or {$*} {
echo chatclient: exiting >[1=2]
raise error
}
}
user="{cat /dev/user}
ck mount -A 'tcp!$registry!registry' /mnt/registry
ck /dis/grid/remotelogon wm/wm {
k = /usr/$user/keyring/default
grid/find -a resource chat -a pk `{getpk -s $k} Enter {... | Shell |
#!/dis/sh
load std
autoload=std
ndb/cs
fn ck {
or {$*} {
echo spreeclient: exiting >[1=2]
raise error
}
}
user="{cat /dev/user}
fn notice {
or {~ $#* 1} {
echo usage: notice arg >[1=2]
raise usage
}
t := $*
run /lib/sh/win
tkwin Notice {
x text .t -yscrollcommand {.s set}
x scrollbar .s -orient ver... | Shell |
#!/bin/sh
line=`/bin/echo $1 | /bin/sed 's/-//'`
if [ "x$EDITOR" = "x" ] ; then
vi +$line $2
else
$EDITOR +$line $2
fi
| Shell |
.TH LOGIN 6
.SH NAME
login \- key exchange protocol
.SH DESCRIPTION
The following encrypted key exchange protocol is used between a client such as
.B login
in
.IR security-login (2),
and a certificate signing process such as
.IR logind (8),
to justify the latter's issuing a certificate that can
later be presented to an... | Shell |
.TH MAN 6
.SH NAME
man \- manual page format
.SH DESCRIPTION
The Inferno manual pages are stored as text files in a format originally defined for use with the Unix and Plan 9
.I troff
command, when used with the
.I man
macro package.
Within Inferno, the format is interpreted by the programs of
.IR man (1).
.PP
Except i... | Shell |
.TH MAN 1
.SH NAME
man, wm/man, man2html, man2txt, lookman, sig \-
print or find manual pages
.SH SYNOPSIS
.B man
[
.B -b
] [
.B -n
] [
.B -p
] [
.B -S
] [
.B -w
]
[
.I section ...
]
.I title ...
.br
.B man -f
.I file ...
.br
.B wm/man
[
.I section ...
]
.I title ...
.br
.B wm/man -f
.I file ...
.br
.B man2html
[
.BI -... | Shell |
#!/bin/rc
# creates the index used by lookman
>index
for(i in /usr/inferno/man/[0-9]*/[a-z0-9:]*){
p=`{echo $i | sed 's@/usr/inferno(/man/.*)$@\1@'}
deroff -w < $i |
tr 'A-Z' 'a-z' |
sort -u |
comm -23 - junkwords |
sed 's@$@ '$p'@' >>index # stick file name on end of line
}
sort -o index index
mv index /usr/inf... | Shell |
#!/bin/rc
U='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
L='abcdefghijklmnopqrstuvwxyz'
builtin cd $1
for (i in [a-z0-9:]*) {
sed -n '
/SH *NAM/,/SH/{
/SH/d
s/, *$//
ty
:y
s/ *\\*-.*//
tx
s/ *\\\(mi.*//
tx
s/[,:] */\
/g
s/\n\\n/\
/g
y/'$U'/'$L'/
s/\n/ '$i'&/g
s/$/ '$i'/
p
}
/SH *DES/q
d
:x
s/ *\\*-.*... | Shell |
#!/bin/rc
rfork ne
ROOT=/usr/inferno
fn cd
NPROC=3
path=(/usr/inferno/Plan9/$cputype/bin $path)
#bind /usr/inferno/mkconfig.dist /usr/inferno/mkconfig
exec mk $*
| Shell |
#!/bin/rc
rfork ne
ROOT=/usr/inferno
fn cd
NPROC=3
path=(/usr/inferno/Plan9/$cputype/bin $path)
#bind /usr/inferno/mkconfig.dist /usr/inferno/mkconfig
exec mk $*
| Shell |
#!/bin/rc
rfork ne
ROOT=/usr/inferno
fn cd
NPROC=3
path=(/usr/inferno/Plan9/$cputype/bin $path)
exec mk $*
| Shell |
#!/bin/rc
cat ievaluator7t.txt
| Shell |
#!/bin/rc
rfork ne
ROOT=/usr/inferno
fn cd
NPROC=3
path=(/usr/inferno/Plan9/$cputype/bin $path)
#bind /usr/inferno/mkconfig.dist /usr/inferno/mkconfig
exec mk $*
| Shell |
#!/bin/rc
rfork ne
ROOT=/usr/inferno
fn cd
NPROC=3
path=(/usr/inferno/Plan9/$cputype/bin $path)
#bind /usr/inferno/mkconfig.dist /usr/inferno/mkconfig
exec mk $*
| Shell |
#!/dis/sh
bind -a '#F' /dev
echo erase all >/dev/flash/kernelctl
dd -conv sync </os/ipaq1110/k.gz >/dev/flash/kernel
| Shell |
#!/bin/rc
cat limbo.ms synsum | awk 'BEGIN { inside = 0 }
{ if ($1==".s1") {
inside = 1;
}
if ($1==".s2") {
inside = 0;
}
if (inside) {
gsub(/C/, "\\f(CW")
gsub(/ID/, "@D")
gsub(/I/, "\\fI")
gsub(/@D/, "ID")
gsub(/O/, "\\fI\\s-3\\v''+2p''opt\\v''-2p''\\s+3")
}
print $0
... | Shell |
#!/bin/sh
OPENWRT=$HOME/OpenWrt-SDK-Linux-i686-1
INFERNO=/usr/inferno
PATH=$OPENWRT/staging_dir_mipsel/bin:$INFERNO/Linux/386/bin:$PATH
mk OBJTYPE=spim CONF=emu-wrt CONFLIST=emu-wrt SYSLIBS=-lm WIN= $*
| Shell |
#!/bin/sh
# this file is used only to bootstrap mk onto a platform
# that currently lacks a binary for mk. after that, mk can
# look after itself.
# support@vitanuova.com
# change these defines as appropriate here or in mkconfig
# ROOT should be the root of the Inferno tree
ROOT=/usr/inferno
SYSTARG=FreeBSD
OBJTYPE... | Shell |
# emu sh initialisation here
| Shell |
#!/dis/sh.dis
# Plan 9 man script adaptation for Inferno
# for more details see the real man(1)
load std
fils=()
cmd=n
sec=()
S=/man
d=0
x=$* # see sh(1) for details about s/$*/$x/.
x=`{echo $x|tr A-Z a-z|tr -dc 'a-z0-9_ \012-/'} # fold case, delete funny chars
search=yes
while {~ $d 0}{
#echo d$d search$search cmd... | Shell |
#!/dis/sh
load std
x=$*
{~ $#x 1 && ~ ${hd $x} -h -r} || {echo usage: shutdown -h or shutdown -r >[1=2]; exit usage}
# the following is a bit pointless until kfs has halt
#ftest -f /dis/disk/kfscmd.dis && {
# for(a in /chan/kfs.*.cmd){
# b=${hd ${tl ${split '.' $a}}}
# ~ $b '*' || disk/kfscmd -n $b halt
# }
#}
if {~ ... | Shell |
#!/dis/sh
load std
fn cmdform {
sed 's;/man/;;
s;(.*)/(0intro);man \1 \2 # intro(\1);
s;(.*)/(.*);man \1 \2 # \2(\1);'
}
post=cmdform
x=$*
~ $1 -f && {
post=cat
x=${tl $x}
}
x=`{echo $x|tr A-Z a-z|tr -dc 'a-z0-9_ \012'} # fold case, delete funny chars
~ $#x 0 && {echo Usage: lookman key ... >[1=2]; exit usage}
... | Shell |
#!/dis/sh
load std
autoload=std
pctl forkns newpgrp
echo -n 62.254.170.99 > /dev/sysname
# from /dis/svc/auth (except -n option)
fn auth {
or {ftest -e /net/dns} {ftest -e /env/emuhost} {ndb/dns}
or {ftest -e /net/cs} {ndb/cs}
# svc/registry # unclear if we should
or {ftest -f /keydb/signerkey} {echo 'auth: need... | Shell |
#!/dis/sh
ls -p $* | mc
| Shell |
#!/dis/sh
load std
if {~ $#* 0} {
echo usage: runns path0 path1 ... pathn
raise usage
}
grid/register -a resource Namespace 'grid/srv/ns '^$"* | grid/srv/monitor 1 'Namespace'
| Shell |
#!/dis/sh
grid/register -a resource Camera -a name Y2K -a model 'Kodak DC260' -a 'Image resource' 1 {demo/camera/camera.dis -v 2 -p 0 -n Y2K -f /dis/demo/camera/tkinterface.dis -f /dis/demo/camera/readjpg.dis -f /dis/demo/camera/camload.bit -f /dis/demo/camera/camproc.bit}
| Shell |
#!/dis/sh
fn bindfs {
# this may be useful as a general purpose cmd
(mntpt dirs)=$*
memfs $mntpt
for d in $dirs {
parts=${split / $d}
fpath=''
for p in $parts {
fpath=$fpath^/^$p
if {! ftest -e $mntpt^$fpath} {
if {ftest -d $fpath} {
mkdir $mntpt^$fpath
} {
if {! ftest -e $fpath} {
... | Shell |
#!/dis/sh
mount -A {auxi/odbcmnt -a tcp!200.1.1.113} /mnt/odbc
fn splitrun {
if {! ~ $#* 0} {
(hd tl) = $*
echo Registering $hd
grid/register -a resource ODBC -a name $hd '{export /mnt/odbc/'^$hd^'}'
splitrun $tl
}
}
cd /mnt/odbc
sources=`{ls}
splitrun $sources
| Shell |
#!/dis/sh
load std
autoload=std
ndb/cs
chatroom=$1
fn ck {
or {$*} {
echo chatclient: exiting >[1=2]
raise error
}
}
user="{cat /dev/user}
ck mount -A 'tcp!$registry!registry' /mnt/registry
ck /dis/grid/remotelogon wm/wm {
k = /usr/$user/keyring/default
grid/find -a resource chat -a pk `{getpk -s $k} Enter {... | Shell |
#!/dis/sh
load std
autoload=std
ndb/cs
fn ck {
or {$*} {
echo spreeclient: exiting >[1=2]
raise error
}
}
user="{cat /dev/user}
fn notice {
or {~ $#* 1} {
echo usage: notice arg >[1=2]
raise usage
}
t := $*
run /lib/sh/win
tkwin Notice {
x text .t -yscrollcommand {.s set}
x scrollbar .s -orient ver... | Shell |
#! /bin/bash
# Binary of the Texturepacker:
TEXTUREPACKER_BINARY=/usr/local/bin/TexturePacker
# Shared Spritesheet-Output-Definitions:
SPRITESHEET_OUTPUT_DIRECTORY="../assets/gfx/spritesheets/"
SPRITESHEET_OUTPUT_JAVAIDS_PACKAGE="org.anddev.andengine.examples.spritesheets"
SPRITESHEET_OUTPUT_JAVAIDS_DIRECTORY="../src... | Shell |
#! /bin/bash
# Binary of the Texturepacker:
TEXTUREPACKER_BINARY=/usr/local/bin/TexturePacker
# Shared Spritesheet-Output-Definitions:
SPRITESHEET_OUTPUT_DIRECTORY="../assets/gfx/spritesheets/"
SPRITESHEET_OUTPUT_JAVAIDS_PACKAGE="org.anddev.andengine.examples.spritesheets"
SPRITESHEET_OUTPUT_JAVAIDS_DIRECTORY="../src... | Shell |
#/bin/bash
# determine correct directory
SLICK_SOURCE=$(pwd)
if [ -n "$WORKSPACE" ];
then
SLICK_SOURCE="$WORKSPACE"
else
SLICK_SOURCE=$(cd $(pwd)/$(dirname $0)/../..; pwd -P)
fi
echo "Shutting down slick [" `cat $SLICK_SOURCE/integration-tests/slick.pid` "]"
kill -TERM `cat $SLICK_SOURCE/integration-tests/slick.p... | Shell |
#!/bin/bash
SLICKURL="http://localhost:9090"
POST="curl -s -X POST"
# Create Project ---------------------------------------------------------------------------------
PROJECT=`$POST -H 'Content-Type: application/json' -d '{"name": "Slickij Developer Project", "description": "A Project to be used by slickij developer... | Shell |
#!/bin/bash
echo "db.dropDatabase()" | mongo localhost/slickij
| Shell |
#!/bin/bash
# determine correct directory
SLICK_SOURCE=$(pwd)
if [ -n "$WORKSPACE" ];
then
SLICK_SOURCE="$WORKSPACE"
else
SLICK_SOURCE=$(cd $(pwd)/$(dirname $0)/../..; pwd -P)
fi
cd $SLICK_SOURCE/slickij-war;
nohup mvn -Djetty.port=9090 jetty:run >$SLICK_SOURCE/integration-tests/slick.log 2>&1 &
cd $SLICK_SOURCE... | Shell |
#!/bin/bash
# determine correct directory
SLICK_SOURCE=$(pwd)
if [ -n "$WORKSPACE" ];
then
SLICK_SOURCE="$WORKSPACE"
else
SLICK_SOURCE=$(cd $(pwd)/$(dirname $0)/..; pwd -P)
fi
INT_ROOT="$SLICK_SOURCE/integration-tests"
rm -f $INT_ROOT/*.log $INT_ROOT/*.pid 2>/dev/null
rm -f TEST*.xml 2>/dev/null
#------- Run Set... | Shell |
#!/bin/bash
USERNAME="tcrunij"
PASSWORD="f00b@r"
SLICKURL="http://localhost:8080/slickij"
MONGO="mongo localhost/slickij"
POST="curl -s --digest -u ${USERNAME}:${PASSWORD} -X POST"
$MONGO --eval 'db.dropDatabase()' >/dev/null
PROJECT=`$POST -H 'Content-Type: application/json' -d '{"name": "Slickij Developer Projec... | Shell |
#!/bin/bash
SLICKURL="http://localhost:8080"
MONGO="mongo localhost/slickij"
POST="curl -s -X POST"
# Create Project ---------------------------------------------------------------------------------
PROJECT=`$POST -H 'Content-Type: application/json' -d '{"name": "Slickij Developer Project", "description": "A Project... | Shell |
#!/bin/bash
#################################################################################
# Customize this section for your needs
LOCAL_SLICKIJ_URL="http://localhost:8080/slickij"
LOCAL_SLICKIJ_WAR=/Library/Tomcat/runtime/webapps/slickij.war
# A list of urls to jar files you want to add to slick
JARS_TO_ADD=""
# ... | Shell |
#!/bin/bash
find . -name 'pom.xml' |xargs perl -pi -e "s/1.0.0-SNAPSHOT/1.0.0-${BUILD_NUMBER}/g"
| Shell |
convert -size 256x256 canvas:none -fill black -draw 'circle 127.5,127.5 0,127.5' circle.png
convert -size 512x512 'radial-gradient:black-none' \
-sigmoidal-contrast 6,50% \
airbrush.png
| Shell |
pushd .
cd deps
if [ ! -d "boost_1_46_1" ] ; then
echo "The boost installation in deps/ is missing! unable to continue!"
else
cd boost_1_46_1
# install with the new prefix
echo "Now installing Boost... This could take a little while..."
./bjam --threading=multi --link=static --variant=release --prefix=$instal... | Shell |
#!/bin/bash
function download_file {
# detect wget
echo "Downloading $2 from $1 ..."
wgetcmd=`which wget`
if [ -z $wgetcmd ] ; then
curlcmd=`which curl`
if [ -z $curlcmd ] ; then
echo "Unable to find either curl or wget! Cannot proceed with automatic install."
exit 1
fi
curl $1 -o $... | Shell |
#!/bin/sh
OUTPUT=$1
STATIC_LIB_NAME=$OUTPUT
MOVE_LOCATION=$2
BASEDIR=$3
LINKFILES=$4
LINKER_FLAGS= -shared -Wl,--version-script,/afs/cs.cmu.edu/misc/matlab/amd64_f7/7.9/lib/matlab7/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
echo $OUTPUT
echo $STATIC_LIB_NAME
echo 'Running godawful mex linking hack...'
... | Shell |
tmpfile=`mktemp`
for f in `find src/graphlab/* \( \( -name "*.cpp" -or -name "*.hpp" \) -not -wholename "src/graphlab/extern/*" \)`
do
if ! grep -q "Lesser General Public License" $f
then
echo $f
cat LGPL_prepend.txt $f > $tmpfile
mv $tmpfile $f
fi
done | Shell |
#!/bin/bash
for f in `find src \( -name "*.cpp" -or -name "*.hpp" \)`; do
lastline=`tail -n 1 $f`
len=$((${#lastline}))
if [ $len -ne 0 ]; then
echo $f
echo -e "" >> $f
fi
done
| Shell |
#!/bin/bash
function test_for_boost {
# if force boost install is set, don't probe. assume failure
if [ ! -z $force_boost_install ] ; then
return
fi
# list all the boost files we use
grep -h -r "include <boost/*" ../src | uniq > boost_tester.cpp
# make a main which does nothing
echo -e "\nint main(int... | Shell |
#!/bin/bash
major_version=1
mkdir dist/graphlabapi
rsync -vv -al --delete --delete-excluded \
--exclude=/debug --exclude=/release --exclude=/profile --exclude=/apps \
--exclude=.hg --exclude=/doc/doxygen --exclude=/matlab --exclude=/extapis \
--exclude=/dist --exclude=/deps --exclude=*~ --exclude=*.orig -... | Shell |
#!/bin/bash
function quit_if_bad_retvalue {
if [ $? -eq 0 ]; then
echo "PASS"
else
echo "FAIL. Program returned with failure"
exit 1
fi
}
function test_rpc_prog {
echo "Testing $1 ..."
echo "---------$1-------------" >> $stdoutfname
echo "---------$1-------------" >> $stderrfname
mpiexec -n... | Shell |
#!/bin/bash
echo "This script completely erases the release, debug, and profile folders.";
echo "Are you sure you want to continue? (yes or no)"
read yesorno;
if [ "$yesorno" == "yes" ]; then
echo "Removing release debug and profile folders";
rm -rf release debug profile
else
echo "Doing nothing!";
fi | Shell |
#!/bin/bash
#
# This file should not be called from anywhere else but the
# generate_mex_makefile.m matlab function
if [ $# -gt 0 ]
then
Arch=$ARCH
MAPFILE="mexFunction.map"
source $MATLAB/bin/mexopts.sh
extra_includes="-I\"${MATLAB}/extern/include\""
if [ -d $MATLAB/simulink ]; then
extra_includes="${e... | Shell |
#!/bin/bash
echo "===== install deps"
echo $1
source configure.deps
# see if BOOST_ROOT is the deps folder
# if it is, we may need to install it
if [ ! -z $BOOST_ROOT ] && [ $BOOST_ROOT == $PWD/deps ]; then
echo
echo "================================================================"
echo "This script will now ... | Shell |
pushd .
cd deps
if [ ! -d "kyotocabinet-1.2.53" ] ; then
echo "The Kyoto Cabinet installation in deps/ is missing! unable to continue!"
else
cd kyotocabinet-1.2.53
# install with the new prefix
echo "Now installing Kyoto Cabinet... "
./configure --prefix=$installprefix
make install
fi
popd
| Shell |
#!/bin/sh
export CLASSPATH=$CLASSPATH:../build/:../lib/jython.jar
java -Xmx2000m -Djava.library.path=../native/ demo.scheduling.ColoredSchedulerDemo
| Shell |
#!/bin/sh
export CLASSPATH=$CLASSPATH:../build/:../lib/jython.jar
java -Xmx2000m -Djava.library.path=../native/ demo.pagerank.PageRank ../../testdata/stoch30x.csv
| Shell |
#!/bin/sh
export CLASSPATH=$CLASSPATH:../build/:../lib/jython.jar
cd ../python
java -Xmx2000m -Djava.library.path=../native/ graphlab.wrapper.PythonGraphlab pagerank_load.py pagerank_config.py pagerank_update.py pagerank_post.py testdata/stoch30x.csv
| Shell |
#!/bin/sh
export CLASSPATH=$CLASSPATH:../build/:../lib/jython.jar
cd ../python
java -Xmx2000m -Djava.library.path=../native/ graphlab.wrapper.PythonGraphlab lasso_load.py lasso_config.py lasso_update.py lasso_post.py testdata/testphoto.txt
| Shell |
#!/bin/sh
export CLASSPATH=$CLASSPATH:../build/:../lib/jython.jar
java -Xmx2000m -Djava.library.path=../native/ demo.scheduling.PriorityDemo | Shell |
#!/bin/sh
doxygen
cp doc/images/* doc/doxygen/html/
| Shell |
#!/bin/bash
IN_BOOTSTRAP=1
mkdir -p deps
cd deps/
source ../cmakecheck.sh
source ../boostcheck.sh
source ../kccheck.sh
cd ..
# rebuild the ./configure.deps script
echo "CMAKE=$cmakecmd" > configure.deps
# we add a boost root only if it is the deps directory
if [ ! -z $BOOST_ROOT ] && [ $BOOST_ROOT == $PWD/deps ]; th... | Shell |
#!/bin/bash
function test_for_kc {
# if force boost install is set, don't probe. assume failure
if [ ! -z $force_kc_install ] ; then
return
fi
# make a main which does nothing
echo -e "#include <kchashdb.h>\n" > kc_tester.cpp
echo -e "\nint main(int argc, char** argv){ return 0; }\n" >> kc_tester.cpp
... | Shell |
#!/bin/bash
function find_itpp_lib {
# if force itpp install is set, don't probe. assume failure
if [ ! -z $force_itpp_install ] ; then
return
fi
# look for itppconfig
itppconfig_pos=`which itpp-config`
# if not found and itpp root is defined. try the itpp_root/bin
if [ ! -z $ITPP_ROOT ] && [ -z $... | Shell |
#!/bin/bash
curl -O http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
tar -zxvf tesseract-ocr-3.02.eng.tar.gz
rm -f tesseract-ocr-3.02.eng.tar.gz
mkdir data
mv tesseract-ocr data/tesseract
adb push data/ /sdcard/
adb shell sync
| Shell |
#!/bin/bash
curl -O https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
curl -O http://leptonica.googlecode.com/files/leptonica-1.69.tar.gz
tar -zxvf tesseract-ocr-3.02.02.tar.gz
tar -zxvf leptonica-1.69.tar.gz
rm -f tesseract-ocr-3.02.02.tar.gz
rm -f leptonica-1.69.tar.gz
mv tesseract-ocr jni/com_g... | Shell |
#!/bin/bash
# This script initiates regeneration of Makefile.am and builds OCRopus.
# It should only be called by OCRopus developers.
# If autotools exist, Makefile.am is generated and autotools are invoked.
# All arguments to this script are forwarded as-is to configure.
if [ `which python` ]
then
if [ `which a... | Shell |
#! /bin/sh
V='ocropus-0.2'
T=`mktemp`
D=$T-ocropus
mkdir $D
cd $D
svn checkout http://ocropus.googlecode.com/svn/trunk ocropus
rm -f ocropus/check-* ocropus/testing/check-*
rm -f ocropus/fix-include-dependencies ocropus/DIRS
rm -f ocropus/package.sh
cat >ocropus/Jamrules <<"EOF"
if $(TOP) = "." {
Exit "Please run... | Shell |
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | Shell |
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribu... | Shell |
#!/bin/sh
find . -name '*.h' -o -name '*.c*' | sort | uniq -d
| Shell |
#!/bin/bash
#
# runs ocropus with timing information
#
# Responsible: tmb
# Reviewer: kofler
#
. `dirname $0`/common.sh
verifyDir
cd ocroscript/scripts
export OCROSCRIPTS=`pwd`
section RUN-TIMING
retvalue=0
for file in ../../data/pages/*.png; do
echo >&2
echo " === $file" >&2
timing=1 `which time` -... | Shell |
#!/bin/sh
svn status |
egrep '(^M|^A|^D|^C|^\?.*\.(h|c|cc|png|lua)$)' |
egrep -v '(/| | )data|tests/images' |
fgrep -f '.nosvn' -v
find . |
fgrep .mine
| Shell |
#!/bin/bash
#
# checks for the presence of the right copyright and licence
# information in src files
#
# Responsible: tmb
# Reviewer: kofler
#
# include common functions (look there for documentation!)
. `dirname $0`/common.sh
verifyDir
retval=0
section "checking copyrights"
find . -name '*.cc' -o -name '*.h' | g... | Shell |
#-*- mode: shell-script;-*-
#
# bash completion support for core ocropus
#
# Copyright (C) 2009 Neskie A. Manuel <neskiem@gmail.com>
# Distributed under the GNU General Public License, version 2.0.
#
_ocropus_commands()
{
local commands="$(ocropus 2>&1 | grep ocropus | cut -d ' ' -f 6)"
COMPREPLY=( ${COMPREPL... | Shell |
#!/bin/bash
#
# makes sure that ocropus compiles !
#
# Responsible: kofler
#
# include common functions (look there for documentation!)
. `dirname $0`/common.sh
# make sure we are in the right directory
verifyDir
retvalue=0
section TEST-COMPILE
# build ocropus with a minimal configuration
verifyCommand "./configur... | Shell |
#!/bin/sh
find . -name '*.png' |
egrep 'Volume_.*/..../.....png' |
while read image; do
base=$(echo $image | sed 's/.png//')
echo
echo $base
echo
bpnet=/usr/local/share/ocropus/models/neural-net-file.nn ocroscript align-transcription --cut $image $base.txt $base.cseg.png $base.rseg.png $base.costs
d... | Shell |
#!/bin/bash
#
# makes sure that ocropus compiles !
#
# Responsible: kofler
#
# include common functions (look there for documentation!)
. `dirname $0`/common.sh
# make sure we are in the right directory
verifyDir
section TEST-RUN
# actually run ocropus
verifyCommand "cd ocroscript/scripts" 0
export OCROSCRIPTS=`pwd... | Shell |
#
# common functions for test scripts in ocropus
# include this file with the following line into test scripts:
# . `dirname $0`/common.sh
# this allows for calling the scripts also from the top-level
# ocropus directory. the scripts must all reside in the same
# subfolder!
#
# Responsible: kofler
#
# makes sure that ... | Shell |
#!/bin/bash
#
# makes sure that ocropus compiles !
#
# Responsible: kofler
#
# include common functions (look there for documentation!)
. `dirname $0`/common.sh
# make sure we are in the right directory
verifyDir
retvalue=0
section RUN-TESTS
verifyCommand "make check" 0
exit $?
| Shell |
#!/bin/bash
#
# checks for correct building and runs ocropus with valgrind
#
# Responsible: tmb
# Reviewer: kofler
#
. `dirname $0`/common.sh
verifyDir
jam clean
test -x ocrocmd/ocrocmd && die "failed to clean ocropus executable"
jam -dx -s opt='-g -O2' || die "jam build failed"
test -x ocrocmd/ocrocmd || die "fai... | Shell |
#!/bin/bash
#
# checks for correct building and runs ocropus with profiling
#
# Responsible: tmb
# Reviewer: kofler
#
. `dirname $0`/common.sh
verifyDir
section RUN-PROFILE
jam clean
test -x ocrocmd/ocrocmd && die "failed to clean ocropus executable"
jam -dx -s opt='-g -O2 -DUNSAFE -pg' -s LINKFLAGS='-pg' || die ... | Shell |
export element="ocr_line"
export min_len=10
export max_len=100
export old_csegs=1
export beam_width=200
./train.sh $@
| Shell |
export element="ocr_cinfo"
export min_len=2
export max_len=20
export linerec_maxaspect=2.0
export max_line_aspect=2.0
./train.sh $@
| Shell |
if [ $# -ne 4 ]
then
echo "Usage: `basename $0` <jstor-data-dir> <model-for-alignment> <output-dir-for-images> <new-model>"
exit -1
fi
cmodel=$2
./jstor.py "$1/ocrs/*.xml" "$1/pages/*.png" "$3/%04d/%04d" > $3/jstor-extract.log
ocropus lines2fsts $3
ocropus align $3
for i in $3/???? ; do rename 's/\.cseg\.png$/\.cs... | Shell |
export element=ln
export old_csegs=1
export beam_width=200
./train.sh $@
| Shell |
export element=wd
./train.sh $@
| Shell |
#!/bin/bash
base=$0.`date +%s`
fixed() {
echo fixed $1=$2
eval export $1="$2"
}
pick() {
value=$(perl -e 'shift; print $ARGV[int((1+$#ARGV)*rand())]' "$@")
echo pick $1=$value
eval export $1="$value"
}
fixed verbose 1
fixed verbose_params '?'
fixed debug info
fixed linerec_classifier latin
fixed ... | Shell |
#!/bin/bash
base=$0.`date +%s`
fixed() {
echo fixed $1=$2
eval export $1="$2"
}
pick() {
value=$(perl -e 'shift; print $ARGV[int((1+$#ARGV)*rand())]' "$@")
echo pick $1=$value
eval export $1="$value"
}
fixed verbose 1
fixed verbose_params '?'
fixed debug info
pick linerec_classifier latin cascade... | Shell |
#!/bin/bash
base=$0
pick() {
value=$(perl -e 'shift; print $ARGV[int((1+$#ARGV)*rand())]' "$@")
echo pick $1=$value
eval export $1="$value"
}
pick verbose 1
pick verbose_params '?'
pick debug info
pick linerec_classifier mappedmlp
pick linerec_fmap sfmap
pick ntrain 50000
pick linerec_csize 40
pick liner... | Shell |
#!/bin/bash
# usage:
# train.sh <text-file> [output-directory] [book-name]
if [ $# -le 1 ] ; then
outdir="."
else
outdir=$2
fi
if [ $# -le 2 ] ; then
bookname=`basename $1`
else
bookname=$3
fi
./ocrogenft -b $bookname -o $outdir $1
ocropus trainseg ${outdir}/${bookname}.model ${outdir}/$1
| Shell |
#!/bin/bash
# example for training unicode text files
./train.sh glass . glass.txt
| Shell |
#!/bin/sh -x
prefix=/usr/local
rm -rf ${prefix}/include/ocropus
rm -rf ${prefix}/lib/libocropus.*
rm -rf ${prefix}/bin/ocropus
| Shell |
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-05-14.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby ... | Shell |
#!/bin/sh
$JAVA_HOME/bin/java -jar jbrickshooter.jar &
| Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.