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 itertools import combinations | |
from operator import itemgetter | |
def getroundrobinmatches(participants): | |
rounds = participants-1 if participants%2 == 0 else participants | |
data = list(range(1,participants+1)) | |
comb = combinations(data, 2) |
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
# this will create archive files | |
python setup.py sdist | |
# install twine | |
pip install twine | |
# https://test.pypi.org | |
twine upload --repository-url https://test.pypi.org/legacy/ dist/* | |
# https://pypi.org | |
twine upload dist/* |
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 smtplib | |
""" | |
SMTP Server Information | |
1. Gmail.com: smtp.gmail.com:587 | |
2. Outlook.com: smtp-mail.outlook.com:587 | |
3. Office 365: outlook.office365.com | |
Please verify your SMTP settings info. | |
""" | |
FROM = "YOUR EMAIL ID" |
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 click | |
from pathlib import Path | |
import pdfplumber | |
import pandas as pd | |
from pandas import ExcelWriter | |
def to_excel(path, output_path): | |
with pdfplumber.open(path) as pdf: | |
data = [] |
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 json | |
from pdfminer.pdfparser import PDFParser | |
from pdfminer.pdfdocument import PDFDocument | |
from pdfminer.pdftypes import resolve1 | |
fp = open(PDF_FILE_PATH, 'rb') | |
parser = PDFParser(fp) | |
doc = PDFDocument(parser) | |
print(doc) |
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 PIL import Image | |
import numpy as np | |
import pytesseract | |
# pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" | |
original = Image.open(IMAGE_PATH) | |
#original.show() | |
img = np.array(original) |
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 time | |
import os | |
import shutil | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
class StartMonitor(FileSystemEventHandler): | |
def __init__(self, monitor_path, move_path): |
NewerOlder