1. SciPy 2017 tips

    After missing it for a couple of years, I am happy to be back in Austin, TX for SciPy this week!

    Always invigorating and exhilarating, Scientific Computing with Python (SciPy) has remained a top quality venue for getting together with fellow Pythonistas, especially the academically-bent variety.

    As a graduate student eight years ago, I was fortunate enough to be one of receive sponsorship and attended my first SciPy - SciPy 2009. This was the last time it was held at CalTech in Pasadena, CA.

    @ivanov/status/2648139681

    The following year, in 2010, at the first SciPy held in its now usual spot in Austin, TX, each attendee got a bottle of delicious salsa!

    SciPy2010 Salsa Stack

    Here are some oy my thoughts about attending this wonderful conference.

    Conference Tips

    bring a sweatshirt -- Yes, I know Austin's hot, but at the AT&T center, they don't mess around and crank the air conditioning all the way up to 11!

    join the slack group -- This year, there's a Slack group for SciPy: the link to join is in a pair of emails with the titles "Getting the most out of SciPy2017" and "Getting the most out of SciPy2017-UPDATED", both from SciPy2017 Organizers. So far at the tutorials slack has served as a useful back channel for communicating repo URLs and specific commands to run, signaling questions without interrupting the speakers' flow.

    engage with others during the breaks, lunch, etc -- There are lots of tool authors here and we love chatting with users (and helping you become contributors and authors yourselves). Not your first SciPy and feeling "in-your-element"? Make the effort to invite others into the conversations and lunch outings you're having with old friends - we're all here because we care about this stuff.

    take introvert breaks (and be considerate of others who may be doing the same) - I'm an introvert. Though I enjoy interacting with others (one-on-one or in small groups is best for me), it takes a lot of energy and at some point, I run out of steam. That's when I go for a walk, stepping away from the commotion to just have some quiet time.

    be kind to yourself (especially at the sprints) -- Between the tutorials, all of the talks, and the sprints that follow, there will be a flurry of activity. Conferences are already draining enough without trying to get any work done, just meeting a bunch of new people and taking in a lot of information. It took a lot of false starts for me to have productive work output at sprints, but the best thing I've learned about them is to just let go of trying to get a lot done. Instead, try to get something small and well defined done or just help others.

    Stuff to do in Austin

    The conference already has a great list of Things to do in Austin, as well as Restaurants, so I'll just mention a few of my personal favorites.

    Barton Springs Pool. Take a nice dip in the cool waters, and grab a delicious bite from one of the food trucks at The Picnic food truck park.

    Go see the bats. The Congress Ave bridge in Austin is home to the largest urban bat colony in the world. You can read more about this here, but the short version is that around sunset (8-9pm) - a large number of bats stream out from underneath the bridge to go feed on insects. Some days, they leave in waves (this Saturday there were two waves, the first was smaller, but many people left thinking that was the entire show).

    I hope you enjoy SciPy2017!

    permalink
  2. June 1st, 2017

    We had another biannual Jupyter team meeting this week, this time it was right nearby in Berkeley. Since I had read a poem at the last meeting, I was encouraged to keep that going and decided to make this a tradition. Here's the result, as delivered this past Friday, recorded by Fernando Pérez (thanks, Fernando!).

    June 1st, 2017

    We struggle -- with ourselves and with each other
    we plan -- we code and write
    the pieces and ideas t'wards what we think is right
    but we may disagree -- about
    the means, about the goals, about the
    shoulders we should stand on --
    where we should stand, what we should stretch toward
    shrink from, avoid, embrace --
    a sense of urgency - but this is not a race
    
    We can't erase the past
    but we have built this future present
    There's much to learn, to do...
    
    Ours not the only path, no one coerced you here
    You chose this -- so did I and here we are --
    still at the barricades and gaining ground
    against the old closed world:
    compute communication comes unshackled
    
    permalink
  3. March 29th, 2017

    What's missing -- feels like there's something missing --
    The capacity is there -- the job's not stressful but
    I somehow fail at the ignition stage - all this
    fuel just sitting around -- un-utilized potential
    How do I light that fire? Set it ablaze
    in a daze caught up in the haze of comfort
    I need to challenge myself, raising tides lift
    all boats, but they also drown 
    livestock
    cows, horses, and goats, seeking refuge in hills
    that once covered in grass now fill up like
    lifeboats. 
    Doctors in white coats 
    say "Keep your spirits up" -- hope floats.
    
    permalink
  4. November 9th, 2016

    Two weeks ago, I went down to San Luis Obispo, California for a five day Jupyter team meeting with about twenty five others. This was the first such meeting since my return after being away for two years, and I enjoyed meeting some of the "newer" faces, as well as catching up with old friends.

    It was both a productive and an emotionally challenging week, as the project proceeds along at breakneck pace on some fronts yet continues to face growing pains which come from having to scale in the human dimension.

    On Wednesday, November 9th, 2016, we spent a good chunk of the day at a nearby beach: chatting, decompressing, and luckily I brought my journal with me and was able to capture the poem you will find below. I intended to read it at a local open mic the same evening, but by the time I got there with a handful of fellow Jovyans for support, all of the slots were taken. On Friday, the last day of our meeting, I got the opportunity to read it to most of the larger group. Here's a recording of that reading, courtesy of Matthias Bussonnier (thanks, Matthias!).

    November 9th, 2016

    The lovely thing about the ocean is
    that it
    is
    tireless 
    It never stops
    incessant pendulum of salty foamy slush
    Periodic and chaotic
    raw, serene 
    Marine grandmother clock  
    crashing against both pier
    and rock
    
    Statuesque encampment of abandonment
    recoiling with force
    and blasting forth again
    No end in sight
    a train forever riding forth
    and back
    along a line
    refined yet undefined
    the spirit with
    which it keeps time 
    in timeless unity of moon's alignment
    
    I. walk. forth.
    
    Forth forward by the force
    of obsolete contrition
    the vision of a life forgotten
    Excuses not
    made real with sand, wet and compressed
    beneath my heel and toes, yet reeling from
    the blinding glimmer of our Sol
    reflected by the glaze of distant hazy surf
    upon whose shoulders foam amoebas roam
    
    It's gone.
    Tone deaf and muted by
    
    anticipation
    each coming wave
    breaks up the pregnant pause
    And here I am, barefoot in slacks and tie
    experiencing sensations
    of loss, rebirth and seldom 
    kelp bulbs popping in my soul.
    
    permalink
  5. Jupyter's Gravity

    I'm switching jobs.

    For the past two years I've been working with the great team at Disqus as a member of the backend and data teams. Before that, I spent a half-dozen years mostly not working on my thesis at UC Berkeley but instead contributing to to the scientific Python ecosystem, especially matplotlib, IPython, and the IPython notebook, which is now called Jupyter. So when Bloomberg reached out to me with a compelling position to work on those open-source projects again from their SF office, such a tremendous opportunity was hard to pass up. You could say Jupyter has a large gravitational pull that's hard to escape, but you'd be huge nerd. ;)

    I have a lot to catch up on, but I'm really excited and looking forward to contributing on these fronts again!

    permalink
  6. in transit

    Standing impatient, platform teeming, almost noon
    Robo voices read off final destinations
    But one commuter's already at his
    He reached for life's third rail
    
    There is no why in the abyss
    There's only closing credit hiss
    The soundtrack's gone, he didn't miss
    Reaching for life's third rail
    
    We ride on, now, relieved and moving forward
    Each our own lives roll forth, for now
    But now is gone, for one among us
    Who reached for life's third rail
    
    We rock, to-fro, and reach each station
    Weight shifting onto forward foot
    Flesh, bone ground up in violent elation
    And bloody rags, hours ago a well worn suit
    
    I ride the escalator up and pensive
    About what did and not occur today
    Commuter glut, flow restricted
    A crooked kink in public transport hose resolved.
    
    permalink
  7. My first 200 K

    SFR logo

    Yesterday, I rode my longest bike ride to date - the El Cerrito-Davis 200K - with the San Francisco Randonneurs. A big thank you to all the volunteers and randos who made my first 200k so much fun.

    First, for the uninitiated, an aside about randonneuring:

    I discovered the sport because I'm a cheapskate. I had gotten more and more into cycling over the past 2 years or so, and though I was riding through the East Bay hills mostly alone, I wanted to do a "Century" - a 100 mile ride. Looking up local rides I found out that, while most centuries cost a nontrivial amount of money for the poor grad student I was back then ($60-$200), the San Francisco Randonneur rides were all $10-$20. As I dug deeper and learned about the sport, I found out that the reason for low cost, is that rando rides are unsupported - randonneuring is all about self sufficiency. You are expected to bring gear to fix your own flats, as well as carry or procure your own snacks and beverages.

    RUSA logo

    The Randonneurs USA (RUSA) website succinctly summarizes the sport.

    Randonneuring is long-distance unsupported endurance cycling. This style of riding is non-competitive in nature, and self-sufficiency is paramount. When riders participate in randonneuring events, they are part of a long tradition that goes back to the beginning of the sport of cycling in France and Italy. Friendly camaraderie, not competition, is the hallmark of randonneuring.

    This description is strikingly similar to my beliefs both about cycling and computing, so I knew I found a new activity I would greatly enjoy. This has been borne out on three previous occasions when I have participated in the ~100 km Populaire rides, which are intended as a way to introduce riders to the sport, yet still be within reach of wide variety of cycling abilities.

    We moved in late December, and between unpacking, rainy weekends, and being sick - I haven't been able to get much riding in. However, I've been wanting to do a 200K for a long time - my century, coveted for years, seemed within reach more than ever. To seal my commitment to the ride, I went ahead and ordered a spiffy looking SFR cycling jersey:

    SFR Jersey

    Here's the 213km (132 miles) ride map and elevation profile, what follows is my ride report.

    Start Control

    The ride started at 8am at a Starbucks by El Cerrito BART station, so I just rode there from my house as I frequently do on my morning commute. I prepared my bike, packed my gear and food the night before, and the only thing I needed to do was to fill up my water bottle before the ride started. I showed up a dozen minutes before the start, with most riders already assembled, got my short drip and a heated up croissant, and totally failed to get any water. It's not a super terrible thing, I frequently don't end up drinking much at the beginning of my rides, but I had now set myself up to ride to the second control (44 km / 27 miles) without any water.

    Randonneuring isn't about racing - as you traverse from control to control, there's just a window of time that you have for each control, and so long as you make it through each control withing that time window, you complete the event! There is no ordinal placement, the first rider to finish has just as much bragging rights as the last. The only time people talk about time is when they're trying to make a new personal best. The second control was open roughly between 9 and 11am, so I could have stopped off somewhere to pickup water, but that didn't fit into my ride plan.

    You see, the cue sheet is two pages - with the first page dedicated to getting you to the second control, as there are a lot of turns to make in the East bay until you get to Benicia. Accordingly, my plan was to stick with the "fast" group who know the route well, so that I wouldn't have to look at the cue sheet at all. This was a success - and I got to chat with Jesse, whom I rode a fair chunk of the 111 km Lucas Valley Populaire back in October (here's a good video of the first chunk of that ride).

    Control #2

    When 7 of us got to the Benicia control at 9:45, I volunteered to guard the bikes as folks filed into the gas station mart to buy something (getting a timestamped receipt is how you prove that you did the ride from one control to the next within the allotted time). Lesson learned: I should have used that time to shed my warm second jersey and long pants, as it had warmed up by then. It just so happens that by the time I went inside, there was a line for the bathroom, and by the time I got out, the fast group was just heading out, yet I still needed to change.

    Because keeping up with the "fast" group wasn't that big of a deal and actually rather fun, I really wanted to try to catch up to them, so I stepped it up, and told a couple of other riders that I'd do my best to pull us to them (in case you didn't know - the aerodynamics of cycling make it much easier for those behind the leader to keep up the pace, even if that pace isn't something they could comfortably do on their own). We didn't succeed in catching them during the first 10 mile stretch of road, but I kept pushing with a high cadence in my highest gear, and about 5 miles later, we caught up with them! The only problem was, by this point, I had wasted so much energy, that I couldn't make the last 20 feet to them, though I was happy to see the two guys who'd been letting my push the whole time, use their fresher legs and join the group. So there I was, a few dozen feet from my intended riding partners, but as more and more pavement went past our wheels, the distance between us slowly widened.

    Somewhat disheartened by this (though, again, happy that I all of my pulling wasn't all for naught, since I bridged two others to the group), and now overheating, I decide to stop by the side of the road, removed my long sleeved shirt, put on sunscreen (Lesson learned: don't forget your ears, too - they're the only part of me that burned). A fellow rando rider Eric went past, to my smiling cheer of "Go get 'em!". Then when pair of riders asked if I'm alright, I nodded, and decided to hop back on the bike and ride with them for a bit. It was nice to let someone else pull for a bit, but shortly thereafter, we started the first serious ascent, and my heart was pounding too hard from exhaustion and the heat - and I had to stop to again to catch my breath and get some more food in me.

    Luckily, when I resumed riding up that hill, I had a mental shift, gave myself a break, and given how tired my legs were already, even though I wasn't even half-way through the ride, I reminded myself that I'll just spin in a low gear if I have to, there's no rush, I'm not racing anyone, and though I know this won't end up being as good of a 200k as it could have been had I trained more in recent months, it was still up to me to enjoy the ride. One of the highlights of the ride were all of the different butterflies I got to see along the way that I started noticing after this change in mental attitude.

    After the long climb, followed by a very nice descent, I got onto the Silverado Trail for 14 miles of a straight road with minimal elevation changes. Though my legs were again cooperating more, it was starting to get kind of old, and then out of nowhere, one of the riders I had pulled earlier rides past me, but then proceeds to slow down and ride along side me for a chat. He hadn't been able to keep up with the fast group for very long, and ended up stopping somewhere along the way to eat, which is why I didn't notice that I had passed him. We took turns pulling for each other, which took away from the monotony of Silverado, but he had a lot more in the tank, and I again wasn't able to keep up, losing him with 4 miles to go to St Helena.

    Needing another break, with 4 miles to the next control, I decided I would need to spend a while there, recuperating, if I am to make it through the rest of the ride.

    Control #3

    I got to Model Bakery at 1:10pm, with many familiar faces from earlier in the day already enjoying their food, but ended up staying there until 2:30 - eating my food, drinking water, just letting my legs rest.

    I ended up riding out solo, and really enjoyed the early parts of 128 (after missing the turnoff by a hundred feet) - luckily this was just the spot I had my last stop at, so I quickly turned around and got back on the road.

    The problem was it kept getting hotter and hotter - it seemed that I couldn't go a mile without taking a good gulp of water. I still stuck to my strategy of just spinning fast without really pushing hard, since recovering from being out of breath is way faster than waiting for exhausted legs to obey your commands. I made it a good chunk of the way to Winters, but still ended up having to stop half way up the climb near Lake Berryessa. Another SFR rider, Julie, climbed past me, checking if I was OK as she went by. It's great to have that kind of camaraderie along the ride, a couple of people even gently expressed their concern that my rear wheel was out of true - which I knew but kept putting off getting it fixed. These nudges gave me more resolve to get that taken care of.

    TRUCKS USE LOWER GEAR

    Finishing off the last of the Haribo Gummi Candy Gold-Bears that I brought with me (and you know you're tired and dehydrated when it takes effort to just chew), I got back on the bike and headed further up the hill. Then, finally, I didn't think I could ever be so cheered up by road sign (hint: they only put "TRUCKS USE LOWER GEAR" signs at the top of big hills).

    Control #4

    I finally got to Winters at 5:37pm, got myself a Chai Smoothie, and Julie, who unfortunately was going to miss her train home, proposed that we ride together the rest of the way to Davis. Again - though I really enjoy my alone time while cycling, it's also quite fun to have strong riders to ride with, so as the sun started descending behind us, and no longer scorchingly hot, we set out for the final 17 miles to Davis at a good clip, given how much riding we had already done.

    Finish Control

    Dodging drunk college kids (it was Picnic Day at UC Davis) was the last challenge of the ride. As a UCD alum, this was a homecoming of sorts, so I lead the way through town as we made our way to the Amtrak station. We finished just before 7, and I caught the 7:25pm train back to the Bay Area - enjoying the company of a handful of other randonneurs.

    Thanks for reading my ride report!

                       _
                      / \
                    A*   \^   -
                 ,./   _.`\\ / \
                / ,--.S    \/   \
               /  `"~,_     \    \
         __o           ?
       _ \<,_         /:\
    --(_)/-(_)----.../ | \
    --------------.......J
    
    permalink
  8. pedestrian musings

    I walk in monologue 
        through Berkeley's Hills
    Feet pressing into sidewalk firmly
    I eat the pensive mood 
        solitude brings
    And bite into the juiciness of
        self-reflection
    I write, first time in years,
        free verse impromptu
    Taking few dozen steps
        between each pair of lines
    I yearn, on tip-toes
        stretching high, to be expressive
    A mode of being longtime
        self-denied
    I'm walking home - from job
        I'll soon be leaving
    To find myself believing once 
        again
    That which I do defines 
        me not and feeling
    That which I am is
        good. enough. a lot.
    
    permalink
  9. starting my job search

    I am starting to look for a job in the San Francisco Bay Area.

    Since many recruiters ask for and presumably look at GitHub profiles, I decided to give mine a little facelift:

    Smart and Gets Things Done Github Contribution
Graph:

    In case you aren't familiar, that banner was motivated by Joel Spolsky's Smart and Gets Things Done, which is a book about hiring good developers . So I decided to tweet it out, mentioning @spolsky and he favorited it!

    @ivanov/status/476932602587123712

    Yesterday, I decided to tweet out an image that's at the top of my resume as a standalone tweet- mentioning Joel Spolsky again, and he liked it well enough to retweet it to his 90 thousand followers, so it's been getting plenty of love.

    Paul Ivanov's Visual Resume

    @ivanov/status/477477547957944321

    @ivanov/status/477520571907842048

    Perhaps unsurprisingly, the only person to contact me as a result of this so far is a reporter from Business Insider :

    My editor would like to post it on our site as an example of a creative way to format a resume... I'm wondering if we can get your permission to do this?

    So that's what prompted this post: I simply added my name and a Creative Commons Attribution Licence (CC-BY) to the two images, and then sent my permission along.

    Outside of that, no prospective employers have gotten in touch. But like I always say: you can't win the lottery if you don't buy a ticket. And since I also enjoy mixing metaphors, I'll just keep on fishing!

    permalink
  10. indenting with tabs

    2014 04 03 technology

    python

    ** This post was written as an IPython Notebook. You can view it on nbviewer, or download it. **

    Greg Wilson asked on the IPython mailing list:

    Subject: easiest way to insert a literal tab character in a code
    cell? 
    Greg Wilson, on 2014-04-03 18:37,  wrote:
    > Hi,
    > I'd like to put literal tab characters in cells, but of course tab means 
    > "indent" to the editor.  What's the easiest way to do this?
    > Thanks,
    > Greg
    > p.s. because I'm going to write Makefiles in the notebook...
    

    The easiest way to do this is to just get a tab character somewhere that you can copy, and then paste it in.

    In [1]:
    print("\t")
    
    
    
    
    In [2]:
        # I copy pasted the output of the cell above here
    

    An alternative solution is to make a string with tabs and insert it into another cell, using IPython machinery.

    In [3]:
    ip = get_ipython()
    
    In [4]:
    ip.set_next_input("\tMakefiles are awesome")
    
    In []:
        Makefiles are awesome
    

    If you have a file on disk or on the web, you can also just use the %load magic to do this.

    In [5]:
    %load /home/pi/file_with_tabs
    
    In []:
    default:
        cat /etc/issue
        whoami
    

    Such files can be written with the %%writefile cell magic... but of course you need to have inserted tabs there in some manner.

    In [6]:
    %%writefile ~/file_with_tabs
    default:
        cat /etc/issue
        whoami
    
    Overwriting /home/pi/file_with_tabs
    
    
    In [7]:
    !make -f /home/pi/file_with_tabs
    
    cat /etc/issue
    Debian GNU/Linux jessie/sid \n \l
    
    whoami
    pi
    
    

    The more involved, but more usable way

    We can set up CodeMirror to insert tabs instead of spaces.

    In [8]:
    %%javascript
    
    IPython.tab_as_tab_everywhere = function(use_tabs) {
        if (use_tabs === undefined) {
            use_tabs = true; 
        }
    
        // apply setting to all current CodeMirror instances
        IPython.notebook.get_cells().map(
            function(c) {  return c.code_mirror.options.indentWithTabs=use_tabs;  }
        );
        // make sure new CodeMirror instances created in the future also use this setting
        CodeMirror.defaults.indentWithTabs=use_tabs;
    
        };
    

    The reason we attach tab_as_tab_everywhere to IPython is because when we use the %%javascript magic, any variables we define there must be called in the same cell that defined it - they get their own closure. The reason we do this is to allow the notebook javascript to not get screwed up when there are javascript errors. We could have attached it to window or CodeMirror or anything else that's already in javascript-land.

    I covered how to add functions like this to the custom.js file in your profile in my post about disabling blinking in the notebook. That way these little functions are available in every notebook, without you having to insert a cell defining them.

    Now we've got code that allows us to apply the change to all current and future cells. We leave it as an exercise for the interested reader to modify that code and make a little button in the toolbar, to toggle it on a per-cell basis.

    Hints:

    You can get to the code mirror instance via IPython.notebook.get_selected_cell().code_mirror

    ** This post was written as an IPython Notebook. You can view it on nbviewer, or download it. **

    permalink

« Page 2 / 6 »