• CV
  • Blog
  • Contacts
    • Facebook
    • LinkedIn
    • GitHub
    • Twitter
    • Google+
    • LiveJournal
    • VK
  • РусскийРусский

Anamnesis

of a kooky software developer with megalomaniacal inferiority complex

python

Automatically activate virtualenv on cd (even in mc)

27.07.2012 by Sergey Vasilyev 3 Comments

If you work with Python, you probably work with virtualenv. If you work with virtualenv, you probably work with virtualenvwrapper. Nevertheless, if you work a lot with many virtualenvs at the same time, you may become tired of al these “. bin/activate” or “workon smthng”.

You just want to cd into your project directory, and have everyhting ready to work. Especially if you use two-pane file managers, such as Midnight Commander, for file operations and tree browsing, and prefer not to type shell commands when it is not neccessary.

Here is how I do that:

[Read more…]

Posted in: Development, Life Hacks Tagged: bash, python, shell, venv, virtualenv, workon

Building 32-bit ZooKeeper Python bindings in 64-bit Mac OS X

10.12.2011 by Sergey Vasilyev Leave a Comment

If you need to build ZooKeeper Python bindings in 32-bit mode on 64-bit Mac OS X, it can be hard to do since ZooKeeper building scripts ignore the usual “-arch” flags for the compiler. But there is a simple workaround for this. And here it is.

Why?

If you have Mac OS X and you need Oracle InstantClient for your work as I do, you are in trouble: the 64-bit InstantClient crashes with “segfault” error code 11 on 64-bit Mac OS X. The only solution is to use 32-bit InstantClient, which does work.

But this workaround entails to every single bit of software, that uses InstantClient, should be 32-bit too. For example, if you code Python as I do, you need cx_Oracle to be 32-bit to work with 32-bit InstantClient (64-bit cx_Oracle binary part cannot work with 32-bit InstantClient libraries, obviously). And if you have 32-bit cx_Oracle, you ought to have 32-bit Python to load that 32-bit cx_Oracle. And if you have 32-bit Python, you ought to make all other binary libraries to be 32-bit. Thank you, Oracle, for this fun!

And if you use ZooKeeper together with InstantClient as I do, you have to build 32-bit ZooKeeper binaries and libraries. Well, lets work up to it from the beginning.

[Read more…]

Posted in: Development Tagged: 32-bit, 64-bit, apache, bindings, i386, instantclient, mac os x, macosx, oracle, python, x86, zookeeper

MTurk Quality Experiment #1

11.08.2011 by Sergey Vasilyev 3 Comments

As I’ve previously mentioned in my Twitter (nolar), I’ve been experimenting with Amazon MTurk, and here are the preliminary results of the quality of the results for one specific task of translation of the texts from English to Russian.

Initially I wanted to name this article as “Zoo of Mechanical Turkeys”, but changed my mind for better SEO of this article (I mean relevancy, not the traffic and popularity of the Dark SEO). I don’t know why MTurk is so associated with turkeys in my mind, when it has nothing to do with these birds or nationality.

I guess, the results will show why it happens so. But before I will give you the results, I want to describe what the task is, and why is it so unusual.

[Read more…]

Posted in: Development Tagged: amazon, api, artificial intelligence, aws, boto, experiment, hit, human intelligence task, intelligence, mturk, python, quality, statistics

Categories

Development Job Knowhows Life Hacks Management Nothings Traveling Word of the Day

Tags

amazon apple archive aws backup blog budget business canada capslock career cloud development document english expenses experiment file image iq job keyboard keyremap4macbook language layout lifehack macbook mac os x macosx management password pckeyboardhack photo psychology python russia russian startup storage success team toronto us windows workon

Copyright © 2025 Anamnesis.

Omega WordPress Theme by ThemeHall