- Setup 2 GB swap
- Make sure there's room in /tmp ( > 2 GB)
To be able to use the prebuild wheel of tensorflow python 3.5 is needed.
import json | |
from os.path import join | |
from pathlib import Path | |
import sys | |
TEMPLATE = """ | |
Scenario: {name} | |
Given the skill path "{skill_path}" | |
When the user says "{utterance}" |
#include <stdio.h> | |
#include <string.h> | |
void show_icon(const char *code) | |
{ | |
static char msgHold[31] = {0}; | |
char icon[91]; | |
//Arduinos have a hardcoded limit of 64 bytes for their serial input | |
//buffer. To get around this Mycroft sends large messages as two parts. |
class C: | |
class_var = None | |
def __init__(self): | |
if self.class_var is None: | |
self.class_var = [1] | |
print('Creating new instance') | |
else: | |
print('Appending to existing') | |
self.class_var.append(1) |
import pyaudio | |
pa = pyaudio.PyAudio() | |
print('\n\n\n==========================================\nFound devices:') | |
for device_index in range(pa.get_device_count()): | |
dev = pa.get_device_info_by_index(device_index) | |
if dev['maxInputChannels'] > 0: | |
print('{}: Samplerate {} Channels {}'.format(dev['name'], | |
dev['defaultSampleRate'], | |
dev['maxInputChannels'])) |
import json | |
from adapt.intent import IntentBuilder | |
from adapt.engine import IntentDeterminationEngine | |
from adapt.context import ContextManager | |
engine = IntentDeterminationEngine() | |
context_manager = ContextManager() | |
# define vocabulary |
#!/opt/venvs/mycroft-core/bin/python | |
from mycroft.messagebus.send import send | |
send('mycroft.wifi.start') | |
print("""===================================================================== | |
Wifi setup has begun. Use your phone, tablet or laptop to connect to | |
the network 'MYCROFT' using the password '12345678'. Once connected | |
browse to 'https://start.mycroft.ai', then follow the prompts to | |
complete the setup. | |
===================================================================== |
from adapt.intent import IntentBuilder | |
from adapt.engine import IntentDeterminationEngine | |
def check_for_location(intent): | |
if 'Location' in intent: | |
print('Location: {}'.format(intent['Location'])) | |
else: | |
print('Location: Not found') | |
from adapt.intent import IntentBuilder | |
from adapt.engine import IntentDeterminationEngine | |
def check_for_location(intent): | |
if 'Location' in intent: | |
print('Location: {}'.format(intent['Location'])) | |
else: | |
print('Location: Not found') |
from zeroconf import ServiceBrowser, Zeroconf | |
class MycroftListener(object): | |
def __init__(self): | |
self.devices = {} | |
def remove_service(self, zeroconf, type, name): | |
print("Service %s removed" % (name,)) | |
self.devices.pop(name) |