So I wrote this really simple script at work to generate ideas for writing stories, which could be used for writing exercises. It’s really basic, but I was kind of proud of how it turned out, and then I started messing around with web stuff and ended up making a website. You can go here to try it out.
i wrote this python script at work a while ago (basically out of boredom, as you might see by my code, i’m not a programmer). and then i changed it around a bunch as i learned more python. basically, i catalog things and sometimes have to find out the length of them. before this, i would have to do it in my head, going from the start time within a bigger file (that would generally be somewhere between half-an-hour and an hour long). and sometimes it’s easy enough to do that in my head, and sometimes i feel a little fried, so this makes the job easier.
import datetime, re def main(): start() end() calculate() # the start function gets the end time, uses a regular expression to check if the input has been done as instructed, and then slices out the numbers from XX:XX def start(): global StartMin, StartSec Start = raw_input("start time ('MM:SS'): ") match = re.match('(^\d\d:\d\d$)', Start) if match is not None: StartMin = int(Start[0:2]) StartSec = int(Start[3:5]) end() else: print "enter in format 'MM:SS'" start() # the end function gets the end time, uses a regular expression to check if the input has been done as instructed, and then slices out the numbers from XX:XX def end(): global EndMin, EndSec End = raw_input("end time ('MM:SS'): ") match = re.match('(^\d\d:\d\d$)', End) if match is not None: EndMin = int(End[0:2]) EndSec = int(End[3:5]) calculate() else: print "enter in format 'MM:SS'" end() # the calculate function calculates the length by converting both the start and end times into seconds, subtracting the total of seconds from the beginning, and then converting the remaining seconds, which is the actual length, into a time value using the timedelta function from the datetime module def calculate(): global StartMin, EndMin, StartSec, EndSec secstar = (StartMin*60) + StartSec secend = (EndMin*60) + EndSec sectot = secend - secstar print datetime.timedelta(seconds=sectot) start() while True: main()
The mayor of Toronto is such an asshole. Frankly, I don’t care that much about bike lanes, because I’m going to ride my bike where I want to ride it (on the street). What pisses me off about city council’s decision is that they clearly view it as a big fuck you to cyclists, and I’m sick of feeling under attack from entitled drivers who think that they should have sole use of the roads that everybody’s (property) tax dollars pay for. Also, I don’t want to be put in a segregated bike lane. That scares me far more than having to share a road with cars.
For like the fifth year I went to Chaos in Tejas. This year I was mostly excited about seeing FYP, but also Youth of Today and some other bands. I didn’t really take photos of my trip because, let’s face it, Austin isn’t really that exciting anymore. Austin tries too hard to be kind of trashy. It’s like the opposite of pretentious, but in a bad way.
I suck at drawing, but I’m messing around with Inkscape, and this is what I drew.
It’s been a while.
Yesterday I installed Ubuntu 11.04. So far, so good I guess. I’m not totally hating Unity yet, as I hated Gnome3 when I tried it ages ago. But I’m totally open to not hating Gnome3. Philosophically, I’m more into Debian than Ubuntu.
…he would realize that the vehicle registration tax is a user fee that people who cause damage to roads by driving over them in heavy vehicles should have to pay in order for them to be maintained. By getting rid of it, my tax dollars are now subsidizing car owners. A vehicle registration tax is totally compatible with “conservative” or “right wing” values, but this guy is too full of shit to get it.
I listened to a debate on the radio between a celebrity chef who loves meat, and a novelist who recently wrote a book arguing against the eating of meat. This is Canada, so it didn’t matter to the host of the show that the same debate between the same two people has happened before on American airwaves over a year ago; he acted like this was going to be a “classic debate.”
I have been a vegan for nearly 10 years. I used to love meat, but the ethical arguments against it finally convinced me to give it up, and shortly after, eliminate eggs and dairy from my diet (as well as other animal products). This is something that I care about, but is also something I don’t really like talking about. I have never made a judgemental comment to anybody about their eating in my life. However, that doesn’t stop some self-righteous omnivores from being assholes from time to time.
Anyway, this debate about the ethics of eating meat was a total bust. The pro-meat argument boiled down to how it was a connection to our past, and that the guy didn’t want to offend any of the people he visited so he will eat whatever he is offered, because ethics apparently aren’t as important as not offending people. When the anti-meat guy pointed out that lots of cultures treat women like shit and we don’t have to respect that, pro-meat guy was all “well, eating meat is the thing we can bond over.” So, great argument, guy. Those are two of the worst possible justifications for anything.