Skip to content

Instantly share code, notes, and snippets.

View ultrasounder's full-sized avatar
🏠
Working from home

Ananth Sounder ultrasounder

🏠
Working from home
View GitHub Profile
@ultrasounder
ultrasounder / gist:921ac5815e06707587d64faa3d2a6273
Created August 5, 2025 03:22
Example (Binary Semaphore):
// Event structure definition
typedef struct {
uint8_t event_type;
uint16_t sensor_value;
// Add other relevant data
} system_event_t;
// Global queue handle
QueueHandle_t event_queue;
@ultrasounder
ultrasounder / gist:46ae20e028ee7cd7b7193deef7fad144
Created August 5, 2025 03:21
Example (using FreeRTOS concepts)
// Event structure definition
typedef struct {
uint8_t event_type;
uint16_t sensor_value;
// Add other relevant data
} system_event_t;
// Global queue handle
QueueHandle_t event_queue;
@ultrasounder
ultrasounder / falsehoods-programming-time-list.md
Created July 21, 2025 13:21 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
# The Best Medium-Hard Data Analyst SQL Interview Questions
By Zachary Thomas ([[email protected]](mailto:[email protected]), [Twitter](https://twitter.com/zach_i_thomas), [LinkedIn](https://www.linkedin.com/in/thomaszi/))
**Tip: **See the Table of Contents (document outline) by hovering over the vertical line on the right side of the page
## Background & Motivation
> The first 70% of SQL is pretty straightforward but the remaining 30% can be pretty tricky.
@ultrasounder
ultrasounder / .eslintrc.js
Created April 29, 2024 15:01 — forked from adrianhall/.eslintrc.js
A sample .eslintrc file
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
@ultrasounder
ultrasounder / transcribe.py
Created March 19, 2024 14:39 — forked from patrick-samy/transcribe.py
Split large audio file and transcribe it using the Whisper API from OpenAI
import os
import sys
import openai
import os.path
from dotenv import load_dotenv
from pydub import AudioSegment
load_dotenv()
openai.api_key = os.getenv('OPENAI_API_KEY')
@ultrasounder
ultrasounder / normcore-llm.md
Created March 2, 2024 03:38 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@ultrasounder
ultrasounder / list.md
Created November 30, 2023 06:48 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@ultrasounder
ultrasounder / vision.py
Created November 22, 2023 16:58 — forked from RhetTbull/vision.py
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images """
import pathlib
import Quartz
import Vision
from Cocoa import NSURL
from Foundation import NSDictionary
# needed to capture system-level stderr
from wurlitzer import pipes
@ultrasounder
ultrasounder / README.md
Created October 25, 2023 20:03 — forked from dannguyen/README.md
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