This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, []], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<style> | |
div { | |
display: block; | |
float: left; | |
} | |
</style> | |
<script> | |
var N = 12; // nº of divisions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html><html><head><meta charset="utf-8"> | |
<!-- obtener alguna fuente @font-face ... en este caso "Noto Sans SC" --> | |
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet"> | |
<style> | |
/* donde sea usar esta fuente (puede añadirse a la lista de font-families del root) */ | |
.chino { | |
font-family: "Noto Sans SC"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Info de descarga en: | |
https://www.boe.es/datosabiertos/ | |
Para bajar todo desde enero de 2009 por ejemplo: | |
for y in `seq 2009 2020` | |
do | |
for m in 01 02 03 04 05 06 07 08 09 10 11 12 | |
do |
NewerOlder