Skip to content

Instantly share code, notes, and snippets.

@yodakohl
yodakohl / main.py
Created July 10, 2018 05:50
Octolapse timelapse with a Nikon D3300 triggered by MQTT messages via USB
#!/usr/bin/env python
import os
import paho.mqtt.client as mqtt
def on_connect(client, userdata, flags, rc):
print("Connected with result code " + str(rc))
client.subscribe("octoprint/#")
def on_message(client, userdata, msg):
#
# Copyright 2018 Picovoice Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@yodakohl
yodakohl / main.py
Created July 14, 2017 17:37
Add snowboy trigger to Google Voice Assistant
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@yodakohl
yodakohl / snowboy.py
Created July 14, 2017 17:35
Snowboy trigger
# limitations under the License.
"""Detect keywords in the audio stream."""
import logging
import numpy as np
import triggers.snowboydetect
import os
from triggers.trigger import Trigger