I hereby claim:
- I am jem-mosig on github.
- I am jem_mosig (https://keybase.io/jem_mosig) on keybase.
- I have a public key ASAnLueCCtiZfcA2CwDEuR0Ix98vVWVD9zKZcn5zTBtEHwo
To claim this, I am signing this object:
(* author: https://github.com/JEM-Mosig *) | |
(* example: CodeCompatibilityData["test.wl"] *) | |
ClearAll[CodeCompatibilityData]; | |
CodeCompatibilityData[wlFile_String] := Module[{str, symbols}, | |
(* read the whole file as a string *) | |
str = ReadString[wlFile]; | |
(* delete all strings in the code *) | |
str = StringDelete[str,"\""~~Shortest[___]~~"\""]; | |
(* delete all comments in the code (unsafe!) *) |
I hereby claim:
To claim this, I am signing this object:
The scripts in this gist generate the animated figures in my blog post mackay_gaussian_2006. You need Wolfram Mathematica 11 or higher to run these scripts. For example,
wolframscript <name>.wls
will generate the figure .png
in the current directory, where `` is the name of the script.
With[{ | |
data = {<|"ID"->1,"Experimenter"->"Nellissa","Outcome"->"DE\[NotEqual]VN","Countries"->{"DE","VN"},"Same"->False,"Comment"->"One is sweet, the other caramelly"|>,<|"ID"->2,"Experimenter"->"Nellissa","Outcome"->"GB\[NotEqual]VN","Countries"->{"GB","VN"},"Same"->False,"Comment"->"One tasts like coffee and sweeter"|>,<|"ID"->3,"Experimenter"->"Nellissa","Outcome"->"DE\[Equal]VN","Countries"->{"DE","VN"},"Same"->True,"Comment"->""|>,<|"ID"->4,"Experimenter"->"Nellissa","Outcome"->"VN\[NotEqual]VN","Countries"->{"VN","VN"},"Same"->False,"Comment"->"One is sweeter"|>,<|"ID"->5,"Experimenter"->"Nellissa","Outcome"->"VN\[Equal]VN","Countries"->{"VN","VN"},"Same"->True,"Comment"->"Terrible"|>,<|"ID"->6,"Experimenter"->"Nellissa","Outcome"->"DE\[Equal]GB","Countries"->{"DE","GB"},"Same"->True,"Comment"->"(?) Tasts the same, peanutty and caramelly"|>,<|"ID"->7,"Experimenter"->"Nellissa","Outcome"->"GB\[NotEqual]VN","Countries"->{"GB","VN"},"Same"->False,"Comment"->"One is too sweet"|>,<|"ID"->8,"Experimenter" |
import numpy as np | |
class SelfOrganizingMap(object): | |
def __init__(self, map_dims, input_dim): | |
self.map_dims = map_dims | |
self.input_dim = input_dim |
#!/bin/bash | |
# Based on: https://stackoverflow.com/a/25180186 | |
function try() | |
{ | |
[[ $- = *e* ]]; SAVED_OPT_E=$? | |
set +e | |
} | |
function throw() |
(rasa-master) jem-mosig:trivia/ (testing✗) $ rasa train core [13:31:03] | |
2020-08-14 13:31:16 ERROR pykwalify.core - validation.invalid | |
2020-08-14 13:31:16 ERROR pykwalify.core - --- All found errors --- | |
2020-08-14 13:31:16 ERROR pykwalify.core - ["Cannot find required key 'intent'. Path: '/rules/2/steps/2'", "Key 'form' was not defined. Path: '/rules/2/steps/2'", "Key 'form' was not defined. Path: '/rules/2/steps/2'", "Key 'form' was not defined. Path: '/rules/2/steps/2'", "Key 'form' was not defined. Path: '/rules/2/steps/2'", "Cannot find required key 'intent'. Path: '/rules/3/steps/2'", "Key 'form' was not defined. Path: '/rules/3/steps/2'", "Key 'form' was not defined. Path: '/rules/3/steps/2'", "Key 'form' was not defined. Path: '/rules/3/steps/2'", "Key 'form' was not defined. Path: '/rules/3/steps/2'", "Key 'form' was not defined. Path: '/rules/4/condition/0'", "Key 'form' was not defined. Path: '/rules/4/condition/0'", "Cannot find required key 'intent'. Path: '/rule |
import tensorflow as tf | |
from tensorflow import Tensor, TensorShape | |
from typing import Union | |
def pad_right( | |
x: Tensor, target_shape: TensorShape, value: Union[int, float] = 0 | |
) -> Tensor: | |
"""Creates a tensor of shape `target_shape` by padding it with `value` on the right. | |
You can access diagnostic data for DIET like this (please define the YOUR_RASA_MODEL_DIRECTORY
and YOUR_RASA_MODEL_NAME
constants):
from rasa.cli.utils import get_validated_path
from rasa.model import get_model, get_model_subdirectories
from rasa.nlu.model import Interpreter
from rasa.shared.nlu.training_data.message import Message
from rasa.shared.nlu.constants import TEXT
from rasa.shared.constants import DIAGNOSTIC_DATA
import pathlib