Tuesday, July 17, 2012

Museum Pleasantries and Girlish Babble - Disregard


Brooklyn Museum on Saturday with some 622er's - Nathan, Lisa, David C., Vicki, and James (who recognized and finished a Gershwin song quote I started-- Awesome Points awarded.)

Note to self - read more. Titles mentioned = The Gods Themselves, The Last Question, Snow Crash, Dune (which I have at least heard of!)




Apparently, alcoholic brunches are "a thing," here. Between certain hours, certain restaurants serve bottomless brunch drinks. I had to get the full "New York experience," so I tried it...

Brunch:
  • One (bottomless) mimosa
  • Screwdriver 
  • Dagwood-style hamburger concoction 
After brunch, I went shopping for clothing with coding buddies  (whendoesthiseverhappen?!) - Martha, Jane, Ingrid, and Trucy. We found a cool dark corner at  a bar, drank (water)... 

Girl talk and interview advice - Never name your price. They can give you more, so ask. Haggle. Assert yourself. Show that you know your worth - and you are worth more than they are offering! Strong independent women. Yea, I think I'm in the right place ;)



Hacker School Game night was funnn..... I left early. Tired and semi-drunk all day. 


The whole 'intoxicated thing' is not as great as it's cracked up to be. I'd rather act drunk while sober (in some silly dancing Broadway theater manner) than act drunk while actually drunk... or unintentionally act drunk while sober. Najva lent me the first episode of Season III of the Real L Word the other day. I don't follow it, but that's what I thought of all the characters. Either they are drunk on set or they are just permanently intoxicated. Or just really stupid.


OR they're utterly brilliant, witty, and intelligent in that good-ol American way, and I just don't see it. Right, I'm sure that's the case.

...


Ok, fine, maybe I'm just bitter because there are no nerds. 

Monday, July 16, 2012

Nyquist-Shannon Sampling + Shazam


Nyquist–Shannon sampling theorem
    MyNutShellDefinition: With twice the frequency of the highest contributing sine wave frequency, you can accurately reproduce your signal. 


- Following the Shazam Algorithm - 
The Concept:
If you put the constellation map of a database song on a strip chart, and the constellation map of a short matching audio sample of a few seconds length on a transparent piece of plastic, then slide the latter over the former, at some point a significant number of points will coincide when the proper time offset is located and the two constellation maps are aligned in register. 

The Implementation:
Each anchor point is sequentially paired with points within its target zone, each pair yielding two frequency components plus the time difference between the points (Figure 1C and 1D).  These hashes are quite reproducible, even in the presence of noise and voice codec compression.  Furthermore, each hash can be packed into a 32-bit unsigned integer.  Each hash is also associated with the time offset from the beginning of the respective file to its anchor point, though the absolute time is not a part of the hash itself.
Questions:
What constitutes a constellation point? (There may/will be multiple per bin. We will use one.)
MISC: 

DFT Walkthrough - (think I saw his stuff in Modeling&Post)

Using the sampling rates etc suggested here


In some audio processing approaches, a visual representation of the signal is created and analyzed. (Note to self - check out Hough Transform )


After presentations, jLaster mentioned Bloom Filters, which rapidly tell you whether an element is present in your set. Might be useful for a preliminary test on very large data sets. 


RANDOM : 
What was that, Eleanor dear? - marthakelly's hilarity
Beautiful Sudoku Code - recommended by jczetta

Python Requests - Logging and Expect Headers

Follow-up on Requests Issue #695 (the Logging Bug):
Muhtasib noticed Requests doesn't implement logging.
Taking a closer look at urllib3 code & documentation:
        intro to logging        Tutorial (more detailed)
   Oauth also uses logging...
    
Action Taken - Comment to K.R., asking if/how this should be implemented.

Starting on Requests Issue #713 (Support for Expects Http Header Bug)
Requests can check the request headers, and if it finds an "Expect" header it will wait for the 100 Continue response from the server. If it does not come, this error should flow to the caller in a way that it can distinguish a network problem from a failed expectation error.
You send an Expect header, telling the server you expect a 100 (continue) response before you will send the body. If there are images or videos or some form of substantial data in the body, you don't want to send if the server will reject it anyway.

Because you are waiting for a response from the server, one request actually becomes two - a request sending the header and a request sending the body.

Dialogue goes a little something like....
Client: I want to post something. Ready? 
Server: Sure! [100-continue]
Client: Here it comes! *posts*
Server: Got it! [200]


Plan of Attack


if request.headers contains Expect-header 
    send request with header only
    wait for response


    if response == 100 (continue)
        send request with body
else
    send request as normal

Things to consider:

  • limit wait time and throw exception/error if no response
  • if server prematurely closes ... don't try to send again
Testing - We want to find a website that give a 100-continue. We want to see that 100-continue. HOW? In the response header? In the response content? 

Thursday, July 12, 2012

Wandering

"So, I was wandering down Broadway the other day, and ... "


     (Oh geez, I have been waiting to use that line)

"...and I happened upon a playbill for Gore Vidal's The Best Man...."



"...starring James Earl Jones and Angela Lansbury. My little theater-heart, aflutter with curiosity, dragged me inside. I emerged with a single glorious ticket to a single glorious matinee. 

Even Charlie would have been jealous."



"When I returned an hour later, the theater was gorged with patrons. I imagined my seat - two hours, condemned to the back wall... "



"Nope.

8D


A private box! So close I could see the human details of the talent -- Dimples on smiles and whites of the eyes, crevices of hands and wisps of hair. I could have reached down and brushed Legends. But there was no need. 

They reached up to me, instead."

dawwwww :)

</cheesy>

Lincoln Center hosts "MidSummerSwing" dance events for three weeks. I caught the last hour of the last night of tango. Outside, with live music, stage erected from scratch and a dance floor that costs $20 to step on. I stayed on the concrete... The bottoms of my shoes hate me for this >.< 

I danced with a single partner named Eduardo, who supposedly teaches and worked for Fred Astaire earlier in his life. Flashy, spinning all over the dance floor, and he taught along the way. He gave me his card, eager for another student. Not sure if I'll follow up... but it was some great dancing. Dips and ganchos and slides and extensions and such quick footwork!

Tuesday, July 10, 2012

You. Will. Be. Ex.TeRRminated. (BugHunting)

Open Source Week Project = Requests: HTTP for Humans 

Requests Issue #567 (SSL Documentation Bug)
Document use cases of Requests 'get' function with and without SSL certification verification.

What is SSL?
Secure Socket Layer.
https://
.pem
.crt + .key
client-side certification no longer used.
    ( confirmed by speaker via gsterns HOPE speaker-searchchrome )
Submitted patch


Resources
    Diffie Hellman Key Exchange
    SSL - all you wanna know (search for "Well, we really need to talk about TLS.")


Testing - tgebru configured her Apache server + SSL certification

Requests Issue #699 (Differentiate between Timeout Errors)
Connection Pool Error or Socket Timeout Error? We fixed this by "bubbling" the error message sent by urllib3 through Requests to the user.
Submitted patch

Requests Issue #695 (Document Logging)

GIT Random Scratchy Notes...

make changes on separate branch from master
(already forked and made changes)
check what branch
git branch
(sugg = develop branch, if one)
Fork
git checkout master
THEN
git checkout -b name-of-your-branch
(which will branch from master, since you did that before)
git commit (message relevant to checkin only. details in pull request)
git push origin Branch-Name_you_created
submit pull request on github, include details here.
git diff - see changes
Git Help http://gitref.org/creating/


RANDOM
http://www.fivefeetoffury.com/2012/06/25/get-pregnant-by-25-if-you-want-a-high-powered-career/

Friday, July 6, 2012

Sunbathing

I've been out in the sun a lot. 


Hope I don't get tan lines. 
XD

</dork>

Thursday, July 5, 2012

Crown Heights IV

I moved....

Goodbye, favorite Sketchy-Bakery-Across-the-Street.


The new place.


The lobby.


My room (much larger than it looks).

My room from the other side.

It's very long, though you can't tell in the photos. Enough room to dance! 

The view.

Vegetarian House Dinner, prepared by Simona.

No lactose :)

Shar and I went to NJ to watch the fireworks from Hoboken. Spectacular, with some reflective moments. Beautiful day, great company, serenity in enjoying the sea of people. Another open-minded one. 

This doesn't do it justice, but imagine....



+ Frozen yogurt afterwards.




Like Dandelion Wine.