Since i have tired to see my ubuntu clocks asynced, i have decided to put following code snippet to /etc/rc.local file:
for SERVER in ntp1 ntp2 ntp3 ntp4 ntp21; do
echo "Trying ${SERVER}.vniiftri.ru to connect"
if ntpdate ${SERVER}.vniiftri.ru; then
break
fi
done
Vniiftri is Russian center of time control.
I assume that there is nothing bad in connecting to ntp*.vniiftri.ru every moment my laptop starts.
воскресенье, 21 октября 2012 г.
Python is nearby!
Recently I've decided, that knowledge of Python will be a good addition to Perl-programmer.
Althoug, it is beautiful (maybe just beacuase it's new to me), it has some big disadvantages.
One of them is that it is very slow! Yestarday night and tomorrow I had been fighting with problem on codechef:
http://www.codechef.com/problems/INTEST
http://www.codechef.com/problems/INTEST
Nothing helped me to pass the test. The failure is in the way how Python reads from stdin. It's very slow. Neither raw_input(2.7.2), nor input(3.2.1) passed input test limit. Moreover, I tried os.read() function and again not good news :( . I also found direct method reading from stdin: sys.stdin.readlines(), but it was not helpful.
What can I say? Maybe Python < 2.7.2 really can handle it:
But now in codechef there is Python interpreters greater, then 2.7.1
One failure is unable spot my mood. But it is not very cozy to know, that upgrading PYTH on your large data-set systems can cause increasing execution of functionality, written on python .
суббота, 1 октября 2011 г.
Shad
Hey, yo! It's been 4 lectures and 4 seminars i have visited this year. Course is named "Algorithm's and data search". Even though I understand not all material while listening this course, it is very interesting.
Yestarday I have listened Binary Search. I didn't thought that there will be so many problems to code that (yep, mr Peter Mitrichev :)).
During the course little by little I starting understand that to code hard tasks you need to
1) have a good mood :)
2) theoretically prove your solve
3) test your solve very hard ;)
4) don't forget about compiler differences
5) shit, again test
Theoretical prove is sociated with some invariant that must be compiled in your mind.
Yestarday I have listened Binary Search. I didn't thought that there will be so many problems to code that (yep, mr Peter Mitrichev :)).
During the course little by little I starting understand that to code hard tasks you need to
1) have a good mood :)
2) theoretically prove your solve
3) test your solve very hard ;)
4) don't forget about compiler differences
5) shit, again test
Theoretical prove is sociated with some invariant that must be compiled in your mind.
пятница, 11 февраля 2011 г.
воскресенье, 6 февраля 2011 г.
Perl magic
Since i am perl-intern, perl is my second language :)
Some of it is very strange!
For example, pattern /^\w+(\d+)\w$/ match one string blabla01d and doesn't match blabla10d. I know, that \w can match digits also, so I made /^\w+?(\d+)\w$/, so it worked on MY machine. But on other computers first pattern aslo works fine.
So I DON'T KNOW WHAT IS HAPPANING!
Kill me by wall...(c)
Some of it is very strange!
For example, pattern /^\w+(\d+)\w$/ match one string blabla01d and doesn't match blabla10d. I know, that \w can match digits also, so I made /^\w+?(\d+)\w$/, so it worked on MY machine. But on other computers first pattern aslo works fine.
So I DON'T KNOW WHAT IS HAPPANING!
Kill me by wall...(c)
Olympiads
http://informatics.mccme.ru/
Yestarday i found myself that is a good site to practice.
There are a lot of tasks with different complexity.
It's time to make better my skill for resolving problems.
Good luck, all genius ;)
Yestarday i found myself that is a good site to practice.
There are a lot of tasks with different complexity.
It's time to make better my skill for resolving problems.
Good luck, all genius ;)
суббота, 25 сентября 2010 г.
Stuxnet
Ok,there are bad news to Iran atomic station.
Stuxnet virus appears to be a miracle of hacker's art. I read that this is the kind of national bug. Big job to make a sabotage.
--
Siemens techinc is installed on Iran atomic station.
Stuxnet virus appears to be a miracle of hacker's art. I read that this is the kind of national bug. Big job to make a sabotage.
--
Siemens techinc is installed on Iran atomic station.
Подписаться на:
Сообщения (Atom)
