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
#! /bin/bash | |
n=32 | |
arg=setaf | |
text='Hello World! This is %s %d' | |
_help() | |
{ | |
printf 'usage: %s [--help|-H] [--16] [--256] [-t|--tiny] [--background|-b]\n' "$(basename $0)" | |
exit 0 |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
Copyright (C) 2013-2018 Diego Torres Milano | |
Created on 2018-04-07 by Culebra v15.1.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 python | |
import sys | |
import unittest | |
from lex_bot_tester.aws.alexa.alexaskilltest import AlexaSkillTest | |
verbose = True | |
class GeneratedTests(AlexaSkillTest): | |
def test_book_my_trip_reserve_car(self): |
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
class AlexaSkillManagementClientTests(AlexaSkillTest): | |
def test_crypto_get_price(self): | |
skill_name = 'CryptoSkill' | |
intent = 'GetPrice' | |
coin = 'Bitcoin' | |
conversation = [ | |
{'slot': None, 'text': 'ask Crypto what is the {} price?'.format(coin)}, | |
] | |
simulation_result = self.conversation_text(skill_name, intent, conversation, verbose=verbose) | |
self.assertRegex( |
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
def __plot_dumpsys_meminfo(self, pkg, activity, method=None): | |
self.device.shell("am force-stop %s" % pkg) | |
for n in range(20): | |
if n % 5 == 0: | |
self.device.shell( | |
"run-as %s pgrep -L 10 %s" % (pkg, pkg)) | |
self.device.startActivity("%s/%s" % (pkg, activity)) | |
time.sleep(2) | |
if method: | |
method() |
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
class AlexaSkillManagementClientTests(AlexaSkillTest): | |
def test_book_my_trip_reserve_a_car(self): | |
skill_name = 'BookMyTripSkill' | |
intent = 'BookCar' | |
conversation = [ | |
{'slot': None, 'text': 'ask book my trip to reserve a car'}, | |
{'slot': 'CarType', 'text': 'midsize'}, | |
{'slot': 'PickUpCity', 'text': 'buenos aires'}, | |
{'slot': 'PickUpDate', 'text': 'tomorrow'}, |
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
def test_conversations_text_book_car(self): | |
bot_name = 'BookTrip' | |
bot_alias = 'BookTripLatest' | |
user_id = 'ClientId' | |
conversation_definition = { | |
'BookCar': [ | |
('reserve a car', DialogState.ELICIT_SLOT, {}), | |
('L.A.', DialogState.ELICIT_SLOT, {}), | |
('next week', DialogState.ELICIT_SLOT, {'PickUpDate': RE_WEEK}), | |
('a month from now', DialogState.ELICIT_SLOT, {'ReturnDate': RE_DATE}), |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
Lex Bot Tester | |
Copyright (C) 2017 Diego Torres Milano | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
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 python | |
# -*- coding: utf-8 -*- | |
import re | |
import sys | |
import os | |
try: | |
sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src')) | |
except: |
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/expect -f | |
# | |
# This Expect script was generated by autoexpect on Wed Jun 29 12:07:46 2016 | |
# Expect and autoexpect were both written by Don Libes, NIST. | |
# | |
# Note that autoexpect does not guarantee a working script. It | |
# necessarily has to guess about certain things. Two reasons a script | |
# might fail are: | |
# | |
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet, |
NewerOlder