Not your usual #science #blog
Excerpts from “the book” and Applications of TGIM #1, Time Management

The pdf file is here Applications of TGIM #1 : Time Management, pdf at Google Drive

For those who like watching videos or watching me talk Applications of TGIM : Time Management youtube video

From the pdf file:

What did I do exactly that semester?

This is a small example of my schedule, every Monday, Tuesday, Wednesday, every week for the 12 week semester:

On Monday, I get up at around 5:30 am, brush my teeth, shower, warm up some jambalaya, catch the train from Augsburg by 6:39 am, to arrive at 7:38 am in Munich, so to have enough time to walk to the Math Institute from the train station or Hauptbahnhof, to be seated in time for my String Theory class at 8 am.

String Theory class at 8 am to 10 am.

After String Theory class ends, I head straight to the computer room, saving me time from heading over to the library, and I study; it’s the most quiet place in the building for students without an office as students are using computers.

Algebraic Topology class from 12 pm to 2 pm. Then for 2 hours, I go straight to the computer room and study.

I have TA sessions or what they call Exercise sessions or Tutoring sessions over there at LMU for Differential Geometry from 4 to 6 pm with Dr. James Gray, my favorite instructor who had been at LMU.

6 pm, I walk across the intersection of Theresienstrasse and Barer Strasse to the local, smaller version of a supermarket chain Tengelmann, and I buy whatever salads, vegetables, fruits that were in season and on sale, some yogurt, some cheeses, because I didn’t have a lot or really any money, take them with me, and I’m back in the Math Institute a little before 7 pm; I’m watching everyone, students, instructors, professors, staff, leave the Math Institute and building like clockwork, clocking out for the day, while I find a vacated classroom and commandeer it.

I can snack on the vegetables, fruits, yogurts, cheeses I bought while I had an uninterrupted block of time to study and think, from 7 pm to 1:30 or 2 am. That’s 6 to 7 hours of uninterrupted study and quiet thought. It was the best time of the day for me, as I took in all that I learned that day and made it mine. And it was absolutely necessary for me.

By 1:30 am or 2 am, I am exhausted, tired, and crash out on wherever I can. If I’m lucky, and someone left the faculty lounge open, I’d sneak in and crash on a plush, leather couch. If not, I put together 3 wooden chairs and lay down on it. If it was too cold outside during the winter, I found a kitchen utility closet and slept against the wall.

That semester, I had set my alarm to 5:22 am everyday because that allowed me 8 minutes before the daily university maintenance crew came in punctually like clockwork at 5:30 am, and I vacated. I knew they clean the classrooms first, so I head straight to the bathroom and brush my teeth and wash up. By around 6:15 am, the janitor on the floor would have finished cleaning up the classrooms, normally, and so I’d move back over to an empty classroom to study.

Tengelmann is scheduled to open at 7:00 am, but the delivery trucks for fresh bread and produce are coming in by 6:30 am and the workers are already leaving the automated doors open to let deliveries come in and out of the front by 6:45 am. I sneak in and buy enough fruits and vegetables, especially carrots and tomatoes that I could eat out of my hand and I wouldn’t have to waste time to cut or peel. The young German man delivering fresh baguettes sees me and drops me 3 or 4 in my plastic bag. I buy whatever cheeses and sandwich meats that are on sale. I buy my food for the day, hoping this older, but very pretty, and tanned Croatian brunette is working that day. I try to say something in Croatian, even if it’s just Dobar den. Kako si? Hvala. She’s always smiling and always cheerful.

I’m out of there by 7 am and by 7 am, the computer rooms are open and so I would be in one of the quiet, tucked away computer rooms to study, reviewing the notes and problems I worked out the night before, preparing for the classes ahead, while stuffing my piping hot baguettes with cheeses and cold cuts and making mini sandwiches. There was no one, but the reassuring hum of computers.

It was Tuesday, so I would have Differential Geometry at 10 am to 12 pm. I was in the building and I was on time for class. 12 pm to 2 pm, I was in String Theory tutoring sessions. 2 pm to 4 pm, I had Quantum Electrodynamics.

From 4 pm, I go straight to the computer room to study until 6 pm, when I would head to Tengelmann again to buy enough food and snacks for the night’s uninterrupted study session.

7 pm to 1:30 or 2:00 am, I am inside a vacated classroom I had commandeered, studying.

Keep in mind that officially the Math Institute building closes at 10 pm and the doors are locked, and so I am locked in; that’s why I go to Tengelmann at 6 pm to stock up on everything that I need.

5:22 am, after having passed out, I am up again, washing up in the bathroom, darting back into an empty classroom, then heading to Tengelmann to buy food, hoping it’d be open earlier that normally they would and heading back into the computer room by 7 am.

By 8 am to 10 am, Wednesday, it was String Theory class. 10 am to 2 pm, I had time to study. I would treat myself to lunch at noon, if I had the money, at either the pizza shop or the “Asian” restaurant, Tokami, across the street. The Mensa, what they called the school cafeteria there, was 2 blocks away and I couldn’t afford the time to walk over there and walk back - those minutes could be spent studying, reviewing.

2 pm to 4 pm was Algebraic Topology. 4 pm to 5 pm was the very important Exercise class for Differential Geometry, led by Carlos Ramos-Cuevas. With my classes ending at 5 pm on Wednesday, I had some breathing room. I’d still go to Tengelmann to stock up on fruits, lots of bananas, oranges, apples, things I could eat, without peeling, on the fly, carrots and tomatoes that I could wash in the classroom sink and without peeling, yogurt, whatever was on sale, at 6 pm. I would return back to the Math Institute and study for the night.

So let’s do the math. I have 24 hours in a day. I prioritize my study time, especially that uninterrupted block of studying and quiet thought, because there’s where I made the ideas, concepts, and problems from the lecture and books mine. I get 5 hours of study time during the morning and daytime that is broken up, interrupted and about 6 hours of uninterrupted study time for 11 hours. That leaves me with 13 hours.

I was committed to going to every class, every TA or tutoring session, that semester. Class time was long at LMU. Each day, it takes about 7 hours. That leaves me with 6 hours.

I’ve already cut out lunch, and I save as much time (and money, as an unsponsored Masters student) by going to Tengelmann for food and eating it while studying. Of course I have to wash up and brush my teeth in the university restroom. That is going to leave me only with 4 hours.

And so you could see, I’m talking about giving up stuff. Time management. I knew that if I was to become a scholar, I had to start acting like a scholar. I prioritize, I put study first, my classes first, I was going to make it to every single class and TA session - that winter semester, I can tell myself that I took advantage of every opportunity I was given with the lectures and the tutoring sessions. But that meant that everything else became secondary; and I especially cut out commuting. And sleep. It was knowing what was important and what came first, and all my actions, and all the sacrifices I made, were all directly geared to the primary goal.

The pdf file is here Applications of TGIM #1 : Time Management, pdf at Google Drive

For those who like watching videos or watching me talk Applications of TGIM : Time Management youtube video


this is important to remember


this is important to remember

To the students going back to school this semester: This is the secret to academic success and this one change I made took me from almost giving up to passing Algebraic Topology, Differential Geometry, Quantum Electrodynamics, and String Theory in 1 semester:

Applications of TGIM! I wanted a way to give back, and I show how I went from the principles given in the Thank God It’s Monday videos from Eric Thomas and a number of other success stories I looked up to and went to application. I want to share them with you, with the world, so that someone in his or her life will know it’s possible, and what actions can be taken.

Time management - you can’t waste time, like David Shands, Founder of Sleepis4Suckers says. You can’t waste time! If you are someone who isn’t getting the results you want to get out of school or out of work, maybe you’re failing classes, maybe you’re not passing your classes, then I have to tell you, time management is the single thing that completely changed the results I was getting out of my school semester.

I write about Time Management in this .pdf file and the youtube video I made for it will be up on my youtube account.

Remember, like Eric Thomas says, “Go make the rest of your life, the best of your life!”

My notes while I was reading Morita’s Geometry of Differential Forms is up on my Google Drive. Use in the spirit of the Caltech Honor Code.

Morita’s book is in my opinion the best in the business, from being pedagogically friendly to being elegant in its presentation.

A month ago, I was panicking as I was forgetting a number of things from differential geometry, up to principal bundles, but Morita’s clarity helped alot.

In this update, in particular, the structure constants are calculated for Lie Algebra gl(N,R) explicitly.

latex file also up in my google drive: use in the spirit of the Caltech Honor Code and open-source CC. pdf tex

I wanted to post this message to @BerniseAng and Craig Montuori: I hear you about your last post which Craig had shared; I was curious if this could be extended to giving for basic science research because basic science research has no immediate ROI (return on investment), but we wouldn’t be here without electricity and quantum mechanics. Original link:

What course/book are you currently going through right now? Do you have any particular ongoing projects that you are working on? We seem to both be self-learning Python/Django so it'd be cool to see!


Well … I just got back from vacation yesterday ^-^ so i’ve been a bit lagged …

I’ve not yet dabbled in Django. Right now I am finishing up a Coursera class and going through the Python Codecademy project (about 60-70% complete). 

Where I’m at right now, I’m sort of debating learning Django or switching gears and looking at Ruby on Rails. For my purposes, using ruby on rails to build web apps would be more efficient. The more I learn about Python/Django, I hear it’s a lot easier to get up and going with ruby on rails. And that there’s more resources available - so I hear. 

For the next month my primary goal is finishing my site. I am rebuilding it from scratch, and it’s the second site I’ve ever done without using a WP theme. So it’s taking me some time :-/

After that’s checked off the list, I’m going to start looking at django or ruby on rails. 

Which coursera class you working on right now?

This is a clean and elegant python implementation of a Hidden Markov Model, the Bob and Alice example from wikipedia, thanks (and shout outs to!) to Sujit of the Salmon Run blog.

I’ve put it up on my github to make it convenient for everybody to download it and play with it.

from __future__ import division
import numpy as np
from sklearn import hmm

states = [“Rainy”, “Sunny”]
n_states = len(states)

observations = [“walk”, “shop”, “clean”]
n_observations = len(observations)

start_probability = np.array([0.6, 0.4])

transition_probability = np.array([
[ 0.7, 0.3],
[ 0.4, 0.6]

emission_probability = np.array([
[ 0.1, 0.4, 0.5],
[0.6 , 0.3, 0.1]

model = hmm.MultinomialHMM(n_components=n_states)

# predict a sequence of hidden states based on visible states
bob_says = [ 0, 2, 1, 1, 2, 0]
logprob, alice_hears = model.decode(bob_says, algorithm=”viterbi”)
print “Bob says:”, “, “.join(map(lambda x: observations[x], bob_says))
print “Alice hearts:”, “, “.join(map(lambda x: states[x], alice_hears))

PS: in the future, I’m not going to try to do a lot of HTML editing to make my posts “pretty” on tumblr. I’ll put up the links and the code will be there on my github, nicely formatted. Same with my math and physics stuff: I’ll put up both the pdf and latex on my google drive page.

The second answer was what I was looking for, big ups, shout outs to jmontross for his direct contribution, and MaxMackie for his question (because I was wondering the same too)

exporting path is a good way. Another way is to add a .pth to your site-packages location. On my mac my python keeps site-packages in /Library/Python shown below

/Library/Python/2.7/site-packages I created a file called awesome.pth at /Library/Python/2.7/site-packages/awesome.pth and in the file put the following path that references my awesome modules



I needed this because I was trying out this Hidden Markov Model code implemented in Python:

Very telling is this commentary on Python’s efficiency:

“As one may know, Python scripts aren’t the fastest programs on earth, therefore this toolkit will not be able to compete with the C/C++ implementations of HMM in the aspect of absolute speed. However, due to the self-contained nature (doesn’t depend on external packages), there are many use cases for this.”

Why I stick with Python so much is that it is fun to program in (this is first and foremost for me) and implementation is fast. It’s what people call “developer time.”

I’m continuing with my review of HMM Hidden Markov Model with Udacity’s Intro to Artificial Intelligence.
When making projects with Python, watch out for your file directory design!
web scraping websites with javascript - it gets complicated

Web scraping websites that uses javascript to create a html page gets complicated. A fellow alumni alluded to that in a recent Facebook conversation we had: “It gets more complicated if you have to deal with AJAX sites, but unfortunately I’ve dealt with all this nonsense before. “

Links that I found useful:
First I searched on google about things on webscraping javascript which led me to this stackexchange question:
which led me to this link: (shoutouts to bpgergo)

Stackexchange is great because I could even look up whether going with one package is better than the other:

I found that the documentation for Selenium on its own website isn’t straightforward for installation onto the Mac OS X, using the Terminal. This gentlemen, Damien, had a great explanation on his website:

Using requests python library to get a website, but you get a 403 Forbidden; throw in your browser header!

For this case, I’m just going to use the website as an example.

So I find myself trying to use requests to get a website but I get a
403 Forbidden

David Marcus, fellow alumni, told me:

"You may have to pass the same headers that your browser does in order to your query look more legitimate.
This is easy with the requests library.”

So I tried this as he told me:

import requests
headers = { ‘User-Agent’: ‘Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36’, }
r = requests.get(‘’, headers=headers)
print r.content


Algebraic Geometry - sheaves

I was reading about Fiber Bundles from Jeff Lee. Which led to sheaves from Algebraic Geometry. Which leads me back to rings and modules. So I’m working on rings and modules (understanding them) for the next few hours.



isometries said: wait what the fuck do they not use epsilon delta here???

heh, aren’t you at Pitt? ‘Cause remember, we’re talking about the department where some instructors don’t teach Mean Value Theorem because it’s “too hard” and “too theoretic” and the problems on it “are…

I see. Mostly this just made me sad, but wow did I learn a lot. I took all of calc in high school, so I never had to do any of that here, aside from helping the occasional friend-in-calculus (but now that I think of it, all those limit problems and not a greek letter to be seen…). I just find it so strange that epsilon-delta limits or even Mean Value Theorem aren’t taught in calc 1 here when I actually did learn them in high school, and I suppose I naively assumed that introductory calculus is the same everywhere. I didn’t go to any especially fancy high school (public school in suburbia), but we definitely tackled calculus with more rigor and depth than it seems like Pitt does. And I’ve only been here a year, but for all the courses I’ve taken, I feel the department’s been great. It’s like there’s an entirely different attitude taken by the department toward calculus than there is toward the rest of math. But I agree with you completely that these things need to be fixed at the high school level, and I take it that the department does what it sees as best to accommodate these students who really don’t have the proper algebra and theoretical reasoning backgrounds.

So much for having high standards for our US students for math skills.

1. The problem is NOT you guys, the instructors, because you guys, the instructors, know how to communicate and have mastered this stuff.
2. It’s already bad enough that standards have been lowered, but I can’t believe students can’t do fractions. What are they doing in college?
3. The problem is NOT lack of money nor education resources. There are (amazingly) plenty of lower level, basic, introductory math videos on the internet and YouTube. I am amazed at what I can learn on the internet. Yes, there are a lot of silly videos on Vine, but thank goodness the internet is “big” enough to also accommodate enough videos for a lifetime of learning.
4. The problem is the US students themselves. A lot of them don’t belong in a college classroom.