Skip to content

Instantly share code, notes, and snippets.

View tibhar940's full-sized avatar

Alexey Samoylov tibhar940

  • Moscow
View GitHub Profile
import requests
import io
from PIL import Image
import json
import urllib
img_url = 'http://img2.goodfon.ru/original/5592x3700/4/49/zakat-nebo-derevya-peyzazh.jpg'
fd = urllib.urlopen(img_url)
image_file = io.BytesIO(fd.read())
# -*- coding: cp1251 -*-
import datetime as dt
import sqlite3
#Simple function for insert dates in sql
#Using for Sqlite problem with date type
sql_text = (
"""SELECT * FROM table
WHERE tradedate IN({period})""")