This file contains hidden or 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 errno | |
import logging | |
import os | |
from datetime import datetime | |
from pathlib import Path | |
import paho.mqtt.client as mqtt | |
import paho.mqtt.publish as publish | |
# Create utils specific fallback logger for Debugging debug mode |
This file contains hidden or 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 errno | |
import html | |
import logging | |
import os | |
import platform | |
import re | |
import socket | |
import subprocess | |
import time | |
from datetime import datetime |
This file contains hidden or 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 os | |
import time | |
from selenium.common import TimeoutException | |
from selenium.webdriver import ActionChains | |
from selenium.webdriver.remote.webelement import WebElement | |
from selenium.webdriver.support import expected_conditions as expect | |
from selenium.webdriver.support.wait import WebDriverWait | |
#import testKitUtils |
This file contains hidden or 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 subprocess | |
def set_variable_from_mqtt_topic(name: str, awsip: str, awsport: str, topic: str) -> str: | |
""" | |
Subscribes to the specified MQTT topic and sets the value of the variable with the specified name to the value | |
received from the topic. | |
""" | |
# Replace any equals signs in the name with colons | |
name = name.replace("=", ":") |
This file contains hidden or 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 sqlite3 | |
def store_data(device, version, results_url, ticket_key, timestamp, test_name, test_config): | |
conn = sqlite3.connect('tests.db') | |
c = conn.cursor() | |
c.execute('CREATE TABLE IF NOT EXISTS tests (device text, version text, results_url text, ticket_key text, timestamp text, test_name text, test_config text)') | |
c.execute('INSERT INTO tests (device, version, results_url, ticket_key, timestamp, test_name, test_config) VALUES (?, ?, ?, ?, ?, ?, ?)', (device, version, results_url, ticket_key, timestamp, test_name, test_config)) | |
conn.commit() |
This file contains hidden or 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 selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
# Start a new webdriver instance | |
driver = webdriver.Firefox() | |
# Navigate to the page with the text field | |
driver.get('http://www.example.com/chatgpt') | |
# Find the text field element on the page |
This file contains hidden or 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 os | |
import subprocess | |
def subscribe_to_mqtt_topic( | |
topic: str, path: str, awsip: str=os.getenv("AWSIP"), | |
awsport: str=os.getenv("AWSPORT")) -> str: | |
""" | |
Subscribes to the MQTT topic with the specified name and writes the received messages to a file with the same name. | |
Returns the file path of the created file. | |
""" |
This file contains hidden or 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
@echo off | |
echo Installing Apache Maven... | |
rem Set the Maven version to install | |
set MAVEN_VERSION=3.6.3 | |
rem Set the installation directory for Maven | |
set MAVEN_INSTALL_DIR=C:\Program Files\Apache\maven |
This file contains hidden or 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/sh | |
# Exit immediately if any command returns a non-zero exit code | |
set -e | |
# Check if the current directory is a git repository | |
if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
printf "Error: current directory is not a git repository\n" | |
exit 1 |
This file contains hidden or 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
--------------------------------------------------------------------------------------------- | |
-- LGS_script_template.lua | |
--------------------------------------------------------------------------------------------- | |
-- Version: 2019-04-19 | |
-- Author: Egor Skriptunoff | |
-- | |
-- | |
-- This is a template for "Logitech Gaming Software" script file. | |
-- Four useful features are implemented here: | |
-- |