assorted-commits Mailing List for Assorted projects (Page 32)
Brought to you by:
yangzhang
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(86) |
Feb
(265) |
Mar
(96) |
Apr
(47) |
May
(136) |
Jun
(28) |
Jul
(57) |
Aug
(42) |
Sep
(20) |
Oct
(67) |
Nov
(37) |
Dec
(34) |
2009 |
Jan
(39) |
Feb
(85) |
Mar
(96) |
Apr
(24) |
May
(82) |
Jun
(13) |
Jul
(10) |
Aug
(8) |
Sep
(2) |
Oct
(20) |
Nov
(31) |
Dec
(17) |
2010 |
Jan
(16) |
Feb
(11) |
Mar
(17) |
Apr
(53) |
May
(31) |
Jun
(13) |
Jul
(3) |
Aug
(6) |
Sep
(11) |
Oct
(4) |
Nov
(17) |
Dec
(17) |
2011 |
Jan
(3) |
Feb
(19) |
Mar
(5) |
Apr
(17) |
May
(3) |
Jun
(4) |
Jul
(14) |
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
(3) |
Dec
(2) |
2012 |
Jan
(3) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
(5) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(9) |
Apr
(5) |
May
|
Jun
(2) |
Jul
(1) |
Aug
(10) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <yan...@us...> - 2009-01-09 08:43:57
|
Revision: 1127 http://assorted.svn.sourceforge.net/assorted/?rev=1127&view=rev Author: yangzhang Date: 2009-01-09 08:43:53 +0000 (Fri, 09 Jan 2009) Log Message: ----------- volt->hstore, fixed contact indentation (still commented) Modified Paths: -------------- personal-site/trunk/src/index.txt Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2009-01-09 08:43:21 UTC (rev 1126) +++ personal-site/trunk/src/index.txt 2009-01-09 08:43:53 UTC (rev 1127) @@ -33,18 +33,18 @@ <div id="items"></div> <script type="text/javascript"> // <![CDATA[ - document.write( '<ul>' ); - item( 'Email', 'mailto:', 'mit.edu', 'y_z' ); - //item( 'AIM', 'aim:goim?screenname=', 'sorta lame' ); - //item( 'MSN', null, 'hotmail.com', 'noneofthegoodnameswereleft' ); - //item( 'Yahoo', 'ymsgr:sendIM?', 'overbored' ); - //item( 'Jabber (Google)', 'xmpp:', 'gmail.com', 'yaaang' ); - //item( 'Skype', 'callto://', 'yaaang' ); - //item( 'FreeNode', 'irc://irc.freenode.org/', 'zeeee' ); - //item( '"Office"', 'MIT/CSAIL <a href="http://whereis.mit.edu/map-jpg?selection=32&Buildings=go">32</a>-<a href="http://www.csail.mit.edu/resources/maps/9G/G908.gif">G908</a>, <a href="http://www.eecs.mit.edu/stata-link.html">Stata Center</a>, <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=32+Vassar+St,+Cambridge,+MA+02139&sll=42.357926,-71.093616&sspn=0.00842,0.01575&ie=UTF8&ll=42.362682,-71.093495&spn=0.008419,0.01575&z=16&iwloc=addr">32 Vassar St., Cambridge, MA 02139</a>' ); - //item( 'GPG public key', '<a href="yang.gpg.asc">yang.gpg.asc</a> (<a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB1E65B60">MIT PKS entry</a>)' ); - document.write( '</ul>' ); - // ]]> + document.write( '<ul>' ); + item( 'Email', 'mailto:', 'mit.edu', 'y_z' ); + //item( 'AIM', 'aim:goim?screenname=', 'sorta lame' ); + //item( 'MSN', null, 'hotmail.com', 'noneofthegoodnameswereleft' ); + //item( 'Yahoo', 'ymsgr:sendIM?', 'overbored' ); + //item( 'Jabber (Google)', 'xmpp:', 'gmail.com', 'yaaang' ); + //item( 'Skype', 'callto://', 'yaaang' ); + //item( 'FreeNode', 'irc://irc.freenode.org/', 'zeeee' ); + //item( '"Office"', 'MIT/CSAIL <a href="http://whereis.mit.edu/map-jpg?selection=32&Buildings=go">32</a>-<a href="http://www.csail.mit.edu/resources/maps/9G/G908.gif">G908</a>, <a href="http://www.eecs.mit.edu/stata-link.html">Stata Center</a>, <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=32+Vassar+St,+Cambridge,+MA+02139&sll=42.357926,-71.093616&sspn=0.00842,0.01575&ie=UTF8&ll=42.362682,-71.093495&spn=0.008419,0.01575&z=16&iwloc=addr">32 Vassar St., Cambridge, MA 02139</a>' ); + //item( 'GPG public key', '<a href="yang.gpg.asc">yang.gpg.asc</a> (<a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB1E65B60">MIT PKS entry</a>)' ); + document.write( '</ul>' ); + // ]]> </script> </div> @@ -56,8 +56,8 @@ Here are the non-confidential projects in which I've been involved. More details when I have time! -- [VoltDB] (formerly H-Store): a distributed main-memory relational database - management system for on-line transaction processing workloads. +- [H-Store]: a distributed main-memory relational database management system + for on-line transaction processing workloads. - Invirt: [SIPB]'s virtual machine management system. The name of the MIT instance of this service is [XVM]. - [Corey]: an exokernel operating system for many-core architectures. @@ -97,7 +97,7 @@ [XVM]: http://xvm.mit.edu/ [Corey]: http://pdos.csail.mit.edu/~sbw/corey/ -[VoltDB]: http://db.cs.yale.edu/hstore/ +[H-Store]: http://db.cs.yale.edu/hstore/ [WebTables]: slides/webtables-presentation-google07.pdf [Scalable Resilient Overlay Networks]: http://nms.csail.mit.edu/ron/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-09 08:43:32
|
Revision: 1126 http://assorted.svn.sourceforge.net/assorted/?rev=1126&view=rev Author: yangzhang Date: 2009-01-09 08:43:21 +0000 (Fri, 09 Jan 2009) Log Message: ----------- tweaks Modified Paths: -------------- configs/trunk/setup-yang.bash configs/trunk/src/devscripts configs/trunk/src/pythonrc.py Modified: configs/trunk/setup-yang.bash =================================================================== --- configs/trunk/setup-yang.bash 2009-01-09 08:39:19 UTC (rev 1125) +++ configs/trunk/setup-yang.bash 2009-01-09 08:43:21 UTC (rev 1126) @@ -16,6 +16,7 @@ install .astylerc astylerc install .darcs/ darcs/boring install .devscripts devscripts +install .dput.cf dput.cf install .inputrc inputrc install .gitconfig gitconfig install .gitignore gitignore Modified: configs/trunk/src/devscripts =================================================================== --- configs/trunk/src/devscripts 2009-01-09 08:39:19 UTC (rev 1125) +++ configs/trunk/src/devscripts 2009-01-09 08:43:21 UTC (rev 1126) @@ -1 +1 @@ -DEBUILD_DPKG_BUILDPACKAGE_OPTS='-us -uc -sa' +# DEBUILD_DPKG_BUILDPACKAGE_OPTS='-us -uc -sa' Modified: configs/trunk/src/pythonrc.py =================================================================== --- configs/trunk/src/pythonrc.py 2009-01-09 08:39:19 UTC (rev 1125) +++ configs/trunk/src/pythonrc.py 2009-01-09 08:43:21 UTC (rev 1126) @@ -1,6 +1,6 @@ from __future__ import ( generators, with_statement ) import os, sys -from cStringIO import * +#from cStringIO import * from itertools import * import readline, rlcompleter readline.parse_and_bind( 'tab: complete' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-09 08:39:24
|
Revision: 1125 http://assorted.svn.sourceforge.net/assorted/?rev=1125&view=rev Author: yangzhang Date: 2009-01-09 08:39:19 +0000 (Fri, 09 Jan 2009) Log Message: ----------- added exercise for converting sloccount-2.26 to cdbs Added Paths: ----------- sandbox/trunk/src/deb/sloccount/ sandbox/trunk/src/deb/sloccount/sloccount-2.26/ sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/ sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/rules sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/sloccount.links Added: sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/rules =================================================================== --- sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/rules (rev 0) +++ sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/rules 2009-01-09 08:39:19 UTC (rev 1125) @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk +DEB_MAKE_INSTALL_TARGET := install PREFIX=$(DEB_DESTDIR)/usr Property changes on: sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/rules ___________________________________________________________________ Added: svn:executable + * Added: sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/sloccount.links =================================================================== --- sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/sloccount.links (rev 0) +++ sandbox/trunk/src/deb/sloccount/sloccount-2.26/debian/sloccount.links 2009-01-09 08:39:19 UTC (rev 1125) @@ -0,0 +1,40 @@ +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/c_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/java_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/lexcount1.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/pascal_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/php_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/jsp_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/ml_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/ada_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/asm_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/awk_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/break_filelist.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/cobol_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/compute_all.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/compute_sloc_lang.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/count_extensions.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/count_unknown_ext.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/csh_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/exp_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/fortran_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/f90_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/generic_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/get_sloc.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/get_sloc_details.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/haskell_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/lex_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/lisp_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/make_filelists.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/makefile_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/modula3_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/objc_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/perl_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/print_sum.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/python_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/ruby_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/sed_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/sh_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/show_filecount.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/sloccount.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/sql_count.1.gz +usr/share/man/man1/sloccount.1.gz usr/share/man/man1/tcl_count.1.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-09 08:36:02
|
Revision: 1124 http://assorted.svn.sourceforge.net/assorted/?rev=1124&view=rev Author: yangzhang Date: 2009-01-09 08:35:58 +0000 (Fri, 09 Jan 2009) Log Message: ----------- added (and uploaded) helloworld example Added Paths: ----------- sandbox/trunk/src/deb/helloworld/ sandbox/trunk/src/deb/helloworld/helloworld-1.0/ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/changelog sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/compat sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/control sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/copyright sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/install sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/rules sandbox/trunk/src/deb/helloworld/helloworld-1.0/helloworld sandbox/trunk/src/deb/helloworld/helloworld_1.0.orig.tar.gz Added: sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/changelog =================================================================== --- sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/changelog (rev 0) +++ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/changelog 2009-01-09 08:35:58 UTC (rev 1124) @@ -0,0 +1,12 @@ +helloworld (1.0-1ubuntu1) intrepid; urgency=low + + * Fixing something + + -- Yang Zhang <ya...@gm...> Fri, 09 Jan 2009 03:08:32 -0500 + +helloworld (1.0-1) unstable; urgency=low + + * Initial release + + -- Yang Zhang <ya...@gm...> Fri, 09 Jan 2009 01:28:13 -0500 + Added: sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/compat =================================================================== --- sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/compat (rev 0) +++ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/compat 2009-01-09 08:35:58 UTC (rev 1124) @@ -0,0 +1 @@ +5 Added: sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/control =================================================================== --- sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/control (rev 0) +++ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/control 2009-01-09 08:35:58 UTC (rev 1124) @@ -0,0 +1,14 @@ +Source: helloworld +Section: utils +Priority: extra +Maintainer: Yang Zhang <ya...@gm...> +Build-Depends: cdbs, debhelper (>= 7) +Standards-Version: 3.8.0 +Homepage: http://assorted.sf.net/ + +Package: helloworld +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Yang's first package! + This is Yang's first package. It was created following + <http://ubuntuforums.org/showthread.php?t=929498>. Added: sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/copyright =================================================================== --- sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/copyright (rev 0) +++ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/copyright 2009-01-09 08:35:58 UTC (rev 1124) @@ -0,0 +1,22 @@ +This package was debianized by Yang Zhang <ya...@gm...> on +Fri, 09 Jan 2009 01:28:13 -0500. + +It was downloaded from http://assorted.sf.net/ + +Upstream Author(s): + + Yang Zhang <ya...@gm...> + +Copyright: + + Copyright (C) 2009 Yang Zhang + +License: + + This software (including its Debian packaging) + is available to you under the terms + of the GPL-3, see "/usr/share/common-licenses/GPL-3". + You can also use it under the terms of any other GPL version. + +The Debian packaging is (C) 2009, Yang Zhang <ya...@gm...> and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. Added: sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/install =================================================================== --- sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/install (rev 0) +++ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/install 2009-01-09 08:35:58 UTC (rev 1124) @@ -0,0 +1 @@ +helloworld /usr/bin/ Added: sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/rules =================================================================== --- sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/rules (rev 0) +++ sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/rules 2009-01-09 08:35:58 UTC (rev 1124) @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk + +binary-install/helloworld:: + dh_icons + +binary-fixup/helloworld:: + dh_gconf --priority=16 Property changes on: sandbox/trunk/src/deb/helloworld/helloworld-1.0/debian/rules ___________________________________________________________________ Added: svn:executable + * Added: sandbox/trunk/src/deb/helloworld/helloworld-1.0/helloworld =================================================================== --- sandbox/trunk/src/deb/helloworld/helloworld-1.0/helloworld (rev 0) +++ sandbox/trunk/src/deb/helloworld/helloworld-1.0/helloworld 2009-01-09 08:35:58 UTC (rev 1124) @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +echo 'Hello, world!' Property changes on: sandbox/trunk/src/deb/helloworld/helloworld-1.0/helloworld ___________________________________________________________________ Added: svn:executable + * Added: sandbox/trunk/src/deb/helloworld/helloworld_1.0.orig.tar.gz =================================================================== (Binary files differ) Property changes on: sandbox/trunk/src/deb/helloworld/helloworld_1.0.orig.tar.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-09 06:27:38
|
Revision: 1123 http://assorted.svn.sourceforge.net/assorted/?rev=1123&view=rev Author: yangzhang Date: 2009-01-09 06:27:26 +0000 (Fri, 09 Jan 2009) Log Message: ----------- added mkcdbs Modified Paths: -------------- shell-tools/trunk/src/bash-commons/common.bash Modified: shell-tools/trunk/src/bash-commons/common.bash =================================================================== --- shell-tools/trunk/src/bash-commons/common.bash 2009-01-08 22:39:12 UTC (rev 1122) +++ shell-tools/trunk/src/bash-commons/common.bash 2009-01-09 06:27:26 UTC (rev 1123) @@ -513,6 +513,11 @@ mv "$path" "${path%.*}" } +mkcdbs() { + echo -e 'b\n\n' | dh_make --createorig + rm debian/{dirs,docs,README*,*.ex,*.EX} +} + #if ! is_declared indent ; then # noindent #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-08 22:39:17
|
Revision: 1122 http://assorted.svn.sourceforge.net/assorted/?rev=1122&view=rev Author: yangzhang Date: 2009-01-08 22:39:12 +0000 (Thu, 08 Jan 2009) Log Message: ----------- added some more sources Modified Paths: -------------- google-file-search/trunk/src/gfs.php Modified: google-file-search/trunk/src/gfs.php =================================================================== --- google-file-search/trunk/src/gfs.php 2009-01-08 20:54:59 UTC (rev 1121) +++ google-file-search/trunk/src/gfs.php 2009-01-08 22:39:12 UTC (rev 1122) @@ -1,7 +1,78 @@ <?php $services = explode( ' ', - 'megaupload rapidshare zshare yousendit mediafire badongo' + 'megaupload rapidshare zshare yousendit mediafire badongo netload ' . + 'depositfiles turboupload' + # Support by rapget: + #rapidshare.com + #rapidshare.de + #megaupload.com + #sexuploader.com + #mytempdir.com + #slil.ru + #sendspace.com + #turboupload.com + #speedshare.org + #hyperupload.com + #getfile.biz + #depositfiles.com + #webfile.ru + #fileshare.in.ua + #rapidupload.com + #yourfile.org + #yourfilehost.com + #filehd.com + #mooload.com + #letitbit.net + #filepost.ru + #justupit.com + #simpleupload.de + #2shared.com + #yourfilelink.com + #files.to + #savefile.com + #filebest.ru + #freefileupload.net + #4shared.com + #netload.us + #uploading.com + #f-forge.com + #f-forge.com + #hotfile.ru + #ifolder.ru + #oxyshare.com + #filecloud.com + #datenklo.net + #zshare.net + #filefactory.com + #filespace.ru + #badongo.net + #easy-sharing.com + #upload2.net + #dosyaekle.com + #up-file.com + #rapidshare.fr + #uploadyourfiles.de + #quickdump.com + #megashares.com + #box.net + #takdata.com + #bonpoo.com + #share.am + #recfile.com + #speedyshare.com + #free-transfer.de + #mediafire.com + #come2store.com + #ultrashare.de + #rapidsafe.de + #rapidshare.ru + #filecache.de + #shareua.com + #up.spbland.ru + #mihd.net + #sceneupload.net + #bigshare.net ); if ($_POST['query']) { $query = urlencode(implode(' | ', $services) . ' ' . $_POST['query']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-08 20:55:07
|
Revision: 1121 http://assorted.svn.sourceforge.net/assorted/?rev=1121&view=rev Author: yangzhang Date: 2009-01-08 20:54:59 +0000 (Thu, 08 Jan 2009) Log Message: ----------- added elinks-config demo of packages-config Added Paths: ----------- sandbox/trunk/src/deb/elinks/ sandbox/trunk/src/deb/elinks/README sandbox/trunk/src/deb/elinks/elinks-config-1.0/ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/changelog sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/compat sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/control sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/copyright sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/elinks-config.install sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/rules sandbox/trunk/src/deb/elinks/elinks-config-1.0/elinks.debathena Copied: sandbox/trunk/src/deb/elinks/README (from rev 1120, sandbox/trunk/src/deb/dhclient/README) =================================================================== --- sandbox/trunk/src/deb/elinks/README (rev 0) +++ sandbox/trunk/src/deb/elinks/README 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1 @@ +A demo of how to use config-packages-dev Added: sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/changelog =================================================================== --- sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/changelog (rev 0) +++ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/changelog 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1,6 @@ +elinks-config (1.0-1) unstable; urgency=low + + * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP> + + -- Yang Zhang <y_...@mi...> Thu, 8 Jan 2009 15:31:45 -0500 + Added: sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/compat =================================================================== --- sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/compat (rev 0) +++ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/compat 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1 @@ +5 Added: sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/control =================================================================== --- sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/control (rev 0) +++ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/control 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1,12 @@ +Source: elinks-config +Section: unknown +Priority: extra +Maintainer: Yang Zhang <y_...@mi...> +Build-Depends: cdbs, cdbs, debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: elinks-config +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: <insert up to 60 chars description> + <insert long description, indented with spaces> Added: sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/copyright =================================================================== --- sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/copyright (rev 0) +++ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/copyright 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1,22 @@ +This package was debianized by Yang Zhang <y_...@mi...> on +Thu, 8 Jan 2009 15:31:45 -0500. + +It was downloaded from <fill in http/ftp site> + +Upstream Author: <put author(s) name and email here> + +Copyright: <put the year(s) of the copyright, and the names of the + copyright holder(s) here> + +License: + +<Put the license of the package here> + + +The Debian packaging is (C) 2009, Yang Zhang <y_...@mi...> and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. + Added: sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/elinks-config.install =================================================================== --- sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/elinks-config.install (rev 0) +++ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/elinks-config.install 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1 @@ +elinks.debathena usr/bin/ Added: sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/rules =================================================================== --- sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/rules (rev 0) +++ sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/rules 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/config-package.mk +DEB_DIVERT_EXTENSION = .debathena +DEB_DIVERT_FILES_elinks-config += /usr/bin/elinks.debathena Property changes on: sandbox/trunk/src/deb/elinks/elinks-config-1.0/debian/rules ___________________________________________________________________ Added: svn:executable + * Added: sandbox/trunk/src/deb/elinks/elinks-config-1.0/elinks.debathena =================================================================== --- sandbox/trunk/src/deb/elinks/elinks-config-1.0/elinks.debathena (rev 0) +++ sandbox/trunk/src/deb/elinks/elinks-config-1.0/elinks.debathena 2009-01-08 20:54:59 UTC (rev 1121) @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +ELINKS_CONFDIR=$ATHENA_SESSION_TMPDIR exec elinks Property changes on: sandbox/trunk/src/deb/elinks/elinks-config-1.0/elinks.debathena ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-08 20:28:53
|
Revision: 1120 http://assorted.svn.sourceforge.net/assorted/?rev=1120&view=rev Author: yangzhang Date: 2009-01-08 20:28:43 +0000 (Thu, 08 Jan 2009) Log Message: ----------- added debian packaging demos Added Paths: ----------- sandbox/trunk/src/deb/ sandbox/trunk/src/deb/dhclient/ sandbox/trunk/src/deb/dhclient/README sandbox/trunk/src/deb/dhclient/dhclient-1.0/ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/changelog sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/compat sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/control sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/copyright sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/files sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/rules sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/transform_dhclient.conf.debathena sandbox/trunk/src/deb/dhclient/dhclient_1.0.orig.tar.gz Added: sandbox/trunk/src/deb/dhclient/README =================================================================== --- sandbox/trunk/src/deb/dhclient/README (rev 0) +++ sandbox/trunk/src/deb/dhclient/README 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1 @@ +A demo of how to use config-packages-dev Added: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/changelog =================================================================== --- sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/changelog (rev 0) +++ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/changelog 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1,6 @@ +dhclient (1.0-1) unstable; urgency=low + + * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP> + + -- Yang Zhang <Yang Zhang <y_...@mi...>> Thu, 8 Jan 2009 14:48:44 -0500 + Added: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/compat =================================================================== --- sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/compat (rev 0) +++ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/compat 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1 @@ +5 Added: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/control =================================================================== --- sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/control (rev 0) +++ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/control 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1,14 @@ +Source: dhclient +Section: debathena-config/net +Priority: extra +Maintainer: Yang Zhang <y_...@mi...> +Build-Depends: cdbs, debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: dhclient +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: ${diverted-files} +Conflicts: ${diverted-files} +Description: <insert up to 60 chars description> + <insert long description, indented with spaces> Added: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/copyright =================================================================== --- sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/copyright (rev 0) +++ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/copyright 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1,22 @@ +This package was debianized by Yang Zhang <Yang Zhang <y_...@mi...>> on +Thu, 8 Jan 2009 14:48:44 -0500. + +It was downloaded from <fill in http/ftp site> + +Upstream Author: <put author(s) name and email here> + +Copyright: <put the year(s) of the copyright, and the names of the + copyright holder(s) here> + +License: + +<Put the license of the package here> + + +The Debian packaging is (C) 2009, Yang Zhang <Yang Zhang <y_...@mi...>> and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. + Added: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/files =================================================================== --- sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/files (rev 0) +++ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/files 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1 @@ +dhclient_1.0-1_all.deb debathena-config/net extra Added: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/rules =================================================================== --- sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/rules (rev 0) +++ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/rules 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +DEB_DIVERT_EXTENSION = .debathena +DEB_TRANSFORM_FILES_dhclient += /etc/dhcp3/dhclient.conf.debathena +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/config-package.mk Property changes on: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/rules ___________________________________________________________________ Added: svn:executable + * Added: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/transform_dhclient.conf.debathena =================================================================== --- sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/transform_dhclient.conf.debathena (rev 0) +++ sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/transform_dhclient.conf.debathena 2009-01-08 20:28:43 UTC (rev 1120) @@ -0,0 +1,4 @@ +#!/usr/bin/perl -0p +print 'supersede domain-name "mit.edu"; +supersede domain-name-servers 18.70.0.160, 18.71.0.3, 18.72.0.151; +' Property changes on: sandbox/trunk/src/deb/dhclient/dhclient-1.0/debian/transform_dhclient.conf.debathena ___________________________________________________________________ Added: svn:executable + * Added: sandbox/trunk/src/deb/dhclient/dhclient_1.0.orig.tar.gz =================================================================== (Binary files differ) Property changes on: sandbox/trunk/src/deb/dhclient/dhclient_1.0.orig.tar.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-08 06:27:37
|
Revision: 1119 http://assorted.svn.sourceforge.net/assorted/?rev=1119&view=rev Author: yangzhang Date: 2009-01-08 06:27:23 +0000 (Thu, 08 Jan 2009) Log Message: ----------- added ordering demo Added Paths: ----------- sandbox/trunk/src/make/order.mk Added: sandbox/trunk/src/make/order.mk =================================================================== --- sandbox/trunk/src/make/order.mk (rev 0) +++ sandbox/trunk/src/make/order.mk 2009-01-08 06:27:23 UTC (rev 1119) @@ -0,0 +1,7 @@ +# Whole makefile is processed first (setting variables) before rules are +# executed. + +all: + echo $(X) + +X := hello This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-08 06:18:45
|
Revision: 1118 http://assorted.svn.sourceforge.net/assorted/?rev=1118&view=rev Author: yangzhang Date: 2009-01-08 06:18:40 +0000 (Thu, 08 Jan 2009) Log Message: ----------- added webget Added Paths: ----------- webget/ webget/trunk/ webget/trunk/README webget/trunk/src/ webget/trunk/src/index.php Added: webget/trunk/README =================================================================== --- webget/trunk/README (rev 0) +++ webget/trunk/README 2009-01-08 06:18:40 UTC (rev 1118) @@ -0,0 +1,4 @@ +Overview +-------- + +A web interface to downloading files - a quick and dirty "proxy." Added: webget/trunk/src/index.php =================================================================== --- webget/trunk/src/index.php (rev 0) +++ webget/trunk/src/index.php 2009-01-08 06:18:40 UTC (rev 1118) @@ -0,0 +1,19 @@ +<? +if($_GET['url'] && strpos($_GET['url'], "http://") == 0) { + $log = fopen('log', 'a'); + fwrite($log, strftime('%c') . ": " . $_SERVER['REMOTE_ADDR'] . " requests " . $_GET['url'] . "\n"); + fclose($log); + $s = fopen($_GET['url'], "r"); + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="downloaded.pdf"'); + print stream_get_contents($s); + fclose($s); +} else { +?> +<form action="." method="GET"> + <input type="text" name="url" size="100"/> + <input type="submit"/> +</form> +<? +} +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-08 06:15:32
|
Revision: 1117 http://assorted.svn.sourceforge.net/assorted/?rev=1117&view=rev Author: yangzhang Date: 2009-01-08 06:15:24 +0000 (Thu, 08 Jan 2009) Log Message: ----------- added quiltrc Modified Paths: -------------- configs/trunk/setup-yang.bash Added Paths: ----------- configs/trunk/src/quiltrc Modified: configs/trunk/setup-yang.bash =================================================================== --- configs/trunk/setup-yang.bash 2009-01-04 10:45:25 UTC (rev 1116) +++ configs/trunk/setup-yang.bash 2009-01-08 06:15:24 UTC (rev 1117) @@ -21,6 +21,7 @@ install .gitignore gitignore install .owl owl install .pythonrc.py pythonrc.py +install .quiltrc quiltrc install .screenrc screenrc install .signature signature install .ssh/ ssh/config Added: configs/trunk/src/quiltrc =================================================================== --- configs/trunk/src/quiltrc (rev 0) +++ configs/trunk/src/quiltrc 2009-01-08 06:15:24 UTC (rev 1117) @@ -0,0 +1 @@ +QUILT_PATCHES=debian/patches This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2009-01-04 10:45:33
|
Revision: 1116 http://assorted.svn.sourceforge.net/assorted/?rev=1116&view=rev Author: yangzhang Date: 2009-01-04 10:45:25 +0000 (Sun, 04 Jan 2009) Log Message: ----------- added pygtk demo Added Paths: ----------- sandbox/trunk/src/py/pygtk_demo.py Added: sandbox/trunk/src/py/pygtk_demo.py =================================================================== --- sandbox/trunk/src/py/pygtk_demo.py (rev 0) +++ sandbox/trunk/src/py/pygtk_demo.py 2009-01-04 10:45:25 UTC (rev 1116) @@ -0,0 +1,23 @@ +#!/usr/bin/env python +from gtk import * + +def trace(msg): print msg + +w = Window() +# handle window closing; returning False signals 'destroy' +w.connect('delete_event', lambda *args: trace('delete_event') or False) +# handle gtk_widget_destroy() or False from 'delete_event' +w.connect('destroy', lambda *args: trace('destroy') or main_quit()) + +b = Button('hello') +# can chain multiple callbacks +b.connect('clicked', lambda *args: trace('clicked1') or trace('world')) +b.connect('clicked', lambda *args: trace('clicked2') or w.destroy()) +# another way to callback to a method +#b.connect_object('clicked', Widget.destroy, w) +w.add(b) +# this is necessary +b.show() + +w.show() +main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-31 01:08:44
|
Revision: 1115 http://assorted.svn.sourceforge.net/assorted/?rev=1115&view=rev Author: yangzhang Date: 2008-12-31 01:08:35 +0000 (Wed, 31 Dec 2008) Log Message: ----------- new interaction model: single text box for all labels, delimited by separator char, a la delicious/google bookmarks Modified Paths: -------------- music-labeler/trunk/src/ml.py Modified: music-labeler/trunk/src/ml.py =================================================================== --- music-labeler/trunk/src/ml.py 2008-12-30 10:32:13 UTC (rev 1114) +++ music-labeler/trunk/src/ml.py 2008-12-31 01:08:35 UTC (rev 1115) @@ -4,18 +4,26 @@ from cgi import escape import gtk.keysyms as k, gtk.gdk as gdk +class struct(object): pass + +def debug(*args): + if do_debug: print ' '.join(map(str,args)) + def connecting(widget, signal): def wrapper(handler): widget.connect(signal, handler) return handler return wrapper -#class CompletionEntry(Entry): -# def __init__(self, *args): -# Entry.__init__(self, *args) -# def asdf +def connecting_after(widget, signal): + def wrapper(handler): + widget.connect_after(signal, handler) + return handler + return wrapper def mainwin(): + sep = ';' + w = Window() w.set_title('Music Labeler') w.connect('delete-event', lambda *args: False) @@ -26,140 +34,154 @@ es = [] - def addlabel(): - 'Add a label field' + def refresh(): + 'Called when the list is changed.' + labels.sort(key = str.lower) + on_change() - def refresh(): - 'Called when the list is changed.' - labels.sort(key = str.lower) - on_change() + e = Entry() + self = struct() - e = Entry() + def get_pieces(do_strip = False, truncate = False): + """Return left, mid, right, where mid is the part of the Entry that the + cursor is currently positioned over, and left and right is all the text + to the left and right, respectively. If do_strip is True, also strip off + whitespace around mid.""" + pos = e.get_position() + cur = e.get_text() + if truncate: cur = cur[:pos] + start = max(cur.rfind(sep, 0, pos) + 1, 0) + end = cur.find(sep, pos) % (len(cur) + 1) + mid = cur[start:end] + res = (cur[:start], (mid.strip() if do_strip else mid), cur[end:]) + debug(pos, start, end, mid, res) + return res - @connecting(e, 'focus-out-event') - def on_focus_out(*args): - 'Destroy the pop-up completion window.' - print 'focus-out' + def get_mid(): return get_pieces(True)[1] + def get_prefix(): return get_pieces(True, True)[1] - @connecting(e, 'focus') - def on_focus(*args): - print 'focus' - #t.destroy() + @connecting(e, 'focus-out-event') + def on_focus_out(*args): + 'Destroy the pop-up completion window.' + debug('focus-out') - @connecting(e, 'focus-in-event') - def on_focus_in(*args): - print 'focus-in' + @connecting(e, 'focus') + def on_focus(*args): + debug('focus') - @connecting(e, 'changed') - def on_change(*args): - 'Filter and highlight the list based on entered text.' - pat = e.get_text().lower() - # TODO: make the matching match up with the highlighting (use - # word-boundaries) - matches = [lbl for lbl in labels if pat in lbl.lower()] - l.clear() - for m in matches: - pieces = [] - lasti = i = 0 - lp = len(pat) - if pat != '': - while i <= len(m) - lp: - if (i == 0 or not m[i-1].isalnum()) and m[i:i+lp].lower() == pat: - pieces += [m[lasti:i], (m[i:i+lp],)] - i += lp - lasti = i - else: - i += 1 - pieces += [m[lasti:]] - m = ''.join(('<b>' + escape(p[0]) + '</b>' - if type(p) == tuple - else escape(p)) - for p in pieces) - else: - m = escape(m) - l.append([m]) - # Something is always selected in the list. - t.get_selection().select_path(0) + @connecting(e, 'focus-in-event') + def on_focus_in(*args): + debug('focus-in') - @connecting(e, 'key-press-event') - def on_key_press(src, ev): - 'Handle special keys.' + @connecting_after(e, 'notify::cursor-position') + def on_change(*args): + 'Filter and highlight the list based on entered text.' + pat = get_prefix().lower() + # TODO: make the matching match up with the highlighting (use + # word-boundaries) + self.matches = matches = [lbl for lbl in labels if pat in lbl.lower()] + l.clear() + for m in matches: + pieces = [] + lasti = i = 0 + lp = len(pat) + if pat != '': + while i <= len(m) - lp: + if (i == 0 or not m[i-1].isalnum()) and m[i:i+lp].lower() == pat: + pieces += [m[lasti:i], (m[i:i+lp],)] + i += lp + lasti = i + else: + i += 1 + pieces += [m[lasti:]] + m = ''.join(('<b>' + escape(p[0]) + '</b>' + if type(p) == tuple + else escape(p)) + for p in pieces) + else: + m = escape(m) + l.append([m]) + # Something is always selected in the list. + t.get_selection().select_path(0) - def complete(): - '''Complete the entered text using currently highlighted list item and - advance focus to the next label (creating one if necessary).''' - # Complete. - mdl, itr = t.get_selection().get_selected() - assert mdl is l + @connecting(e, 'key-press-event') + def on_key_press(src, ev): + 'Handle special keys.' + + def complete(): + '''Complete the entered text using currently highlighted list item and + advance focus to the next label (creating one if necessary).''' + # Complete. + mdl, itr = t.get_selection().get_selected() + assert mdl is l + (pos,) = l.get_path(itr) + left, mid, right = get_pieces(True) + debug(repr(left), repr(mid), repr(right)) + if left != '' and not left[-1:].isspace(): left += ' ' + before_pos = left + self.matches[pos] + sep + if not right[:0].isspace(): before_pos += ' ' + e.set_text(before_pos + right) + e.set_position(len(before_pos)) + + if ev.keyval in [k.Down, k.Up] or \ + (ev.keyval in [k.n, k.p] and ev.state == gdk.CONTROL_MASK): + # Up/down selects prev/next row in the list, if possible, and scroll to + # center that row. + sel = t.get_selection() + mdl, itr = sel.get_selected() + assert mdl is l + dir = 1 if ev.keyval == k.Down or \ + (ev.keyval == k.n and ev.state == gdk.CONTROL_MASK) else -1 + if itr is not None: (pos,) = l.get_path(itr) - e.set_text(labels[pos]) - e.set_position(-1) - # Advance. - fieldno = es.index(e) - nexte = addlabel() if fieldno == len(es) - 1 else es[fieldno + 1] - nexte.grab_focus() - - if ev.keyval in [k.Down, k.Up] or \ - (ev.keyval in [k.n, k.p] and ev.state == gdk.CONTROL_MASK): - # Up/down selects prev/next row in the list, if possible, and scroll to - # center that row. - sel = t.get_selection() - mdl, itr = sel.get_selected() - assert mdl is l - dir = 1 if ev.keyval == k.Down or \ - (ev.keyval == k.n and ev.state == gdk.CONTROL_MASK) else -1 - if itr is not None: - (pos,) = l.get_path(itr) - pos += dir - else: - pos = 0 if ev.keyval == k.Down else len(l) - 1 - if 0 <= pos < len(l): - sel.select_path(pos) - t.scroll_to_cell(pos, None, True, .5, .5) - return True - elif ev.keyval in [k.Tab]: - # Tab completes. + pos += dir + else: + pos = 0 if ev.keyval == k.Down else len(l) - 1 + if 0 <= pos < len(l): + sel.select_path(pos) + t.scroll_to_cell(pos, None, True, .5, .5) + return True + elif ev.keyval in [k.Tab]: + # Tab completes. + complete() + return True + elif ev.keyval in [k.Return]: + # If a new label is entered, add that to the list. If the label + # exists, behave as Tab. If nothing is entered, finish with this song + # and move on. + txt = get_mid() + if txt == '': + pass # TODO: move on to next song + elif txt not in labels: + labels.append(txt) + refresh() + elif txt in labels: complete() - return True - elif ev.keyval in [k.Return]: - # If a new label is entered, add that to the list. If the label - # exists, behave as Tab. If nothing is entered, finish with this song - # and move on. - txt = e.get_text() - if txt == '': - pass # TODO: move on to next song - elif txt not in labels: - labels.append(txt) - refresh() - elif txt in labels: - complete() - return True + return True - # The pop-up list box window. - tw = Window(WINDOW_POPUP) - tw.set_transient_for(w) - tw.set_default_size(100, 200) - tw.set_accept_focus(False) - l = ListStore(str) - t = TreeView(l) - t.set_headers_visible(False) - t.append_column(TreeViewColumn(None, CellRendererText(), markup = 0)) - s = ScrolledWindow() - s.add(t) - s.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) - tw.add(s) - refresh() - ew,eh = e.size_request() - #tw.move() - tw.show_all() + # The pop-up list box window. + tw = Window(WINDOW_POPUP) + tw.set_transient_for(w) + tw.set_default_size(100, 200) + tw.set_accept_focus(False) + l = ListStore(str) + t = TreeView(l) + t.set_headers_visible(False) + t.append_column(TreeViewColumn(None, CellRendererText(), markup = 0)) + s = ScrolledWindow() + s.add(t) + s.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) + tw.add(s) + refresh() + ew,eh = e.size_request() + # TODO: figure out how to position the pop-up window correctly. + #tw.move() + tw.show_all() - # Final steps. - h.pack_start(e) - w.show_all() - es.append(e) - return e - - addlabel() + # Final steps. + h.pack_start(e) + w.show_all() + es.append(e) main() if __name__ == '__main__': @@ -167,4 +189,5 @@ from os.path import expanduser from urllib import quote, unquote labels = map(unquote, listdir(expanduser('~/.quodlibet/playlists/'))) + do_debug = False mainwin() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-30 10:32:29
|
Revision: 1114 http://assorted.svn.sourceforge.net/assorted/?rev=1114&view=rev Author: yangzhang Date: 2008-12-30 10:32:13 +0000 (Tue, 30 Dec 2008) Log Message: ----------- started gtk version; currently designed to use multiple entry fields (one label per field); pop-up positioning is broken, and focus-in/focus-out don't work for creating/destroying the pop-up Added Paths: ----------- music-labeler/trunk/ music-labeler/trunk/README music-labeler/trunk/src/ music-labeler/trunk/src/ml.py Added: music-labeler/trunk/README =================================================================== --- music-labeler/trunk/README (rev 0) +++ music-labeler/trunk/README 2008-12-30 10:32:13 UTC (rev 1114) @@ -0,0 +1,20 @@ +Overview +-------- + +Label your music using a tagging interface not unlike those of online bookmark +managers. + +Setup +----- + +Requirements: + +- [pygtk] 2.13 +- [Python Commons] + +Related +------- + +Another application that demonstrates GTK autocompletion is [drun] + +[drun]: http://sourceforge.net/projects/drun/ Added: music-labeler/trunk/src/ml.py =================================================================== --- music-labeler/trunk/src/ml.py (rev 0) +++ music-labeler/trunk/src/ml.py 2008-12-30 10:32:13 UTC (rev 1114) @@ -0,0 +1,170 @@ +#!/usr/bin/env python + +from gtk import * +from cgi import escape +import gtk.keysyms as k, gtk.gdk as gdk + +def connecting(widget, signal): + def wrapper(handler): + widget.connect(signal, handler) + return handler + return wrapper + +#class CompletionEntry(Entry): +# def __init__(self, *args): +# Entry.__init__(self, *args) +# def asdf + +def mainwin(): + w = Window() + w.set_title('Music Labeler') + w.connect('delete-event', lambda *args: False) + w.connect('destroy', lambda *args: main_quit()) + + h = HBox() + w.add(h) + + es = [] + + def addlabel(): + 'Add a label field' + + def refresh(): + 'Called when the list is changed.' + labels.sort(key = str.lower) + on_change() + + e = Entry() + + @connecting(e, 'focus-out-event') + def on_focus_out(*args): + 'Destroy the pop-up completion window.' + print 'focus-out' + + @connecting(e, 'focus') + def on_focus(*args): + print 'focus' + #t.destroy() + + @connecting(e, 'focus-in-event') + def on_focus_in(*args): + print 'focus-in' + + @connecting(e, 'changed') + def on_change(*args): + 'Filter and highlight the list based on entered text.' + pat = e.get_text().lower() + # TODO: make the matching match up with the highlighting (use + # word-boundaries) + matches = [lbl for lbl in labels if pat in lbl.lower()] + l.clear() + for m in matches: + pieces = [] + lasti = i = 0 + lp = len(pat) + if pat != '': + while i <= len(m) - lp: + if (i == 0 or not m[i-1].isalnum()) and m[i:i+lp].lower() == pat: + pieces += [m[lasti:i], (m[i:i+lp],)] + i += lp + lasti = i + else: + i += 1 + pieces += [m[lasti:]] + m = ''.join(('<b>' + escape(p[0]) + '</b>' + if type(p) == tuple + else escape(p)) + for p in pieces) + else: + m = escape(m) + l.append([m]) + # Something is always selected in the list. + t.get_selection().select_path(0) + + @connecting(e, 'key-press-event') + def on_key_press(src, ev): + 'Handle special keys.' + + def complete(): + '''Complete the entered text using currently highlighted list item and + advance focus to the next label (creating one if necessary).''' + # Complete. + mdl, itr = t.get_selection().get_selected() + assert mdl is l + (pos,) = l.get_path(itr) + e.set_text(labels[pos]) + e.set_position(-1) + # Advance. + fieldno = es.index(e) + nexte = addlabel() if fieldno == len(es) - 1 else es[fieldno + 1] + nexte.grab_focus() + + if ev.keyval in [k.Down, k.Up] or \ + (ev.keyval in [k.n, k.p] and ev.state == gdk.CONTROL_MASK): + # Up/down selects prev/next row in the list, if possible, and scroll to + # center that row. + sel = t.get_selection() + mdl, itr = sel.get_selected() + assert mdl is l + dir = 1 if ev.keyval == k.Down or \ + (ev.keyval == k.n and ev.state == gdk.CONTROL_MASK) else -1 + if itr is not None: + (pos,) = l.get_path(itr) + pos += dir + else: + pos = 0 if ev.keyval == k.Down else len(l) - 1 + if 0 <= pos < len(l): + sel.select_path(pos) + t.scroll_to_cell(pos, None, True, .5, .5) + return True + elif ev.keyval in [k.Tab]: + # Tab completes. + complete() + return True + elif ev.keyval in [k.Return]: + # If a new label is entered, add that to the list. If the label + # exists, behave as Tab. If nothing is entered, finish with this song + # and move on. + txt = e.get_text() + if txt == '': + pass # TODO: move on to next song + elif txt not in labels: + labels.append(txt) + refresh() + elif txt in labels: + complete() + return True + + # The pop-up list box window. + tw = Window(WINDOW_POPUP) + tw.set_transient_for(w) + tw.set_default_size(100, 200) + tw.set_accept_focus(False) + l = ListStore(str) + t = TreeView(l) + t.set_headers_visible(False) + t.append_column(TreeViewColumn(None, CellRendererText(), markup = 0)) + s = ScrolledWindow() + s.add(t) + s.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) + tw.add(s) + refresh() + ew,eh = e.size_request() + #tw.move() + tw.show_all() + + # Final steps. + h.pack_start(e) + w.show_all() + es.append(e) + return e + + addlabel() + main() + +if __name__ == '__main__': + from os import listdir + from os.path import expanduser + from urllib import quote, unquote + labels = map(unquote, listdir(expanduser('~/.quodlibet/playlists/'))) + mainwin() Property changes on: music-labeler/trunk/src/ml.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-28 09:00:15
|
Revision: 1113 http://assorted.svn.sourceforge.net/assorted/?rev=1113&view=rev Author: yangzhang Date: 2008-12-28 09:00:11 +0000 (Sun, 28 Dec 2008) Log Message: ----------- moved pyjamas code base to branch Added Paths: ----------- music-labeler/branches/ music-labeler/branches/pyjamas/ Removed Paths: ------------- music-labeler/trunk/ Property changes on: music-labeler/branches/pyjamas ___________________________________________________________________ Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-28 08:54:07
|
Revision: 1112 http://assorted.svn.sourceforge.net/assorted/?rev=1112&view=rev Author: yangzhang Date: 2008-12-28 08:53:59 +0000 (Sun, 28 Dec 2008) Log Message: ----------- added skeleton for music-labeler, written in pyjamas Added Paths: ----------- music-labeler/ music-labeler/trunk/ music-labeler/trunk/README music-labeler/trunk/src/ music-labeler/trunk/src/ml.py music-labeler/trunk/src/public/ music-labeler/trunk/src/public/ml.html music-labeler/trunk/src/public/services/ music-labeler/trunk/src/public/services/ml.py music-labeler/trunk/tools/ music-labeler/trunk/tools/run.py Added: music-labeler/trunk/README =================================================================== --- music-labeler/trunk/README (rev 0) +++ music-labeler/trunk/README 2008-12-28 08:53:59 UTC (rev 1112) @@ -0,0 +1,16 @@ +Overview +-------- + +Label your music using a tagging interface not unlike those of online bookmark +managers. + +Setup +----- + +Requirements: + +- [pyjamas] 0.4 +- [python-jsonrpc] 0.1 (new implementation, not the old one) + +[pyjamas]: http://pyjs.org/ +[python-jsonrpc]: http://json-rpc.org/wiki/python-json-rpc Added: music-labeler/trunk/src/ml.py =================================================================== --- music-labeler/trunk/src/ml.py (rev 0) +++ music-labeler/trunk/src/ml.py 2008-12-28 08:53:59 UTC (rev 1112) @@ -0,0 +1,68 @@ +from pyjamas.ui import RootPanel, TextArea, Label, Button, HTML, VerticalPanel, HorizontalPanel, ListBox +from pyjamas.JSONService import JSONProxy + +class ml(object): + def onModuleLoad(self): + # Comprehensions are unsupported. + methods = ['Echo', 'Reverse', 'UPPERCASE', 'lowercase'] + self.methods = {} + for x in methods: + self.methods[x] = x.lower() + + self.remote = MusicLabelerService() + + self.status = Label() + self.text_area = TextArea() + self.text_area.setText(r"{'Test'} [\"String\"]") + self.text_area.setCharacterWidth(80) + self.text_area.setVisibleLines(8) + + self.method_list = ListBox() + self.method_list.setName("hello") + self.method_list.setVisibleItemCount(1) + for method in self.methods: + self.method_list.addItem(method) + self.method_list.setSelectedIndex(0) + + method_panel = HorizontalPanel() + method_panel.add(HTML("Remote string method to call: ")) + method_panel.add(self.method_list) + method_panel.setSpacing(8) + + self.button_py = Button("Send to Python Service", self) + + buttons = HorizontalPanel() + buttons.add(self.button_py) + buttons.setSpacing(8) + + info = r"<h2>JSON-RPC Example</h2><p>This example demonstrates the calling of server services with <a href=\"http://json-rpc.org/\">JSON-RPC</a>." + info += "<p>Enter some text below, and press a button to send the text to an Echo service on your server. An echo service simply sends the exact same text back that it receives." + + panel = VerticalPanel() + panel.add(HTML(info)) + panel.add(self.text_area) + panel.add(method_panel) + panel.add(buttons) + panel.add(self.status) + + RootPanel().add(panel) + + def onClick(self, sender): + self.status.setText('waiting for response') + index = self.method_list.getSelectedIndex() + method = self.methods[self.method_list.getItemText(index)] + text = self.text_area.getText() + id = self.remote.callMethod(method, [text], self) + if id < 0: self.status.setText('server error') + + def onRemoteResponse(self, response, request_info): + self.status.setText(response) + + def onRemoteError(self, code, message, request_info): + self.status.setText("Server Error or Invalid Response: ERROR " + code + + " - " + message) + +class MusicLabelerService(JSONProxy): + def __init__(self): + JSONProxy.__init__(self, "/services/ml.py", + ["echo", "reverse", "uppercase", "lowercase"]) Added: music-labeler/trunk/src/public/ml.html =================================================================== --- music-labeler/trunk/src/public/ml.html (rev 0) +++ music-labeler/trunk/src/public/ml.html 2008-12-28 08:53:59 UTC (rev 1112) @@ -0,0 +1,10 @@ +<html> + <head> + <meta name="pygwt:module" content="ml"> + <title>JSON-RPC Example</title> + </head> + <body bgcolor="white"> + <script language="javascript" src="pygwt.js"></script> + </body> +</html> + Added: music-labeler/trunk/src/public/services/ml.py =================================================================== --- music-labeler/trunk/src/public/services/ml.py (rev 0) +++ music-labeler/trunk/src/public/services/ml.py 2008-12-28 08:53:59 UTC (rev 1112) @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +from jsonrpc import handleCGI, ServiceMethod + +class Service(object): + @ServiceMethod + def echo(self, msg): + return msg + @ServiceMethod + def reverse(self, msg): + return msg[::-1] + @ServiceMethod + def uppercase(self, msg): + return msg.upper() + @ServiceMethod + def lowercase(self, msg): + return msg.lower() + +handleCGI(Service()) Property changes on: music-labeler/trunk/src/public/services/ml.py ___________________________________________________________________ Added: svn:executable + * Added: music-labeler/trunk/tools/run.py =================================================================== --- music-labeler/trunk/tools/run.py (rev 0) +++ music-labeler/trunk/tools/run.py 2008-12-28 08:53:59 UTC (rev 1112) @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import CGIHTTPServer as cgi +from os import chdir, getcwd +from os.path import dirname, join, realpath +from subprocess import check_call + +outdir = join(getcwd(), 'output') +srcdir = join(dirname(dirname(realpath(__file__))), 'src') +chdir(srcdir) +check_call('pyjs ml.py -o'.split() + [outdir]) +chdir(outdir) +cgi.CGIHTTPRequestHandler.cgi_directories = ['/services'] +cgi.test() Property changes on: music-labeler/trunk/tools/run.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-22 22:57:43
|
Revision: 1111 http://assorted.svn.sourceforge.net/assorted/?rev=1111&view=rev Author: yangzhang Date: 2008-12-22 22:33:22 +0000 (Mon, 22 Dec 2008) Log Message: ----------- - replaced dump_state with a finally lambda - added accept_joiner_seqno - tweaked output - fixed run() in test.bash Modified Paths: -------------- ydb/trunk/src/main.lzz.clamp ydb/trunk/tools/test.bash Modified: ydb/trunk/src/main.lzz.clamp =================================================================== --- ydb/trunk/src/main.lzz.clamp 2008-12-19 23:46:26 UTC (rev 1110) +++ ydb/trunk/src/main.lzz.clamp 2008-12-22 22:33:22 UTC (rev 1111) @@ -29,7 +29,7 @@ typedef pair<int, int> pii; st_utime_t timeout; -int chkpt; +int chkpt, accept_joiner_seqno; bool verbose, yield_during_build_up, yield_during_catch_up; long long timelim; st_intr_bool stop_hub, kill_hub; @@ -143,28 +143,6 @@ }; /** - * RAII for dumping the final state of the DB to a file on disk. - */ -class dump_state -{ - public: - dump_state(const map<int, int> &map, const int &seqno) - : map_(map), seqno_(seqno) {} - ~dump_state() { - string fname = string("/tmp/ydb") + lexical_cast<string>(getpid()); - cout << "dumping DB state (" << seqno_ << ") to " << fname << endl; - ofstream of(fname.c_str()); - of << "seqno: " << seqno_ << endl; - foreach (const pii &p, map_) { - of << p.first << ": " << p.second << endl; - } - } - private: - const map<int, int> &map_; - const int &seqno_; -}; - -/** * Send a message to some destinations (sequentially). */ template<typename T> @@ -246,7 +224,8 @@ * Keep issuing transactions to the replicas. */ void -issue_txns(st_channel<replica_info> &newreps, int &seqno) +issue_txns(st_channel<replica_info> &newreps, int &seqno, + st_bool &accept_joiner) { Op_OpType types[] = {Op::read, Op::write, Op::del}; vector<st_netfd_t> fds; @@ -292,6 +271,10 @@ } st_sleep(0); } + + if (txn.seqno() == accept_joiner_seqno) { + accept_joiner.set(); + } } } @@ -423,10 +406,10 @@ } /** - * Keep swallowing replica responses. + * Swallow replica responses. */ void -handle_responses(st_netfd_t replica, const int &seqno, +handle_responses(st_netfd_t replica, const int &seqno, int rid, st_multichannel<long long> &recover_signals, bool caught_up) { st_channel<long long> &sub = recover_signals.subscribe(); @@ -437,6 +420,7 @@ recovery_end_seqno = -1; finally f(lambda () { long long end_time = current_time_millis(); + cout << __ref(rid) << ": "; showtput("after recovery, finished", end_time, __ref(recovery_end_time), __ref(seqno), __ref(recovery_end_seqno)); }); @@ -449,11 +433,13 @@ if (recovery_start_time == -1 && !sub.empty()) { recovery_start_time = sub.take(); recovery_start_seqno = seqno; + cout << rid << ": "; showtput("before recovery, finished", recovery_start_time, start_time, recovery_start_seqno, 0); } else if (recovery_end_time == -1 && !sub.empty()) { recovery_end_time = sub.take(); recovery_end_seqno = seqno; + cout << rid << ": "; showtput("during recovery, finished", recovery_end_time, recovery_start_time, recovery_end_seqno, recovery_start_seqno); } @@ -461,16 +447,20 @@ long long t = current_time_millis(), timediff = t - start_time; caught_up = true; recover_signals.push(t); + cout << rid << ": "; cout << "recovering node caught up; took " << timediff << "ms" << endl; } if (res.seqno() % chkpt == 0) { - if (verbose) + if (verbose) { + cout << rid << ": "; cout << "got response " << res.seqno() << " from " << replica << endl; + } st_sleep(0); } // This is OK since the seqno will never grow again if stop_hub is set. if (stop_hub && res.seqno() + 1 == seqno) { + cout << rid << ": "; cout << "stopping seqno = " << res.seqno() << endl; break; } @@ -557,17 +547,20 @@ } // Start dispatching queries. + st_bool accept_joiner; int seqno = 0; st_channel<replica_info> newreps; - const function0<void> f = bind(issue_txns, ref(newreps), ref(seqno)); + const function0<void> f = bind(issue_txns, ref(newreps), ref(seqno), + ref(accept_joiner)); st_thread_t swallower = my_spawn(bind(swallow, f), "issue_txns"); foreach (const replica_info &r, replicas) newreps.push(r); st_joining join_swallower(swallower); // Start handling responses. st_thread_group handlers; + int rid = 0; foreach (replica_info r, replicas) { - handlers.insert(my_spawn(bind(handle_responses, r.fd(), ref(seqno), + handlers.insert(my_spawn(bind(handle_responses, r.fd(), ref(seqno), rid++, ref(recover_signals), true), "handle_responses")); } @@ -578,6 +571,7 @@ st_intr intr(stop_hub); joiner = checkerr(st_accept(listener, nullptr, nullptr, ST_UTIME_NO_TIMEOUT)); + accept_joiner.waitset(); } Join join = readmsg<Join>(joiner); cout << "setting seqno to " << seqno << endl; @@ -589,7 +583,7 @@ cout << "start streaming txns to joiner" << endl; replicas.push_back(replica_info(joiner, static_cast<uint16_t>(join.port()))); newreps.push(replicas.back()); - handlers.insert(my_spawn(bind(handle_responses, joiner, ref(seqno), + handlers.insert(my_spawn(bind(handle_responses, joiner, ref(seqno), rid++, ref(recover_signals), false), "handle_responses")); } @@ -603,7 +597,16 @@ // Initialize database state. map<int, int> map; int seqno = -1; - dump_state ds(map, seqno); + finally f(lambda () { + string fname = string("/tmp/ydb") + lexical_cast<string>(getpid()); + cout << "dumping DB state (seqno = " << __ref(seqno) << ", size = " + << __ref(map).size() << ") to " << fname << endl; + ofstream of(fname.c_str()); + of << "seqno: " << __ref(seqno) << endl; + foreach (const pii &p, __ref(map)) { + of << p.first << ": " << p.second << endl; + } + }); st_channel<shared_ptr<Recovery> > send_states; cout << "starting as replica on port " << listen_port << endl; @@ -769,6 +772,9 @@ "yield periodically during catch-up phase of recovery") ("leader,l", po::bool_switch(&is_leader), "run the leader (run replica by default)") + ("accept-joiner-seqno,j", + po::value<int>(&accept_joiner_seqno)->default_value(0), + "accept recovering joiner (start recovery) after this seqno") ("leader-host,H", po::value<string>(&leader_host)->default_value(string("localhost")), "hostname or address of the leader") Modified: ydb/trunk/tools/test.bash =================================================================== --- ydb/trunk/tools/test.bash 2008-12-19 23:46:26 UTC (rev 1110) +++ ydb/trunk/tools/test.bash 2008-12-22 22:33:22 UTC (rev 1111) @@ -227,21 +227,24 @@ " } +range2args() { + "$@" $(seq $range | sed 's/^/farm/; s/$/.csail/') +} + run-helper() { tagssh $1 "ydb/src/ydb -l" & sleep .1 tagssh $2 "ydb/src/ydb -H $1" & tagssh $3 "ydb/src/ydb -H $1" & - sleep ${wait:-10} + sleep ${wait1:-10} tagssh $4 "ydb/src/ydb -H $1" & - read - kill %1 + if [[ ${wait2:-} ]] + then sleep $wait2 + else read + fi + tagssh $1 "pkill -sigint ydb" } -range2args() { - "$@" $(seq $range | sed 's/^/farm/; s/$/.csail/') -} - run() { range2args run-helper } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:46:29
|
Revision: 1110 http://assorted.svn.sourceforge.net/assorted/?rev=1110&view=rev Author: yangzhang Date: 2008-12-19 23:46:26 +0000 (Fri, 19 Dec 2008) Log Message: ----------- added stripext, cabal-install-all, is-function Modified Paths: -------------- shell-tools/trunk/src/bash-commons/common.bash Modified: shell-tools/trunk/src/bash-commons/common.bash =================================================================== --- shell-tools/trunk/src/bash-commons/common.bash 2008-12-19 23:45:53 UTC (rev 1109) +++ shell-tools/trunk/src/bash-commons/common.bash 2008-12-19 23:46:26 UTC (rev 1110) @@ -224,6 +224,11 @@ quiet popd } +is-function() { + local name="$1" + type "$name" 2> /dev/null | head -1 | fgrep -q "$name is a function" +} + prepend() { while read line ; do echo "$@$line" @@ -486,19 +491,28 @@ sudo -u pkg stow -t "$GLOBAL_PREFIX" "$@" !(armed) ) } -cabal-install() { +cabal-install-all() { for i in "${@:-}" ; do pushd "$i" && - local pkg="$(basename "$(pwd)" )" && - runhaskell Setup.*hs clean && - runhaskell Setup.*hs configure --user --prefix="$HOME/.local/pkg/ghc-${pkg%-*}" && - runhaskell Setup.*hs build && - runhaskell Setup.*hs install --user && + cabal-install && popd || break done } +cabal-install() { + local pkg="$(basename "$(pwd)" )" && + runhaskell Setup.*hs clean && + runhaskell Setup.*hs configure --user --prefix="$HOME/.local/pkg/ghc-${pkg%-*}" "$@" && + runhaskell Setup.*hs build && + runhaskell Setup.*hs install --user +} + +stripext() { + local path="$1" + mv "$path" "${path%.*}" +} + #if ! is_declared indent ; then # noindent #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:46:02
|
Revision: 1109 http://assorted.svn.sourceforge.net/assorted/?rev=1109&view=rev Author: yangzhang Date: 2008-12-19 23:45:53 +0000 (Fri, 19 Dec 2008) Log Message: ----------- fixed some bugs Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2008-12-19 23:44:40 UTC (rev 1108) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2008-12-19 23:45:53 UTC (rev 1109) @@ -77,7 +77,7 @@ # Safely prepend the usual locations (USER_PREFIX, etc.) for a standard # subdirectory (bin, lib, etc). function prepend_std { - local var="$1" subdirs= pieces=() + local var="$1" subdirs= pieces= shift for subdir in "$@" ; do if [[ "${subdir:0:1}" == / || "$subdir" == '' ]] ; then @@ -687,6 +687,7 @@ # TODO note that bash_completion usually does a ton of stuff (and in # particular it re/undefines `have`), so it's best to move this near the # top + # Note that this tends to be the most expensive part of my startup. if [[ -f /etc/bash_completion && -z "$BASH_COMPLETION" ]] then . /etc/bash_completion fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:44:43
|
Revision: 1108 http://assorted.svn.sourceforge.net/assorted/?rev=1108&view=rev Author: yangzhang Date: 2008-12-19 23:44:40 +0000 (Fri, 19 Dec 2008) Log Message: ----------- added colors Modified Paths: -------------- configs/trunk/src/owl/startup Modified: configs/trunk/src/owl/startup =================================================================== --- configs/trunk/src/owl/startup 2008-12-19 23:44:20 UTC (rev 1107) +++ configs/trunk/src/owl/startup 2008-12-19 23:44:40 UTC (rev 1108) @@ -4,7 +4,7 @@ # colors viewclass xvm -filter class-xvm -c blue -viewclass sipb -filter class-sipb -c cyan +filter class-xvm -c cyan +#viewclass sipb +#filter class-sipb -c cyan view all This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:44:24
|
Revision: 1107 http://assorted.svn.sourceforge.net/assorted/?rev=1107&view=rev Author: yangzhang Date: 2008-12-19 23:44:20 +0000 (Fri, 19 Dec 2008) Log Message: ----------- fixed unicode handling in text functions Modified Paths: -------------- python-commons/trunk/src/commons/strs.py Modified: python-commons/trunk/src/commons/strs.py =================================================================== --- python-commons/trunk/src/commons/strs.py 2008-12-19 23:44:11 UTC (rev 1106) +++ python-commons/trunk/src/commons/strs.py 2008-12-19 23:44:20 UTC (rev 1107) @@ -11,6 +11,8 @@ cp1252_to_unicode_translations dos2unix format +html2unicode +html_unicode indent nat_lang_join or_join @@ -18,6 +20,7 @@ safe_ascii underline unicode2html +unicode_special unwrap '''.split() @@ -104,7 +107,8 @@ for i,c in enumerate(line): if not c.isspace(): return i if amt is None: - amt = min( count_indent(line) for line in lines if line.strip() != '' ) + amt = len(text) if text.strip() == '' else \ + min( count_indent(line) for line in lines if line.strip() != '' ) return '\n'.join( line[amt:] for line in lines ) def remove_empty_lines(s): @@ -122,11 +126,34 @@ "Removes carriage returns." return s.replace('\r','') -pat = re.compile(u'[\u0080-\uffff]') +def quotejs(s): + "Escape a string as a JavaScript unicode string literal." + return ''.join( r'\u%04x' % ord(c) for c in s ) + +unicode_special = re.compile(u'[\u0080-\uffff]') def unicode2html(s): "Extends cgi.escape() with escapes for all unicode characters." - return pat.sub(lambda m: '&#%d;' % ord(m.group()), cgi.escape(s)) + # HTML special/Unicode char encoding is in base 10. + return unicode_special.sub(lambda m: '&#%d;' % ord(m.group()), + cgi.escape(s)) +html_unicode = re.compile(r'&#\d+;') +def html2unicode(s): + r""" + Sort of, but not really, a cgi.unescape() that works for Unicode. This is + useful as a filter on cgi.FieldStorage()['field'].value. In its raw form, + that's encoded using URL encoding. But if you submit a form with something + like (in Python string literal format) u'\u4e00&a', the server gets + '%26%2319968%3B%26a'. urllib.unquote() turns this into u'一&a', so + notice that what we receive is a URL encoding of a partial HTML encoding - + partial because the client only HTML-encoded the special character, and not + the rest. So, if we were to submit a form whose true value is + u'\u4e00一', this is impossible to distinguish from u'\u4e00\u4e00'. + """ + # HTML special/Unicode char encoding is in base 10. + return html_unicode.sub(lambda m: unichr(int(m.group()[2:-1])), + unicode(s)) + def nat_lang_join(xs, last_glue, two_glue = None, glue = ', '): """ Natural-language join. Join a sequence of strings together into a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:44:15
|
Revision: 1106 http://assorted.svn.sourceforge.net/assorted/?rev=1106&view=rev Author: yangzhang Date: 2008-12-19 23:44:11 +0000 (Fri, 19 Dec 2008) Log Message: ----------- updated for 2.6 Modified Paths: -------------- python-commons/trunk/src/commons/interp.py Modified: python-commons/trunk/src/commons/interp.py =================================================================== --- python-commons/trunk/src/commons/interp.py 2008-12-19 23:23:56 UTC (rev 1105) +++ python-commons/trunk/src/commons/interp.py 2008-12-19 23:44:11 UTC (rev 1106) @@ -56,14 +56,14 @@ @license: MIT """ - pattern = re.compile(r""" + pattern = r""" \$(?: (?P<escaped>\$) | # Escape sequence of two delimiters (?P<named>[_a-z][_a-z0-9]*) | # delimiter and a Python identifier {(?P<braced>.*?)} | # delimiter and a braced identifier (?P<invalid>) # Other ill-formed delimiter exprs ) - """, re.VERBOSE | re.IGNORECASE) + """ def interp(s, dic = None): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:24:00
|
Revision: 1105 http://assorted.svn.sourceforge.net/assorted/?rev=1105&view=rev Author: yangzhang Date: 2008-12-19 23:23:56 +0000 (Fri, 19 Dec 2008) Log Message: ----------- added more toys Added Paths: ----------- sandbox/trunk/src/cc/boost_program_options_warning.mk sandbox/trunk/src/cc/enums.cc Added: sandbox/trunk/src/cc/boost_program_options_warning.mk =================================================================== --- sandbox/trunk/src/cc/boost_program_options_warning.mk (rev 0) +++ sandbox/trunk/src/cc/boost_program_options_warning.mk 2008-12-19 23:23:56 UTC (rev 1105) @@ -0,0 +1,4 @@ +all: + g++ -Wall -o boost_program_options_warning \ + boost_program_options_warning.cc \ + -lboost_program_options-gcc43-mt Added: sandbox/trunk/src/cc/enums.cc =================================================================== --- sandbox/trunk/src/cc/enums.cc (rev 0) +++ sandbox/trunk/src/cc/enums.cc 2008-12-19 23:23:56 UTC (rev 1105) @@ -0,0 +1,5 @@ +// In C++0x: enum class E : char { e1, e2 } +// http://stackoverflow.com/questions/217549/which-typesafe-enum-in-c-are-you-using +// http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Type_Safe_Enum +// http://www.artima.com/forums/flat.jsp?forum=106&thread=115363 +int main() { return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:23:29
|
Revision: 1104 http://assorted.svn.sourceforge.net/assorted/?rev=1104&view=rev Author: yangzhang Date: 2008-12-19 23:23:26 +0000 (Fri, 19 Dec 2008) Log Message: ----------- more toys Modified Paths: -------------- sandbox/trunk/src/c/stxbuilderr.c Added Paths: ----------- sandbox/trunk/src/c/coercion.c sandbox/trunk/src/c/inet.c sandbox/trunk/src/c/nestedfn.c sandbox/trunk/src/c/stbt.c sandbox/trunk/src/c/stmemleak.c Added: sandbox/trunk/src/c/coercion.c =================================================================== --- sandbox/trunk/src/c/coercion.c (rev 0) +++ sandbox/trunk/src/c/coercion.c 2008-12-19 23:23:26 UTC (rev 1104) @@ -0,0 +1,13 @@ +// "The term for implicit type conversion is coercion." +// -http://en.wikipedia.org/wiki/Type_conversion + +#include <inttypes.h> + +void foo(uint32_t x) { +} + +int main() { + int x = -1; + foo(x); + return 0; +} Added: sandbox/trunk/src/c/inet.c =================================================================== --- sandbox/trunk/src/c/inet.c (rev 0) +++ sandbox/trunk/src/c/inet.c 2008-12-19 23:23:26 UTC (rev 1104) @@ -0,0 +1,23 @@ +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> +#include <stdio.h> +#include <inttypes.h> + +int main() { + struct in_addr ipaddr; + printf("PRIu32 = %s\n", PRIu32); // "u\n" + { + // Does not work, since this isn't a numeric IP address. + int res = inet_aton("localhost", &ipaddr); + printf("result = %" PRIu32 "\n", res); // 0 + printf("ipaddr = %" PRIu32 "\n", ipaddr.s_addr); // garbage + } + { + // Works. + int res = inet_aton("127.0.0.1", &ipaddr); + printf("result = %" PRIu32 "\n", res); // 1 + printf("ipaddr = %" PRIu32 "\n", ipaddr.s_addr); // 16777343 == (1 << 24) | 127 + } + return 0; +} Added: sandbox/trunk/src/c/nestedfn.c =================================================================== --- sandbox/trunk/src/c/nestedfn.c (rev 0) +++ sandbox/trunk/src/c/nestedfn.c 2008-12-19 23:23:26 UTC (rev 1104) @@ -0,0 +1,5 @@ +int main() { + int x = -1; + int f(int y) { return x + y; } + return f(1); +} Added: sandbox/trunk/src/c/stbt.c =================================================================== --- sandbox/trunk/src/c/stbt.c (rev 0) +++ sandbox/trunk/src/c/stbt.c 2008-12-19 23:23:26 UTC (rev 1104) @@ -0,0 +1,21 @@ +#define DEBUG +#include <st.h> +void h(int s) { + _st_print_thread_stacks(0); +} +void *f(void *p) { + st_sleep(1); + h(0); + return NULL; +} +int main() { + st_init(); + st_thread_t ts[3]; + int i; + for (i = 0; i < 3; i++) + ts[i] = st_thread_create(&f, NULL, 1, 0); + // h(0); // I get a seg fault here if I uncomment this. + for (i = 0; i < 3; i++) + st_thread_join(ts[i], NULL); + return 0; +} Added: sandbox/trunk/src/c/stmemleak.c =================================================================== --- sandbox/trunk/src/c/stmemleak.c (rev 0) +++ sandbox/trunk/src/c/stmemleak.c 2008-12-19 23:23:26 UTC (rev 1104) @@ -0,0 +1,6 @@ +// Run this through valgrind and discover 3 memory leaks. +#include <st.h> +int main() { + st_init(); + return 0; +} Modified: sandbox/trunk/src/c/stxbuilderr.c =================================================================== --- sandbox/trunk/src/c/stxbuilderr.c 2008-12-19 23:20:49 UTC (rev 1103) +++ sandbox/trunk/src/c/stxbuilderr.c 2008-12-19 23:23:26 UTC (rev 1104) @@ -3,11 +3,15 @@ #include <st.h> #include <stx.h> +#include <stdio.h> int main() { - struct in_addr addr; - stx_dns_getaddr("google.com", &addr, 0); + st_init(); + struct in_addr ipaddr; + int res = stx_dns_getaddr("google.com", &ipaddr, ST_UTIME_NO_TIMEOUT); + printf("result = %d\n", res); + printf("ipaddr = %u\n", ipaddr.s_addr); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-12-19 23:20:57
|
Revision: 1103 http://assorted.svn.sourceforge.net/assorted/?rev=1103&view=rev Author: yangzhang Date: 2008-12-19 23:20:49 +0000 (Fri, 19 Dec 2008) Log Message: ----------- added .clamp files for vim Modified Paths: -------------- configs/trunk/src/vim/plugin/_yang.vim Modified: configs/trunk/src/vim/plugin/_yang.vim =================================================================== --- configs/trunk/src/vim/plugin/_yang.vim 2008-12-19 23:20:40 UTC (rev 1102) +++ configs/trunk/src/vim/plugin/_yang.vim 2008-12-19 23:20:49 UTC (rev 1103) @@ -199,7 +199,7 @@ " autocmd Mapserver map files au BufNewFile,BufRead *.map setf map " temporaries -autocmd BufNewFile,BufRead *.{lzz,tt,tcc} setlocal filetype=cpp +autocmd BufNewFile,BufRead *.{lzz,tt,tcc,clamp} setlocal filetype=cpp "autocmd BufNewFile,BufRead *.{c,cc,cpp,cxx,h,lzz,tt,tcc} setlocal cindent expandtab softtabstop=2 shiftwidth=2 tabstop=8 "autocmd BufNewFile,BufRead *.java setlocal cindent noexpandtab softtabstop=4 shiftwidth=4 tabstop=4 autocmd BufNewFile,BufRead *.lzx setlocal filetype=lzx This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |