input
stringlengths
2.65k
237k
output
stringclasses
1 value
# -*- coding=UTF-8 -*- # pyright: strict from __future__ import annotations import traceback from concurrent import futures from typing import Callable, Iterator, Optional, Tuple import cast_unknown as cast import cv2 import numpy as np from PIL.Image import Image from PIL.Image import fromarray as image_from_array ...
^ d(29) ^ d(30) ^ d(31), q(0) ^ q(1) ^ q(6) ^ q(7) ^ q(9) ^ q(11) ^ q(12) ^ q(13) ^ q(16) ^ q(17) ^ q(24) ^ q(27) ^ q(28) ^ d(0) ^ d(1) ^ d(6) ^ d(7) ^ d(9) ^ d(11) ^ d(12) ^ d(13) ^ d(16) ^ d(17) ^ d(24) ^ d(27) ^ d(28), q(0) ^ q(1) ^ q(2) ^ q(6) ^ q(7) ^ q(8) ^ q(9) ^ q(13) ^ q(14) ^ q(16) ^ q(17) ^ q(18) ^ q(24) ^...
# -*- coding: utf-8 -*- """ This enables to parameterize a desired scenario to mock a multi-partner ML project. """ from datasets import dataset_mnist, dataset_cifar10, dataset_titanic from sklearn.model_selection import train_test_split import datetime import os import numpy as np import matplotlib.pyplot as plt impo...
in enumerate(tqdm(self.G, desc=tqdm_desc_alg, leave=tqdm_leave, disable=(tqdm_disable or self.m == 1))): for g, alg in enumerate(self.G): # Initialize alg.reset() # Loop on time #for t in tqdm(self.T, desc=tqdm_desc_it, leave=tqdm_leave, disable=(tqdm_disable or self.n > 1 or self.m > 1) ): for t in self.T: # ...
import metrics import numpy as np import torch import revdiff as rd import unittest import utils def get_grad(out, x): return rd.build_node_grad(out, x) def val(x): return rd.build_val(x) def get_arr_len(x): if isinstance(x, (np.ndarray, np.generic)): return x.size else: return 1 def mse(y_pred, y_true): dif...
<gh_stars>0 #! /usr/bin/env python # coding: utf-8 import re import json import logging from time import time from JYTools import logger from JYTools.util import is_num from JYTools.StringTool import is_string, join_decode from JYTools.util.file import FileWriter from JYTools.JYWorker.util import ValueVerify, ReportSc...
storagetypes.wait_futures( [ret_fut] ) return ret_fut.get_result() @classmethod def __compactify_get_candidates_delete( cls, volume_id, parent_id, dir_index_cutoff, async=False ): """ Find the set of allocated index nodes beyond a given offset, suitable for swapping into a newly-freed slot. """ to_compactif...
# Copyright (c) 2021 OpenKS Authors, Visual Computing Group, Beihang University. # All rights reserved. import os import sys import pickle import argparse import datetime import time import json from tqdm import tqdm import random from pathlib import Path import numpy as np import torch import torch.nn as nn import t...
<filename>experiments/figures/work/make_figures.py # standard library imports import os import sys import argparse import time # package imports import torch from torch.distributions.normal import Normal import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D import seaborn as sns import...
u('\u65b0\u7586\u660c\u5409\u56de\u65cf\u81ea\u6cbb\u5dde')}, '861393168':{'en': '<NAME>', 'zh': u('\u6cb3\u5317\u7701\u5eca\u574a\u5e02')}, '861393169':{'en': 'Baoding, Hebei', 'zh': u('\u6cb3\u5317\u7701\u4fdd\u5b9a\u5e02')}, '861393164':{'en': '<NAME>', 'zh': u('\u6cb3\u5317\u7701\u5eca\u574a\u5e02')}, '86139316...
lm.dependent_learning_mechanisms: projections = self._add_error_projection_to_dependent_learning_mechs(lm) self.add_projections(projections) # Suppress "no efferent connections" warning for: # - error_signal OutputPort of last LearningMechanism in sequence # - comparator learning_mechanisms[-1].output_ports[ERRO...
<reponame>jzuhone/kadi<gh_stars>0 # Licensed under a 3-clause BSD style license - see LICENSE.rst from collections import defaultdict import math import difflib import os from pathlib import Path import calendar import re import gzip import pickle import itertools import functools import weakref import logging import ...
value clf = svm.SVC(kernel="precomputed", C=1, verbose=False) clf.fit(trn_kernel_mat, trn_lab) label_hat = clf.predict(tst_kernel_mat) score_hat = clf.score(tst_kernel_mat, tst_lab) score_list.append(score_hat) print "mAP (%.2f) at C=%.2f" % (np.mean(score_list)*100,C) map_scores.append(np.mean(score_list)*100)...
scores = (50, 46). Player 0 rolls 8 dice and gets outcomes [2, 6, 4, 6, 1, 4, 4, 5]. End scores = (51, 46) >>> print(turns[5]) Start scores = (51, 46). Player 1 rolls 0 dice and gets outcomes []. End scores = (51, 49) >>> print(turns[6]) Start scores = (51, 49). Player 0 rolls 6 dice and gets outcomes [5, 3, 1...
<reponame>cfculhane/autorest.python<gh_stars>10-100 # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by M...
and dummy_input_on_gpu is not specified. """ result = self._apply_helper(self._auto_quant_main, fp32_model, dummy_input_on_cpu, dummy_input_on_gpu, results_dir, cache_id) return result["model"],\ result["accuracy"],\ result["encoding_path"] def _apply_helper( self, auto_quant_main_fn: Callable, fp32_mode...
<= 1) m.c4764 = Constraint(expr= m.b344 - m.b347 + m.b384 <= 1) m.c4765 = Constraint(expr= m.b344 - m.b348 + m.b385 <= 1) m.c4766 = Constraint(expr= m.b344 - m.b349 + m.b386 <= 1) m.c4767 = Constraint(expr= m.b344 - m.b350 + m.b387 <= 1) m.c4768 = Constraint(expr= m.b344 - m.b351 + m.b388 <= 1) m.c4769 = Constrai...
a scalar valued polynomial), self * other. :param other: Polynomial, scalar or vector we should multiply this polynomial with. :type: PolynomialLagrange, scalar or vector :return: Product of this polynomial with other. :rtype: :class:`PolynomialLagrange`. """ if isinstance(other, numbers.Number) or isinstance(o...
# PyjProperties - Java Property file parser and writer for Python # # Copyright (c) 2015, <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: # # * Redistributions of source code must retain th...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import itertools import os import math import copy import torch import torch.nn.functional as F from fairseq import options, utils, metrics,...
"""@file galaxycluster.py The GalaxyCluster class """ import pickle import warnings from .gcdata import GCData from .dataops import compute_tangential_and_cross_components, make_radial_profile from .theory import compute_critical_surface_density from .plotting import plot_profiles class GalaxyCluster(): """Object th...
<gh_stars>10-100 from datetime import datetime from re import search, sub from dateutil.parser import parse from pytz import UTC from baseball.baseball import (POSITION_CODE_DICT, PlateAppearance, Player, PlayerAppearance, Inning, Team, Game) from baseball.baseball_events import (AUTOMATIC_BALL_POSITION, Pitc...
#!/usr/bin/env python # coding: utf-8 # ## Calculate distance between means/medoids of mutation groupings # # Our goal is to find an unsupervised way of calculating distance/similarity between our mutation groupings ("none"/"one"/"both") which isn't affected by sample size, to the degree that differentially expressed...
<filename>plugins/motifmining.py #21datalabplugin import numpy import numpy as np import time from scipy.ndimage import gaussian_filter from system import __functioncontrolfolder from model import date2secs from model import epochToIsoString from mininghelper import * from pytz import timezone from model import date2s...
<reponame>ghanem-mhd/LabChain """Test cases for the networking component.""" import json import time from unittest import TestCase from werkzeug.test import Client from labchain.datastructure.block import Block from labchain.network.networking import ServerNetworkInterface, TransactionDoesNotExistException, B...
<filename>data/data_loader.py """Classes for loading various data types within the project, including - Force plate XML data - C3D data (to be moved here from another script) - PLY data (to be moved here from another script)""" import c3d from vis.utils import * import xml.etree.ElementTree as ET from matplotlib imp...
packVer.version: continue else: raise Exception("Package " + packVer.name + " already in " + filename + " but with a different version, present: " + packsInFile[packVer.name] + ", adding: " + packVer.version) #if njh project, add the flags of it's dependencies if pack.njhProject_: cmd = "./setup.py --compfile com...
############################################################################### # Imports import argparse # Argument parser import logging # DEBUG, INFO, WARNING, ERROR, CRITICAL import Utility import YawlToMetagraph import TriplesToMetagraph import PolicyAnalysisHelper from mgtoolkit.library import * from ortools...
= np.asarray((topright[0], topright[1])) leftIntersectionPointA = np.asarray((leftIntersectionX, leftIntersectionY)) rightIntersectionPointA = np.asarray((rightIntersectionX,righttIntersectionY)) leftIntersectionPointB = np.asarray((leftIntersectionXB, leftIntersectionYB)) rightIntersectionPointB = np.asarray((ri...
to what we do in '_setup_event_channel' using 'self._topic_root_policy', and then # calling 'self._sns.set_topic_attributes' permission_label: str = self._generate_cw_alarm_to_sns_publish_permissin_label( self.account_id, self.region, internal_alarm_name ) try: exponential_retry(self._sns.remove_permission, {"Int...
<filename>python-obj-system.py #!/usr/bin/env python3 from mdpyformat import * import pprintex header_md("""Python object primer for Python3 / meta classes""" ) header_md("""Introduction""", nesting = 2) print_md(""" Python is good at creating the illusion of being a simple programming language. Sometimes this illu...
import os.path from io import StringIO import json from unittest.mock import patch, Mock from django.core.management import call_command from django.test import TestCase, override_settings from django.urls import reverse import pytest import rdflib import requests from .admin import ManifestSelectWidget from .models ...
org.logo is not None assert org.logo.filename == "logo.png" with request_ctx( "/settings/logo", method="POST", data={ "reset": "Reset", }) as ctx: login_user(user) resp = ctx.app.full_dispatch_request() assert resp.status_code == 200 org.reload() assert org.logo is None @patch("orcid_hub.utils.send_email"...
import pytest from helpers.cluster import ClickHouseCluster import random import string import os import time from multiprocessing.dummy import Pool cluster = ClickHouseCluster(__file__) node = cluster.add_instance('node', main_configs=['configs/enable_keeper.xml', 'configs/logs_conf.xml'], with_zookeeper=True) from k...
<reponame>JeschkeLab/DeerLab from collections import namedtuple from deerlab.whitegaussnoise import whitegaussnoise from deerlab.model import Model, fit import numpy as np # Simple non-linear function for testing x = np.linspace(0,5,100) def gauss(mean,width): return np.exp(-(x-mean)**2/width**2/2) # Non-linear de...
might need to add also the score if self.showScores: additionalLines=[] currentLineEndings = [name.split('.')[-1] for name in currentLines] for key in newLines: scoreName = key.split('.')[-1]+"_score" for scoreVar in scoreVars: if scoreName in scoreVar: #we add this one only if it is not there already if score...
def compute_mask(self, inputs, mask=None): return [None, None, None, None] def get_config(self): config = super(DetectionTargetLayer, self).get_config() return config @tf.keras.utils.register_keras_serializable() class DetectionLayer(tfl.Layer): """Takes classified proposal boxes and their bounding box deltas a...
do_sqrt=True, grid_number=13, coord_scale=None, object_scale=None, prediction_not_a_object_scale=None, class_scale=None, detection_threshold=None, iou_threshold=None, random_boxes=False, match_anchor_size=None, num_to_force_coord=None): ''' Generates a deep learning model with the Yolov2 architecture. The model ...
vertices `(0, 1, ..., n)` and all of its faces. EXAMPLES:: sage: simplicial_complexes.Simplex(3) The 3-simplex sage: simplicial_complexes.Simplex(5).euler_characteristic() 1 """ return UniqueSimplicialComplex([TrueSimplex(n)], name='The {}-simplex'.format(n)) def Torus(): r""" A minimal triangulation of th...
import GPy import numpy as np import time from os import getpid import pandas as pd import matplotlib.pyplot as plt import scipy.spatial as spatial from scipy import stats from scipy.special import inv_boxcox import multiprocessing import math # se cargan los datos de entrenamiento train_data = pd.read_csv('../../GP_...
(unpatch_img) predict_img = np.zeros((*unpatch_data_size,)) unpatch_weight_map = np.ones((*unpatch_data_size,)) * 1E-16 # Initialize weight to 1 for each patch size if output_patch_size is None: weight_patch = np.ones((*patch_size,) + (data_patch_size[-1],)) else: weight_patch = np.ones((*output_patch_size,) + (...
<reponame>ftramer/stanford-suns-nips17<filename>untargeted/models.py import tensorflow as tf from nets import inception, resnet_v1, resnet_v2, resnet_utils, vgg, mobilenet_v1 from preprocessing.vgg_preprocessing import preprocess_image as vgg_preprocess from preprocessing.inception_preprocessing import preprocess_image...
"""if tweet contains any of matches return its text joined with comments by the same person that also match (and contain [1/2] etc)""" if not any_in(tweet.get('text', tweet.get("comment", "")), *matches): return "" text = tw.get_tweetinfo(tweet['id']).contents['text'] if any(text in t for t in found): return "" ...
#! /usr/bin/env python3 # Copyright 2021 OVHCloud # # 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 agree...
get_binop(n.op)), lineno=n.lineno), Dyn node = ast.BinOp(left=left, op=n.op, right=right, lineno=n.lineno) return (node, ty) def visitUnaryOp(self, n, env, misc): (operand, ty) = self.dispatch(n.operand, env, misc) node = ast.UnaryOp(op=n.op, operand=operand, lineno=n.lineno) if isinstance(n.op, ast.Invert): ty...
> 0 and lR > 0 and relay.lower() == "gov": msg = "I'd rather die than use obscene and improper words; but when you, as a governor, appear with your testicles hanging out, it is appropriate for me to speak of cunts and cocks." elif lt == 0 and le > 0 and lR > 0 and relay.lower() == "help": msg = "Alternative translat...
#!/usr/bin/python """ XP7 Module """ import sys import os.path import csv import string import re import copy #################################################################################################### ### Functions ##############################################################################################...
<reponame>robschneider16/AIT-Core # Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT) # Bespoke Link to Instruments and Small Satellites (BLISS) # # Copyright 2016, by the California Institute of Technology. ALL RIGHTS # RESERVED. United States Government Sponsorship acknowledged. Any # commerci...
<gh_stars>0 # Copyright (c) 2016-2018, University of Idaho # All rights reserved. # # <NAME> (<EMAIL>) # # The project described was supported by NSF award number IIA-1301792 # from the NSF Idaho EPSCoR Program and by the National Science Foundation. # standard library import os from os.path import join as _join from...
L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCountries...
columns from the DB db_cols = get_table_cols(cls._table, conn_handler) # Remove the sample_id and study_id columns db_cols.remove('sample_id') db_cols.remove(cls._id_column) # Insert values on required columns values = _as_python_types(md_template, db_cols) values.insert(0, sample_ids) values.insert(0, [study....
<reponame>sumedhpb/testrunner from lib.mc_bin_client import MemcachedClient, MemcachedError from lib.memcacheConstants import * from .subdoc_base import SubdocBaseTest import copy, json import sys import random class SubdocErrorHandling(SubdocBaseTest): def setUp(self): super(SubdocErrorHandling, self).setUp() self...
inputdata: for key in nodes: if key not in inputdata: raise exc.InvalidArgumentException(key + ' not in request') datum = inputdata[key] if 'nextdevice' not in datum: raise exc.InvalidArgumentException( 'missing nextdevice argument') elif datum['nextdevice'] not in self.valid_values: raise exc.InvalidArgumentE...
1.2 0 .65-.55 1.2-1.2 1.2z"/></svg> <div class="select-menu-item-text"> <span class="select-menu-item-heading">Create branch: <span class="js-new-item-name"></span></span> <span class="description">from ‘master’</span> </div> <input type="hidden" name="name" id="name" class="js-new-item-value"> <input type="hidde...
few attaches under it, # but, the attaches may be different to what the DCNM has for the same network. if have_a['networkName'] == want_a['networkName']: h_in_w = True atch_h = have_a['lanAttachList'] atch_w = want_a.get('lanAttachList') for a_h in atch_h: if not a_h['isAttached']: continue a_match = False ...
import numpy as np # import cupy as np from utils.base_optim import * class Layer(object): ''' 所有 Layer 的基类''' def __init__(self, name="layer"): # 层名 self.name = name # 标志,当处于训练状态时设置为 true,当处于测试状态时设置为 false self.train = True def __call__(self, x): # 重写 __call__ 之前使用前向传播:out = layer.forward(x) # 重写 __call__ 之后...
import re import transformer.Constants as Constants from UPosTagMap import * from SimplifyDepParse3 import SimplifyDepParse class SentenceProcessing(object): def __init__(self, symbol_file="./models/symbols.txt", debug=False): self.debug = debug self._symbol2key = self.readSymbolFile(symbol_file) self...
""" .. /------------------------------------------------------------------------------\ | -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- | |------------------------------------------------------------------------------| | | | Copyright [2019] Facade Technologies Inc. | | All Rights Reserved. | | | | NOTICE: All in...
<reponame>fabien-vavrand/aikit # -*- coding: utf-8 -*- """ Created on Wed Jun 6 14:13:56 2018 @author: <NAME> """ from sklearn.base import BaseEstimator, TransformerMixin from sklearn.utils.validation import check_is_fitted import pandas as pd import numpy as np try: import category_encoders except ImportError: c...
# Vesion 1.0 # run with "python Acimdes_Client.py" # for logging run with "python Acimdes_Client.py > log.txt" # Copyright 2020 <NAME> # 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...
val1 if axis2 is not None: vec[axis2] = val2[axis2] if isinstance(val2, Py_Vec) else val2 if axis3 is not None: vec[axis3] = val3[axis3] if isinstance(val3, Py_Vec) else val3 return vec def rotate( self, pitch: float=0.0, yaw: float=0.0, roll: float=0.0, round_vals: bool=True, ) -> 'Vec': """Rotate a vect...
ooOoO0o * ooOoO0o + o0oOOo0O0Ooo . iII111i % iIii1I11I1II1 + Ii1I if 88 - 88: Oo0Ooo . iII111i oooOooOO -= 1 packet = packet [ 0 : 7 ] + struct . pack ( "B" , oooOooOO ) + packet [ 8 : : ] return ( packet ) if 89 - 89: OOooOOo + I1Ii111 % i11iIiiIii + Oo0Ooo / Oo0Ooo + OoO0O00 if 9 - 9: OoOoOO00 % i1IIi + IiII i...
import os import re import datetime import json import hashlib from google.cloud import translate_v2 as translate # --------------------------------------------------------------------------------------------------------------------------------- class TextTranslate(): def __init__(self, lang) -> None: self.text_id...
global 'http://www.leboncoin.fr/', # Why: #181 in Alexa global 'http://www.goo.ne.jp/', # Why: #182 in Alexa global 'http://www.liveinternet.ru/', # Why: #183 in Alexa global 'http://www.google.co.ve/', # Why: #184 in Alexa global 'http://www.56.com/', # Why: #185 in Alexa global 'http://www.google.com.vn/',...
<reponame>rsdoherty/azure-sdk-for-python # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R...
1103305: "Raw Gargoyle's Halberd+5", 1103400: "Magic Gargoyle's Halberd", 1103401: "Magic Gargoyle's Halberd+1", 1103402: "Magic Gargoyle's Halberd+2", 1103403: "Magic Gargoyle's Halberd+3", 1103404: "Magic Gargoyle's Halberd+4", 1103405: "Magic Gargoyle's Halberd+5", 1103406: "Magic Gargoyle's Halberd+6"...
ncluster, nsample=len(elm_labels['Shot']), delta=.001, maxiter=20, metric=kmeans_distance, verbose=0 ) nlabel=[] [nlabel.append(len(np.where(klabels == i)[0])) for i in range(ncluster)] # print(centres, klabels, dist) # plt.figure() # plt.scatter(np.arange(len(klabels)),klabels) # plt.pause(0.001) # return...
_waitForNodeSet(self): ''' Fill node set for the request. Obtain nodes for the request, pausing all new request handling for this provider until the node set can be filled. note:: This code is a bit racey in its calculation of the number of nodes in use for quota purposes. It is possible for multiple launchers...
#torch dependencies import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.autograd.gradcheck import zero_gradients from torch.utils.data.sampler import SubsetRandomSampler # torch dependencies for data load import torchvision from torchvision import datasets...
<filename>utils.py import numpy as np import torch from torch.autograd import grad from learn2learn.utils import clone_module, update_module from torch import nn, optim def maml_update(model, lr, grads=None): """ [[Source]](https://github.com/learnables/learn2learn/blob/master/learn2learn/algorithms/maml.py) **De...
<filename>gerenciador_operacoes.py from time import sleep dados = {} ### --> DICIONÁRIO RECEBE TODOS OS DADOS COM SEUS RESPECTIVOS VALORES; ID, NOME ETC... lista_de_dados = [] lista_principal = [] copia_dados = []### --> DICIONÁRIO RECEBE TODOS OS DADOS codigo_cliente = 0 ### --> CONTADOR CONTAGEM TRANSAÇÕES moeda_ori...
result will be stored. pExcepInfo: A pointer to a structure that contains exception information. puArgErr: The index of the first argument that has an error. """ pass def __init__(self, *args): #cannot find CLR method """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(......
<filename>src/Python27Packages/run_mdao/__init__.py from __future__ import print_function from __future__ import absolute_import from __future__ import division import os import os.path import io import json import importlib import time import contextlib import itertools import numpy import six from collec...
0.8*ar_ub, 5, endpoint=False), *numpy.linspace(0.8*ar_ub, ar_ub, 10) ]: ar_simplex_l.append(ar) if sim_simplex_reqed: ET_sim_l.append(test_avq(nf, ar, t, r, k, serv, servdist_m, w_sys=True, mixed_traff=mixed_traff) ) c = next(dark_color) label = 'Simplex' # if t != 1 else 'Simplex or MDS' print("ET_sim_l= {}".for...
import math, copy import numpy as np import gym from gym_minigrid import entities, render_text, encoding class Cell(object): def __init__(self): self.color = 'black' # at the moment, we restrict background color to black self.clear() def clear(self): self.entity = None def __str__(self): if self.entity is...
<reponame>bopopescu/sage r""" ISGCI: Information System on Graph Classes and their Inclusions This module implements an interface to the `ISGCI <http://www.graphclasses.org/>`_ database in Sage. This database gathers information on graph classes and their inclusions in each other. It also contains information on the ...
"void": return _gskernel.GsFieldVector_set(self, n, val) # Register GsFieldVector in _gskernel: _gskernel.GsFieldVector_swigregister(GsFieldVector) class GsIntVector(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __in...
user = uuid.uuid4().hex password = <PASSWORD> conn = self.mox.CreateMockAnything() conn = fakeldap.FakeLdap(CONF.ldap.url, 0, alias_dereferencing=None, tls_cacertdir=None, tls_cacertfile=None, tls_req_cert=2, use_tls=False, chase_referrals=True).AndReturn(conn) conn.simple_bind_s(user, password).AndReturn(No...
self.white, (x, y), (self.SXSize - 10, y)) # To draw a separation line between commands and memory which is under return y+10 # Return the Y position 10px under our drawn line ############################################################################################################ class UnsignedBi...
<filename>src/context.py from __future__ import annotations import sys from collections import defaultdict, OrderedDict from operator import attrgetter from typing import Dict, Any, ClassVar, List, Set, Optional, Tuple import src.settings as var # FIXME from src.messages.message import Message from src.logger import ...
# -*- coding: utf-8 -*- """ Created on Wed Apr 7 14:57:55 2021 author: rringuet Satellite Flythrough code to call for any model. All desired model data for the desired model should be in a single directory. Example calls from the command line: Get list of models and function calls possible: python ./Satelli...
<reponame>bonitobonita24/Mayan-EDMS import logging from django.apps import apps from django.contrib.admin.utils import ( get_fields_from_path, reverse_field_path ) from django.db.models.signals import m2m_changed, post_save, pre_delete from django.utils.encoding import force_text from django.utils.functional import c...
genesets = { 'upregulated': signature[signature[sort_genes_by] > 0].index[:geneset_size], 'downregulated': signature[signature[sort_genes_by] < 0].index[-geneset_size:] } # Submit to Enrichr enrichr_ids = {geneset_label: submit_enrichr_geneset(geneset=geneset, label=signature_label+', '+geneset_label+', from Bulk...
# -*- coding: utf-8 -*- # pylint: disable=too-many-lines import heapq from binascii import hexlify from collections import namedtuple from raiden.encoding.signing import recover_publickey from raiden.transfer.architecture import TransitionResult from raiden.transfer.balance_proof import signing_data from raiden.transf...
self.container47['pady'] = 8 self.container47.pack() self.lblc63_1_1 = Label(self.container47) self.lblc63_1_1['text'] = ('63 - Agente Etiológico - RT-PCR/outro método por Biologia Molecular ' + 'Positivo para Influenza? (1 - Sim, 2 - Não, 9 - Ignorado): ') self.lblc63_1_1.pack(side=LEFT) self.txtc63_1_1 = Entr...
self.register_instruction(SW(reg, "0($sp)")) self.used_registers[reg] = False @visit.register def _(self, node: cil.ReturnNode): # Generar dos formas de codigo en dependencia de si se devuelve un valor o no self.add_source_line_comment(node) val = node.value if val is not None: if isinstance(val, LocalNode): ...
# -*- coding: utf-8 -*- import sys import time import httplib2 AUTO_RECONNECT_TIMES = 5 crawl_tips_json = {} SERVER = 'http://api.cn.faceplusplus.com/' category_Arts_Entertainment = ['Aquarium', 'Arcade', 'Art Gallery', 'Bowling Alley', 'Casino', 'Circus', 'Comedy Club', 'Concert Hall', 'Country Dance Club', 'Disc...
: dict The updated original dictionary """ # Iterate over key value pairs in the new dictionary to merge into the original for key, val in new_dict.items(): # If a mapping object (e.g. dictionary) call the function recursively if isinstance(val, Mapping): tmp = update_dict(orig_dict.get(key, {}), val) orig_dic...
# coding=utf-8 """ Modelos de datos básicos para calcular los Tipos de Instalacion. """ class Linea(object): """ Objeto que reperesenta una linea Podemos obtener el Tipo de Instalcion creando un objeto linea, assignando los linea = Linea() # TODO: Explicar dev """ def __init__(self): self.tension = None...
0.434294481903252*log(1 + 22.9527167938577*m.b217) + 0.434294481903252*log(1 + 6.55753492060242* m.b218) + 0.434294481903252*log(1 + 0.57750965326708*m.b219) + 0.434294481903252*log(1 + 1.17445395540411*m.b220) + 0.434294481903252*log(1 + 5.58082608780692*m.b221) + 0.434294481903252*log(1 + 8.54665307162323*m.b2...
""" Abstract conv interface """ from __future__ import absolute_import, print_function, division import logging from six import reraise, integer_types import sys import theano from theano.tensor import as_tensor_variable, patternbroadcast from theano.tensor import get_scalar_constant_value, NotScalarConstantError fr...
a BGP backdoor route type: bool route_map: description: Route-map to modify the attributes type: str redistribute: description: Redistribute information from another routing protocol type: list elements: dict suboptions: application: description: Application type: dict suboptions: name: description: Appl...
tile coordinates to Microsoft QuadTree" quadKey = "" ty = (2**zoom - 1) - ty for i in range(zoom, 0, -1): digit = 0 mask = 1 << (i-1) if (tx & mask) != 0: digit += 1 if (ty & mask) != 0: digit += 2 quadKey += str(digit) return quadKey class Point: def __init__(self): self.x = 0.0 self...
import aiohttp import asyncio import contextlib import functools import sys import zlib from collections.abc import Iterable, Mapping from datetime import date as Date from lxml import etree, objectify from types import MappingProxyType from typing import ( Any as _Any, AsyncGenerator as _AsyncGenerator, ...
the value of target. Args: target: the target to which the framebuffer is bound for glcheckframebufferstatus, and the target against which framebuffer completeness of framebuffer is checked for glchecknamedframebufferstatus. ''' @accepts(t.bitfield) @returns(t.void) @binds(dll) def clear(mask): ''' clear buf...
!= self.object.author: context["auth_user"] = self.request.user # Add previous and next activities in the context context["next_course_activity"] = CourseActivity.objects.filter( course=self.object, rank=course_activity.rank + 1 ).first() context["previous_course_activity"] = CourseActivity.objects.filter( cour...
%d, '%s', '%s')" % (target_item.stack_id, target_item.branch_id, source_row['aadt'], source_row['aadt_year'], source_row['aadt_type'], source_row['last_modified'], )) self.insert_aadts.append(insert_aadt) self.stats['items_clone_aadt'] += 1 # def merge_byway_ratings(self, shpfeat, target_item, source_item):...
<reponame>calearning/testGithubClone<gh_stars>1-10 from __future__ import print_function, division import imgaug as ia from imgaug import augmenters as iaa from imgaug import parameters as iap import numpy as np from scipy import ndimage, misc #from skimage import data #import matplotlib.pyplot as plt #from matplotlib ...
7967 2.443706759489844288902124937428528E-4797 1.221853379744922144451062468714264E-4797 7968 6.10926689872461072225531234357132E-4798 3.05463344936230536112765617178566E-4798 7969 1.52731672468115268056382808589283E-4798 7.63658362340576340281914042946415E-4799 7970 3.818291811702881701409570214732075E-4799 1.90...
<reponame>hat-open/hat-aio import asyncio import collections import signal import subprocess import sys import threading import time import unittest.mock import pytest from hat import aio pytestmark = pytest.mark.asyncio async def test_first(): queue = aio.Queue() queue.put_nowait(1) queue.put_nowait(2) queue...