input
stringlengths
2.65k
237k
output
stringclasses
1 value
"bigquery_options") @bigquery_options.setter def bigquery_options(self, value: Optional[pulumi.Input['OrganizationSinkBigqueryOptionsArgs']]): pulumi.set(self, "bigquery_options", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: """ A description of this exclusion. """ r...
pipeline_key.name(), pipeline_record.status) raise db.Rollback() pipeline_record.status = _PipelineRecord.DONE pipeline_record.finalized_time = self._gettime() pipeline_record.put() db.run_in_transaction(txn) def transition_retry(self, pipeline_key, retry_message): """Marks the given pipeline as requiring ano...
<reponame>gjkennedy/OpenMDAO """ A console script wrapper for multiple openmdao functions. """ import sys import os import argparse from openmdao import __version__ as version try: import pkg_resources except ImportError: pkg_resources = None from itertools import chain import openmdao.utils.hooks as hooks from o...
<gh_stars>0 import abc import collections import copy import inspect import itertools import json import re import warnings from datetime import datetime import elasticsearch_dsl as dsl from django.conf import settings from django.contrib import messages from django.forms.forms import Form from django.http import Htt...
'' activity_header.paragraphs[0].add_run("Purpose").bold = True activity_header.paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER role_header = server_table.cell(0, 2) role_header.text = '' role_header.paragraphs[0].add_run("Role").bold = True role_header.paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER # L...
<reponame>STARInformatics/kgx<gh_stars>0 from typing import Dict, List, Optional, Any, Callable from sys import stderr import yaml from json import dump from json.encoder import JSONEncoder from kgx import GraphEntityType from kgx.prefix_manager import PrefixManager from kgx.graph.base_graph import BaseGraph """ Gen...
to next page of resources. :vartype next_link: str """ _validation = { 'value': {'required': True}, 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[Certificate]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, **kwargs): super(CertificateC...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # SPDX-License-Identifier: GPL-3.0 # ################################################## # GNU Radio Python Flow Graph # Title: Dtv Sigmf Playback # Generated: Sat Feb 23 23:29:06 2019 # GNU Radio version: 3.7.12.0 ################################################## if __...
import numpy as np class lattice(): """Contains functions to help out calculate matrices in the Fermi-Hubbard model""" def __init__(self, xs,ys,zs): '''The dimensions of the grid are given to initialize the lattice. Recommended max of 4 sites, otherwise it can take too long to complete.''' # x, y, and z have...
= int(floor(p[0]/self.ScaleFactor)),int(floor(p[1]/self.ScaleFactor)) w,h = self.Image.shape[-2:] if x >= 0 and x < w and y >= 0 and y < h: if self.Image.ndim == 2: count = self.Image[x,y] elif self.Image.ndim == 3: count = self.Image[:,x,y] self.SetStatusText("(%d,%d) count %s" % (x,y,count)) else: self.SetStatu...
not mentioned in docs) axis = kwargs.get("axis", 0) func = self._build_mapreduce_func(pandas.DataFrame.var, **kwargs) return self._full_axis_reduce(axis, func) # END Column/Row partitions reduce operations # Column/Row partitions reduce operations over select indices # # These operations result in a reduced di...
c in points] dbscan = DBSCAN( eps=eps, min_samples=min_samples).fit(pos) clustered_points = [] for label in range(np.max(dbscan.labels_) + 1): if np.count_nonzero(dbscan.labels_ == label) <= min_points: continue for idx, p in enumerate(points): if dbscan.labels_[idx] == label: clustered_points.append(p) re...
<gh_stars>0 # coding: utf-8 """ LEIA RESTful API for AI Leia API # noqa: E501 OpenAPI spec version: 1.0.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Model(object): """NOTE: This class is auto generated by the sw...
<reponame>08saikiranreddy/ipython # encoding: utf-8 """Magic functions for InteractiveShell. """ #----------------------------------------------------------------------------- # Copyright (C) 2001 <NAME> <<EMAIL>> and # Copyright (C) 2001-2007 <NAME> <<EMAIL>> # Copyright (C) 2008-2009 The IPython Development Team # ...
a negative match :type match: ``boolean`` :raise: ``InvalidArgument`` -- ``to`` is less than ``from`` :raise: ``NullArgument`` -- ``from`` or ``to`` ``null`` *compliance: mandatory -- This method must be implemented.* """ pass @abc.abstractmethod def match_any_fixed_start_offset(self, match): """Matches fix...
all steps are complete (default is on) """ kerberos_attributes: pulumi.Output[dict] """ Kerberos configuration for the cluster. Defined below * `adDomainJoinPassword` (`str`) - The Active Directory password for `ad_domain_join_user`. This provider cannot perform drift detection of this configuration. * `adDomain...
names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. :param bool _return_http_d...
100508, -62995, 166399177, 100507, -62994, 166464543, 100506, -62993, 166529923, 100505, -62992, 166595274, 100504, -62991, 166660594, 100503, -62990, 166725974, 100502, -1, 166791366, 100501, 166988286, 166202243, -1, -62987, 166923910, 100500, -62986, 166989319, 100499, -62985, 1670546...
# -*- coding: utf-8 -*- """Module implementing the abstract Runner.""" import os import json from .abstract_runner_utils import float2str from .abstract_runner_utils import _add_hp_to_argparse import time import abc import argparse import warnings from copy import deepcopy from deepobs import config as global_config im...
<reponame>schemacs/supervisor import unittest from supervisor.tests.base import DummySupervisor from supervisor.tests.base import DummyRequest from supervisor.tests.base import DummySupervisorRPCNamespace from supervisor.compat import xmlrpclib from supervisor.compat import httplib class GetFaultDescriptionTests(uni...
0, 1, 2, 2, 0, 3, 2, 0, 0] divinatory 1.6 1.42829 [4, 1, 0, 0, 1, 3, 3, 0, 1, 3] divine 2.6 0.8 [3, 3, 3, 2, 1, 2, 3, 4, 2, 3] divined 0.8 1.16619 [1, 0, 3, 0, 0, 1, 0, 3, 0, 0] divinely 2.9 0.7 [3, 2, 3, 3, 2, 4, 3, 2, 4, 3] diviner 0.3 0.9 [0, 0, 3, 0, 0, 0, 0, 0, 0, 0] diviners 1.2 1.16619 [0, 1, 0, 2, 2, 0, 3, 1, 3...
<gh_stars>0 """ # Zero Knowledge Proofs in Python Examples of discrete-log zero-knowledge proofs implemented in Python More specifically, these are non-interactive, zero-knowledge, proofs of knowledge. They can be analyzed and proven secure in the random oracle model (the random oracle here is instantiated with the S...
Optional[pulumi.Input[str]]: """ Description of the security group. """ return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter(name="fromPort") def from_port(self) -> Optional[pulum...
import numpy as np import random import itertools import sys from lattice_mc import atom, jump, transitions, cluster from lattice_mc.error import BlockedLatticeError from collections import Counter class Lattice: """ Lattice class """ def __init__( self, sites, cell_lengths ): """ Initialise a Lattice instance...
__author__ = 'calvin' import configparser import datetime import glob import json import logging import os import re import shutil import smtplib import sys import time from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText fr...
from __future__ import unicode_literals import datetime import os import unittest from django import get_version from django.db import models from django.template import Template, Context from django.test import SimpleTestCase from django.test.utils import override_settings from six.moves import range try: from dj...
= None class LaunchTemplateBlockDeviceMapping(BaseModel): DeviceName: Optional[String] = None VirtualName: Optional[String] = None Ebs: Optional[LaunchTemplateEbsBlockDevice] = None NoDevice: Optional[String] = None class LaunchTemplateBlockDeviceMappingList(BaseModel): __root__: list[LaunchTemplateBlockDevice...
tuple Set of parameters. """ # Current shape H, W, D = X.shape # Reshape arrays X = X.reshape((H*W, D)) if self.init_params == 'random': # Dirichlet concentration hyperparameters at = np.ones((self.K,))*(H*W)/2 # Normal precision-scale hyperparameters bt = np.ones((self.K,))*(H*W)/2 # Wishart degrees ...
= b'c' else: state = b'o' f.write(b"%s %s %s\n" % (hex(node), state, label)) f.close() repo.ui.log( b'branchcache', b'wrote %s with %d labels and %d nodes\n', _branchcachedesc(repo), len(self._entries), nodecount, ) except (IOError, OSError, error.Abort) as inst: # Abort may be raised by read only opener, ...
<reponame>lhorne-gavant/OpenPubArchive-Content-Server-1 import re import sys from datetime import datetime from optparse import OptionParser from configLib.opasCoreConfig import solr_docs, solr_authors, solr_gloss, solr_docs_term_search, solr_authors_term_search import logging logger = logging.getLogger(__name_...
np.sort(np.append(addindexes,index)) subindexes = np.sort(np.append(subindexes,index)) changes[index] = -changecount ind[index] += changecount for index in np.where(np.abs(changes)>1)[0]: if changes[index] < 0: for i in range(np.abs(changes[index])-1): subindexes = np.sort(np.append(subindexes,index)) els...
rows become None instead of NaN # (aggregation sum of int + NaN = float, but we want int, so we use # int + None = int to stop decimals from appearing in the size sums) # - re-sort by price based on side # - bids: high to low # - asks: low to high # - Re-index the frame by current sorted positions so the concat j...
P = _multirice3dfun(r,nu,sig,a) return P # ================================================================= # ================================================================= @metadata( parameters = ('Location of 1st Rician', 'Spread of 1st Rician', 'Amplitude of 1st Rician', 'Location of 2nd Rician', 'Spread of...
<reponame>SofiaBadini/estimagic import functools import json import warnings from pathlib import Path import numpy as np import pandas as pd from scipy.optimize._numdiff import approx_derivative from estimagic.decorators import expand_criterion_output from estimagic.decorators import handle_exceptions from estimagic....
"unhailed", "unhaired", "unhairer", "unhallow", "unhalved", "unhanded", "unhanged", "unhatted", "unhealed", "unhedged", "unheeded", "unhelmed", "unhelped", "unheroic", "unhinges", "unholier", "unholily", "unhooded", "unhooked", "unhorsed", "unhorses", "unhoused", "unhouses", "unhusked", "unialga...
<filename>sportsbetting/user_functions.py #!/usr/bin/env python3 """ Fonctions principales d'assistant de paris """ import colorama import copy import inspect import socket import sqlite3 import sys import termcolor import time import traceback import urllib import urllib.error import urllib.request from itertools imp...
sage: RowStandardTableauTuple([[[4]],[[2,3],[1]]]).residue_sequence(3,(0,1)).row_standard_tableaux().residue_sequence() 3-residue sequence (0,1,2,0) with multicharge (0,1) sage: StandardTableauTuple([[[4]],[[1,3],[2]]]).residue_sequence(3,(0,1)).row_standard_tableaux().residue_sequence() 3-residue sequence (1,0,2,0)...
9 * m.b683 <= 0) m.e918 = Constraint(expr= m.x591 - 9 * m.b684 <= 0) m.e919 = Constraint(expr= m.x592 + 9 * m.b682 <= 9) m.e920 = Constraint(expr= m.x593 + 9 * m.b683 <= 9) m.e921 = Constraint(expr= m.x594 + 9 * m.b684 <= 9) m.e922 = Constraint(expr= 5 * m.b685 + m.x775 == 0) m.e923 = Constraint(expr= 4 * m.b686 + m.x7...
encountered an EXE/SGATE overlap error.', 147: 'Formatter Correction Buffer underrun error.', 148: 'Formatter Correction Buffer overrun error.', 149: 'Formatted detected NRZ interface protocol error.', 150: 'Media Manager\xe2\x80\x99s MX Overrun error.', 151: 'Media Manager\xe2\x80\x99s NX Overrun error.', 152: '...
can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object, the HTTP status code, an...
# coding=utf-8 # Copyright 2021 The Google Flax Team Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
<gh_stars>0 import numpy as np import random from collections import namedtuple, deque from dqn.data_structures import SumSegmentTree, MinSegmentTree, MaxPriorityQueue Experience = namedtuple("Experience", ["state_t", "action_t", "reward_tn", "state_tpn", "gamma_n"]) class Simple: def __init__(self, capacity): self...
which allow to enter the expression. """ description = _messages.StringField(1) expression = _messages.StringField(2) location = _messages.StringField(3) title = _messages.StringField(4) class GetClusterConfigDownloadUrlResponse(_messages.Message): r"""Response which contains a source location of the backup's...
import torch import torch.nn as nn class Resnet50_256(nn.Module): def __init__(self): super(Resnet50_256, self).__init__() self.meta = {'mean': [131.0912, 103.8827, 91.4953], 'std': [1, 1, 1], 'imageSize': [224, 224, 3]} self.conv1_7x7_s2 = nn.Conv2d(3, 64, kernel_size=[7, 7], stride=(2, 2), padding=(3, 3), b...
GROUP (ORDER BY mytable.name DESC) " "OVER (PARTITION BY mytable.name ORDER BY mytable.myid " "ROWS BETWEEN :param_1 FOLLOWING AND :param_2 FOLLOWING) " "AS anon_1 FROM mytable", ) def test_date_between(self): import datetime table = Table("dt", metadata, Column("date", Date)) self.assert_compile( table.sele...
<filename>backend/portal/summoners/views.py import boto import json import random import string from boto.sqs.connection import SQSConnection from boto.sqs.message import RawMessage from cassiopeia.type.api.exception import APIError from datetime import datetime from django.contrib.auth import hashers from django.core....
Adv.' ], ylim: (0, 100), xlim: (0, 0.05), is_log: False, } robust_non_adaptive2 = {ylabel: "Test Accuracy (%)", file_name: "distortion_robust_net_non_adaptive2", title: "C&W L$_2$ non-adaptive", # legend_pos: "lower left", legend_pos: "upper right", # bbox: (0.0, 0.0), column_nr: 8, legend_cols: 1, labels...
""" Unit and regression test for the reference_handler package. """ # Import package, test suite, and other packages as needed import reference_handler # noqa: F401 from reference_handler import decode_latex from reference_handler import encode_latex import sys alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr...
= getattr(classified_domain, 'cert_info', None) if cert_info is None: domains_certificate_status[ classified_domain.domain] = ( "create_in_progress") continue else: edge_host_name = ( classified_domain.cert_info. get_edge_host_name()) domain_access_url = service_obj.provider_details[ self.driver.provider_na...
message['status'] = 'READY' message['error'] = None message['timestamp'] = time.time() message['sla_id'] = self.services[serv_id]['sla_id'] message['policy_id'] = self.services[serv_id]['policy_id'] message['nsr'] = self.services[serv_id]['nsr'] message['vnfrs'] = [] for function in self.services[serv_id]['func...
import re import os import numpy as np import tensorflow as tf import json from tqdm import * from math import sqrt from PIL import Image from time import sleep from keras import backend as K from keras.preprocessing.image import Iterator from keras.preprocessing.image import ImageDataGenerator from keras.utils.generi...
result = sot._prepare_request(requires_id=False, prepend_key=True) self.assertEqual("/something", result.url) self.assertEqual({key: {"x": body_value}}, result.body) self.assertEqual({"y": header_value}, result.headers) def test__prepare_request_with_patch(self): class Test(resource.Resource): commit_jsonpatch ...
1 / Fs) if len_x is not None: x = x[:len_x] # get the stimulus frequencies, defaulting to None fstims = [Fs / fstim for fstim in fstims] # get the constants, default to calculated values if NFFT_density is None: NFFT_density_real = 256 elif NFFT_density < 0: NFFT_density_real = NFFT_density = 100 ...
<reponame>francaracuel/UGR-GII-CCIA-4-VC-Vision_por_computador-17-18-Practicas # -*- coding: utf-8 -*- """ <NAME> VC - Visión por Computador 4º - GII - CCIA - ETSIIT - UGR Curso 2017/2018 """ import cv2 import numpy as np import math import copy from matplotlib import pyplot as plt ##############################...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # webapp.py # # Copyright 2018 <NAME> <<EMAIL>> # # 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 limita...
data.get("_id", data.get("mongo_id")) if mongo_id is None: raise KeyError("Missing `_id` or `mongo_id` on the data, it's needed to update the database!") if not isinstance(mongo_id, ObjectId): mongo_id = ObjectId(mongo_id) new_cls = cls(id, parsed_servers) new_cls.mongo_id = mongo_id return new_cls def seriali...
# document_retrieval functions import math import string import collections from gensim.models import KeyedVectors import numpy as np def change_dict_structure(dict_list): """Takes list of dicts from db_query and changes to dict with key=id, value = text (used for metrices). Args: dict_list (list): List of dictio...
<reponame>MaayanLab/creeds<gh_stars>1-10 ''' ORMs for signature, signatures in the MongoDB and collection of signatures. ''' import os, sys, json import hashlib from collections import Counter import numpy as np import pandas as pd import scipy.sparse as sp import requests from joblib import Parallel, delayed from .g...
# This file is part of Flask-Multipass-CERN. # Copyright (C) 2020 - 2021 CERN # # Flask-Multipass-CERN is free software; you can redistribute # it and/or modify it under the terms of the MIT License; see # the LICENSE file for more details. import logging from datetime import datetime from functools import wraps from ...
<gh_stars>0 import numpy as np import pickle as pkl import networkx as nx import scipy.sparse as sp from scipy.sparse.linalg.eigen.arpack import eigsh import sys from gcn.input_data import pollute_data import json import os from networkx.readwrite import json_graph as jg import sys sys.path.insert(1, '/Users/april/Do...
""" █▀▀ █▀▀ █▄░█ █▀▀ █▀ █ █▀   █░░ █▀▀ █▀ █▀ █▀█ █▄░█ █▀   █░█ █▀█ █░░ ░ ▄█ █▄█ ██▄ █░▀█ ██▄ ▄█ █ ▄█   █▄▄ ██▄ ▄█ ▄█ █▄█ █░▀█ ▄█   ▀▄▀ █▄█ █▄▄ ▄ ░█ Welcome to the Genesis Gir lesson tutorials Volume 1! Genesis Chit Chat bot is a program that gathers info on the user and displays all the cool info at the end of the pr...
<filename>paths_cli/wizard/wizard.py<gh_stars>1-10 import shutil import os import textwrap from paths_cli.wizard.tools import yes_no, a_an from paths_cli.wizard.core import get_object from paths_cli.wizard.errors import ( FILE_LOADING_ERROR_MSG, RestartObjectException ) from paths_cli.wizard.joke import name_joke fro...
<filename>autoarray/structures/arrays/two_d/abstract_array_2d.py import logging import numpy as np from typing import List, Tuple, Union from autoconf import conf from autoarray.structures.abstract_structure import AbstractStructure2D from autoarray.structures.arrays.one_d.array_1d import Array1D from autoa...
""" Copyright (C) <2010> Aut<NAME>. TSRI This file git_upy/houdini/houdiniHelper.py is part of upy. upy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option...
<reponame>pd3d/magneto ''' * This version has been reduced to support the Finexus setup, in an attempt to replicate their reported accurate Z positioning. * * Position tracking of magnet based on Finexus * https://ubicomplab.cs.washington.edu/pdfs/finexus.pdf * * VERSION: 0.2.2.c * - MODIFIED: 4 sensors in operation. *...
<filename>utils/saveHdf5ToAedat2.py import sys, argparse import numpy as np from numpy import uint32, int32, int64, int16 from tqdm import tqdm import logging from pathlib import Path import easygui import locale import h5py MAX_ADC = 1023 GYRO_FULL_SCALE_DEG_PER_SEC_DEFAULT=1000 # default hardware values in jAER for ...
# -*- coding: utf-8 -*- from copy import deepcopy from datetime import timedelta from itertools import combinations from typing import Tuple, Sequence import numpy as np from ..base import Property from ..models.transition.base import TransitionModel from ..models.transition.linear import ConstantTurn, ConstantVeloci...
<filename>ot/gromov.py # -*- coding: utf-8 -*- """ Gromov-Wasserstein transport method """ # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: MIT License import numpy as np from .bregman import sinkhorn from .utils import dist, UndefinedParameter from ....
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved # ============================================================================ """ Abstract Writer """ from __future__ import absolute_import from __future__ import division from __future__ import print_...
token should be considered as an @ref entity_reference, `False` if the pattern is not recognised. @note This call should not verify an entity exits, just that the format of the string is recognised. @see @ref entityExists @see @ref resolveEntityReference """ raise NotImplementedError @abc.abstractmethod de...
is of type OvalDefinition Returns None if no definitions could be found @rtype: List @return: All definitions in the OVAL document or None if none were found """ root = self.getDocumentRoot() if not root: return None defroot = root.find("def:definitions", OvalDocument.NS_DEFAULT) if defroot is None: return...
from tkinter import * from tkinter import ttk from tkinter import filedialog from tkinter import messagebox import turtle import time from PIL import Image from tkinter import tix class App: s="""self.screen.clearscreen() self.screen.listen() self.draw = turtle.RawTurtle(self.screen) self.draw.pu() self.screen.onclic...
Here we can choose different algorithms # _get_split_mse _get_split_info for split in unique), key=lambda x: x[0]) return mse, feature, split, split_avg def _choose_category_point(self, X: List[List[str]], y: List[Num], idx: List[int], feature: int): """Iterate each xi and classify x, y into two parts, and the ...
(isClassification == False): if (((n1*n2) != 0)): newAcurracyValueToAdd = (1-(abs(n2-n1)/abs(n2))) if (newAcurracyValueToAdd < 0): newAcurracyValueToAdd = 0 predictionAcurracy = predictionAcurracy + newAcurracyValueToAdd if (isClassification == True): if (abs(n1) > abs(n2)): # n2 has to be the one with the highe...
<reponame>LaGauffre/SMCCompoMo<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Wed Sep 2 15:42:14 2020 @author: pierr """ import scipy.special as sp import math as ma import pandas as pd import numpy as np import scipy.stats as st from scipy.optimize import minimize def sim_gam_par(n, k, α, θ): """ Sample fr...
<reponame>daccordeon/CEonlyPony<gh_stars>0 """Calculates the same set of injections for a set of networks. Based on the old calculate_injections.py and gwbench's multi_network.py example script, this processes the injections (e.g. in data_raw_injections/) in union for each network in a set and saves the results (e.g. ...
widgets.MenuBox( "menu_funcionario_vinculado_{0}".format(doce[2]), I(_class="fas fa-ellipsis-v"), widgets.MenuOption("Visualizar", **{ "_class": "botao_visualizar_funcionario wave_on_click", "_data-id_funcionario": doce[2], }), onOpen=self.bind_menu_docente ), **{"drag_and_drop": False} ) ) html_botao_falt...
<reponame>jmm-montiel/Auto-PyTorch<gh_stars>1-10 import numpy as np import os import time import shutil import netifaces import traceback import logging from hpbandster.core.nameserver import NameServer, nic_name_to_host from hpbandster.core.result import logged_results_to_HBS_result from autoPyTorch.pipeline.base.s...
batch_shape=(num_batches,)) else: raise ValueError('Unknown rotation augmentation : ' + cfg.augment_rotation) # Scale # Choose random scales for each example min_s = cfg.augment_scale_min max_s = cfg.augment_scale_max if cfg.augment_scale_anisotropic: s = tf.random.uniform((num_batches, 3), minval=min_s, ma...
<filename>img_utils.py #------------------------------------------------------------------------------- # Name: Image functions # Purpose: Car damage analysis project # # Author: kol # # Created: 17.01.2020 # Copyright: (c) kol 2020 # Licence: MIT #-----------------------------------------------------------------------...
'can_be_none'], "['fortnite']['exec']['friend_remove']": [list, str, 'can_be_none'], "['fortnite']['exec']['party_member_join']": [list, str, 'can_be_none'], "['fortnite']['exec']['party_member_leave']": [list, str, 'can_be_none'], "['fortnite']['exec']['party_member_confirm']": [list, str, 'can_be_none'], "[...
# Add the list of possible values to the field som_nature map_predefined_vals_to_fld(self.l_vertex, "som_typologie_nature", self.typo_nature_som) # Add the list of possible values to the field som_precision_rattachement map_predefined_vals_to_fld(self.l_vertex, "som_precision_rattachement", self.precision_class,...
matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream ''' props = aws_cdk.aws_cloudwatch.MetricOptions( account=account, color=color, dimensions=dimensions, dimensions_m...
'zh': u('\u6cb3\u5317\u7701\u6ca7\u5dde\u5e02')}, '861386650':{'en': 'Tongling, Anhui', 'zh': u('\u5b89\u5fbd\u7701\u94dc\u9675\u5e02')}, '861386651':{'en': 'Tongling, Anhui', 'zh': u('\u5b89\u5fbd\u7701\u94dc\u9675\u5e02')}, '861386652':{'en': 'Chuzhou, Anhui', 'zh': u('\u5b89\u5fbd\u7701\u6ec1\u5dde\u5e02')}, '86...
vertical position [m] for calculation of power density distribution vs horizontal and vertical position'], ['pw_ry', 'f', 0.015, 'range of vertical position [m] for calculation of power density distribution vs horizontal and vertical position'], ['pw_ny', 'i', 100, 'number of points vs vertical position for calculati...
<gh_stars>1-10 import numpy as np import copy import math import scipy from susi import props from susi import sampling from .result import result_obj, strurel_result from scipy.stats import norm class strurel(object): ''' ################################################################### Description: The...
<gh_stars>1-10 #!/usr/bin/env python # Copyright 2014-2020 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>openfold/model/primitives.py # Copyright 2021 AlQuraishi Laboratory # Copyright 2021 DeepMind Technologies 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.apa...
Parameters ---------- row : int Row number to modify col_name : str Name of the Column to modify val : col.info.dtype Value to insert at specified row of col ''' self.remove_row(row, reorder=False) key = [c[row] for c in self.columns] key[self.col_position(col_name)] = val self.data.add(tuple(key), row) d...
= np.sum(~wall) weight[:] = 0 if nnotwall > 0: weight[~wall] = (1 / nnotwall) else: raise RuntimeError('No non-wall cells surrounding cell. ' 'Please report error.') weight = weight / np.sum(weight) else: raise RuntimeError('Water sum(weight) less than 0. ' 'Please report error.') # final sanity check if...
"""Specifies that no values are allowed for this parameter or quantity.""" subclass = None superclass = None def __init__(self, valueOf_=None): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if NoValues.subclass: return NoValues.subclass(*args_, **kwargs_) else: return NoValues(*args_, **kwargs_) fa...
# coding: utf-8 """ ELEMENTS API The version of the OpenAPI document: 2 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from elements_sdk.configuration import Configuration class FilePartialUpdate(object): """NOTE: This class is auto generated by OpenAPI Gene...
xmm15, xmmword ptr [r8]') Buffer = b'\xc4\x01\x81\xc2\x00\x0c\x11\x11\x11\x11\x11\x11\x11\x11\x11' myDisasm = DISASM() myDisasm.Archi = 64 Target = create_string_buffer(Buffer,len(Buffer)) myDisasm.EIP = addressof(Target) InstrLength = Disasm(addressof(myDisasm)) assert_equal(myDisasm.Argument1.ArgType, REGISTE...
# Copyright 2021 D-Wave Systems 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 writi...
<reponame>PatrickKoss/BettingPrediction<filename>BettingRestAPI/csgo_api/views.py<gh_stars>0 import json from datetime import datetime, timedelta from threading import Thread import numpy as np from django.conf import settings from django.db import connection from rest_framework import status from rest_framework.respo...
self.dummy_logger, verify=False) self.assertEqual(self.processed_prometheus_data_example, actual_output) @mock.patch("src.monitors.node.chainlink.get_prometheus_metrics_data") def test_get_prom_data_does_not_change_last_prom_sourced_used_if_online( self, mock_get_prometheus_metrics_data) -> None: mock_get_prometh...
buf.write("\2\u0f99\u029e\3\2\2\2\u0f9a\u0f9b\5\u03f1\u01f9\2\u0f9b") buf.write("\u0f9c\5\u03d7\u01ec\2\u0f9c\u0f9d\5\u03ef\u01f8\2\u0f9d") buf.write("\u0f9e\5\u03df\u01f0\2\u0f9e\u02a0\3\2\2\2\u0f9f\u0fa0") buf.write("\5\u03f1\u01f9\2\u0fa0\u0fa1\5\u03df\u01f0\2\u0fa1\u0fa2") buf.write("\5\u03fb\u01fe\2\u0fa2\u0fa...
% name.lower(), 'return 0;', ]) elif type in [ FieldDescriptor.TYPE_DOUBLE, FieldDescriptor.TYPE_FLOAT ]: lines.extend([ 'if (!lua_isnumber(L, 2)) return luaL_error(L, "passed value cannot be converted to a number");', 'lua_Number n = lua_tonumber(L, 2);', 'm->set_%s(n);' % name.lower(), 'return 0;', ]) eli...
<reponame>mabrahamdevops/python_notebooks import glob from ipywidgets import widgets import os import re import shutil from collections import defaultdict from IPython.core.display import HTML from IPython.display import display import pandas as pd import subprocess from __code.file_handler import make_ascii_file_from...
name): try: inf_attr = getattr(_cl.image_info, name.upper()) except AttributeError: raise AttributeError("%s has no attribute '%s'" % (type(self), name)) else: return self.event.get_image_info(inf_attr) def image_shape(self): if self.type == mem_object_type.IMAGE2D: return (self.width, self.height) elif sel...