Some insights from riding a motorcycle in Bali

Before we came to Bali, I was looking online for safety tips on riding a motorcycle in Bali. Although there were some articles on this topic, many of them covered the basics, such as wearing a helmet or going slowly. I was interested in the more unusual, subtle insights; however, I haven’t found them. After around three thousand kilometers on Bali roads, I’ve decided to articulate what I’ve learned so far from the roads of this charming island.

Continue reading “Some insights from riding a motorcycle in Bali”

Efficient workspace organization

Last couple of years, I’ve spent working on a system for identification of variant peptides. As it was rather complex system, at one point I’ve started to realize that a lot of time is lost while navigating between workspaces and searching for the right one. This was mainly because there was not enough workspaces to establish logic of navigation. Once established, however, the navigation becomes very natural and efficient. I’ve realized this when working on web interface for the system and 3 x 3 desktop was really not enough. Mild upgrade to 4 x 4 significantly improved the situation and it was just a matter of one day to realize, that more would be needed and beneficial. I’ve lately start to utilize it for almost any kind of work. I suggest that you should try that as well, because it is a real time saver.

For instance, depicted here is a system of workspaces for writing a paper. On the left, there are individual figures in main text and supplementary, all ordered from first to last figure. The whole area is centered around the main paper, being in the very middle. Around the main area, there are, e.g.,  webpages to various dictionaries, diary of work, Mendeley for organization of literature and similar.

paper-finalization-fun2

Continue reading “Efficient workspace organization”

M-` for tmm-menubar on emacs on ubuntu 16.04

Just a small post to make your life going back to normal a little sooner with emacs on ubuntu 16.04 (possibly others). The M-` (grave, for searching purposes of other people I include: tilde, apostrophe, quote) was overlayed by two shortcuts. Now their removal. Information gathered from https://bugs.launchpad.net/unity/+bug/874734 and http://askubuntu.com/questions/132304/how-to-disable-alt.

First, the removal of actual shortcut.

dconf write /org/gnome/desktop/wm/keybindings/switch-group “[‘disabled’]”

Then the alt key, which starts the launcher or menu bar. Start ccsm, then navigate to Ubuntu Unity Plugin, first panel General, and disable both “Key to show the menu bar while pressed” and “Key to show the HUD when tapped”.

Hopefully your emacs is free again.

 

 

downgrading your android version of nexus 10

If you’ve went through the situation, that your beloved tablet started to work terribly after update, I’ll simply sketch the solution. My problem was update from Android 4.4, to 5.0 Lollipop (https://www.youtube.com/watch?v=3rYoRaxgOE0). I went through some of internet tutorials, but they seem to be quite complicated, but the core of the solution is very simple. 

Beware: You will lose all the data; but it’s nice to start fresh. (but backup)

In short, you 1) put the device into boot menu, 2) unlock it and 3) upload images using fastboot. Have your device connected using USB.

Instructions:

1) put your device into boot menu; you cand find specific instructions on google (nexus 10: hold together Power + Volume Up + Volume Down until you enter boot menu)

2) the unlocking is done using fastboot
i. you need to download it. it is part of android development toolkit, but you can go with minimal version here (for windows, aargh), or check this official android page. you will download much more than necessary, but whatever.
ii. find fastboot and run on command line “fastboot unlock oem” if it works you, you’re fine; if not, try some re-connections/restarts or search for another help.

3) download official factory image of interest (nexus; check device id/name; i had to select mantaray image), unzip and run flash-all script.
flash-all script assumes that it has fastboot available. in linux, just put it to /usr/bin (or there are many options); in windows either update PATH, or just copy it into system32 folder of windows.

That should do the job.

interactive visualization of genetic algorithm

Recently, Palacky University Open Day happened to take place (20. 11. 2015). Together with colleagues, we decided to create small projects to promote the Computer Science Department in a way to attract high school students. Projects from colleagues included: LEGO-based Turing Machine (performing addition), OpenGL shading methods, Voxel graphics and reimplementation of Worms game among others. I had an idea to visualize the process of learning of solving of the Travelling Salesman Problem (TSP) using simple genetic algorithm (GA).

The developed application is an interactive tool for exploration of behavior of GA for TSP (see video). The left area shows the current state of genes in the population, the right panel consists of interactive control and performance plot.

Continue reading “interactive visualization of genetic algorithm”

deep map of curried function application over selectors

During experimentation with macro programming in Common Lisp, there emerged a need to transform a deep list into a deep list of its selectors. Recently, I realized that this selector transformation could be a fun way to show some aspects of functional programming. As such, I have decided to include it in the section of “fun” of fplib and will introduce this small example here.

I am often interested in composing together multiple higher-order functions, which—in such composition—do not to do anything at all (they are extensionally equivalent to identity).
Continue reading “deep map of curried function application over selectors”

kmischeme

During the first few lessons of functional programming, I have observed that students sometimes struggle with the definition of evaluation of element. Given the fact that it is core concept, it is quite important to understand it completely in the beginning of the course. I realized that it would be nice for them to have additional set of examples of step-by-step detailed evaluation of elements (in environment).

To stress the fact that it is completely mechanistic procedure, I have decided to construct a minimalistic interpret of Scheme (in python). This interpret outputs directly a beamer presentation of detailed evaluation of examples.

The set of evaluated examples could be possibly useful to anyone, so the set of presentations is here:

  1. primitive procedures
  2. define
  3. if + define
  4. lambda.

mouseless

The time needed to 1) grab a mouse; 2) move it; 3) click; and 4) go back to keyboard could be often spent more productively. From personal experience, the ability to use keyboard shortcuts could save decent amount of time. Sometimes, however, it seems that there is no other way other than to perform the mouse movement and click. This happens mainly because there is no keyboard shortcut to fulfill the desired behavior.

mouseless is a small python script, which enables fast movement of mouse cursor by successive division of screen. In effect, one can reach every pixel in small number of steps (logarithmic in size of screen) by using adequate keys on numeric keypad. An example of process of division is shown on the following video.

The video shows an use case, when one wants to close an interpret (e.g., after crash). In spyder (very nice interactive python development environment) does not seem to be shortcut to do so.
Continue reading “mouseless”