Skip to content

Instantly share code, notes, and snippets.

#include "whisper.h"
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <filesystem>
#include <thread>
#include <chrono>
#include <regex>
@josejuan
josejuan / check.py
Created March 18, 2025 14:41
scrabble regex generator
import re
import sys
def main():
with open('scrabble.regex', 'r') as f:
pattern = f.read().strip()
regex = re.compile(pattern)
for word in sys.stdin:
word = word.strip()
if regex.match(word):
public interface IService {}
public class ServiceA : IService {}
public class ServiceB : IService {}
// In your Startup.cs or ConfigureServices method
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IService, ServiceA>();
}
xs = [
[0, 0, 1, 0, []],
[0, 2, 2, 0, []],
[0, 5, 1, 0, []],
[1, 3, 2, 0, []],
[1, 6, 2, 0, []],
[2, 0, 3, 0, []],
[2, 2, 2, 0, []],
[2, 4, 2, 0, []],
[3, 1, 1, 0, []],
instalar tal cual jetson-voice ( https://github.com/dusty-nv/jetson-voice )
aquí están los paquetes para pytorch y tensorflow compatibles con el jetpack 4.6.1
https://developer.download.nvidia.com/compute/redist/jp/v461/tensorflow/
actualiza pip tanto como se pueda
# pip install --upgrade pip
# python mic.py --access_key ${ACCESS_KEY} --keywords picovoice
from datetime import datetime
from pvrecorder import PvRecorder
from threading import Thread
import argparse
from gtts import gTTS
import array
import os
import io
import re
/*
The following function
public static long rand(int min, int max) {
return (System.nanoTime()%(max-min)) + min;
}
does not generate random numbers with a known distribution;
the properties (randomness) of the output depend on factors that modify it.
/*
PHP <8.1 does not support
https://unicode-org.github.io/icu/userguide/format_parse/datetime/index#datetimepatterngenerator
*/
package com.computermind.sandbox.icu;
import com.ibm.icu.text.DateTimePatternGenerator;
<!DOCTYPE html>
<html>
<style>
div {
display: block;
float: left;
}
</style>
<script>
var N = 12; // nº of divisions
package org.testing;
import java.util.List;
import java.util.stream.IntStream;
import static java.util.stream.Collectors.counting;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.toList;
public class Test {