Skip to content

Instantly share code, notes, and snippets.

View theofanislekkas's full-sized avatar

Theo Lekkas theofanislekkas

View GitHub Profile
@dannguyen
dannguyen / README.md
Last active July 29, 2025 14:26
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data

Using Python 3 + Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs

@vasanthk
vasanthk / System Design.md
Last active November 12, 2025 03:13
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@bishboria
bishboria / springer-free-maths-books.md
Last active September 25, 2025 06:28
Springer made a bunch of books available for free, these were the direct links
@kristopolous
kristopolous / hn_seach.js
Last active November 12, 2025 07:49
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@mathisonian
mathisonian / index.md
Last active August 10, 2024 20:59
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

@vietjtnguyen
vietjtnguyen / logistic-regression.ipynb
Last active January 4, 2021 10:08
IPython Notebook on Logistic Regression
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 12, 2025 23:04
A badass list of frontend development resources I collected over time.
@econchick
econchick / gist:4666413
Last active December 22, 2023 13:32
Python implementation of Dijkstra's Algorithm
class Graph:
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
self.nodes.add(value)
def add_edge(self, from_node, to_node, distance):
Module 1, Introduction to Matter, Energy, and Direct Current, introduces the course with a short history
of electricity and electronics and proceeds into the characteristics of matter, energy, and direct current
(dc). It also describes some of the general safety precautions and first-aid procedures that should be
common knowledge for a person working in the field of electricity. Related safety hints are located
throughout the rest of the series, as well.
Module 2, Introduction to Alternating Current and Transformers, is an introduction to alternating current
(ac) and transformers, including basic ac theory and fundamentals of electromagnetism, inductance,
capacitance, impedance, and transformers.