Skip to content

Instantly share code, notes, and snippets.

View A2va's full-sized avatar

A2va

  • Switzerland
  • 20:23 (UTC +02:00)
View GitHub Profile
@A2va
A2va / easyocr.cpp
Last active April 10, 2024 09:55
An implementation of https://github.com/JaidedAI/EasyOCR in C++ with an ONNX model
// MIT License
// Copyright (c) 2024 A2va
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
import argparse
import glob
import os
import random
from urllib.parse import urlparse
import numpy as np
import torch
from PIL import Image
from torchvision import transforms
@A2va
A2va / chromecast-compatible.ps1
Created January 19, 2022 18:19
Convert media file to a chromecast compatible
# PowerShell version 7 and higher, the default intalled on Windows is 5.1
# https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.1
# on Windows Terminal a profiles for PowerShell 7 is directly created.
# ffmpeg and ffprobe must be on PATH.
<#
.DESCRIPTION
Convert a media file to format compatible with chromecast.
PowerShell version 7 and higher is needed, the default intalled on Windows is 5.1.
.PARAMETER i
@A2va
A2va / enable_modification.py
Last active November 2, 2021 21:05
Enable modification of all word document into the actual path
import os
import zipfile
import tempfile
import shutil
folder = 'path/to/folder'
for dirpath, dirnames, filenames in os.walk(folder):
for filename in [f for f in filenames if f.endswith(".docx")]:
full_path = os.path.join(dirpath, filename)
; Plug-in: SmoothZoom
; Author: A2va
; Version: 1.0
; Date: 28.02.2020
; Tested with: GIMP 2.10
;This program is free software: you can redistribute it and/or modify
;it under the terms of the GNU General Public License as published by
;the Free Software Foundation, either version 3 of the License, or
;(at your option) any later version.
#!/usr/bin/env python
# Plug-in: SmoothZoom
# Author: A2va
# Version: 1.0
# Date: 28.02.2020
# Tested with: GIMP 2.10
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
scoreboard players set Rand Spreadplayers 0
#Set Center
scoreboard players set CenterX Spreadplayers 0
scoreboard players set CenterZ Spreadplayers 0
#Set Radius
scoreboard players set Radius Spreadplayers 1000
scoreboard players set Radius2 Spreadplayers 0
scoreboard players operation Radius2 Spreadplayers = Radius Spreadplayers
scoreboard players operation Radius2 Spreadplayers *= #2 Spreadplayers