Autarchy of the Private Cave

Science, Society, Programming and Hobbies

  • Exits

  • Categories

  • Archives

  • Visitors' track

    Locations of visitors to this page
  • Tags list

  • Earn and spend


  • Exits

  • Ratings

    Science Blogs - Blog Top Sites website monitoring service
  • Archive for September, 2007

    If snapshots starts showing ads in previews, I’ll quit

    30th September 2007

    The utility of snap previews (snapshots) is still doubtful to me, and if they start putting ads into previews - I’ll surely remove all the snapshots code from my blog.

    Without ads, it’s just one of the “bells and whistles”; with ads, it should be at least an affiliate program.

    Update: now Snap’s are showing ads. And it’s a kind of an affiliate program. I still have to look closer at it… when Time permits. Without looking into it closer, I tend to remove Snap previews.

    Update 2: snap previews are now removed from my blog. I might, however, add them manually to the links where it would be appropriate.

    Share This

    Posted in Misc, Web | No Comments »

    Snap elections-2007 in Ukraine: Lytvyn block buying votes for 100 UAH (20 USD)

    30th September 2007

    Today was the voting day in the snap parliament elections-2007 in Ukraine.

    Early in the morning, I heard from my wife’s sister that some of her friends were offered 100 UAH (20 USD) for promising to vote for the Lytvyn’s political block (based on his People’s party - “Narodna partiya“, in Ukrainian only). I said “that’s ugly, and they could just take the money and vote for whomever they want, as it’s impossible to enforce them to vote exactly for Lytvyn”. But that was it as for my reaction in the morning.
    Read the rest of this entry »

    Share This

    Posted in Society | 1 Comment »

    Flash countdown video tutorial

    27th September 2007

    Found a good video tutorial on how to create a countdown animation with Flash. Important notice: in my case, if Auto kern was enabled for the dynamic text box, there were no digits visible at all (size of my countdown animation was 120px wide and 186px high - quite small, so might be the reason of “auto kern” pushing text out of the view).

    Here’s the image of the counter I created following the tutorial:
    countdown

    Share This

    Posted in Links, Programming, Web | No Comments »

    Useful Python looping techniques

    26th September 2007

    These are all excerpts from the Python documentation.

    To synchronously and simultaneously loop over two sequences:

    PYTHON:
    1. questions = ['name', 'quest', 'favourite colour']
    2. answers = ['Lancelot', 'the holy grail', 'blue']
    3.  
    4. for q, a in zip(questions, answers):
    5.     print 'What is your %s?  It is %s.' % (q, a)

    To loop over a sequence with both key and value:
    Read the rest of this entry »

    Share This

    Posted in Notepad, Programming, Python | No Comments »

    How to sort Python dict (dictionary)

    26th September 2007

    Sample script (copypasted from Well House Consultants training course):
    click the PLAIN TEXT header for copy-pasteable version

    PYTHON:
    1. #!/usr/local/bin/python
    2.  
    3. author = {"php":"Rasmus Lerdorf",\
    4.     "perl":"Larry Wall",\
    5.     "tcl":"John Ousterhout",\
    6.     "awk":"Brian Kernighan",\
    7.     "java":"James Gosling",\
    8.     "parrot":"Simon Cozens",\
    9.     "python":"Guido van Rossum"}
    10.  
    11. langs = author.keys()
    12. langs.sort()
    13.  
    14. for language in langs:
    15.     print language,"is the child of",author[language]

    You can also define the Python ksort() function similar to that found in PHP:
    Read the rest of this entry »

    Share This

    Posted in Notepad, Programming, Python | No Comments »

    Google gadget ads launched

    19th September 2007

    Google launched gadget ads.

    Share This

    Posted in Affiliate programs, Links, Misc | No Comments »

    PHP proxy

    19th September 2007

    PHP proxy is simple but good. I converted it into a proxy-function for one of my projects.

    Do pay attention to the comments, especially these two:

    I had issues with this script (and others) returning 0 for the bytesTotal in flash. Basically, the Content-Length header was absent from the response. By simply adding
    header("Content-length: ".strlen($response)) before the echo, it resolved the issue. I don't know if there is a more appropriate fix to account for character encoding, etc, but it seems to work.

    @Schimmi: Well, if you can add some checks there (like who is referring your script) and allow the access to whitelisted clients (served from your domain)... I think, you can totally make it used applications from same-domain....So it would not be open to world. Yeah above script doesn't have those things.

    Share This

    Posted in Links, Notepad, PHP, Programming | No Comments »

    Using Cytoscape from behind an HTTP proxy which requires authentication (authorization)

    14th September 2007

    Cytoscape 2.5.1 supports proxies, including HTTP proxies, but there is no support for HTTP proxies requiring authentication/authorization. It's easy to use Cytoscape in the authentication-requiring proxy scenario; below is one possible method.

    Note, that exactly the same method can be used to allow any software, which supports proxies but not proxies with authentication, to be able to access the internet.
    Read the rest of this entry »

    Share This

    Posted in Bioinformatics, Notepad, Science, Software | No Comments »

    MySQL - Python: good MySQLdb tutorial (examples)

    7th September 2007

    Andy Dustman gave a presentation on Python and MySQL at the MySQL Users Conference 2005, Santa Clara, CA. The presentation is an excellent collection of examples for those who use the MySQLdb Python module.
    Read the rest of this entry »

    Share This

    Posted in Links, Notepad, Programming, Python | 2 Comments »

    Date and time in Python scripts

    7th September 2007

    Here's an excellent description of various methods to handle date and time in Python scripts.

    Share This

    Posted in Links, Notepad, Programming, Python | No Comments »

    i-SOBOT (Omnibot-2007) by TOMY and SANYO

    3rd September 2007

    This isn't new, but looks like a milestone to me (yeah, I know about Sony and their robots, but that was before and different).

    i-SOBOT CAMVersion

    i-SOBOT is a tiny 165-mm robot with 17 servo-engines. i-SOBOT can be programmed and controlled at distance (using the LCD-equipped remote control), and understands up to 10 voice commands. This robot will be available in Japan and US in October 2007.

    According to the Guinness Book Of Records, i-SOBOT is the smallest robot in the world.
    Read the rest of this entry »

    Share This

    Posted in Artificial Intelligence, Robotics | No Comments »

     
    Close
    E-mail It