Skip to content

Moviesneak — Stretch your movie ticket dollar

07-Jul-08

Ever sneak from one movie to another at the movie theatre, after only paying for one ticket? Well, I have. And I like it.

This can often be done by looking at the showtimes ahead of time and finding movies that are times relatively near each other. Although this is sometimes thwarted by placing the temporally adjacent movies in different sections of the theatre, there are often opportunities for this type of sneaking.

But instead of bothering to study movie showtime tables and such, I’ve written a little python script to do it for me. It’s rather rudimentary. Here’s how to use it:

  1. Get moviesneak.py
  2. Get showtimes for a theatre in your area.
    1. The format moviesneak accepts is Google Showtimes, which can be accessed by googling showtimes <zipcode>, or using this url: http://www.google.com/movies?near=<zipcode>.
    2. Then select all the showtimes in a particular movie theatre, starting from the review stars, not including the theatre’s address.
    3. Copy these into a file somewhere.
  3. Run moviesneak: moviesneak.py showtimes-file [optional time threshold in seconds].
    • By default, the threshold is 15 minutes (900 seconds). The threshold is how long before or after the end of one movie the following one should be. So a 15 minutes threshold means the following movie can start 15 mins before the current one ends, or 15 after (remember that even though it starts 15 mins before the current ends, you won’t have to leave early, you’ll only miss the previews)

The code is under a BSD license, so just about anything can be done with it. If you have time to muck with BeautifulSoup or just plain regex, it would be nice if moviesneak could query google showtimes (or any other source) directly. The algorithm is very simple, and pretty ugly, but it can be plugged into pretty surroundings easily (such as a web interface).

Edit: I haven’t bothered writing a chaining algorithm (i.e. find the longest sequence of contiguous movies) mostly because I really can’t watch more than 2 movies in a row at a movie theatre. However, one shouldn’t be hard to write, since the corpus size is small enough even horrible algorithms will chug through quickly. Maybe when I’m bored enough/free enough I’ll write one to extend moviesneak.

Popularity: 100% [?]

Teaching

23-Jun-08

The primary task of a useful teacher is to teach his students to recognize ‘inconvenient’ facts - I mean facts that are inconvenient for their party opinions. And for every party opinion there are facts that are extremely inconvenient, for my own opinion no less than for others. I believe the teacher accomplishes more than a mere intellectual task if he compels his audience to accustom itself to the existence of such facts. I would be so immodest as even to apply the expression ‘moral achievement’, though perhaps that may sound too grandiose for something that should go without saying.

Popularity: 69% [?]

An svnwiki in Python

20-Jun-08

On a whim, I wrote a little wiki type thing in Python that sits on top of an SVN repo. It’s incredibly basic, and basically lets you browse a repo and edit files. Natively, it supports markdown as its default display mechanism, but it would be trivial to teach it the meaning of file extensions and have other view templates.

The intended use was for a personal notebook type thing, which I decided to abandon. Basically, it’s a lot like Jottit, except you actually have all your data, and can replicate it between locations. Yes, it also sounds like git-wiki,but I only found out about that after I’ve finished coding this version.

Although I decided not to use it, someone else my find it useful, at least the codebase. I am offering it here with absolutely no warranty, and you can use it however you like, you can attribute or not, whatever. Since this was built for private use, i.e. no public access, I was going to integrate grep into it, and other such utils, leveraging unix text processing for search, mass editing, etc. So one may be interested in continuing that. I did not implement a facility for adding pages easily, though that’s a trivial piece of coding.

Code: svnwiki.tar.gz Change the base variable to reflect the location of your repo.
Requirements:

  • web.py
  • pysvn (on debian this is the python-svn package rather than python-subversion)
  • markdown

Popularity: 78% [?]

DIYBio

13-Jun-08

Yesterday I partook in the 2nd ever meeting of the diybio group in Cambridge, MA.

Me with some DNA The meeting was hosted at BetaHouse this time rather than the less experiment friendly Asgard “irish” pub. I got there early, but soon enough other diybionauts — there is no consensus yet around nomenclature, though biohacker seems to hold most sway — began to filter in. We started by chatting and discussing the proposed activity: the good old party trick of extracting DNA from various things (I posted a very similar protocol in this blog before).

The demographics seems skewed pretty much exclusively towards tech professionals and young academics in their 20’s. The majority don’t have degrees in biology, but obviously, everyone is very much interested in the subject or they wouldn’t be involved. A small transhumanist contingent was also to be found.

When everyone had arrived, we proceeded with the experiment. We used oatmeal, apples, and humans as sources for DNA samples. I was one of the brave few who volunteered their precious genetic data, and I daresay our DNA ended up vastly superior. Either way, it was lots of fun, and in mere minutes we had actually done some biology in a kitchen. Modest beginning foretelling future greatness, perhaps? After we were finished we quickly covered the biological processes involved in our experiment, and sat down to considering the future of the organization.

DIYBio aims to be a beacon of responsible and safe amateur involvement in biotech. A major part of its mission is to provide education and guidance on techniques and procedures. But while pursuing these lofty, and slightly nebulous goals, we will do lots of fun biological stuff, too!

When a $100 Transformation was suggested (i.e. modifying an organism for $100) I replied that it may come closer to $200 in the end, One Transformation Per Child someone quipped in response. A lofty goal, but a worthy one! Another idea floated was to field an iGEM team not backed by an academic institution.

A sort of “minutes” of the meeting can be found on this thread of the diybio google group.

The picture on the left? That’s me with the test tube of human DNA. The DNA is the milky white substance visible between the two layers of liquid in the tube. There is also some DNA attached to the toothpick I am intently examining :)

Don’t phage me, bro!

Popularity: 70% [?]

Political Spectrum Through Fiscal Preference

29-May-08

I was thinking today that most political affiliation to parties and left/right wing, can be concisely encapsulated by looking at the top Fiscal Priority of an individual. This seems to be able to identify parties and lables that otherwise elude simple description, since they contain a variety of various other views.

For example, the US Democratic Party favors government spending maximized towards social programs. The US Republican Party favors–at least since Reagan–government spending maximized towards defense. The US Libertarian Party favors decreased fiscal spending in all categories, and the US Green Party of course favors maximal environmental spending. I’m not quite up to date on the Israeli party zeitgeist, but this same methodology can be applied to them as they were when I left in 2000.

People often complain of the blurring of distinction between parties and labels, as do I. Usually such an affiliation tells you little about the person identifying as something or other except who they will likely vote for. Now, however, you will be able to understand their fiscal priorities. Anecdotally (that is, as far as I can stretch this thought exercise without actual data and polls), this is the only policy preference that is tightly-coupled to labels.

Bypass the screen of parties and cumbursome ideology: just ask people for what the top spending priority should be for the gov’t, realistically*.

* This means that although a Republican may want to spend the most on, say, Education, their prefered foreign policy would require heavy military spending, thus in reality, they would maximize defense spending. People are not always honest with themselves about these things, so you have to present this caveat explicitely to attempt to ellicit accurate replies.

Popularity: 71% [?]

Grahpically Representing a Programming Language

15-May-08

I have been thinking about taking some programming language and making some sort graphical interface akin to StarLogo TNG but I may be approaching it too a posteriori. That is, I’m assuming a graphigal, i.e. spatial, representation of it would be necessarily good. But I think that follows from the principles of UI design: user interfaces are all about metaphors and similes, and the closer they are to experiences humans have evolved to handle well (like manipulating physical objects) the easier it is for humans to grok.

I thought long and hard about using Python but its syntax and semantics just don’t respond to spatialization very well. That’s when I thought of using Haskell and it might be just perfect for it.

When I was trying to model Python spatially I ended up with perverting it into some sort of data structure oriented language. That is, the graphical objects combine into bigger objects which represented data structures.

Haskell on the other hand would let me turn just about every user defined function into a physical object, and most built-in functions into a physical idiom. Rather than mere construction of playing blocks, I will translate operators (such as cons) into actions the user performs in the design environment.

More on this soon.

Popularity: 72% [?]

The Shahadah (Islamic Declaration of Faith) in Python

14-May-08

A moment of fancy on IRC led me to concoct the following:

((len([i for i in __globals__ if i is not god and type(i) is type(god)]) == 0) and (god.prophet == muhammad))) == True

This is the Shahadah represented in Python.

Programming Language Wars are frequently religious, I thought why not take it a step further.

Popularity: 89% [?]

Checking in to Brightkite

13-May-08

I’ve been using Brightkite for several weeks now, and I rather enjoy it. What is it? Well, it’s a GPS-less location tracking service, of sorts.
In its actual usage it is much like Twitter. You register your cellphone , and whenever you arrive at a new location  you can ”check in”. You just SMS your current address to the service, and it registers that. You can also search for businesses and pick the correct one. It levereges the Google Maps API for location degection based on the address you provide.
Once you’re checked in to a location, you can post notes, little messages in the same vein as twitter, which will be listed both globally, and within the location’s stream. You can also send in pictures to a location.

Of course, you can keep track of where your friends are and their various posts. There is some rudimentary permissions control. There are three groups: Public, Friends, Trusted Friends; and you can decide which can see your exact location, or only the city you checked in, and which can see the notes you post.

The system notifies you of people checked in nearby, if you so wish, within a radius you specify.

My favourite feature of the whole thing is its replication to Twitter. That is, any post you make to Brightkite also appear in twitter, with a little http://bkite.com/xxxx URL appended, which when clicked shows your location on a map.

As I was checking in at my work place I had an idea. So I took a screenshot of their check-in button (I hope they will forgive me that transgression). Now I can display it on some site, and garnish it with a check-in link to whatever location is related to that site. For example, on a conference page, you can just click that button to indicate you have arrived, and everyone at the conference on Brightkite will be notified. Here’s an example of it checking you in at MIT (requires Brightkite account):

Check In Button

Cool, eh?

Brightkite brings location-aware augmented reality one step closer for those without convenient GPS.

Want an invite? I’ve got some left. Leave a comment somehow containing your email (if I don’t know it), and if I like you enough, I’ll send you one!

Popularity: 71% [?]

A Thought on Taxation

03-May-08

Taxes levied always lead to a deadweight loss. That is, unless you are taxing an inelastic good or activity. Otherwise, there can be no revenue.

So far so good. However, one should consider why some goods and activities are inelastic. This category tends to includes necessities; things that are relatively important to your survival and quality of life.

So, disregarding other arguments on taxes, the more effective a tax is the more coercive action is applied against an individual’s survival needs. This doesn’t strike me as an ethically justifiable action. Of course, one might take the position that the revenue gained will be redistributed in such a way as to maximize good. Nevertheless, there remains the ethical issue of providing services funded by revenue derived from attacking an individual’s unrelated survival needs—a government can’t tax healthcare if it provides it.

Services provided by governments are unarguably needed. But there must be more morally defensible ways of funding them.

Popularity: 74% [?]

Twitterchive - Post the day’s twits to Livejournal or elsewhere

23-Apr-08

There are services such as LoudTwitter that will submit digests of your twitters to LiveJournal, TypePad, or other blogging service/software. Wordpress has plugins that will do that.

However, my experience with LoudTwitter has been that it is fairly unreliable. Thus, I coded up a fairly rudimentary python script that will grab that day’s twitters and post them to LiveJournal, or elsewhere.

You can find it here: Twitterchive v1.0. Edit the twitterchive.py file to include your Twitter username and password.

Requirements:

  • Python
  • A POSIX-compliant system (such as Linux or Cygwin)
  • python-twitter
  • Charm, a LJ client in Python.
  • Copy the charm and ljcharm.py files to the same dir as Twitterchive. Copy the sample.charmrc file to ~/.charmrc.

    Alternatively, just run python setup.py install, and edit twitterchive.py to change the call to ./charm in main() into just charm.

    Edit ~/.charmrc to include your livejournal username and password. I recommend you follow the procedures described therein and only use the md5 digest of your password in this file.

Popularity: 74% [?]

Close
E-mail It