Skip to main content.
August 22nd, 2007

Mini Searches with Answers

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

Mirrorboard: A one-handed keyboard layout for the lazy

Working With Files and Paths
This may be the best cross platform file locking library for Python out there.

This is a simple recipe how to use XMLRPC with web.py
The trick is to use SimpleXMLRPCServer.SimpleXMLRPCDispatcher and feed the method processing the request data from web.webapi.data()

simplejson is a simple, fast, extensible JSON encoder/decoder for Python
simplejson is compatible with Python 2.3 and later with no external dependencies. It covers the full JSON specification for both encoding and decoding, with unicode support. By default, encoding is done in an encoding neutral fashion.

Web.py - Why Doesn’t my URL Mapping Work When I put a Question Mark (?) in the Pattern?
Somehow web.py preprocesses your URL and removes a query string if it finds it. Thus the work around is to match the URL without the query string part and then use web.input() to access the variables. Golly, web.py, I’m kind of dissapointed on this one.

Web Based ERM Diagram Tool with SQL Export
Finally can I design databases online?

Scripting Microsoft SQL Server Enterprise Manager Tasks with Python
Wow, you can control Enterprise Manager type things! Who knew!

Store Binary Files Right in a Python Script
Pretty Neat

Tags: , , , , , , , , , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST

1 Comment »

August 14th, 2007

Mini Searches with Answers

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

ASPN : Python Cookbook : Grabbing the current line number easily

ASPN : Python Cookbook : MySQL and accessing database results by field

Characterizing one-class datasets
How do you classify examples when you only have one class? The trick is to think about the task as outlier detection instead of standard classification. This paper provides an informative overview of the task.

Text Expander for Linux? Snippits KDE-Apps.org
This is Ruby program that will type text for you. It uses ’snippits’, small text files with a simple syntax to determine what to type.

TechBlog - How to: Restore packages using dselect-upgrade
How to backup and restore all of your installed packages on Ubuntu. Basically it just makes a list of everything you have installed.

Mouse clicking issues - Ubuntu Forums
My mouse is double clicking when I only single click. This forum suggests changing the mouse protocol to IMPS/2 in the xorg.conf file. I’ll try this soon. .. suggests the keyboard and mouse could be plugging into the wrong on your computer ie switched.

Tags: , , , , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST

Comments Off

August 12th, 2007

How to Make a Beep Sound in Linux and a Fun Program that Uses it

I came across my first Python script using Tkinter tonight while looking through old files. It creates a big screen where you can click anywhere on it and it makes your computer beep. Your Y position controls the frequency and your X position controls the duration.

Well, I wanted to give it a run for old time’s sake, but alas:
ImportError: No module named winsound (On Linux)

So I looked up the problem and decided to go with the beep package installed by running:
sudo apt-get install beep

Then I updated my script to run on both Windows and Linux. Enjoy*:

#!usr/bin/env/python

from Tkinter import *

try:
    import winsound
except ImportError:
    import os
    def playsound(frequency,duration):
        #apt-get install beep
        os.system('beep -f %s -l %s' % (frequency,duration))
else:
    def playsound(frequency,duration):
        winsound.Beep(frequency,duration)

root = Tk()
def callback(event):
    print "clicked at", event.x, event.y
    frequency=event.y * 6
    duration=event.x/2
    print "Freq= ", frequency, "HZ"
    print "duration=",duration, "ms"
    print ""
    if (frequency < 32000) and (frequency>40):
        playsound(frequency,duration)

frame = Frame(root, width=1000, height=800)
frame.bind(”<Button-1>”, callback)
frame.pack()
#message=Label(frame)
root.mainloop()

* Or annoy those near you …

Posted by Greg Pinero (Primary Searcher) as win32, Python, Ubuntu at 11:14 PM MST

Comments Off

August 9th, 2007

Mini Searches with Answers

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

PyISAPIe ? About PyISAPIe
Will this guy work like mod_Python but for IIS? Is it mature enough? Has anyone tried it?

CSSFly - Edit websites on the fly!
Will this work in IE too? If so it would be very useful since there’s no editCSS for IE.

Re: how can I build a surface electromyograph
Good advice for getting started on your own DIY electromyograph.

ECE 476 Final Project: Wireless Electromyograph
More detailed advice for getting started on your own DIY electromyograph.

A Discussion on Surface Electromyography: Detection and Recording.
Very detailed information to help you build an electromyograph biofeedback computer.

Open Office - How to do Page Specific Headers
Make sure the stylist is visible (Format|Stylist, F11). Click the "Page Styles" icon in the Stylist. Double click on "First Page" in the list in the stylist. Then you can do Insert|Header|First Page from the main menus, and enter the page specific…

Tags: , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST

Comments Off

August 3rd, 2007

Mini Searches with Answers

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

Definative Design Patterns in Python
An excellent writeup of using design patterns in Python. It was surprisingly hard to search for.

A good explanation of all formats of the coupon extended code.

Google Answers: How can I create a manmade lake?
How do artificial or man-made lakes work? These answers help but I’d love to see a Wikipedia entry on this subject.

Idocs Guide to HTML: WRAP
Set textarea attribute wrap="off" to make it stop making newlines at each space.

Python - How do to do try, except, finally
This PEP advocating adding a try, except, finally deal to the language actually tells you the way to do it now (a workaround)

SIMILE | Exhibit - Generate Interface to Data with Only Javascript
Only handles a few hundred data elements though :-(

Tags: , , , , , , , , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST

1 Comment »

« Previous Entries