input
stringlengths
2.65k
237k
output
stringclasses
1 value
multiplies them by `P` and compositions. Returns ------- fugacities : list[float] Fugacities, [Pa] ''' P = self.P lnphis = self.lnphis_at_zs(zs) return [P*zs[i]*trunc_exp(lnphis[i]) for i in range(len(zs))] def lnphi(self): r'''Method to calculate and return the log of fugacity coefficient of the phase; p...
[3393, 80.10075151], [3394, 80.10445042], [3394, 79.74884672], [3396, 80.39176952], [3397, 79.75273925], [3398, 79.80364796], [3398, 79.77673955], [3399, 79.96147169], [3401, 79.81509581], [3402, 79.2488253], [3402, 79.29367556], [3403, 79.33729744], [3405, 78.84174034], [3406, 78.66886552], [3407, 78.904...
<reponame>noisyoscillator/qiskit-aqua # -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.ap...
<gh_stars>0 # Copyright 2018 Brocade Communications Systems LLC. 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 also obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
<reponame>ShenhanQian/SpeechDrivesTemplates import os from datetime import datetime import logging import time from abc import abstractmethod import matplotlib as mpl import numpy as np import torch from torch import nn from torch.utils.tensorboard import SummaryWriter from torch.utils.data import DataLoader from cor...
'test_feature_in_experiment', 'feature_enabled': False, 'source': 'rollout', 'variable_key': 'count', 'variable_value': 999, 'variable_type': 'integer', 'source_info': {}, }, ) mock_client_logger.info.reset_mock() # String with mock.patch( 'optimizely.decision_service.DecisionService.get_variation_for_fea...
<reponame>chris-angeli-rft/cloud-custodian # Copyright 2019 Capital One Services, 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...
import torch # math import numpy as numpy import numpy as np import math from numpy.linalg import inv import random from itertools import cycle # io from PIL import Image # torchvision import sys sys.path.insert(0, '../pytorch-segmentation-detection/vision/') # from subrepo from torchvision import transforms from de...
<reponame>wi11dey/pylabnet import numpy as np import copy class Channel: """ Class to represent a signal channel. """ def __init__(self, name, is_analog): self.name = name self.is_analog = is_analog def __repr__(self): return f"Channel({self.name}, {self.is_analog})" def __eq__(self, other): if not isinst...
sage: G.radius() 5 sage: G.diameter() 5 sage: G.girth() 6 Its chromatic number is `2` and its automorphism group is of order `192`:: sage: G.chromatic_number() 2 sage: G.automorphism_group().cardinality() 192 It is a non-integral graph as it has irrational eigenvalues:: sage: G.characteristic_polynomia...
<reponame>ritchie46/flopy import os import platform import socket import copy import json import numpy as np from datetime import datetime import time from .metadata import acdd import flopy # globals FILLVALUE = -99999.9 ITMUNI = {0: "undefined", 1: "seconds", 2: "minutes", 3: "hours", 4: "days", 5: "years"} PRECISI...
#!/usr/bin/python # logging should be setup first so imported modules' logging is configured too import os from vai.dpuv1.rt import logging_mp log_file = os.environ['VAI_ALVEO_ROOT'] + "/neptune/logging.ini" logging_mp.setup_logger(log_file, 'neptune') from datetime import datetime import json import signal import th...
_dst_type, bool _normalized, int _ksize, int _border_mode=1) init(self, int _max_width, int _src_type, int _dst_type, bool _normalized, int _ksize) init(self, int _max_width, int _src_type, int _dst_type, bool _is_separable, CvSize _ksize, CvPoint _anchor=cvPoint(-1,-1), int _border_mode=1, CvScalar _border_v...
directly passed to the corresponding plotting tools of the ParaMonte library to draw the corresponding subplots, if they are activated. Example usage: .. code-block:: python layout.contour.contour.kws.colors = "blue" currentFig A structure whose attributes are the outputs of various plotting tools used ...
certain uses of the "is" operator, like those involving comparisons between instance methods, or constants. Check their documentation for more info. [5] The "%" operator is also used for string formatting; the same precedence applies. [6] The power operator "**" binds less tightly than an arithmetic or bitwise un...
import atexit import os import threading import time from collections import OrderedDict from sys import version_info if version_info[0] >= 3: import configparser as ConfigParser else: import ConfigParser _MODE_NAV = 'navigate' _MODE_ADJ = 'adjust' _MODE_TXT = 'entry' class MenuIcon: arrow_left = [0, 0, 8, 24, ...
+ m.b184 - m.b260 <= 0) m.c3669 = Constraint(expr= - m.b179 + m.b185 - m.b261 <= 0) m.c3670 = Constraint(expr= - m.b180 + m.b181 - m.b262 <= 0) m.c3671 = Constraint(expr= - m.b180 + m.b182 - m.b263 <= 0) m.c3672 = Constraint(expr= - m.b180 + m.b183 - m.b264 <= 0) m.c3673 = Constraint(expr= - m.b180 + m.b184 - m.b2...
<gh_stars>1-10 import numpy as np import copy #np.random.seed(0) nc = 0 #import pylab def comupute_enhanced(proba, actual_pos,cascade={}): #assert() infl = cascade["infl"] #,50) amount = cascade["amount"] #,4) down = cascade["down"]#,10) damount = cascade["damount"]#,1 / 10000.) cproba = np.zeros_like(proba)...
equal to the storage space allowed to the Grid member with the smallest amount of space allowed. """ _infoblox_type = 'grid:filedistribution' _fields = ['allow_uploads', 'backup_storage', 'current_usage', 'enable_anonymous_ftp', 'global_status', 'name', 'storage_limit'] _search_for_update_fields = ['name'] _upd...
"""Cascade RCNN Model.""" from __future__ import absolute_import import os import mxnet as mx from mxnet import autograd from mxnet.gluon import nn from .rcnn_target import RCNNTargetSampler, RCNNTargetGenerator from ..rcnn import RCNN2 from ..rpn import RPN from ...nn.coder import NormalizedBoxCenterDecoder, MultiPer...
status = utools._verify_version("tarballfile") self.assertEqual(status, (False, '')) mock_call.return_value = 0 mock_verok.return_value = False mock_isfile.return_value = True status = utools._verify_version("tarballfile") # self.assertEqual(status, (False, '')) mock_call.return_value = 0 mock_verok.return_va...
<gh_stars>10-100 import re import logging from ..common.optconst import * from .lgmisc import LGParseError from typing import List, Optional, Union, Tuple from decimal import Decimal """ Utilities for parsing postscript notated tokens and links, returned by Link Grammar API method Linkage.postscript() """ __all__ ...
import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt import numpy as np import h5py import copy import time import os from whacc import utils def isnotebook(): try: c = str(get_ipython().__class__) shell = get_ipython().__class__.__name__ if 'colab' in c: return True elif shell =...
from typing import Dict, List, Optional, Tuple from datetime import datetime, timedelta from cachetools import TTLCache from pandas import DataFrame, Series import numpy as np ## Indicator libs import talib.abstract as ta from finta import TA as fta import technical.indicators as ftt from technical.indicat...
visible at higher resolutions; when zoomed-out the available area will be displayed as a shaded region. The surface reflectance geometric median (geomedian) is a pixel composite mosaic of a time series of earth observations. The value of a pixel in a an annual geomedian image is the statistical median of all observatio...
(module 'network'): ns3::Socket::SocketType [enumeration] module.add_enum('SocketType', ['NS3_SOCK_STREAM', 'NS3_SOCK_SEQPACKET', 'NS3_SOCK_DGRAM', 'NS3_SOCK_RAW'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network') ## socket.h (module 'network'): ns3::SocketAddressTag [class] module.add_class(...
= np.dot(L, LAMBDA_LTXTAcorrY) sigma2 = np.mean(YTAcorrY - np.sum(LTXTAcorrY * LAMBDA_LTXTAcorrY, axis=0))\ / (n_T - n_X0) LL = n_V * (-np.log(sigma2) * (n_T - n_X0) * 0.5 + np.log(1 - rho1**2) * n_run * 0.5 - self._half_log_det(X0TAX0) - self._half_log_det(LAMBDA_i)) deriv_L = np.dot(XTAcorrY, LAMBDA_LTXTAco...
<reponame>nsankar/AutoTS """Tools for generating and forecasting with ensembles of models.""" import datetime import numpy as np import pandas as pd import json from autots.evaluator.auto_model import PredictionObject from autots.evaluator.auto_model import create_model_id def Best3Ensemble( ensemble_params, foreca...
<gh_stars>0 # coding: utf-8 """ ThingsBoard REST API For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>. # noqa: E501 OpenAPI spec version: 2.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-code...
from .functions import defun, defun_wrapped def _hermite_param(ctx, n, z, parabolic_cylinder): """ Combined calculation of the Hermite polynomial H_n(z) (and its generalization to complex n) and the parabolic cylinder function D. """ n, ntyp = ctx._convert_param(n) z = ctx.convert(z) q = -ctx.mpq_1_2 # For re...
Source - http://adamcoster.com/2011/01/13/python-clean-up-and-translate-nucleotide-sequences/ ''' return ''.join([gencode.get(sequence[3*i:3*i+3],'X') for i in range(len(sequence)//3)]) # Atoms backbone_atoms = set(['N', 'CA', 'C', 'O']) def pdb_atom_name_to_element(s): '''s should be a string taken from colum...
#!/usr/bin/env python from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivault import hashiwrapper import json import requests ANSIBLE_METADATA = {'s...
<filename>spaghetti/analysis.py import numpy as np class NetworkBase(object): """Base object for performing network analysis on a ``spaghetti.Network`` object. Parameters ---------- ntw : spaghetti.Network spaghetti Network object. pointpattern : spaghetti.network.PointPattern A spaghetti point pattern ...
<filename>rally/task/validation.py # Copyright 2014: Mirantis 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 # # U...
# 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, Mapping, Optional, Sequence, Union, overload from .. import...
<reponame>jgoodknight/spectroscopy<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Fri Jan 04 13:23:27 2013 Gone through for release 10 Feb 2017 @author: Joey """ import copy import math import numpy as np import matplotlib.pyplot as plt import scipy.integrate import scipy.interpolate import Spac...
<reponame>vwesselkamp/deepfake-fingerprint-atacks<gh_stars>0 # Get Python six functionality: from __future__ import\ absolute_import, print_function, division, unicode_literals from builtins import range, zip import six ############################################################################### #################...
"%s = %d;" % (dim, 537), file=out ) # Could be randomized print( file=out) # Initialize operands (with structure if needed) print( "% Initialize operands", file=out ) for operand in inop: name = operand.get_name() r, c = operand.get_size() if isLowerTriangular( operand ): print( "%% %s is lower triangular" % n...
'str' }, 'service': { 'required': False, 'revision': { '6.0.0': True, '6.2.1': True, '6.2.3': True, '6.2.5': True, '6.4.0': True, '6.4.2': True, '6.4.5': True, '7.0.0': True }, 'type': 'str' }, 'src-filter': { 'required': False, 'revision': { '6.0.0': True, '6.2.1': True, '6.2.3': True, '6.2.5': T...
Z4SS --> Z1SS DN DB 3.38946826E-08 3 1000022 3 -3 # Z4SS --> Z1SS ST SB 3.13976400E-08 3 1000022 4 -4 # Z4SS --> Z1SS CH CB 1.98484599E-06 3 1000022 5 -5 # Z4SS --> Z1SS BT BB 3.11173693E-07 3 1000022 15 -15 # Z4SS --> Z1SS TAU- TAU+ 8.10549281E-08 3 1000023 2 -2 # Z4SS --> Z2SS UP UB 9.33409083E-08 3 10000...
# Ops-Test #Code to try and incorporate manual flight #################################################### ##Commander's Challenge Program for Drone Automation ##Starts Drone ## Flies to multiple waypoints ## Returns to starting location, lands/shutdown - Press "L" to land, "P" to acquire another target ##########...
<filename>test/quantization/core/test_quantized_tensor.py # Owner(s): ["oncall: quantization"] import numpy as np import math import torch import io import unittest from copy import deepcopy from hypothesis import given from hypothesis import strategies as st from torch.testing._internal.common_utils import TemporaryF...
import signal import sys import unittest import warnings from unittest import mock import asyncio from asyncio import base_subprocess from asyncio import subprocess from test.test_asyncio import utils as test_utils from test import support if sys.platform != 'win32': from asyncio import unix_events #...
1, 1, 1, 1, 1, 1, 1] _sedlex_rnd_181 = [_sedlex_rnd_179, _sedlex_rnd_180] _sedlex_rnd_178 = [_sedlex_rnd_177] _sedlex_DT_table_20 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1...
@ x_rot[0] errs = single_npjpe_not_mean(gt_pose_cam0, cam0_rot_pred, allow_mirror) pck = tf.reduce_mean(tf.cast(errs < threshold, tf.float32)) * 100 return pck pck_batch = vmap.vmap(pck, ['gt_pose_cam0', 'cur_x']) return pck_batch def resh_mse(x_gt, fwd): fwd_re = tf.reshape(fwd, tf.shape(x_gt)) return tfk.lo...
pore or throat labels are returned. If empty then both are returned (default). pores (or throats) : array_like The pores (or throats) whose labels are sought. If left empty a list containing all pore and throat labels is returned. mode : string, optional Controls how the query should be performed. Only applicab...
= PerlTreeEvaluator(ctlr, buf, trg, citdl_expr, line, filter) buf.mgr.request_eval(evalr) def libs_from_buf(self, buf): env = buf.env # A buffer's libs depend on its env and the buf itself so # we cache it on the env and key off the buffer. if "perl-buf-libs" not in env.cache: env.cache["perl-buf-libs"] = wea...
''' Copyright (c) 2017-2018, wezu (<EMAIL>) 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 appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
<gh_stars>0 #!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | # | | |___| | | | __/ (__| < | | | | . \ | # | \____|_| |...
# Copyright 2012 Nicira Networks, 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 wri...
configuration of the run agent. :type agent_configuration: ~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentProperties :param source_registry_auth: The scope of the credentials that were used to login to the source registry during this run. :type source_registry_auth: str :param custom_registries: Th...
as exc: try: # Try to parse with formatting with day first return dateutil_parser.parse(cleaned_date, dayfirst=True, fuzzy=True) except ValueError as exc: # If failed, try with year first try: m = re.search('\d+', s, re.UNICODE) if len(m.group(0)) == 4: return dateutil_parser.parse(cleaned_date, yearfirst=True...
in systemdlls: print "System DLL: " + file continue dllpath = "" for path in extrapaths: if os.path.exists(path + "/" + file): dllpath = re.sub(r"\\", r"/", path + "/" + file) print file + ": found at " + dllpath dllpaths.append(dllpath) break if dllpath == "": try: dllpath = re.sub(r"\\", r"/", which(file)...
# Find a suitable (writable) location for the index database if writeIndex: for indexPath in possibleIndexFilePaths: try: folder = os.path.dirname( indexPath ) os.makedirs( folder, exist_ok = True ) f = open( indexPath, 'wb' ) f.write( b'\0' * 1024 * 1024 ) f.close() os.remove( indexPath ) self.indexFileNam...
self.__dict__ == other.__dict__ def __ne__(self, other: 'GetPublicSettingsResponseVERSIONS') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other class ImportCaBodyMsp(): """ ImportCaBodyMsp. :attr ImportCaBodyMspCa ca: :attr ImportCaBodyMspTlsca tlsca: :a...
<filename>direct/src/tkpanels/ParticlePanel.py """PANDA3D Particle Panel""" __all__ = ['ParticlePanel'] # Import Tkinter, Pmw, and the floater code from this directory tree. from direct.tkwidgets.AppShell import * from direct.showbase.TkGlobal import * from direct.tkwidgets import Dial from direct.tkwidgets import Fl...
<gh_stars>1-10 # # Autogenerated by Thrift Compiler (0.9.2) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol...
from __future__ import absolute_import from __future__ import unicode_literals import os import uuid from datetime import datetime from xml.etree import cElementTree as ElementTree from django.test.utils import override_settings from django.test import TestCase from mock import patch from casexml.apps.case.util import...
"TO_CHAR(A, 'VW', 'NLS_DATE_LANGUAGE=GERMAN')") self.completeFunctionTest("A", 't_datetime', "TO_DATE(TO_CHAR(A)", 'WHERE A < TO_DATE(TO_CHAR(A))') self.completeFunctionTest("A", 't_datetime', "TO_DATE(TO_CHAR(A), 'YYYY-MM-DD')", "WHERE A < TO_DATE(TO_CHAR(A), 'YYYY-MM-DD')") self.completeFunctionTest("TO_DSINTERVAL...
import math from krrt.utils import get_opts, write_file from krrt.stats.plots import plot from run_example import * POP_FILE = "testing/cog-pop" def experiment1(): print "Running experiment to compute the time savings" print "for precomputing the temporal network.\n" print "Building the policy..." (pol, P) = ...
<reponame>jlk9/wavelet_xcorr<gh_stars>1-10 # Written by <NAME>, <EMAIL> # Last modified 3/4/2021 import numpy as np import math from scipy.signal import correlate # First, we need a few C related libraries: from ctypes import c_void_p, c_double, c_int, cdll from numpy.ctypeslib import ndpointer # This loads the com...
<reponame>MyPyDavid/ECpy<filename>src/elchempy/_todo_PostEC/plotting.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jan 25 11:04:07 2020 @author: zmg """ import itertools from pathlib import Path from datetime import datetime import matplotlib.pyplot as plt import numpy as np import pandas as ...
# -*- coding: utf-8 -*- """Classes and functions that create the bandwidth measurements document (v3bw) used by bandwidth authorities.""" # flake8: noqa: E741 # (E741 ambiguous variable name), when using l. import copy import logging import math import os from itertools import combinations from statistics import media...
# 要添加一个新单元,输入 '# %%' # 要添加一个新的标记单元,输入 '# %% [markdown]' # %% from IPython import get_ipython # %% [markdown] # # Module 1: Using CNN for dogs vs cats # %% [markdown] # To illustrate the Deep Learning pipeline, we are going to use a pretrained model to enter the [Dogs vs Cats](https://www.kaggle.com/c/dogs-vs-cats-redu...
<reponame>njw0709/ShapeY<filename>shapey/dataprocess/raw_data.py from tqdm import tqdm import numpy as np from itertools import combinations import cupy as cp from cupyx.scipy.linalg import tri import functools from shapey.utils.customdataset import ImageFolderWithPaths, PermutationPairsDataset from shapey.utils.modelu...
and smooth", 72], ["Wanyue", "婉约", "composed", 72], ["Kee", "可恶", "hateful", 72], ["Zhuojue", "卓绝", "outstanding", 72], ["Zuozuo", "做作", "artificial", 72], ["Yinxian", "阴险", "sinister", 71], ["Feimei", "肥美", "lush", 71], ["Jinglian", "精练", "concise", 71], ["Haohao", "浩浩", "vast", 71], ["Meijin", "没劲", "insipid...
= Returns( window_length=returns_length, mask=(AssetExists() | SingleAsset(asset=target)), ) return super().__new__( cls, base_factor=returns, target=returns[target], correlation_length=correlation_length, mask=mask, ) class RollingLinearRegressionOfReturns(RollingLinearRegression): """ Perform an ordinar...
import csv import h5py import logging import logging.config import numpy as np import os from os import path import pandas as pd import pathlib import re import xlsxwriter class CreateCsv: """Class combines csv linking IDs to csv containing feature info. Merge linked track and object IDs to corresponding feature da...
<gh_stars>0 # 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 agreed to in wri...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # "Reducing Failure-Inducing Inputs" - a chapter of "The Debugging Book" # Web site: https://www.debuggingbook.org/html/DeltaDebugger.html # Last change: 2021-03-03 15:43:27+01:00 # # Copyright (c) 2021 CISPA Helmholtz Center for Information Security # Copyright (c) 2018-...
> 1: LOGGER.warning('You have created %d optimizers for this model. This is not recommended (High memory usage)', self.nb_optimizers) # Determining aggregation_method based on accumulate_n flag aggregation_method = None if self.hparams['grad_aggregation'].upper() == 'ACCUMULATE_N': aggregation_method = tf.Aggreg...
2.0 * n))) / 6.0 + np.log10(np.pi) / 2.0 @jit(nopython=True, fastmath=True) def sumRange(xmin, xmax): """[summary] :param xmin: [description] :type xmin: [type] :param xmax: [description] :type xmax: [type] :return: [description] :rtype: [type] """ csum = 0 for i in np.arange(xmin, xmax + 1): csum += np.l...
<filename>jupyterlab_translate/utils.py # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """ """ import json import os import re import shutil import subprocess import sys import tempfile from collections import OrderedDict from itertools import chain from pathlib imp...
validator=validate) # def test_repos_leetcode(): # path_name = os.path.join(constants.seeds_dir, 'repos', 'leetcode') # multicall.multicall_directories(path_name, fuzzer='quickfuzz', validator=validate) # def test_repos_leetcode_javascript(): # path_name = os.path.join(constants.seeds_dir, 'repos', 'leetcode-javasc...
# coding=utf-8 # Copyright 2021 The Tensor2Tensor 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...
from typing import Callable from fp.fp import FreeProxy import random import logging import time import requests import tempfile import urllib3 from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait, TimeoutException from selenium.webdriver.common.by import By from selenium.common.exc...
= next_link class WorkflowParameter(msrest.serialization.Model): """The workflow parameters. :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", "Float", "Bool", "Array", "Object", "SecureObject". :type type: str or ~azure.mgmt.logic.models.ParameterType :param value...
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Dataloaders and dataset utils """ import glob import hashlib import json import math import os import random import shutil import time from itertools import repeat from multiprocessing.pool import Pool, ThreadPool from pathlib import Path from threading import Thread fro...
""" normal_modes.py: Compute Cartesian Hessian and perform vibrational analysis Copyright 2016-2020 Regents of the University of California and the Authors Authors: <NAME>, <NAME> Contributors: <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> Redistribution and use in source and binary forms, with or without ...
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
= zoomed_inset_axes(ax, zoom=ZOOM, loc='lower right') area_under_curve = [] for idx, filename in enumerate(SAMPLE_232p3_wet): fp_rate, tp_rate, auc_mean = _read_csv_roc_auc(filename) area_under_curve.append(auc_mean) _plot_roc_and_auc(fp_rate, tp_rate, c=COLORS[idx], linestyle='-', ax=ax, ax_ins=ax_ins) ax = _a...
fulfilled = 'fulfilled' class TargetCapacitySpecification1(BaseModel): TotalTargetCapacity: Optional[Integer] = None OnDemandTargetCapacity: Optional[Integer] = None SpotTargetCapacity: Optional[Integer] = None DefaultTargetCapacityType: Optional[DefaultTargetCapacityType] = None class OnDemandOptions1(BaseMode...
inconsistency matrix. Examples -------- >>> from scipy.cluster.hierarchy import ward, inconsistent, is_valid_im >>> from scipy.spatial.distance import pdist Given a data set ``X``, we can apply a clustering method to obtain a linkage matrix ``Z``. `scipy.cluster.hierarchy.inconsistent` can be also used to obta...
<filename>galaxychop/core.py # This file is part of # the galxy-chop project (https://github.com/vcristiani/galaxy-chop) # Copyright (c) 2020, <NAME> # License: MIT # Full Text: https://github.com/vcristiani/galaxy-chop/blob/master/LICENSE.txt """Module galaxy-chop.""" # ##############################################...
# package NLP_ITB.POSTagger.HMM from copy import deepcopy import re import math class WordFreq: def __init__(self, wordTagFreq={}): self.wordTagFreq = wordTagFreq def getWordTagFreq(self): #Returns Map<String, Map<Integer, Integer>> return self.wordTagFreq def readWordTagFreq(reader, tagNumbers): """ Returns ...
<gh_stars>0 import sys import json import time import calendar import arrow import click from prettytable import PrettyTable from datetime import datetime try: from zoneinfo import ZoneInfo except ImportError: from backports.zoneinfo import ZoneInfo from calm.dsl.api import get_api_client from calm.dsl.builtins im...
<reponame>SoftwareQuTech/QLinkLayerSimulations<filename>simulations/data_analysis_scripts/tables/extract_fairness.py ####################################################################################################################### # NOTE: This is very similar to simulations.generate_metrics_file with the differen...
# coding=utf-8 # *** WARNING: this file was generated by crd2pulumi. *** # *** 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 . import outp...
POINTER(c_char_p), POINTER(c_size_t), self._resize_func_def3] ret_code = self._lib_handle.G2_addRecordWithInfoWithReturnedRecordID(_dataSourceCode,_jsonData,_loadId,flags,tls_var.buf,sizeof(tls_var.buf),pointer(infoBuf),pointer(infoBufSize),self._resize_func3) if ret_code == -1: raise G2ModuleNotInitialized('G2Engi...
<reponame>lokyst/ffxivcraftopt # This file is part of DEAP. # # DEAP 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 License, or (at your option) any later version. # # DEAP is...
log("Evacuating to " + str(self.target[1]) + " " + str(self.target[0])) next = self.path[0] # If there is no possible path, consider exit blocked if next == "blocked": self.path = self.considerTargetBlocked() return # If currently waiting for other agents to move, attempt to recompute path if self.waiting...
<gh_stars>1-10 #!/usr/bin/env python3 import argparse import math import bisect import re import logging import time import os.path as op import multiprocessing from decimal import localcontext from itertools import chain, repeat parser = argparse.ArgumentParser(description='Allomedia data selection tool') parser.ad...
# coding=UTF-8 import tensorflow as tf import numpy as np import time, os, io import re #----------- for network ------------- #%% def activate(layer_name, x, act, trainable=True, print_shape=True): with tf.variable_scope(layer_name): x = act(x) if print_shape: x = tf.Print(x, [tf.shape(x)], message=x.name, summa...
""" send a gRPC command that has streaming results capture the results in the db as StoredResponse objects """ import copy import uuid from random import random import math import numpy as np from django.conf import settings from django.http import JsonResponse from tworaven_apps.utils.static_keys import KEY_SUCCESS...
<reponame>tylerclair/py3canvas<gh_stars>0 """OutcomeResults API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI from .base import BaseModel class OutcomeResultsAPI(BaseCan...
# Copyright (c) 2021, <NAME> # 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 list of conditions and the following...
self.name()) # Non-repeated fields have a member of just the type name. max_size = self.max_size() if max_size == 0: return (self.type_name(from_root), self.name()) # Fixed size fields use std::array. if self.fixed_size(): return ('std::array<{}, {}>'.format(self.type_name(from_root), max_size), self.name()) ...
value to start a new operation, excluding this value in the new request. If ``LastEvaluatedKey`` is empty, then the "last page" of results has been processed and there is no more data to be retrieved. If ``LastEvaluatedKey`` is not empty, it does not necessarily mean that there is more data in the result set. The onl...
<gh_stars>0 # ***************************************************************************** # Copyright (c) 2019-2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistrib...
O0 ii1I1i11 = Iii1 . get_rloc ( i1IIIIi1Ii111 ) if ( ii1I1i11 == None ) : continue if 77 - 77: I1ii11iIi11i + OoooooooOO * OoO0O00 * iIii1I11I1II1 % I1Ii111 if 22 - 22: i1IIi if 61 - 61: IiII if 3 - 3: ooOoO0o . Oo0Ooo . ooOoO0o / OoO0O00 / o0oOOo0O0Ooo . I1Ii111 i1Iii1i = 0 if iIIOO0OO . has_key ( "packet-count...