input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>OpenIxia/ixnetwork_restpy<filename>ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/pimsm_5b2c0eab6298f36b1362558022b2d248.py # MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associa...
vs. F and y are mismatched, and one of them has all of # fc, F, and y, then just use the one that's common to both of # them. Otherwise, if fc vs. F and y are exclusively # mismatched, connect them all and tell the respective ports to # turn their linking constraints on. 2) if one port is missing # T, P, or vf, th...
<reponame>wycivil08/blendocv # ##### BEGIN GPL LICENSE BLOCK ##### # # 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) any later version. # #...
MagicWordConfig.EXEC_LOC_SERVER def handleWord(self, invoker, avId, toon, *args): hoodsVisited = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000] toon.b_setHoodsVisited(hoodsVisited) toon.b_setTeleportAccess(hoodsVisited) return "{} can now teleport anywhere!".format(toon.getName...
<filename>pensa/dimensionality/pca.py import numpy as np import pyemma from pyemma.util.contexts import settings import MDAnalysis as mda import matplotlib.pyplot as plt # --- METHODS FOR PRINCIPAL COMPONENT ANALYSIS --- def calculate_pca(data): """ Performs a PyEMMA PCA on the provided data. Parameters ----...
"ZYXEL-ES2024A-MIB", "oid" : "1.3.6.1.4.1.890.172.16.17.32.7.7.1.4", "status" : "current", "syntax" : { "type" : { "basetype" : "Bits", "ping" : { "nodetype" : "namednumber", "number" : "0" }, "traceroute" : { "nodetype" : "namednumber", "number" : "1" }, }, }, "access" : "readwrite", "description" : ...
# -*- coding: utf-8 -*- """ Created on Fri Jan 12 11:04:21 2018 @author: DIhnatov """ """ Implementation of Residual Network In theory, very deep networks can represent very complex functions; but in practice, they are hard to train. Residual Networks, introduced by He et al., allow you to train much deeper networks ...
* (m.Tge[it, jt, ix, jx] - 60 - 273.16)) - 3.3532e-06 * (m.Tge[it, jt, ix, jx] - 60 - 273.16) ** 2) * m.ye[it, jt, ix, jx, 'c'] / ( m.ye[it, jt, ix, jx, 'c'] + m.ye[it, jt, ix, jx, 'n']) + \ ( 0.2165 - 0.1743 * (m.P[it, jt, ix, jx] - 1.4) + 0.001377 * (m.Tge[it, jt, ix, jx] - 60 - 273.16) + 0.13109 * ( (m.P[it, jt...
<reponame>ivergara/ibis import unittest from decimal import Decimal from io import StringIO import pandas as pd import pandas.testing as tm import pytest import ibis import ibis.expr.api as api import ibis.expr.types as ir from ibis import literal as L from ibis.common.exceptions import RelationError from ibis.expr.d...
BTC for " +str(currBTCEURBid) +"€ = " +str("%.3f" % arb30_profitB)) #NEO arb31_profitA = safe_division((currNEOEURBid - (currNEOBTCAsk*currBTCEURAsk))*100.0,currNEOBTCAsk*currBTCEURAsk) if arb31_profitA >= min_profit: print(strftime("[%H:%M] ") +"Buy BTC " +str(currBTCEURAsk) +"€ -> Buy NEO " +str(currNEOBTCAsk) +...
(¶) symbol when we render the document. builder.writeln("Hello world!") builder.writeln("Hello again!") doc.layout_options.show_paragraph_marks = show_paragraph_marks doc.save(ARTIFACTS_DIR + "Document.layout_options_paragraph_marks.pdf") #ExEnd #pdf_doc = aspose.pdf.Document(ARTIFACTS_DIR + "Document.layout_o...
red < 0 else red), 255 if green > 255 else (0 if green < 0 else green), 255 if blue > 255 else (0 if blue < 0 else blue))) def __mul__(self, other): if isinstance(other, ColourHSL): hue = self.hue * other.hue saturation = self.saturation * other.saturation luminance = self.luminance * other.luminance return C...
"parent": "ring_02_l", "jox": -0.3608, "joy": 2.9877, "joz": -12.8997, "radius": 3.0 }, "root": { "nodeType": "joint", "radius": 3.0, "jox": -90, "parent": "Joint_Grp" }, "ball_r": { "tz": -0.0802, "parent": "foot_r", "tx": 10.4538, "ty": 16.5778, "jox": 0.0039, "joy": 0.009, "joz"...
id_suffix = self._get_id_suffix(operation_summary.param_info_map) dispatch_info = DispatchInfo( mapping_type=RestAnnotationType.NONE, operation_id=get_non_task_operation_name(operation_id)) if id_suffix: return (service_url + id_suffix, 'PUT', dispatch_info) else: return (service_url, 'POST', dispatch_info) cl...
= { 'level':2, 'char_class':'Paladin', 'hit_dice':'1d10', 'behavior':'elite_warrior', 'class_features':{ 'Feat_Mounted_Combatant':True, 'Divine_Sense':True, 'Lay_on_Hands':True, 'Fighting_Style_Defence':True, #'Fighting_Style_Protection':True, 'Divine_Smite':True, 'Spellcasting':True, 'Spells':[ # Число з...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 4 12:59:01 2020 @author: Ashley """ import sys import unittest import os #set current working directory to where this file is saved thisdir = os.path.dirname(os.path.abspath(__file__)) + "\\" os.chdir(thisdir) # Add higher directory to python modu...
<gh_stars>10-100 """ Defines a series of plotting functions that can be produced directly from a filtered BET results object. The plots can all be made individually or as part of the larger 2x3 plot matrix. """ from matplotlib import pyplot as plt from matplotlib.ticker import FormatStrFormatter from scipy.interpolat...
in range(-nb, nb+1): if ray_nb == 0 and rng_nb == 0: continue if ((ind_ray+ray_nb >= 0) and (ind_ray+ray_nb < nrays_sweep) and (ind_rng+rng_nb >= 0) and (ind_rng+rng_nb < radar.ngates)): if (data_sweep[ind_ray+ray_nb, ind_rng+rng_nb] is not np.ma.masked): data_cube.append( data_sweep[ind_ray+ray_nb, ind_rng+r...
from typing import overload from UdonPie import System from UdonPie.Undefined import * class DateTime: def __new__(cls, arg1=None): ''' :returns: DateTime :rtype: System.DateTime ''' pass @staticmethod @overload def ctor(arg1): ''' :param arg1: Int64 :type arg1: System.Int64 :returns: DateTime :rtype:...
from specific files, like cost.json. data = np.array(exp_data) # Flatten 1-D data. if data.shape[1] == 1: data = data.ravel() if env_keys: # Per environment parameter disaggregation. for e in env_keys: e_val = get_value_from_parameters(e, exp_param) if agent_keys: # Per agent parameter disaggregation. for p...
<reponame>nrclark/tweetnacl #!/usr/bin/env python3 """ Test suite that uses the 'crypto' wrappers for comparing saline's behavior against libsodium. """ import sys import os import json import copy import base64 import random import crypto #-----------------------------------------------------------------------------...
<reponame>ngageoint/SarPy """ The object definitions for reading and writing data in single conceptual units using an interface based on slicing definitions and numpy arrays with formatting operations. This module introduced in version 1.3.0. """ __classification__ = "UNCLASSIFIED" __author__ = "<NAME>" import loggi...
1) b = SelectorAttributeTest('foo', '!=', 1) assert a.isCompatible([b]) assert b.isCompatible([a]) def testCompatibility7(self): a = SelectorAttributeTest('foo', '=', 1) b = SelectorAttributeTest('foo', '<', 1) assert not a.isCompatible([b]) assert not b.isCompatible([a]) def testCompatibility8(self): a = S...
obj_attr_list : if obj_attr_list["lifetime"] != "none" : obj_attr_list["departure"] = obj_attr_list["lifetime"] +\ obj_attr_list["arrival"] if _obj_type == "VM" and "host_name" in obj_attr_list and obj_attr_list["host_name"] != "unknown" : if obj_attr_list["discover_hosts"].lower() == "true" : _host_attr_list = ...
< 160 assert u.state.name == "state_age_years" assert reply.content == "Please TYPE your age in years (eg. 35)" @pytest.mark.asyncio async def test_state_age_years_le18(): u = User(addr="27820001003", state=StateData(name="state_age_years"), session_id=1) app = Application(u) msg = Message( content="7", to_ad...
<reponame>arthur-bit-monnot/fire-rs-saop<gh_stars>10-100 # Copyright (c) 2019, CNRS-LAAS # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above ...
<reponame>jbchouinard/untitled-word-game<filename>wordgame/words/scrabble4.py WORDS = [ "that", "this", "with", "from", "your", "have", "more", "will", "home", "page", "free", "time", "they", "site", "what", "news", "only", "when", "here", "also", "help", "view", "been", "were", "some", "like"...
#!/usr/bin/env python # coding: utf-8 import sys import unittest import warnings import webdriverplus from selenium.webdriver.common.keys import Keys # WebElements as set # close_on_shutdown # default_selector # base_url # drag & drop # find_all().find() is broken # No such element exceptions need to be cleaner ...
<filename>rpn_to_gemlam/rpn_to_gemlam.py # Copyright 2019-2020 The Salish Sea MEOPAR contributors # and The University of British Columbia # # 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 # # ...
token_id = beam_token_id % self.vocab_size # 1 # 上面的公式计算beam_id只能输出0和num_beams-1, 无法输出在(batch_size, num_beams)中的真实id # 如上图, batch_idx=0时,真实beam_id = 0或1; batch_idx=1时,真实beam_id如下式计算为2或3 # batch_idx=1时,真实beam_id如下式计算为4或5 effective_beam_id = batch_idx * self.beam_size + beam_id # 如果遇到了eos, 则讲当前beam的句子(不含当前的eos)存入gen...
import os import psutil import threading import secrets from PIL import Image from flask import render_template, url_for, flash, redirect, request, abort from raceaaa import app, db, bcrypt, mysql_connect_host, mysql_connect_database, mysql_connect_user, mysql_connect_password from raceaaa.forms import Registrat...
- 0.00308935*m.x219 - 0.0026527*m.x220 + 0.0134996*m.x221 + 0.000899911*m.x222 + 0.00605286*m.x223 - 0.00508668*m.x224 - 0.00467229*m.x225 + 0.000868196*m.x226 + 0.00235696*m.x227 - 0.00346431*m.x228 - 0.00651531*m.x229 - 0.0039415*m.x230 + 0.00151632*m.x231 - 0.00194288*m.x232 - 0.00289096*m.x233 - 0.00353193*m.x2...
<reponame>bryanoltman/glom """\ .. note:: glom's tutorial is a runnable module, feel free to run ``pip install glom`` and ``from glom.tutorial import *`` in the Python REPL to glom along. Or `try it in your browser here <https://repl.it/@mhashemi/glom-planetary-templating>`_ or in the embedded REPLs below! Deal...
<filename>REQreate/network_class.py<gh_stars>1-10 import math import os import osmapi as osm import osmnx as ox import networkx as nx import numpy as np import pandas as pd import matplotlib.pyplot as plt import random from shapely.geometry import Point from shapely.geometry import Polygon from geopy.distance import ge...
from threading import RLock import logging from datetime import datetime import collections import shelve try: import cPickle as pickle except: import pickle from opcua import ua from opcua.server.user_manager import UserManager class AttributeValue(object): def __init__(self, value): self.value = value self.v...
<gh_stars>100-1000 """Local Numpy memmap Backend Implementation, Identifier: ``NUMPY_10`` Backend Identifiers =================== * Backend: ``1`` * Version: ``0`` * Format Code: ``10`` * Canonical Name: ``NUMPY_10`` Storage Method ============== * Data is written to specific subarray indexes inside a numpy memmapp...
TODO works with functions instead of arrays Phi_x = self.mean.grad(x, self.mean.parameters) # TODO check when the mean and covariance don't have the same shape return Phi_x * Gaussian(prior.mean, prior.covariance) + Gaussian(0, self.covariance) else: raise TypeError("Expecting the prior to be a Gaussian distributi...
"801" : "warhammer", "1116" : "diablo", "286" : "kart", "1814" : "elsword", "1184" : "baram", "1843" : "d_fighter_new", "1510" : "maplestory", "2454" : "maplestory2", "1643" : "getamped", "1745" : "mabi_heroes", "1859" : "tera", "17521" : "leagueoflegends2", "1975" : "cyphers", "1986" : "latale", "2085" :...
overlap with existing objects :return ndarray: >>> seg = np.zeros((15, 20), dtype=int) >>> ell_params = 7, 10, 5, 8, np.deg2rad(30) >>> ell = add_overlap_ellipse(seg, ell_params, 1) >>> ell array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
<reponame>osoco/better-ways-of-thinking-about-software<filename>Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/lib/xmodule/xmodule/tests/test_conditional.py # lint-amnesty, pylint: disable=missing-module-docstring import json import unittest from unittest.mock import Mock, patch fro...
'', "planner_not_confirmed": ''}, #join the dark side {"params": ["Join", "Dark", "Side"], "Join": [["join"], [], [], []], "Dark": [["dark"], [], [], []], "Side": [["side"], [], [], []], "conceptual_dependency": "(task (plan user_speech) (action_type speech_generator) (params join_dark_side) (step )) ", ...
":I_RSET", OrderedDict(props), list(tags))) props[_HANDLE_PROPERTY] = "readback" data.append((channel + ":I_RD", OrderedDict(props), list(tags))) props[_FIELD_ENG_PROPERTY] = elem.fields.power_status props[_FIELD_PHY_PROPERTY] = elem.fields.power_status_phy props[_HANDLE_PROPERTY] = "setpoint" data.append((chann...
<gh_stars>1-10 # -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 IBM Corp. 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 # # https://www.apache.org/licenses/LIC...
modes # TODO: check stability of using this parameter snmodes = len(select_freq) #print("select_freq.shape: {}".format(select_freq.shape)) if len(redmass) > snmodes: redmass_sel = redmass[select_freq] else: redmass_sel = redmass if len(delta) > snmodes: delta_sel = delta[select_freq] else: delta_sel = delta ...
<filename>Python Files/Modify.py import sys #sys.getdefaulencoding() import pylatex import numpy as np from sympy.matrices import Matrix from sympy import * from PyQt5 import QtGui as qtg from PyQt5 import QtCore as qtc from PyQt5.QtCore import pyqtSignal, pyqtSlot from PyQt5 import QtCore, QtGui, QtWidgets f...
str srcintf: description: - Source interface names. type: list suboptions: name: description: - Interface name. Source system.interface.name system.zone.name. required: true type: str ssh_filter_profile: description: - Name of an existing SSH filter profile. Source ssh-filter.profile.name. type: str ssh_...
= hi f.someattr = None eq_(self._someattr_history(f), ([None], (), [hi])) def test_use_object_set_value_twice(self): Foo, Bar = self._two_obj_fixture(uselist=False) f = Foo() hi = Bar(name="hi") there = Bar(name="there") f.someattr = hi f.someattr = there eq_(self._someattr_history(f), ([there], (), ())) d...
(or opaque) class, remove # unwanted instance vars from self.ivars try: variables = self.lumpy.instance_vars[self.classobj] self.ivars.intersection_update(variables) except KeyError: pass # draw the instance variables ivars = list(self.ivars) ivars.sort() if ivars: lines.append(p.y) p.y += 1 for varname...
<gh_stars>1-10 import discord from discord.ext import commands import random import os import pymongo # Discord Setup ######################## TOKEN = os.environ["TOKEN"] ######################################## # DB Setup ############################# cluster = pymongo.MongoClient(os.environ["MONGO_STRING"]) db = cl...
<reponame>TranslatorIIPrototypes/Babel<filename>src/createcompendia/chemicals.py from collections import defaultdict import jsonlines import requests import ast from gzip import GzipFile from src.ubergraph import UberGraph from src.prefixes import MESH, CHEBI, UNII, DRUGBANK, INCHIKEY, PUBCHEMCOMPOUND,GTOPDB, KEGGCOMP...
<filename>heritability/rhemc_pipeline.py __author__ = '<NAME>' import hail as hl # hl.init(spark_conf={'spark.hadoop.fs.gs.requester.pays.mode': 'CUSTOM', # 'spark.hadoop.fs.gs.requester.pays.buckets': 'ukb-diverse-pops-public', # 'spark.hadoop.fs.gs.requester.pays.project.id': 'ukbb-diversepops-neale'}) import hail...
<filename>MPM.py # 2021.03.24 # @yifan # most probable mode for bitstream encoding # codeword should be sorted maybe in a similar mannar like HEVC's angular prediction # or it should be sorted based on the context? smooth -> texture # based on statics, we got the probability import numpy as np import copy from myIO i...
from google.appengine.ext import ndb import webapp2 import json class MainPage(webapp2.RequestHandler): def get(self): self.response.out.write(""" <html> <head> <title>Backend Challenge</title> <link rel="stylesheet" type="text/css" href="/css/main.css" /> </head> <body> <header> <h2> Backend Challenge <...
[ "jsonschema==2.6.0", "--disable-cache", "--python-shebang=#!/usr/bin/env python", "--python={}".format(py27_interpreter), "--python={}".format(py36_interpreter), "-o", pex, ] ) results.assert_success() pex_program = [pex, "-c"] py2_only_program = pex_program + ["import functools32"] both_program = pex_p...
dict): pruned_scheme = [key for key in scheme.keys() if key not in RESERVED_SCHEME_KEYS and key[0] not in RESERVED_SCHEME_KEYS] for key, value in six.iteritems(data): if key in pruned_scheme: continue unrecognized_values[key] = value validations = scheme.get('is') if validations and 'one_of' in validations: ...
settings file }, { "mode": "write-traction", # mode is one of "read-displacements-velocities", "read-traction", "write-displacements-velocities", "write-traction" "preciceMeshName": "MuscleMeshBottom", # name of the precice coupling surface mesh, as given in the precice xml settings "tractionName": "Traction", # ...
'621486' : u'招商银行-银联金葵花IC卡-借记卡', '628290' : u'招商银行-IC公务卡-贷记卡', '622578' : u'招商银行-招商银行信用卡-贷记卡', '370285' : u'招商银行信用卡中心-美国运通绿卡-贷记卡', '370286' : u'招商银行信用卡中心-美国运通金卡-贷记卡', '370287' : u'招商银行信用卡中心-美国运通商务绿卡-贷记卡', '370289' : u'招商银行信用卡中心-美国运通商务金卡-贷记卡', '439225' : u'招商银行信用卡中心-VISA信用卡-贷记卡', '518710' : u'招商银行信用卡中心-M...
return addSegment(name, start, end, template, options) def addIntergenicSegment(last, this, fasta, options): """add an intergenic segment between last and this. At telomeres, either can be None. """ if not this and not last: return 0 nadded = 0 if not this: # last telomere try: lcontig = fasta.getLength(l...
"""Paint4Brains Data Manipulation This script contains the main functions required for manipulating the data required by the software. Data manipulation includes loading the data, performing any required pre-processing, selecting data and label slices, and manipulating information. This file consists of several functi...
1-3 (int) Returns: float: 断熱性能の区分݆jにおける日射取得性能の区分k݇の暖房期の日射取得係数 mu_H_j_k """ return get_table_8()[(j - 1) * 6 + (k - 1) * 2 + 0][region - 1] def get_mu_C_j_k(region, j, k): """断熱性能の区分݆jにおける日射取得性能の区分k݇の冷房期の日射取得係数 mu_C_j_k Args: region(int): 省エネルギー区分 j(int): 断熱性能の区分 k(int): 日射遮蔽レベル 1-3 (int) Returns: float...
"""Utilities for manipulating variant files in standard VCF format. """ from collections import namedtuple, defaultdict import copy import os import pprint import shutil import subprocess import toolz as tz import six from six.moves import zip from bcbio import broad, utils from bcbio.bam import ref from bcbio.dist...
import re import os import filecmp import textwrap import sys from os.path import abspath, join, curdir, pardir from nose import SkipTest from nose.tools import assert_raises from mock import patch from pip.util import rmtree, find_command from pip.exceptions import BadCommand from tests.test_pip import (here, reset...
\quad \mathbb{E}[\log\bar{k}'] & = & b_0 + b_1 \log\bar k \\ # k' &\geq& 0 \\ # \end{eqnarray*} # %% [markdown] # ## Implementation Using the HARK Toolkit # %% [markdown] # #### The Consumer # %% {"code_folding": [0]} # Import generic setup tools # This is a jupytext paired notebook that autogenerates KrusellSmith....
"AccessKey" } }, { "pkg": "aws", "mod": "iam/accountAlias", "fqn": "pulumi_aws.iam", "classes": { "aws:iam/accountAlias:AccountAlias": "AccountAlias" } }, { "pkg": "aws", "mod": "iam/accountPasswordPolicy", "fqn": "pulumi_aws.iam", "classes": { "aws:iam/accountPasswordPolicy:AccountPasswordPolicy": "Acc...
set """ return self["Moisture Content 9"] @moisture_content_9.setter def moisture_content_9(self, value=None): """Corresponds to IDD field `Moisture Content 9`""" self["Moisture Content 9"] = value @property def liquid_transport_coefficient_9(self): """field `Liquid Transport Coefficient 9` | Units: m2/s ...
Show an input file of a calculation node. It shows the files in the raw_input subdirectory. Use the -h option for more help on the command line options. """ from aiida.cmdline.commands.node import cat_repo_files from aiida.common.exceptions import NotExistent import argparse parser = argparse.ArgumentParser( ...
Element #0 does not exist. # (Element #0 means that no element is selected) return None # This is the fixed list of element emission line names. # The element with ID==1 is found in total_list[0] total_list = self.param_model.get_user_peak_list(include_user_peaks=include_user_peaks) try: ename = total_list[n_id...
from pathlib import Path import abc import logging import io import importlib import time from _collections import OrderedDict import traceback import pandas as pd import numpy as np import shutil from graphviz import Digraph from ibllib.misc import version import one.params from one.alf.files import add_uuid_string ...
# Copyright(c) 2019, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer....
import numpy as np import tensorflow as tf from tensorflow.python.keras import backend as K from tensorflow.python.keras.layers import Layer, Lambda from tensorflow.python.keras.layers import InputSpec from tensorflow.python.ops import nn_ops from tensorflow.python.keras import initializers, regularizers, constraints...
<filename>gRNAScores/gRNAScoring.py # -*- coding: utf-8 -*- """ Created on Sat Jan 7 2017 Python functions used to score gRNAs according to Hsu et al. (2013) and Doench et al. (2016) algorithms. Off-scoring function dependent on C++ binary executable and text file with off-target gRNA database. @author: <NAME> """ from...
"csrf_token": csrf_token, "comment": "This look alright but we can do better", } with testing.mock_sends( pagure_messages.PullRequestCommentAddedV1( topic="pagure.pull-request.comment.added", body={ "pullrequest": { "id": 1, "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title":...
0.040298 0.500000 1.182235 3.026362 -0.316201 -0.078545 -1.036206 -0.010984 0.000000 0.036532 """) class DouglasEtAl2013StochasticSD010Q600K005( DouglasEtAl2013StochasticSD001Q200K005): """ Stress Drop 010 - Q 600 - Kappa 0.005 """ COEFFS = CoeffsTable(sa_damping=5, table="""\ IMT b1 b2 b3 b4 b5 b6 bh total ...
= slice( # Don't forget the extra byte for the address algo denotation hash_slice_static.start - 1 - hash_length, hash_slice_static.start - 1 ) calc_slice_dynamic = slice( 0, hash_slice_dynamic.start ) self._sig_slice = sig_slice if calculate_dynamic: address_dynamic = self._addresser.create( bytes(packed...
<reponame>InverseInductor/kicad_scripts #!/usr/bin/python """ @package: Parser and capture eeschema components and hierarchy into memory """ import os import re import logging from Queue import Queue from utils import MapNestedList, MapNestedDict from linkeddata import linkedVirtualStrData, linkedStrData log = loggi...
# df.at [bre.Index, 'IPCR3' ] = [truc for truc in bre.IPCR3 if truc.strip() not in Exclus] # df.at [bre.Index, 'IPCR4' ] = [truc for truc in bre.IPCR4 if truc.strip() not in Exclus] # df.at [bre.Index, 'IPCR7' ] = [truc for truc in bre.IPCR7 if truc.strip() not in Exclus] # df.at [bre.Index, 'IPCR11' ] = [truc ...
relationshipSets are a dts property self.relationshipSets = [(arcrole, ELR, linkqname, arcqname) for arcrole, ELR, linkqname, arcqname in self.modelXbrl.baseSets.keys() if ELR and (arcrole.startswith("XBRL-") or (linkqname and arcqname))] def insertDocuments(self): # filing->documents # self.showStatus("inser...
= Poly(z, C) for a in an: n *= (D + 1 - a) for a in ap: n *= (-D + a - 1) #print n b0 = n.nth(0) #print b0 if b0 == 0: raise ValueError('Cannot decrement lower b index (cancels)') #print b0 n = Poly(Poly(n.all_coeffs()[:-1], C).as_expr().subs(C, _x - bi), _x) #print n self._poly = Poly((m - n)/b0, _x) ...
<reponame>DevconX/Malaya import numpy as np from malaya.text.jarowinkler import JaroWinkler from sklearn.metrics.pairwise import ( cosine_similarity, euclidean_distances, manhattan_distances, ) from malaya.function import ( check_file, load_graph, generate_session, nodes_session, ) from malaya.text.bpe import Se...
is called asynchronously, returns the request thread. """ all_params = ['bt_locator', 'fields', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.ite...
#!/usr/bin/env python import logging from os.path import join, realpath import sys; sys.path.insert(0, realpath(join(__file__, "../../../"))) from hummingbot.logger.struct_logger import METRICS_LOG_LEVEL import asyncio import contextlib from decimal import Decimal import os import time from typing import ( List, Op...
#!/usr/bin/env python import unittest import logging import importlib import copy import os from mock import patch from nose.tools import raises logging.disable(logging.CRITICAL) ciftify_recon_all = importlib.import_module('ciftify.bin.ciftify_recon_all') class ConvertFreesurferSurface(unittest.TestCase): meshes =...
is used)"), 'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"), 'company_id': fields.many2one('res.company', 'Company', required=True, select...
operator is "In", and the values array contains only "value". The requirements are ANDed. """ return pulumi.get(self, "match_labels") @match_labels.setter def match_labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "match_labels", value) @pulumi.input_type class Kube...
[_d + _i + _q + _f + _pa for (_d, _i, _q, _f, _pa) in zip(description_id_list, inventory_id_list, quest_id_list, feedback_id_list, prev_action_id_list)] input_description = pad_sequences(description_id_list, maxlen=max_len(description_id_list)).astype('int32') input_description = to_pt(input_description, self.use_cu...
"羽": List.append("9D68") elif i == "潮": List.append("9D69") elif i == "香": List.append("9D6A") elif i == "議": List.append("9D6B") elif i == "軽": List.append("9D6C") elif i == "伝": List.append("9D6D") elif i == "絡": List.append("9D6E") elif i == "張": List.append("9D6F") elif i == "増": List.append("9D70"...
# Report the number of duplicate metabolites. if validate and num_duplicates > 0: warn('{0} duplicate metabolites were removed from model {1} of {2}' .format(num_duplicates, model.id, model.name)) # Add all of the reactions to the COBRApy model. LOGGER.info('Started adding %d reactions from source model', len(dat...
only the band indices as data variables in the dataset. Default is True. zonal_stats : string, optional An optional string giving the names of zonal statistics to calculate for each polygon. Default is None (all pixel values are returned). Supported values are 'mean', 'median', 'max', 'min', and 'std'. Will work i...
import mysql.connector from enum import Enum from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, Query from sqlalchemy.ext.automap import automap_base from sqlalchemy.sql.elements import BinaryExpression from sshtunnel import SSHTunnelForwarder import pymysql import psycopg2 import pymssql imp...
import unittest import calendar import math import re import sys sys.path[0:0] = [ '../src' ] from guts import * class SamplePat(StringPattern): pattern = r'[a-z]{3}' class SampleChoice(StringChoice): choices = [ 'a', 'bcd', 'efg' ] basic_types = (Bool, Int, Float, String, Unicode, Complex, Timestamp, SamplePat...
<reponame>exastro-suite/epoch<filename>epochControlTektonApi/api_tekton.py # Copyright 2019 NEC Corporation # # 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/...
import os import sys import numpy as np import matplotlib matplotlib.use('pdf') # import matplotlib.pyplot as plt import importlib import argparse import tensorflow as tf import pickle import socket BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) sys.path.append(os.path.join(BASE_DIR, ...
-- Calculating the power spectrum following the numpy fft example - stream.remove_flagged() -- returns stream (removes data from stream according to flags) - stream.resample(period) -- Resample stream to given sampling period. - stream.rotation() -- Rotation matrix for rotating x,y,z to new coordinate system xs,ys,z...
<gh_stars>1-10 # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD (3-clause) from copy import deepcopy from distutils.version import LooseVersion import itertools as itt from math import log import os import numpy as np from scipy import linalg, sparse from .defaults import _EXTRAPOLA...
<reponame>donalbonny/ATAC-seq-Huq-Lab #!/usr/bin/env python # <NAME> (<EMAIL>) # May 2017 (version 0.2: Oct. 2017) # This script converts a SAM file to BED format. # It combines "properly paired" alignments into # a single BED interval. There are options to # include unpaired alignments in the output, # and they can ...
that this may not always be available or up to date. For \ example, if a user changes their display name, the API may show the new value in a future response, but the items \ associated with the user won't show up as having changed when using delta. id: Unique identifier for the identity. - name: --microsoft-grap...
for area in self.CALIBRATION_AREAS: calibration_bitmask += (self._calibration_status[area][fem - 1] << bit) bit += 1 if calibration_bitmask == 0x1F: calibration_bitmask += (1 << bit) self._calibration_bitmask[fem-1] = calibration_bitmask def hl_manual_dac_calibration(self, filename): logging.debug("Manual DAC ...
<gh_stars>0 import sys import json import time from pprint import pprint from benchmarker import Benchmarker from datetime import datetime import traceback from mysql_interface import SQL_Interface import function_lib as lib # ===================================================================================== # Read...
[0,0] self.postSynaptic['OLLL'] = [0,0] self.postSynaptic['OLLR'] = [0,0] self.postSynaptic['OLQDL'] = [0,0] self.postSynaptic['OLQDR'] = [0,0] self.postSynaptic['OLQVL'] = [0,0] self.postSynaptic['OLQVR'] = [0,0] self.postSynaptic['PDA'] = [0,0] self.postSynaptic['PDB'] = [0,0] self.postSynaptic['PDEL'] = [0,...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01b_dataset_video.ipynb (unless otherwise specified). __all__ = ['show_img', 'save_img', 'save_img_annotations', 'draw_grid', 'draw_bbox', 'bb_intersection_over_union', 'sample_bbox', 'draw_rectangle', 'draw_ellipse', 'create_color_classification', 'create_shape_color_...