text
stringlengths
2
999k
try: from apex.amp import float_function except ImportError as e: def float_function(fn): return fn
# -*- coding: utf-8 -*- """a function of ploting figures.""" import numpy as np import matplotlib.pyplot as plt def cross_validation_visualization(lambds, mse_tr, mse_te): """visualization the curves of mse_tr and mse_te.""" plt.semilogx(lambds, mse_tr, marker=".", color='b', label='train error') plt.semi...
import sys script, user_name = sys.argv prompt = '>' print 'Hi %s, I am %s \nSome quick Q\'s' % (user_name, script) likes = raw_input("what are your likes" + prompt) lives = raw_input("where do you live" + prompt) compu = raw_input("what computer do you have" + prompt) print 'typed the following %s, %s, %s' % (like...
""" Tests for code generation from SymPy/SymEngine objects. """ import pickle import pytest import numpy as np from symengine.lib.symengine_wrapper import LambdaDouble, LLVMDouble from symengine import zoo from pycalphad import Model, variables as v from pycalphad.codegen.callables import build_phase_records from pyca...
"""empty message Revision ID: 5ef0893617c2 Revises: Create Date: 2021-09-08 18:56:44.000447 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5ef0893617c2' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
"""Client.""" import datetime import requests import logging _LOGGER = logging.getLogger(__name__) class EmbyClient: """Client class""" def __init__(self, host, api_key, ssl, port, max_items, user_id): """Init.""" self.data = {} self.host = host self.ssl = "s" if ssl else "" ...
# Lint as: python3 # Copyright 2019, 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 ...
>>> c Counter({'a': 3, 'l': 2, 'g': 1, 'h': 1, 'd': 1})
import pytest from aiopg.sa.connection import _distill_params pytest.importorskip("aiopg.sa") # noqa def test_distill_none(): assert _distill_params(None, None) == [] def test_distill_no_multi_no_param(): assert _distill_params((), {}) == [] def test_distill_dict_multi_none_param(): assert _distill...
# -*- coding: utf-8 -*- # # bert-as-service documentation build configuration file, created by # sphinx-quickstart on Wed Dec 19 20:32:51 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
""" OpenStreetMap Animation Tool: - Provides easy setup to show things moving around on a map. - Requires pygame. Basic idea: 1. Create TrackingViz objects or your own custom SimViz's 2. Create a Simulation object with those Viz's 3. Call the Simulation's run() method 4. Run the simulation: - Mouse ov...
"""Command-line tool to demonstrate layer loading""" import argparse import functools import importlib import json from typing import Any, Callable, cast import layer_loader class DottedToCallableType: def __call__(self, name: str) -> Callable[..., Any]: module_name, attribute_name = name.rsplit('.', ma...
# Shifter, Copyright (c) 2015, The Regents of the University of California, # through Lawrence Berkeley National Laboratory (subject to receipt of any # required approvals from the U.S. Dept. of Energy). All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are per...
import sys import unittest from test.support import run_unittest L = [ ('0', 0), ('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314), (' 314', 314), ('314 ', 314), (' \t\t 314 \t\t ', 314), (repr(sys.maxsize...
version = "3.38"
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals """ This module defines the thermal expansion coefficient workflow. """ from uuid import uuid4 from fireworks import Firework, Workflow from pymatgen.analysis.elasticity.strain import Deformation from pymatgen.io.vas...
"""This module defines the version for the package. """ __version__ = '0.1.0'
import unittest from linear_regression import linear_regression class TestLinearRegression(unittest.TestCase): def test_linear_regression(self): points = ((0, -1), (1, 0.2), (2, 0.9), (3, 2.1)) k, n = linear_regression(points) self.assertAlmostEqual(k, 1.0) self.assertAlmostEqual(...
# Mock Test III #!/bin/python3 import math import os import random import re import sys # # Complete the 'anagram' function below. # # The function is expected to return an INTEGER. # The function accepts STRING s as parameter. # from collections import Counter def anagram(s, ans=0): if(len(s)%2!=0): return -1...
import base64 import json import urllib.request, urllib.parse, urllib.error from urllib3._collections import HTTPHeaderDict from . import httplib2 import logger import traceback import socket import time import re import uuid from copy import deepcopy from threading import Thread from TestInput import TestInputSinglet...
# задание 13 from sys import maxsize class Group: def __init__(self, name=None, header=None, footer=None, id =None): self.name = name self.header = header self.footer = footer self.id = id def __repr__(self): return "%s:%s:%s:%s" % (self.id, self.name, self.header, sel...
# Copyright (c) 2020 safexl from safexl.toolkit import * import safexl.xl_constants as xl_constants import safexl.colors as colors __author__ = "Eric Smith" __email__ = "ThePoetCoder@gmail.com" __license__ = "MIT" __version__ = "0.0.7"
# # Enumeration of various types of sony camera, options (maximum all mode, list of features in that model of camera) and cp_enumeration (number assigned to the feature in the API and GUI) # import enum import re # --------------- each camera has a set of enumerations for each functionality and its available option...
# Generated by Django 2.1.15 on 2021-04-29 07:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0003_ingredient'), ] operations = [ migrations.CreateModel( ...
import re from guppyproxy.util import datetime_string, DisableUpdates from guppyproxy.proxy import HTTPRequest, get_full_url, parse_request from guppyproxy.hexteditor import ComboEditor from PyQt5.QtWidgets import QWidget, QTableWidget, QTableWidgetItem, QGridLayout, QHeaderView, QAbstractItemView, QLineEdit, QTabWidg...
# -*- coding: utf-8 -*- import locale import os import struct from subprocess import Popen, PIPE import sys import threading import time import signal from .util import six # Import some platform-specific things at top level so they can be mocked for # tests. try: import pty except ImportError: pty = None tr...
from warnings import warn import os from multiprocessing import Pool import numpy as np from tqdm import tqdm from keras.models import Model from scipy.stats import gaussian_kde from coverage.tools.surprise_adequacy.sa_utils import * from coverage.tools.common_utils import ScoreUtils from coverage.tools....
import pandas as pd import pandas.testing as tm print(pd.__version__) df = pd.DataFrame({"a": [1] * 2188}) p = "test.csv.zip" # replace with available path df.to_csv(p) result = pd.read_csv(p) print(result) tm.assert_frame_equal(result[["a"]], df)
# coding: utf-8 import pprint import re import six class ShowResourceByIdRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the ...
from .algorithm import *
#!/usr/bin/env python3 import argparse import tarfile import tempfile from pathlib import Path def work(path_in: Path, path_out: Path): path_out.parent.mkdir(exist_ok=True, parents=True) outs = [] sids = [] fileinfos = [] with path_in.open() as inf: for line in inf: if line.st...
import numpy as np from dbspy.core import base from dbspy.core.analyze import _analyze as analyze from dbspy.core.utils.variance import add_var, minus_var, divide_var, sum_var # define class Conf(analyze.Conf): fold_modes = ('fold', 'none', 'right', 'left') compare_modes = ('ratio', 'difference') d...
"""Internal API endpoint constant library. _______ __ _______ __ __ __ | _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----. |. 1___| _| _ | | | | _ | 1___| _| _| | <| -__| |. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____| |: 1 | ...
# coding: utf-8 ########################################################################## # NSAp - Copyright (C) CEA, 2013 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # for det...
""" PROBLEM Find the minimal path sum, in matrix.txt (right click and "Save Link/Target As..."), a 31K text file containing a 80 by 80 matrix, from the top left to the bottom right by only moving right and down. ANSWER: 427337 Solve time ~0.012 seconds Related problems: 82 """ import copy import os import unittest f...
import numpy as np import cv2 def draw_boxes(output_filename, classes_filename, inputs, original_image, resized_image): """ Draws identified boxes along with class probabilities on the original image and then saves the image with the output file name. Parameters ---------- output_filename : st...
# coding=utf-8 import os import unittest from stash import stash class ExpanderTests(unittest.TestCase): def setUp(self): self.stash = stash.StaSh() self.stash('cd $STASH_ROOT') self.expand = self.stash.runtime.expander.expand def tearDown(self): del self.stash def _get_...
#!/usr/bin/python3 # -*-coding:utf-8-*- __author__ = "Bannings" import os, re def valid_count(lines): if lines[-1] != "": lines.append("") ans, passport = 0, {} for line in lines: if line == "": temp, passport = passport, {} if len(temp) == 8 or (len(temp) == 7 and "cid" n...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2021, Sandflow Consulting LLC # # 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, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ***************************************************************************** # $Id$ # # Project: GDAL # Purpose: Validate Cloud Optimized GeoTIFF file structure # Author: Even Rouault, <even dot rouault at spatialys dot com> # # *********************************...
# 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, software # distributed under th...
import os import re import shutil import sys import ctypes from pathlib import Path from colorama import Fore, Back, Style from .settings import * if sys.version_info[0] < 3 or sys.version_info[1] <= 5: print("\nPlease restart with Python 3.6+\n") print("Current Python version:", sys.version_info) exit(-1)...
#!/usr/bin/env python ### ### This file is generated automatically by SALOME v9.3.0 with dump python functionality ### import sys import salome salome.salome_init() import salome_notebook notebook = salome_notebook.NoteBook() ### ### GEOM component ### import GEOM from salome.geom import geomBuilder import math im...
from app import create_app from flask_script import Manager,Server # Creating app instance app = create_app('development') manager = Manager(app) manager.add_command('server',Server) @manager.command def test(): """ Run the unit tests. """ import unittest tests = unittest.TestLoader().discover(...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
class GradeCalculator: MAX_FAILING_GRADES_TO_PASS = 2 @staticmethod def normal_promotion_policy(final_grades): failing_grades = GradeCalculator.get_number_of_failing_grades(final_grades) if failing_grades > GradeCalculator.MAX_FAILING_GRADES_TO_PASS: return False retur...
import argparse from preprocessing import generate_and_save_data def create_parser(): parser = argparse.ArgumentParser() parser.add_argument('-dr', default='raw_audio', help='Directory with raw audio', type=str, required=False) parser.add_argument('-sr', default=16000, help='Sample rate of all songs (in H...
#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for NITF driver. # Author: Frank Warmerdam <warmerdam@pobox.com> # ##########################################...
#!/usr/bin/env python3 # Copyright (c) 2016-2019 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 the dumpwallet RPC.""" import os from test_framework.test_framework import BitcoinTestFramework ...
from util import test_remote from util import ID import random class Pool: def __init__(self, pool=None): def app(id, idx): if idx < 10: id = id + "0" return id + str(idx) POOL = \ [app("matrix", i) for i in range(1, 45)] + \ [app("sp...
from engine.Validations import EnvValidations, PjValidations class EnvQuestions: introduction = [ { 'type': 'list', 'name': 'task', 'message': 'Select a environment option to continue:', 'choices': ['create'] } ] load = [ { ...
import platform import warnings import fnmatch import itertools import pytest import sys from fractions import Fraction import numpy.core.umath as ncu from numpy.core import _umath_tests as ncu_tests import numpy as np from numpy.testing import ( assert_, assert_equal, assert_raises, assert_raises_regex, asser...
import numpy as np import io from PIL import Image import torch import torchvision.transforms as transforms from torch.utils.data import Dataset from utils.flowlib import read_flo_file from utils import image_crop, image_resize, image_flow_crop, image_flow_resize, flow_sampler, image_flow_aug, flow_aug class ColorAu...
# -*- encoding: utf-8 -*- # must require Python 3.6+ : (i) f-String, (ii) dotenv
import datetime import json import mimetypes import os import re import sys import time from email.header import Header from http.client import responses from urllib.parse import quote, urlparse from django.conf import settings from django.core import signals, signing from django.core.exceptions import DisallowedRedir...
#!/usr/bin/env python2 # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A simple utility to connect to Chameleond in an interactive shell.""" import argparse import code import logging import os impo...
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com> # See the COPYRIGHT file for more information from __future__ import annotations import struct from typing import Any from twisted.conch import error from twisted.conch.interfaces import IConchUser from twisted.conch.ssh import userauth from twisted.conch....
# Large amount of credit goes to: # https://github.com/keras-team/keras-contrib/blob/master/examples/improved_wgan.py # which I've used as a reference for this implementation from __future__ import print_function, division from keras.datasets import mnist from keras.layers.merge import _Merge from keras.layers impor...
# Copyright 2022 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...
import unittest from is_ipfs import Validator from tests import testing_data class TestCase(unittest.TestCase): def test_is_cid(self): with self.subTest("Test valid CID entries from testing data"): for value in testing_data.valid_entries["cid"].values(): for entry in value: ...
from __future__ import annotations import cv2 import time import numpy as np from typing import Optional, List from .. import __rootdir__ from . import config, detector from .log import logger, save_screenshot from .scene import Scene, SceneComment from .image import bytes2img, loadimg, thres2, cropimg from .matcher ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # toston documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # auto...
# Copyright (c) 2020-2021, NVIDIA CORPORATION & AFFILIATES. 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 ...
#!/usr/bin/env python3 ''' (openpyxl.worksheet package_Submodules)[https://openpyxl.readthedocs.io/en/stable/api/openpyxl.worksheet.html]) (Openpyxl: Working with Styles)[https://openpyxl.readthedocs.io/en/stable/styles.html?highlight=cell%20border#introduction] (RGB Colors)[https://www.rapidtables.com/web/color/RGB_Co...
# -*- coding: utf-8 -*- """View providing a listing of events Suitable for folders or collections Also includes a viewlet which will show the "featured_item" returned by the method on the view. """ from DateTime import DateTime from zope.component import queryUtility from zope.interface import implements from Produ...
# Copyright 2019 TerraPower, 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 agreed to in writi...
from data_warehouse import aws, create_tables, etl def main(): aws.main() create_tables.main() etl.main() print("Done.")
#!/usr/bin/env python2 from __future__ import absolute_import from __future__ import division import argparse import six import string import sys import pwnlib pwnlib.args.free_form = False from pwn import * from pwnlib.commandline import common parser = common.parser_commands.add_parser( 'cyclic', help = "...
#!/usr/bin/env python # -*- coding: UTF-8 -*- #------------------------------------------------------------------------------- """pyzombie HTTP RESTful server handler returning the set of available executables.""" __author__ = ('Lance Finn Helsten',) __version__ = '1.0.1' __copyright__ = """Copyright 2009 Lance Finn He...
import os import time from random import randint from hedera import ( PrivateKey, TopicCreateTransaction, TopicMessageQuery, TopicMessageSubmitTransaction, PyConsumer, ) from get_client import client from jnius import autoclass messagesToPublish = 5 secondsBetweenMessages = 2 # this need to b...
#!/usr/bin/env python import os import signal import subprocess import sys from time import time, sleep, localtime, strftime import getopt import re # modules from parent directory (export PYTHONPATH=<parent_dir>) from mod_stats import * from tabulate import tabulate def usage(exit_code=0): """Display help messa...
from bd import nova_conexao from mysql.connector import ProgrammingError #Criando a tabela 'contatos' tabela_contatos = """ CREATE TABLE contatos( nome VARCHAR(50), tel VARCHAR(40) ) """ #Criando a tabela 'emails' tabela_emails = """ CREATE TABLE emails( id INT AUTO_INCREMENT PRIMARY KEY, ...
import copy import yaml from django.conf import settings from django.contrib import messages from django.contrib.auth.mixins import PermissionRequiredMixin from django.core import signing from django.core.signing import SignatureExpired from django.http import HttpRequest, HttpResponse from django.shortcuts import get...
# Python import pytest import mock from collections import namedtuple # AWX from awx.main.utils.filters import SmartFilter, ExternalLoggerEnabled # Django from django.db.models import Q import six @pytest.mark.parametrize('params, logger_name, expected', [ # skip all records if enabled_flag = False ({'ena...
import os import sys import math import numpy as np import scipy.stats import shutil import logging from osgeo import gdal from osgeo import ogr from osgeo import osr from pygeoprocessing import geoprocessing from invest_natcap.scenic_quality import scenic_quality_core #from invest_natcap.overlap_analysis import ove...
# ================================================================= # # Terms and Conditions of Use # # Unless otherwise noted, computer program source code of this # distribution # is covered under Crown Copyright, Government of # Canada, and is distributed under the MIT License. # # The Canada wordmark and related gr...
""" Django settings for mp project. Generated by 'django-admin startproject' using Django 3.0.3. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os import ...
# -*- coding: utf-8 -*- from django.contrib.auth.models import Group from django.utils.translation import gettext_lazy as _ from django.utils.translation import activate, get_language from django.urls import reverse from actstream.models import (Action, Follow, model_stream, user_stream, ...
import re import numpy import data_algebra import data_algebra.util class RecordSpecification: """ Class to represent a multi-row data record. """ def __init__( self, control_table, *, record_keys=None, control_table_keys=None, strict=False, lo...
# ########################################################################### # # CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP) # (C) Cloudera, Inc. 2021 # All rights reserved. # # Applicable Open Source License: Apache 2.0 # # NOTE: Cloudera open source products are modular software products # made up of hun...
import numpy as np import scipy.stats.stats as sciStats import torch import torch.nn as nn import torch.nn.functional as F import logging from volsim.params import * class CorrelationLoss(nn.modules.loss._Loss): def __init__(self, params:Params, useGPU:bool): super(CorrelationLoss, self).__init__() ...
from cloudmesh_base.util import path_expand from cloudmesh_base.Shell import Shell import os __config_dir_prefix__ = os.path.join("~", ".cloudmesh") __config_dir__ = path_expand(__config_dir_prefix__) def config_file(filename): """ The location of the config file: ~/.cloudmesh/filename. ~ will be expanded ...
# -*- coding: utf8 -*- """ .. module:: lesscpy.lessc.parser :synopsis: Lesscss parser. http://www.dabeaz.com/ply/ply.html http://www.w3.org/TR/CSS21/grammar.html#scanner http://lesscss.org/#docs Copyright (c) See LICENSE for details. .. moduleauthor:: Johann T. Mariusson <jtm@robot.is> """ fr...
class UserMixin: @property def is_annotator(self): return False def has_permission(self, user): if user.active_organization in self.organizations.all(): return True return False
#!/bin/python import roomai.common AllSevenKingPatterns = dict() ### ###numCards AllSevenKingPatterns["p_0"] = ("p_0", 0) ## check AllSevenKingPatterns["p_1"] = ("p_1", 1) AllSevenKingPatterns["p_2"] = ("p_2", 2) AllSevenKingPatterns["p_3"] = ("p_3", 3) AllSevenKingPatterns["p_4"] = ("p_4", 4) point_str_to_rank = ...
import numpy as np import pytest from acoustics import Signal from acoustics.atmosphere import Atmosphere #from auraliser.propagation import apply_atmospheric_absorption @pytest.fixture def fs(): return 44100. @pytest.fixture def frequency(): return 1000. #def test_atmospheric_attenuation(fs, frequency): ...
# -*- coding: utf-8 -*- """ Created on Fri Jul 2 22:02:11 2021 @author: Administrator """
############################################################################## # # Copyright (c) 2012 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
#!/usr/bin/env python3 # # Copyright (c) 2020 Roberto Riggio # # 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 applicabl...
""" WSGI config for StudentiUniMi project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'StudentiUniMi.settings') application = get_wsgi_application()
# Autogenerated from KST: please remove this line if doing any edits by hand! import unittest from position_in_seq import _schema class TestPositionInSeq(unittest.TestCase): def test_position_in_seq(self): r = _schema.parse_file('src/position_in_seq.bin') self.assertEqual(r.numbers, [(0 + 1), 2, ...
# -*- 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 -*- from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('hs_core', '0014_auto_20151123_1451'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migratio...
# -*- coding: utf-8 -*- from six.moves.urllib.parse import quote, unquote, urlparse, urlencode import hmac import time import hashlib import logging from requests.auth import AuthBase from .cos_comm import to_unicode, to_bytes, to_str logger = logging.getLogger(__name__) def filter_headers(data): """只设置host cont...
# Copyright 2020 MONAI Consortium # 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, s...
from tkinter.tix import * import sys sys.path.append('../') from CommandPrompt import CommandExecutor as CLE class FolderPrinter: def __init__(self): self._commandExecutor = CLE.CommandExecutor() self._mainWindow = None self._buttonsForFolderContent = [] self._currOpenFile = None ...
"""Test discovery of entities for device-specific schemas for the Z-Wave JS integration.""" async def test_iblinds_v2(hass, client, iblinds_v2, integration): """Test that an iBlinds v2.0 multilevel switch value is discovered as a cover.""" node = iblinds_v2 assert node.device_class.specific == "Unused" ...
from collections import defaultdict import logging import os import maya.cmds as cmds from openpype.hosts.maya.api import lib from avalon import io, api from .vray_proxies import get_alembic_ids_cache log = logging.getLogger(__name__) def get_workfile(): path = cmds.file(query=True, sceneName=True) or "unti...
# Copyright 2018 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 agreed to in writing, ...
from .util import six from .config import Config from .parser import ParserContext from .util import debug, is_iterable from .tasks import Call, Task class Executor(object): """ An execution strategy for Task objects. Subclasses may override various extension points to change, add or remove behavior...