input
stringlengths
2.65k
237k
output
stringclasses
1 value
return True; ## @} def generateOneStdTestGregGreg(self, oGen, cbEffOp, cbMaxOp, iOp1, iOp1X, iOp2, iOp2X, uInput, uResult): """ Generate one standard instr greg,greg test. """ oGen.write(' call VBINSTST_NAME(Common_LoadKnownValues)\n'); oGen.write(' mov %s, 0x%x\n' % (oGen.oTarget.asGRegs[iOp2X], uInput,)); if ...
<reponame>igg002/stylegan2-ada-pytorch<gh_stars>0 # Experimental Version # # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any...
ask_permission: bool, default True. If True, gives an interactive prompt so that the user can manually choose which changes in the resultset should be made. overwrite: bool, default True. If False, create a new file rather than overwriting the original. If the last FileReader in this GorpHandler was looking at (fi...
import sys import queue import random import time import copy import numpy as np from multiprocessing import Process,Queue file_path=sys.argv[1] termin_time=sys.argv[3] random_seed=sys.argv[5] start=time.time() random.seed(random_seed) f=open(file_path,encoding='utf-8') sentimentlist = [] for line in f: s = line.st...
# # Copyright (c) 2018, Salesforce, Inc. # The Board of Trustees of the Leland Stanford Junior University # 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 ...
<gh_stars>1-10 #!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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/LICENS...
<filename>cinder/volume/drivers/violin/vxg/vshare/lun.py #!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Violin Memory, 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. ...
<reponame>haysengithub/climate_indices import logging import numba import numpy as np from enum import Enum from climate_indices import compute, eto, palmer, utils # declare the names that should be included in the public API for this module __all__ = ["pdsi", "percentage_of_normal", "pet", "scpdsi", "spei", "spi"] ...
payload_location = "NOT SET" link_true_false="False" def help(): os.system('cls||clear') print("""\033[37m ============================== \033[31mMalware Lab Panel\033[37m ============================== \033[31mCore Commands\033[37m set payload 'number' Set the specific payload to generate, #Example: set payloa...
<gh_stars>1-10 import collections import copy import datetime import errno import fcntl import fnmatch import glob import inspect import json import multiprocessing import os import os.path import pprint import re from ruamel.yaml import YAML import scapy.all as scapy import signal import socket import subprocess impor...
parameter `repo` when calling `packages_validate_upload_docker`") collection_formats = {} path_params = {} if 'owner' in params: path_params['owner'] = params['owner'] if 'repo' in params: path_params['repo'] = params['repo'] query_params = [] header_params = {} form_params = [] local_var_files = {} b...
bulges += [new_bulge] self.from_stems_and_bulges(stems, bulges) def sort_defines(self): """ Sort the defines of interior loops and stems so that the 5' region is always first. """ for k in self.defines.keys(): d = self.defines[k] if len(d) == 4: if d[0] > d[2]: new_d = [d[2], d[3], d[0], d[1]] self.define...
-> Optional[pulumi.Input[str]]: return pulumi.get(self, "reported_os_version") @reported_os_version.setter def reported_os_version(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "reported_os_version", value) @property @pulumi.getter(name="rootBlockDevices") def root_block_devices(self) -> Optional...
""" Module implementing the communication layer of HeAT """ from __future__ import annotations import numpy as np import os import subprocess import torch from mpi4py import MPI from typing import Any, Callable, Optional, List, Tuple, Union from .stride_tricks import sanitize_axis CUDA_AWARE_MPI = False # check whe...
<filename>galaxy_ml/tools/keras_train_and_eval.py<gh_stars>0 import argparse import joblib import json import numpy as np import os import pandas as pd import warnings from itertools import chain from scipy.io import mmread from sklearn.pipeline import Pipeline from sklearn.metrics._scorer import _check_multimetric_sco...
else: data_index_maps = {} data_arrays = {} # TODO: What other convenience attributes do we need? self._nodes_by_type = None # This stores the feature vectors per node type as numpy arrays self._node_attribute_arrays = data_arrays # This stores the map between node ID and index in the attribute arrays self._...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __version__ = 1.00 import os import json import logging from os import replace import pprint import pymysql import pynetbox import requests import slugify import socket import struct import urllib3 import urllib.parse import re from time import sleep import yaml import co...
test more simple. detections = sorted(detections[0, 0, :, :], cmp=lambda x, y: -1 if x[1] < y[1] and x[2] < y[2] else 0) np.save('ssd_mobilenet_v1_coco.detection_out.npy', detections) ################################################################################ inp = tf.placeholder(tf.float32, [1, 2, 3, 4], 'input...
# -*- test-case-name: twisted.python.test.test_components -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Component architecture for Twisted, based on Zope3 components. Using the Zope3 API directly is strongly recommended. Everything you need is in the top-level of the zope.interface ...
import json import stat import datetime import base64 from flask import request from anchore_engine import utils from anchore_engine.clients import catalog import anchore_engine.services.common from anchore_engine.subsys import taskstate, logger import anchore_engine.configuration.localconfig import anchore_engine.cl...
version max:`` None | ``required:`` False | ``default:`` USER :param Origination: Identifies the source of the credential. 'NETC' indicates an internal credential that may be modified or removed during upgrade processes. 'USER' indicates a user-entered credential. :type Origination: String | ``api version min:``...
for sample in data: c = sample[0].split('<eou>') c = [i.strip() for i in c] c.append(sample[1]) contexts.append(c) # retrieval list retrieval_list.append(sample[2:2+retrieval_size]) for context, retrieval in tqdm(list(zip(contexts, retrieval_list))): bundle = dict() bundle['context_text'] = ''.join(context) i...
# Import necessary modules import sqlite3 import pandas as pd from pandas import DataFrame from datetime import datetime as dt ########### ## MENUS ## ########### main_menu = ''' ########################################################## What would you like to do today? 1 --- Login as Librarian 2 --- Login as Us...
<filename>Lib/fontTools/pens/momentsPen.py """Pen calculating 0th, 1st, and 2nd moments of area of glyph shapes. This is low-level, autogenerated pen. Use statisticsPen instead.""" from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools.pens.basePen import BaseP...
None: for key, value in kwargs.items(): if key in kwargs_special: request["$"+key] = value elif key in kwargs_keys: request[key] = value else: raise Exception("unsupported key '"+key+"'") return(Experiments(self, "Experiments", "/api/v1/experiments", request, "experimentID", 5, self.experiment)) def studie...
<gh_stars>0 import json import logging import os import pkg_resources import platform import re import subprocess as sp import sys import conda_helpers as ch import mpm import mpm.commands import mpm.bin import pandas as pd import path_helpers as ph import yaml try: import gtk except ImportError: GUI_AVAILABLE = Fal...
speed is the same that you have set in *jetson.fan.speed* :return: Status Fan :rtype: Fan :raises ValueError: Wrong speed number or wrong mode name """ return self._fan @property def nvpmodel(self): """ From this function you set and read NV Power Mode. If your NVIDIA Jetson does not use nvpmodel will return...
<reponame>Ciantic/diskimgtools """ Disk Image Creator :author: <NAME> :license: MIT :version: 2019-07-28 """ DESCRIPTION = """ Disk Image Creator (.img) - Partitions and copies files to img file Source code: https://github.com/Ciantic/diskimgcreator ## Defining partitions Define partitions as directories, .tar or ....
to unlimited power / Any devices', 'k5': 'Yes', 'k6': 'No'}, {'k1': 'China', 'k2': '0,00 €', 'k3': '0', 'k4': 'Yes up to unlimited power / Any devices', 'k5': 'No', 'k6': 'No'}, {'k1': 'North Korea', 'k2': '0,00 €', 'k3': '0', 'k4': 'Yes up to unlimited power / Any devices', 'k5': 'No', 'k6': 'No'}, {'k1': 'South Ko...
<filename>stubs/micropython-v1_12-pyboard/stm.py<gh_stars>0 """ Module: 'stm' on micropython-v1.12-pyboard """ # MCU: {'ver': 'v1.12', 'port': 'pyboard', 'arch': 'armv7emsp', 'sysname': 'pyboard', 'release': '1.12.0', 'name': 'micropython', 'mpy': 7685, 'version': '1.12.0', 'machine': 'PYBv1.1 with STM32F405RG', 'build...
- Specifies the default action of allow or deny when no other rules match. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny' """ return pulumi.get(self, "default_action") @default_action.setter def default_action(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "default_action", value)...
os.path.exists(p): os.mkdir(p) return p def create_voice_dir(): global STATICRESOURCE_DIR, UPLOAD_VOICE_DIR if not os.path.exists(UPLOAD_VOICE_DIR): os.mkdir(UPLOAD_VOICE_DIR) def check_voice_file_by_fault(id): global STATICRESOURCE_DIR, UPLOAD_VOICE_DIR create_voice_dir() ret = False for fn in os.listdir(U...
## # @file # This file is part of SeisSol. # # @author <NAME> (c.uphoff AT tum.de, http://www5.in.tum.de/wiki/index.php/Carsten_Uphoff,_M.Sc.) # # @section LICENSE # Copyright (c) 2015, SeisSol Group # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permit...
<gh_stars>0 """ Library Features: Name: lib_wrf_variables Author(s): <NAME> (<EMAIL>) Date: '20210522' Version: '1.1.0' """ ####################################################################################### # Library import logging import numpy as np import pandas as pd from src.hyde.algorithm.io.nwp.wrf.lib_wr...
import copy import json, ast, filecmp, itertools import os, shutil, ast from threading import Thread from subprocess import Popen, PIPE, check_output, STDOUT, CalledProcessError from TestInput import TestInputSingleton, TestInputServer from alternate_address.alternate_address_base import AltAddrBaseTest from membase.a...
supported,") tolog(". otherwise this job will fail") elif not some_transferred: tolog(". No files (%d/%d) were transferred or registered" % (nr_transferred, nr_files)) if nr_files > 1: tolog(". The files will be transferred and registrered by a later pilot if job recovery is supported,") else: tolog(". The file ...
with the given parameters time_arr = timeFromLen(len_arr, t0, l0, v0, v_inf, sigma, c, zr, dens_interp) # Sum of squared residuals cost = np.sum((time_target - time_arr)**2) # # Sum of absolute residuals # cost = np.sum(np.abs(time_target - time_arr)) print("Cost = {:16.10f}, guess: l0 = {:7.3f}, v0 = {:6.3f},...
<reponame>kellrott/udocker #!/usr/bin/env python """ udocker unit tests: LocalRepository """ from unittest import TestCase, main from unittest.mock import patch, mock_open, call from udocker.container.localrepo import LocalRepository from udocker.config import Config BUILTIN = "builtins" BOPEN = BUILTIN + '.open' UDO...
for s in self.ivs]) overwrite['ivs'] = new_ivs overwrite['form'] = 'Purified' overwrite['shadow'] = False # TODO: replace frustration with return new = self.copy(**overwrite) return new def family(self, ancestors=True, node=False, onlyadj=False): """ Get other members of this pokemon family Yields: Pokemon...
# -*- coding: utf-8 -*- """ Created on Tue Jun 25 08:19:27 2019 @author: SESA539950 """ from scipy.optimize import fsolve import numpy as np simulation = ["AC Unit", "Ventilation Fans (Economizer Mode)"] simulation_options = ["AC Fans on UPS", "Vent Fans on UPS"] simulation01 = [ "AC Unit", "Front Ventilation Fan...
<filename>ci/test.py #! /usr/bin/env python3 # # Copyright 2019-2020 Garmin Ltd. or its subsidiaries # # 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...
# -*- coding: utf-8 -*- # # Copyright 2016 The Fabulous 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...
-extensions v3_ca -out CA_rsa_cert.pem -subj '/C=SG/ST=Singapore/L=Singapore/O=Infineon Technologies/OU=DSS/CN=TPMEvalKitCA'\n") self.text_server.AppendText("++++++++++++++++++++++++++++++++++++++++++++\n") def OnGenKeyPair1(self, evt): self.text_server.AppendText("Generating SERVER key-pair...\n") wx.CallLater(10...
import json import textwrap import typing as t from collections import defaultdict from contextlib import suppress from discord import Color, Embed, Member, TextChannel, Forbidden from discord.errors import HTTPException from discord.ext.commands import Cog, ColourConverter, Context, group from bot.core.bot import Bo...
#!/usr/bin/env python """ TUI based Python Chess Program """ from __future__ import print_function import os CLEAR='clear' # CLEAR='cls' # For Windows ch = [[' '] * 8 for i in range(8)] def init(): ch[0][0] = 'R ' ch[0][1] = 'N ' ch[0][2] = 'B ' ch[0][3] = 'Q ' ch[0][4] = 'K ' ch[0][5] = 'B ' ch[0][6] = 'N...
value in context.items() } self.assertEqual( full_context["message"], "Sorry, you do not have permission to access this area.", ) self.login(user=self.moderator) response = self.get() self.assertEqual(response.status_code, 200) class TestCreateTaskView(TestCase, WagtailTestUtils): def setUp(self): delete_e...
Depth {0}. Expanding: {1}: {2!r}".format( parse_context.parse_depth, stmt.__class__.__name__, curtail_string(stmt.raw, length=40)) verbosity_logger(frame_msg(parse_depth_msg), verbosity=parse_context.verbosity) res = stmt.parse(parse_context=parse_context) if isinstance(res, BaseSegment): segs += (res,) e...
'x', ['float32', 'float64'], 'avg_pool2d') kernel_size = utils.convert_to_list(kernel_size, 2, 'pool_size') if stride is None: stride = kernel_size else: stride = utils.convert_to_list(stride, 2, 'pool_stride') padding_algorithm = "EXPLICIT" if isinstance(padding, str): padding = padding.upper() if padding no...
self.gds_get_node_lineno_() self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on stringMaxLength30' % {"value" : encode_str_2_3(value), "lineno": lineno} ) result = False return result def hasContent_(self): if ( self.name is not None or self.telephoneNumber is...
name) self.rank = _cast(None, rank) if label is None: self.label = [] else: self.label = label def factory(*args_, **kwargs_): if layerType.subclass: return layerType.subclass(*args_, **kwargs_) else: return layerType(*args_, **kwargs_) factory = staticmethod(factory) def get_label(self): return self.label ...
""" # measurements of the other particle if particle is None: particle = self._generator.generate().T x = particle[:,0] y = particle[:,1] z = particle[:,2] extent = [[x.min(), x.max()], [y.min(), y.max()], [z.min(), z.max()]] grid_res = self.grid_res grid_res_sqr = grid_res**2 # limits for random positioni...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T N A N O # # Copyright (c) 2020+ <NAME> + <NAME> # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # ------------------------------------...
<reponame>eliclement/orm import typing import databases import sqlalchemy import typesystem from sqlalchemy.ext.asyncio import create_async_engine from orm.exceptions import MultipleMatches, NoMatch from orm.fields import Date, DateTime, String, Text FILTER_OPERATORS = { "exact": "__eq__", "iexact": "ilike", "con...
raise ValueError( "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) ) if 'sort_order' in kwargs: sort_order_allowed_values = ["ASC", "DESC"] if kwargs['sort_order'] not in sort_order_allowed_values: raise ValueError( "Invalid value for `sort_order`, must be one of {0}".format(sort...
0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.0958855, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic'...
<filename>kubernetes/client/apis/apps_v1beta1_api.py # coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import ab...
#!/usr/bin/env python """ Tests for the utilities module. .. codeauthor:: <NAME> <<EMAIL>>, Yale University """ import ctypes import logging import os from dataclasses import dataclass from pathlib import Path from typing import Any, Dict, Iterator, Tuple import numpy as np import pytest import uproot from pachyde...
# _________ .__ __ .__ # \_ ___ \ ____ _____ ______ ____ _____|__|/ |_|__| ____ ____ # / \ \/ / _ \ / \\____ \ / _ \/ ___/ \ __\ |/ _ \ / \ # \ \___( <_> ) Y Y \ |_> > <_> )___ \| || | | ( <_> ) | \ # \______ /\____/|__|_| / __/ \____/____ >__||__| |__|\____/|___| / # \/ \/|__| \/ \/ """ Signifier module to manage the...
<reponame>thanever/SOC from numpy import array def scigrid_2011_01_04_06(): ppc = {"version": '2'} ppc["baseMVA"] = 100.0 ppc["bus"] = array([ [586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ], [589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ], [590, 2, 0, 0, 0, 0, 0, 1.0...
for structure. Keyword arguments: completed_dir (str): folder for completed jobs. keep (bool): whether to also move intermediate files. skip_existing (bool): if True, skip files that already exist, otherwise throw an error. """ completed_dir = self.root_folder + '/' + completed_dir LOG.info('Moving files to c...
TIE = "Tie" HEADER_LENGTH = 6 ANONYMOUS = 'unknown' # A helper that splits the string into a list of words. def get_pure_wordlist(tweet): """ (str) -> list of str Return a list of string containing all words ending with alphanumerics. >>> get_pure_wordlist('Hello! @Leehom- @StarWay.') ['hello', '@leehom', '@s...
ll in layers[i+1:]: # pp = set(kl_dict[ll]) # d = pp - p # kl_dict[ll] = list(d) kl_prefix = list(kl_df.loc[:, "prefix"]) kl_array_file = {p: m for p, m in zip(kl_df.prefix, kl_df.mlt_file)} self.logger.statement("kl_prefix: {0}".format(str(kl_prefix))) fac_file = os.path.join(self.m.model_ws, "kl.fac") self...
xml) self.cache(obj) # Will cache either a real object, or a BioCycEntityNotFound if obj: # Found objs.append(obj) else: # Not found (BioCycEntityNotFound) objs.append(None) if t != list: return objs[0] else: return objs def create_obj_from_xml(self, id, xml): # Get the object type from the returned...
# Copyright 2016 Google 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, soft...
[1, 1, 1], [2, 2, 2], [3, 3, 3]]) >>> extend_array(a, 3, 1).shape (4, 3) >>> a=arange(4).reshape(2,2) >>> extend_array(a, 3, 0).shape (3, 2, 2) >>> extend_array(a, 3, 1).shape (2, 3, 2) >>> extend_array(a, 3, 2).shape (2, 2, 3) >>> extend_array(a, 3, 2)[...,0] array([[0, 1], [2, 3]]) >>> extend_array(a, ...
<filename>editregions/admin/modeladmins.py # -*- coding: utf-8 -*- from __future__ import unicode_literals from functools import update_wrapper import logging from django.conf import settings from django.utils.html import strip_tags try: from django.utils.six.moves import urllib_parse urlsplit = urllib_parse.urlspli...
the tracking for the device - Eg. "enable", "disable", or "default" . Defaults to "default. Returns: None Raises: SubCommandFailure: Failed to add static entry """ cmd = "device-tracking binding vlan {vlan} {address} interface {interface} {mac} tracking {tracking}" cmd = cmd.format(vlan=vlan, address=address, in...
'az' and 'el' b.compute(self.equipment["Antenna"]) source = b.to_dict() if filter_fn(source): sources[source_name] = source else: self.logger.error( "get_sources: Couldn't find source {}".format(source_name)) now = ephem.now() self.logger.debug( "get_sources: setting Antenna's date to {}".format(now)) self.e...
gca_tensorboard_time_series.TensorboardTimeSeries() client.update_tensorboard_time_series(request) # Establish that the underlying gRPC stub method was called. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] assert args[0] == request # Establish that the field header was sent. _, _, kw = call....
<gh_stars>0 # Copyright (c) 2018-2019, NVIDIA CORPORATION # Copyright (c) 2017- Facebook, 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: # # * Redistributions of source code must retain the...
<filename>fjord/feedback/models.py from datetime import datetime import urlparse from django.core.cache import cache from django.core.exceptions import ValidationError from django.db import models from elasticutils.contrib.django import Indexable from rest_framework import serializers from tower import ugettext_lazy ...
#------------------------------------------------------------------------------ # Copyright (c) 2009 <NAME> # # 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 wi...
import tensorflow as tf from tensorflow_probability import distributions as tfd from .AbstractModule import AbstractModule from ..utils.argo_utils import load_sonnet_module class GeneralSonnetNetwork(AbstractModule): """Intermediate class to build a customizable Network (to be used as a building block from an ArgoN...
<gh_stars>1-10 import numpy as np from Projects.base.util.print_tools import seq_to_str from Projects.base.game.darkHex import DarkHex from Projects.base.game.hex import Hex, pieces from tqdm import tqdm from copy import deepcopy, copy from collections import defaultdict import pickle class Node: def __init__(self, b...
`create_component_version_stage`") # noqa: E501 # verify the required parameter 'name' is set if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 local_var_params['name'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `create_...
queue: OpenCL Command Queue :type queue: pyopencl.CommandQueue :param q_id: Framework specific id assigned to Command Queue :type q_id: Integer :param obj: OpenCL Device Type :type obj: String :param size_percent: Percentage of problem space to be processed :type size_percent: Integer :param offset_percent: Per...
* Sx + mean_dest_x coord_init_pix_scaleXinv = np.copy(coord_init_pix) coord_init_pix_scaleXinv[:, 0] = (coord_init_pix[:, 0] - mean_dest_x) / float(Sx) + mean_src_x # apply transformation to image from skimage.transform import warp row_scaleXinv = np.reshape(coord_init_pix_scaleXinv[:, 0], [nx, ny]) src2d_scaleX ...
<filename>tests/test_sparql_custom_evals_survol.py #!/usr/bin/env python from __future__ import print_function import os import sys import subprocess import tempfile import rdflib import unittest import psutil from init import * update_test_path() import lib_util import lib_kbase import lib_sparql_custom_evals su...
<filename>beampy/interface.py<gh_stars>10-100 # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'interface.ui' # # Created by: PyQt5 UI code generator 5.15.1 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what ...
# -*- coding: utf-8 -*- from collections import OrderedDict from re import IGNORECASE, compile import pytest from nerodia.elements.html_elements import HTMLElement from nerodia.exception import LocatorException from nerodia.locators.element.selector_builder import SelectorBuilder ATTRIBUTES = HTMLElement.ATTRIBUTES...
<filename>test/integration/component/test_vpn_users.py # 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 ...
#!/usr/bin/env python # -*- coding: latin-1 -*- # from __future__ import print_function import unittest from mock import Mock from hoft import ArgsNotAnalysedError, IGNORE, KeywordError, NOVALUE, NotAnalysedError, \ PositionalError, analyse_sig from tests.helpers import check_calls class _Success(Exception): pa...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
<reponame>musevlt/mpdaf<filename>lib/mpdaf/sdetect/source.py """ Copyright (c) 2010-2018 CNRS / Centre de Recherche Astrophysique de Lyon Copyright (c) 2015-2017 <NAME> <<EMAIL>> Copyright (c) 2015-2019 <NAME> <<EMAIL>> Copyright (c) 2015-2019 <NAME> <<EMAIL>> Copyright (c) 2015-2019 <NAME> <<EMAIL>> Copyright (c) 2016...
and number of sites in cells differ after a primitive cell reduction (divisible by an integer) attempts to generate a supercell transformation of the smaller cell which is equivalent to the larger structure. allow_subset (bool): Allow one structure to match to the subset of another structure. Eg. Matching of an or...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020 Alibaba Group Holding Limited. 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...
'SRM spectrum', } othertypes = { # other accession keys (non-MS) 'MS:1000620': 'PDA spectrum', 'MS:1000804': 'electromagnetic radiation spectrum', 'MS:1000805': 'emission spectrum', 'MS:1000806': 'absorption spectrum', } out = {} if isinstance(hand, CVParameterSet): # handed a cvparam class object (expected) ...
:param context: Context of the visualization :param embed_ui: Whether the UI is embed within the VTK window :param embed_font_size: Embed font size. Defaults to 16 points. You might need larger values in case you have a small screen with high dpi (but VTK methods fail to detect that). :param jupyter: Whether we're ...
# This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function import matplotlib.cm import matplotlib.colors import matplotlib.patches import numpy as np import pylab as plt from matplotlib.ticker import FixedFormatter import functools...
<reponame>JoseAndresMR/jamrepo #!/usr/bin/env python2 # -*- coding: utf-8 -*- #!/usr/bin/env python2 # -*- coding: utf-8 -*- # ---------------------------------------------------------------------------------------------------------------------- # ROS-MAGNA # ----------------------------------------------------------...
<gh_stars>10-100 """Module containing class `Calculator`.""" import math import operator class CalculatorError(Exception): pass class Calculator: """ Postfix calculator. An instance of this class evaluates postfix expressions, with a focus on arithmetic and boolean logic. The syntax and semantics of the...
<filename>andesite/models/filters.py """Andesite audio filters. Attributes: FILTER_MAP (Mapping[str, Type[Filter]]): Mapping from filter name to filter class. See: `get_filter_model`. FilterMapLike (Union[FilterMap, Dict[str, Union[Filter, RawDataType]]]): (Type alias) Type of objects which can be used as filter m...
<gh_stars>1-10 """ File: tertian_chord_template.py Purpose: Class that defines a tertian chord in all its variations. """ from harmonicmodel.chord_template import ChordTemplate from tonalmodel.interval import Interval, IntervalType from tonalmodel.diatonic_tone import DiatonicTone from harmonicmodel.tertian_chord im...
<reponame>deepsphere/deepsphere-weather<filename>modules/utils_autoregressive.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 15 17:00:54 2021 @author: ghiggi """ import numpy as np import matplotlib.pyplot as plt #-----------------------------------------------------------------------------. ...
import discord import inspect import aiohttp import re import threading import config import datetime as dt from .player import Player from .discord_server import Server from .utils import Utils from threading import Timer from discord_components import ( Button, ButtonStyle, DiscordComponents ) class Client(disc...
"""Create OpenEye fingerprints """ # Copyright (c) 2010 <NAME> Scientific, AB (Gothenburg, Sweden) # Licensed under "the MIT license" # See the contents of COPYING or "__init__.py" for full license details. from __future__ import absolute_import import sys import os import errno import ctypes import warnings impor...
#!/usr/bin/env python3 import argparse import shutil from collections import namedtuple import dxpy import glob import hashlib import json import os import random import re import sys import subprocess import tempfile from termcolor import cprint import time import traceback from typing import List import yaml from dxp...
Since # the get_next_pep_hint_child_str() method increments *BEFORE* # stringifying this ID, initializing this ID to -1 ensures that method # returns a string containing only non-negative substrings starting at # 0 rather than both negative and positive substrings starting at -1. hint_child_placeholder_id = -1 #...
<reponame>ggirelli/radiantkit """ @author: <NAME> @contact: <EMAIL> """ import argparse import configparser as cp import logging import numpy as np # type: ignore import os import radiantkit as ra from radiantkit import argtools as ap from radiantkit import image as imt from rich.progress import track # type: ignore f...
Ignored if `get_mineral_sat` is False. get_redox : bool, default True Calculate potentials of redox couples? redox_type : str, default "Eh" Desired units of measurement for reported redox potentials. Can be "Eh", "pe", "logfO2", or "Ah". Ignored if `get_redox` is False. get_ion_activity_ratios : bool, defa...