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
# How to upgrade Porcupine 1.9.x installed by Rhasspy 2.5.11 DEB to version 2.x | |
sudo su - | |
# Install Rhasspy 2.5.11 (replace "armel" with your architecture if needed) | |
wget https://github.com/rhasspy/rhasspy/releases/download/v2.5.11/rhasspy_armel.deb | |
dpkg -i rhasspy_armel.deb | |
# If you have Rhasspy already installed, just stop it. | |
systemctl stop rhasspy |
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
This patch makes Rhasspy v2.5.11 work with Porcupine version 2.x (i.e. the version supporting | |
newly generated time-unlimited free-tier wake words). | |
Based on Sturi2011's instructions. | |
--- usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/defaults.json.orig 2022-11-11 16:55:04.320481943 +0100 | |
+++ usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/defaults.json 2022-11-11 16:57:20.668415989 +0100 | |
@@ -438,7 +438,8 @@ | |
"compatible": true, | |
"keyword_path": "porcupine.ppn", |
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
# This is an example of metaprogramming in the Elixir language. | |
# | |
# We will define a domain specific language (DSL) for the definition | |
# of a service which is watched by several sensors. | |
# Each sensor watches some property/functionality of the service and | |
# returns the result of the check. | |
# | |
# To determine if the service is functioning properly, we need functions | |
# to run all the sensors' code and gather the returned data. | |
# |
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
/* | |
Simple OpenSCAD DIN rail clip. | |
*/ | |
module clip(z = 6) { | |
a = 7; | |
b = 1.2; // metal sheet thickness, should be ~ 1 | |
c = 2.5; |
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
// "High availability" blinker demo. | |
// | |
// Uses a remote blinker if accessible, local blinker otherwise. | |
// | |
// "Producer" device: | |
// | |
// `ha_blinker` sends a message (desired number of blinks) to one of the | |
// channels from the `channels` array. The first channel is a remote (CAN) | |
// blinker, the second is a local blinker => if the remote blinker fails, local | |
// blinker is used as a failover. |
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
#include <Arduino.h> | |
#include "csp.h" | |
#define LED1_PIN LED_BUILTIN | |
#define BLINK_DELAY_MS 100 | |
void blink_led1(task_data_t data) { | |
uint32_t state = (uint32_t)data; | |
digitalWrite(LED1_PIN, state); |
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
#! /usr/bin/env python2 | |
""" | |
encfs-agent | |
Mounts encfs filesystems with passwords generated using private keys stored in ssh-agent. | |
You can have any number of encrypted filesystems ("vaults") under VAULTS_DIR. Password for | |
each of them is derived from its name and given private key stored in ssh-agent. | |
You can use ssh-askpass for ssh-agent if you want. |
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
# Simplest possible actor - just prints received messages. | |
defmodule SimplestActor do | |
def run() do | |
receive do | |
{from, msg} -> | |
IO.puts("[SimplestActor] Got message from #{inspect(from)}: #{inspect(msg)}") | |
end | |
run() | |
end |
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
import asyncio | |
import asyncio.futures | |
import logging | |
import aiojobs | |
logging.basicConfig(format='[%(levelname)-7s] %(message)s', level=logging.DEBUG) | |
logger = logging.getLogger(__name__) | |
class Nursery: |
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
# OpenCL in R example | |
# | |
# Kernel "gpu.sum" sums two vectors. | |
# | |
# Please note that in R OpenCL library: | |
# | |
# 1. the first argument must be the output vector | |
# 2. the second argument must be the length of the output | |
# 3. you must convert the input vectors to the right type ("as.double" here) | |
# |
NewerOlder