This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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()) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # -*- 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})""") |