Category Archives: Lyft

Because Lyft is the best -_-

record Lyft tip in the PA

on my way back from the Eventbrite Pycon practice talks, I decided to turn on Lyft from Redwood City to Palo Alto

I wasn’t too optimistic about getting a ride.  I exited Marsh Road in Menlo Park, and went down Middlefield, turning right on University.   There, to my delight, I got a ping!  Next to Evvia on Emerson.  Awhile back I ate there with Yuna and ate the bestest 40 dollar lamb chops ever.  But anyways,  turns out this guy was really drunk, though I’ve seen much worse as a driver and I told him that, he was from Missouri, and as he put it in his own words was “funemployed” from his job as a restaurant person in San Francisco.

We have a fun conversation, he’s married, and he guides me to this somewhat hidden cul-de-sac off Oregon Expressway in between Middlefield and Cowper.  His wife also drives for Lyft.  He also goes to Philz Coffee on Middlefield!  Eventually after a short drive we get there, and he rambles on stating that I need to help him use the app to tip because he wasn’t familiar with the UI.  So I show him where to tap  (on the credit card button on the Lyft app) and helped him navigate to the screen with the plus and minus signs to increase the amount/donation.

Turns out the guy goes crazy, and jacks up the 7 dollar ride to like 46!   This dude was the best!   His wife came out while he was tapping the + plus button, and saw me cuddlestache.  She asked me how do you get one and I told her I went to one of the Lyft driver events (in Mitchell Park!) and got one.   Before departing I gave em like two of my green Lyft stickers and my referral card  (not that they could use it though in hindsight)

 

ctrl+c dosen’t cancel a running Python script that uses threads?! /gasp

welp, ctrl+c is my best friend when it comes to bailing out of a program where I screwed up or is taking too long for my gamer-esque patience

It turns out you actually gotta kill -9 the process!

The answer to “why” this is the case is around 22:00 to 25:00 in this  presentation, “Inside the Python GIL”  by David Beazley:

This came about as recently I’ve been working on a Rackspace Cloud Files container replication program, and I’ve been working on trying to speed it up in ways so that it completes in a “reasonable” amount of time.   

I first gave it a shot at it with the multiprocessing module.  Soon enough though I found I couldn’t use it due to the inability to pickle an SSLObject.  Which, I guess the cloudfiles.connection.Connection I was using to connect to the Cloud Files container was using.

At this point I went searching for an answer, and tangentially discovered that Cloud Files’ origin was actually from a separate company named Mosso, which Rackspace acquired and turned into their cloud service thingy!

My second try was more successful:  using the threading and Queue modules to create a specified number of worker threads to run replicate() method over a queue of container objects.

And this is where I discovered this ctrl+c weirdness/intricacy.  I’d have a bug or some stack happening which I could see from the debug output.  Wanting to exit out early, I’d bang on ctrl+c to absolutely no avail!  Sooooo weird!  haha