Thursday, September 22, 2016

Amazon Advanced Book Search

I occasionally search for books at Amazon. Amazon provides Advanced Books Search function you can find a better alternative at jeviz.com. You can find more detailed explanation at my story on medium Amazon Book & Kindle Search Hacks  

Monday, June 15, 2015

Django makemessages command gettext OS X fix

İf you get following error with python manage.py makemessages
CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.

Just do following solution

brew install gettext
brew link --force gettext

Sunday, May 24, 2015

Pyenv Daily Operations

If you want to upgrade pyenv  then
$ cd ~/.pyenv
$ git pull
 
To list all available Python versions:
$ pyenv install -l

To install a Python version:
$ pyenv install 3.4.3

To set the global Python version

$ pyenv global <version>

You can create virtualenv

$ pyenv virtualenv 3.4.3 Django
 
 
You may activate and de-activate virtualenvs using
 
$ pyenv activate <name>
$ pyenv deactivate 
 
You can set a folder specific Python version or virtual environment
 
$ pyenv local <virtualenv or version>
  
Uninstall Python version or virtualenv
 

$ pyenv uninstall <virtualenv or version>
 

Monday, April 20, 2015

Yale University’s youngest professor of the 20th century, died

Prof. Oktay Sinanoğlu, one of Turkey’s most prominent scholars who was known for his books on the Turkish language and became Yale University’s youngest professor of the 20th century, died early April 20 in the United States.

Turkish Foreign Minister Mevlüt Çavuşoğlu tweeted on April 20 that Sinanoğlu, who was born in the city of Bari in Italy in 1934, had passed away in Miami.

“May God rest Prof. Oktay Sinanoğlu’s soul in peace. Our Miami Consulate General is following the necessary process to bring his body to our country,” read Çavuşoğlu’s tweet on April 20.

Sinanoğlu received various awards and scholarships from internationally prestigious institutions and was nominated twice for the Nobel Prize for his works in the field of chemistry.

Sinanoğlu, who had finished TED Ankara Private High School in Ankara with a first degree, graduated from Berkeley University’s chemical engineering department in California at the top of his class in 1956.

Only eight months after he started his studies, Sinanoğlu earned his master’s degree from the Massachusetts Institute of Technology (MIT) in 1957 and later earned a PhD on theoretical chemistry from Berkeley in 1959.

He became an assistant professor at Yale in 1960, then an associate professor in 1961 for his “Many Electron Theory of Atoms and Molecules.”

At the age of 28, Sinanoğlu became a full professor in 1963 for solving a mathematics theory that had remained unsolved for 50 years, thus marking him as the youngest academic of the 20th century to be granted this title at Yale.

He was the first person to receive the “Alexander von Humboldt Research Award” from the German state in 1973, while he got the “International Outstanding Scientist Award” from Japan in 1975.

In the same year, Sinanoğlu was granted the title of Professor of the Turkish Republic with a special law made in 1975 and thus was the only professor to hold this title to date.

Sinanoğlu retired from Yale in 1993 and was appointed to the chemistry department of Istanbul’s Yıldız Technical University and continued his duties there until 2002.

Sinanoğlu is best known in Turkey for his books on the importance of the Turkish language such as “Bye Bye Turkish,” and “Target Turkey.”

Sinanoğlu’s other academic theories include the Solvophobic Theory from 1964, the Network Theory from 1974, Microthermodynamics from 1981 and the Valency Interaction Formula Theory from 1983.
 Source:

 Source:http://www.hurriyetdailynews.com/prominent-turkish-scholar-oktay-sinanoglu-dies-at-age-80.aspx?pageID=238&nID=81309&NewsCatID=341

 

Yale Bulletin &
Calendar September 1-8, 1997 Volume 26, Number 2 and may be viewed under: http://www.yale.edu/opa/ybc/v26.n2.news.07.html. The entry concerning Sinanoglu reads like this: Oktay Sinanoglu Oktay Sinanoglu is a specialist on theoretical chemistry who became well known early in his career for his Many-Electron Theory of Atoms and Molecules. More recently, he received attention for a research system, dubbed "Sinanoglu Made Simple," that he derived from his own mathematical theories. The method, considered revolutionary, enables chemists to predict the ways in which chemicals combine in the laboratory and to solve other complex problems in chemistry using simple pictures and periodic tables. When it was announced in 1988, Professor Sinanoglu said it was easy enough for even a 12-year-old to understand, adding, "The pictorial rules turn chemistry into a fun game..." Professor Sinanoglu came to the United States from Turkey for his post-secondary education, earning a B.S. and Ph.D. from the University of California at Berkeley and a M.S. from the Massachusetts Institute of Technology. He joined the Yale faculty in 1960, and has since published many papers explaining his theories on chemistry. When he was named a professor in 1963 at the age of 28, he became the youngest person in the past century at Yale to attain status as a full professor.
 Source: http://www.yale.edu/opa/arc-ybc/ybc/v26.n2.news.07.html

Friday, March 6, 2015

Pillow install via pip on Ubuntu 14.04

First install dependencies then make symlink to /usr/lib

$ sudo apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/ 
pip install Pillow 

Python on Ubuntu

Pydev is problematic on OS X so I moved to Ubuntu. I am using Ubuntu as a guest VM. I recommend anyone same


Sunday, February 15, 2015

Python Development Setup for OS X users

There are lots of options for python developers. Whether use Python 2 or Python 3 which IDE, how to do  package management so on. This guide is for beginners who are confused with many options.

Which Python version to use

It is more safe to use Python 2.7 not all packages are supported with Python 3. For example if you want to develop web application with Django only 590 packages out of 2656 are supported for Python 3. You can look at https://www.djangopackages.com/ which packages are supported. So I recommend  to learn first Python 2.7. Top most popular packages 289 out of 360 are supported while I am writing this blog  https://python3wos.appspot.com/ . Python 3 is a better language, if all your needed packages for your project are supported then use Python 3. It is possible to coexist Python 2.7 and Python 3 in the same system.

Python version and enviroment management with Pyenv


I am using OS X Yosemite 10.10.2 and default python version comes with it is 2.7.6 which is  not the latest one. My recommended way to install any version of python is via pyenv.  First install pyenv with Homebrew package manager. If you do not have this general purpose package manager (brew) install it first. Then:

brew install pyenv
brew install pyenv-virtualenv
brew install ccache
brew install pyenv-ccache

Put this code to your .profile file

if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)";fi

Now we are ready to go install python. First list python versions available:

pyenv install -l
Available versions:
2.7.8
  2.7.9
  3.0.1
  3.1-dev
....
  3.3.4
  3.3.5
  3.3.6
  3.4.0
  3.4-dev
  3.4.1
  3.4.2
  3.5-dev

Now install python 2.7.9

pyenv install 2.7.9

if you get following error:
ERROR: The Python zlib extension was not compiled. Missing the zlib?
then append the command with following for workaround:


CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 2.7.9


Now we can activate python 2.7.9 globally as follow:

python global 2.7.9



Now let's install also python 3.4.2
pyenv install 3.4.2