text
stringlengths
2
999k
#@ {VER(>=8.0.11)} # Plain replicaset setup test, use as a template for other tests that check # a specific feature/aspect across the whole API #@<> Setup testutil.deploy_raw_sandbox(port=__mysql_sandbox_port1, rootpass="root") testutil.snapshot_sandbox_conf(port=__mysql_sandbox_port1) testutil.deploy_sandbox(port=__...
import csv import logging import os import re import shutil import sqlite3 def get_data_file(): """Verify that the input data file exists.""" if os.path.isfile(raw_filepath): return raw_filepath else: print('Error: no scrubbable data file exists.') quit() def parse_contents(line,...
from db import db class StoreModel(db.Model): __tablename__ = 'stores' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80)) items = db.relationship('ItemModel', lazy='dynamic') def __init__(self, name): self.name = name def json(self): return {'name':...
"""Supporting definitions for the Python regression tests.""" if __name__ != 'test.test_support': raise ImportError('test_support must be imported from the test package') import contextlib import errno import functools import gc import socket import sys import os import platform import shutil import warnings impo...
import re from decimal import * from .exceptions import TeXCalcException from .defines import DEFAULT_DECIMAL_PRECISION class Field: _type = str def __init__(self, *args, context=False, indexed=False, choices=None, default=None, **kwargs): self.__value = {} self._may_context = context ...
class RPGinfo(): author = 'BigBoi' def __init__(self,name): self.title = name def welcome(self): print("Welcome to " + self.title) @staticmethod def info(): print("Made using my amazing powers and Raseberry Pi's awesome team") @classmethod def credits(c...
# VMware vSphere Python SDK # Copyright (c) 2008-2015 VMware, Inc. All Rights Reserved. # # 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 # # ...
from hashlib import sha256 ADJECTIVES = [ "autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark", "summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter", "patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue", "billowing", "broken", "cold", "damp", "...
# -*- coding: utf-8 -*- __all__ = ["InterpolatedLightCurve"] import aesara_theano_fallback.tensor as tt import numpy as np def interp(n, x, xmin, xmax, dx, func): """One-dimensional regularly spaced cubic interpolation Args: n (int): The axis of the output that should be interpolated x (ten...
import os.path from flask import Flask from flask.ext.autoindex import AutoIndex app = Flask(__name__) AutoIndex(app) if __name__ == '__main__': app.run()
import socket import sys import select import time from collections import OrderedDict import re """ Server commands """ def SQUIT(sock): print "Quitting server..." sock.close() sys.exit() """ Client commands """ def QUIT(sock, sockets, data): #/quit <message> print accou...
from setuptools import setup, find_packages setup( name="Coinbox-mod-currency", version="0.2", packages=find_packages(), zip_safe=True, namespace_packages=['cbmod'], include_package_data=True, install_requires=[ 'sqlalchemy>=0.7, <1.0', '...
from apistar import Include, Route from apistar.frameworks.asyncio import ASyncIOApp as App from apistar.handlers import docs_urls, static_urls async def welcome(name=None): if name is None: return {'message': 'Welcome to API Star!'} return {'message': 'Welcome to API Star, %s!' % name} routes = [ ...
from yourbeat import BaseTest import os class Test(BaseTest): def test_base(self): """ Basic test with exiting Yourbeat normally """ self.render_config_template( path=os.path.abspath(self.working_dir) + "/log/*" ) yourbeat_proc = self.start_beat() ...
#!/usr/bin/env python3 # Copyright (c) 2009-2019 The Bitcoin Core developers # Copyright (c) 2014-2019 The DigiByte Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Encode and decode BASE58, P2PKH and P2SH address...
# __all__ = ['AppendDocstring'] # from tensorflow.python.ops.distributions.util import AppendDocstring
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
from __future__ import division, print_function # def prepare_mcf_data(in_mcf_data): # np.hstack(np.vstack([np.zeros(in_mcf_data.shape[0]), np.diff(in_mcf_data)]) # return def fit_FIR_roi(experiment, h5_file, in_files, vol_regressor_list, be...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
# -*- coding:utf-8 -*- # /usr/bin/env python """ Date: 2021/1/6 12:55 Desc: 上登债券信息网-债券成交概览 http://bond.sse.com.cn/data/statistics/overview/turnover/ """ from io import BytesIO import pandas as pd import requests def bond_cash_summary_sse(date: str = '20210111') -> pd.DataFrame: """ 上登债券信息网-市场数据-市场统计-市场概览-债券现...
# Enter your code here. Read input from STDIN. Print output to STDOUT from collections import OrderedDict if __name__ == '__main__': n = int( input() ) # key : word # value : occurrence word_occ_dict = OrderedDict() for _ in range(n): word = input() word_occ_dict[ word ] = wo...
# ********************************************************************** # Copyright 2020 Advanced Micro Devices, 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.o...
import sys import os import time from kafka import KafkaProducer # USAGE: # python3 ./temperature-send.py host:port kafka-topic device_id # # Messages are sent to the kafka broker residing at host:port with topic kafka-topic # They are being formatted as a key-value pair consisting of device_id->temperature # # @aut...
# Copyright 2019 The Vitess Authors. # # 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 i...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
from .mytypes import Types def bound(objects): class Bounds(Types): def __init__(self): self.x0=self.y0=float('inf') self.x1=self.y1=-float('inf') def point (self,point): x = point[0] y = point[1] if x < self.x0: self.x0 = ...
import logging import os import re import tempfile import urllib.parse import pathlib from distutils import dir_util import mlflow.utils from mlflow.utils import databricks_utils from mlflow.entities import SourceType, Param from mlflow.exceptions import ExecutionException from mlflow.projects import _project_spec fr...
import Bio.PDB as PDB from .Filter import Filter from .utilities.Loop import Loop from .utilities.Loop import find_all_loops from .utilities.Loop import get_loops_in_length_range from .utilities.Loop import loop_distance from .utilities.Crystal import get_crystal_contact_residues from .utilities.SecondaryStructure im...
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The Tor Project, Inc. # (c) 2007-201...
import sys sys.path.append('../') from utility.visualization_utility import methods2venn2 import pandas as pd import numpy as np from metaAPI.metadata import getMassiveparallel_meta from bdpAPI.bdpAPI import BDPAPl from bibleCLOUDAPI.biblecloudAPI import BibleCloudAPl from biblePNGAPI.pngAPI import PNGAPl from bibleCO...
""" PROJECT module customisations for DRKCM License: MIT """ from gluon import current, IS_EMPTY_OR from core import IS_ONE_OF # ------------------------------------------------------------------------- #def project_home(): # """ Always go to task list """ # # from core import s3_redirect_default # ...
""" pyexcel.plugin.parsers.sqlalchemy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Export data into database datables :copyright: (c) 2015-2017 by Onni Software Ltd. :license: New BSD License """ from pyexcel.parser import DbParser import pyexcel_io.database.common as sql from pyexcel_io import get_data...
# Lint as: python3 # Copyright 2020, The TensorFlow Federated Authors. # # 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 ...
from app.utilities.schema import load_schema_from_name from tests.app.app_context_test_case import AppContextTestCase class SchemaLoaderTest(AppContextTestCase): def test_load_schema_from_name(self): self.assertIsNotNone(load_schema_from_name("test_checkbox")) def test_load_schema_with_different_sche...
from rest_framework.response import Response from rest_framework.views import APIView from base.tasks import handle_comment class NewComment(APIView): def post(self, request): data = request.data["data"] handle_comment.delay(data) return Response()
# project/app/api/summaries.py from fastapi import APIRouter, HTTPException from app.api import crud from app.models.pydantic import SummaryPayloadSchema, SummaryResponseSchema from app.models.tortoise import SummarySchema router = APIRouter() @router.post("/", response_model=SummaryResponseSchema, status_code=2...
from setuptools import setup, find_packages from codecs import open from os import path from intern import __version__ # to update # python setup.py sdist # python setup.py bdist_wheel # twine upload dist/* here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.jo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # SOURCE: https://github.com/danthedeckie/simpleeval/blob/master/README.rst#if-expressions # pip install simpleeval from simpleeval import simple_eval # You can use python style if x then y else z type expressions: print(simple_eval("'equal' ...
import unittest import paw import wlgen class paw_test(unittest.TestCase): def setUp(self): self.gen_wordlist = wlgen.gen_wordlist_iter self.paw = paw.Paw() self.w1 = [["A", "B", "C"], ["1", "2", "3"]] self.w2 = [["A"], ["1", "2", "3"]] self.w3 = "a" sel...
# -*- coding: utf8 -*- # This file is distributed under MIT License # 2015 Muthiah Annamalai <ezhillang@gmail.com> # units = ( u"பூஜ்ஜியம்", u"ஒன்று", u"இரண்டு", u"மூன்று", u"நான்கு", u"ஐந்து", u"ஆறு", u"ஏழு", u"எட்டு", u"ஒன்பது", u"பத்து", ) # 0-10 teens = ( u"பதினொன்று...
from typing import Set import time from graph import GameGraph from graph_simple import GameGraphSimple from draw_graph import draw_graph #Improved backward algorithm implementation. Please refer the documentation for further details. def reachability_game(G: GameGraph, target: Set[int], draw=False, image_name="smart...
# Copyright 2019 Google Inc. All Rights Reserved. # # 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 agree...
""" Copyright (c) 2020 Intel Corporation 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 writin...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Configs.""" from fvcore.common.config import CfgNode from . import custom_config # ----------------------------------------------------------------------------- # Config definition # ------------------------------------...
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
""" File: pylinex/basis/TrainingSetPlot.py Author: Keith Tauscher Date: 22 Feb 2019 Description: File containing a function which plots a three panel figure summarizing a given training set. """ import numpy as np import matplotlib.pyplot as pl from .TrainedBasis import TrainedBasis def plot_training_set...
# Generated by Django 2.2.5 on 2019-09-06 15:31 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='EduLevel', fields=[ ...
from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class Group(models.Model): title = models.CharField(max_length=200) slug = models.SlugField(unique=True) description = models.TextField() def __str__(self): return str(self.title) #в задании г...
import os import cv2 import matplotlib.pyplot as plt import tools import normalize import numpy as np import argparse import sys import warnings """ Filename: norm_heatmap.py Author: Alexandre R. Sathler Date: 05/04/2022 Description: Primary interface file users interact with for heatmap production. Mai...
import abc import os from typing import Iterable from inflection import underscore import torch from .extern import ExternNodeBase from ..util.args import Args from ..util.dirs import DATA_DIR Dataset = Iterable class DataNode(ExternNodeBase, metaclass=abc.ABCMeta): def __init__(self, args: Args, **kwargs) -> ...
"""GraphTensor adjacency types.""" from typing import Dict, Mapping, Optional, Tuple, Union import tensorflow as tf from tensorflow_gnn.graph import graph_constants as const from tensorflow_gnn.graph import graph_piece as gp from tensorflow_gnn.graph import tensor_utils as utils # pylint: disable=g-direct-tensorflow...
from django.test import TestCase from rockit.core import holders from rockit.core import models class MixesHolderTestCase(TestCase): def setUp(self): self.association = models.Association.objects.create(name = 'my_node', namespace='test') self.holder = holders.MixesHolder(self.association) ...
"""Utility functions for Annif""" import glob import os import os.path import tempfile import numpy as np from annif import logger from annif.suggestion import VectorSuggestionResult def atomic_save(obj, dirname, filename, method=None): """Save the given object (which must have a .save() method, unless the m...
#!/usr/bin/env python # -*- coding:utf-8 -*- # author:luzy # datetime:2021/01/14 下午3:13 # software: PyCharm # project: lingzhi-webapi import logging from core.tasks import update_one_sca from dongtai.endpoint import R, UserEndPoint logger = logging.getLogger('dongtai-engine') class ScaEndPoint(UserEndPoint): "...
from pyshark import LiveCapture class RemoteCapture(LiveCapture): """ A capture which is performed on a remote machine which has an rpcapd service running. """ def __init__(self, remote_host, remote_interface, remote_port=2002, bpf_filter=None, only_summaries=False, decryption_key=No...
""" Copyright (C) 2018-2020 Intel Corporation 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 i...
#========================================================================= # bne #========================================================================= import random from pymtl3 import * from .inst_utils import * #------------------------------------------------------------------------- # gen_very_basic_test #-...
# Copyright (c) 2013, GlaxoSmithKline Research & Development Ltd. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # ...
import dgl import json import torch as th import numpy as np from ogb.nodeproppred import DglNodePropPredDataset from pyinstrument import Profiler # Load OGB-MAG. dataset = DglNodePropPredDataset(name='ogbn-mag') hg_orig, labels = dataset[0] subgs = {} for etype in hg_orig.canonical_etypes: u, v = hg_orig.all_edge...
from framebuffer.fb_string import FB_Writer from framebuffer.framebuffer import Framebuffer fb = Framebuffer() fb.clear_screen() writer = FB_Writer(size=50) writer.print("HELLO", 350, 50) writer.print(" WORLD", 350, 100)
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
from objectives.results._objective_result import * from objectives.results._add_sub_stat import add_stat_character, sub_stat_character STAMINA_ADDRESS = 0x161c character_add = {} character_sub = {} def add_stamina(character): if character not in character_add: character_add[character] = add_stat_characte...
# Copyright (C) 2015-2021 Virgil Security, Inc. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistributions of source code must retain the above copyright # notice, this li...
# Copyright 2018 AT&T Intellectual Property. All other rights reserved. # # 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...
import json import logging from pathlib import Path from typing import List import pkg_resources from taskcat._config import Config LOG = logging.getLogger(__name__) class CFNPolicyGenerator: def __init__(self, config: Config, output_file: str): self._config = config self._data_file_path = pkg_r...
import schedule import time from Daka import Daka if __name__ == "__main__": # 定时任务1:每6个小时打一次卡 schedule.every(6).hours.do(Daka) # 定时任务2:每天凌晨00:01时间打卡 schedule.every().day.at("00:01").do(Daka) print("启动打卡系统") Daka() print("6小时后或者明天凌晨打卡....") while True: schedule.run_pending() ...
# -*- coding: utf-8 -*- import pandas import glob from rdkit import Chem from rdkit.Chem.Draw import rdMolDraw2D no_wrap_div = """ <div style="display: flex; flex-wrap: wrap; justify-content: space-around"> <div>{0}<div style="text-align:center">Docking</div></div> <div>{1}<div style="text-align:cent...
#!/usr/bin/env python3 import sys import socket import selectors import traceback import libserver sel = selectors.DefaultSelector() def accept_wrapper(sock): conn, addr = sock.accept() # Should be ready to read print("accepted connection from", addr) conn.setblocking(False) message = libserver.Mes...
# Copyright 2009 by Peter Cock. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Runs a few EMBOSS tools to check our wrappers and parsers.""" import os import sys import unit...
try: from PyQt4 import QtGui, QtCore except: from PyQt5 import QtGui, QtCore import pyqtgraph as pg import numpy as np import ibeatles.step2.gui_handler class Step2RoiHandler(object): def __init__(self, parent=None): self.parent = parent def save_table(self): list_roi = ...
import numpy as np import torch from discrete_network.network import KNNet, KNNetParameters, KNNetState from discrete_network.method.force_method import ForceParameters, ForceLearn from discrete_network.device import device import matplotlib.pyplot as plt print(f"Device = {device.type}") # params_spiking = KNNetParam...
import pytest import os from polyglotdb import CorpusContext def test_encode_class(acoustic_utt_config): with CorpusContext(acoustic_utt_config) as g: q = g.query_graph(g.phone) results = q.all() first_twenty = results.next(20) assert (first_twenty == results.previous(20)) ...
from math import atan2, sqrt, degrees, radians, cos, sin from random import randint class Vector2D: #region INIT def _get_xy(self, args): """Generates a x and y from any input Returns: [tuple]: x, y """ number_of_args = len(args) if number_of...
import requests import json node = 'http://104.128.226.60:7890' # Test api = '/account/get' parameter = 'address=TCJC5VFBIYF5TKEUS273XS7IXUKJ36I3JCJQ7WOH' url = str(node + api + '?' + parameter) r = requests.get(url).json() print(r['account']['balance'])
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # 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...
# Copyright 2019 The Meson development team # 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 ...
import unittest from steembase.base58 import Base58 from steembase.account import BrainKey, Address, PublicKey, \ PrivateKey, PasswordKey class Testcases(unittest.TestCase): def test_B85hexgetb58_btc(self): self.assertEqual([ "5HqUkGuo62BfcJU5vNhTXKJRXuUi9QSE6jp8C3uBJ2BVHtB8WSd", ...
import pql import sys, os sys.path.append(os.path.dirname(os.path.dirname(__file__))) from optimade.filter import Parser from lark import Transformer import re # data for pql to mongodb symbol optiMadeToPQLOperatorSwitch = { "=":"==", "<=":"<=", ">=":">=", "!=": "!=", "<":"<", ">":">", } class...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
# listener.py import discord from core import DCSServerBot, EventListener class MissionStatisticsEventListener(EventListener): COALITION = { 1: 'Red', 2: 'Blue' } UNIT_CATEGORY = { 0: 'Airplanes', 1: 'Helicopters', 2: 'Ground Units', 3: 'Ships', 4:...
# (c) 2005 Ben Bangert # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ OpenID Authentication (Consumer) OpenID is a distributed authentication system for single sign-on originally developed at/for LiveJournal.com. ht...
#Display Data from Neato LIDAR #based on code from Nicolas "Xevel" Saugnier #requires vpython and pyserial import thread, time, sys, traceback, math com_port = "COM30" # example: 5 == "COM6" == "/dev/tty5" baudrate = 115200 visualization = True offset = 140 init_level = 0 index = 0 lidarData = [[] f...
""" camera controller for tracking slime molds University of Applied Sciences Potsdam (Germany) @idpotsdam author: fabiantheblind license: MIT """ import sys # we need this to exit if the GPIO lib is not present import time # just for testing purpose import datetime # for timestamps import os # for path checking # ch...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
import time import requests import urllib.request from bs4 import BeautifulSoup import re from datetime import datetime import pandas as pd from nba_driver import * import numpy as np import string def get_player_soup(driver, player_id): soup = get_soup(driver, 'https://www.basketball-reference...
"""Core visualization operations.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Eric Larson <larson.eric.d@gmail.com> # Oleh Kozynets <ok7mailbox@gmail.com> # Guillaume Favelier <guillaume.favelier@gmail.com> # # License: Simplified BSD from abc import ABCMeta, abstractcl...
import zorg import time def work(my): my.speech.start() my.speech.set_voice(1) my.speech.speak("Upgrade in progress") count = 0 while True: my.speech.speak(count) print(count) count = count + 1 # Wait 1 second before doing it again time.sleep(1) robot ...
# ---------------------------------------------------------------------------------------------------------------------# # Parameters [edit manually] # # ----------------------------------------------------------------------------...
# coding=utf-8 from poco.pocofw import Poco from poco.agent import PocoAgent from poco.drivers.std.attributor import StdAttributor from poco.drivers.std.dumper import StdDumper from poco.drivers.std.screen import StdScreen from poco.drivers.std.inputs import StdInput from poco.freezeui.hierarchy import FrozenUIHierarc...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contributions', '0004_auto_20150201_1543'), ] operations = [ migrations.AddField( model_name='contribution', ...
# required imports from core.api.grpc import client from core.api.grpc.core_pb2 import Node, NodeType, Position, SessionState # interface helper iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64") # create grpc client and connect core = client.CoreGrpcClient() core.connect() # cre...
command = "netstat -tunlp" import subprocess if __name__ == "__main__": p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) out, err = p.communicate() first = True j = 0 for l in out.decode().split('\n'): if first: first = False ...
''' Basic query on NCPI FHIR server Patient resource via DNAStack Search test implementation''' # IMPORTS import sys import json from fasp.search import DiscoverySearchClient def main(argv): searchClient = DiscoverySearchClient('https://ga4gh-search-adapter-presto-public.prod.dnastack.com') query = 'se...
import os import datetime from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows def get_persistentProp(files_found, report_folder, seeker, wrap_text): for file_found in files_found: file_found = str(file_found) if not file_...
from django.urls import reverse_lazy from django.views.generic import CreateView from . import forms class SignUp(CreateView): form_class = forms.UserCreateForm success_url = reverse_lazy("login") template_name = "users/signup.html"
# # arith_tests.py # # Demo/tests of various plusminus parsers # # Copyright 2020, Paul McGuire # from pprint import pprint from plusminus import ArithmeticParser from plusminus.examples.dice_roll_parser import DiceRollParser from plusminus.examples.combinatorics_arithmetic_parser import CombinatoricsArithmeticParser ...
import time import json # pypot imports import pypot.robot import pypot.dynamixel # import matplotlib.pyplot as plt # import manipulator_math_utils as mmu import sys import csv import pprint pp = pprint.PrettyPrinter(indent=4) SPLINE = 10000 motor_id = [1] JOINTS = len(motor_id) DXL_DICT_3 = dict(zip(motor_id, ...
#definition for adding two matrices def addMatrix(X,Y): #Checking the dimensions if(len(X)==len(Y) and len(X[0])==len(Y[0])): #Result Matrix summ=[] # iterate through rows for i in range(len(X)): summ.append([]) # iterate through colum...