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
| class LzwAlgorithm: | |
| def __init__(self, texto = ''): | |
| self.dicionario_encode = {chr(i): i for i in range(256)} | |
| self.dicionario_decode = {i: chr(i) for i in range(256)} | |
| self.data_encoded = [] | |
| self.data_decoded = [] | |
| self.texto = texto | |
| self.encode() | |
| self.decode() |
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
| from django.__main__ import management | |
| from importlib import * | |
| import os | |
| urlpatterns = """from django.conf.urls import url | |
| from django.contrib import admin | |
| from {pathapp}._views import * |
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 pytesseract as ocr | |
| import numpy as np | |
| import cv2 | |
| from PIL import Image | |
| # tipando a leitura para os canais de ordem RGB | |
| imagem = Image.open('saoluis.jpg').convert('RGB') | |
| # convertendo em um array editável de numpy[x, y, CANALS] |
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 pytesseract as ocr | |
| from PIL import Image | |
| phrase = ocr.image_to_string(Image.open('phrase.jpg'), lang='por') | |
| print(phrase) |
NewerOlder