text
stringlengths
1
927k
import traceback import argparse import numpy as np from src import NeuralNetwork, generateExample, getTensorExample from typing import * def get_args() -> argparse.Namespace: """Set-up the argument parser Returns: argparse.Namespace: """ parser = argparse.ArgumentParser( description=...
""" job_metadata api data import unit tests. Copyright (c) 2018-2019 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: - ...
#!/usr/bin/env python from __future__ import print_function from time import sleep import random import sys import rospy from rospy import Publisher, init_node from sensor_msgs.msg import Range from pandora_data_fusion_msgs.msg import VictimProbabilities from pandora_sensor_msgs.msg import BatteryMsg, Co2Msg, Temper...
# --------------------------------------------------------------------- # Gufo Err: AlwaysFailFast # --------------------------------------------------------------------- # Copyright (C) 2022, Gufo Labs # --------------------------------------------------------------------- # Python modules from typing import Type fro...
import unittest import mock import requests import httpretty import settings from bitfinex.client import Client, TradeClient API_KEY = settings.API_KEY API_SECRET = settings.API_SECRET class BitfinexTest(unittest.TestCase): def setUp(self): self.client = Client() def test_should_have_server(self):...
from django.conf.urls import url from . import views from django.views.decorators.csrf import csrf_exempt #GET charts?userid=0&clientid=1 #GET charts?userid=0&clientid=1&chartid=2 #DELETE charts?userid=0&clientid=1&chartid=2 #POST charts?userid=0&clientid=1&chartid=2 #POST charts?userid=0&clientid=1 urlpatterns =...
import csv import xlsxwriter import io from django.http import HttpResponse, JsonResponse from django.shortcuts import redirect, render from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required from django.utils.translation import gettext from users.models import Cu...
import os from unittest import TestCase import pytest from dotenv import load_dotenv from pytest import skip from osbot_utils.utils.Files import file_not_exists from osbot_k8s.kubernetes.Ssh import Ssh @pytest.mark.skip('needs live server') # todo add to test setup the creation of pods and nodes we can S...
from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField,SubmitField from wtforms.validators import Required class ReviewForm(FlaskForm): title = StringField('Review Title', validators=[Required()]) review = TextAreaField('Movie review',validators=[Required()]) submit = SubmitField('Su...
""" Company database model definitions """ # -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.utils.translation import ugettext_lazy as _ from django.core.validators import MinValueValidator from django.core.exceptions import ValidationError from django.db import models from djang...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/furniture/jedi/shared_frn_all_table_dark_01.iff" result.attribute_t...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.conf.urls import url, include from pdf_crawler_test.urls import urlpatterns as pdf_crawler_test_urls urlpatterns = [ url(r'^', include(pdf_crawler_test_urls, namespace='pdf_crawler_test')), ]
import time import json import requests import urllib3 from random import randint from bs4 import BeautifulSoup from threading import Thread urllib3.disable_warnings() BASE_URL = "https://jobs.ksl.com/search/posted/last-7-days" HEADERS = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiple RPC users.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
# Copyright 2015 Isotoma Limited # # 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 writing...
import os import uuid from django.db import models from django.utils.deconstruct import deconstructible NOT_COMPLETE = 'NC' COMPLETE = 'C' TASK_STATUS_CHOICES = [ (NOT_COMPLETE, 'Not Complete'), (COMPLETE, 'Complete'), ] @deconstructible class GenerateAttachmentFilePath(object): def __init__(self): ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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 b...
import datetime import json import logging import os import queue import subprocess as sp import threading import time from collections import defaultdict from pathlib import Path import psutil import shutil from frigate.config import FrigateConfig from frigate.const import RECORD_DIR, CLIPS_DIR, CACHE_DIR from friga...
#!/usr/bin/python # -*- coding: UTF-8 -*- """ @author: Alan @time: 2021/05/18 """ from concurrent.futures import ThreadPoolExecutor, wait, ALL_COMPLETED import traceback class MultiThread(ThreadPoolExecutor): def __init__(self, max_workers=None, thread_name_prefix=''): super().__init__(max_worker...
# -*- coding: utf-8 -*- # # This file is part of DataCite. # # Copyright (C) 2015, 2016 CERN. # # DataCite is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """Tests for /metadata GET.""" from __future__ import absolute_import...
import json import os import boto3 import yaml from lib.dynamodb import accounts_table, requirements_table, user_table, config_table from lib.lambda_decorator.decorator import states_decorator client_s3 = boto3.client('s3') user_bucket = os.getenv('USER_BUCKET') account_bucket = os.getenv('ACCOUNT_BUCKET') requirem...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import time from contextlib import ExitStack as contextlib_ExitStack from typing import Any, Iterable, List, Optional, Tuple import torch from pytext.common.constants import BatchContext, Stage from pytext.c...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import torch import torch.nn.functional as F from fairseq import metrics, utils from fairseq.criterions import FairseqCriterion,...
""" """ from campy.cameras import unicam import os import time import logging import sys import numpy as np from collections import deque import csv import imageio def LoadSystem(params): return params["cameraMake"] def GetDeviceList(system): return system def LoadDevice(cam_params): return cam_p...
import json import logging import geojson import numpy as np from tqdm import tqdm from scipy import stats from odm_report_shot_coverage.models.camera import Camera, json_parse_camera from odm_report_shot_coverage.models.shot import Shot, shot_boundaries_from_points, Boundaries from odm_report_shot_coverage.models.wa...
import argparse import scipy.io import torch import numpy as np import os from torchvision import datasets import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt ####################################################################### # Evaluate parser = argparse.ArgumentParser(description='Demo') parse...
test = { 'name': '8.2', 'suites': [ { 'cases': [ { 'code': r""" >>> # It looks like one of your variables is not named >>> # correctly. Maybe there's a typo? >>> 'avg_flt' in vars() True """ }, { 'code': r""" ...
import numpy as np from gym import spaces from gym import Env from . import register_env @register_env('point-robot') class PointEnv(Env): """ point robot on a 2-D plane with position control tasks (aka goals) are positions on the plane - tasks sampled from unit square - reward is L2 distance ...
""" Namespace for functions and constants corresponding to OpenGL ES 2.0 extensions. """ from __future__ import division from ._constants_ext import * # noqa # Filled with functions when vispy.gloo.gl is imported
from typing import List, Union, Tuple from lab.logger.colors import StyleCode class Destination: def log(self, parts: List[Union[str, Tuple[str, StyleCode]]], *, is_new_line=True): raise NotImplementedError() def new_line(self): raise NotImplementedError()
''' Created on Oct 12, 2016 @author: mwittie ''' import network_3 import link_3 import threading from time import sleep ##configuration parameters router_queue_size = 0 # 0 means unlimited simulation_time = 1 # give the network sufficient time to transfer all packets before quitting if __name__ == '__main__': ...
""" This file contains the email and password for MyDisneyExperience and the guests in your party Below, add your email and password in the parentheses that you use to login into mydisneyexperience.com """ email = "" password = "" """ guests = ["guest-00000000-0000-0000-0000-000000000000-unselected", "guest-000...
""" Task The provided code stub reads two integers from STDIN, and . Add code to print three lines where: The first line contains the sum of the two numbers. The second line contains the difference of the two numbers (first - second). The third line contains the product of the two numbers. Example Print the followi...
from hamcrest import assert_that from allure_commons_test.report import has_test_case from allure_commons_test.result import with_status from allure_commons_test.result import has_status_details from allure_commons_test.result import with_message_contains from allure_commons_test.result import with_trace_contains from ...
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitati...
from django.contrib import admin from authentication.models import CustomUser # Register your models here. class CustomUserAdmin(admin.ModelAdmin): list_display = ['username','first_name','last_name','email'] admin.site.register(CustomUser, CustomUserAdmin)
#!/usr/bin/env python3 import json import numpy as np import sympy as sp import cereal.messaging as messaging from cereal import log from common.params import Params import common.transformations.coordinates as coord from common.transformations.orientation import ecef_euler_from_ned, \ ...
# Getting started with OpenStack using libcloud # http://developer.openstack.org/firstapp-libcloud/getting_started.html from libcloud.compute.ssh import * from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver from Cloud import Cloud from settings import * # noinspection PyPep8N...
from unittest import TestCase, skip import os from docxtpl import DocxTemplate class TestDocxTemplate(TestCase): def setUp(self): self.APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory self.FIXTURE_DIR = os.path.join(os.path.dirname(self.APP_DIR), 'fixtures') self.FO...
""" Copyright 2019 ShipChain, 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.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/networking/requests/messages/get_asset_digest_message.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as ...
from __future__ import division import os import time from glob import glob import tensorflow as tf import numpy as np from six.moves import xrange from utils import * from loss_functions import * from scipy.misc import imsave class MR2CT(object): def __init__(self, sess, batch_size=10, depth_MR=32, height_MR=32,...
import sys from .calc import * from .colls import * from .tree import * from .decorators import * from .funcolls import * from .funcs import * from .seqs import * from .types import * from .strings import * from .flow import * from .objects import * from .debug import * from .primitives import * # Setup __all__ modu...
import balanced balanced.configure('ak-test-2eKlj1ZDfAcZSARMf3NMhBHywDej0avSY') key = balanced.APIKey.fetch('/api_keys/AK3DQGzROuoRYulKXMQdHBxX') key.delete()
# Copyright 2018 The Cornac 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 applicable ...
from web import app app.run(host='0.0.0.0',port=8080, use_reloader=True, debug=True, threaded=True)
import json, os from planutils import manifest_converter # This should eventually be changed once the prefix is customizable PLANUTILS_PREFIX = os.path.join(os.path.expanduser('~'), '.planutils') SETTINGS_FILE = os.path.join(PLANUTILS_PREFIX, 'settings.json') PAAS_SERVER = 'http://45.113.232.43:5001' PAAS_SERVER_LI...
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest import numpy as np from openvino.tools.mo.load.tf.loader import graph_or_sub_graph_has_nhwc_ops from unit_tests.utils.graph import build_graph, result, regular_op, const, connect_front class TFLoaderTest(unittest.Test...
""" WSGI config for shorty project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
"""Password generator allows you to generate a random password of length N.""" from random import choice from string import ascii_letters, digits, punctuation def password_generator(length=8): """ >>> len(password_generator()) 8 >>> len(password_generator(length=16)) 16 >>> len(password_genera...
from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.hyperparameters import UniformIntegerHyperparameter, \ CategoricalHyperparameter from mindware.components.feature_engineering.transformations.base_transformer import * class QuantileTransformation(Transformer): type = 5 def _...
import os import sys def resource_path(relative_path): """ Get absolute path to resource, works for dev and for PyInstaller """ try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS except Exception: base_path = os.path.abspath(".") retur...
import insightconnect_plugin_runtime from .schema import GetRuleInput, GetRuleOutput, Input, Output, Component # Custom imports below from insightconnect_plugin_runtime.helper import clean from threatstack.errors import ThreatStackAPIError, ThreatStackClientError, APIRateLimitError from insightconnect_plugin_runtime.e...
""" geonames/exceptions ~~~~~~~~~~~~~~~~~~~ """ from . import base def ignore_foreign_key_constraint(db, options, record: base.T, exception: Exception) -> bool: return 'FOREIGN KEY constraint failed' in str(exception) def ignore_unique_key_constraint(db, options, record: base.T, exception: Exception) ->...
from rpython.rlib.parsing.tree import Nonterminal, Symbol from rpython.rlib.parsing.makepackrat import PackratParser, BacktrackException, Status class Parser(object): def NAME(self): return self._NAME().result def _NAME(self): _key = self._pos _status = self._dict_NAME.get(_key, None) ...
import FWCore.ParameterSet.Config as cms from RecoTracker.TkSeedGenerator.SeedGeneratorFromRegionHitsEDProducer_cfi import seedGeneratorFromRegionHitsEDProducer CommonClusterCheckPSet = seedGeneratorFromRegionHitsEDProducer.ClusterCheckPSet photonConvTrajSeedFromSingleLeg = cms.EDProducer("PhotonConversionTraject...
from tkinter import * from tkinter import ttk import tkinter.filedialog as fd import pandas as pd from LocalModelCommunication import LocalModelCommunication from APP import APP class GUI(object): def __init__(self): # overall self.tabControl = None self.tab_step1 = None self.tab_step2 = None self.tab_step3...
import tensorflow as tf import keras from keras.datasets import cifar10 import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import os import sys import csv import utils_csv import utils_tf as utils from cleverhans.utils_tf import model_train, model_eval from cleverhans.attacks impo...
from ..RESTapiwrap import Wrapper from ..utils.permissions import PERMS, Permissions from ..utils.contextproperties import ContextProperties import time import base64 try: from urllib.parse import quote except ImportError: from urllib import quote class Guild(object): __slots__ = ['discord', 's', 'log'] def __in...
from typing import Dict, Optional from sc2.ids.ability_id import AbilityId from sharpy.combat import Action, MoveType, MicroStep from sc2.ids.unit_typeid import UnitTypeId from sc2.unit import Unit from sc2.position import Point2 class MicroLiberators(MicroStep): def __init__(self, group_distance: float = -5): ...
""" This file offers the methods to automatically retrieve the graph Proteus mirabilis. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-02-0...
from .exporter import csvExporter from .exporter import exporter
# -*- coding: utf-8 -*- from __future__ import absolute_import import time from datetime import datetime def get_timestamp(): return int(time.time()) def throttle_period_expired(timestamp, throttle): if not timestamp: return True elif isinstance(timestamp, datetime): return (datetime.utc...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCampaignPromotionactivityCustomerReceiveModel import AlipayMarketingCampaignPromotionactivityCustomerReceiveModel cla...
from dataclasses import dataclass from typing import Set, Dict from ..runner import AnalysisRunner from py_pdf_term.candidates import DomainCandidateTermList from py_pdf_term._common.data import Term @dataclass(frozen=True) class DomainTermOccurrence: domain: str # unique domain name term_freq: Dict[str,...
from Compiler.program import Tape from Compiler.exceptions import * from Compiler.instructions import * from Compiler.instructions_base import * from .floatingpoint import two_power from . import comparison, floatingpoint import math from . import util import operator from functools import reduce class ClientMessageT...
# Generated by Django 3.1.5 on 2021-01-09 16:06 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Blog', fields=[ ('blogId', models.AutoField...
import pytest import unittest import os from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from ai_research.mag.mag_orm import Base from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) class TestMag(unittest.TestCase): """Check that the MAG ORM works as expected""" ...
from dagstermill.io_managers import OutputNotebookIOManager from dagster import io_manager from .fixed_s3_pickle_io_manager import s3_client class S3OutputNotebookIOManager(OutputNotebookIOManager): """Defines an IOManager that will store dagstermill output notebooks on s3""" def _get_key(self, context) ->...
import user32 import win32con import ctypes import collections class VirtualDesktopException(Exception): pass class NoForegroundWindow(VirtualDesktopException): pass class VirtualDesktop(object): def __init__(self): self.window = [] self.removed_windows = [] def remove_foreground_...
""" simply hired using multi process design scrape through 11 pages of simply using a multi processing for each I/O (4x faster) """ from requests import get from bs4 import BeautifulSoup from threading import Thread import multiprocessing from os import getpid import psutil def get_simply(url, role ): alldata={} ...
__all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__", "__license__", "__copyright__", ] __title__ = "aardvark" __summary__ = ("Multi-Account AWS IAM Access Advisor API") __uri__ = "https://github.com/Netflix-Skunkworks/aardvark" __version__ = "0.2.1" __author__ = "Patri...
""" Derived module from dmdbase.py for hankel dmd. Reference: - H. Arbabi, I. Mezic, Ergodic theory, dynamic mode decomposition, and computation of spectral properties of the Koopman operator. SIAM Journal on Applied Dynamical Systems, 2017, 16.4: 2096-2126. """ from copy import copy import numpy as np from .dmdbase...
import torch from torch import nn from torch.distributions import Categorical class SoftmaxCategoricalHead(nn.Module): def forward(self, logits): return torch.distributions.Categorical(logits=logits) # class MultiSoftmaxCategoricalHead(nn.Module): # def forward(self, logits): # return Indepe...
# Resource object code (Python 3) # Created by: object code # Created by: The Resource Compiler for Qt version 6.0.4 # WARNING! All changes made in this file will be lost! from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x08\x19\ \x89\ PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ \x00\x00 \x00\x00\x00 \x08\...
from flying_ioc import IocManager class TSingleton1: def __init__(self): pass def test_singleton_container(): ioc = IocManager(stats=True) ioc.set_class(name='singleton1', cls=TSingleton1, singleton=True) assert ioc.singleton1 is ioc.singleton1 ioc.print_stats()
#!/usr/bin/env python3 # 61dust.py import argparse from fileinput import filename import mcb185 as mcb # Write a program that finds and masks low entropy sequence # Use argparse for the following parameters # sequence file # window size # entropy threshold # lowercase or N-based masking # The program should o...
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Dash Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from collections import namedtuple from test_framework.mininode import * from test_framework.test_framework ...
# XXX Should convert from STDMETHOD to COMMETHOD. # generated by 'xml2py' # flags '..\tools\windows.xml -m comtypes -m comtypes.automation -w -r .*TypeLibEx -r .*TypeLib -o typeinfo.py' # then hacked manually import os import sys import weakref from ctypes import * from ctypes.wintypes import ULONG from comtypes impo...
from manimlib.animation.transform import Transform from manimlib.basic.basic_function import to_expand_lists, to_get_point from manimlib.constants import PI from manimlib.utils.config_ops import generate_args, merge_config_kwargs class GrowFromPoint(Transform): def __init__(self, mobject, mobject_or_point="get_ce...
# coding: utf-8 """ App Center Client Microsoft Visual Studio App Center API # noqa: E501 OpenAPI spec version: preview Contact: benedetto.abbenanti@gmail.com Project Repository: https://github.com/b3nab/appcenter-sdks """ import pprint import re # noqa: F401 import six class InternalHockey...
# swift_build_support/targets.py - Build target helpers -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt for lic...
class TrieNode: def __init__(self): self.children = {} self.isWord = False class Trie: def __init__(self): self.root = TrieNode() def put(self, word): current = self.root for i in range(0, len(word)): child = word[i] tmp = None ...
import numpy as np import astropy.units as u import astropy.wcs.utils from astropy.coordinates import ( ITRS, BaseCoordinateFrame, CartesianRepresentation, SkyCoord, SphericalRepresentation, ) from astropy.wcs import WCS from sunpy import log from .frames import ( BaseCoordinateFrame, Heli...
############################################################################### # # Copyright (c) 2016 Wi-Fi Alliance # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appea...
import paramiko import time import io import os import stat from yaml_generator import CAYamlGenerator, OrderYamlGenerator, PeerYamlGenerator, ConfigTXYamlGenerator def sftp_get_r(sftp_client, remote_path, local_path): try: sftp_client.stat(remote_path) except IOError: return if not os.pat...
#!/usr/local/bin/python3 # https://python-plexapi.readthedocs.io/en/latest/modules/media.html # https://github.com/liamks/libpytunes/blob/master/README.md from os import path import ImportUtils CONFIGURATION = ImportUtils.get_configuration() class FakePlexTrack: originalTitle = "" userRating = 0.0 year...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
"""Entry point for WebDriver.""" import alert import command import searchcontext import webelement import base64 class WebDriver(searchcontext.SearchContext): """Controls a web browser.""" def __init__(self, host, required, desired, mode='strict'): args = {'desiredCapabilities': desired} ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="mobilecoin", version="0.3.3", author="MobileCoin", author_email="support@mobilecoin.com", description="Python bindings for the MobileCoin da...
""" SamsungTVWS - Samsung Smart TV WS API wrapper Copyright (C) 2019 Xchwarze This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your op...
"""Tests for Vanderbilt SPC component.""" from unittest.mock import patch, PropertyMock, Mock from homeassistant.bootstrap import async_setup_component from homeassistant.components.spc import DATA_API from homeassistant.const import STATE_ALARM_ARMED_AWAY, STATE_ALARM_DISARMED from tests.common import mock_coro as...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import docker import sys import os import time import datetime # https://docker-py.readthedocs.io/en/latest/ client = docker.from_env() progname = sys.argv[0] # TODO read from data/config.yml teams = [ { "name": "team1", "ip_prefix": "10.10.11" ...
# -*- coding: utf-8 -*- # Copyright 2012 Mr_Orange <mr_orange@hotmail.it> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of the Lice...
# Import packages import requests from bs4 import BeautifulSoup # Specify url: url url = 'https://www.python.org/~guido/' # Package the request, send the request and catch the response: r r = requests.get(url) # Extracts the response as html: html_doc html_doc = r.text # Create a BeautifulSoup object from the HTML:...
import rlkit.misc.hyperparameter as hyp from multiworld.envs.pygame import PickAndPlaceEnv from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.sets.rl_launcher import disco_experiment if __name__ == "__main__": variant = dict( env_class=PickAndPlaceEnv, env_kwargs=dict( ...
# Generated by Django 3.2.6 on 2021-12-15 21:28 from django.db import migrations from django.db.models import F, Value from django.db.models.functions import Concat def add_pp_to_footnote_pages(apps, schema_editor): # for footnotes that start with with a numeric location, # we want to add pp. to make the mea...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright © Spyder Project Contributors # # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) # ----------------------------------------------------------------------------- """ Te...
import asyncio import json import logging from pathlib import Path from typing import Dict, List, TypedDict from gql import Client, gql from gql.client import AsyncClientSession from gql.transport.aiohttp import AIOHTTPTransport log = logging.getLogger(__name__) class Episode(TypedDict): id: str title: str ...