February 11, 2013
750.pl is a simple Perl script which can be used as a helper to set crossposting to or from 750words.com. It either gets the current entry from your 750words.com account and saves it into a local file, or posts a local file as the current entry (overwriting its contents).
Usage for get: 750.pl get filename
Usage for post: 750.pl put filename
750_start.pl makes Firefox log in on your 750words account without typing username and password, as a workaround for its weird login form that doesn’t work with Chrome and Firefox autofill functionality. The script only works with Firefox because it requires Firefox MozRepl extension, and uses WWW::Mechanize::Firefox.
Click to download (750_v0.85.zip).
February 9, 2013
The idea of daily pages is borrowed from 750words.com, which, in turn, borrows it from “The Artist’s Way” by J. Cameron (“morning pages”). Basically, writing a certain amount of words every day is supposed to positively affect your mental state and creativity in the long run, even if your writings are merely incoherent ramblings. (It’s strongly advised to keep daily pages private.)
The Daily Pages plugin provides the motivation to write every day by keeping track of the word count and the writing streaks (consecutive days of meeting the goal). The stats are displayed on the blog together with the graphical badge that corresponds to the length of the streak. The approach is similar to 750words.com, but using your own blog allows full control over all the aspects of the process. The user can change the goal (number of words per day), the hour when the day starts (e.g. for the night owls, it’s not fair to consider the midnight to be the end of the day), the lengths of streak levels (i.e. how many days is required to get the next badge), as well as the badge images and titles. It’s also possible to configure email reminders to be sent at any convenient time and any number of times per day.
Download the code here (current version: 0.9) The configuration is rather DIY, so don’t even think of using it without reading the included readme.txt ;)
(click to see the bigger version)
February 7, 2013
Arachnoid is an Arkanoid/Breakout clone with a twist – instead of bricks, there are spiders crawling all over the place! There are several kinds of spiders with different abilities, as well as other obstacles and bonuses.
The game is written in Python/Pygame. Graphics are adopted from several sources (see this post with the links).
Click here to download the game (current version is 0.5)
Running the game: python main.py
Controls:
– Right & left arrows, or mouse movement to move the paddle (mouse is preferable because it supports acceleration)
– Space or left mouse button to release the ball
– Key ‘p’ to pause the game, and ‘o’ to continue after pause
– Del to go the next level (only in the cheat mode)
Command line options (only if argparse module is installed):
–cheat: turns on the cheat mode (Del allows to go to the next level, and the game doesn’t stop when the number of lives goes below 0)
–level N: starts on level N instead of 1
TODO:
– sound
– saving scores, high-score table
– info screen with the explanation of enemies and bonuses
– list of locked/unlocked levels & level codes instead of starting from any level (maybe)
– level editor
– installer
Tested with python 2.7.3 and (to some extent) 2.6.6, and Pygame 1.9.1.
January 1, 2013
Thirsty Nellan in Python is a Pygame adaptation of a public domain game Thirsty Nellan. I wrote it for the purpose of learning Python and Pygame. The original game by Geoffrey M. Draper can be found at https://geoffdraper.com/programming/nellan . All the graphics and audio were copied from the original game. The fonts are public domain Bitstream Vera fonts.
Many thanks to Geoff Draper for creating the original game and making it open source!
Also, many thanks to Coursera and profs Joe Warren, Scott Rixner, John Greiner and Stephen Wong of Rice University for their awesome online course “An Introduction to Interactive Programming in Python”! (https://class.coursera.org/interactivepython-2012-001)
Click here to download the game.
How to run the game: python main.py
Tested with Python 2.7.3 and Pygame 1.9.1.
November 10, 2012
This is a tribute to the first graphical interactive fiction game: Mystery House by Sierra-On-Line. It’s loosely based on the Inform code from http://turbulence.org/Works/mystery but all the logics is implemented from scratch. My version is a little more user-friendly than the original. (Actually, I had never played the original Mystery House apart from the Inform version, but I used to be a huge fan of Sierra quests :)
It works in a browser-based simplified Python IDE called CodeSkulptor, created by prof. Scott Rixner of Rice University. CodeSkulptor works in Chrome, Firefox and Safari (but not IE). Click here for the game; click “run” (the leftmost button with a triangle) to run the game.
There’s also an autoplay option, for those who are curious about the game but don’t want to struggle with playing it (especially because text input is so inconvenient – currently it’s impossible to clear the text field and let it keep the mouse focus). It can be disabled by setting use_autoplay = False at the beginning of the code. Autoplay follows the hardcoded walkthrough, it can be paused and resumed.
November 3, 2012
Interactive cheat sheets for Fast Find scenes in Hidden Chronicles game by Zynga.
Item locations taken from:
http://gamelytic.com/hidden-chronicles-tips-and-guides
http://gamelist.bbgsite.com/goto/hidden-chronicles/guide_reviews.shtml
http://www.flickr.com/photos/hc-helpers.
The copyright on Hidden Chronicles belongs to Zynga Inc.
November 1, 2012
This is a LiveJournal mood theme based on 2010 movie “Alice in Wonderland” by Tim Burton.
alice_in_wonderland_mood_theme.zip
(Click on the thumbnail to preview the images)
October 15, 2012
A simple command-line script in PHP which allows to post contents of a file, or a text string, to a blog that supports metaWeblog API through XML-RPC. (Tested only with WordPress blogs.) Its usability lies in being easy to use it from other scripts, e.g. generating a file and automatically posting or crossposting it with auto-generated tags, categories etc.
Example of usage:
php wp_post.php -file="contents.txt" -subject="Beautiful Day" -tags="daily, photo" -categories="Forest" -blog=photo365
Click to download – wp_post-1.0.zip
October 5, 2012
This Perl script streamlines using Google search as a grammar checker. It allows searching for several (up to 4) variants of the same phrase (e.g. with or without articles, different order of words) to see which one gets more hits and therefore is more likely to be correct, or to check if certain words can be used together at all. So instead of entering these queries manually one by one and having to remember the number of results, they are typed together on the same screen and are run by the script, with only the first page of results being shown, to verify if results are reasonable or garbage.
The script can be used either from the Web interface or from the console under Linux (see gcompare_console.pl).
I can’t afford paying for Google API, and the limit of 100 free queries per day is way too low when serious editing is taking place. So I use a technique of screen-scraping and parsing the output, which is kind of illegal and will break whenever Google changes the format of their search results page.
Click to download here