Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am szuuuken on github.
  • I am szuuuken (https://keybase.io/szuuuken) on keybase.
  • I have a public key ASBPUSmf6azWDogLxB125QeO1w7uXCbRMkDEiciuh0AlIwo

To claim this, I am signing this object:

@Szuuuken
Szuuuken / identifyFont.py
Last active March 22, 2019 21:42
identify the font of each symbol in an image
# pyhton lib https://github.com/sirfz/tesserocr
# based on the libs example 'Iterator over the classifier choices for a single symbol' - https://github.com/sirfz/tesserocr#iterator-over-the-classifier-choices-for-a-single-symbol
from tesserocr import PyTessBaseAPI, RIL, iterate_level
def get_font(image_path):
with PyTessBaseAPI() as api:
api.SetImageFile(image_path)
api.Recognize()
ri = api.GetIterator()
@Szuuuken
Szuuuken / iglewicz_hoaglin.py
Last active April 28, 2018 16:13
Iglewicz and Hoaglin outlier test (modified Z-score test)
# based on:
# * https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm
# * http://colingorrie.github.io/outlier-detection.html#modified-z-score-method
# * http://contchart.com/outliers.aspx
# * https://stats.stackexchange.com/questions/339932/iglewicz-and-hoaglin-outlier-test-with-modified-z-scores-what-should-i-do-if-t
def calc_median(data):
result = 0.0
length = len(data)