Posts Tagged ‘gui’


Robomongo is a native GUI client for MongoDB. So far I’ve used RockMongo, which was perfect for me, but it’s PHP-based and quite hard to install. Also, it seems to be abandoned, the last commit was in 2015. It’s a pity…

Robomongo is simple. Just download, decompress, and launch. It’s free and multi-platform.

Categories: mongodb Tags: , , ,

GUI application to monitor mouse coordinates in real-time

September 11, 2011 Leave a comment

You want to monitor mouse coordinates in real-time.

But why?
For instance you want to use the autopy Python module. “AutoPy is a simple, cross-platform GUI automation toolkit for Python. It includes functions for controlling the keyboard and mouse, finding colors and bitmaps on-screen, and displaying alerts — all in a cross-platform, efficient, and simple manner.” (source) So, with autopy you can say “move the mouse to position X,Y and click once”. But how do you figure out the X,Y coordinates? This is when my script comes in the picture.

Just launch my simple GUI and it will show the mouse coordinates in real-time. Available here, in the “mouse/” folder.


Rock-Paper-Scissors: You vs. the Computer

March 8, 2011 1 comment

Computers mimic human reasoning by building on simple rules and statistical averages. Test your strategy against the computer in this rock-paper-scissors game illustrating basic artificial intelligence. Choose from two different modes: novice, where the computer learns to play from scratch, and veteran, where the computer pits over 200,000 rounds of previous experience against you.” (source)

The novice opponent is not too difficult, but it learns quickly. The veteran opponent is tough though, I had the impression that it can read my mind :) The problem is that we, humans, don’t choose our next move randomly and the computer can analyze our strategy.

Choose randomly

After playing with the veteran for a while, I came up with the idea: “Hey, if I could choose randomly, the computer couldn’t analyze my moves”. So here is a simple random number generator:

C:~> python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> li=[1,2,3]
>>> random.choice(li)
>>> random.choice(li)
>>> random.choice(li)

In the “python shell”, you can use the up arrow to call back the previous command(s). With this “cheat” you can surprise the veteran computer :)

I read about this game in this post (in Hungarian).

Update (20110309):

I made a very simple GUI that returns a random number from the interval [1,3] :) Jack’s remark from the comments was taken into account. I’ve never used PyGtk before, I was curious what it’s like. You can get the source code here. Tip: launch the application, right click on it on the task bar, and set “Always On Top” on. This way you can use it together with the game in the browser, you won’t have to switch between the two.

Update (20131007):
There is a Rock Paper Scissors Programming Competition, see the site Here is an example that its author sent to reddit too.

Change display resolution

February 17, 2011 Leave a comment

In this post, I found two useful utilities:

  • xrandr (from the man: “Xrandr is used to set the size, orientation and/or reflection of the outputs for a screen. It can also set the screen size. If invoked without any option, it will dump the state of the outputs, showing the existing modes for each of them, with a ‘+’ after the preferred mode and a ‘*’ after the current mode.“)
  • lxrandr (from the man: “A GTK+2 interface to XRandR. lxrandr is a program that change the resolution and frequency of the monitor using a simple interface.“)

Getting your laptop work with a projector

With lxrandr I could make my laptop work with a projector at the university. I’ve had this problem for months… All I had to do was change (lower) the resolution.

Categories: ubuntu Tags: , , , ,