input
stringlengths
2.65k
237k
output
stringclasses
1 value
<filename>lookmlint/lookmlint.py from collections import Counter import json import os import re import subprocess import attr import yaml @attr.s class ExploreView(object): data = attr.ib(repr=False) explore = attr.ib(init=False, repr=False) name = attr.ib(init=False, repr=True) source_view = attr.ib(init=Fals...
info: str = None, min_iter: int = 2, err_tol: float = 0.01, allow_adjust: bool = True, no_lower=False, no_upper=False, sign_lower=1, sign_upper=1, equal=True, no_warn=False, zu=0.0, zl=0.0, zi=1.0): Discrete.__init__(self, name=name, tex_name=tex_name, info=info, min_iter=min_iter, err_tol=err_tol) self.u = u ...
<reponame>juliomateoslangerak/ezomero<filename>tests/test_ezomero.py import pytest import numpy as np import ezomero def test_omero_connection(conn, omero_params): assert conn.getUser().getName() == omero_params[0] # Test posts ############ def test_post_dataset(conn, project_structure, users_groups, timestamp): ...
'ticksuffix', 'visible'] Run `<angularaxis-object>.help('attribute')` on any of the above. '<angularaxis-object>' is the object at [] """ _name = 'angularaxis' class Annotation(PlotlyDict): """ Valid attributes for 'annotation' at path [] under parents (): ['align', 'arrowcolor', 'arrowhead', 'arrowsize',...
# coding: utf-8 """ Copyright 2017 Square, 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...
"""Test descriptors, binary ops, etc. Made for Jython. """ import types import unittest from test import test_support class Old: pass class New(object): pass old = Old() new = New() class TestDescrTestCase(unittest.TestCase): def test_class_dict_is_copy(self): class FooMeta(type): def __new__(meta, name, ...
<filename>ehb_client/requests/external_record_request_handler.py from ehb_client.requests.base import JsonRequestBase, RequestBase, IdentityBase from ehb_client.requests.request_handler import RequestHandler import json from ehb_client.requests.exceptions import PageNotFound, InvalidArguments class ExternalRecord(Ide...
Constraint(expr= m.b224 - m.b225 <= 0) m.c545 = Constraint(expr= m.b226 - m.b227 <= 0) m.c546 = Constraint(expr= m.b228 - m.b229 <= 0) m.c547 = Constraint(expr= m.b232 - m.b233 <= 0) m.c548 = Constraint(expr= m.b234 - m.b235 <= 0) m.c549 = Constraint(expr= m.b236 - m.b237 <= 0) m.c550 = Constraint(expr= - m.b239 ...
daily_record = dr , start = '09:00' , end = '13:00' , work_location = '1' , wp = '6' ) db.time_record.create \ ( daily_record = dr , start = '15:30' , end = '18:30' , work_location = '1' , wp = '6' ) db.time_record.create \ ( daily_record = dr , start = '13:30' , end = '15:30' , work_location = '1' , ...
<reponame>stachu86/dcase_util<gh_stars>100-1000 # !/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import collections import hashlib import os import pickle import sys import numpy import yaml from six import iteritems from dcase_util.datasets import SoundDataset, ...
to the amount of carbon that is naturally needed in the environment for processes like photosynthesis. As humans we must remember that trees take years to grow so if we carelessly use wood, it may not always be a resource immediately available for use. When someone in Alberta cuts down a tree to burn it for energy, i...
CloseMenu def CloseMenu(): _close_menu() _get_menu = _ScriptMethod(338) # GetMenuItems _get_menu.restype = _str _get_menu.argtypes = [_str] # MenuCaption def GetMenuItems(MenuCaption): # TODO: split items, return list return _get_menu(MenuCaption) _get_last_menu = _ScriptMethod(339) # GetLastMenuItems _get_la...
# https://www.dexterindustries.com/BrickPi/ # https://github.com/DexterInd/BrickPi3 # # Copyright (c) 2016 <NAME> # Released under the MIT license (http://choosealicense.com/licenses/mit/). # For more information see https://github.com/DexterInd/BrickPi3/blob/master/LICENSE.md # # Python drivers for the BrickPi3 from ...
0, "fractionalContribution": 1, "sumWeights": 0, "effectiveCrossSection": 0, }, "ttother_SL_nr": {"filter": "nAdditionalBJets < 2 && nAdditionalCJets < 2 && nGenLep == 1 && (nGenJet < 9 || GenHT < 500)", "nEventsPositive": 0, "nEventsNegative": 0, "fractionalContribution": 1, "sumWeights": 0, "effectiveCrossS...
# -*- coding: utf-8 -*- ############################################################################### ############################################################################### ## ## ## _ ___ ___ ___ ___ ___ ## ## | | | __ / \ / __| _ | __| ## ## | |__| __| ( ) | (_ | _|__ \ ## ## |____|___ \___/ \___|_| \___/ ...
0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.1049, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3...
<gh_stars>1-10 """ Created on Oct 14, 2016 @author: <NAME> -- <EMAIL> """ from __future__ import division, print_function, absolute_import import sys import os import getopt import h5py import numpy as np from mpi4py import MPI # import matplotlib.pyplot as plt def gen_batches(n, batch_size, start=0): """ Copied ...
and report success if an error occurs.''') parser.error = self._parse_error return parser def apply(self, code, silent, store_history, user_expressions, allow_stdin): import tempfile import shutil options, remaining_code = self.get_magic_and_code(code, False) parser = self.get_parser() try: args = parser.par...
255] R = inst_targets_np[roi_pairs[:, 2], roi_pairs[:, 3]] == inst_id pos_roi_pairs = roi_pairs[R] roi_im_res[pos_roi_pairs[:, 3]] = [0, 0, 255] #blue roi_im_res = roi_im_res.reshape((28, 28, 3)) roi_im = imresize(roi_im_res, (roi_im.shape[1], roi_im.shape[0])) img_np[y1:y1 + h, x1:x1 + w, :] = roi_im start_...
They’ve concluded that the assassin was—well, was named Wheeler—and they’re only concerned to discover the first name. Forgive my plain speaking, but to save yourself and the other two, we must be outspoken.” “Yes, yes—pray don’t hesitate to say anything you think. I am in a terrible position, Mr. Keefe—more terrible ...
longitude labels. This adjustment itself should of been set when the class was initialized pre-scaled such that it an offset on a 1/2 degree grid scale. """ return self.longitude_offset_adjustment def extend_mask_to_neighbours(self,changes_mask): """Extend a mask on this grid to include neighbouring points Arg...
<filename>src/ElectronicTransformer/etk_callback.py # -*- coding: utf-8 -*- # # copyright 2021, ANSYS Inc. Software is released under GNU license # # Replacement of old ETK (Electronic Transformer Kit) for Maxwell # # ACT Written by : <NAME> (<EMAIL>) # Tested by: <NAME> (<EMAIL>) # Last updated : 11.03.2021 import cop...
= self.session.query(models.DiseaseComment) q = self.get_model_queries(q, ((comment, models.DiseaseComment.comment),)) q = self.get_one_to_many_queries(q, ((entry_name, models.Entry.name),)) return self._limit_and_df(q, limit, as_df) def other_gene_name(self, type_=None, name=None, entry_name=None, limit=None, ...
-N 'LNA:47' -S 2400000 -f 858.8375e6 -o 25000 -q 1 -T ~/op25/op25/gr-op25_repeater/apps/NC_Viper/Durham/Duke_University.tsv -V -2 -U 2> stderr.2 -O plughw:1,0 -l 'http:0.0.0.0:8080'&") def CMD_Camden_Ave(): os.system("pkill -f ./rx.py") os.system("cd ~/op25/op25/gr-op25_repeater/apps; ./rx.py --args 'rtl' -N 'LNA:47...
# 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 the Apache License, Version 2.0 (the # "License"); you may not use...
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jan 14 16:31:56 2021 @author: nicolasnavarre """ import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D figures = 'figures/' def extra_analysis(POM_data, Org_food, EAT_food, FAO_Crops, FA...
first_paragraph = utils.remove_tag_from_tag( first_paragraph, "supplementary-material" ) if utils.node_text(first_paragraph).strip(): component["caption"] = utils.node_text(first_paragraph) component["full_caption"] = utils.node_contents_str(first_paragraph) if raw_parser.permissions(tag): component["permissio...
exc: log.error('User not found: {0}'.format(name)) log.error('nbr: {0}'.format(exc.winerror)) log.error('ctx: {0}'.format(exc.funcname)) log.error('msg: {0}'.format(exc.strerror)) return False else: log.error('User {0} is currently logged in.'.format(name)) return False # Remove the User Profile directory if...
<reponame>smolins/alquimia-dev #!/usr/bin/env python """ Program to compare the results of alquimia driven and pflotran native simulations. Alquimia Copyright (c) 2013, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U....
if self.paren_level > 0: prev = self.code_list[-1] if prev.kind == 'lt' or (prev.kind, prev.value) == ('op', ','): self.blank() self.add_token('op', val) return self.blank() self.add_token('op', val) self.blank() #@+node:ekr.20200107165250.47: *5* orange.star_star_op def star_star_op(self): """Put a ** opera...
not_in_db = pc.productcheckentry_set.get(input_product_id="Test") assert not_in_db.amount == 2 assert not_in_db.in_database is False assert not_in_db.product_in_database is None assert not_in_db.part_of_product_list == "" assert not_in_db.migration_product is None # change product list (the name should not appea...
<filename>ts3/filetransfer.py #!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2013-2018 <see AUTHORS.txt> # # 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 restricti...
<filename>main.py #!/usr/bin/env python3 # -*- coding:utf-8 -*- u""" Created at 2020.01.02 A python wrapper for running the netprophet to replace snakemake """ import os import sys import json import logging from argparse import ArgumentParser, ArgumentError from multiprocessing import Pool from shutil import rmtree ...
<reponame>ndevenish/prime<gh_stars>1-10 # LIBTBX_SET_DISPATCHER_NAME prime.print_integration_pickle """ Author : Uervirojnangkoorn, M. Created : 11/1/2015 Description : read integration pickles and view systemetic absences and beam X, Y position """ from __future__ import absolute_import, division, print_function from...
<filename>lib/circuitpython_nrf24l01/fake_ble.py<gh_stars>1-10 # The MIT License (MIT) # # Copyright (c) 2019 <NAME> # # 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, inc...
import os import sys from unittest import mock import pytest from _pytest.config import ExitCode from _pytest.mark import EMPTY_PARAMETERSET_OPTION from _pytest.mark import MarkGenerator as Mark from _pytest.nodes import Collector from _pytest.nodes import Node class TestMark: @pytest.mark.parametrize("attr", ["mar...
'am:DiscreteValueHistogram': print("ExecutionNeed - value type \'am:DiscreteValueHistogram\' not supported.") continue elif values.attrib[xsi+'type'] == 'am:BoundedDiscreteValueDistribution': lowerBound = int(parser.xml_get(values, 'lowerBound')) upperBound = int(parser.xml_get(values, 'upperBound')) elif values....
# Copyright 2020- Robot Framework 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 required by applicable law or agreed to ...
<gh_stars>1-10 #!/usr/bin/env python """ netCDF4 functions to a copy netcdf file while doing some transformations on variables and dimensions. This module was written by <NAME> while at Institut National de Recherche pour l'Agriculture, l'Alimentation et l'Environnement (INRAE), Nancy, France. It borrows the idea of ...
observation az, el = target.azel(now + duration, antenna) visible_after.append(el >= horizon) if all(visible_before) and all(visible_after): return True always_invisible = any(~np.array(visible_before) & ~np.array(visible_after)) if always_invisible: user_logger.warning("Target '%s' is never up during requested ...
preClusteringUseChaining = cms.bool(True) ), gemRecHitLabel = cms.InputTag("gemRecHits") ) hbhereco = cms.EDProducer("HBHEPhase1Reconstructor", algoConfigClass = cms.string(''), algorithm = cms.PSet( Class = cms.string('SimpleHBHEPhase1Algo'), activeBXs = cms.vint32( -3, -2, -1, 0, 1, 2, 3, 4 ), applyPedCon...
optchords=alt_optchords) # print(repr(unichars), repr(alt_optchords), funcs[alt_optchords]) # # Feed Keyboard into Bottom Lines of the Screen, a la the Ex inside Vim # class TerminalEx: """Feed Keyboard into Line at Bottom of Screen of Scrolling Rows, a la Ex""" def __init__(self, editor, vi_reply): self.edi...
import requests import urllib.request, urllib.parse, urllib.error import logging import hashlib import base64 import os import sys import copy import xml.dom.minidom import xml.etree.ElementTree from requests import Request, Session from urllib.parse import quote from hashlib import md5 from .streambody import StreamBo...
#!/usr/bin/env python # Part of the psychopy_ext library # Copyright 2010-2015 <NAME> # The program is distributed under the terms of the GNU General Public License, # either version 3 of the License, or (at your option) any later version. """ A library of simple models of vision Simple usage:: import glob from p...
<reponame>jbrodman/SYCL-CTS<filename>tests/vector_operators/generate_vector_operators.py #!/usr/bin/env python3 # ************************************************************************ # # SYCL Conformance Test Suite # # Copyright: (c) 2018 by Codeplay Software LTD. All Rights Reserved. # # **************************...
<gh_stars>0 # coding: utf-8 import traceback from .analyze import KlineAnalyze, is_bei_chi, get_ka_feature def is_in_tolerance(base_price, latest_price, tolerance): """判断 latest_price 是否在 base_price 的买入容差范围(上下 tolerance)""" if (1 - tolerance) * base_price <= latest_price <= (1 + tolerance) * base_price: return Tr...
""" MyView all views saved here """ # flake8: noqa:E501 # pylint: disable=import-error # pylint: disable=invalid-name # pylint: disable=protected-access # pylint: disable=no-else-return # pylint: disable=broad-except # pylint: disable=using-constant-test # pylint: disable=too-many-arguments # pylint: disable=too-many-l...
""" Contains upsampling and resize layers """ import numpy as np import tensorflow.compat.v1 as tf from .layer import Layer, add_as_function from .conv import ConvTranspose from .core import Xip from ..utils import get_shape, get_num_channels, get_spatial_shape class IncreaseDim(Layer): """ Increase dimensionality...
<reponame>lelegan/sympy<filename>sympy/geometry/util.py """Utility functions for geometrical entities. Contains ======== intersection convex_hull are_similar """ from __future__ import print_function, division from sympy import Symbol, Function, solve from sympy.core.compatibility import string_types, is_sequence ...
m.x595 >= 0) m.c773 = Constraint(expr= - m.b73 + m.x358 + m.x449 + m.x491 + m.x533 + m.x596 >= 0) m.c774 = Constraint(expr= - m.b74 + m.x359 + m.x450 + m.x492 + m.x534 + m.x597 >= 0) m.c775 = Constraint(expr= - m.b75 + m.x360 + m.x451 + m.x493 + m.x535 + m.x598 >= 0) m.c776 = Constraint(expr= - m.b76 + m.x361 + m.x...
<gh_stars>10-100 # [h] hTools2.modules.unicode from collections import OrderedDict '''Tools to work with Unicode, convert glyph names to hex/unicode etc.''' def clear_unicodes(font): '''Remove unicodes from all glyphs in the font.''' for g in font: g.unicodes = [] font.update() def auto_unicodes(font, custom_un...
nframeswrite = %d"%nframeswrite for i in range(nframeswrite): self.outfile.write(struct.pack("<Q",self.writesbfmf_framestarts[i])) # write the location of the index self.outfile.seek(self.writesbfmf_indexptrloc) self.outfile.write(struct.pack("<Q",indexloc)) # write the number of frames self.outfile.seek(self....
<filename>augly/image/utils/bboxes.py #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. import math from typing import List, Optional, Tuple import augly.image.utils as imutils import numpy as np def crop_bboxes_helper( bbox: Tuple, x1: float, y1: float, x2: float, y2: float, **kwargs ) -> ...
'jiè', 0x86A8: 'fú', 0x86A9: 'chī', 0x86AA: 'dǒu', 0x86AB: 'bào', 0x86AC: 'xiǎn', 0x86AD: 'ní', 0x86AE: 'dài,dé', 0x86AF: 'qiū', 0x86B0: 'yóu', 0x86B1: 'zhà', 0x86B2: 'píng', 0x86B3: 'chí', 0x86B4: 'yòu', 0x86B5: 'kē', 0x86B6: 'hān', 0x86B7: 'jù', 0x86B8: 'lì', 0x86B9: 'fù', 0x86BA: 'rán', 0x86BB: '...
import random import numpy as np import itertools import re from collections import defaultdict import os def get_tags(s, open_delim='<', close_delim='/>'): """Iterator to spit out the xml style disfluency tags in a given string. Keyword arguments: s -- input string """ while True: # Search for the next two de...
<filename>code/client/client.py import struct import hashlib import math import requests import json import web3 import util """ Bitcoin header constants """ HDR_LEN=80 NVERSION_LEN=4 HASHPREVBLOCK_LEN=32 HASHMERKLEROOT_LEN=32 NTIME_LEN=4 NBITS_LEN=4 NNONCE_LEN=4 assert ( NVERSION_LEN + HASHPREVBLOCK_LEN + HASHMERK...
<gh_stars>0 # MINLP written by GAMS Convert at 08/20/20 01:30:51 # # Equation counts # Total E G L N X C B # 281 81 10 190 0 0 0 0 # # Variable counts # x b i s1s s2s sc si # Total cont binary integer sos1 sos2 scont sint # 231 161 70 0 0 0 0 0 # FX 0 0 0 0 0 0 0 0 # # Nonzero counts # Total const NL DLL # 1006 991 ...
in group_names: try: group = session.query(model.DbGroup).filter_by(name=group_name).one() except NoResultFound: raise DbErrors.DbUserNotFoundError("Group '%s' not found in database" % group_name) groups.append(group) try: role = session.query(model.DbRole).filter_by(name=external_user.role.name).one() user = ...
<filename>Smart_Fusion/testbench.py from ppg_dalia_data_extraction import extract_data from edr_adr_signal_extraction import edr_adr_extraction from rqi_extraction import rqi_extraction from rr_extraction import rr_extraction import scipy import numpy as np import argparse from machine_learning import * import...
<gh_stars>10-100 # coding: utf-8 """ Filtering functions to handle flatisfy-specific metadata. This includes functions to guess metadata (postal codes, stations) from the actual fetched data. """ from __future__ import absolute_import, print_function, unicode_literals import logging import re from flatisfy import da...
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 13 18:23:08 2019 This scrip is for training the experiement end2end @author: li """ import tensorflow as tf import models.AE as AE import optimization.loss_tf as loss_tf from data import read_frame_temporal as rft import numpy as np impor...
cost[str(duel.chain - 2)]["choose"] = [] else: if str(duel.chain - 1) not in mess: mess[str(duel.chain - 1)] = {} if "choose" not in mess[str(duel.chain - 1)]: mess[str(duel.chain - 1)]["choose"] = [] tmp2 = {} tmp2["det"] = field["det"] tmp2["hide"] = ( field["hide"] if ("hide" in field) else False ) tmp2["...
await self.bot.send_message(ctx.message.channel, bot_prefix + 'Password set. Do ``>avatar`` to toggle cycling avatars.') @commands.command(pass_context=True, aliases=['pick']) async def choose(self, ctx, *, choices: str): """Choose randomly from the options you give. >choose this | that""" await self.bot.send_mess...
<gh_stars>10-100 import cv2 import numpy as np import torchvision.datasets as datasets class CIFAR10Noise(datasets.CIFAR10): """CIFAR10 Dataset with noise. Args: clip (bool): If True, clips a value between 0 and 1 (default: True). seed (int): Random seed (default: 0). This is a subclass of the `CIFAR10` Datas...
# and also in pairwise_distances()! "cityblock": manhattan_distances, "cosine": cosine_distances, "euclidean": euclidean_distances, "haversine": haversine_distances, "l2": euclidean_distances, "l1": manhattan_distances, "manhattan": manhattan_distances, "precomputed": None, # HACK: precomputed is always allowed...
LDAP domain to use for users (eg: ou=People,dc=example,dc=org)`. """ ... @overload def __init__(__self__, resource_name: str, args: SecretBackendArgs, opts: Optional[pulumi.ResourceOptions] = None): """ ## Import AD secret backend can be imported using the `backend`, e.g. ```sh $ pulumi import vault:ad/se...
""" CORE DATA MODELS ================ Contains the core data structure models for sequencing files. """ import logging import os import re from .config import CONFIG as cfg try: FileNotFoundError except NameError: FileNotFoundError = OSError logger = logging.getLogger(__name__) def extract_frame(name): """ Th...
<gh_stars>0 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import multiselectfield.db.fields import common.forms class Migration(migrations.Migration): dependencies = [ ('taxonomy', '__first__'), ('organization', '0004_auto_20150112_0241'), ] operation...
not have an avatar (4th element) if (time * spriteSet[object[0]]['speed'] - object[2] >= 0): object[2] += 1 spriteListWithObject = map[object[1]] for index in range(0, len(spriteListWithObject)): if (debug): print index print len(spriteListWithObject) print spriteListWithObject[index] print spriteListWithObjec...
import numpy as np import scipy from ... import operators __all__ = ['matrix_pencil','matrix_pencil_cor','matrix_pencil_cov', 'kernel_matrix_pencil'] #------------------------------------------------------------- def matrix_pencil(x, order, mode='full', tls_rank = None): ''' Matrix Pencil Method (MPM) for of t...
<reponame>junkyul/gmid2-public """ read or write uai files in pure python classes *.uai: functions *.id: identity for var/func *.mi: identify for var *.map: map variables *.pvo: partial ordering *.evid: evidence or conditioning *.vo: total ordering *.pt: pseudo tree * ID/LIMID: uai, id, pvo * MMAP: uai, map * MPE: ua...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2007-2010 <NAME>, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the Licen...
import inspect from abc import ABCMeta, abstractmethod from functools import update_wrapper from fixate.core.discover import discover_sub_classes, open_visa_instrument from fixate.core.exceptions import InstrumentFeatureUnavailable try: import typing number = typing.Union[float, int] except ImportError: number = f...
WordPress! ' + y + ']' except: pass def print_logo(self): clear = "\x1b[0m" colors = [36, 32, 34, 35, 31, 37, 30, 33, 38, 39] x = """ _____ _____ _____ _____ _____ _ _ |_ _/ ____/ ____| | __ \ / ____| | \ | | | || | | | ____ _| |__) |__| | __ _| \| | | || | | | |_ \ \ /\ / / ___/ __| | / _` | . ` | _| || ...
# -*- coding: utf-8 -*- # Copyright 2012-2020 CERN # # 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 agre...
:example: Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/streaming/create_stream.py.html>`__ to see an example of how to use create_stream API. """ resource_path = "/streams" method = "POST" operation_name = "create_stream" api_reference_link = "https://docs.oracle.com/iaas...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
def db_add_id(self, id): self._db_id = id def db_change_id(self, id): self._db_id = id def db_delete_id(self, id): self._db_id = None def __get_db_ports(self): return self._db_ports def __set_db_ports(self, ports): self._db_ports = ports self.is_dirty = True db_ports = property(__get_db_ports, __set_db_por...
pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for State_ in self.State: namespaceprefix_ = self.State_nsprefix_ + ':' if (UseCapturedNS_ and self.State_nsprefix_) else '' State_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='State', pretty_print=pretty_print) def build(self...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Positioning_Assistant_GUI.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Mouse_Positioning_Interface(object): def setupUi(self...
<filename>dianhua/worker/crawler/china_mobile/shandong/base_sd_crawler.py<gh_stars>1-10 # -*- coding: utf-8 -*- import base64 import datetime,time import traceback import re import json import lxml.html import sys reload(sys) sys.setdefaultencoding("utf8") try: from worker.crawler.china_mobile.SD.base_request_param ...
node_data['namespace'][ns_name] if 'set' not in ns.keys(): ns['set'] = {} ns['set'][setname] = copy.deepcopy(val) del node_data['set'] def _restructure_sindex_section(self, stats): # Due to new server feature namespace add/remove with rolling restart, # there is possibility that different nodes will have dif...
<reponame>yocheah/dac-man from pathlib import Path from collections import defaultdict import numpy as np try: import pandas as pd except ImportError: from dacman.core.utils import dispatch_import_error dispatch_import_error(module_name='pandas', plugin_name='CSV') from dacman.compare import base try: from IPyt...
1, 2]] # Scale all features (except yaws) with global scaler x_t[:, [0, 1, 2, 3, 4, 7, 8, 9]] /= self.global_scale else: # Center node positions x_t[:, [0, 1, 2]] -= batch.loc[batch.batch][:, [0, 1, 2]] # Scale all features (except yaws) with global scaler x_t[:, [0, 1, 2, 3, 4, 7, 8, 9]] /= self.global_scale #...
'''functions to work with contrasts for multiple tests contrast matrices for comparing all pairs, all levels to reference level, ... extension to 2-way groups in progress TwoWay: class for bringing two-way analysis together and try out various helper functions Idea for second part - get all transformation matrices ...
Network Storage", "005014": "CISCO SYSTEMS, INC.", "005015": "BRIGHT STAR ENGINEERING", "005016": "SST/WOODHEAD INDUSTRIES", "005017": "RSR S.R.L.", "005018": "AMIT, Inc.", "005019": "SPRING TIDE NETWORKS, INC.", "00501A": "IQinVision", "00501B": "ABL CANADA, INC.", "00501C": "JATOM SYSTEMS, INC.", ...
in ds_rows: del row.values[col_index] del row.caveats[col_index] self.add_delta(id=VIZUAL_DELETE_COLUMN, column=col_index) def get_column(self, name: Any) -> Optional[DatasetColumn]: """Get the fist column in the dataset schema that matches the given name. If no column matches the given name None is returned. "...
if a string column happens to be an ID column ####### #### DO NOT Add this to ID_VARS yet. It will be done later.. Dont change it easily... #### Category DTYPE vars are very special = they can be left as is and not disturbed in Python. ### var_df['dcat'] = var_df.apply(lambda x: 1 if str(x['type_of_column'])=='ca...
<reponame>petrpavlu/storepass # Copyright (C) 2019-2020 <NAME> <<EMAIL>> # SPDX-License-Identifier: MIT """StorePass command-line interface.""" import argparse import getpass import logging import os import sys import storepass.exc import storepass.model import storepass.storage import storepass.utils from storepass...
from typing import Any, Union from prefect import Task from prefect.engine.signals import FAIL from prefect.utilities.tasks import defaults_from_attrs class CreateContainer(Task): """ Task for creating a Docker container and optionally running a command. Note that all initialization arguments can optionally be pr...
<filename>flopy/modflow/mf.py """ mf module. Contains the ModflowGlobal, ModflowList, and Modflow classes. """ import os import flopy from inspect import getfullargspec from ..mbase import BaseModel from ..pakbase import Package from ..utils import mfreadnam from ..discretization.structuredgrid import StructuredGrid...
**kwargs): pass def MDGContext_swigregister(*args, **kwargs): pass def MFnNurbsSurface_numNonZeroSpansInV(*args, **kwargs): pass def MFnNurbsCurve_findParamFromLength(*args, **kwargs): pass def MItSubdVertex_className(*args, **kwargs): pass def MFnMesh_swigregister(*args, **kwargs): pass def MFnMesh_e...
type %s when expected time" % t_value) elif value_type == "datetime": if isinstance(value, datetime.datetime): return value else: raise DataTableException("Wrong type %s when expected datetime" % t_value) # If we got here, it means the given value_type was not one of the # supported types. raise DataTableExce...
"fields": [ { "ctype": { "Klass": "CtypesSimple", "errors": [], "longs": 0, "name": "int", "signed": True, }, "name": "a", }, { "ctype": { "Klass": "CtypesSimple", "errors": [], "longs": 0, "name": "char", "signed": True, }, "name": "b", }, { "ctype": { "Klass": "CtypesSimple", "errors": [], "l...
not in local_var_params or # noqa: E501 local_var_params['username'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `username` when calling `remove_project_member`") # noqa: E501 # verify the required parameter 'id' is set if self.api_client.client_side_validation and ('id' not in local_...
: array_like Frequency values to evaluate at. reuse_spline : bool, optional Does nothing for analytic beams. Here for compatibility with UVBeam. Returns ------- interp_data : array_like Array of beam values, shape (Naxes_vec, Nspws, Nfeeds or Npols, Nfreqs or freq_array.size if freq_array is passed, Npixels/(...
1.0,Opti_all = 1,Surf_margin = 0) # setting quadratic overdose qod = self.modify_qod_551(Dose = int(item[2]+1.5),RMS = 0.25,Shrink_margin = 0,Opti_all = 0) # combine them together target = target + part2 + tar_pen[:-1] + qod[:-1] target.append('!END\n') else: ## external target part2[1] = ' na...
' '<button type="submit" name="restexplorerop" ' 'value="delete" formaction="{0}">delete' '</button>').format(self.href, self.rel, extension) else: return '<a href="{0}{1}" rel="{0}">{0}{1}</a>'.format(self.href, extension) # TODO(jjohnson2): enhance the following to support expressions: # InputNetworkConfigura...
<reponame>raalesir/private_swedish_mind<gh_stars>1-10 """ The main file for the package ============================== """ import geopandas as gpd import pandas as pd from shapely.geometry import Point from geovoronoi import voronoi_regions_from_coords, points_to_coords import matplotlib.pyplot as plt import numpy as...
str is required" ) if not isinstance(value, str): raise TypeError( f"{node} has {type(value).__name__} in env value for {key} when str is required" ) res = { "edges": [], "nodes": [], "images": self.repo.images, "token": self.token, "autorun": self._autorun, "sleep_when_done": self._sleep_when_done, } qu...