input
stringlengths
2.65k
237k
output
stringclasses
1 value
9567 1.236126637992265592046925461401665E-5760 6.180633189961327960234627307008325E-5761 9568 3.090316594980663980117313653504163E-5761 1.545158297490331990058656826752081E-5761 9569 7.725791487451659950293284133760405E-5762 3.862895743725829975146642066880203E-5762 9570 1.931447871862914987573321033440102E-5762 ...
<filename>lib/kb_hmmer/kb_hmmerImpl.py # -*- coding: utf-8 -*- #BEGIN_HEADER import os import sys import shutil import hashlib import subprocess import requests import re import traceback import uuid from datetime import datetime from pprint import pprint, pformat import numpy as np import math import gzip from Bio im...
from __future__ import division import json from datetime import datetime import os import data_tools as dt def annotate(input_json, output_csv, data_path, overwrite=False): """ Annotate for RetinaNet https://github.com/fizyr/keras-retinanet Only annotates the object classes (not areas for segmentation) :param in...
<gh_stars>1-10 # Author: <NAME> (<EMAIL>) import argparse import dynet as dy import numpy as np import os import pickle import random import sys import time from collections import Counter from copy import deepcopy ########################### useful generic operations ########################## def get_boundaries(bio...
<gh_stars>1-10 # ============================================================================= # Federal University of Rio Grande do Sul (UFRGS) # Connectionist Artificial Intelligence Laboratory (LIAC) # <NAME> - <EMAIL> # ============================================================================= # Copyright (c) 20...
as angles relative to the field center, while the offsets are returned as lengths relative to the nominal fiber center. Parameters ---------- angle_x : astropy.units.Quantity Angular separation from the field center along x. angle_y : astropy.units.Quantity Angular separation from the field center along y. wa...
# Copyright 2022 Canonical Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
outer join. df = pd.merge(camd_cli_df, haoguo_cli_df, how="left", # LEFT OUTER JOIN on="Tumor_Sample_Barcode", sort=False, indicator='indicator_column2') # This should be True since performing left_outer join assert set(df['indicator_column2'].unique()) <= set(['both', 'left_only']) # Fill-in missing values i...
number of contributors read from the # file. log.debug('Contributors: {0} total representing {1} employers.'.format(contributorCount, len(contributorSet))) # Set the global value. self._defaultContributorSet = contributorSet return contributorSet def generateLicense(self, path): licenseText = ""...
''' This module provides the class Searcher which interacts with a Handle Search Servlet. Author: <NAME> (DKRZ), 2015-2016 ''' import logging import re import requests import json import b2handle from past.builtins import xrange from b2handle.handleexceptions import ReverseLookupException LOGGER = logging.getLogger...
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # 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.apache.org/licenses/LICENSE-2.0. # # Any modificat...
# Copyright 2017--2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file a...
<gh_stars>0 import warnings from typing import Dict, Iterable, Optional import pandas as pd import duckdb from .portals.base_portal import BaseGrouperPortalConstant from .portals.pricing_portal import PricingPortal from .tears.base_tear import BaseTear from .tears.ic_tear import ICHorizonTear, ICTear from .tears.insp...
""" Tests for EntityData generic list view This test suite focuses on listing of record fields used by record views and lists. This serves two purposes: - it tests some additional options of the entity list logic that are not tested by the dfeault list view, and - it tests the logic that access site-wide data in ad...
# Copyright 2021 <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://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
) self.layer_norm = nn.LayerNorm(self.out_conv_dim, elementwise_affine=True) self.activation = ACT2FN[config.feat_extract_activation] def forward(self, hidden_states): hidden_states = self.conv(hidden_states) hidden_states = hidden_states.transpose(-2, -1) hidden_states = self.layer_norm(hidden_states) hidden_...
import pytest import numpy as np import pandas as pd from pandas.testing import assert_frame_equal from ..metrics import calcFindableMinObs from ..metrics import calcFindableNightlyLinkages from .create_test_data import createTestDataSet MIN_OBS = range(5, 10) def test_calcFindableMinObs(): ### Test calcFindableMi...
<gh_stars>0 #!/usr/bin/python3 """ Library for Casambi Cloud api. Request api_key at: https://developer.casambi.com/ """ import uuid import json import logging import datetime import socket from pprint import pformat from typing import Tuple from colorsys import rgb_to_hsv import requests import websocket _LOGGER = ...
<reponame>gkowzan/dfcs_vipa<filename>dfcs_vipa/calibration.py """Calibrate InGaAs camera nonlinearity. Uses a series of measurements of a Gaussian beam/flat field imaged on the camera with different integration times to establish the real dependence between the energy incident upon the camera and the number of counts ...
<reponame>bioimageit/bioimageit_core # -*- coding: utf-8 -*- """BioImagePy local metadata service. This module implements the local service for metadata (Data, DataSet and Experiment) management. This local service read/write and query metadata from a database made od JSON file in the file system Classes ------- Me...
<reponame>chillaxor/blogbin<filename>public/yum-3.2.28/yumcommands.py #!/usr/bin/python -t # This program 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 2 of the License, or # (at your option) ...
<filename>tests/test_cdec.py from datetime import timezone, timedelta, datetime from unittest.mock import MagicMock, patch import re import geopandas as gpd import numpy as np import pandas as pd import pytest from pandas import Timestamp from metloom.pointdata import CDECPointData, PointDataCollection from metloom.v...
kwargs.update(edge_attrs) if labels[-1]: # this will be a directed edge del kwargs['dir'] kwargs.setdefault('arrowsize', '0.5') if reverse[-1]: edge_from, edge_to = edge_to, edge_from graph.edge(edge_from, edge_to, **kwargs) else: # simple case, direct edge from node i to j # N.B., adjust edge length so we...
<filename>boto3_type_annotations_with_docs/boto3_type_annotations/lambda_/paginator.py from typing import Dict from botocore.paginate import Paginator class ListAliases(Paginator): def paginate(self, FunctionName: str, FunctionVersion: str = None, PaginationConfig: Dict = None) -> Dict: """ Creates an iterator tha...
interval(self, start, end, color, name): # if there is an active sequence, add interval in that sequence if self.active_sequence is not None: self.active_sequence.add_interval(_Interval(self, start, end, color, name)) else: # close current function if any if self.active_function is not None: self.active_function...
"""Process Sentinel-1 data into interferograms using GAMMA""" import argparse import glob import logging import os import re import shutil import sys from datetime import datetime, timezone from pathlib import Path from secrets import token_hex from hyp3lib import GranuleError from hyp3lib.SLC_copy_S1_fullSW import S...
<filename>run.py """Contains a main function for training and/or evaluating a model.""" import os import sys import numpy as np import random import shutil import copy from parse_args import interpret_args import data_util from data_util import atis_data from model.schema_interaction_model import SchemaInteractionA...
from device output = self.device.execute(self.cli_command) # initial return dictionary result_dict = {} # DHCPv6 LDRA is Enabled. p0 = re.compile(r'^DHCPv6 +LDRA +is +(?P<status>(Enabled|Disabled))') # DHCPv6 LDRA policy: client-facing-disable # DHCPv6 LDRA policy: client-facing-trusted # DHCPv6 LDRA policy: ...
"Tetum", "teu": "Soo", "tev": "Teor", "tew": "Tewa", "tex": "Tennet", "tey": "Tulishi", "tez": "Tetserret", "tfi": "<NAME>", "tfn": "Dena'ina", "tfo": "Tefaro", "tfr": "Teribe", "tft": "Ternate", "tg": "Tajik", "tga": "Sagalla", "tgb": "Tobilung", "tgc": "Tigak", "tgd": "Ciwogai", "tge": "Eastern Gorkh...
<filename>pyang/plugins/omni.py import optparse import sys import re import string from pyang import plugin from pyang import statements paths_in_module = [] leafrefs = [] key = '' class_keywords = ["container", "list", "case", "choice", "augment"] servicepoints = ["servicepoint", "productpoint"] classnamecolor = " ...
<filename>porcupine/plugins/directory_tree.py """Displays a directory tree on the left side of the editor. You can navigate directories, and open files in Porcupine. """ from __future__ import annotations import dataclasses import logging import os import tkinter from functools import partial from pathlib import Pat...
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T E X A M P L E S # # Copyright (c) 2016+ <NAME> + <NAME> # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # Supporting Flat, xxyxyz.org/flat # ----------------...
esptool.FatalError("Writing MAC address is not supported") def get_stored_crc(self): return (self.esp.read_efuse(self.data_reg_offs + 1) >> 16) & 0xFF def calc_crc(self): """ This algorithm is the equivalent of esp_crc8() in ESP32 ROM code This is CRC-8 w/ inverted polynomial value 0x8C & initial value 0x00. ...
Its "get_free_hyperparams" returns an empty list. if isinstance(step, pipeline_module.PlaceholderStep): if not utils.is_sequence(hyperparams_for_step): raise exceptions.InvalidArgumentTypeError("Hyper-parameter values for placeholder step {step_index} of pipeline '{pipeline_id}' is not a sequence.".format( step_ind...
# import datetime from flask import Flask,render_template,request,redirect,session,jsonify from flask_pymongo import PyMongo from flask_cors import CORS, cross_origin from flask_mail import Mail, Message from flask_uploads import UploadSet, configure_uploads from random import randint import hashlib,os from openpyxl im...
need polynomially many parameters and circuit evaluations. # This is much cheaper than the :math:`3^m` we would need if we naively tried to construct the cost landscape exactly, without chopping after second order. # # Now this should be enough theory, so let's visualize the model that results from our trigonometric ex...
# 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...
production quantities') resid = Float(2.0, desc='Residual value at end of lifetime') roi = Float(10.0, desc='Return on investment (Triggers calculation of required fare)') sfc = Float(0.6, units='lb/h/lb', desc='Engine specific fuel consumption') taxrat = Float(0.33, desc='Corporate tax rate for ROI calculations') ...
0] - origin) # NB. IJK ordering if det == 0.0: log.warning('indeterminate handedness in cell ijk0 [{}, {}, {}]'.format(cell_kji[2], cell_kji[1], cell_kji[0])) return None if det > 0.0: ijk_is_left_handed = xyz_is_left_handed else: ijk_is_left_handed = not xyz_is_left_handed if ijk_is_left_handed: return 'left'...
None: ['Image'], }, # IVUSPullbackRate 0x00183101L: { 'US MULTI-FRAME IMAGE IOD': ['Image'], 'INTRAVASCULAR OCT IMAGE IOD': ['Image'], 'ENHANCED ULTRASOUND VOLUME IOD': ['Image'], 'US IMAGE IOD': ['Image'], None: ['Image'], }, # TypeOfFilters 0x00181161L: { 'XRF IMAGE IOD': ['Image'], 'X-RAY ANGIOGRAPHIC IMAGE I...
<filename>elf/transformation/converter.py import numpy as np from . import elastix_parser from .affine import affine_matrix_2d, affine_matrix_3d # Converter functions to translate in between different representations of affine transformations. # Currently supports the following representations: # - native: the represe...
<reponame>qq2016/kubeflow_learning<filename>github_issue_summarization/notebooks/seq2seq_utils.py<gh_stars>1000+ import logging import dill as dpickle import numpy as np from matplotlib import pyplot as plt import tensorflow as tf from IPython.display import SVG, display from keras import backend as K from keras.layers...
not (self.data.openingLog or self.blockdropdown): # instance.dropdown.open(instance) # except: # pass # # return True # @staticmethod # def staticdropdowncallbacktext(self, instance, value): # """ # Called from a dropdown - just selects the value entered # """ # Logger.info("CRV:staticdropdowncallbacktext")...
import gzip import json import re from collections import defaultdict from fuzzywuzzy.process import extractOne from fuzzywuzzy.fuzz import QRatio from fuzzywuzzy.utils import full_process from mycroft.skills.core import intent_file_handler from mycroft.util.log import LOG from mycroft.skills.common_play_skill import C...
"is_managed": 1, "platform": "tdw", "tags":{"manage":{"geog_area":[{"code":"NA","alias":"北美"}]}}, "data_processing": { "project_id": 2331, "processing_id": "2_output", "processing_alias": "xxx", "processing_type": "clean", "created_by ": "xxx", "created_at": "xxx", "updated_by": "xxx", "updated_at": "xxx", ...
<filename>utils/utils.py<gh_stars>0 "utility methods for generating movies from learners" from fastai import * from fastai.vision import * from fastai.callbacks import * import shutil from skimage.filters import gaussian from skimage.io import imsave import PIL import imageio from scipy.ndimage.interpolation import zoo...
<reponame>zlbupt/tablereport #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from openpyxl import Workbook from tablereport import * from tablereport.shortcut import write_to_excel def test_table_initialize(): table = Table( header=[['test', None, None], ['header1', 'header2', 'h...
return input none_mod = torch.jit.script(Mod(None)) double_mod = torch.jit.script(Mod(Double())) self.assertEqual(none_mod(torch.tensor(1)), torch.tensor(1)) self.assertEqual(double_mod(torch.tensor(1)), torch.tensor(1) * 2) def test_device_kwarg(self): from torch import device def f(): return device(type='c...
m): ''' push: used to push a move on the board. More costly than play_move() but you can pop it after. Helper for your search tree algorithm''' assert not self._gameOver self._pushBoard() return self.play_move(m) def pop(self): ''' pop: another helper function for you rsearch tree algorithm. If a move has bee...
SPEECTHP = models.CharField("TYPE OF HLTH CARE WRKR - SPEECH THERAPY", max_length=2) OTHRHCW = models.CharField("TYPE OF HLTH CARE WRKR - OTHER", max_length=2) NONSKILL = models.CharField("TYPE OF HLTH CARE WRKR - NON-SKILLED", max_length=2) SKILLED = models.CharField("TYPE OF HLTH CARE WRKR - SKILLED", max_length=2...
<gh_stars>1-10 # # Depends # Copyright (C) 2014 by <NAME> & <NAME>. All rights reserved. # BSD license (LICENSE.txt for details). # """Main GUI The main window which contains the dependency graph view widget and a dock for additional windows. Executing the program from the commandline interface creates one of these...
interface. i.ip6Addresses += autoConfig.addresses # Auto configure the IPv6 default gateway if necessary. if self.ip6DefaultGateway == None: self.ip6DefaultGateway = autoConfig.defaultGateway self.ip6DefaultInterface = i # Auto configure the IPv4 DNS servers if necessary. if self.ip6DNSServers == None: sel...
import unittest import sublime from Vintageous.tests.borrowed import mock from Vintageous.tests.borrowed.mock import call from Vintageous.state import VintageState from Vintageous.test_runner import TestsState from Vintageous.vi.constants import _MODE_INTERNAL_NORMAL from Vintageous.vi.constants import MODE_...
#!/usr/bin/env python # # Copyright 2016 Tangentix Ltd """ App Engine Settings Module ========================== Provides cached settings for use by App Engine instances in the form of key value pairs usage: from settings import Settings settings=Settings() # Loads up current settings on first try settin...
#pylint: disable=C0302 # Copyright 2014-2015 Whitewood Encryption 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 requi...
oprot.writeI64(self.mutator) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return...
import argparse import numpy as np import torch import math import pickle import pprint import math import sys SHAPES = ['circle', 'cross', 'ellipse', 'pentagon', 'rectangle', 'semicircle', 'square', 'triangle'] COLORS = ['blue', 'cyan', 'gray', 'green', 'magenta', 'red', 'yellow'] OUTOFDOMAIN = [('square', 'red'), (...
### tensorflow==2.3.0 ### https://ai.googleblog.com/2020/08/on-device-real-time-body-pose-tracking.html ### https://google.github.io/mediapipe/solutions/pose ### https://www.tensorflow.org/api_docs/python/tf/keras/Model ### https://www.tensorflow.org/lite/guide/ops_compatibility ### https://www.tensorflow.org/api_do...
################################################################# # # # SPECTRUM ANALYST # # version: 1.0 - Feb - 2020 # # @author: <NAME> <EMAIL> # ################################################################# import sys,os import numpy as np import math from math import factorial import matplotlib.pyplot as plt ...
translation will be saved if not bad_word_translation_already_has_been_added: instance_bad_word_translation_src = { "type": type, "question_content": question_with_word_usage, "word_to_translate": word_to_translate, "word_translation": word_translation } bad_words_translation_list_from_json_file.append(instance_bad_...
<reponame>birdie0111/Intershiplz<filename>backend/pyWebscrap.py from bs4 import BeautifulSoup # retourne un parse-tree # pour sélectionné par xpath from lxml import etree # retourne un parse-tree pour # sélectionné par xpath import requests # envoyer request HTTP import datetime # obtenir la date d'aujourd'hui impo...
<reponame>hlerebours/lambda-calculus<filename>lambdax/test/test_lambda_calculus.py """ For now, all tests related to `lambdax`. It'll be split later. """ from collections import OrderedDict from functools import partial import random from pytest import raises import lambdax from lambdax import λ, X, x1, x2, x3, x4, ...
rev_eds = _parser(_lexer(fmt)) self.assertEqual(result, _input(eds, rev_eds, inp)) @attr(platform='9-1_linux_intel') @attr('input') @attr(ed='G') def test_g_ed_input_174(self): inp = '''0.1''' fmt = '''(G5.2E4)''' result = [1.0000000000000001e-01] eds, rev_eds = _parser(_lexer(fmt)) self.assertEqual(result, ...
#!/usr/bin/python # -*- coding: utf-8 -* # log function """ :description: common log related module """ from __future__ import print_function __all__ = [ 'debug', 'info', 'warn', 'critical', 'init_log_instance', 'set_log_level', 'ROTATION', 'INFINITE', 're_init_log_instance', 'get_inited_logger_name', 'parse', ...
import time, datetime import numpy as np import shutil import sys from PIL import Image import torch from torch import nn import torch.backends.cudnn as cudnn import torch.optim as optim from torchvision import datasets from torch.autograd import Variable from learning.utils_learn import * from learning.dataloader im...
"""Contains the grid scenario class.""" from flow.scenarios.base_scenario import Scenario from flow.core.params import InitialConfig from flow.core.params import TrafficLightParams from collections import defaultdict ADDITIONAL_NET_PARAMS = { # dictionary of grid array data "grid_array": { # number of horizontal r...
#This file contains the code to build a Deep Factorization Machine model # import tensorflow as tf import numpy as np from keras.layers import Embedding, Reshape, Activation, Lambda, Input, Dropout, Dense,SpatialDropout1D from keras.regularizers import l2 from keras.initializers import RandomNormal from keras.models im...
function #: This allows the memoization to be the same #: whether the function was called with #: 1, b=2 is equivilant to a=1, b=2, etc. new_args = [] arg_num = 0 # If the function uses VAR_KEYWORD type of parameters, # we need to pass these further kw_keys_remaining = list(kwargs.keys()) arg_names = get_arg_...
# import monkeytype import pyorient from pyorient.ogm import declarative from pyorient.ogm.property import * # with monkeytype.trace(): Node = declarative.declarative_node() Relationships = declarative.declarative_relationship() class Core(Node): # element_type = 'asset' # element_plural = 'assets' type = String(...
raise InvalidConfigFileException( "{}.{} has to be a list of key-value pairs".format( SAMPLE_MODS_KEY, IMPLIED_KEY ) ) _LOGGER.debug("Sample attribute implications: {}".format(implications)) for implication in implications: if not all([key in implication for key in IMPLIED_COND_KEYS]): raise InvalidConfigFileEx...
<filename>flfm/shell/rules.py """ Rules and Permissions ~~~~~~~~~~~~~~~~~~~~~ Objects pertaining to the rules and permissions controlling FLFM. """ import collections.abc import copy import os import re from functools import wraps from werkzeug.datastructures import MultiDict from flask import current_app, g, flas...
- 0.5) edges_idx = np.round(edges_pix + 0.5) - 0.5 edges_idx = np.unique(edges_idx) edges_ref = self.pix_to_coord(edges_idx) groups = Table() groups[f"{self.name}_min"] = edges_ref[:-1] groups[f"{self.name}_max"] = edges_ref[1:] groups["idx_min"] = (edges_idx[:-1] + 0.5).astype(int) groups["idx_max"] = (edges...
<filename>drillbit/coverage/coverage.py #!/usr/bin/env python # Generates a Coverage Matrix given the following inputs: # - Drillbit Test Coverage (Android, iOS) # - Existing API points (Android, iOS) # - TDoc2 import os import sys import re import platform import optparse import logging import codecs import zipfile i...
"""API for Home Connect bound to Home Assistant OAuth.""" import logging from homeassistant.const import PERCENTAGE, TEMP_CELSIUS, TIME_SECONDS, VOLUME_MILLILITERS # pylint: disable=import-error, no-name-in-module from homeassistant.helpers.dispatcher import dispatcher_send # pylint: disable=import-error, no-name-in-m...
# Copyright (c) 2021, Zenqi # 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 limitation the rights # to use, copy, modify, merge, publish, distribute, s...
<filename>mws/mws.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # Basic interface to Amazon MWS # Based on http://code.google.com/p/amazon-mws-python # import hashlib import hmac import base64 import re import six try: from xml.etree.ElementTree import ParseError as XMLError except ImportError: from xml.parser...
normalisation factor For this formula, we assume most proteins are multi-pass, and that approximately 30% of the residues are TM residues. Therefore a rand_30TM_70nonTM can be calculated, that roughly gives the random identity for the full protein. rand_30TM_70nonTM = 0.3 * rand_perc_ident_TM + 0.7 * rand_perc_id...
""" IMC2 client module. Handles connecting to and communicating with an IMC2 server. """ from time import time from twisted.application import internet from twisted.internet import protocol from twisted.conch import telnet from django.conf import settings from src.utils import logger, create, search, utils from src.s...
injected a fault in the plugin self._validate_behavior_on_bulk_failure(res, 'networks') def test_create_networks_bulk_native_plugin_failure(self): if self._skip_native_bulk: self.skipTest("Plugin does not support native bulk network create") orig = QuantumManager.get_plugin().create_network with mock.patch.objec...
[ ContentType.objects.get_for_model(m, for_concrete_model=False) for m in deps ] Comment.objects.filter(content_type__in=content_ids).delete() # Prepare message for m in deps: messages.add_message( request, messages.INFO, _("Erasing data from %(model)s") % {"model": force_str(m._meta.verbose_name)}, ) # F...
<gh_stars>1-10 import os import json import base64 import socket import sqlite3 import datetime from time import time, sleep from dkv import demez_key_values as dkv from uuid import uuid4, UUID from threading import Thread from api2.ftp_server import FTPServerAPI from api2.listener import SocketListener from api2.dir_...
import time import json import sys from docplex.mp.model import Model from docplex.util.environment import get_environment import constants from utils import initial_validation, output_result from path_gen import path_gen RU_ID = "id" DRC_str = "drc" RU_POS = "ru" DU_POS = "du" CU_POS = "cu" PATH = "path" class Pa...
(17664064*mcMS**10)/(9*mbkin**12) + (353281280*mcMS**10)/(81*mbkin**11) + (7955554444931*mcMS**10)/ (76621545*mbkin**10) - (337299328*mcMS**11)/(189*mbkin**13) - (6745986560*mcMS**11)/(1701*mbkin**12) - (181064392519811*mcMS**11)/ (3831077250*mbkin**11) + (1338720*mcMS**12)/mbkin**14 + (8924800*mcMS**12)/(3*mbk...
dtype=np.float32) np.testing.assert_array_almost_equal(outpt, expected_outpt) def test_leaky_relu(self): layers = [ InputLayer( name='input', shape=TensorShape([1, 1, 4, 4]), dtype='float32', inputs=['input'], input_shapes=[TensorShape([1, 1, 4, 4])], subgraph=None ), LeakyReluLayer( name='leaky_relu',...
#!/usr/bin/env python """MangaFrameExtraction. Based on code created by 山田 祐雅 """ from enum import Enum from math import sqrt, atan, cos import collections import logging import os import attr import cv2 as cv from numpy import pi as CV_PI from typing import List, Union, Optional from cv import ( addWeighted as cvAd...
- - - - - - result = indexers.subindex_list( doubleton_dataset, index_keys=['a', 'b'] ) self.assertEqual(len(result), 5) # [ # { # 'indexed_items': [['a', 1], ['b', 1]], # 'elements': [{'a': 1, 'b': 1}] # }, # { # 'indexed_items': [['a', 1], ['b', 3]], # 'elements': [{'a': 1, 'b': 3}] # }, # { # 'indexed...
''' <NAME>, Action Recognition? A New Model and the Kinetics Dataset arxiv: https://arxiv.org/abs/1705.07750 ''' import tensorflow as tf from central_reservoir.utils.layers import linear from central_reservoir.utils.layers import conv_batchnorm_relu from central_reservoir.utils.layers import maxpool from central_res...
known to not work, but the similar query # with 'f3 ge x' instead of 'f3 like x' does work. # See test_06_index_field_condition_and_or_and_03() # in WhereClause_evaluate_node_resultTC. self._enr( "f2 gt o and lt q or f1 gt a and lt c and f3 like x", [ dict(down=1), dict(up=0, right=2, field="f2", condition="gt"...
tab. """ if self.cur_device is not None: self.TabIndex[tab]() def updateAllTabs(self): for tab in self.TabIndex: self.TabIndex[tab]() def updateCurrentTab(self): log.debug("updateCurrentTab()") self.TabIndex[self.Tabs.currentIndex()]() # ******************************************************************...
from time import sleep import os import requests import xmltodict as x2d from datetime import datetime import time import sys from os.path import join as pjoin itt = 1 def append_path(function): for r,d,f in os.walk(os.path.normpath(os.getcwd()+os.sep+os.pardir)): for files in f: if files == function+'.py' or file...
# Built-in import os import warnings # Common import numpy as np import scipy.constants as scpct from scipy.interpolate import BSpline import matplotlib.pyplot as plt # specific from . import _fit12d_funccostjac as _funccostjac __all__ = [ 'fit1d_extract', 'fit2d_extract', ] # Think this through again: # au...
potentially needs a replica :param nc_x: naming context (x) that we are testing if it "should be present" on the local DC :param gc_only: Boolean - only consider global catalog servers :param detect_stale: Boolean - check whether links seems down :return: None """ # We're using the MS notation names here to allo...
def valid(input): lines = input.split("\n") count = 0 for line in lines: words = ["".join(sorted(word)) for word in line.split()] word_set = set(words) if len(word_set) == len(words): count += 1 return count if __name__ == "__main__": test_input = """abcde fghij abcde xyz ecdab a ab abc abd abf abj i...
(i<nsym)) i++; # to=i; # # draw all tenuto strokes between these chords # if (to<nsym) { // tenuto ends in same line # for (m1=0, m2=0; m1<sym[from].npitch; m1++) { # if (sym[from].ten1[m1]) { # sym[from].ten1[m1] = 0; #mark as done # for (m=m2; m<sym[to].npitch; m++) # if (sym[to].ten2[m]) { # m2=m; # sym[to].ten2[m] ...
<reponame>pji/yadr """ test_lex ~~~~~~~~ Unit tests for the dice notation lexer. """ import unittest as ut from tests.common import BaseTests from yadr import lex from yadr import model as m # Symbol test cases. class ASOperatorTestCase(BaseTests.LexTokenTestCase): token = m.Token.AS_OPERATOR allowed = [ m.Token...
<reponame>SilasPDJ/autoesk<filename>default/settings/set_paths.py<gh_stars>0 from .now import Now class SetPaths(Now): # the class Now IS NOT large def __get_atual_competencia_file(self): import os f = '\\get_atual_competencia.txt' dir_only = os.path.dirname(__file__) project_dir = '\\'.join(dir_only.split('\...
"name": "<NAME>", "hex": "F08080", "r": 240, "g": 128, "b": 128 }, "F0E68C": { "name": "Khaki", "hex": "F0E68C", "r": 240, "g": 230, "b": 140 }, "F0F8FF": { "name": "<NAME>", "hex": "F0F8FF", "r": 240, "g": 248, "b": 255 }, "F0FFF0": { "name": "<NAME>", "hex": "F0FFF0", "r": 240, "g": 255, "b":...
else: our_move = white_blocks[self.snake.direction][0] move_direction = self.snake.direction del(white_blocks[move_direction]) #If there are any other white or blue block moves we add them to current_grid's list in self.decision_points if len(white_blocks) > 0: if self.decision_points.has_key(self.snake.curre...
1]] # no dups index = MultiIndex(levels=levels, labels=labels) assert not index.has_duplicates # with a dup if with_nulls: def f(a): return np.insert(a, 1000, a[0]) labels = list(map(f, labels)) index = MultiIndex(levels=levels, labels=labels) else: values = index.values.tolist() index = MultiIndex.from_t...
remove_all_vertices(self): ''' Removes all vertices from the Stroke. ''' pass def remove_vertex(self, vertex: 'StrokeVertex'): ''' Removes the StrokeVertex given as argument from the Stroke. The length and curvilinear abscissa are updated consequently. :param vertex: the StrokeVertex to remove from the Stroke....