Skip to content

Instantly share code, notes, and snippets.

@davit312
davit312 / armascii-unicode.py
Created July 18, 2023 17:53
armascii to unicode
import sys
map = dict()
map[162] = "—"
map[163] = ":"
map[164] = ")"
map[165] = "("
map[166] = "»"
map[167] = "«"
map[168] = "և"
@davit312
davit312 / win_reader.pyw
Last active January 3, 2024 11:20
Windows text reader
import tkinter as tk
from tkinter import ttk
from threading import Thread
import subprocess
import time
import os
import pyclip
@davit312
davit312 / piper-run.sh
Last active August 19, 2024 04:07
Frontend for piper-tts
#!/usr/bin/env bash
# This model has high quality voice and proccessing time is small
FAVORITE_MODEL="en_US-ryan-low.onnx"
if [[ "$1" == "-h" ]]; then
echo -e "
@davit312
davit312 / orc.txt
Created August 24, 2024 14:06
Local ORC with docker, (it includes Aremenian too)
# Run ORC on local host with docker
# Download https://github.com/tesseract-ocr/tessdata_best for best quality
# Use -l hye+eng+rus to read Armenian and other languages
# And download tessconfigs, it is a link in repo as @tessconfigs
IMAGE_FULL_PATH=
docker run -it --rm \
-v /path/to/tessdata_best:/usr/local/share/tessdata/ \
-v $IMAGE_FULL_PATH:/tmp/img \
@davit312
davit312 / massindex.go
Created July 18, 2025 14:48
Մարմնի զանգվածի ինդեքսի հաշվիչ
package main
import "fmt"
func main() {
var (
height float32
weight float32
index float32
)
# --- Stage 1: The Builder ---
FROM python:3.12-trixie AS builder
WORKDIR /app
# Install build-time dependencies
RUN apt update && apt install -y \
lsb-release git cmake curl
# Clone and patch the code