Some bits
and pieces of code

State code mappings for Python

Friday, December 29th, 2006

Sometimes you need a quick way to translate from state code abbreviations to the full state name and vice versa, and every time I’ve needed this I had to waste a good five minutes to create it from source. Hopefully this will help other people too.

(more…)


MyEarnCal

Sunday, October 15th, 2006

For a value investor’s stock the four most important days of the year are when the company quarterly results come out. This is the time of the year when public companies take a break from their secrecy and announce to their holders what they’ve achieved, through webcasts and conference calls, and often, what they expect to achieve in the future.

Having switched to using Google’s great calendaring service, I found that it is a little bit difficult to keep track of the quarterly meetings on any of the calendar apps, web or not, unless you add them one by one yourself. This should come as a surprise, as both Google Finance and Yahoo! Finance have your portfolio saved and should present you with the option of adding the information directly to your calendar.

Having not found anything that even remotely accomplishes this, I’ve written a public service that will do just this: configure once, and forget for all eternity.

myearncal.jpg

This is essentially an earnings announcement calendar aggregator. I’ve named it MyEarnCal for short for now. You don’t need to create a portfolio, account, pay me any money, or anything like that at all (it’s free.)

You can use it right away through any calendaring service that supports iCal, like Google Calendar. Subscribe to the following calendar:

http://cmichae.acm.jhu.edu/myearncal/MSFT+AMZN

Substituting MSFT+AMZN for any list of stock tickers you’d like. For example

http://cmichae.acm.jhu.edu/myearncal/GOOG+GE+JNJ

will show earnings announcements for Google, General Electric, and Johnson and Johnson. And you don’t have to do anything at all for the next batch, it will automatically show up.

This is still in beta; the only missing feature, is accurate reporting of the time of the press conference. Right now, all After Market conferences will show as 4:30 events, while Pre-Market events will show as 9:00 events. For now, it accomplishes the essential feature, allowing you to add your share’s earnings announcements and corporate actions to the plethora of calendars that take the iCalendar standard, such as Kontact/Korganizer, iCal, Google Calendar, Evolution, and Outlook 2007.

Here is the calendar for some favorites stocks to watch, as imported by Google Calendar:

Update: I’ve noticed that sometimes, it takes a while to load one of these calendars on Google Calendar. This happens because Google Calendar indexes the calendar at the address once, and will cache it for later. So one way to get around any error messages Google Calendar reports is to just wait a few hours and retry again with the exact same URI address.


New Jaminid version

Friday, April 21st, 2006
Download: [Jaminid] on SourceForge

Jaminid LogoJaminid (Java Mini Daemon) is a very small HTTP/1.1 server written entirely in Java, and meant to be embedded into java programs as a builtin server, usually to substitute a graphical GUI with a thin-client HTML interface.

Due to an increase in interest from people lately, I’ve released a new version containing the impovements I’ve made to it since it’s first public release. The improvements include several bug fixes, and even includes a nicer example.


Latex Resume Template and Tips

Wednesday, April 12th, 2006
Download: [resume.tex]

There’s probably no document more notoriously difficult to write than an entry-level resume. Hours of fudging about with the margins, text-seperation variables, let alone getting the wording exactly right for the specific job you’re applying for. If you are unix savvy, or you are slightly suspicious with all the WYSIWYG fanfare, you may have considered LaTeX as your resume typesetter of choice. A noble cause, so allow me to help you out.

This is a LaTeX2e document with special macros to typeset an Entry Level, one-page resume. The content on the page pertains to me; feel free to use this as a template for your resume. This format arose from a Technical Communications class I took as a freshman in college; it has since worked very well for me so I’ve kept it.

Using LaTeX for your resume has several advantages; it gives you complete control over the output, it is very stable, and it produces a PDF with no effort. My resume is a good example of a LaTeX resume.

The added advantage is, if you’re applying for a technical position in computer science, a LaTeX resume, although not often recognised as one, can give you a boost with your interviewers if they also happen to be LaTeX users. Therefore, make sure you add \LaTeX in your list of skills.

Furthermore, you generally should not submit resumes in wordprocessor formats for several reasons:

  1. Missing fonts tend to be substituted with other fonts that may or may not fit the original font size, distorting words, lines and paragraphs from computer to computer.
  2. Wordprocessor files contain a lot of information that you might want to be careful with - for example, different versions and anything you have copy-pasted in the file.

I can’t stress the importance of that last point. One of the less important duties in a job experience I’ve had involved being a proponent of a certain operating system which shall remain unamed; When the time came to apply to the competitor, I had to remove that particular line. Had I submitted the resume in, say, Microsoft Word format, a savvy recruiter could have easily undeleted the missing line.

If you are completely new to latex, I recommend reading the aptly named Not So Short Introduction to LaTeX2e

Remember to abide by all the good conventions of resume making:

  1. Use whitespace to establish sections.
  2. Use verbs when describing experiences and nouns in skills. Vary the wording from item to item.
  3. Don’t list everything you’re proud of, just the most important and relative stuff.

Johns Hopkins Standard Login Script

Sunday, March 12th, 2006
Download: [jhulogon.tar.gz]

The standard network on JHU wireless, available at least on the homewood campus, requires an authentication upon succesful connection to the wireless, even if you have the right WEP key.

If you are running linux or any other machine where you’d like an automated transition between networks, it is difficult to do this seemlessly.

This perl script will fill in that form and authenticate for you. Make sure it runs immediately after a connection to standard has been established.

Note: Depending on your distribution and level of expertise, there are different ways to establish a wireless connection on your typical linux. On Fedora for example, a typical way is to export the ESSID and KEY (as well as any other variables you might need) as environment variables and then call ifup. This could be done by another automated script that is configured to detect available wireless networks and roam among them. Many solutions like this one are available on the internet.

See Also:
Official information on JHU Wireless

Jean Tourrilhes guide to Wireless Linux


Linux Wireless Autoroam

Thursday, May 12th, 2005
Download: [autoroam.tgz]

Autoroam is a simple python script for the automatic roaming of preconfigured wireless networks, with a capability of defaulting to unencrypted networks. Requires iwtools. Start this during boot time and never manually switch between networks again.



Google
 
Web cmichae.acm.jhu.edu

RSS