Stand With Ukraine

Monday, October 18, 2010

Ubuntu 10.10 looks like Mac Os

Recently my friend sent me an interesting link to an application that makes your ubuntu look just like Mac(here it is http://lifehacker.com/5665765/macbuntu-makes-your-linux-desktop-look-like-mac-os-x). I installed it successfully, but have problems with links in places and the link to nautilus in the dock, they do not work, and also strange duplicates in places. I think later I will figure out how to fix it.))

But still I enjoy it very much.

Saturday, September 11, 2010

Fortran 90 pass subroutine as an argument to the other subroutine

In fortran 90 it is not enough to just declare(unless the passed function has parameters):


as it is in fortran 77. It actually compiles by pgf90 but does not run (worked for the function which did not take any arguments).
You should actually include interface description for it to work in f90:


Update: This appeared also to be the case when passing to a subrouting allocatable array which is supposed to be initialized inside the subroutine. And also, as I understood from the posts of smart people, it is not necessary to describe the interface of the called subroutine if it is declared inside a module.
Below is the example of a subroutine parameter which has an allocatable array as one of the arguments:

Sunday, August 29, 2010

Ubuntu gnome, another motivational screenshot


I just like to see the different looks of my ubuntu box(Linux san-laptop 2.6.32-24-generic #41-Ubuntu SMP Thu Aug 19 01:38:40 UTC 2010 x86_64 GNU/Linux), so, here is how it looks now)) The dock is the application called docky, can be found at synaptic repositories.

Thursday, July 15, 2010

Video started to work with skype))

Yesterday I noticed that after update of my ubuntu box I did not have sun java installed and went to look for it. In order to install I added the repository link to my source list:


sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"


and then after reload I pressed update and it updated skype. I decided then to check video in skype and it worked)) with my camera Microsoft Corp. LifeCam VX-3000 on my Ubuntu system (Linux san-laptop 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux). So I am very happy now that I eventually can use my camera without rebooting to windows after a year of struggle ))

Wednesday, July 7, 2010

Set up alarm using crontab

I used crontab in order to get waked up in the morning (here at 7:50) by some song from youtube I like.
In home directory I created 2 files: alarm.sh and mycrontab. And then just issued the command:
crontab mycrontab

Contents of mycrontab:

50 7 * * * cd $HOME && ./alarm.sh

Contents of alarm.sh:

#!/bin/bash
export DISPLAY=:0.0
/usr/bin/firefox "http://www.youtube.com/watch?v=ebBBdJSHzJk&feature=PlayList&p=C262E364FC4756AF&playnext_from=PL&index=18&playnext=2"

Tuesday, June 29, 2010

Mac Ports automation bash script

Mac ports is a very useful system for installing linux applications ported to MacOS (http://www.macports.org), it is easy to use and I am happy with it till now. But it does not delete the old versions of software after update, or I just did not find a proper command for this. So I wrote this bash script to automate the task and successfully used it.
Here is its output during the execution:
radar2:tmp huziy$ ./port_cleaner.sh 
33
Password:
--->  Uninstalling hdf5-18 @1.8.4-patch1_1
--->  Uninstalling hdfeos5 @1.12_0
--->  Uninstalling ImageMagick @6.6.2-0_0+q16
--->  Uninstalling iso-codes @3.16_0
--->  Uninstalling libtool @2.2.6b_1+darwin
--->  Uninstalling mc @4.7.0.2_0+slang2
--->  Uninstalling mpfr @2.4.2-p1_0
--->  Uninstalling mpfr @3.0.0_0
--->  Uninstalling openmotif @2.3.2_2
--->  Uninstalling openssl @0.9.8n_0+darwin
--->  Uninstalling python26 @2.6.5_1
--->  Uninstalling xorg-libX11 @1.3.3_0
--->  Uninstalling xorg-libXcomposite @0.4.1_0
--->  Uninstalling xorg-libXdamage @1.1.2_0
--->  Uninstalling xorg-libXext @1.1.1_0
--->  Uninstalling xorg-libXfixes @4.0.4_0
--->  Uninstalling xorg-util-macros @1.8.0_0



And finally the script itself:



I used this tutorial http://tldp.org/LDP/abs/html/arrays.html to write the script.

Wednesday, May 19, 2010

Cleaning Timetable

So I moved to another apartment - multi 3, and we had to decide how to divide our cleaning responsibilities fair and square. For this purpose and for fun I have created a pdf file using python and reportlab(http://www.reportlab.com/) library. Here is the code:
So like this we will change the place and of course after the end of the week all the blanks should be checked)).And the screenshot of the result:

Saturday, April 24, 2010

Lorenz system

I have heard many times about this system (http://en.wikipedia.org/wiki/Lorenz_system#Equations) and its properties, attractors and stuff, recently I have had an opportunity to play with it a little, using Runge-Kutta's method of the 4th order(http://en.wikipedia.org/wiki/Runge-Kutta) and tangent linear solution of the linearized model(This is the description of the numerical solution of the linearized model: As soon as we calculate dx/dt, we use x + dx to calculate dy/dt, and then x + dx and y + dy to calculate dz/dt). The curves in red below are calculated using this method.
a) dr0 = (0.1,0.1,0.1)
dt = 0.01 s


the same thing but with dt = dt / 10 = 0.001 s




b) dr0 = (10.0,10.0,10.0)



c) Just for the sake of having a beautiful picture here, 100 seconds of simulation of the system, give the following image:




Sensitivity to the initial conditions(2 solutions were obtained using RK4):