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
try: | |
from PIL import Image | |
except ImportError: | |
import Image | |
import pytesseract | |
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe" | |
def ocr_core(filename): | |
""" |
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 datetime import datetime | |
from time import sleep | |
from socket import gethostbyname, gaierror | |
from os import system | |
def check_connection(): | |
try: | |
gethostbyname("www.google.com") | |
return True | |
except gaierror: |
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
#!/bin/sh | |
DOCDIR="./doc/" | |
FILESTOTRANSLATE="doc/en_US.ISO8859-1" | |
DATAFILE="./translation-status.csv" | |
LANGPARAM="$1" | |
# commands | |
AWK="/usr/bin/awk" | |
BASENAME="/usr/bin/basename" | |
CUT="/usr/bin/cut" |
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 urllib import request | |
totalMesas = 9044 | |
baseUrlForMesa = "https://apielecciones.buenosaires.gob.ar/api/mesa?id=" | |
fileName = "mesas_elecciones.txt" | |
with open(fileName, encoding="utf-8", mode="w") as file: | |
for i in range(totalMesas): | |
f = request.urlopen(baseUrlForMesa + str(i+1)) |