msttcorefonts

Posted by & filed under Linux.

msttcorefonts — пакет для Linux (Ubuntu), без которого шрифты под Linux отличаются от шрифтов под Windows, что затрудняет web-разработку, если разрабатывать под линуксом.

Работа с timezone в Python

Posted by & filed under python.

from pytz import timezone from datetime import datetime tz = ‘Europe/Moscow’ server_time = datetime.utcnow() client_time = timezone(tz).fromutc(server_time) Дублирующая ссылка на код: http://livepad.ru/view/9229aff1

Ресайз (resize) картинок в Python

Posted by & filed under python.

# resize an image using the PIL image library # free from: http://www.pythonware.com/products/pil/index.htm # tested with Python24 vegaseat 11oct2005 import Image # open an image file (.bmp,.jpg,.png,.gif) you have in the working folder imageFile = «zFlowers.jpg» im1 = Image.open(imageFile) # adjust width and height to your needs width = 500 height = 420 # use… Read more »