This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from naoqi import ALBroker | |
from naoqi import ALProxy | |
from pprint import pprint | |
# start a local broker that connects to the NAO | |
robot_ip = "love" | |
myBroker = ALBroker("myBroker", "0.0.0.0", 0, robot_ip, 9559) | |
# get a handle to the module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from naoqi import ALBroker | |
from naoqi import ALProxy | |
from pprint import pprint | |
# start a local broker that connects to the NAO | |
robot_ip = "your-ip-here" | |
myBroker = ALBroker("myBroker", "0.0.0.0", 0, robot_ip, 9559) | |
# get a handle to the module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from naoqi import ALBroker | |
from naoqi import ALProxy | |
# start a local broker that connects to the NAO | |
robot_ip = "your-ip-here" | |
myBroker = ALBroker("myBroker", "0.0.0.0", 0, robot_ip, 9559) | |
# get a handle to the module | |
posture_proxy = ALProxy("ALRobotPosture") | |
tts_proxy = ALProxy("ALTextToSpeech") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS_ACCESS_KEY_ID = "YOUR KEY ID HERE" | |
AWS_SECRET_ACCESS_KEY = "YOUR SECRET KEY HERE" | |
USE_SANDBOX = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Redirecting to the Survey ...</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ req ] | |
default_bits = 2048 | |
distinguished_name = req_distinguished_name | |
x509_extensions = v3_ca # The extentions to add to the self signed cert | |
string_mask = utf8only | |
[ req_distinguished_name ] | |
countryName = Country Name (2 letter code) | |
countryName_default = AU | |
countryName_min = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Python3 | |
import logging | |
from argparse import ArgumentParser | |
from os import remove | |
from os.path import exists | |
from re import sub | |
from time import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Python3 | |
# | |
# Run from command line | |
# | |
import logging | |
from argparse import ArgumentParser | |
from copy import deepcopy, copy | |
from datetime import timedelta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def trouble_sort(L): | |
# in place sorting | |
done = False | |
while not done: | |
done = True | |
for idx in range(len(L) - 2): | |
if L[idx] > L[idx + 2]: | |
done = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
import sys | |
def get_damage(sequence): | |
current_strength = 1 | |
damage = 0 | |
for char in sequence: | |
if char == "C": | |
current_strength *= 2 |