I only recently stumbled upon the Pickle methods in Python, and now that I’ve used it, I can only say, “Why did nobody tell me about this earlier?”
But before I go on, what the heck is pickling?
From the Python docs:
The pickle module implements a fundamental, but powerful algorithm for serializing and de-serializing a Python object structure. “Pickling” is the process whereby a Python object hierarchy is converted into a byte stream, and “unpickling” is the inverse operation, whereby a byte stream is converted back into an object hierarchy. Pickling (and unpickling) is alternatively known as “serialization”, “marshalling,”  or “flattening”, however, to avoid confusion, the terms used here are “pickling” and “unpickling”.
In true Pythonic style, the docs are well-written and easy to understand… if you understand what an object is, and what serialization is. I won’t even try to define them here. However, I will describe what I think about Pickling.
After a hectic semester, I’ve been in the thick of writing the thesis proposal and finding committee members.
As I was writing the thesis proposal, I noticed two very interesting facts about the act of writing.
Writing for a purpose serves to highlight where the gaps are present in communicating for that purpose. Writing, thinking and doing follow a cycle that reinforce one another.
I’ve come to realize that this is really important, and knowing this fact impacts the way I approach writing. As opposed to merely writing because I have to do so in order to communicate an idea, I now do so with a view of trying to produce a polished piece of work. Here, I’d like to write out 6 observations from experiencing this writing cycle.
As a graduate student doing biological sequence analysis in Python, I spend quite a bit of time in my IPython HTML notebooks. (My preference – because it’s easier on the eyes than the Terminal is.) However, getting setup wasn’t easy, not when there’s so many ways just to get started with scientific computing.
If you’re a typical scientist, you’d want to get up and running as fast as possible with few obstruction. If you’re a scientist who’s takes the long-view of things, you’d also want your stuff to be setup to be “vendor-independent”. With Python, there’s a variety of ways to get things up-and-running: manual installation, Anaconda, Canopy… there’s a variety of ways to get the scientific computing packages for Python. Also, there’s different ways of installing Python packages, such as homebrew, pip, conda, easy_install… gosh, it’s a nightmare for the newcomer to Python. This clearly violates a Pythonic principle:
There should be one– and preferably only one –obvious way to do it.
I’ve gone through the nightmares of managing packages that were installed in disparate directories due to Anaconda, homebrew, pip and easy_install using separate directories, to the point that I wiped out all but the Apple-provided installation of Python, and started from scratch with my packages. I have also seen a fellow scientist struggle with packages breaking due to package updates happening in different directories…
Therefore, in this post, I’d like to provide a guide on how to get up and running using Python in a way that is simple but keeps your installations clear-cut and vendor-independent. Continue reading
I’m reading a book called “Getting Results the Agile Way” by J. D. Meier.
Meier worked at Microsoft, where he developed and refined this system. I’m studying it for ways to be more effective in my work as a graduate student, and hopefully to develop a personalized and refined system beyond graduate school into my work life.
The heart of the “Agile” system that Meier proposes is to do a “Monday Vision”, to plan for “Daily Outcomes”, and to do a “Friday Reflection”. Here’s some of my reflections on the system.
If you were to ask me, I’d say that Evernote’s more than “just a pretty cool piece of software”. It’s quite literally become the centre of most of my workflows.
In particular, I use Evernote extensively as a documentation system for my research work, effectively using it as a laboratory notebook. I’ve found Evernote to be a good replacement for a traditional pen-and-paper notebook, and it fulfills the ultimate goal that I have for making myself more efficient and effective in what I do. Here’s how I’ve used Evernote to get that done. Continue reading
Evernote has been lauded in many corners as a must-have in a scientist’s toolkit. But I’m sure that like me, there are people out there who don’t know where to start in using Evernote as a scientist-in-training. I’ve decided to share a bit of my thoughts on how one can use Evernote as a scientist, but rather than provide a simple listaragraph (list + paragraph) on how Evernote can be used, I will share more deeply on the workflows that I’ve designed using Evernote. In this post, I’ll share how I use Evernote to take reading notes on the papers I read.
I have a stack of papers I carry around with me all the time. It’s basically my “reading stack”. Right now, it’s 12 papers thick. In it, I have papers pertaining to all sorts of topics:
- 3 are on reassortment in influenza.
- 1 is on information theory to identify co-evolution in protein residues.
- 1 is a network analysis paper on global influenza spread.
- 3 are on influenza packaging and secondary structure.
- 4 are on wildlife epidemiology.
Upon seeing this list, two questions pop up to mind.
- Why is it that I haven’t processed these papers yet?
- Why don’t I have a better way of organizing them?
One might expect that yes, I should have read these papers. (The network analysis paper has been sitting in this stack for over 3 months now.) On the other hand, on second examination of my mental processes, I realized that I shouldn’t be organizing them.