input
stringlengths
2.65k
237k
output
stringclasses
1 value
"辔":"轡", "辕":"轅", "辖":"轄", "辗":"輾", "辘":"轆", "辙":"轍", "辚":"轔", "辞":"辭", "辩":"辯", "辫":"辮", "边":"邊", "辺":"邊", "辽":"遼", "达":"達", "迁":"遷", "过":"過", "迈":"邁", "运":"運", "这":"這", "进":"進", "远":"遠", "违":"違", "连":"連", "迟":"遲", "迩":"邇", "迳":"逕", "选":"選", "逊":"遜", "递":"遞", "逦":"邐", "逻":"邏", "遗":"遺", "邓":"鄧", "邝":"鄺", "邬":"鄔",...
# -*- coding: utf-8 -*- """ Created on Thu Mar 22 13:11:38 2012 @author: proto """ from pyparsing import Word, Suppress,Optional,alphanums,Group,ZeroOrMore import numpy as np import json import itertools import utils.structures as st from copy import deepcopy,copy import detectOntology import re import difflib from u...
# # adventure module # # vim: et sw=2 ts=2 sts=2 # for Python3, use: # import urllib.request as urllib2 import urllib2 import random import string import textwrap import time # "directions" are all the ways you can describe going some way; # they are code-visible names for directions for adventure authors directio...
<gh_stars>0 import math from datetime import datetime import torch from torch.nn.functional import mse_loss, binary_cross_entropy_with_logits from torch import optim from .loss import mask_nll_loss, bpr_loss, lambda_rank_loss, rank_hinge_loss from .data import ReviewGroupDataLoader, basic_builder, ReviewBuilder from ....
range(19): #Writes first part ROM.write(GetEquippedtext[x]) Pointer+=1 z = len(SparkShotReceived) SparkShotReceived.remove(b'\x20') z -= 1 for x in range(z):#Writes second part if x == 5: ROM.write(b'\x0A') Pointer+=1 ROM.write(SparkShotReceived[x]) Pointer+=1 ROM.write(b'\x0B') Pointe...
import argparse import logging import os import sys import numpy as np import torch import torchvision from tqdm import tqdm from data.modelnet_loader_torch import ModelNetCls from models import pcrnet from src import ChamferDistance, FPSSampler, RandomSampler, SampleNet from src import sputils from src.pctransforms ...
0x3e, 0xaf, 0x87, 0xf7, 0x34, 0x2e, 0xef, 0x8a, 0xea, 0x68, 0xfe, 0xf2, 0xf2, 0x8e, 0x32, 0x2b, 0x99, 0xcf, 0xed, 0xfd, 0x82, 0x8e, 0xcf, 0xec, 0xfc, 0xde, 0xda, 0xcf, 0xed, 0xbc, 0x7a, 0xff, 0xec, 0xbc, 0xaf, 0x41, 0xfd, 0xcc, 0x5c, 0x88, 0x9b, 0x94, 0x80, 0x01, 0x00, 0x18, 0x84, 0x18, 0x48, 0x00, 0x60, 0x81, 0...
nhwidth_est def getEstStaffLineLocs(featmap, nhlocs, stavelens, colWidth, deltaRowMax, globalOffset = 0): preds = [] if np.isscalar(globalOffset): globalOffset = [globalOffset] * len(nhlocs) for i, nhloc in enumerate(nhlocs): r = int(np.round(nhloc[0])) c = int(np.round(nhloc[1])) rupper = min(r + deltaRowMax +...
'618660707':{'en': 'Koorda'}, '618660708':{'en': 'Lancelin'}, '618660709':{'en': 'Meckering'}, '618660710':{'en': 'Miling'}, '618660711':{'en': 'Moora'}, '618660712':{'en': 'Northam'}, '618660713':{'en': 'Pantapin'}, '618660714':{'en': '<NAME>'}, '618660715':{'en': 'Quairading'}, '618660716':{'en': 'Regans For...
limit") break return clips, clipr # TODO: # Only reduce longitudinal sail/rudder authority when heeled. # For control strategy: # Maximize forwards force while providing at least X turning torque, # provide range of turning torques to planner, generate approximatino # of max forwards force as functino of turning to...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c), 2018-2019, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensou...
import warnings import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.stats import norm import statsmodels.api as sm import statsmodels.formula.api as smf from statsmodels.genmod.families import links from tabulate import tabulate from zepid.calc.utils import (risk_ci, incidence_rate_ci, ri...
formats in future. ext2data = { 'json': (open, '', json), 'pkl': (open, 'b', pickle), 'zip': (BZ2File, '', pickle), } opener, mode_suffix, saver = ext2data[ext] return opener, mode + mode_suffix, saver def save(obj, path, mode_pre='w', verbose=True): """Wrapper to save data as text, pickle (optionally zipped)...
persons or things", "80060": "liability, governmental: tort or contract actions by or against government or governmental officials other than defense of criminal actions brought under a civil rights action.", "80070": "liability, other than as in sufficiency of evidence, election of remedies, punitive damages", "800...
<reponame>bitclude/bitclude-python<gh_stars>0 # -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt....
"""content module. This module describes the incoming content. """ from functools import wraps from .url import get_url def _replace_args(*args): """Class decorator. Changes built-in names in kwargs. :param args: arg names (id, from, type). """ def wrapper(cls): origin_init = cls.__init__ @wraps(cls.__i...
<gh_stars>0 # coding=utf-8 # Copyright 2022 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 # # Unless required by ...
import base64 import logging import os import re import subprocess import tempfile from datetime import datetime, time, date from decimal import Decimal from os.path import basename, join from pathlib import Path from typing import List, Optional import pytz from django.conf import settings from django.core.exceptions ...
<reponame>subClassy/ners import copy import numpy as np import pytorch3d import torch import torch.nn as nn import trimesh from pytorch3d.loss import mesh_laplacian_smoothing from pytorch3d.structures import Meshes from tqdm.auto import tqdm import ners.utils.geometry as geom_util from ners.utils import sample_consis...
= dimension_type @lazyproperty def valid_elements(self) -> "_ValidElements": """_ValidElements object containing only non-missing elements.""" return _ValidElements(self._elements, self._dimension_transforms_dict) @lazyproperty def _element_dicts(self) -> List[Dict]: """Sequence of element-dicts for this dimen...
<filename>mundiapi/controllers/charges_controller.py<gh_stars>1-10 # -*- coding: utf-8 -*- """ mundiapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ from mundiapi.api_helper import APIHelper from mundiapi.configuration import Configuration from mundiapi.controllers....
<gh_stars>1-10 # Copyright (c) 2021 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 requir...
the roles, actions, obligations, responsibilities, and implication of the agreement. """ resource_type = "ContractFriendly" def __init__(self, jsondict=None, strict=True): """ Initialize all valid properties. :raises: FHIRValidationError on validation errors, unless strict is False :param dict jsondict: A JSO...
"""scrapli_replay.server.collector""" from copy import copy from dataclasses import asdict, dataclass from io import BytesIO from typing import Any, Dict, List, Optional, Tuple, Union, cast from ruamel.yaml import YAML # type: ignore from scrapli import Scrapli from scrapli.channel.sync_channel import Channel from sc...
<reponame>sifraitech/eth2.0-specs from random import Random from eth2spec.test.context import ( spec_state_test, expect_assertion_error, always_bls, with_all_phases, with_custom_state, spec_test, single_phase, low_balances, misc_balances, ) from eth2spec.test.helpers.attestations import sign_indexed_attestation fro...
column: #------------------------------------------------------------------------- def on_click(self, object): """ Called when the user clicks on the column. """ pass #------------------------------------------------------------------------- # Called when the user double-clicks on the column: #---------------...
navselecttoolbar w/ interactive buttons self.toolbar = NavMapToolbar(self.canvas, self.root,self) self.toolbar.update() self.plot_widget = self.canvas.get_tk_widget() self.plot_widget.pack(side=tk.TOP, fill=tk.BOTH, expand=1) self.toolbar.pack(side=tk.TOP, fill=tk.BOTH, expand=1) self.canvas.show() def replot_...
CONTACTS_FOR_NO_MORE_DATA + 1, f'Observed {output_records} output records (expected {CONTACTS_FOR_NO_MORE_DATA + 1})' assert error_records == 0, f'Observed {error_records} error records (expected 0)' finally: _clean_up(sdc_executor, pipeline, client, contact_ids) @salesforce def test_salesforce_destination_null_r...
# Assignment 3: Combustor Design ## Introduction The global desire to reduce greenhouse gas emissions is the main reason for the interest in the use of hydrogen for power generation. Although hydrogen shows to be a promising solution, there are many challenges that need to be solved. One of the challenges focuses ...
<filename>cw/skin/convert.py #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import shutil import struct import threading import cw class Converter(threading.Thread): def __init__(self, exe): threading.Thread.__init__(self) self.maximum = 100 self.curnum = 0 self.message = u...
import itertools from typing import Any, Callable, Collection, Dict, List import numpy as np from active_reward_learning.envs import TabularMDP from active_reward_learning.reward_models.basic_gp_reward_model import ( BasicGPRewardModel, ) from active_reward_learning.reward_models.query import ComparisonQueryLinear f...
<filename>flexx/app/_asset.py<gh_stars>0 """ Definition of the Asset class to represent JS and CSS assets, and a derived class used as a container for one or more JSModule classes. """ import sys import types from urllib.request import urlopen, Request from . import logger # The pscript package does not deal with li...
"1940:21"): "metadataonly", ("sou", "1940:9"): "metadataonly", ("sou", "1940:6"): "metadataonly", ("sou", "1939:51"): "metadataonly", ("sou", "1939:50"): "metadataonly", ("sou", "1939:38"): "metadataonly", ("sou", "1939:37"): "metadataonly", ("sou", "1939:35"): "metadataonly", ("sou", "1939:34"): "metadataonly"...
<gh_stars>1-10 """Cloud storage abstract System""" from abc import abstractmethod, ABC from collections import OrderedDict, namedtuple from re import compile from stat import S_IFDIR, S_IFREG, S_IFLNK from posixpath import join, normpath, dirname from dateutil.parser import parse from airfs._core.io_base import Worker...
attribStyle_733285237156411536, 'onmouseup': attribOnmouseup_162556595998286400, 'onmouseout': attribOnmouseout_55467262469652544, 'title': attribTitle_1178737426446382009, 'align': attribAlign_492202555580820100, 'onkeypress': attribOnkeypress_532917457362969849, 'xml_lang': attribXml_lang_1645670971257252...
#!usr/bin/env python import sys import os import pickle import pytest import jip from jip.pipelines import Pipeline from jip.tools import Tool, tool, pipeline from jip.options import Option tool_1_def = """\ Usage: tools [-i <input>] [-o <output>] [-x <other>] Options: -i, --input <input> The input [Default: stdin...
CONTENT = """huc basin <!--10n 60s--> 01 New England 0101 St. John 010100 St. John 01010001 Upper St. John 01010002 Allagash 01010003 Fish 01010004 Aroostook 01010005 Meduxnekeag 0102 Penobscot 010200 Penobscot 01020001 West Branch Penobscot 01020002 East Branch Penobscot 01020003 Mattawamkeag 01020004 Piscataquis 0102...
<gh_stars>1-10 import errno import os import logging from logging.handlers import RotatingFileHandler import re from types import FunctionType from sqlalchemy import create_engine from sqlalchemy import and_, desc, or_ from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import sessionmaker from hathor.audio ...
, u'㾇' : [u'm'] , u'贐' : [u'j'] , u'丒' : [u'c'] , u'檕' : [u'x', u'j'] , u'垗' : [u'z'] , u'昢' : [u'p'] , u'芥' : [u'j', u'g'] , u'侧' : [u'c', u'z'] , u'鸲' : [u'q'] , u'嬴' : [u'y'] , u'枷' : [u'j'] , u'獄' : [u'y'] , u'壉' : [u'j'] , u'歔' : [u'x'] , u'呖' : [u'l'] , u'烙' : [u'l', u'g'] , u'荤' : [u'h', u'x'] , u'棩' : [u'y'] , ...
) cbar.mappable.set_clim(clim) cbar.set_label(clabel, fontweight="bold") # AR our tileid tmpra = np.remainder(tilera + 360 - org, 360) if tmpra > 180: tmpra -= 360 if tmpra > 0: dra = -40 else: dra = 40 ramws, decmws = get_radec_mw( np.array([tilera, tilera + dra]), np.array([tiledec, tiledec - 30]), org )...
output .nc file from replica exchange simulation, (default='output/output.nc') :type output_data: str :param output_directory: path to which output files will be written (default='output') :type output_directory: stry :param series_per_page: number of replica data series to plot per pdf page (default=4) :type s...
the name and the display name of the metric, i.e. it is a localizable string. :type name: ~$(python-base-namespace).v2016_03_01.models.LocalizableString :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSecon...
# remove articles from library for article in articles: self._library.delete(article) # refresh collections view self._collections_view.UpdateCounts() # refresh articles view self._articles_view.ShowArticles() def _on_articles_trash(self, evt=None): """Marks selected articles as deleted.""" # get s...
the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_namespaced_secret(body, namespace, name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param V1DeleteOptions body: (required) :param str namesp...
import copy import numpy as np from scipy import ndimage import gnomonic_projection as gp import spherical_coordinates as sc import polygon from logger import Logger log = Logger(__name__) log.logger.propagate = False """ Implement icosahedron projection and stitch with the Gnomonic projection (forward and reverse ...
<reponame>ldn-softdev/pyeapi # # Copyright (c) 2014, Arista Networks, Inc. # 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 copyright noti...
<filename>python-shell/src/test/test_gaffer_operations.py # # Copyright 2016-2019 Crown Copyright # # 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....
<reponame>Tony1527/playsound class PlaysoundException(Exception): pass def _playsoundWin(sound, block = True): ''' Utilizes windll.winmm. Tested and known to work with MP3 and WAVE on Windows 7 with Python 2.7. Probably works with more file formats. Probably works on Windows XP thru Windows 10. Probably works wit...
}, { 'name': 'dsn_params_ports_mismatch_dsn_multi_hosts', 'dsn': 'postgresql://host1,host2,host3/db', 'port': [111, 222], 'error': ( exceptions.InterfaceError, 'could not match 2 port numbers to 3 hosts' ) }, { 'name': 'dsn_only_quoted_unix_host_port_in_params', 'dsn': 'postgres://user@?port=56226&host=%2Ft...
pulumi.Input[str] message_id: The message id. :param pulumi.Input[str] message_release: The message release version. :param pulumi.Input[str] message_version: The message version. :param pulumi.Input[int] release_indicator: The release indicator. :param pulumi.Input[int] repetition_separator: The repetition separat...
field=ofdef.create_oxm(ofdef.NXM_NX_REG5, netid) ), ofdef.ofp_action_set_field( field=ofdef.create_oxm(ofdef.NXM_NX_REG6, 0xffffffff) ), ofdef.nx_action_resubmit( in_port=ofdef.OFPP_IN_PORT & 0xffff, table=l2output ) ], data = packet._tobytes() ) ] ) async def _send_buffer_packet_out(netid,macaddress,ipa...
= "lix_3x_holder_c", tip_type = "opentrons_96_tiprack_300ul", flow_rate_aspirate = 50, flow_rate_dispense = 50, bottom_clearance = 1 ): """ ot2_layout should be a dictionary: {"plates" : "1,2", "holders" : "7,8", "tips" : "9,10"} """ print("Processing sample list(s) ...") slist,transfer_list,bdict = process...
def uitleg_nl(state): uitleg = '' if state == 'rondpass': uitleg = '''         U, en uw tegenstanders, mogen pas openen met 12 punten, er zitten in totaal 40 punten in het spel.         Dat betekent dat het mogelijk is dat niemand 12 punten heeft, wat betekend dat het mogelijk is dat niemand opent.         Als dat...
<reponame>WoonchanCho/pynetdicom """Unit test coverage for the logging.""" from io import BytesIO import logging import sys import pytest from pydicom.uid import ( ImplicitVRLittleEndian, ExplicitVRLittleEndian, ExplicitVRBigEndian, DeflatedExplicitVRLittleEndian, JPEGBaseline, JPEGExtended, JPEGLosslessP14, JPEG...
import argparse from collections import defaultdict import datetime import threading import os import sys import time import pickle import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s: %(message)s') from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor fr...
'like', 'coin', 'favorite', 'reply', 'share', 'danmaku'] data = [json_req[index] for index in need] if len(rank_list): data = [time_str(), *data, *rank_list[:2], *rank_list[-2:]] else: data = [time_str(), *data] self.data_v2[av_id] = data def have_error(self, json_req: dict, types=None) -> bool: ''' check jso...
<filename>neutron/agent/l3/router_info.py # Copyright (c) 2014 OpenStack Foundation # # 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 r...
"""Utility module for setting up different envs""" import numpy as np import structlog from shapely.geometry import Point from ray.rllib.agents.ppo import DEFAULT_CONFIG from ray.rllib.env.multi_agent_env import MultiAgentEnv from deepcomp.util.constants import SUPPORTED_ENVS, SUPPORTED_AGENTS, SUPPORTED_SHARING, SUPP...
import os import re import zlib from typing import List, Dict, Union, Optional, Generator, Iterable from collections import defaultdict import logging import requests from .data import Language from .tools import write_file_or_remove from .storage import ( BaseVersion, Storage, Patch, PatchElement, PatchVersion, ...
<gh_stars>0 ''' File name: sorting.py Date created: Aug 22, 2019 Objective: Sort RNA-seq expression png image with TCGA metadata command: python3 sorting.py \ -f="/mnt/IKEGAMI/R/expression_profile/files.json" \ -C="/mnt/IKEGAMI/R/expression_profile/clinical.tsv" \ -s="/mnt/IKEGAMI/R/expression_profile/png_ana...
meaningless for 3d diffraction det = condor.Detector(solid_angle_correction=False, **self.param_detector) # Atoms atomic_numbers = map(lambda el: el.number, atoms) atomic_numbers = [atomic_number + 5 for atomic_number in atomic_numbers] # atomic_numbers = [82 for atomic_number in atomic_numbers] # convert Angst...
**kwargs): pass def MStreamUtils_swiginit(*args, **kwargs): pass def MFnSubd_edgeIsValid(*args, **kwargs): pass def MFnCamera_stereoHITEnabled(*args, **kwargs): pass def MFnReflectShader_reflectedColor(*args, **kwargs): pass def MGlobal_disableStow(*args, **kwargs): pass def MFnMesh_removeFaceVertexCo...
#!/usr/bin/env python # Copyright (c) 2014-2018 <NAME>, Ph.D. # # 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 list of conditions and the fo...
""" Miscellaneous and sundry plotting functions for to please your visual cortex """ import typing import warnings from pathlib import Path from typing import Dict, Union import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import xarray as xr from matplotlib import cm, colors...
#!/usr/bin/python3 r'''Triangulation uncertainty quantification test We look at the triangulated position computed from a pixel observation in two cameras. Calibration-time noise and triangulation-time noise both affect the accuracy of the triangulated result. This tool samples both of these noise sources to make sur...
but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivat...
<filename>src/pdf_summary.py #!/usr/bin/env python from astropy.io import fits import ConfigParser import datetime import log import matplotlib # matplotlib.use('Agg') from matplotlib import pyplot from matplotlib.backends.backend_pdf import PdfPages from matplotlib.pyplot import table from pyraf import iraf import nu...
#!/usr/bin/python """ SPDX-License-Identifier: Apache-2.0 Copyright (c) 2019 STMicroelectronics. This script define Stm32SerieUpdate class to be used by update_stm32_package.py """ import os import shutil import subprocess import re from pathlib import Path import logging from jinja2 import Environment, FileSystemLoad...
<reponame>rushabh-v/ignite import os import pytest import torch from sklearn.metrics import accuracy_score import ignite.distributed as idist from ignite.exceptions import NotComputableError from ignite.metrics import Accuracy torch.manual_seed(12) def test_no_update(): acc = Accuracy() with pytest.raises(NotCom...
#!/usr/env python # X-HALE model for SHARPy. # Version 1.0 # See IFASD 2019 paper by: <NAME> <NAME> and <NAME> and <NAME>. # # <NAME> # June 2019 # ============================================================================ import h5py as h5 import numpy as np import os import sharpy.utils.algebra as algebra route =...
# encoding: UTF-8 # # Copyright (c) 2015 Facility for Rare Isotope Beams # """ Request handlers for REST API. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import functools from collections import OrderedDict from tornado.web import HT...
if remote_sudo and self.username != ROOT_ACCOUNT: # TODO: Implement scp with remote sudo. raise NotImplementedError('Cannot run scp with sudo!') kwargs.setdefault('debug_level', self.debug_level) # scp relies on 'scp' being in the $PATH of the non-interactive, # SSH login shell. scp_cmd = (['scp', '-P', str(self...
<reponame>williamtrang/DSC20<gh_stars>0 """ DSC 20 Homework 01 Name: <NAME> (failure to write name or pid will be penalized) PID: A16679845 """ # Question 1 def unlucky_number(numbers): """ # Takes in a list of numbers and adds the elements up. # Returns True if '4' is in the calculated sum and False if not. >>> ...
#***************# ACCESS_LEVEL = 1 #***************# ERROR_MESSAGE = "" #Check our user's session and access level if SECURITY_check_user_permissions(ACCESS_LEVEL, request.user.permissions.access_level): #We need to return a json list of all formtype RTYPES that match the provided formtype pk if request.me...
<reponame>billymccafferty/bno055 # Copyright 2021 AUTHORS # # 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 fo...
<gh_stars>0 """ Copyright (c) 2021 Intel 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/LICENSE-2.0 Unless required by applicable law or agreed to in...
<reponame>ishine/joint-disfluency-detector-and-parser """tb.py reads, searches and displays trees from Penn Treebank (PTB) format treebank files. <NAME>, 14th January, 2012, last modified 15th November 2018 Trees are represented in Python as nested list structures in the following format: Terminal nodes are represe...
<filename>rlax/_src/distributions_test.py<gh_stars>0 # Lint as: python3 # Copyright 2019 DeepMind Technologies Limited. 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 # ...
import os import sys import json import copy import time import numpy as np import pandas as pd import logging from supervised.model_framework import ModelFramework from supervised.callbacks.early_stopping import EarlyStopping from supervised.callbacks.metric_logger import MetricLogger from supervised.callbacks.time_c...
Tlist = numpy.arange(original_kinetics.Tmin, original_kinetics.Tmax, 200.0, numpy.float64) P = 1e5 for T in Tlist: korig = original_kinetics.getRateCoefficient(T, P) krevrev = reversereverseKinetics.getRateCoefficient(T, P) self.assertAlmostEqual(korig / krevrev, 1.0, 0) def testGenerateReverseRateCoefficientPDe...
if 'team' in params: form_params.append(('team', params['team'])) # noqa: E501 if 'user' in params: form_params.append(('user', params['user'])) # noqa: E501 if 'is_admin' in params: form_params.append(('is_admin', params['is_admin'])) # noqa: E501 if 'team' in params: form_params.append(('team', params['team'])...
chunk, chunk_periods, valid_period, log_file, with_index, valid_index, hdf=hdf[1]) test_index = tag_chunk('test', label, chunk, chunk_periods, test_period, log_file, with_index, test_index, hdf=hdf[2]) inter_periods = list(chunk_periods.intersection(set(range(test_period[1]+1,355)))) log_file.write('Periods grea...
a parameter""" exshared.setpos(loc, text) if DEBUG > 0: print("PARAM:",par) if DEBUG == 2: self.symtab.display() if DEBUG > 2: return index = self.symtab.insert_parameter(par.name, par.type) self.shared.function_params += 1 return index def constant_action(self, text, loc, const): """Code executed...
else: rfdlist.remove(self.rfd) self.flag_eof = True if pty.STDIN_FILENO in r: try: data = None data = os.read(pty.STDIN_FILENO, 1024) except OSError, e: # the subprocess may have closed before we get to reading it if e.errno != errno.EIO: raise if self.debug and os.isatty(self.wfd): wfd_mode = tty.tcgetattr...
<filename>container/pyf/models/oldies/AcreditationEntities.py from sqlalchemy import Column, String, BigInteger, Integer, DateTime, ForeignKey, Sequence import datetime from functools import cache import sqlengine.sqlengine as SqlEngine from . import BaseModel @cache # funny thing, it makes from this function a sing...
<gh_stars>0 def triedrdf(): """ Le module triedrdf regroupe des méthodes pour la reconnaissance de forme : bayesrule : Règle de décision de Bayes kppv : Algorithme des k-plus proches voisins kmoys : Algorithme des k-moyennes (kmeans) kclassif : Classification de données par proximité à des référents """ ...
QgsMapCanvas (see setLayers) Parameters ---------- layername name of the layer, generally a file path or vsimem path """ if layername in self.layer_manager.shown_layer_names: self.layer_manager.hide_layer(layername) self.canvas.setLayers(self.layer_manager.shown_layers) def _manager_remove_layer(self, layern...
<reponame>DannyWeitekamp/tutorenvs from random import randint from random import choice from pprint import pprint import logging, operator from functools import reduce import cv2 # pytype:disable=import-error from PIL import Image, ImageDraw import gym from gym import error, spaces, utils from gym.utils import seeding...
dequeue from the queue_type response = self.queue.dequeue( queue_type=self._test_queue_type ) # wait until the job expires time.sleep(self.queue._job_expire_interval / 1000.00) # requeue the job self.queue.requeue() self.assertFalse( self.queue._r.exists('%s:%s:active' % ( self.queue._key_prefix, self._tes...
:type role: :class:`Roles` :returns: role info :rtype: :class:`~c4.system.configuration.RoleInfo` """ key = "/roles/{role}".format(role=role.name) value = self.store.get(key) if value: return deserialize(value) return None def getRoles(self): """ Get a mapping of roles to role info objects :returns: mappi...
<reponame>Unknown-Data/QGCN import os import pickle from functools import partial from itertools import permutations, combinations import networkx as nx import numpy as np from bitstring import BitArray from collections import Counter try: from graph_measures.features_infra.feature_calculators import Node...
@property def asset_parameters_expiration_date(self) -> str: """Relative expiration date.""" return self.__asset_parameters_expiration_date @asset_parameters_expiration_date.setter def asset_parameters_expiration_date(self, value: str): self._property_changed('asset_parameters_expiration_date') self.__asset_...
# coding: utf-8 """ Prisma Cloud Compute API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 21.04.439 Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except Im...
'61342427':{'en': 'Geelong'}, '61342428':{'en': 'Kennedys Creek'}, '61342429':{'en': 'Kennedys Creek'}, '6134243':{'en': 'Geelong'}, '61342440':{'en': 'Queenscliff'}, '61342441':{'en': 'Geelong'}, '61342442':{'en': 'Geelong'}, '61342443':{'en': '<NAME>'}, '61342444':{'en': '<NAME>'}, '61342445':{'en': '<NAME>'...
tile. When the incoming HSP is not in the same frame as the tile, it is corrected. Parameters: ___________ hsp : Hsp object if Hsp to add. location : either upstream (0) or downstream (1). The location of the Match relative to the existing tile. distance - distance between hsp and this tile, used as fill valu...
import random import os import time import logging # Hide the pygame support prompt os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "1" import pygame from pygame import Vector2 import sprites # Using the C API to change the app ModelID # This changes the taskbar icon from the python one to the game-specific one import c...
self.filename = filename f = open(filename, 'rb') # read the fileheader self.dic = fileheader2dic(get_fileheader(f)) if self.dic["naxis"] != 2: raise Exception("file is not a 2D Sparky file") # read in the axisheaders self.dic["w1"] = axisheader2dic(get_axisheader(f)) self.dic["w2"] = axisheader2dic(get_axis...
models.ForeignKey( 'GenomicDataset') display_name = models.CharField( max_length=128) count_matrix = models.ForeignKey( 'FeatureListCountMatrix', null=True, help_text='Matrix of read coverage over genomic features') created = models.DateTimeField( auto_now_add=True) last_updated = models.DateTimeField( auto_...
<reponame>RishabhSehgal/keras_cv_attention_models<filename>keras_cv_attention_models/coco/anchors_func.py import tensorflow as tf from tensorflow.keras import backend as K def get_feature_sizes(input_shape, pyramid_levels=[3, 7]): # https://github.com/google/automl/tree/master/efficientdet/utils.py#L509 feature_siz...
can be downloaded filename (str): filename for the sound path (str): path where to save the soundfile, if None file will be saved at current working directory Returns ------- None """ response = requests.get(url, headers=self.headers) abs_path = os.path.join(path, filename) logging.info("Downloading from %s...