Skip to content

Instantly share code, notes, and snippets.

View srid's full-sized avatar
🌤️
a smoothly flowing moment of clear experiencing

Sridhar Ratnakumar srid

🌤️
a smoothly flowing moment of clear experiencing
View GitHub Profile
@srid
srid / foo.py
Created February 13, 2009 20:14
import os, sys
def hello():
print "Hello World!"
if __name__ == "__main__":
hello()
/*
Ubiquity Command: download-files [regexp pattern] to [folder]
Author: Duane Johnson
Email: duane.johnson@gmail.com
Description: Downloads files matching the regular expression pattern to a folder.
See: http://github.com/canadaduane/ubiquity-download-files
*/
@srid
srid / healthyeyes-daemon.sh
Created February 23, 2009 16:30
Notify every 20 mins - requires NotifyOSD from Ubuntu Jaunty
while true; do
notify-send -t 20000 "Take a break?" "Just look away and blink your eyes"
sleep 1200;
done
srid@homeless:~/code/gnusim8085$ git branch; git svn info
master
* ui-file-management
Path: .
URL: https://gnusim8085.svn.sourceforge.net/svnroot/gnusim8085/tags/1.3.5
Repository Root: https://gnusim8085.svn.sourceforge.net/svnroot/gnusim8085
Repository UUID: c0c784df-5f15-0410-a540-c3e77be2c7b8
Revision: 136
Node Kind: directory
Schedule: normal
# an example of ordered test runs using yield
def test_typical_usecase():
"""Test the typical use case, which is to -
1) update 2) search 3) install 4) remove
.. and 5) import
"""
c, repo_root_url = prepare_client(packages_small_list)
def test_typical_usecase():
"""Test the typical use case, which is to -
1) update 2) search 3) install 4) remove
.. and 5) import
"""
packages = packages_small_list
c, repo_root_url = prepare_client(packages)
c.do_update(None, None, repo_root_url)
import os
from os.path import abspath
import tarfile
import zipfile
from pypm.util import console
def extract_file(path, to_directory='.'):
compressedobj = CompressedFile.detect(path)
4Suite-XML
Amara
archetypes.schemaextender
bicop
borg.localrole
borg.project
borg.supergroup
BrainFreeze
brian
Cheetah
def original():
for i in range(10):
for j in range(10):
for k in range(10):
if i == j and j == k:
yield "All equal"
elif (i == j and j != k) or (i == k and j != k):
yield "2 equal"
else:
yield "None equal"
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\HOME\as\apy\branches\nightly\build\pyhg_branches_release3_1_maint-win32-x86-hgtip31-rrun\python\libs /LIBPATH:C:\HOME\as\apy\branches\nightly\build\pyhg_branches_release3_1_maint-win32-x86-hgtip31-rrun\python\PCbuild /LIBPATH:build\temp.win32-3.1\Release "/LIBPATH:C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" "/LIBPATH:C:\Program Files\Microsoft DirectX SDK (August 2009)\lib\x86" advapi32.lib user32.lib ole32.lib oleaut32.lib /EXPORT:PyInit_pywintypes build\temp.win32-3.1\Release\win32\src\PyACL.obj build\temp.win32-3.1\Release\win32\src\PyDEVMODE.obj build\temp.win32-3.1\Release\win32\src\PyHANDLE.obj build\temp.win32-3.1\Release\win32\src\PyIID.obj build\temp.win32-3.1\Release\win32\src\PyLARGE_INTEGER.obj build\temp.win32-3.1\Release\win32\src\PyOVERLAPPED.obj build\temp.win32-3.1\Release\win32\src\PySECURITY_ATTRIBUTES.obj build\temp.win32-3.1\Release\win32\src\PySECURITY_DESCRIPTOR.obj build\temp.wi