input
stringlengths
2.65k
237k
output
stringclasses
1 value
""" inputgen class Create an APBS input file using psize data Written by <NAME> based on original sed script by <NAME> ---------------------------- Version: $Id$ ---------------------------- """ # User - Definable Variables: Default values # cfac = 1.7 # Factor by which to expand mol dims to # get coarse g...
<gh_stars>0 #!/usr/bin/env python # - - - - - - - - - - - - - - - - - - - - - # # Filename : Study.py # Purpose : class Study # Date created : Wed 16 Oct 2019 09:50:10 AM MDT # Created by : ck # Last modified : Thu 24 Oct 2019 07:16:17 AM MDT # Modified by : ck # - - - - - - - - - - - - - - - - - - - - - # # Baselin...
from db :param id: id of the cluster to delete :return: True or False """ logger.debug("Delete cluster: id={} from release records.".format(id)) self.col_released.find_one_and_delete({"id": id}) return True def apply_cluster(self, user_id, condition={}, allow_multiple=False): """ Apply a cluster for a user ...
This is the case where "parameters" correctly corresponds to optimize.in prmflag = 1 if prmfnm is None or val0 in prms or val0[:-4] in prms: out.append(line1) continue else: logger.info(line + '\n') warn_press_key("The above line was found in %s, but we expected something like 'parameters %s'; replacing." % (lin...
<reponame>valerioda/pygama<filename>pygama/io/digitizers.py import sys import array import itertools import numpy as np import pandas as pd from scipy import signal import matplotlib.pyplot as plt from pprint import pprint from .io_base import DataTaker from .waveform import Waveform """ FIXME: these variables should...
100.0 to 100.0001 because the int function # would chop off an additional value of 1 for some reason... if continuous: metrics = cont_metrics() else: metrics = [(1, 10), (2, 25), (3, 50), (4, 100), (5, int(x*100.0001)), (6, int(x*1.0001)), (7, int(x*5.0001)), (8, int(x*10.0001)), (9, int(x*50.0001)), (10, int(x*...
(105, "Dr. <NAME>", 44, 7839478943, "Surgeon", "MBBS"), (106, "Dr. <NAME>", 46, 9173826433, "Orthopaedics", "MBBS"), (107, "Dr. <NAME>", 30, 9485757483, "Cardiologists", "MBBS"), (108, "Dr. Unnikrishnan", 23, 9876346843, "Osteopathologist", "MBBS DO Phd M.D"), (109, "Dr. Batra", 32, 9874758843, "Radiologist", "MBBS...
el valor por defecto para el campo. @return Valor que se asigna por defecto al campo """ def defaultValue(self): if self.d.defaultValue_ in (None, "null"): self.d.defaultValue_ = None if self.d.type_ in ("bool", "unlock") and isinstance(self.d.defaultValue_, str): return (self.d.defaultValue_ == "true") ret...
""" if name in self._api_objects: existing = self._api_objects[name] if existing.type is not type_: raise TypeError("Type {} does not match type {} of existing API object with same name" .format(type_, existing.type)) return existing else: api_object = WebApiObject(type_, name) self._api_objects[name] = api_ob...
the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating "north". """ _schema = {'$ref': '#/definitions/MarkConfig'} _rootschema = Root._schema ...
""" Copyright (c) 2017 Dependable Systems Laboratory, EPFL Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,...
<reponame>lium-lst/nmtpy<filename>nmtpy/models/basefnmt.py # -*- coding: utf-8 -*- # Python from collections import OrderedDict, defaultdict import tempfile import os # 3rd party import numpy as np import theano import theano.tensor as tensor # Ours from ..layers import * from ..defaults import INT, FLOAT from ..nm...
<filename>tests/query_execution/test_query_execution_service.py # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ----...
<gh_stars>1-10 import numpy as np from warnings import warn # from Utilities import timer from Utility import timer from sklearn.model_selection import GridSearchCV from sklearn.pipeline import Pipeline from sklearn.feature_selection import VarianceThreshold, SelectFromModel from sklearn.preprocessing import MaxAbsScal...
<filename>contextual-repr-analysis/contexteval/models/selective_regressor.py import logging from typing import Dict, List, Optional, Union from overrides import overrides import torch from allennlp.common import Params from allennlp.common.checks import check_dimensions_match, ConfigurationError from allennlp.common....
from collections import UserDict from datetime import datetime, date, timedelta from faker import Faker import re class Note(UserDict): """ FOR JUST IN CASE def __init__(self, data=None): super(Note, self).__init__() self[datetime.now().strftime('%Y-%m-%d %H:%M:%S')] = data """ def add_note(se...
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
val in _np.ndenumerate(all_indices) if val==ii))[0] for ii in tmp_indices] output = item.atoms_dataframe['component_index'][right_locs].to_numpy() return output def get_component_id_from_group (item, indices='all', check=True): if check: _digest_item(item, _form) indices = _digest_indices(indices) tmp_indices...
from tqdm import tqdm import warnings import scipy as scp from scipy.sparse import csr_matrix, issparse from sklearn.decomposition import PCA from sklearn.utils import sparsefuncs from .Markov import * from .connectivity import extract_indices_dist_from_graph from .topography import VectorField from .vector_calculus im...
<reponame>josephmje/sdcflows # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: r""" Processing phase-difference and *directly measured* :math:`B_0` maps. Theory ~~~~~~ The displacement suffered by every voxel along the phase-encoding (PE) direction can be...
<gh_stars>0 # Standard Library import from functools import wraps from os import makedirs, path from pathlib import Path from shutil import copy, copyfile, rmtree from textwrap import dedent from typing import List # Local import from trackeval.eval import Evaluator from trackeval import datasets, metrics from trackev...
label. Create a sitkImage of the labelled region of the image, cropped to have a cuboid shape equal to the ijk boundaries of the label. :param boundingBox: The bounding box used to crop the image. This is the bounding box as returned by :py:func:`checkMask`. :param label: [1], value of the label, onto which the ...
<reponame>robertmuth/Cwerg #!/usr/bin/python3 """ ARM 64bit assembler + disassembler + side-effects table """ from Util import cgen from typing import List, Dict, Tuple, Optional import collections import dataclasses import enum import re import sys _DEBUG = False # Maximum number of operands an opcode can have. W...
#!/usr/bin/env python # COPYRIGHT 2007 BY BBN TECHNOLOGIES CORP. # BY USING THIS SOFTWARE THE USER EXPRESSLY AGREES: (1) TO BE BOUND BY # THE TERMS OF THIS AGREEMENT; (2) THAT YOU ARE AUTHORIZED TO AGREE TO # THESE TERMS ON BEHALF OF YOURSELF AND YOUR ORGANIZATION; (3) IF YOU OR # YOUR ORGANIZATION DO NOT AGREE WITH ...
#!/usr/bin/env python # coding: utf-8 # # Crypto Currency Analysis # # Crpytocurrency exchanges are websites that enable the purchase, sale, and exchange of crypto and traditional currencies. These exchanges serve the essential functions of providing liquidity for owners and establishing the relative of these currenc...
<filename>src/python/zensols/cli/harness.py """Main entry point for applications that use the :mod:`.app` API. """ __author__ = '<NAME>' from typing import List, Dict, Any, Union, Type, Optional, Tuple from dataclasses import dataclass, field import sys import os import logging import inspect from io import TextIOBas...
DBImport configuration database") raise(e) except KeyError: pass logging.debug("Executing import_config.saveIndexData() - Finished") def saveKeyData(self, ): # This is one of the main functions when it comes to source system schemas. This will parse the output from the Python Schema Program # and up...
200000000000000000000), ("0x7b761feb7fcfa7ded1f0eb058f4a600bf3a708cb", 4600000000000000000000), ("0x5435c6c1793317d32ce13bba4c4ffeb973b78adc", 250070000000000000000), ("0xdd04eee74e0bf30c3f8d6c2c7f52e0519210df93", 80000000000000000000), ("0x4331ab3747d35720a9d8ca25165cd285acd4bda8", 2000000000000000000000), ("0xb8...
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import dace from dace.transformation import transformation from dace.transformation.interstate import StateFusion import networkx as nx import numpy as np # Inter-state condition tests def test_fuse_assignments(): """ Two states in which th...
by lab', 'submission in progress', 'planned'] res = submitter_testapp.post_json('/experiment_hi_c', expt_w_cont_lab_item, status=201) for status in statuses: wrangler_testapp.patch_json(res.json['@graph'][0]['@id'], {"status": status}, status=200) remc_member_testapp.patch_json(res.json['@graph'][0]['@id'], {'sex':...
""" pyrad.io.read_data_cosmo ======================== Functions for reading COSMO data .. autosummary:: :toctree: generated/ cosmo2radar_data cosmo2radar_coord get_cosmo_fields read_cosmo_data read_cosmo_coord _ncvar_to_dict _prepare_for_interpolation _put_radar_in_swiss_coord """ from warnings import wa...
raeting.StackError as ex: console.terse(str(ex) + '\n') self.stack.incStat(self.statKey()) return emsg = ("Joinent {0}. Added new remote name='{1}' nuid='{2}' fuid='{3}' " "ha='{4}' role='{5}'\n".format(self.stack.name, self.remote.name, self.remote.nuid, self.remote.fuid, self.remote.ha, self.remote.role)) ...
total_paid }) print('sdasdadsadasdasda', args) payment_system_info = { 'admission_date': args[1].admission_date, 'monthly_fee': class_object.fee, } context = { 'payment_system_info': payment_system_info, 'payment_system': payment_system } return context def add_zero_to_month(month): if...
<filename>hplip-3.20.3/base/status.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) Copyright 2003-2015 HP Development Company, L.P. # # 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; eit...
# By <NAME> # Imports import getpass import psycopg2 import pandas as pd import numpy as np import json import datetime import argparse import scipy.stats as scistats import matplotlib.pyplot as plt from urllib.error import URLError, HTTPError from urllib.request import urlopen import readfile # EIA API query to get ...
<reponame>Moses-Projects/control-raspi<filename>pi_control/device.py<gh_stars>0 print("Loaded pi_control device module") import adafruit_drv2605 import board import boto3 import busio import gpiozero import json import os import random import re import threading import time import pi_control.__init__ """ 2021-12-30 ...
<filename>fury/primitive.py """Module dedicated for basic primitive.""" from os.path import join as pjoin from distutils.version import LooseVersion import numpy as np from fury.data import DATA_DIR from fury.transform import cart2sphere from fury.utils import fix_winding_order from scipy.spatial import ConvexHull, tra...
# Somewhere around Bangor location.lat = '44.8011' # Longitude doesn't really matter location.long = '-68.7783' sun = ephem.Sun() return location, sun @property def maturity_sunlight_duration(self): """ Compute the number of sunlight hours between C{self.beginning_of_season} and a date falling C{self.matur...
from collections.abc import Iterable from copy import deepcopy import gc import networkx as nx import numba from numba import jit import numpy as np import os import pandas as pd from scipy import sparse from sklearn.decomposition import TruncatedSVD import time import warnings from csrgraph.methods import ( _row_nor...
lin_expr=[[[15*N + i for i in range(strategiesSize)], \ [1.0]*strategiesSize]], \ senses=['E'], \ rhs=[1.0], \ names=['r']) #Equation 4 from Appendix LP. #qe >= 0 constraint for i in range(15*N + strategiesSize): cpx.linear_constraints.add(lin_expr=[[[i], [1]]], \ senses=['G'], \ rhs=[0.0]) else: #Equatio...
3-9'): ", dcc.Input(id='input-box-filter-by-run-id', type='text') ] ), html.Div( ["Graph selection: ", dcc.Dropdown(id='dropdown-graph-select', options=m_dcc_dropdown, value=m_dcc_dropdown[0]['value'], clearable=False, searchable=False) ] ) ]), html.Div( id="div-graphs-area", children=m_dcc_graphs ), html.Div( ...
<reponame>turkeydonkey/nzmath3 import nzmath.ring as ring import nzmath.vector as vector from functools import reduce class Matrix(object): """ Matrix is a class for matrices. """ def __init__(self, row, column, compo=0, coeff_ring=0): """ Matrix(row, column [,components, coeff_ring]) """ self._initialize(...
'I,Length', 'B,Unicode', 'B,Reserved1', 'H,Reserved2']] dbg_type_partial = self.__unpack_data__( ___IMAGE_DEBUG_MISC_format__, dbg_type_data, dbg_type_offset) # Need to check that dbg_type_partial contains a correctly unpacked data # structure, as the malware sample with the following hash # MD5: 5e7d6707d69...
<gh_stars>0 import warnings import numpy as np import pandas as pd from sklearn.cluster import AgglomerativeClustering from sklearn.tree import DecisionTreeClassifier from sklearn.tree import _tree from typing import Union, List, Dict from skorecard.bucketers.base_bucketer import BaseBucketer from skorecard.bucket_ma...
import numpy as np class Main: # SETUP def __init__(self): # each player is assigned a number: 1 or -1 # 0 means that no player has been assigned the value # Player_1 goes first self.turn = 1 # whose turn is it? # 1 -> player 1 # -1 -> player -1 self.result = 0 # what is the result of the game? # 0 -> u...
not slot: slot = None # Awful hack around the convention that src slot can be blank and a bmc # is noted by port 3 when there is physically one port. # NOTE: This is required for the port to get fixed. if is_src_slot: if sheet == "HMN" and slot is None: warnings["shcd_slot_data"].append(f"{sheet}:{cell.coordinat...
output=None): """ Parameters ---------- func: function The function being decorated. inputs: dict Dictionary of bound arguments passed to the function being decorated with @callbacks. output: any Callbacks to be executed after the function call can pass the function output to the callback. The default None v...
<filename>gen/internals.py import copy import enum import inspect import logging from contextlib import contextmanager from functools import partial, partialmethod from typing import Any, Callable, Dict, List, Set, Tuple, Union from gen.exceptions import ValidationError from pkgpanda.util import hash_checkout log = ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ###################################################################### # gr-sweepsense Python Library # Version: 1.0 # # Description: This library contains python code to interface # with SweepSense USRPs. Composed of multiple GNURadio flowgraphs # perform various functio...
from . import matcher import matplotlib.pyplot as plt import matplotlib.colors as clrs from scipy import stats import numpy as np import umap import seaborn as sns import matplotlib.patches as mpatches def pearsonMatrix(dataset_filtered, patterns_filtered, cellTypeColumnName, num_cell_types, projectionName, plotName,...
import argparse import functools import json import os import random import math import multiprocessing as mp import datasets import numpy as np import textattack import torch import tqdm import transformers from lime.lime_text import LimeTextExplainer, IndexedString from configs import DATASET_CONFIGS NUM_SAMPLES_...
Cl, Br, I, N, P, O, S, and not for conjugated systems or adjacent to a double bond. ", ), ( "jp_log", "JPlogPDescriptor", 1, "log P model based on atom contributions. " "https://doi.org/10.1186/s13321-018-0316-5", ), ( "kappa_shape_indices", "KappaShapeIndicesDescriptor", 3, "Kier and Hall kappa molecular ...
NAvalue(self): return rinterface.NA_Integer def __init__(self, obj): obj = IntSexpVector(obj) super(IntVector, self).__init__(obj) def repr_format_elt(self, elt, max_width = 8): return '{:,}'.format(elt) def tabulate(self, nbins = None): """ Like the R function tabulate, count the number of times integer v...
model model.save(dirpath) # Create the temporary zip-file. mem_zip = BytesIO() with zipfile.ZipFile(mem_zip, "w", zipfile.ZIP_DEFLATED, compresslevel=9) as zf: # Zip the directory. for root, dirs, files in os.walk(dirpath): for file in files: rel_dir = os.path.relpath(root, dirpath) zf.write(os.path.join(root...
<gh_stars>0 # Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. from __future__ import absolute_import from gevent import spawn, sleep, socket import msgpack import time import hmac import hashlib import base64...
from classData import CatColM from classConstraints import Constraints from classCharbon import CharbonGreedy from classExtension import Extension from classSParts import SParts, tool_ratio from classQuery import * import numpy import pdb class CharbonGStd(CharbonGreedy): name = "GreedyStd" def getCandidates(self...
<reponame>bartfrenk/streamingbandit<filename>app/libs/base.py import numpy as np import random #import json #from scipy.optimize import minimize_scalar class __strmBase(object): """ A streamingbandit base class. Use this skeleton to implement classes that represent online/sequential variants of estimators. .. not...
Error :raise: :class:`com.vmware.vapi.std.errors_client.ConcurrentChange` Conflict :raise: :class:`com.vmware.vapi.std.errors_client.Unauthorized` Forbidden :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` Not Found """ return self._invoke('start', None) def stop(self): """ Restart, start or s...
# -*- encoding: utf-8 -*- # """迅搜(xunsearch) Python SDK封装 Python version of xunsearchd client (Python API) """ __author__ = 'qaulau' import os import re import sys import math import select import hashlib from struct import pack, unpack from collections import namedtuple, OrderedDict import socket...
<reponame>williamjameshandley/high-dimensional-sampling from abc import ABC, abstractmethod import numpy as np import pandas as pd from scipy import special, stats from .utils import get_time class TestFunction(ABC): """ Abstract base class for test functions This class forms the basis for all testfunctions imple...
= 1 - gious else: raise NotImplementedError if self.box_quality == 'ctrness': loss_box_reg = loss_box_reg * gt_centerness[foreground_idxs].view(loss_box_reg.size()) loss_box_reg = loss_box_reg.sum() / max(1.0, num_targets) # centerness loss loss_centerness = F.binary_cross_entropy_with_logits( pred_centernes...
<filename>merlion/models/anomaly/base.py<gh_stars>1000+ # # Copyright (c) 2022 salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause # """ Base class for anomaly detectors. """ fr...
# -*- coding: utf-8 -*- from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt from tkinter import filedialog from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure from scipy.interpolate import make_interp_spline, BSpline from mpldatacurso...
<filename>src/service_collection/servicecollection.py import argparse import inspect import copy from abc import ABCMeta, abstractmethod from types import FunctionType from typing import Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union, cast from functools import wraps from .serviceconfiguration import...
<reponame>Astech34/pymms import numpy as np import datetime as dt import spacepy from spacepy import pycdf import pandas as pd from pandas import DataFrame, Series import matplotlib.pyplot as plt import matplotlib.dates as mdates import os.path import pymms from pymms import mms_utils import pdb ## Creating the pymms ...
<gh_stars>1-10 ''' Created on Feb. 9, 2020 @author: cefect ''' #========================================================================== # logger setup----------------------- #========================================================================== import logging, configparser, datetime start = datetime.datetime....
<filename>order_fulfillment/order_fulfillment_multi_item.py # This code contains all heuristics for multi-item orders, namely LSC, SPS and Greedy. # It takes the data as input and returns the cost and store assignment as output. import itertools from functools import reduce import operator from pyomo.environ import * ...
default: True A parameter for the antigrain image resize filter (see the antigrain documentation). If filternorm is set, the filter normalizes integer values and corrects the rounding errors. It doesn't do anything with the source floating point values, it corrects only integers according to the rule of 1.0 ...
import sys import re from enum import Enum from alnitak import prog as Prog from alnitak import exceptions as Except from alnitak import config from alnitak import datafile from alnitak import printrecord from alnitak import dane from alnitak import logging def print_check(prog, pos, flag_name, input): """Parse i...
<filename>sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/models.py # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ # pylint: disable=too-many-lines,too-many-public-methods from ._shared import p...
#!/usr/bin/python __author__ = "<NAME>" __copyright__ = "Copyright 2013, MetaPathways" __credits__ = ["r"] __version__ = "1.0" __maintainer__ = "<NAME>" __status__ = "Release" try: import optparse import csv from os import makedirs, path, listdir, remove, rename import shutil import traceback import sys import...
# -*- coding: utf-8 -*- # Copyright 2013 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...
<reponame>zhangtaolab/Chorus2<gh_stars>10-100 import argparse import sys from Choruslib import bwa from Choruslib import jellyfish from Choruslib import prefilter, primer3_filter, spgenome import os from multiprocessing import Pool from math import log from pyfasta import Fasta def main(): args = check_options(get_...
<< 2, bitOffset = 6, mode = mode, name = 'RX_XCLK_SEL', bitSize = 1, enum = { 0: 'RXREC', 1: 'RXUSR'})) self.add(pr.RemoteVariable( offset = [0x05B << 2, 0x05C <<2], bitOffset = [0, 0], bitSize = [16, 8], mode = mode, name = 'CPLL_INIT_CFG')) self.add(pr.RemoteVariable( offset = [0x05C << 2, 0x05D <<...
<reponame>Tiger767/Hackathon-LunarLanderV2 """ Author: <NAME> Version: 1_4_2020-Modified """ import os from datetime import datetime from time import sleep from collections import deque import h5py import numpy as np import tensorflow as tf import tensorflow.keras.backend as K from tensorflow import keras from tenso...
for i in autoscaling_group_instances] for i in autoscaling_group_instances: instance_facts[i['InstanceId']] = { 'health_status': i['HealthStatus'], 'lifecycle_state': i['LifecycleState'] } if 'LaunchConfigurationName' in i: instance_facts[i['InstanceId']]['launch_config_name'] = i['LaunchConfigurationName'] eli...
""" ================== gprof_nn.retrieval ================== This module contains classes and functionality that drive the execution of the retrieval. """ import logging import math import subprocess from tempfile import TemporaryDirectory from pathlib import Path import numpy as np import xarray as xr import torch ...
import numpy as np import os import cPickle as pickle import rayPooling import sys import camera from plyfile import PlyData, PlyElement def dense2sparse(prediction, rgb, param, viewPair, min_prob = 0.5, rayPool_thresh = 0, \ enable_centerCrop = False, cube_Dcenter = None, \ enable_rayPooling = False, cameraPOs = No...
argument.\n' '\n' ' run(statement[, globals[, locals]])\n' ' runeval(expression[, globals[, locals]])\n' ' runcall(function[, argument, ...])\n' ' set_trace()\n' '\n' ' See the documentation for the functions explained above.\n', 'del': '\n' 'The "del" statement\n' '*******************\n' '\n' '...
<reponame>rpgoldman/owlery-client<filename>owlery_client/api/sparql_api.py """ Owlery API Owlery provides a web API for an [OWL API](http://owlapi.sourceforge.net)-based reasoner containing a configurable set of ontologies (a \"knowledgebase\"). # noqa: E501 The version of the OpenAPI document: 1.0.0 Contact: <EM...
<reponame>ad1b003/Ethan-A-Programming-Language<filename>transpiler_en.py<gh_stars>0 # Transpiler for scripting language : Ethan # Imports import re # Tokens Type __INT__ = { 'name': 'int32', 'type' : 'int', 'range' : range(-2147483648, 2147483648), 'specifier' : '%d' } __LONG__ = { 'name': 'int6...
import io import os import logging import tkinter as tk import tkinter.ttk as ttk import tkinter.filedialog as filedialog import tkinter.messagebox as tkmessagebox import libs.CFCrypto as CFCrypto import libs.CFCryptoX as CFCryptoX from libs.CFCanvas import CFCanvas from libs.Util import set_combobox_item from libs.Uti...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018 Fetch.AI Limited # # 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 # ...
with minOccurs=0, maxOccurs=absent, content=sequence (a,b), and the instant XML has no element """ assert_bindings( schema="msData/particles/particlesEb001.xsd", instance="msData/particles/particlesEb001.xml", class_name="Doc", version="1.1", mode=mode, save_output=save_output, output_format=output_format, ...
import HeartValveLib from __main__ import vtk, qt, ctk, slicer import logging # Dictionary that stores a ValveModel Python object for each MRML node in the scene. # These Python objects are shared between multiple modules. ValveModels = {} CardiacFourUpViewLayoutId = 1512 CardiacEightUpViewLayoutId = 1513 HeartOrien...
util.excute_command("ls /etc/swift/ |grep \"ring.gz\|swift.conf\"") if result : parser = result.split('\n') parser = filter(lambda x: x, parser) return parser except Exception as ex: logger.exception("get_rings function excute exception:" + str(ex)) def get_ring_file_md5(self, ring_gz_name): ''' 根据文件名计算文件内容...
<filename>aas_core_codegen/jsonschema/main.py """Generate JSON schema corresponding to the meta-model.""" import collections import json from typing import ( TextIO, Any, MutableMapping, Optional, Tuple, List, Sequence, Mapping, Set, ) from icontract import ensure from aas_core_codegen import ( naming, spe...
-> Optional[pulumi.Input[str]]: return pulumi.get(self, "completed") @completed.setter def completed(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "completed", value) @property @pulumi.getter(name="containsUpdate") def contains_update(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self...
else: gl = "ndos-x" values["original"] = oldv values["grammatical"] = "NP_direct_object" elif pn in objects["direct"]: oldv = values["grammatical"] if oldv != "direct_object": gl = "dos" values["original"] = oldv values["grammatical"] = "direct_object" elif pn in objects["L"]: oldv = values["grammatical"] g...
# Copyright (c) 2017 The Regents of the University of Michigan. # All rights reserved. # This software is licensed under the BSD 3-Clause License. """Job class defined here.""" import errno import logging import os import shutil from copy import deepcopy from deprecation import deprecated from ..core import json fro...
<reponame>hrrsjeong/METEORE from sklearn.linear_model import RidgeCV #from skleanr.linear_model import Ridge, LinearRegression, SGDRegressor,\ # ElasticNet, Lars, Lasso, ARDRegression, BayesianRidge, HuberRegressor,\ # PoissonRegressor, PassiveAggressiveRegressor #from sklearn.svm import LinearSVR #from sklearn.ensembl...
<filename>python_numpy.py<gh_stars>0 # ndarray is faster than the list # bc it stores in one continuous memory and utiize the lateset CPU architecture # import numpy as np # arr = np.array([1, 2, 3, 4, 5]) # print(arr) # print(np.__version__) import requests r = requests.get("http://google.com") print(r...
<reponame>aatrani/amuse<filename>src/amuse/datamodel/particles.py from amuse.support.core import CompositeDictionary from amuse.support.core import compare_version_strings from amuse.support import exceptions from amuse.datamodel.base import * from amuse.datamodel import base from amuse.datamodel.memory_storage import ...
"yes for 2!" ) if (-3): print( "yes for -3!" ) if (.4): print( "yes for .4!" ) # ### Lists # Lists (or also known as Arrays) are exactly that. A list of data. # # There are two options for creating a *List*. # # 1. Define the list initially # In[42]: groceryList = ["apple", "banana", "eggs"] print( grocer...
= cr2 = layout.color(right_id) # Color the node and everything beneath it. Don't color the # lines on top of the node. The exception is if there's only # a single leaf in the cluster, then color the bottom-most if cl1 != cr1: cl1 = cr1 = (0, 0, 0) if left_id < 0: cl2 = (0, 0, 0) if right_id < 0: cr2 = (0, 0, 0...
const [] Bp, npy_int32 const [] Bj, unsigned char const [] Bx, npy_int32 [] Cp, npy_int32 [] Cj, unsigned char [] Cx) csr_elmul_csr(npy_int32 const n_row, npy_int32 const n_col, npy_int32 const [] Ap, npy_int32 const [] Aj, short const [] Ax, npy_int32 const [] Bp, npy_int32 const [] Bj, short const [] Bx, npy_i...
made? error (str): The error encountered, if any. log (dict): The new log entry, if updated. """ tbl_res = get_dmo_table("sub_log") if not tbl_res["success"]: return tbl_res table = tbl_res["table"] # Get old log old_log = read_table("sub_log", source_id) if not old_log["success"]: return old_log log = old_...
<gh_stars>1-10 # Copyright 2020 - 2021 MONAI Consortium # 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...
['visitors_engagement', 'visitors_outstay', 'shop_bored', 'shop_concentrating', 'smoke_cig', 'smoke_food', 'friend_helpful', 'friend_moreoften', 'jolt_dream', 'jolt_wind', 'party_hear', 'party_preoccupied', 'urgent_bill', 'urgent_junk'] if e in BBSIQ_dict: if item in BBSIQ_dict[e]: physical_value_list = [] non_p...
<reponame>Guiadan/baselines_new<gh_stars>0 import cvxpy as cvx from datetime import datetime from random import shuffle import numpy as np from tqdm import tqdm import tensorflow as tf def information_transfer_new(phiphiT, dqn_feat, target_dqn_feat, replay_buffer, batch_size, num_actions, feat_dim, sdp_ops): d = [[]...