The Old School

Month

July 2009

30 posts

Jul 29, 2009
Wikipedia: List of common misconceptions → en.wikipedia.org

justinday:

david:

via ben

Awesome page, but don’t click if you have important things to do, I had to drag myself away..

Jul 29, 2009142 notes
Play
Jul 28, 20091 note
Jul 28, 20091,238 notes
Play
Jul 27, 2009
Jul 24, 2009343 notes
Jul 24, 2009
Play
Jul 24, 20095 notes
“Yesterday, to commemorate the 40th anniversary of the moon landing, the three astronauts from Apollo 11 visited the White House. Neil Armstrong and Buzz Aldrin were allowed to set foot inside the White House, while Michael Collins was forced to drive around in circles outside.” —Conan O’Brien
Jul 24, 20099 notes
“Prisons used to be a non-profit business, too. And for good reason —­ who the hell wants to own a prison? By definition you’re going to have trouble with the tenants. But now prisons are big business. A company called the Corrections Corporation of America is on the New York Stock Exchange, which is convenient since that’s where all the real crime is happening anyway. The CCA and similar corporations actually lobby Congress for stiffer sentencing laws so they can lock more people up and make more money. That’s why America has the world’s largest prison population ­— because actually rehabilitating people would have a negative impact on the bottom line.” —

Bill Maher (via azspot) This has always infuriated me. (via asprettyasasong) (via mikehudack)

I feel really strongly about this. It’s one of the worst things about California, who imprisons practically as many people as Texas and whose prison guard union is one of the most powerful groups in Sacramento.

(via justinday)

Jul 24, 200992 notes
Recursion Rocks

def __flatten_list(parent_list):

this_list = []
child_list = []

if type(parent_list) is not list:

return [parent_list]


for i in parent_list:

if type(i) is list:

child_list = __flatten_list(i)
for j in child_list:

this_list.append(j)

else:

this_list.append(i)


return this_list

That turns: [1, [2, [3, 4], 5], 6] into [1, 2, 3, 4, 5, 6].  I’m sure I’ll discover a better pythonic way of doing this later.


Jul 18, 2009
Jul 17, 2009
Jul 17, 2009
Python CSD Package

I’m four weeks into learning python, and have spent most of this time writing a package for parsing and modifying Csound code.  Last night, I finally got it to the point where it can do some pretty useful stuff with very little code.  For example:

def swap_pan_position(x): return 1.0 - x 
selection = sco.select(score, {0: ‘i’, 1: 2}) 
selection = sco.operate_numeric(selection, 6, swap_pan_position) 
new_score = sco.merge(score, selection)

That small snippet of code selects all instrument 2 i-events, runs every 6th parameter with the swap_pan_position() function, and merges the results back with the original score.

Before:

i 2 0 4 1.0 880 1.0    ; p6 is pan 
i 2 + 4 .   .   0.25 
i 2 + 4 .   .   0.999 
i 2 + 4 .   .   0.0


After (look at the far right column):

i 2 0 4 1.0 880 0.0    ; p6 is pan 
i 2 + . .   .   0.75 
i 2 + . .   .   0.001 
i 2 + . .   .   1.0

Very convenient to have something like this, especially if one is to modify dozens, if not hundreds of fields.

Download csd_v0.0.3alpha. Online docs here.

Jul 17, 2009
Jul 16, 200979 notes
“Joe the Plumber — you can quote me — is a dumbass. He should stick to plumbing.” —Meghan McCain (source)
Jul 16, 2009
Play
Jul 15, 2009
#Tron Reboot : Episode 01
Play
Jul 13, 2009
Jul 13, 200922 notes
Jul 12, 20093 notes
Next page →
2012 2013
  • January 28
  • February 35
  • March 38
  • April 44
  • May 48
  • June 31
  • July
  • August
  • September
  • October
  • November
  • December
2011 2012 2013
  • January 59
  • February 71
  • March 56
  • April 22
  • May 37
  • June 47
  • July 44
  • August 36
  • September 32
  • October 33
  • November 28
  • December 25
2010 2011 2012
  • January 41
  • February 48
  • March 65
  • April 49
  • May 64
  • June 52
  • July 29
  • August 82
  • September 40
  • October 78
  • November 77
  • December 78
2009 2010 2011
  • January 63
  • February 64
  • March 39
  • April 30
  • May 30
  • June 20
  • July 25
  • August 42
  • September 44
  • October 32
  • November 19
  • December 20
2009 2010
  • January
  • February
  • March
  • April
  • May 51
  • June 40
  • July 30
  • August 99
  • September 30
  • October 38
  • November 22
  • December 47