Skip to content

Instantly share code, notes, and snippets.

View mathigatti's full-sized avatar

Mathias Gatti mathigatti

View GitHub Profile
@tagplus5
tagplus5 / imageToText.gs
Created December 18, 2015 18:02
google apps script image to text ocr
function doGet(request) {
if (request.parameters.url != undefined && request.parameters.url != "") {
var imageBlob = UrlFetchApp.fetch(request.parameters.url).getBlob();
var resource = {
title: imageBlob.getName(),
mimeType: imageBlob.getContentType()
};
var options = {
ocr: true
};
@rougier
rougier / fractal-dimension.py
Last active October 18, 2023 12:37
Fractal dimension computing
# -----------------------------------------------------------------------------
# From https://en.wikipedia.org/wiki/Minkowski–Bouligand_dimension:
#
# In fractal geometry, the Minkowski–Bouligand dimension, also known as
# Minkowski dimension or box-counting dimension, is a way of determining the
# fractal dimension of a set S in a Euclidean space Rn, or more generally in a
# metric space (X, d).
# -----------------------------------------------------------------------------
import scipy.misc
import numpy as np
@keijiro
keijiro / 00_blot7.md
Last active November 2, 2022 08:58
KodeLife fragment shader sketch

gif

@okomarov
okomarov / check_gpu_ram_colab.py
Created July 18, 2018 15:15
Check allocated GPU by Colab
# memory footprint support libraries/code
!ln -sf /opt/bin/nvidia-smi /usr/bin/nvidia-smi
!pip install gputil
!pip install psutil
!pip install humanize
import psutil
import humanize
import os
import GPUtil as GPU
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@c3r38r170
c3r38r170 / spanish-to-ai15-arpabet.js
Last active April 12, 2023 15:09
Convierte texto en español a una aproximación fonética en códigos de CMUdict (derivado de ARPAbet) para poder usar en el sitio web 15.ai .
/*
Sitio del objetivo: https://15.ai
CMUdict: http://www.speech.cs.cmu.edu/cgi-bin/cmudict
Referencia para los equivalentes de CMUdict en español:
https://www.lumenvox.com/knowledgebase/index.php?/article/AA-01086/0/Mexican-Spanish-Phonemes.html
https://www.phon.ucl.ac.uk/home/sampa/spanish.htm
Algoritmo de separación en sílabas: https://github.com/nicofrem/silabajs
Uso:
oracionTo15ai(