Posts with tag: python

Spatial sounds for javascript

| tags: python, sound, javascript, blind

Statial ("3D") sound greatly enhances games for children who are visually impaired but the audio node in HTML5 doesn't even support panning left and right much less the time delay and filtering of true spatial audio. This post describes a python script I hacked to transform sound files so that they appear to originate from points surrounding the listener.


Komodo Edit Run Command

| tags: python, programming

A sudden change in my teaching assignment to teaching Comp116 Introduction to Scientific Programming in 2 days resulted in a frantic search for Python programming tools that work the same across Windows, OS X, and Linux. The Enthought Python Distribution looks like a really good turn-key solution to having Python + Numpy + Matplotlib easily working on all three but we also need an editor.


No news is good news!

| tags: python, random, programming

The more I cut back on broadcast news, the happier I become. I first started during the recent election season when the political ads were insane. Then I got fed up with the amateur hour over at WRAL and switched to listening to Jazz with Bob Parlocha on WNCU in the mornings. I took another step today by automatically muting WNCU's stream at the top of each hour when they play NPR news.

I get my news reading the paper and the web where I get to choose what I read. According to a recent Pew Research Report this puts me in with the young hip consumers of news.

I recommend taking a break from the talking heads, you'll be happier for it.


Visually Comparing Python Objects

| tags: python, programming

I had two Python objects consisting of nested dictionaries, lists, strings, and numbers. These were the original and an automatically edited version of a JSON data structure we are using in a game. I wanted to make sure the automatic editing did what I really wanted before I wrote it to the live database.

This Python code did the trick.


Connecting a Dojo Data Grid to a JsonRestStore

| tags: tornado, python, dojo, javascript, programming

I looked high and low and couldn't find a working example of connecting a dojox.grid.DataGrid to a so I puzzled out parts of it myself. This code probably has errors and omissions but it seems to work for me with dojo 1.4.1.

I would appreciate any corrections or pointers to other examples from those of you who know better. I haven't included any error checking and the references to items by key break down after deletions because of the simple minded implementation of the "database".