[TeamTalk 36]: [573] TeamTalk: Added ignore property for may temp files
tk@edam.speech.cs.cmu.edu
tk at edam.speech.cs.cmu.edu
Thu Apr 5 16:11:16 EDT 2007
An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20070405/3fa6cd2f/attachment.html
-------------- next part --------------
Property changes on: TeamTalk
___________________________________________________________________
Name: svn:ignore
+ bin
ExternalLibraries
logs
Property changes on: TeamTalk/Agents
___________________________________________________________________
Name: svn:ignore
+ Agents.ncb
Agents.suo
Ankh.Load
Property changes on: TeamTalk/Agents/PenDecoder
___________________________________________________________________
Name: svn:ignore
- dist
build
+ build
dist
Property changes on: TeamTalk/Agents/PenDecoder/nbproject/private
___________________________________________________________________
Name: svn:ignore
+ private.properties
private.xml
Added: TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/TaskStatus.java
===================================================================
--- TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/TaskStatus.java (rev 0)
+++ TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/TaskStatus.java 2007-04-05 20:11:16 UTC (rev 573)
@@ -0,0 +1,16 @@
+/*
+ * TaskStatus.java
+ *
+ * Created on March 31, 2007, 2:17 PM
+ *
+ */
+
+package edu.cmu.ravenclaw.pendecoder;
+
+/**
+ *
+ * @author tkharris
+ */
+public enum TaskStatus {
+ UNSENT, UNACKED, IN_PROGRESS, ABANDONED, FAILED, SUCCEEDED
+}
Property changes on: TeamTalk/Agents/PrimitiveComm
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
*.user
Property changes on: TeamTalk/Agents/TeamTalkBackend
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
*.user
Property changes on: TeamTalk/Agents/TeamTalkBackend/backendstub
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
*.user
Property changes on: TeamTalk/Agents/TeamTalkDM
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
*.user
Property changes on: TeamTalk/Agents/boeingLib
___________________________________________________________________
Name: svn:ignore
+ _darcs
boring
darcs-record-*
Added: TeamTalk/Agents/boeingLib/bin/cpuflags
===================================================================
--- TeamTalk/Agents/boeingLib/bin/cpuflags (rev 0)
+++ TeamTalk/Agents/boeingLib/bin/cpuflags 2007-04-05 20:11:16 UTC (rev 573)
@@ -0,0 +1,51 @@
+#!/usr/bin/ruby
+
+def cpuflags()
+ # read proc file and extract the processor name
+ lines=IO.readlines("/proc/cpuinfo")
+ model=String.new
+ lines.each { |l|
+ case l
+ when /model name.*: *(.*)/
+ entry=$1
+ case entry
+ when /Athlon.*X2/
+ model="-march=athlon-fx -mfpmath=sse -msse2"
+ when /Athlon.*64/
+ model="-march=athlon-xp -mfpmath=sse -msse2"
+ when /Athlon.*XP/
+ model="-march=athlon-xp"
+ when /Athlon/
+ model="-march=athlon"
+ when /Pentium/
+ if (entry=~/M/)
+ model="-march=pentium-m -mfpmath=sse -msse2 -mmmx"
+ else
+ model="-march=pentium4 -mfpmath=sse -msse2 -mmmx"
+ end
+ when /VIA Nehemiah/
+ # "-march=c3-2"
+ model="-march=pentium"
+ end
+ end
+ }
+ return model
+end
+
+
+if false
+ # read proc file and extract the processor name
+ file = File.open("/proc/cpuinfo","r");
+ while(line = file.gets())
+ case line
+ when /model name.*: *(.*)/
+ model = $1
+ end
+ end
+ file.close()
+end
+
+
+print cpuflags(),"\n"
+
+exit 0
Added: TeamTalk/Agents/boeingLib/bin/fixdepend
===================================================================
--- TeamTalk/Agents/boeingLib/bin/fixdepend (rev 0)
+++ TeamTalk/Agents/boeingLib/bin/fixdepend 2007-04-05 20:11:16 UTC (rev 573)
@@ -0,0 +1,45 @@
+#!/usr/bin/ruby
+
+# /* LICENSE: */
+
+dir = ARGV.shift.chomp("/")
+#dir.chomp!("/");
+
+obj_name = nil
+if(!ARGV[0].nil? && ARGV[0]=~/\.o$/)
+ obj_name = ARGV.shift
+end
+
+generated_h_files = ARGV
+
+line = $stdin.gets()
+parts = line.split(/:/)
+if(parts.size < 2)
+ exit 2
+end
+
+if(obj_name.nil?)
+ obj_name = File.join(dir,parts[0].strip())
+end
+dep_name = obj_name.clone()
+dep_name[-1,1] = "d"
+
+deps = parts[1]
+rest_of_file = $stdin.gets(nil)
+if(!rest_of_file.nil?)
+ deps += rest_of_file
+end
+
+print "#{obj_name} : #{deps}"
+
+deps.gsub!(%r%([^[:blank:]\\]\S+)%) {|filename|
+ if(generated_h_files.index(filename).nil?)
+ "$(wildcard #{filename})"
+ else
+ filename
+ end
+}
+
+print "\n#{dep_name} : #{deps}"
+
+exit 0
Added: TeamTalk/Agents/boeingLib/bin/flatten
===================================================================
--- TeamTalk/Agents/boeingLib/bin/flatten (rev 0)
+++ TeamTalk/Agents/boeingLib/bin/flatten 2007-04-05 20:11:16 UTC (rev 573)
@@ -0,0 +1,93 @@
+#!/usr/bin/ruby -w
+
+# This program tries to flatten the code hierarchy into one directory
+
+def printUsage(eval)
+ print "USAGE: flatten <dirname> <target>\n";
+ print "This program flattens the directory dirname and puts all\n";
+ print "files in the directory tree all into the target directory\n";
+ exit eval;
+end
+
+def loadExcludes(exclude_file)
+ excludes = Array.new;
+ File::open(exclude_file) {|f|
+ while (line = f.gets())
+ line = line.split('#')[0];
+ line.strip!;
+ # line = line.split()[0];
+ if (line.length()>0)
+ excludes.push(line);
+ end
+ end
+ }
+ return excludes;
+end
+
+def checkExclude(fname,excludes)
+ excludes.each {|ex|
+ if (!fname.index(ex).nil?())
+ return false;
+ end
+ }
+ return true;
+end
+
+def copyFiles(files,target,excludes)
+ files.each { |f|
+ if (File::file?(f) && checkExclude(f,excludes))
+ tfname = target + "/" + File::basename(f);
+ printf "file '%s' -> '%s'\n",f,tfname;
+ system("cp "+f+" "+tfname);
+ end
+ }
+end
+
+# we expect two parameters
+if (ARGV.size < 2)
+ printUsage(1);
+end
+
+# remove trailing /
+verbose=true;
+dirname = ARGV[0].chomp("/");
+target = ARGV[1].chomp("/");
+
+use_excludes=false;
+if (ARGV.size>2)
+ use_excludes=true;
+ exclude_file=ARGV[2];
+end
+
+if (!File::directory?(target))
+ printf "ERROR: %s is not a directory!\n",target;
+ printUsage(1);
+end
+
+if (verbose)
+ printf "Flattening from '%s' -> '%s'",
+ dirname,target;
+ if (use_excludes)
+ printf " with exclude file '%s'\n",exclude_file;
+ end
+end
+
+# read the exclude file
+excludes = Array.new;
+if (use_excludes && File::readable?(exclude_file))
+ excludes = loadExcludes(exclude_file);
+end
+
+# find the list of files
+files = Dir[dirname+"/**/*"];
+
+# apply exclusions
+copyFiles(files,target,excludes);
+
+
+
+
+
+
+
+
Added: TeamTalk/Agents/boeingLib/bin/gpp_calc
===================================================================
--- TeamTalk/Agents/boeingLib/bin/gpp_calc (rev 0)
+++ TeamTalk/Agents/boeingLib/bin/gpp_calc 2007-04-05 20:11:16 UTC (rev 573)
@@ -0,0 +1,89 @@
+#!/usr/bin/ruby
+
+# /* LICENSE: */
+
+#dir = ARGV.shift.chomp("/")
+
+ifname = nil
+if(!ARGV[0].nil?)
+ ifname = ARGV.shift
+else
+ print "USAGE: gpp_calc <infile> [outfile]\n";
+ exit 1
+end
+
+ofname="tmp.calc.cfg"
+if (!ARGV[0].nil?)
+ ofname = ARGV.shift
+end
+
+# temp
+#print "Using: #{ifname} -> #{ofname}\n";
+
+if (!File::file?(ifname))
+ print "gpp_calc ERROR: File \'#{ifname}\' does not exist!!!\n";
+ exit(1);
+end
+
+File::open(ifname, mode="r") {|ifile|
+ File::open(ofname, mode="w") {|outf|
+ while line = ifile.gets()
+ line = line.gsub(/\;/,' ');
+# print line;
+ line.chomp!();
+ line.strip!();
+ line2 = line.split(/\/\//,2)[0];
+ if (!line2.nil? && line2=~/=/)
+ if (line2=~/\"/)
+ l=line2.gsub(/\"/,' ');
+# l=line2.replace("\"");
+ outf.print "#{l}\n";
+ elsif (line2=~/[\+\*\/\-\(\)\|\&]/)
+ (var,eqn) = line2.split('=',2);
+ eqn.chomp!();
+ var.chomp!();
+ eqn.strip!();
+ var.strip!();
+
+ # this is ugly...
+ outf.print "#{var} = ";
+
+ eqn_sub = eqn.gsub(/,/, ' ');
+ eqn_sub = eqn_sub.gsub(/\s+/, ', ');
+# eqn_sub = eqn.delete("\"");
+
+ system("awk \" BEGIN { print \$\* #{eqn_sub} } \">tmp.eval");
+ if (!File::file?("tmp.eval"))
+ print "ERROR: Cannot open temp file tmp.eval!!!";
+ exit(1);
+ end
+ File::open("tmp.eval", mode="r") {|tmpf|
+ l=tmpf.gets()
+ if (l.nil? || ! (l=~/\S/))
+ print "ERROR: evaluation failed!!!!\n";
+ exit(1);
+ end
+ l.chomp!();
+ if (0)
+ t = l.split();
+ l.split().each {|x| outf.print "#{x}, "}
+ outf.print "\n";
+ else
+ l=l.gsub(/\s+/,', ');
+ outf.print "#{l}\n";
+ end
+ }
+ else
+ outf.print "#{line2}\n";
+ end
+ else
+ outf.print "\n";
+ end
+ end
+ }
+}
+
+
+
+
+
Added: TeamTalk/Agents/boeingLib/bin/gpp_perl
===================================================================
--- TeamTalk/Agents/boeingLib/bin/gpp_perl (rev 0)
+++ TeamTalk/Agents/boeingLib/bin/gpp_perl 2007-04-05 20:11:16 UTC (rev 573)
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+# /* LICENSE: */
+
+#dir = ARGV.shift.chomp("/")
+
+sub usage
+{
+ print "USAGE: gpp_perl <infile> <outfile>\n";
+}
+
+
+$ARGV[0] || die usage();
+
+open(INFILE, "<$ARGV[0]") || die "Cannot open $ARGV[0]";
+open(OUTFILE, ">$ARGV[1]") || die "Cannot open $ARGV[1]";
+
+while ($line = <INFILE>) {
+ chomp($line);
+ $_=$line;
+ s/[;"]/ /g;
+ print OUTFILE "$_ \n";
+}
Property changes on: TeamTalk/Configurations/DesktopConfiguration
___________________________________________________________________
Name: svn:ignore
+ peerfile.txt
Property changes on: TeamTalk/Resources/DecoderConfig
___________________________________________________________________
Name: svn:ignore
+ *.log
Property changes on: TeamTalk/Resources/DecoderConfig/Dictionary
___________________________________________________________________
Name: svn:ignore
+ zap2.dict
zap2.dict.reduced_phoneset
Property changes on: TeamTalk/Resources/DecoderConfig/LanguageModel
___________________________________________________________________
Name: svn:ignore
+ zap2LM.arpa
Property changes on: TeamTalk/Resources/Grammar
___________________________________________________________________
Name: svn:ignore
+ base.dic
log
nets
zap2.gra
zap2.net
zap2flat.gra
zap2Task.gra
More information about the TeamTalk-developers
mailing list