input
stringlengths
2.65k
237k
output
stringclasses
1 value
# -*- fundamental -*- # # Tests for parsing inflection tables # # Copyright (c) 2021 <NAME>. See file LICENSE and https://ylonen.org import unittest import json from wikitextprocessor import Wtp from wiktextract import WiktionaryConfig from wiktextract.inflection import parse_inflection_section class InflTests(unitte...
medulla.", {"entities": [(101, 113, LABEL), (180, 213, LABEL), (227, 234, LABEL), (53, 71, FUNC)]}), ###TESTED TO HERE ("Some NTS neurones are glucose sensitive, while others express POMC, leptin receptors or the MC4R.", {"entities": [(5, 8, LABEL), (22, 29, PHYS), (62, 66, NT), (68, 84, PHYS), (92, 96, PHYS)]}), ...
# Copyright 2012 Google Inc. 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 agree...
"Discarding 3' end of reads" logger.info(msg) map_df.loc[m_positive, 'end'] = map_df.loc[m_positive, 'start'] + 1 map_df.loc[m_negative, 'start'] = map_df.loc[m_negative, 'end'] - 1 # now sort everything msg = "Sorting reads by coordinates" logger.info(msg) map_df = map_df.sort_values(['seqname', 'start']) ...
o00oOOO0Ooo , True ) if 88 - 88: OoO0O00 . I1Ii111 / I11i IiiI1iii1iIiiI += o00oOOO0Ooo + " since " + IiiIiiIIII if 47 - 47: OoO0O00 + I1ii11iIi11i . ooOoO0o if ( lisp . lisp_rloc_probing ) : IiiIiIIi1 = II1iiiiI1 . print_rloc_probe_rtt ( ) if ( IiiIiIIi1 != "none" ) : IiiI1iii1iIiiI += "<br>rtt: {}, hops: {}" . ...
# mysql/reflection.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re from .enumerated import _EnumeratedValues from .enumerated import SET...
<gh_stars>0 # Copyright 2019 The TensorNetwork 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 # # Unless required by applicable law or ...
""" import socket import time result = open_url(url, 0, timeout) if result.status == InstallationResult.SUCCESS: rf = result.result else: return result metadata = rf.info() rf_size = int(metadata.getheaders("Content-Length")[0]) dl_size = 0 block = 16384 x = 0 y = 0 pb = ProgressBar(x, y, rf_size, ...
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re...
import json import os import matplotlib.pyplot as plt import numpy as np import pandas as pd from ImagingReso import _utilities import plotly.tools as tls class Resonance(object): e_min = 1e-5 e_max = 1e8 stack = {} # compound, thickness, atomic_ratio of each layer with isotopes information stack_sigma = {} # ...
<reponame>Rogdham/pyTenable<gh_stars>0 ''' Exports ======= The following methods allow for interaction into the Tenable.io :devportal:`exports <exports>` API endpoints. Methods available on ``tio.exports``: .. rst-class:: hide-signature .. autoclass:: ExportsAPI :members: ''' from uuid import UUID from json.decoder...
<reponame>thespacedoctor/rockAtlas<filename>rockAtlas/positions/pyephemPositions.py #!/usr/local/bin/python # encoding: utf-8 """ *Estimate the positions of moving objects in the neighbourhood of the ATLAS exposures using pyephemPositions and add results to the database* :Author: <NAME> :Date Created: October 30, 2...
return d.errback(result.ue) if result.te != None: return d.errback(result.te) return d.errback(TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result")) def get_slice(self, key, column_parent, predicate, consistency_level): """ Get the group of columns contained by column_parent ...
<reponame>jorobledo/StratoPy import datetime import os import attr from netCDF4 import Dataset import numpy as np from pyorbital import astronomy from pyspectral.near_infrared_reflectance import Calculator from scipy import interpolate from . import core PATH = os.path.abspath(os.path.dirname(__file__)) def r...
and module.params['encryption_mode'] == 'aws:kms': params['config'] = botocore.client.Config(signature_version='s3v4') elif module.params['mode'] in ('get', 'getstr') and sig_4: params['config'] = botocore.client.Config(signature_version='s3v4') if module.params['dualstack']: dualconf = botocore.client.Config(s3={...
<filename>laplace/baselaplace.py from abc import ABC, abstractmethod, abstractproperty from math import sqrt, pi import numpy as np import torch from torch.nn.utils import parameters_to_vector, vector_to_parameters from torch.distributions import MultivariateNormal, Dirichlet, Normal from laplace.utils import paramete...
<filename>python/hist-interpreter.py import argparse import os import timeit import numpy as np import matplotlib.pyplot as plt start = timeit.default_timer() parser = argparse.ArgumentParser() parser.add_argument('-b', '--begin', help="Start value", required=True) parser.add_argument('-e', '--end', help="End value"...
only authed requests get through (default: True) optionally pass in Auth subclass error: message to use in case of unhandled exception methods: HTTP methods to allow through (default: all) only: only wrap the method to provide .abort()/unhandled-exception support throttle: rate-limit clients (default: True) opti...
max_allele=None, dtype='u1'): """Transform genotype calls into allele counts per call. Parameters ---------- max_allele : int, optional Highest allele index. Provide this value to speed up computation. dtype : dtype, optional Output dtype. Returns ------- out : ndarray, uint8, shape (n_variants, n_samples, ...
<filename>BGWpy/BGW/kgrid.py import os import subprocess import numpy as np from ..core import fortran_str from ..core import Task __all__ = ['get_kpt_grid', 'get_kgrid_input', 'get_kpoints', 'get_kqshift', 'get_kpt_grid_nosym', 'KgridTask'] class KgridTask(Task): def __init__(self, structure, ngkpt = 3*[1], ...
<filename>ad_fcemu/nes_cpu.py # -*- coding: utf-8 -*- import copy import typing as tp import config import log_differ as ld import nes_file as nf import nes_game_pad as ngp import nes_ppu as np import utils class Memory(object): def __init__(self, ppu: np.NesPPU, pad: ngp.GamePad): self.ram: tp.List[int] = [0] * 0...
x[0:6] y = y[0:6] ax.plot(x, y, ':', marker='^', markersize=4, markeredgecolor='k', markeredgewidth=0.5, color=colours[idx], label=r'$\gamma=%d$: $\langle\tau\rangle_{z=N}$' % gammaval, zorder=4) elif datakey == 'linalgALLZevalExpl' and datakey in TR_curves_to_plot: if key == 'TR100g': x = x[0:8] y = y[0:8] if ...
<gh_stars>0 # Copyright 2019 The Feast 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
#!/usr/bin/env python """GRR specific AFF4 objects.""" import re import time import logging from grr.lib import access_control from grr.lib import aff4 from grr.lib import flow from grr.lib import queue_manager from grr.lib import rdfvalue from grr.lib import registry from grr.lib import utils from grr.lib.aff4_obj...
self.ranges = [[-5, 5], [-5, 5]] super(Himmelblau, self).__init__() def _evaluate(self, x): return (np.power(np.power(x[:, 0], 2) + x[:, 1] - 11, 2) + np.power(x[:, 0] + np.power(x[:, 1], 2) - 7, 2)).reshape( -1, 1) def _derivative(self, x): raise NoDerivativeError() class ThreeHumpCamel(TestFunction): """ ...
<reponame>yimingchen95/veidt<gh_stars>10-100 # coding: utf-8 # Copyright (c) Materials Virtual Lab # Distributed under the terms of the BSD License. import sklearn.metrics.pairwise as smp from monty.json import MSONable from scipy.stats import pearsonr import scipy.spatial.distance as spd import numpy as np __author_...
self.MARKERS or chunk.isspace(): self._fail_route() # Tags must start with text, not spaces data.context = data.CX_NOTE_SPACE elif chunk.isspace(): self._handle_tag_space(data, chunk) continue elif data.context & data.CX_NOTE_SPACE: if data.context & data.CX_QUOTED: data.context = data.CX_ATTR_VALUE self._memo...
<reponame>otherJL0/tmuxp """Configuration parsing and export for tmuxp. tmuxp.config ~~~~~~~~~~~~ """ import logging import os from typing import Dict from . import exc logger = logging.getLogger(__name__) def validate_schema(session_config): """ Return True if config schema is correct. Parameters ----------...
# This was based on some code from https://github.com/mirumee/saleor # but adapted to use relay, automatic field detection and some code adjustments import collections import collections.abc import itertools from django.core.exceptions import ( NON_FIELD_ERRORS, ImproperlyConfigured, ValidationError, ) from django...
import demistomock as demisto from CommonServerPython import * import json import requests import socket from typing import Dict, Any, List from netaddr import IPNetwork, IPAddress # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' Templates for change requests Change these templates if you...
<class 'list'> len(all_hiddens= 13 all_hiddens[0].shape= torch.Size([16, 63, 768]) all_hiddens[1].shape= torch.Size([16, 63, 768]) all_hiddens[-1].shape= torch.Size([16, 63, 768]) batch_size= 16 len(all_hiddens)= 12 self.opt['num_last_layer_xlmr']= 1 used_layers= [11] retrieve_reps.shape= torch.Size([51, 768])...
quote = F, row.names = F)''' % outfile) ######################################### ######################################### ######################################### @jobs_limit(1, "R") @follows(mkdir("enrichment.dir")) @merge([buildGenusDiffList, buildPyruvateOxidaseAnnotations], r"enrichment.dir/intersection_pyruv...
label_lens = batch['seq_lens'], batch['target_lens'] seq_lens = seq_lens.to(self.device, non_blocking=True) label_lens = label_lens.to(self.device, non_blocking=True) target = (target, label_lens) o = self.model.nn(input, seq_lens) else: o = self.model.nn(input) self.optimizer.zero_grad() loss = self.loss_fn(se...
\b { "traintuples": list[{ "algo_key": str, "data_manager_key": str, "train_data_sample_keys": list[str], "traintuple_id": str, "in_models_ids": list[str], "tag": str, "metadata": dict }], "composite_traintuples": list[{ "composite_traintuple_id": str, "algo_key": str, "data_manager_key": str, "train_dat...
[int(v**meshRefParam) for v in [nCellsOuter, nCellsNose, nCellsSpan]], [expOuter, expOuter, expOuter, expOuter, "((0.5 0.5 {}) (0.5 0.5 {}))".format(expNoseOffset, 1/expNoseOffset), "((0.5 0.5 {}) (0.5 0.5 {}))".format(expNoseOuter, 1/expNoseOuter), "((0.5 0.5 {}) (0.5 0.5 {}))".format(expNoseOuter, 1/expNoseOuter)...
background_color=neutral, foreground_color=styles.textcolor) config.trackLabelArray.append(label) self.trackDisplayGrid.add_widget(config.trackLabelArray[-1]) label = CheckBox(size_hint_y=None, size_hint_x=.10, color=[1, 1, 1, 4], height=config.baseheight) label.background_checkbox_normal="." + os.sep + "resource...
<gh_stars>0 import base64 import json import os import pickle import tempfile import time from io import BytesIO from tempfile import NamedTemporaryFile import cv2 import imageio import numpy as np import streamlit as st import torch from numpy.lib.type_check import imag from PIL import Image # from streamlit_webrtc i...
"thePed": """: The ped to check. """, "headState": """: head state, use true if you want the ped be headless, use false to give back the head. """ }, result='returns true if successful, false otherwise' , ), url='setPedHeadless', ), field=FunctionOOPField( name='headless', types=[ FunctionType( names=['bool'...
np.rot90(self.im) self.update_image() def on_rotate(self): self.cursor = Cursor(self.ax, useblit=True, color='red', linewidth=1) position = self.canvas.get_points() x = (position[0][0], position[1][0]) y = (position[0][1], position[1][1]) self.im = rotate_image(self.im, x, y) self.update_image() def update_i...
<gh_stars>0 # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
%s!=%s", binascii.hexlify(R9.PROTOCOL_VERSION_BYTES), binascii.hexlify(protocolconf)) return False b64payload = retdata[39:-8] hashconf = self._get_md5_hash(b64payload) hashorig = retdata[20:39] if hashconf != hashorig: _LOGGER.warning("CheckResp md5 %s!=%s", binascii.hexlify(hashorig), binascii.hexlify...
# Copyright 2018 University of Groningen # # 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 w...
to encode information on where points are located. Recall that an ordered pair is of the form $(x,y)$. The first entry on the pair denotes how far from the origin along the x-axis the point is, the second entry denotes how far from the origin along the y-axis the point is. Let's see a simple example for the ordered...
# -*- coding: utf-8 -*- """ Created on Sat Jun 06 09:49:33 2015 @author: JMS """ import random from abc import ABCMeta, abstractmethod import numpy as np import pandas as pd from scipy.linalg import orth from occupancy_map import Map,ZMap from ptp import LocalArea,PointToPoint,matrixrank, anglebetween from math impo...
<gh_stars>0 #!/usr/bin/python # -*- coding: utf-8 -*- """ Implemented multiparameter equation of state as a Helmholtz free energy * IAPWS-95 implementation * Heavy water formulation 2017 """ from __future__ import division from itertools import product import warnings from scipy import exp, log, ndarray from scip...
model=model, obs_shape_n=obs_shape_n, act_space_n=env.action_space, agent_index=i, args=arglist, local_q_func=(arglist.good_policy=='ddpg'))) # create scenario heuristic group trainer if applicable if arglist.training_algorithm == 'ScenarioHeuristicGroupTrainer': group_trainer = ScenarioHeuristicGroupTra...
just 1 word.") @click.option('--stemmed_search', '-stemm', default=False,type=bool, help="Search in lemantisated/stemmed syntagmas. Be careful and don't give different conjugations of one lemma, if current options is True. Because you could get duplicates.") @click.option('--context_len_left', '-conleft', default=True,...
<filename>src/pte_decode/decoding/decoder_factory.py<gh_stars>0 """Module for machine learning models.""" from dataclasses import dataclass from typing import Any, Optional, Union import numpy as np import pandas as pd from bayes_opt import BayesianOptimization from catboost import CatBoostClassifier from sklearn.dis...
<gh_stars>0 from functools import partial import numpy as np from keras.models import * from keras.layers import * from keras.optimizers import * from keras import regularizers from utils import * from metrics import * from deform_conv.layers import ConvOffset2D def Conv(input, num_filters, use_deform=False, activa...
<reponame>sirex/htsql # # Copyright (c) 2006-2013, Prometheus Research, LLC # """ :mod:`htsql.core.tr.bind` ========================= This module implements the binding process. """ from ..util import maybe, listof, tupleof, similar from ..adapter import Adapter, Protocol, adapt, adapt_many from ..domain import (D...
in block.body: # Ignore things that look like docstrings if (isinstance(stmt, ExpressionStmt) and isinstance(stmt.expr, StrExpr)): continue # Constructor is named after class if isinstance(stmt, FuncDef): if stmt.name() == '__init__': self.decl_write_ind('%s(', o.name) self._WriteFuncParams(stmt.type.arg_typ...
def create_user(self, body, **kwargs): # noqa: E501 """Create a new user. # noqa: E501 An endpoint for creating or inviting a new user to the account. In case of invitation email address is used only, other attributes are set in the 2nd step. **Example usage:** `curl -X POST https://api.us-east-1.mbedcloud.com/v3/us...
import os import tempfile import pandas as pd import csv from nidm.experiment.Query import GetProjectsUUID import click from nidm.experiment.tools.click_base import cli from nidm.experiment.tools.rest import RestParser import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import silhouette_score from ...
<reponame>will-jj/arim import warnings import numpy as np import pytest import arim from arim import ut, scat, _scat_crack import tests.helpers def test_scattering_angles_grid(): n = 10 theta = scat.make_angles(n) inc_theta, out_theta = scat.make_angles_grid(n) for i in range(n): for j in range(n): assert inc...
from data import COCODetection, get_label_map, MEANS, COLORS from yolact import Yolact from utils.augmentations import BaseTransform, FastBaseTransform, Resize from utils.functions import MovingAverage, ProgressBar from layers.box_utils import jaccard, center_size, mask_iou from utils import timer from utils.functions ...
0, 0, 0, 0], [958, 66.7, 0, 9999, -9999, 1.0, 100, 1, 66.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [959, 45.5, 0, 9999, -9999, 1.0, 100, 1, 45.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [960, 26.5, 0, 9999, -9999, 1.0, 100, 1, 26.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [963, 467....
is None: reward_macro = self.reward else: reward_macro += self.reward return self.obs, reward_macro, self.reward_bounty_raw_to_return, self.done, self.info def one_step(self): '''as a environment, it has step method. But the step method step forward for args.hierarchy_interval times, as a macro action, this m...
<gh_stars>10-100 # -*- coding: UTF-8 -*- """A class for converting ASCII inputs to JSON.""" import csv import os import re from collections import Counter, OrderedDict from decimal import Decimal from itertools import chain, product import inflect import numpy as np from astrocats.catalog.catalog import Catalog from a...
# -*- coding: utf-8 -*- # Copyright 2015 <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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" file ...
<filename>miri/datamodels/miri_spectral_spatial_resolution_model.py #!/usr/bin/env python # -*- coding:utf-8 -*- """ An extension to the standard STScI data model, which defines the MIRI spectral and spatial resolution models. :Reference: The STScI jwst_lib documentation. See https://jwst-pipeline.readthedocs.io/en...
shuffle self.to_fit = to_fit self.stack_feats = stack_feats self.indices = None self.on_epoch_end() def __len__(self): return int(np.floor(len(self.data[0]) / self.batch_size)) def on_epoch_end(self): self.indices = np.arange(len(self.data[0])) if self.shuffle: np.random.shuffle(self.indices) def __getite...
1: if ftype == TType.STRUCT: self.er = ExperimentRunEvent() self.er.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (...
<reponame>znes/angus-scenarios import os import pandas as pd from cydets.algorithm import detect_cycles ## import numpy as np # import plotly.io as pio import plotly.offline as offline import matplotlib.pyplot as plt from matplotlib import colors import seaborn as sns from documentation.plotly_plots import ( fillin...
<filename>evaluate_models.py import argparse import tensorflow as tf import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import roc_curve from pathlib import Path from joblib import load from baselines.dagmm.dagmm import DAGMM from baselines.devnet.devnet_kdd19 import predict_...
<gh_stars>0 """ MIT License Copyright (c) 2020 <NAME> - dominik.kopczynski {at} isas.de <NAME> - nils.hoffmann {at} isas.de 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, i...
b"A"), (b"16", 16, 132255, 0x0002049f, 0x08b80000, 0x8001024f88b80000, b"8001024f88b80000", b"C", b"T"), (b"16", 16, 132256, 0x000204a0, 0x08c00000, 0x8001025008c00000, b"8001025008c00000", b"G", b"A"), (b"16", 16, 132328, 0x000204e8, 0x08b80000, 0x8001027408b80000, b"8001027408b80000", b"C", b"T"), (b"16", 16, 132...
0.1840, 0.4687, 0.0446, 0.5272, 0.2382, -0.1124], [-0.1656, -0.0105, 0.1899, 0.0590, 0.2222, 0.0170, -0.2002], [-0.1969, -0.1753, -0.0796, -0.1840, -0.0689, -0.1621, -0.2494]], [[-0.1602, -0.1039, -0.0176, -0.0856, 0.0039, -0.0726, -0.1536], [-0.0923, 0.0348, 0.2366, 0.1703, 0.2698, 0.0873, -0.0800], [-0.0294, 0....
sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.clas_svm_C_horizontalSlider_16.sizePolicy().hasHeightForWidth()) self.clas_svm_C_horizontalSlider_16.setSizePolicy(sizePolicy) self.clas_svm_C_horizontalSlider_16.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.clas_svm_C_horizontalSlider_16.s...
<reponame>shivharis/pybind<filename>pybind/slxos/v16r_1_00b/igmp_snooping_state/igmp_l3_interfaces/igmp_l3_interfaces_/__init__.py from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from ...
except exception.EntityNotFound: LOG.debug("instance is not exist, no need to delete!", instance=instance) return if provider_server: try: self.os_novaclient(context).delete(provider_server) self.os_novaclient(context).check_delete_server_complete( provider_server) except exception.ResourceInError: import ti...
' / ' + \ # var_prefix + 'DATA' + str(idx) + '_FC_SIMD_FACTOR;\n') code.append(indent(1) + 'data1_buf_size = LAYER_IN_NUM_T * LAYER_ROW_IL_FACTOR * LAYER_FILTER_S * LAYER_FILTER_S / %sDATA%d_FC_SIMD_FACTOR;\n' % (var_prefix, idx)) code.append(indent(1) + 'local_transfer_size = data' + str(idx) + '_buf_size * (' + st...
#!/usr/bin/env python # coding=utf-8 # Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python #-*-coding:utf8-*- #this script is aimed to aggregate SNPs into haplotype blocks to get BAF matrices within each cell. #Author: <NAME> # TODO: output region file to out_dir import os import sys import getopt import gzip from ..utils.base import assert_e, assert_n, log from ..utils.region import...
# Copyright (c) 2020 PaddlePaddle 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 applicabl...
Affairs, including -relations and communications with overseas governments and United Nations agencies;treaties, including trade agreements; bilateral, regional and multilateral trade policy; international trade and commodity negotiations; market development, including market access; trade and international business de...
<filename>meerk40t/balor/sender.py # Balor Galvo Laser Control Module # Copyright (C) 2021-2022 Gnostic Instruments, Inc. # # 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 3 of th...
<reponame>albertvisser/filefindr """Gui-toolkit onafhankelijke code t.b.v. Afrift applicaties opgezet als classes die de toolkit-dependent code aanroepen als methodes op een attribuut ervan ze worden geïmporteerd via een aparte module die bepaalt welke toolkit er gebruikt wordt """ import os import collections import...
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]), ) ### IDL colormap 20 :: ...
import gc import os import platform import tempfile import time import sys import functools import pytest from testing.testifycompat import ( assert_equal, assert_raises, mock, ) from staticconf import ( config, errors, proxy, schema, testing, validation, ) import staticconf class TestRemoveByKeys(object):...
###################################################################################################################### # Copyright 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 # # w...
import argparse import random import numpy as np import torch import spacy import scispacy import json import os import logging import pandas as pd import sys from tqdm import tqdm from datasets import Dataset from functools import partial from dataclasses import dataclass, field from custom_trainer import CustomTrain...
font-size: 32px !important; line-height: 32px !important; } } /* ANDROID CENTER FIX */ div[style*="margin: 16px 0;"] { margin: 0 !important; } </style> </head> <body style="background-color: #f4f4f4; margin: 0 !important; padding: 0 !important;"> <!-- HIDDEN PREHEADER TEXT --> <div style="display: none; font-siz...
"""JASMIN Cloud JASMIN Cloud Provider Interface package - module for handling networking functionality """ __author__ = "<NAME>" __date__ = "24/03/14" __copyright__ = "(C) 2014 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __revision__ = "$Id$" from os import...
'json') path_params = {} if 'conversation_id' in params: path_params['conversationId'] = params['conversation_id'] if 'message_id' in params: path_params['messageId'] = params['message_id'] query_params = {} header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accep...
the key associated with an application. See :meth:`change_key` for details.""" #: the maximum age of a key, which is the number of times the key #: can be changed before the original key is considered too old to #: be used for decryption. MAX_AGE = 100 def __init__(self, key_num, key, key_set, when=None): self...
object follow the student progression """ ability = models.CharField( max_length=255, verbose_name=_("Ability"), help_text=_("A label that indicates the abilities validated by the learner."), blank=False, null=False ) language = models.CharField( max_length=20, choices=get_translated_languages(), verbose_na...
+ str(e) # prop = p_qdata_from_Q(round_count, q_num, author, Q, filename) # size, block_num, _, _, _, num_lines = Q # # 既存のエンティティを取り出す # query = query_q_data(round_count=round_count, q_num=q_num, author=author) # num = 0 # for ent in query.fetch(): # 存在するなら、高々、1個 # ent.update(prop) # client.put(ent) # num += 1 # if n...
[ \ [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]], \ [[0, 0], [0, 1], [0, 2], [1, 2], [1, 3]], \ [[0, 0], [0, 1], [1, 1], [1, 2], [1, 3], [2, 3]], \ [[0, 0], [0, 1], [1, 1], [1, 2], [2, 2], [2, 3]], \ [[0, 0], [1, 1], [2, 2]], \ [[0, 0], [1, 0], [1, 1], [2, 1], [2, 2], [3, 2]], \ [[0, 0], [1, 0], [1, 1], [2, 1], [3, ...
<gh_stars>0 __author__ = '<NAME>' """ Intended for processing of 80s monosome-seq data from defined RNA pools Based on <NAME>'s original RBNS pipeline, available on github """ import matplotlib.pyplot as plt plt.rcParams['pdf.fonttype'] = 42 #leaves most text as actual text in PDFs, not outlines import os import argpar...
0), (1, ints[1], None), (2, None, 2), (3, None, None), ] self.cursor.executemany("insert into t1(a, b, c) values (?,?,?)", params) self.cursor.execute("select a, b, c from t1 order by a") rows = self.cursor.fetchdictarray() # row 0 self.assertEqual(rows['b'][0], ints[0]) self.assertEqual(rows['c'][0], 0) ...
<filename>tests/test_stability.py import pytest import attr import numpy as np from thermo import Chemical from pytest_lazyfixture import lazy_fixture from gibbs.models.ceos import PengRobinson78, SoaveRedlichKwong from gibbs.minimization import PygmoSelfAdaptiveDESettings from gibbs.mixture import Mixture from gibbs....
keys are factor column names ( i.e. "paper"/"section"/"paragraph") and whose values are counts of unique factor instances (e.g. total number of papers/sections/ paragraphs in the dataset) """ result_data, counts = prepare_occurrence_data(data) result_data = result_data.reset_index() result_data["paper_frequency...
try: # Has to be a number, has to be negative assert -float(arg) > 0 except (ValueError, AssertionError): newargs.append(arg) continue newargs.append(" " + arg) return newargs def interpret_bintime(bintime): """If bin time is negative, interpret as power of two. Examples -------- >>> interpret_bintime(2...
Zebra 🦌 Deer 🐮 Cow Face 🐂 Ox 🐃 Water Buffalo 🐄 Cow 🐷 Pig Face 🐖 Pig 🐗 Boar 🐽 Pig Nose 🐏 Ram 🐑 Ewe 🐐 Goat 🐪 Camel 🐫 Two-Hump Camel 🦙 Llama 🦒 Giraffe 🐘 Elephant 🦏 Rhinoceros 🦛 Hippopotamus 🐭 Mouse Face 🐁 Mouse 🐀 Rat 🐹 Hamster Face 🐰 Rabbit Face 🐇 Rabbit 🐿️ Chipmunk 🦔 Hedgehog 🦇 Bat 🐻 Bear Fac...
<filename>final_code/packages/cct.py """ CCT 建模优化代码 CCT 作者:赵润晓 日期:2021年5月1日 """ import multiprocessing # since v0.1.1 多线程计算 import time # since v0.1.1 统计计算时长 from typing import Callable, Dict, Generic, Iterable, List, NoReturn, Optional, Tuple, TypeVar, Union import matplotlib.pyplot as plt import math import random ...
7 required positional arguments: 'd', 'e', 'f', 'g', 'h', 'i', and 'j'", lambda:f(1, 2, 3)) self.assertRaisesMessage(TypeError, "f() got an unexpected keyword argument 'dummy'", lambda:f(dummy=2)) self.assertRaisesMessage(TypeError, "f() got an unexpected keyword argument 'dummy'", lambda:f(1, dummy=2)) def f(a, b=...
<reponame>pllim/halotools """ This module contains the `NFWProfile` class, which is used to model the spatial distribution of mass and/or galaxies inside dark matter halos according to the fitting function introduced in Navarry, Frenk and White (1995), `arXiv:9508025 <http://arxiv.org/abs/astro-ph/9508025/>`_. a sub-cl...
# Copyright (c) Microsoft Corporation. All rights reserved. import numpy as np import pandas as pd import copy """ This file contains miscellaneous helper classes and functions for the data-assertion routines """ # --------------------------------------------------------------- # Class _AssertionType # ...
For each node, return the nsi clustering coefficient with respect to the out motif. If a link attribute key is specified, return the associated link weighted version Reference: [Zemp2014]_ **Examples:** >>> net = Network.SmallDirectedTestNetwork() >>> r(net.nsi_local_outmotif_clustering()) Calculating local...
local and arg.get_local_parent(node.children[0], pos-.5) == node and node.children[1] in local and arg.get_local_parent(node.children[1], pos-.5) == node and node.children[0] != node.children[1]) def walk_up(arg, leaves, time, pos, ignore=None): order = dict((node, i) for i, node in enumerate( arg.postorder_ma...