This file contains 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
from __future__ import division | |
from PIL import Image, ImageDraw | |
import math | |
import os | |
import re | |
import time | |
import zipfile | |
import tempfile | |
import glob |
This file contains 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
# this script needs an extra file called formula_exif! | |
# It will ocr an image and save it will save its text content on the EXIF DATA | |
# this script is used on jupyter notebooks, that´s why the multiprocessing logic need to be on a different file. | |
# author: Alberto Cartaxo | |
# 11/01/2018 | |
import glob | |
import multiprocessing | |
from tqdm import tqdm | |
import formula_exif # where the magic happens |
This file contains 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
from infi.systray import SysTrayIcon | |
from win32api import GetCursorPos, SetCursorPos | |
import time | |
import multiprocessing | |
import base64 | |
import tempfile | |
# I cant pass a IO Binary, so the solution was to create a tempfile for the icon so I only need one py.file | |
icon = base64.decodebytes(b'''AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCw | |
AAAAAAAAAAAAAAAAAAAAAAAGlhZceuqq3/ |
This file contains 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 os | |
from os.path import join, realpath | |
import zipfile | |
from shutil import copyfile | |
import uno | |
from com.sun.star.beans import PropertyValue | |
from com.sun.star.awt.PosSize import POSSIZE | |
def addAwtModel(oDM,srv,sName,dProps): | |
oCM = oDM.createInstance("com.sun.star.awt.UnoControl"+ srv +"Model") |
This file contains 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 grequests | |
import os | |
import time | |
import shutil | |
import os.path | |
from PIL import Image |