Skip to content

Instantly share code, notes, and snippets.

View caponetto's full-sized avatar

Guilherme Caponetto caponetto

View GitHub Profile
@caponetto
caponetto / README.md
Created October 25, 2022 10:01
Untitled Folder

This Gist was created from KIE Sandbox.

This file is temporary and you should not be seeing it. If you are, it means that creating this Gist failed and it can safely be deleted.

@caponetto
caponetto / publish.yml
Created January 10, 2022 14:33
Teachable Machine Playground (publish.yml - deploy)
# Your OpenShift information goes here
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }}
OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }}
OPENSHIFT_NAMESPACE: "caponetto-dev"
@caponetto
caponetto / publish.yml
Last active January 10, 2022 14:34
Teachable Machine Playground (publish.yml - push image)
# Your image details customization goes here
IMAGE_NAME: "teachable-machine-playground"
IMAGE_TAG: "latest"
IMAGE_REGISTRY: "quay.io/caponetto"
REGISTRY_USER: "caponetto"
@caponetto
caponetto / App.tsx
Created January 10, 2022 14:32
Teachable Machine Playground (App.tsx)
export function App() {
return (
<HashRouter>
<AppProvider>
<Routes>
<Route path={routes.nav.root.path} element={<Navigate to={routes.nav.home.path} />} />
<Route path={routes.nav.home.path} element={<HomePage />} />
<Route path={routes.nav.nbd.path} element={<NailBitingDetectorPage />} />
{/* Your new route goes here */}
<Route path="*" element={<Navigate to={routes.nav.home.path} />} />
@caponetto
caponetto / NailBitingDetectorPage.tsx
Created January 10, 2022 14:31
Teachable Machine Playground (NailBitingDetectorPage.tsx)
export function NailBitingDetectorPage() {
const MESSAGE_STOP = "STOP IT!";
const { notify } = useNotification();
const [play] = useSound(routes.sounds.alert);
const [detected, setDetected] = useState(false);
// Load the model
const { isModelLoaded, predictClass } = useModel(NAIL_BITING_DETECTOR_MODEL);
@caponetto
caponetto / Model.tsx
Created January 10, 2022 14:30
Teachable Machine Playground (Model.tsx)
export const NAIL_BITING_DETECTOR_MODEL: Readonly<ModelDescriptor> = {
name: "nail-biting-detector",
classes: ["normal", "nail-biting"],
modelJson: routes.models.nbd.modelJson,
metadataJson: routes.models.nbd.metadataJson,
};
// You new model goes here
@caponetto
caponetto / Routes.tsx
Created January 10, 2022 14:28
Teachable Machine Playground (Routes.tsx)
export const routes = {
nav: {
root: { path: "/", name: "" },
home: { path: "/home", name: "Home" },
nbd: { path: "/nail-biting-detector", name: "Nail-Biting Detector" },
// Your new route goes here
},
images: {
robot: "/static/images/robot.png",
@caponetto
caponetto / Untitled.bpmn
Last active November 19, 2021 17:59
Untitled Folder
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi" id="_Ma6csCuQEDqEDvd0qqUguA" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="Untitled" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="Untitled" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_14BD9836-0A40-407F-89CF-2156BDABCAF9" sourceRef="_F3DCD923-1A72-4D82-8BB4-9A6FA4B7D115" targetRef="_D03D9791-7DE9
@caponetto
caponetto / TestProcess.bpmn
Last active November 19, 2021 17:57
Untitled Folder
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi" id="_Cl3qMCuQEDqbOehe6TlnSA" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="Untitled" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="Untitled" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_2C31A93F-81BF-41B6-8D53-91F4EC98DFB7" sourceRef="_466045AF-71FE-45A6-B961-4CEEEADC3BC0" targetRef="_08E7DFEE-C1C7
@caponetto
caponetto / Untitled.dmn
Last active November 19, 2021 17:53
Untitled Folder
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_5F105520-F922-4E8C-AE62-1FE447F7C14F" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_D8ABA1CA-CABE-46D4-BD7C-10489CFFA36A" name="Untitled" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_5F105520-F922-4E8C-AE62-1FE447F7C14F">
<dmn:extensionElements/>
<dmn:inputData id="_88DC9CD3-CE6B-4432-BD30-D12E02217D2C" name="InputData-1">
<dmn:extensionElements/>
<dmn:variable id="_8DB90897-11EE-41C3-842D-CB5DB17A2A00" name="InputData-1"/>
</dmn:inputData>
<dmn:knowledgeSource id="_7E91FD7A-2D31-420D-893C-0E8B80F3688F" name="KnowledgeSource-1" locationURI="">
<dmn:extensionElements/>
<dmn:type/>
</dmn:knowledgeSource>