assorted-commits Mailing List for Assorted projects (Page 2)
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...> - 2014-02-26 02:33:06
|
Revision: 1877 http://sourceforge.net/p/assorted/svn/1877 Author: yangzhang Date: 2014-02-26 02:32:59 +0000 (Wed, 26 Feb 2014) Log Message: ----------- Add node-fibers test Added Paths: ----------- sandbox/trunk/src/node/fibers/ sandbox/trunk/src/node/fibers/index.coffee sandbox/trunk/src/node/fibers/package.json Added: sandbox/trunk/src/node/fibers/index.coffee =================================================================== --- sandbox/trunk/src/node/fibers/index.coffee (rev 0) +++ sandbox/trunk/src/node/fibers/index.coffee 2014-02-26 02:32:59 UTC (rev 1877) @@ -0,0 +1,20 @@ +fs = require('fs') +Fiber = require('fibers') +Future = require('fibers/future') +readdir = Future.wrap(fs.readdir) +#sync = (f) -> Future.wrap(f)().wait() +ls = -> console.log readdir('.').wait() +sleep = (ms) -> + f = new Future + setTimeout -> f.return() + f +setTimeout( + -> + console.log Fiber(-> + ls() + sleep(0).wait() + ls() + ).run() + console.log Future.wrap(-> console.log(0)).future() + 0 +) Added: sandbox/trunk/src/node/fibers/package.json =================================================================== --- sandbox/trunk/src/node/fibers/package.json (rev 0) +++ sandbox/trunk/src/node/fibers/package.json 2014-02-26 02:32:59 UTC (rev 1877) @@ -0,0 +1,16 @@ +{ + "name": "fibers-test", + "version": "0.0.0", + "description": "", + "main": "index.coffee", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": "", + "author": "", + "license": "BSD", + "dependencies": { + "fibers": "git+https://github.com/laverdet/node-fibers.git#982f50c", + "coffee-script": "~1.7.1" + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2014-02-22 06:19:52
|
Revision: 1876 http://sourceforge.net/p/assorted/svn/1876 Author: yangzhang Date: 2014-02-22 06:19:49 +0000 (Sat, 22 Feb 2014) Log Message: ----------- Add test of CSS width+scrollbar quirk Added Paths: ----------- sandbox/trunk/src/web/css-stretch-width/ sandbox/trunk/src/web/css-stretch-width/index.html Added: sandbox/trunk/src/web/css-stretch-width/index.html =================================================================== --- sandbox/trunk/src/web/css-stretch-width/index.html (rev 0) +++ sandbox/trunk/src/web/css-stretch-width/index.html 2014-02-22 06:19:49 UTC (rev 1876) @@ -0,0 +1,59 @@ +<!-- +Scrollbar appearence breaks right-alignment of text. + +See also: + +https://stackoverflow.com/questions/3541863/css-100-width-but-avoid-scrollbar +--> +<html> + <head> + <style> + ::-webkit-scrollbar { + width: 8px; + height: 8px; + background-color: @bg; + } + ::-webkit-scrollbar-button { + display: none; + } + ::-webkit-scrollbar-thumb { + background-color: rgba(255,255,255,0.2); + border-radius: 7px; + } + ::-webkit-scrollbar-thumb:hover { + background: rgba(255,255,255,0.3); + } + + .scroller { + max-width: 200px; + overflow-x: auto; + } + .level { + display: inline-block; + overflow-y: auto; + /* + overflow: scroll; + */ + height: 100px; + background: silver; + } + .a { + text-align: right; + } + </style> + </head> + <body> + <div class='scroller'> + <div class='level'> + <div class='a'>aoeu</div> + <div>WWWWWWWWWWW</div> + <div class='a'>aoeu</div> + <div class='a'>aoeu</div> + <div class='a'>aoeu</div> + <div class='a'>aoeu</div> + <div class='a'>aoeu</div> + <div class='a'>aoeu</div> + </div> + </div> + </body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2014-02-22 06:18:48
|
Revision: 1875 http://sourceforge.net/p/assorted/svn/1875 Author: yangzhang Date: 2014-02-22 06:18:44 +0000 (Sat, 22 Feb 2014) Log Message: ----------- Demo effect of DOM detach/move on events Added Paths: ----------- sandbox/trunk/src/web/dom/ sandbox/trunk/src/web/dom/index.jade Added: sandbox/trunk/src/web/dom/index.jade =================================================================== --- sandbox/trunk/src/web/dom/index.jade (rev 0) +++ sandbox/trunk/src/web/dom/index.jade 2014-02-22 06:18:44 UTC (rev 1875) @@ -0,0 +1,22 @@ +doctype html +html + body + .main + p Experiment subjects + button.inline(onclick='alert()') Push me + button.normal Won't work once removed + .control + p Experiment controls + button.move Move buttons + button.remove-and-attach Remove then attach buttons + script(src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js') + :coffeescript + $('.normal').click -> alert() + $('.move').click -> + $('.inline').appendTo('.main') + $('.normal').appendTo('.main') + true + $('.remove-and-attach').click -> + $('.inline').remove().appendTo('.main') + $('.normal').remove().appendTo('.main') + true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2014-01-21 06:02:32
|
Revision: 1874 http://sourceforge.net/p/assorted/svn/1874 Author: yangzhang Date: 2014-01-21 06:02:29 +0000 (Tue, 21 Jan 2014) Log Message: ----------- Update clean-swp to avoid unnecessary prompting Modified Paths: -------------- shell-tools/trunk/src/clean-swp.bash Modified: shell-tools/trunk/src/clean-swp.bash =================================================================== --- shell-tools/trunk/src/clean-swp.bash 2013-10-18 01:27:44 UTC (rev 1873) +++ shell-tools/trunk/src/clean-swp.bash 2014-01-21 06:02:29 UTC (rev 1874) @@ -18,7 +18,7 @@ -c "new $RECFN" \ -c "exec setline( 1, fn )" \ -c w\! \ - -c "qa" + -c "qa!" if [[ ! -f $RECFN ]]; then echo "nothing to recover from $q" rm -f "$q" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-10-18 01:27:47
|
Revision: 1873 http://sourceforge.net/p/assorted/svn/1873 Author: yangzhang Date: 2013-10-18 01:27:44 +0000 (Fri, 18 Oct 2013) Log Message: ----------- Add HTML maxlength constraints demo Added Paths: ----------- sandbox/trunk/src/web/constraints/ sandbox/trunk/src/web/constraints/index.html Added: sandbox/trunk/src/web/constraints/index.html =================================================================== --- sandbox/trunk/src/web/constraints/index.html (rev 0) +++ sandbox/trunk/src/web/constraints/index.html 2013-10-18 01:27:44 UTC (rev 1873) @@ -0,0 +1 @@ +<input type='text' value='aoeu' maxlength='2'/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-10-01 21:33:17
|
Revision: 1872 http://sourceforge.net/p/assorted/svn/1872 Author: yangzhang Date: 2013-10-01 21:33:14 +0000 (Tue, 01 Oct 2013) Log Message: ----------- Update ssh config Modified Paths: -------------- configs/trunk/src/ssh/config Modified: configs/trunk/src/ssh/config =================================================================== --- configs/trunk/src/ssh/config 2013-09-30 16:26:54 UTC (rev 1871) +++ configs/trunk/src/ssh/config 2013-10-01 21:33:14 UTC (rev 1872) @@ -3,13 +3,15 @@ # StrictHostKeyChecking yes/no/ask # NoHostAuthenticationForLocalhost yes/no -Host www.aws.slice-data.com dev.aws.slice-data.com newwww.aws.slice-data.com +#Host db.aws.slice-data.com +# User ubuntu +# IdentityFile /home/yang/sec/slice-west-2.pem +# HostName 10.253.67.154 + +Host vpn.aws.slice-data.com User ubuntu IdentityFile /home/yang/sec/slice-west-2.pem -#Host dev.aws.slice-data.com - #HostName 10.252.172.110 - Host testluser HostName github.com IdentityFile /home/yang/gittest/testluser/testluser.id_rsa @@ -31,6 +33,7 @@ Host * ControlPath ~/.ssh/master-%l-%r@%h:%p ControlMaster auto + ControlPersist 600 # StrictHostKeyChecking no This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-09-30 16:26:56
|
Revision: 1871 http://sourceforge.net/p/assorted/svn/1871 Author: yangzhang Date: 2013-09-30 16:26:54 +0000 (Mon, 30 Sep 2013) Log Message: ----------- Demo ipdb on caught exception Added Paths: ----------- sandbox/trunk/src/py/ipdb_on_caught_exception.py Added: sandbox/trunk/src/py/ipdb_on_caught_exception.py =================================================================== --- sandbox/trunk/src/py/ipdb_on_caught_exception.py (rev 0) +++ sandbox/trunk/src/py/ipdb_on_caught_exception.py 2013-09-30 16:26:54 UTC (rev 1871) @@ -0,0 +1,5 @@ +import ipdb,sys,traceback +try: + raise Exception() +except: + ipdb.post_mortem(sys.exc_info()[2]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-26 06:58:22
|
Revision: 1870 http://sourceforge.net/p/assorted/svn/1870 Author: yangzhang Date: 2013-08-26 06:58:20 +0000 (Mon, 26 Aug 2013) Log Message: ----------- Update aspell dict Modified Paths: -------------- configs/trunk/src/aspell/aspell.en.prepl configs/trunk/src/aspell/aspell.en.pws Modified: configs/trunk/src/aspell/aspell.en.prepl =================================================================== --- configs/trunk/src/aspell/aspell.en.prepl 2013-08-26 06:57:29 UTC (rev 1869) +++ configs/trunk/src/aspell/aspell.en.prepl 2013-08-26 06:58:20 UTC (rev 1870) @@ -1,4 +1,5 @@ personal_repl-1.1 en 0 +templating template transfered transferred inte's Intel's requied Required @@ -6,6 +7,7 @@ alredy allured pased passed awhere where +sizeable sizable infered inferred indices indexes de do @@ -14,6 +16,7 @@ kbytes KB mbyte MB laborous laborers +propagations propagation desciptors descriptors bootsrap bootstrap attemps attempts Modified: configs/trunk/src/aspell/aspell.en.pws =================================================================== --- configs/trunk/src/aspell/aspell.en.pws 2013-08-26 06:57:29 UTC (rev 1869) +++ configs/trunk/src/aspell/aspell.en.pws 2013-08-26 06:58:20 UTC (rev 1870) @@ -1,19 +1,29 @@ -personal_ws-1.1 en 124 +personal_ws-1.1 en 184 runtime API Pawan dBi Masahiro +Reactive's +whitespace superclass arg RDBMS +DSLs +failovers +ECMAScript SerAccel +al uplink thresholding hypercall +Akamai's +failover +VoIP Addref SGI GUIDs +ish JNI DMAed CarTel @@ -22,41 +32,60 @@ libOSs MATLAB Arvind +ISP OpenEmbedded TCP Thiagarajan Fi Eq Shih +frontend et Schwarz accel XPath tuple CPUs +Stoica NUMAness summarization bool changelog Abadi manycore +diff's Rayming +multi +IP +composable const UDP TLB vectorizing +JS +scalably malloc +JVM +namespace +src MATLAB's +Fei +RTT +VPNs LOC Zhang SQL +WebSocket +BitTorrent dom +Cui livelock resumable CSV Hari multithreaded DoS +SOSR MV posteriori MLE @@ -65,26 +94,45 @@ stl IOMMU HiStar's +UIs +rxt +DSL +Kbps Deshpande +Chernoff +Katz AutoMirror Tri +priori +dst +NIO th multicore +Quickstart +Nuff HiStar +UI abbrvnat typedef +DAGs libc PCI VM +unsubscribe Celeron Wi advisor typename Atheros virtualization +RON's GHz TODO VMM +sqrt +Reactive +JavaFX +jQuery toolchain filesystem Bychkovsky @@ -97,63 +145,41 @@ Xen PostgreSQL Google +PlanetLab's OLS LaGrange +coffeescript +CoffeeScript boolean EasyWifi Eriksson +Skype stateful +reachability AFX deallocation +PlanetLab GPS preemptively Netflix TxLinux +liveness EVDO +tuple's tuples -tuple's +overlay's +toolkits overfits AMD libOS declaratively RCU +CDF +BGP +SureRoute Balakrishnan Soekris pseudocode McRT ILP -IP -SureRoute -Skype -CDF -BGP -Stoica -multi -al -dst -failover -scalably -failovers -BitTorrent -Kbps -Katz -Akamai's -sqrt -ISP -SOSR -overlay's -Fei Nakao -VPNs -VoIP -reachability -Cui -RON's -PlanetLab's -Chernoff -priori -src -NIO -RTT -PlanetLab -liveness This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-26 06:57:30
|
Revision: 1869 http://sourceforge.net/p/assorted/svn/1869 Author: yangzhang Date: 2013-08-26 06:57:29 +0000 (Mon, 26 Aug 2013) Log Message: ----------- Add Python thread-local GC demo Added Paths: ----------- sandbox/trunk/src/py/threadlocalgc.py Added: sandbox/trunk/src/py/threadlocalgc.py =================================================================== --- sandbox/trunk/src/py/threadlocalgc.py (rev 0) +++ sandbox/trunk/src/py/threadlocalgc.py 2013-08-26 06:57:29 UTC (rev 1869) @@ -0,0 +1,26 @@ +# From <http://stackoverflow.com/questions/1478248/whats-the-life-time-of-a-thread-local-value-in-python> + +import time +import threading +import gc + +data = threading.local() + +class Resource(object): + def __init__(self): + self.name = threading.currentThread().name + print 'create: %s' % self.name + + def __del__(self): + print 'delete: %s' % self.name + +def access_thlocal(): + data.key = Resource() + +for i in range(0, 10): + threading.Thread(target=access_thlocal).start() +time.sleep(1) +print "Triggering GC" +gc.collect() +time.sleep(1) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-26 06:56:36
|
Revision: 1868 http://sourceforge.net/p/assorted/svn/1868 Author: yangzhang Date: 2013-08-26 06:56:34 +0000 (Mon, 26 Aug 2013) Log Message: ----------- Add CSS z-index experiments Added Paths: ----------- sandbox/trunk/src/web/css-z-index/ sandbox/trunk/src/web/css-z-index/index.html Added: sandbox/trunk/src/web/css-z-index/index.html =================================================================== --- sandbox/trunk/src/web/css-z-index/index.html (rev 0) +++ sandbox/trunk/src/web/css-z-index/index.html 2013-08-26 06:56:34 UTC (rev 1868) @@ -0,0 +1,50 @@ +<html> + <head> + <style> + .container { + position: relative; + width: 100px; + margin: 10px; + } + .down-arrow { + position: absolute; + top: 0; + right: 0; + } + .select { + border: 1px solid black; + } + .dropdown { + position: absolute; + background: gray; + width: 100px; + } + </style> + </head> + <body> + <div class='container' style='z-index: 2'> + <div class='select'>Dropdown 1</div> + <div class='down-arrow'>v</div> + <div class='dropdown'> + <ul> + <li>Item 1</li> + <li>Item 2</li> + <li>Item 3</li> + <li>Item 4</li> + </ul> + </div> + </div> + <div class='container' style='z-index: 1'> + <div class='select'>Dropdown 2</div> + <div class='down-arrow'>v</div> + <div class='dropdown'> + <ul> + <li>Item 1</li> + <li>Item 2</li> + <li>Item 3</li> + <li>Item 4</li> + </ul> + </div> + </div> + </body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-26 06:54:33
|
Revision: 1867 http://sourceforge.net/p/assorted/svn/1867 Author: yangzhang Date: 2013-08-26 06:54:31 +0000 (Mon, 26 Aug 2013) Log Message: ----------- Add deduper for bitrot.db Added Paths: ----------- sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/ sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/README sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/dups.py Added: sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/README =================================================================== --- sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/README (rev 0) +++ sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/README 2013-08-26 06:54:31 UTC (rev 1867) @@ -0,0 +1 @@ +(Incomplete) a file deduper leveraging the DB files from `bitrot`. Added: sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/dups.py =================================================================== --- sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/dups.py (rev 0) +++ sandbox/trunk/src/one-off-scripts/deduper-for-bitrot-db/dups.py 2013-08-26 06:54:31 UTC (rev 1867) @@ -0,0 +1,14 @@ +import sqlalchemy as sa, itertools as itr, collections as col + +eng = sa.create_engine('sqlite:////tmp/bitrot.db') +rows = eng.execute("select * from bitrot where path not like './.Trash/%' and path not like './Library/%';").fetchall() +duphashes = set(k for k,v in col.Counter(row['hash'] for row in rows).iteritems() if v > 1) +dups = [row for row in rows if row['hash'] in duphashes] +groups = [list(members) for group, members + in itr.groupby(sorted(dups, key=lambda x: x['hash']), lambda x: x['hash'])] +#print groups[:10] + +# TODO get file sizes +# TODO compare actual contents +# TODO look for close matches (esp. in larger files) +# TODO package for windows This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-24 00:17:58
|
Revision: 1866 http://sourceforge.net/p/assorted/svn/1866 Author: yangzhang Date: 2013-08-24 00:17:56 +0000 (Sat, 24 Aug 2013) Log Message: ----------- Add bitrot running script Added Paths: ----------- configs/trunk/src/cron/bitrot.bash Added: configs/trunk/src/cron/bitrot.bash =================================================================== --- configs/trunk/src/cron/bitrot.bash (rev 0) +++ configs/trunk/src/cron/bitrot.bash 2013-08-24 00:17:56 UTC (rev 1866) @@ -0,0 +1,8 @@ +# 09 4 * * Sun bash -l /home/yang/.cron/bitrot.bash + +workon bitrot + +for dir in /media/yang/ /mnt/store/yang/ ; do + ( cd "$dir"; bitrot; ) & +done +wait This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-24 00:07:03
|
Revision: 1865 http://sourceforge.net/p/assorted/svn/1865 Author: yangzhang Date: 2013-08-24 00:06:56 +0000 (Sat, 24 Aug 2013) Log Message: ----------- Disable ssh control socket Modified Paths: -------------- configs/trunk/src/upstart/rtun.conf Modified: configs/trunk/src/upstart/rtun.conf =================================================================== --- configs/trunk/src/upstart/rtun.conf 2013-08-16 01:50:26 UTC (rev 1864) +++ configs/trunk/src/upstart/rtun.conf 2013-08-24 00:06:56 UTC (rev 1865) @@ -26,7 +26,7 @@ while true ; do pkill -f "^ssh -N -R1122:localhost:22 -i" ; sleep 1 ; - ssh -N -R1122:localhost:22 -i /home/yang/.ssh/rtun + ssh -N -S none -R1122:localhost:22 -i /home/yang/.ssh/rtun -o BatchMode=yes -o ServerAliveInterval=300 -o TCPKeepAlive=yes rtun@HOST ; sleep 5 ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-16 01:50:29
|
Revision: 1864 http://sourceforge.net/p/assorted/svn/1864 Author: yangzhang Date: 2013-08-16 01:50:26 +0000 (Fri, 16 Aug 2013) Log Message: ----------- Add class var sharing demo Added Paths: ----------- sandbox/trunk/src/py/classvarsharing.py Added: sandbox/trunk/src/py/classvarsharing.py =================================================================== --- sandbox/trunk/src/py/classvarsharing.py (rev 0) +++ sandbox/trunk/src/py/classvarsharing.py 2013-08-16 01:50:26 UTC (rev 1864) @@ -0,0 +1,6 @@ +class Foo(object): + xs = [] +foo1=Foo() +foo2=Foo() +foo1.xs.append(0) +print foo2.xs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-14 23:51:29
|
Revision: 1863 http://sourceforge.net/p/assorted/svn/1863 Author: yangzhang Date: 2013-08-14 23:51:26 +0000 (Wed, 14 Aug 2013) Log Message: ----------- Silence keychain script check 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 2013-08-10 07:51:45 UTC (rev 1862) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2013-08-14 23:51:26 UTC (rev 1863) @@ -901,7 +901,7 @@ # session shells still exist with a reference to the old socket - with this, # and with a run of update-agent, the shells can now use the new socket. refresh-agent() { - if [[ ! -S $SSH_AUTH_SOCK ]] && ( . ~/.keychain/$HOSTNAME-sh && [[ -S $SSH_AUTH_SOCK ]] ) + if [[ ! -S $SSH_AUTH_SOCK ]] && ( . ~/.keychain/$HOSTNAME-sh &> /dev/null && [[ -S $SSH_AUTH_SOCK ]] ) then . ~/.keychain/$HOSTNAME-sh fi } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-10 07:51:47
|
Revision: 1862 http://sourceforge.net/p/assorted/svn/1862 Author: yangzhang Date: 2013-08-10 07:51:45 +0000 (Sat, 10 Aug 2013) Log Message: ----------- Add fn-cnjn exercise Added Paths: ----------- problems/other/fn-cnjn/ problems/other/fn-cnjn/go.py Added: problems/other/fn-cnjn/go.py =================================================================== --- problems/other/fn-cnjn/go.py (rev 0) +++ problems/other/fn-cnjn/go.py 2013-08-10 07:51:45 UTC (rev 1862) @@ -0,0 +1,69 @@ +# Incomplete +import collections as col, re +Call = col.namedtuple('Call', 'name args') +def parse(s): + def expr(toks): + if toks[0][0].isalpha(): + nodes = [] + rest = toks[1:] + assert rest[0] == '(' + while rest[0] != ')': + assert rest[0] in ['(', ','] + node, rest = expr(rest[1:]) + nodes.append(node) + return Call(toks[0], nodes), rest[1:] + elif toks[0][0].isdigit(): + return int(toks[0]), toks[1:] + else: + assert False + root, rest = expr(re.findall(r'\(|\)|,|[A-Za-z]\w*|\d+', s)) + assert rest == [] + return root + +def compute(computations, reg): + def evaluate(x): + if type(x) is int: + return x + else: + return reg[x.name].apply(map(evaluate, x.args)) + return [evaluate(parse(s)) for s in computations] + +class Function(object): + def __init__(self, f): self.f = f + def apply(self, args): return self.f(args) + def batchApply(self, batches): return map(self.f, batches) + +def compute(computations, reg): + reg = {name: Function(f) for name, f in reg} + tree = map(parse, computations) + while type(tree) + # find leaf calls + leafs = [] + def leaf_calls(call): + if all(type(node) is int for node in call.args): leafs.append(call) + else: [leaf_calls(node) for node in call.args if type(node) is Call] + leaf_calls(tree) + # group by function name + grouped = {} + for leaf in leafs: grouped.setdefault(leaf.name, []).append(leaf) + # compute batches + results = [(reg[name].batchApply([leaf.args for leaf in leafs]), leaf) + for name, leafs in grouped] + # put results back into tree + def replace_nodes(call): + for i, node in enumerate(call.args): + for value, leaf in results: + if node is leaf: + call.args[i] = value + replace_nodes(tree) + return tree + +print parse('f(0)') +print parse('f(f(0))') +print parse('f(g(h(2,3),5),g(g(3),h(4)),10)') + +reg = {'f': (lambda x: 1 + x[0])} +print compute(['f(0)'], reg) +print compute(['f(f(0))'], reg) +reg = {'f': sum, 'g': max, 'h': (lambda x: 0)} +print compute(['f(g(h(2,3),5),g(g(3),h(4)),10)'], reg) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-08-10 05:59:39
|
Revision: 1861 http://sourceforge.net/p/assorted/svn/1861 Author: yangzhang Date: 2013-08-10 05:59:37 +0000 (Sat, 10 Aug 2013) Log Message: ----------- Add Specialized.scala Added Paths: ----------- sandbox/trunk/src/scala/Specialized.scala Added: sandbox/trunk/src/scala/Specialized.scala =================================================================== --- sandbox/trunk/src/scala/Specialized.scala (rev 0) +++ sandbox/trunk/src/scala/Specialized.scala 2013-08-10 05:59:37 UTC (rev 1861) @@ -0,0 +1,11 @@ +object Specialized extends App { + val xs: Array[Object] = Array(null) + xs(0) = 0: java.lang.Integer + def f[@specialized(Int, Double) T] = xs(0) match { + case x: java.lang.Integer => x.intValue.asInstanceOf[T] + case _ => throw new Exception + } + f[Int] + println(f[Int]) + println(f[Double]) +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-07-04 02:21:11
|
Revision: 1860 http://sourceforge.net/p/assorted/svn/1860 Author: yangzhang Date: 2013-07-04 02:21:09 +0000 (Thu, 04 Jul 2013) Log Message: ----------- Add node sync demo Added Paths: ----------- sandbox/trunk/src/node/ sandbox/trunk/src/node/sync.coffee Added: sandbox/trunk/src/node/sync.coffee =================================================================== --- sandbox/trunk/src/node/sync.coffee (rev 0) +++ sandbox/trunk/src/node/sync.coffee 2013-07-04 02:21:09 UTC (rev 1860) @@ -0,0 +1,12 @@ +sync = require('sync') +jade = require('jade') +marked = require('marked') +grunt = require('grunt') +pygmentize = require('pygmentize-bundled') +timeout = (time, cb) -> setTimeout(cb, time) +marked.setOptions + highlight: (code, lang) -> + console.log(code, pygmentize) + pygmentize.sync({lang: lang, format: 'html'}, code).toString() +sync -> + console.log(jade.compile(grunt.file.read('app/index.jade'), {})({})) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-06-06 21:10:32
|
Revision: 1859 http://sourceforge.net/p/assorted/svn/1859 Author: yangzhang Date: 2013-06-06 21:10:30 +0000 (Thu, 06 Jun 2013) Log Message: ----------- Concurrent module reload in Python Added Paths: ----------- sandbox/trunk/src/py/concurrentreload/ sandbox/trunk/src/py/concurrentreload/main.py Added: sandbox/trunk/src/py/concurrentreload/main.py =================================================================== --- sandbox/trunk/src/py/concurrentreload/main.py (rev 0) +++ sandbox/trunk/src/py/concurrentreload/main.py 2013-06-06 21:10:30 UTC (rev 1859) @@ -0,0 +1,27 @@ +# Concurrent reloading magically works +# You see 0s then 1s +import time +import threading +def gen(i): + with open('a.py', 'w') as f: + print >> f, ''' +import time +def echo(): print %s +def loop(): + while 1: + time.sleep(.2) + echo() + ''' % i +gen(0) +import a +def doreload(): + time.sleep(1) + gen(1) + reload(a) +def doloop(): + while 1: + time.sleep(.2) + a.echo() +threading.Thread(target=doreload).start() +threading.Thread(target=doloop).start() +threading.Thread(target=a.loop).start() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-06-06 02:13:48
|
Revision: 1858 http://sourceforge.net/p/assorted/svn/1858 Author: yangzhang Date: 2013-06-06 02:13:46 +0000 (Thu, 06 Jun 2013) Log Message: ----------- Add curl_multi experiments Added Paths: ----------- sandbox/trunk/src/php/curl_multi.php Added: sandbox/trunk/src/php/curl_multi.php =================================================================== --- sandbox/trunk/src/php/curl_multi.php (rev 0) +++ sandbox/trunk/src/php/curl_multi.php 2013-06-06 02:13:46 UTC (rev 1858) @@ -0,0 +1,28 @@ +<? +# invoke https://bugs.php.net/bug.php?id=61141 +if (false) { + $mh = curl_multi_init(); + print curl_multi_select($mh, 1.0); + curl_multi_close($mh); +} + +$xs = array('CURLM_OK' => CURLM_OK, 'CURLM_CALL_MULTI_PERFORM' => CURLM_CALL_MULTI_PERFORM);error_log(print_r($xs)); + +$mh = curl_multi_init(); +$ch = curl_init('http://localhost/chat/http-bind/'); +error_log("mh=$mh ch=$ch"); +curl_multi_add_handle($mh, $ch); +do { + $mrc = curl_multi_exec($mh, $running); + error_log("mrc=$mrc running=$running"); +} while ($mrc == CURLM_CALL_MULTI_PERFORM); +while ($running && $mrc == CURLM_OK) { + $ms = curl_multi_select($mh, 1.0); + if ($ms != -1) { + do { + $mrc = curl_multi_exec($mh, $running); + } while ($mrc == CURLM_CALL_MULTI_PERFORM); + } +}curl_multi_remove_handle($mh, $ch); +curl_multi_close($mh); +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-04-25 19:06:34
|
Revision: 1857 http://sourceforge.net/p/assorted/svn/1857 Author: yangzhang Date: 2013-04-25 19:06:20 +0000 (Thu, 25 Apr 2013) Log Message: ----------- Add aws.slice-data.com hosts Modified Paths: -------------- configs/trunk/src/ssh/config Modified: configs/trunk/src/ssh/config =================================================================== --- configs/trunk/src/ssh/config 2013-04-25 17:57:59 UTC (rev 1856) +++ configs/trunk/src/ssh/config 2013-04-25 19:06:20 UTC (rev 1857) @@ -3,6 +3,18 @@ # StrictHostKeyChecking yes/no/ask # NoHostAuthenticationForLocalhost yes/no +Host www.aws.slice-data.com dev.aws.slice-data.com newwww.aws.slice-data.com + User ubuntu + IdentityFile /home/yang/sec/slice-west-2.pem + +#Host dev.aws.slice-data.com + #HostName 10.252.172.110 + +Host testluser + HostName github.com + IdentityFile /home/yang/gittest/testluser/testluser.id_rsa + IdentitiesOnly yes + TCPKeepAlive=yes ServerAliveInterval=300 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-04-25 17:58:02
|
Revision: 1856 http://sourceforge.net/p/assorted/svn/1856 Author: yangzhang Date: 2013-04-25 17:57:59 +0000 (Thu, 25 Apr 2013) Log Message: ----------- Rewrite redirects in nginx reverse proxy Modified Paths: -------------- personal-site/trunk/README Modified: personal-site/trunk/README =================================================================== --- personal-site/trunk/README 2013-04-22 04:11:03 UTC (rev 1855) +++ personal-site/trunk/README 2013-04-25 17:57:59 UTC (rev 1856) @@ -166,6 +166,7 @@ proxy_pass http://127.0.0.1:88; proxy_set_header Host $host; # So WP URL rewriter works. proxy_read_timeout 99999; + proxy_redirect http://yz.mit.edu:88/ http://yz.mit.edu/; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-04-22 04:11:06
|
Revision: 1855 http://sourceforge.net/p/assorted/svn/1855 Author: yangzhang Date: 2013-04-22 04:11:03 +0000 (Mon, 22 Apr 2013) Log Message: ----------- Update WordPress styling instructions Modified Paths: -------------- personal-site/trunk/README Modified: personal-site/trunk/README =================================================================== --- personal-site/trunk/README 2013-04-14 05:56:48 UTC (rev 1854) +++ personal-site/trunk/README 2013-04-22 04:11:03 UTC (rev 1855) @@ -71,9 +71,36 @@ [mysqld] default-storage-engine=innodb -In WP, make sure twentyeleven's style.css has the pandoc syntax highlighting -CSS. +In WP, make sure `twentytwelve-child/style.css` has the pandoc syntax +highlighting CSS: + /* + Theme Name: Twentytwelve Child + Description: Child theme for the twentytwelve theme + Author: Yang Zhang + Template: twentytwelve + */ + + @import url("../twentytwelve/style.css"); + + table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode, table.sourceCode pre + { margin: 0; padding: 0; border: 0; vertical-align: baseline; border: none; } + td.lineNumbers { border-right: 1px solid #AAAAAA; text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px; } + td.sourceCode { padding-left: 5px; } + pre.sourceCode span.kw { color: #007020; font-weight: bold; } + pre.sourceCode span.dt { color: #902000; } + pre.sourceCode span.dv { color: #40a070; } + pre.sourceCode span.bn { color: #40a070; } + pre.sourceCode span.fl { color: #40a070; } + pre.sourceCode span.ch { color: #4070a0; } + pre.sourceCode span.st { color: #4070a0; } + pre.sourceCode span.co { color: #60a0b0; font-style: italic; } + pre.sourceCode span.ot { color: #007020; } + pre.sourceCode span.al { color: red; font-weight: bold; } + pre.sourceCode span.fu { color: #06287e; } + pre.sourceCode span.re { } + pre.sourceCode span.er { color: red; font-weight: bold; } + Also edit easyfilter.php, adding this line before `return $filtered;`: $filtered = $filtered . '<p><em><a href="http://twitter.com/yaaang">Follow me on Twitter</a> for stuff far more interesting than what I blog.</em></p>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-04-14 05:56:51
|
Revision: 1854 http://sourceforge.net/p/assorted/svn/1854 Author: yangzhang Date: 2013-04-14 05:56:48 +0000 (Sun, 14 Apr 2013) Log Message: ----------- Add slice-data.com Modified Paths: -------------- configs/trunk/src/ssh/config Modified: configs/trunk/src/ssh/config =================================================================== --- configs/trunk/src/ssh/config 2013-04-03 05:26:29 UTC (rev 1853) +++ configs/trunk/src/ssh/config 2013-04-14 05:56:48 UTC (rev 1854) @@ -6,6 +6,16 @@ TCPKeepAlive=yes ServerAliveInterval=300 +Host *.slice-data.com + ForwardAgent yes + +Host nuthouse.partyondata.com + ForwardAgent yes + ForwardX11 yes + ForwardX11Trusted yes + LocalForward 8000 localhost:80 + LocalForward 8787 localhost:8787 + Host * ControlPath ~/.ssh/master-%l-%r@%h:%p ControlMaster auto This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2013-04-03 05:26:31
|
Revision: 1853 http://sourceforge.net/p/assorted/svn/1853 Author: yangzhang Date: 2013-04-03 05:26:29 +0000 (Wed, 03 Apr 2013) Log Message: ----------- Run refresh-agent non-interactively 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 2013-03-31 22:39:05 UTC (rev 1852) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2013-04-03 05:26:29 UTC (rev 1853) @@ -909,6 +909,10 @@ # Save the current environment's agent. update-agent() { keychain --nogui --inherit any; } +# For non-interactive scripts, PROMPT_COMMAND doesn't get run, so run this at +# least once +refresh-agent + PROMPT_COMMAND=refresh-agent # TODO note that bash_completion usually does a ton of stuff (and in This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |