From 9d6fc72d20e28fb75a78d5d6d2a55a0b7ec6c00d Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Fri, 20 Nov 2020 18:42:50 +0100 Subject: [PATCH] rfct: reorganize imports some more --- .gitignore | 1 + sbb_newspapers_org_image/eynollah.py | 17 ++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index c14b1f1..57e34df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.egg-info __pycache__ +sbb_newspapers_org_image/pylint.log diff --git a/sbb_newspapers_org_image/eynollah.py b/sbb_newspapers_org_image/eynollah.py index e6d7c66..35f32b1 100644 --- a/sbb_newspapers_org_image/eynollah.py +++ b/sbb_newspapers_org_image/eynollah.py @@ -1,5 +1,9 @@ #! /usr/bin/env python3 +""" +tool to extract table form data from alto xml data +""" + import gc import math import os @@ -15,16 +19,16 @@ import numpy as np import matplotlib.pyplot as plt import seaborn as sns -environ["TF_CPP_MIN_LOG_LEVEL"] = "3" +os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" stderr = sys.stderr -sys.stderr = open(devnull, "w") +sys.stderr = open(os.devnull, "w") from keras import backend as K from keras.models import load_model - sys.stderr = stderr import tensorflow as tf - tf.get_logger().setLevel("ERROR") +warnings.filterwarnings("ignore") + from scipy.signal import find_peaks from scipy.ndimage import gaussian_filter1d from shapely import geometry @@ -34,11 +38,6 @@ from matplotlib import pyplot, transforms import matplotlib.patches as mpatches import imutils -warnings.filterwarnings("ignore") -# -__doc__ = """ - tool to extract table form data from alto xml data - """ class eynollah: