Sunday, July 15, 2012

Links dump for July 15, 2012

Saturday, May 5, 2012

Python development environment for Ubuntu 12.04 Precise

Frankly, my upgrade for the newest release of Ubuntu 12.04 Precise broke my OS. And I didn't have any chance to recover it. So I just reinstalled Ubuntu and got fresh, but empty operation system. The last time when I did setup of Python development environment was one year ago. All my notes about this things were old and unsuitable for the latest Ubuntu release. This post is summary of my actions to setup Python development environment from scratch.
Install Python setuptools package:
sudo apt-get install python-setuptools python-pip
Install virtualenvwrapper:
sudo pip install virtualenvwrapper
Setup virtualenvwrapper:
mkdir -p ~/.virtualenvs
echo 'export WORKON_HOME=~/.virtualenvs' >> ~/.bashrc
echo 'export DJANGO_SITES_ROOT=$HOME/projects/' >> ~/.bashrc
echo 'source /usr/local/bin/virtualenvwrapper.sh' >> ~/.bashrc
source ~/.bashrc
Install Django extension for virtualenvwrapper. I have several Django projects, but if you aren't using Django, then you can skip this step:
sudo apt-get install git-core
mkdir -p ~/.virtualenvs/django-libs
cd ~/.virtualenvs/django-libs
git clone https://github.com/epicserve/django-environment.git
cd ~/.virtualenvs/django-libs/django-environment/django_env/bin/
install.py
Test virtualenvwrapper:
cd ~/projects
mkvirtualenv example
cd example && ls
Install PIL with JPEG, ZLib and FreeType support, if you aren't using PIL, then you can skip this step:
sudo apt-get install libjpeg62-dev zlib1g-dev libfreetype6-dev
cd ~/.virtualenvs/{project-name}
For 32-bit systems:
ln -s /usr/lib/i386-linux-gnu/libz.so ./lib/
ln -s /usr/lib/i386-linux-gnu/libjpeg.so ./lib/
ln -s /usr/lib/i386-linux-gnu/libfreetype.so ./lib/
For 64-bit systems:
ln -s /usr/lib/x86_64-linux-gnu/libz.so ./lib/
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so ./lib/
ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so ./lib/

pip install PIL
I'm big fan of Vim, so here is steps for Vim also:
sudo apt-get install vim.gtk
Install Pathogen plugin:
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -so ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
add to ~/.vimrc file:
call pathogen#infect()
Install Fugitive for Git support and Python-mode for all Python stuff in Vim:
cd ~/.vim/bundle
git clone git://github.com/tpope/vim-fugitive.git
git clone git://github.com/klen/python-mode.git
Install super-fast Command-T plugin for opening files in Vim:
cd ~/.vim/bundle
git clone git://git.wincent.com/command-t.git
cd ~/.vim/bundle/command-t
rake make
That's all folks. I will keep this post updated for a while.
And If you have any comments and suggestions, please, post them in comments. Thanks.

Monday, February 13, 2012

Онлайн курсы

Стэнфордские онлайн курсы 

  • http://www.cs101-class.org/ - Базовый курс Computer Science (базовые алгоритмы и понятия)
  • http://www.infotheory-class.org/ - Теория информации (алгоритмы и структуры данных для хранения, сжатия и передачи информации)
  • http://www.modelthinker-class.org/ - Теория моделирования (создание и управление моделями данных)
  • http://jan2012.ml-class.org/ - Теория машинного обучения (самообучаемые алгоритмы)
  • http://www.saas-class.org/ - Программное обеспечение как сервис (теория и практика построения SaaS)
  • http://www.hci-class.org/ - Теория взаимодействия человека с компьютером (проектирование пользовательских интерфейсов, юзабилити)
  • http://www.nlp-class.org/ - Обработка текста натуральных языков (лексический, семантический и синтаксический анализ текста)
  • http://www.game-theory-class.org/ - Теория игр (статистика, вероятности, стратегии, стохастический анализ)
  • http://www.pgm-class.org/ - Графическое моделирование (цепи Маркова, Байесовские сети, пересекается с Теорией машинного обучения)
  • http://www.crypto-class.org/ - Криптография (различные алгоритмы шифрования)
  • http://www.algo-class.org/ - Проектирование и анализ алгоритмов (фундаментальные понятия для проектирования алгоритмов, сортировка, поиск и т.д.)
  • http://www.security-class.org/ - Базовый курс компьютерной безопасности (проектирование и анализ систем безопасности для программ)
  • http://www.vision-class.org/ - Компьютерное видение (алгоритмы обработки изображений и видеопотока)


MIT онлайн курсы



Другие

Thursday, January 12, 2012

Light gray color schema for VIM

I got bored with default dark desert color schema in VIM. So I decided to get some light gray color schema in Internet, but I didn't find any usable for me schema. Only "Peak Sea Color" schema was near of my wishes. And after several attempts of adopting this schema, I got the color schema which is satisfied me a lot. I made changes only for light background case. May be somebody will be interesting with this color schema. You can get this color schema from my GitHub repository - https://github.com/andreybratukhin/peakseacolor. Enjoy.


To enable the scheme, you need put the peaksea.vim in your $HOME/.vim/colors/ (or %HOME%\vimfiles\colors for Windows) and put in ~/.vimrc the following:

if !has("gui_running")
    set t_Co=256
endif
set background=light

colorschema peaksea


UPDATE: I found very useful website, where you can create custom color schema for VIM - http://www.bilalquadri.com/villustrator/.