Skip to content

Instantly share code, notes, and snippets.

@rgstephens
rgstephens / PartitionKeyGenerators.ts
Created August 22, 2018 14:53
PartitionKeyGenerators.ts
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
@rgstephens
rgstephens / AskSdkUtils.ts
Created August 22, 2018 14:54
AskSdkUtils.ts
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
@rgstephens
rgstephens / PersistenceAdapter.ts
Created August 22, 2018 14:55
PersistenceAdapter.ts
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
@rgstephens
rgstephens / calendar.js
Created January 21, 2019 14:49
MagicMirror calendar.js with changes for instances
/* global Module */
/* Magic Mirror
* Module: Calendar
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*/
Module.register("calendar", {
@rgstephens
rgstephens / rasaxupdate.sh
Last active September 5, 2019 16:15
Rasa X Update Script
#!/bin/bash
UPDATE_SCRIPT="do_update.sh"
ENV="${RASA_HOME}/.env"
TMP_PLAYBOOK="/tmp/playbook.yml"
TMP_COMPOSE="/tmp/compose.yml"
rm ${TMP_PLAYBOOK}
rm ${TMP_COMPOSE}
wget -qO ${TMP_PLAYBOOK} https://storage.googleapis.com/rasa-x-releases/stable/rasa_x_playbook.yml
wget -O ${TMP_COMPOSE} https://storage.googleapis.com/rasa-x-releases/stable/docker-compose.ce.yml
echo \#\!/bin/bash > ${UPDATE_SCRIPT}
@rgstephens
rgstephens / use_featurizer.py
Last active May 18, 2021 12:47
Rasa featurizer for Universal Sentence Encoder
from rasa_nlu.featurizers import Featurizer
import tensorflow_hub as hub
import tensorflow as tf
import logging
logger = logging.getLogger(__name__)
class UniversalSentenceEncoderFeaturizer(Featurizer):
"""Appends a universal sentence encoding to the message's text_features."""
@rgstephens
rgstephens / install_rasa.sh
Last active January 8, 2025 15:27
Install Rasa on Raspberry Pi
# Update the Raspberry Pi
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
# Install initial build dependencies
# Provides
# Enables pip3.6 to access pypi
sudo apt-get install libbz2-dev libssl-dev -y
@rgstephens
rgstephens / Dockerfile
Last active January 30, 2020 02:01
rasaPi Dockerfile
FROM debian:buster
RUN echo `date`
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
libbz2-dev \
libssl-dev \
xz-utils \
wget \
@rgstephens
rgstephens / docker-compose.yml
Last active December 4, 2019 00:12
Docker compose for Rasa X
# endpoints.yml
# action_endpoint:
# url: "http://app:5055/webhook"
version: "3.4"
services:
duckling:
restart: always
image: "rasa/duckling:latest"
ports:
@rgstephens
rgstephens / adlists.list
Last active October 22, 2023 12:29
Pi-Hole /etc/pihole/adlists.list - https://firebog.net/
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
https://hosts-file.net/grm.txt
https://reddestdream.github.io/Projects/MinimalHosts/etc/MinimalHostsBlocker/minimalhosts
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/KADhosts/hosts
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Spam/hosts