input
stringlengths
2.65k
237k
output
stringclasses
1 value
<filename>daskms/reads.py # -*- coding: utf-8 -*- import logging from pathlib import Path import dask import dask.array as da import numpy as np import pyrap.tables as pt from daskms.columns import (column_metadata, ColumnMetadataError, dim_extents_array, infer_dtype) from daskms.constants import DASKMS_PARTITION_K...
<filename>USBIP.py # Copyright (c) 2014 <NAME> <<EMAIL>>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this l...
import colorsys import operator from enum import Enum from io import BytesIO from PIL import Image from fs_helpers import * try: import pyfastbti PY_FAST_BTI_INSTALLED = True except ImportError: PY_FAST_BTI_INSTALLED = False try: import pyfasttextureutils PY_FAST_TEXTURE_UTILS_INSTALLED = True except ImportE...
from __future__ import with_statement import subprocess import unittest import sys import os import imp from tempfile import mkdtemp from shutil import rmtree import mozunit from UserString import UserString # Create a controlled configuration for use by expandlibs config_win = { 'AR_EXTRACT': '', 'DLL_PREFIX': '', ...
@property def pretty_platforms(self): """ Returns a prettified list of related pipelines """ return list(set([sample.pretty_platform for sample in self.samples.all()])) @property def processed_samples(self): return list([sample.accession_code for sample in self.samples.all() if sample.is_processed == True]) @p...
#################################################################### # Author: <EMAIL> # License: BSD #################################################################### from __future__ import print_function, absolute_import import os, sys import cgi import inspect import re import types import threading from werkzeu...
<gh_stars>1-10 # -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # these are system modules import sys # these are my local ones from env import gidgetConfigVars import chrArms import refData import tsvIO # -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# ...
#Main #<NAME> #aqui se guardan los puntajes de cada seccion puntos_mate = 0 puntos_cien = 0 puntos_esp = 0 def main(): print('Bienvenido a tu examen prueba') print('Se desplegarán ciertos menus a elegir, selecciona la seccion que quieras realizar:') print('\nMENU') print('\n1. MATEMATICAS') print('2...
= info[re.search("Lower Right\s*\(\s*\-*\d+\.*\d*,\s*",info).end(0) : re.search("Lower Right\s*\(\s*\-*\d+\.*\d*,\s*\-*\d+\.*\d*",info).end(0)]; ll_1_x = info[re.search("Lower Left\s*\(\s*",info).end(0) : re.search("Lower Left\s*\(\s*\-*\d+\.*\d*",info).end(0)]; ll_1_y = info[re.search("Lower Left\s*\(\s*\-*\d+\.*\d*...
import random import time import numpy as np import gym from gym import error from gym import spaces from gym_bridge_auction.envs.solver_results import * from gym_bridge_auction.envs.dynamic_space import Dynamic from gym_bridge_auction.envs.render import Window class AuctionEnv(gym.Env): """Środowisko wieloagentowe ...
# ------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under ...
#!/usr/bin/env/python """ Usage: CCGVAE.py [options] Options: -h --help Show this screen --dataset NAME Dataset name: ZINC or QM9 --config-file FILE Hyperparameter configuration file path (in JSON format) --config CONFIG Hyperparameter configuration dictionary (in JSON format) --data_dir NAME Data dir name --re...
'''Body Composition is a Slicer module that allows to segment different parts of the lungs in a manual or semi-automatic basis with the help of a customized Slicer Editor. It also performs a set of operations to analyze the different structures of the volume based on its label map, like Area, Mean, Std.Dev., etc. First...
import math from collections import defaultdict from typing import Any, Dict, List, Union import cv2 import numpy as np from .producing import FeatureProducerBase from ..proto import Scene from ..utils import ( get_tracks_polygons, transform_2d_points, transform_2d_vectors, ) from ..utils.map import ( get_crosswa...
uncorrelated snapshot n \in 1..N_k[k] from state k. for k in range(0,K): # Determined indices of statistically independent configurations by analyzing the correlation structure of the timeseries data. indices = timeseries.subsampleCorrelatedData(u_klt[k,k,0:T_k[k]]) # Subsample data. N_k[k] = len(indices) for l ...
will block indefinitely until data is available. Args: dtype: A `tf.DType`. The type of elements in the tensor. shape: A `tf.TensorShape` or list of `ints`. The shape of the tensor. device_ordinal: An optional `int`. Defaults to `-1`. The TPU device to use. This should be -1 when the Op is running on a TPU devic...
self._is_closed: return if x_position is None: x_position = self.width / 2 if y_position is None: y_position = self.height - 20 anchor_point = Point(x_position, y_position) text = Text(anchor_point, message) # FIXME: Really should do all this on a per-RoseCanvas basis. if self.initial_canvas: text.attach_to...
"綞", "缎": "緞", "缏": "緶", "缑": "緱", "缒": "縋", "缓": "緩", "缔": "締", "缕": "縷", "编": "編", "缗": "緡", "缘": "緣", "缙": "縉", "缚": "縛", "缛": "縟", "缜": "縝", "缝": "縫", "缞": "縗", "缟": "縞", "缠": "纏", "缡": "縭", "缢": "縊", "缣": "縑", "缤": "繽", "缥": "縹", "缦": "縵", "缧": "縲", "缨": "纓", "缩": "縮", "缪": "繆", "缫": "繅", "缬": "纈", "缭": "繚", "缮": ...
an event of this type. event_schema_version = ndb.IntegerProperty(indexed=True) @staticmethod def get_deletion_policy(): """RateExplorationEventLogEntryModels are anonymized, and cannot be tied back to an individual user. """ return base_models.DELETION_POLICY.NOT_APPLICABLE @staticmethod def get_user_id_mig...
#////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 # Name : # Author : Avi # Revision : $Revision: #10 $ # # Copyright 2009-2020 ECMWF. # This software is licensed under the terms of the Apache Licence version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In ...
""" Train Class1 pan-allele models. """ import argparse import os from os.path import join import signal import sys import time import traceback import random import pprint import hashlib import pickle import uuid from functools import partial import numpy import pandas import yaml import tqdm # progress bar tqdm.moni...
import utils import torch import numpy as np from torch import nn import torchgeometry from kornia import color import torch.nn.functional as F from time import time from torchvision.transforms import RandomResizedCrop class Dense(nn.Module): def __init__(self, in_features, out_features, activation='relu'): super(D...
<filename>tests/unit/test_parser.py from pprint import pprint import pytest def test_select_star(parser): tree = parser.parse('SELECT * from bar') assert tree.query_type == "SELECT" assert tree.table == 'bar' assert tree.expressions == [ ( ('*', None), None ) ] def test_select_table_wild(parser): tree = ...
== 2 : s += 'bi' l[elem] = s # if mutants : else : for elem in lumen_list[:, 0] : if elem in border_set : if elem in wild_list : l[elem] = 'TEmi' elif elem in mutants_list : l[elem] = 'mutantsmi' else : l[elem] = 'wild_mutantsmi' else : l[elem] = 'ICMmi' return l def gen_folders(nfold, name='config', ...
"instagram": "", "linkedin": "", "reddit": "", "slack": "", "telegram": "", "twitter": "https://twitter.com/swissborg", "youtube": "" } }, "NMR": { "symbol": "NMR", "address": "0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671", "decimals": 18, "name": "Numerai", "ens_address": "", "website": "https://numer.ai"...
<filename>URMC_CTSI_openbadge_analysis/Preprocessing.py #For Hublog, import the following packages from __future__ import absolute_import, division, print_function import pandas as pd import re #for core, import the following packages import crc16 #for raw, import the following packages import json import o...
<filename>SIR2_DNN.py """ @author: LXA Benchmark Code of SIR model 2020-11-13 """ import os import sys import tensorflow as tf import numpy as np import time import platform import shutil import DNN_base import DNN_tools import DNN_data import plotData import saveData # 记录字典中的一些设置 def dictionary_o...
<reponame>hkmoon/ms_deisotope<filename>ms_deisotope/data_source/thermo_raw_net.py '''Thermo RAW file reading implementation using the pure .NET RawFileReader library released in 2017. This module provides :class:`ThermoRawLoader`, a :class:`~.RandomAccessScanSource` implementation. Depends upon the ``pythonnet`` proj...
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 <NAME>. All rights reserved. # Copyright (c) 2014 <NAME>. All rights reserved. # Copyright (c) 2014 <NAME>. All rights reserved. # Copyright (c) 2014 <NAME>. All rights reserved. # Copyright (c) 2014 <NAME>. All rights reserved. # Copyright (c)...
# -*- coding: utf-8 -*- from openerp import models,fields,api from openerp.tools.translate import _ from openerp.exceptions import Warning import datetime import time import psycopg2 import sys #TODO : # - Liste des clients livrables avant la création de la liste à servir # - Gestion du stock A et Q => Attente te...
*pSFX, unsigned char loc, int x, int y)") del_items(0x8003D4B8) SetType(0x8003D4B8, "void PlayEffect__Fii(int i, int mode)") del_items(0x8003D604) SetType(0x8003D604, "int RndSFX__Fi(int psfx)") del_items(0x8003D6AC) SetType(0x8003D6AC, "void PlaySFX__Fi(int psfx)") del_items(0x8003D718) SetType(0x8003D718, "void PlayS...
unicode(mkt.ADDON_PREMIUM_TYPES[mkt.ADDON_FREE_INAPP])) def test_invalid_page(self): r = self.client.get(self.url, {'page': 999}) eq_(r.status_code, 200) eq_(r.context['pager'].number, 1) def test_queue_count(self): r = self.client.get(self.url) eq_(r.status_code, 200) doc = pq(r.content) links = doc('.tabna...
str) -> Dict: """ Provides details about an entity recognizer including status, S3 buckets containing training data, recognizer metadata, metrics, and so on. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer>`_ **Request Syntax** :: response...
"""This module defines the base Optimization Protocol classes. The classes defined herein are not intended for direct use, but are rather parent classes to those defined in :mod:`hyperparameter_hunter.optimization` Related ------- :mod:`hyperparameter_hunter.optimization` Defines the optimization classes that are int...
"""Utility module for creating transformation matrices Basically this gives you the ability to construct transformation matrices without needing OpenGL or similar run-time engines. The result is that design-time utilities can process files without trading dependencies on a particular run-time. This code is originally...
<filename>leavitt/sampler.py #!/usr/bin/env python """SAMPLER.PY - Variable star sampler """ from __future__ import print_function __authors__ = '<NAME> <<EMAIL>>' __version__ = '20220320' # yyyymmdd import time import numpy as np from dlnpyutils import utils as dln from astropy.table import Table import matplotli...
from clang.cindex import * import vim import time import re import threading def initClangComplete(clang_complete_flags): global index index = Index.create() global translationUnits translationUnits = dict() global complete_flags complete_flags = int(clang_complete_flags) # Get a tuple (fileName, fileContent) f...
= [t.to_dict() for t in sd['thick']] sd['thin'] = [t.to_dict() for t in sd['thin']] return sd def from_dict(self, sd): """ Load values from a sarcomere dict. Values read in correspond to the current output documented in to_dict. """ # Warn of possible version mismatches read, current = sd['version'], self.vers...
None self.fullbcount = None self.__chain_b() # For each element x in b, set b2j[x] to a list of the indices in # b where x appears; the indices are in increasing order; note that # the number of times x appears in b is len(b2j[x]) ... # when self.isjunk is defined, junk elements don't show up in this # map at a...
subclass = None superclass = None def __init__(self, Function_Name=None, Entry_Point=None, Ordinal=None): self.Function_Name = Function_Name self.Entry_Point = Entry_Point self.Ordinal = Ordinal def factory(*args_, **kwargs_): if PEExportedFunctionType.subclass: return PEExportedFunctionType.subclass(*args_, **...
(cov_type == 'full') if full_cov: Kss = kernel(X) Qss = W.matmul(W.t()) cov = Kss - Qss else: Kssdiag = kernel(X, diag=True) Qssdiag = W.pow(2).sum(dim=-1) # Theoretically, Kss - Qss is non-negative; but due to numerical # computation, that might not be the case in practice. cov = (Kssdiag - Qssdiag).clamp(mi...
Crystal":0xf0ede0, "Salt Glaze":0xcfd4ce, "Salt Island Green":0x757261, "Salt Lake":0x74c6d3, "Salt Mountain":0xd7fefe, "Salt n Pepa":0xdcd9db, "Salt Pebble":0xf9ecea, "Salt Spray":0xa7c5ce, "Salt Steppe":0xeeddbb, "Salt Water":0x95bbd8, "Salt Water Taffy":0xd1ab99, "Saltbox Blue":0x65758a, "Salted Caramel":0xebb367, "...
<reponame>haiyangxue/fairseq # 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 math import torch import torch.nn as nn import torch.nn.functional as F from collections.abc import Itera...
<reponame>x22x22/python-ceph-cfg # Import Python Libs from __future__ import absolute_import import logging import stat import os.path import os import subprocess # local modules from . import util_which from . import utils from . import model from . import mdl_updater from . import presenter from . import mdl_query f...
:return: a dictionary containing the following keys: * ``messageid``: id of the message (int) * ``title``: message's title * ``body``: message's text * ``timestamp``: UNIX timestamp (long integer) that specifies when the message was created. * ``replyto``: The id of the parent message. String with the format ms...
from animal_avatar.utils.colors import darken MUZZLES = ( lambda color: '<path fill="#fff" d="M299.9 307.2c0 35-22.3 63.3-49.9 ' '63.3s-49.9-28.3-49.9-63.3 22.4-46.7 49.9-46.7 49.9 11.8 49.9 46.7z"/>' '<path fill="#f3252f" d="M250 315l12.3 7.8c0 23-24.2 23.2-24.4.4v-.4l12.1-7.7z"/>' '<path fill="#15212a" d="M285....
<reponame>JHP4911/JINA import os import numpy as np import pytest from jina import Flow from jina.enums import SocketType, FlowBuildLevel from jina.excepts import RuntimeFailToStart from jina.executors import BaseExecutor from jina.helper import random_identity from jina.proto.jina_pb2 import DocumentProto from jina....
<filename>yt_dlp/extractor/npo.py<gh_stars>10-100 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( determine_ext, ExtractorError, fix_xml_ampersands, int_or_none, merge_dicts, orderedSet, parse_dur...
"iconst_5" ], 0x6c : [ "idiv" ], 0xa5 : [ "if_acmpeq", "branchbyte1:B branchbyte2:B", special_F2, special_F2R, None ], 0xa6 : [ "if_acmpne", "branchbyte1:B branchbyte2:B", special_F2, special_F2R, None ], 0x9f : [ "if_icmpeq", "branchbyte1:B branchbyte2:B", special_F2, special_F2R, None ], 0xa0 : [ "if_icmpne", "b...
ORPORT=0") return d def test_multiline_plus(self): """ """ d = self.protocol.get_info("FOO") d.addCallback(CallbackChecker({"FOO": "\na\nb\nc"})) self.send(b"250+FOO=") self.send(b"a") self.send(b"b") self.send(b"c") self.send(b".") self.send(b"250 OK") return d def test_multiline_plus_embedded_equals(...
<filename>program/dnn-desktop-demo/preprocess.py<gh_stars>10-100 import sys import os APP_CONF_FILE = 'app.conf' CAFFE_ENGINE = 'caffe' TF_ENGINE = 'tf' def ck_preprocess(i): if sys.version_info[0]>2: import configparser as cp else: import ConfigParser as cp # read existing desktop app config, if a...
# This is modified from Upenn MEAM 620 course: # https://alliance.seas.upenn.edu/~meam620/wiki/index.php import numpy as np import torch import matplotlib.pyplot as plt class qd_object: """ Struct to hold qd information """ def __init__(self): self.pos = 0 self.vel = 0 self.euler = 0 self.omega = 0 class stat...
# <Copyright 2022, Argo AI, LLC. Released under the MIT license.> """API for loading and Argoverse 2.0 maps. These include left and right lane boundaries, instead of only lane centerlines, as was the case in Argoverse 1.0 and 1.1. Separate map data (files) is provided for each log/scenario. This local map data repre...
found """ if hasattr(dll, 'libvlc_media_list_count'): prototype=ctypes.CFUNCTYPE(ctypes.c_int, MediaList) paramflags=( (1, ), ) libvlc_media_list_count = prototype( ("libvlc_media_list_count", dll), paramflags ) libvlc_media_list_count.__doc__ = """Get count on media list items The libvlc_media_list_lock should be...
# Library for the dynamics of a lumen network # The lumen are 2 dimensional and symmetric and connected with 1 dimensional tubes # # Created by <NAME>, 2018 # Modified by <NAME>--Serandour on 8/04/2019 """ network.py conf.init Defines the class network and associated functions Imports ------- Libraries : nump...
type 'int' or 'float'") else: return (-a) # mulinv() - returns the multiplicative inverse of the given input # input - an integer other than zero # output - multiplicative inverse of the given input def mulinv(a): if (isinstance(a,int) or isinstance(a,float))==False: raise TypeError("Invalid inputs for ty...
+= r / gamma return np.reciprocal(np.sqrt(virtual_distance)) def reverse_beamspread_2d_for_path(ray_geometry): """ Reverse beamspread for a path. Uses the same angles as in beamspread_2d_for_path for consistency. For a ray (i, ..., j), the reverse beamspread is obtained by considering the point j is the sourc...
STRRJcontrol = False self.ids.Beta4B_Button.background_color = (1, 1, 1, 1) self.ids.Beta4A_Button.background_color = (1, 1, 1, 1) self.ids.Beta3B_Button.background_color = (1, 1, 1, 1) self.ids.Beta3A_Button.background_color = (1, 1, 1, 1) self.ids.Beta2B_Button.background_color = (1, 1, 1, 1) self.ids.Bet...
None)[0]['def_plugs'] @client_api('getter', True) def get_def_c_plugs(self, ns_key): ''' Gets the client default plugin in a specific namespace :parameters: ns_key: EMUNamespaceKey see :class:`trex.emu.trex_emu_profile.EMUNamespaceKey` ''' ver_args = [{'name': 'ns_key', 'arg': ns_key, 't': EMUNamespaceKey},]...
"question": "Exercitation nisi reprehenderit ea anim dolor nostrud occaecat ad cupidatat esse mollit id pariatur id." } ], "created": 1487858347, "modified": 1493557147 }, { "id": "d2793f99-c3c3-11e7-8d29-d15d28ee5381", "canonicalQuestion": "Proident sint laboris pariatur dolor velit ullamco officia officia aut...
from wikidata.client import Client from re import compile from nltk.corpus import wordnet as wn import pycountry class DavarWord: """Informal abstract class for Words, like Rel and Node. """ def __init__(self, id: str): """Initializes a Word from an identifier. This should only be used on super().__init__. P...
<gh_stars>1-10 # encoding=UTF-8 # Copyright © 2007-2017 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the “Software”), to deal # in the Software without restriction, including without limitation the rights # to u...
changed""" # This expression matches our 'ix_dataset_type_changed' index, so we can scan it quickly. dataset_changed = func.greatest( dataset.c.added, # The 'updated' column doesn't exist on ODC's definition as it's optional. column("updated"), dataset.c.archived, ) return dataset_changed def _default_crs(dt:...
session, resource) return self.to_client_json(order) def _do_update_with_patch(self, session, record, resource): self._validate_patch_update(record, resource) if resource["status"].lower() == "cancelled": record = self._cancel_record(record, resource) if resource["status"].lower() == "restored": record = self....
#!/usr/bin/python3 import sys from sys import argv, exit, stderr import os import nbformat as nbf import yaml from collections import OrderedDict import numpy as np import re, ast def represent_dictionary_order(self, dict_data): return self.represent_mapping('tag:yaml.org,2002:map', dict_data.items()) def setup_yaml...
import numpy as np import pandas as pd from rdkit import Chem, DataStructs from rdkit.Chem import AllChem from rdkit.Chem.Fingerprints import FingerprintMols from DeepPurpose.pybiomed_helper import _GetPseudoAAC, CalculateAADipeptideComposition, \ calcPubChemFingerAll, CalculateConjointTriad, GetQuasiSequenceOrder impo...
# Global Variables listaErroresLexicos = [] listaErroresSintacticos = [] # Declaracion palabras reservadas reservadas = { 'true' : 'TRUE', 'false' : 'FALSE', 'smallint' : 'SMALLINT', 'integer': 'INTEGER', 'bigint' : 'BIGINT', 'decimal' : 'DECIMAL', 'numeric' : 'NUMERIC', 'real' : 'REAL', 'precision':'PRECISIO...
is row vector, q is column vector cls.lambda0_vec=numpy.matrix(cls.Lambda_q_s(s=qs,q=0)).T cls.W=numpy.matrix(numpy.diag(ws)) cls.I=numpy.matrix(numpy.eye(len(qs))) #Compute all matrix elements that are different each time ss=qs G=numpy.matrix(cls.GetGMatrixElements(freq=freq,nz=nz,rp=rp,\ s=cls.s_grid,q=cls.q...
<gh_stars>10-100 # -*- coding: utf-8 -*- import numpy as np import scipy import scipy.ndimage import skimage from skimage import feature, measure from skimage.filters import threshold_local from skimage.morphology import remove_small_objects from qtpy import QtCore, QtGui, QtWidgets from .. import global_vars as g from...
<= 1) m.c6044 = Constraint(expr= m.b533 - m.b535 + m.b544 <= 1) m.c6045 = Constraint(expr= m.b533 - m.b536 + m.b545 <= 1) m.c6046 = Constraint(expr= m.b533 - m.b537 + m.b546 <= 1) m.c6047 = Constraint(expr= m.b534 - m.b535 + m.b547 <= 1) m.c6048 = Constraint(expr= m.b534 - m.b536 + m.b548 <= 1) m.c6049 = Constrai...
import builtins import contextlib import inspect import re import subprocess import sys import types import typing import unittest from contextlib import ExitStack from enum import Enum from io import StringIO from pathlib import Path from tempfile import TemporaryDirectory import defopt from defopt import __version__...
'@font-face {',", ' " font-family: \'Roboto\';",', " ' font-style: normal;',", " ' font-weight: 700;',", ' " src: local(\'Roboto Bold\'), local(\'Roboto-Bold\'), url(/font-roboto/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2) format(\'woff2\');",', " ' unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U...
+ [1] * (len(xshape) - 1) drop_mask = keep_rate + tf.random.uniform(drop_mask_shape, dtype=x.dtype) drop_mask = tf.math.divide(tf.floor(drop_mask), keep_rate) return x * drop_mask class FeedForwardLayer(tf.keras.layers.Layer): # pylint: disable=missing-docstring def __init__(self, dim_att, dim_mlp, drop_units=0...
sections. # calculate talpha_fw and bw for attenuation if transient_asym_att_x: if np.any(matching_indices): ta = p_sol[1 + 2 * nt + ix_from_cal_match_to_glob.size:].reshape( (nt, 2, nta), order='F') ta_var = p_var[1 + 2 * nt + ix_from_cal_match_to_glob.size:].reshape( (nt, 2, nta), order='F') else: ta = p_...
"""Corresponds to IDD field `Moisture Content 19`""" self["Moisture Content 19"] = value @property def liquid_transport_coefficient_19(self): """field `Liquid Transport Coefficient 19` | Units: m2/s Args: value (float): value for IDD Field `Liquid Transport Coefficient 19` Raises: ValueError: if `value` is...
<reponame>xxdreck/google-research # coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
<reponame>richardk53/gluon-ts from typing import Sequence, Optional, Union, Tuple from dataclasses import dataclass from box import Box import numpy as np import torch from torch import nn from torch.distributions import MultivariateNormal from utils.utils import ( make_inv_tril_parametrization, make_inv_tril_paramet...
# Copyright 2017 <NAME>. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
from flask import Flask, render_template, request, session, redirect, url_for import pymysql.cursors import datetime from pyecharts import options as opts from pyecharts.charts import Pie,Bar from appdef import * #Get the airline the staff member works for def getStaffAirline(): username = session['username'] curso...
<reponame>esayui/mworks from contextlib import contextmanager import inspect import multiprocessing import os import shutil import subprocess import sys import urllib ################################################################################ # # Shared configuration # ###########################################...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################## # Institut Villebon, UE 3.1 # Projet : mon_via_navigo # Auteur : C.Lavrat, <NAME>, <NAME> # Date de creation : 27/12/15 # Date de derniere modification : 27/12/15 ############################################## #--------------...
#!/usr/bin/python import argparse import multiprocessing import queue import time import threading from maho.camera import IPCamera from maho.adsb import Dump1090 from maho.util import AzimuthAltitudeDistance from time import sleep from metar import Metar #from hanging_threads import start_monitoring import numpy ...
<reponame>GaloisInc/cryptol<gh_stars>100-1000 """A synchronous, typed interface for the Cryptol bindings""" from __future__ import annotations import sys from typing import Any, Optional, Union, List, Dict, TextIO, overload from typing_extensions import Literal from dataclasses import dataclass from .solver import O...
# ------------------------------------------------------------------------- # Public methods # ------------------------------------------------------------------------- def reset(self) -> Tuple[Dict[str, Any], Dict[str, Any]]: """Starts a new acquisition episode with a batch of images. This methods performs the f...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'UpdateCamera.ui' # # Created by: PyQt5 UI code generator 5.12.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName...
count: number of code lines (Int) Returns: - asm code (String) """ code = self.execute_redirect("x/%di 0x%x" % (count, address)) if code: return code.rstrip() else: return "" def dumpmem(self, start, end): """ Dump process memory from start to end Args: - start: start address (Int) - end: end address (...
#! /usr/bin/env python # PYTHON_ARGCOMPLETE_OK import os, sys import gzip import json import argparse from uuid import UUID import time, calendar from datetime import datetime import socket, struct import pdb import re import logging VERSION = '1.0' def is_number(s): try: float(s) return True except ValueError: ...
# 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) AutoRest Code Generator 2.3.33.0 # ...
# SIPEC # MARKUS MARKS # MODEL ARCHITECTURES import tensorflow as tf from tensorflow.keras import regularizers, Model from tensorflow.keras.applications import ( DenseNet121, DenseNet201, ResNet50, ResNet101, InceptionResNetV2, Xception, NASNetLarge, InceptionV3, EfficientNetB2, EfficientNetB3, EfficientNetB...
muts per sample (combine a single mut afftecting several motifs in the same sample; groupBy mut_pos and sample_id) #min_indiv_score_to_consider = mean_and_sd_from_the_simulations_indiv_sites_dict['mean']#+(1.96*mean_and_sd_from_the_simulations_indiv_sites_dict['std']) #if min_indiv_score_to_consider ==0: min_indiv_...
KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP (0xE8, 0), # Unassigned # (0xE9-F5, 0), # OEM specific (0xF6, 0), # Attn key (0xF7, 0), # CrSel key (0xF8, 0), # ExSel key (0xF9, 222), # Erase EOF key (0xFA, 207), # Play key (0xFB, 0x174), # Zoom key (0xFC, 0), # Reserved (0xFD, 0x19b), # PA1 key (0xFE, 0x163...
sv_g) dH = H1 - H_ref_LS H_gas = 1e-3*dH*MW_g #property_mass_to_molar(dH, MW_g) return H_gas def S_model_g(T, P, zs): MW_g, sv_g = 0.0, 0.0 for i in cmps: MW_g += MWs[i]*zs[i] sv_g += n_atoms[i]*zs[i] sv_g /= MW_g S_ref_LS = Lastovka_Shaw_integral_over_T(T_ref, sv_g) S1 = Lastovka_Shaw_integral_over_T(T, s...
# Copyright (c) 2021 PPViT Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
be str" assert self._body is not None, "body must not be None" @property def ledger_id(self) -> str: """Get the id of the ledger on which the terms are to be settled.""" return self._ledger_id @property def body(self): """Get the body.""" return self._body @staticmethod def encode(state_protobuf_object, s...
auction: address :param amount: uint128 :param nonce: uint128 """ return self.C_.call_getter_raw('revealBid', {'auction': auction, 'amount': amount, 'nonce': nonce}, expect_ec=ts4_expect_ec) def M_revealBid(self, auction, amount, nonce, ts4_private_key=None, ts4_expect_ec=0, ts4_is_debot=False): """ Wrapper for...
<filename>scipy/linalg/_matfuncs_inv_ssq.py """ Matrix functions that use Pade approximation with inverse scaling and squaring. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.linalg._matfuncs_sqrtm import SqrtmError, _sqrtm_triu from scipy.linalg.d...
'and': credit = credit[:-3].strip() # Remove surrounding parentheses parentheses_match = re.search(r'^\(.*\)$', credit) if parentheses_match: credit = credit.strip('()') # Final catch for empty credit if len(credit.strip()) == 0: credit = None yield CreditScrape( name_id=name_id, title_id=title_id, job_tit...
<reponame>ChenHuaYou/cONNXr import re import itertools def format_text(prefix, start, texts): output = [] curr = [] if start: curr.append(start) linebreaks = 0 for text in texts: lines = [] length = len(prefix) if start: length += + len(start) # split text into words by splitting on space and remove empty s...
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This file is part of the Smart Developer Hub Project: http://www.smartdeveloperhub.org Center for Open Middleware http://www.centeropenmiddleware.com/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Copyr...
''' Module for log displays and visualizations Functions four_plot(logs, top, base, depth=False) four_plots(logs, x1, x2, x3, x4, top, base, depth=False) three_plots(logs, x1, x2, x3, top, base, depth=False) two_plots(logs, x1, x2, top, base, depth=False) two_plot(logs, x1, x2, top, base, depth=False, scale=False...