input
stringlengths
2.65k
237k
output
stringclasses
1 value
for n in boundPropNames: opts.addListener(n, self.name, self.__boundsOptsChanged) for n in infoPropNames: opts.addListener(n, self.name, self.__infoOptsChanged) # Enable the volume widget if the # overlay is a NIFTI image with more # than three dimensions, and bind # the widget to the volume property # of the ...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2018 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
Initialize all valid properties. :raises: FHIRValidationError on validation errors, unless strict is False :param dict jsondict: A JSON dictionary to use for initialization :param bool strict: If True (the default), invalid variables will raise a TypeError """ self.documentation = None """ A d d i t i ...
<gh_stars>1-10 #!/usr/bin/env python3 """FabTools: Tools for Fab.. This is a package provides classes used to define the tooling that is available in a shop. They basically define some classes that interface with the FreeCAD Path Tools infrastructure. The "new" FreeCAD Path Tools infrastructure organizes everything in...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: <NAME>, PhD, MSB, BCBA-D https://www.researchgate.net/profile/David_Cox26 twitter: @davidjcox_ LinkedIn: https://www.linkedin.com/in/coxdavidj/ Website: https://davidjcox.xyz """ #Set current working directory to the folder that contains your data. impor...
self.firstSigmaSliderYX.setSingleStep(0.5) self.firstSigmaSliderYX.setTickInterval(10) self.firstSigmaSliderZ = widgets.sliderWithSpinBox( isFloat=True, title='Sigma Z-direction: ', title_loc='in_line' ) self.firstSigmaSliderZ.setTickPosition(QSlider.TicksBelow) self.firstSigmaSliderZ.setSingleStep(0.5) self.fi...
<gh_stars>0 ''' tags ==== The following methods allow for interaction into the Tenable.io :devportal:`tagging <tags>` API endpoints. Methods available on ``tio.tags``: .. rst-class:: hide-signature .. autoclass:: TagsAPI .. automethod:: create .. automethod:: create_category .. automethod:: delete .. automethod...
""" Calculations iodine emissions with updated iodide field """ import numpy as np import pandas as pd import xarray as xr import sparse2spatial.utils as utils # import AC_tools (https://github.com/tsherwen/AC_tools.git) import AC_tools as AC def compare_emissions(wd_dict=None, inorg_emiss=None, specs=None): """ C...
import seaborn as sns import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import test_rnn_realtime as net import seaborn as sns import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import test_rnn_realtime as net import traning as tr...
import copy import functools import json import os import pathlib import re import urllib.parse from collections import deque from contextlib import contextmanager from datetime import datetime from inspect import getframeinfo, stack from itertools import chain from os.path import abspath from pathlib import Path from ...
buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('_derived', node) if value is not None and '_derived' not in already_processed: already_processed.add('_derived') self._derived = value value = find_attr_value_('_real_archetype', node) if value is not None and '_real_archetype'...
<filename>models/hierarchical_bias/hf_translation.py from dataclasses import dataclass, field import itertools import json import logging import os from typing import Optional from argparse import Namespace from omegaconf import II from fairseq.dataclass import ChoiceEnum, FairseqDataclass from fairseq.tasks import Fa...
'R') : 'DR2', (6, 27, 'F', 'D') : 'DF0', (6, 27, 'F', 'L') : 'LF0', (6, 27, 'F', 'R') : 'RF0', (6, 27, 'F', 'U') : 'UF0', (6, 27, 'L', 'B') : 'LB2', (6, 27, 'L', 'D') : 'DL0', (6, 27, 'L', 'F') : 'LF2', (6, 27, 'L', 'U') : 'UL0', (6, 27, 'R', 'B') : 'RB2', (6, 27, 'R', 'D') : 'DR0', (6, 27, 'R', 'F') : 'RF2'...
with open(html_name, 'rt', encoding='utf-8') as f: html0 = f.read() if html == html0: return None with open(html_name, 'wt', encoding='utf-8') as f: f.write(html) return None else: return html GALLERYCALL = """ $('#%s').photobox('a', { loop:%s, thumbs:%s, autoplay:%s, time:%d, zoomable:%s , rotatable:%s, whee...
use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: UsageLogsResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_htt...
str.split(".")) return str ## Add a parent version def AddVersionParent(version, parent): parentMap[version].add(parent) def GetVersionProps(version): """Get version properties This function is a fixed version of GetVersion(). """ ns = nsMap[version] versionId = versionIdMap[version] isLegacy = versionMap.g...
<gh_stars>1-10 import copy import math from typing import * import yodel.globaldat as globaldat def typeManagment(data: Any) -> bytearray: ''' Take in any type, and turn it into a bytearray ''' dtype = type(data) if dtype == str: return(bytearray(data.encode(encoding='UTF-8', errors='strict'))) elif dtype == ...
incep2_4_0 = self.conv2dplusrelu(concat2_3, filter2_4_0, "NCHW", "SAME", 1, 1) # branch 1 incep2_4_1a = self.conv2dplusrelu(concat2_3, filter2_4_1a, "NCHW", "SAME", 1, 1) incep2_4_1b = self.conv2dplusrelu(incep2_4_1a, filter2_4_1b, "NCHW", "SAME", 1, 1) incep2_4_1 = self.conv2dplusrelu(incep2_4_1b, filter2_4_1c, "N...
test_warn_if_multiple_augmenters_with_same_name(self): source = iaa.Sequential([iaa.Fliplr(0.5, name="hflip"), iaa.Fliplr(0.5, name="hflip")]) target = iaa.Sequential([iaa.Fliplr(0.5, name="hflip")]) source.localize_random_state_() with warnings.catch_warnings(record=True) as caught_warnings: warnings.simplefilte...
kwargs.get('outfunc', self.outfunc) nkwargs['dbname'] = kwargs.get('dbname', self.dbname) nkwargs['dbkey'] = kwargs.get('dbkey', self.dbkey) nkwargs['datatype'] = kwargs.get('datatype', self.datatype) nkwargs['dtype'] = kwargs.get('dtype', drsfile.dtype) nkwargs['shape'] = kwargs.get('shape', drsfile.shape) nkwar...
= request.GET or request.POST params = {param.upper(): value for param, value in query.items()} # 900913 is deprecated if params.get('SRS') == 'EPSG:900913': params['SRS'] = 'EPSG:3857' if params.get('CRS') == 'EPSG:900913': params['CRS'] = 'EPSG:3857' map_param = params.get('MAP') # As we have one QGIS proj...
in admin: if wait["lang"] == "JP": kr.sendText(msg.to,helpMessage) random.choice(AST).sendImageWithURL(msg.to, url123) random.choice(AST).sendText(msg.to,"↥↥↥↥↥↪ Owner Bots ↩↥↥↥↥↥") else: random.choice(AST).sendText(msg.to,helpMessage) #==========================[Kris]=================...
#!/usr/bin/env python ''' Test the xml input ''' import os from siconos.tests_setup import working_dir try: import pytest xfail = pytest.mark.xfail except: import py.test xfail = py.test.mark.xfail from siconos.fromXml import buildModelXML import siconos.kernel as SK import numpy as np def test_xml1(): ''' t...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.static}. """ import inspect import mimetypes import os import re import StringIO from zope.interface.verify import verifyObject from twisted.internet import abstract, interfaces from twisted.python.runtime import plat...
p = 0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff a = 0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc b = 0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b xG = 0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296 yG = 0x4fe342e2fe1a7f9b8ee7eb4a7c0f...
and ('recomputed_with' not in result or \ result['recompute_width'] in ['always','first_time']): CMS_test_threshold = 2e-2*(1.0e-4/min(result['lambdaCMS'])) else: # If the widths were not computed numerically, then the accuracy of # the cancellation should be better. CMS_test_threshold = 2e-2*(1.0e-5/min(result['...
maxweight=float(external.stdout.readline()) output = maxweight elif mode == 'full_me': me_value=float(external.stdout.readline()) output = me_value elif mode == 'unweighting': firstline=external.stdout.readline().split() try: nexternal=int(firstline[0]) trials= int(firstline[1]) BWvalue= float(firstline[2]) ...
import collections.abc from contextlib import suppress from datetime import timedelta from typing import ( TYPE_CHECKING, Any, Dict, Hashable, Iterable, Mapping, Optional, Sequence, Tuple, Union, ) import numpy as np import pandas as pd from . import formatting, utils from .indexing import ExplicitlyIndexed...
# Why: #6423 in Alexa global 'http://www.v2cigar.net/', # Why: #6424 in Alexa global 'http://www.peopleclick.com/', # Why: #6425 in Alexa global 'http://www.moudamepo.com/', # Why: #6426 in Alexa global 'http://www.baijob.com/', # Why: #6427 in Alexa global 'http://www.geni.com/', # Why: #6428 in Alexa global...
<reponame>LukasMosser/SNIST from collections import OrderedDict, namedtuple from itertools import product import sympy import numpy as np from psutil import virtual_memory from cached_property import cached_property from devito.builtins import assign from devito.cgen_utils import INT, cast_mapper from devito.data imp...
<reponame>nidhimittalhada/access_group_repo # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2015 Wipro Technologies. # 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 t...
for ProjectDocument and ProjectService to call #---------------------------------------------------------------------------- def SetProject(self, projectPath): if self._prject_browser.IsLoading: utils.get_logger().info("app is loading projects at startup ,do not load project document %s at this time",projectP...
from typing import Union, List, Dict, Set import copy import random # Class signifying one of semaphore operations wait and signal # semaphore_id : id of the semaphore on which the operation is performed # modification : when positive the operation is signal and the operation is incrementing the semaphore by modifica...
str, "Supplemental Type": None, "Restricted Value": None, "Example Value": 'a string such as "root".', "Max Length": None, "Required Character": None, }, {"Name": "esxi_hypervisor_admin_password", "Value": esxi_hypervisor_admin_password, "Configuration Section": "MODULE REQUIREMENT 3 --> HyperFlex Loc...
import torch import torch.nn as nn import torch.nn.functional as F from .dsnt import spatial_softmax2d, spatial_expectation2d from cirtorch.utils.grid import create_meshgrid, create_meshgrid3d from ..conversions import normalize_pixel_coordinates, normalize_pixel_coordinates3d from cirtorch.features.nms import nms3d f...
# SPDX-FileCopyrightText: 2006-2010 <NAME> for Adafruit Industries # SPDX-FileCopyrightText: 2019 LadyAda for Adafruit Industries # SPDX-FileCopyrightText: 2021 <NAME> for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_turtle` ========================================================================...
import time import os from threading import Lock, Thread import copy as cp import json from config.config import config from bots.botIRC import BotIRC from bots.botChess import BotChess from lib.misc import print_debug class BotHandler: """ Class to handle Bots """ # json file used by OBS to update its scenes P...
from pox.core import core from pox.lib.revent import revent import pox.openflow.libopenflow_01 as of import pox.openflow.nicira as nx from pox.openflow.discovery import Discovery from pox.lib.util import dpid_to_str from pox.lib.util import str_to_bool from pox.lib.addresses import IPAddr from pox.lib.addresses import ...
")").set_color_by_tex_to_color_map(t2c), TexMobject("\\text{DFT}", "_{\\frac{n}{2}}", "(", "\\boldsymbol{a}", "^{[1]}", ")").set_color_by_tex_to_color_map(t2c), ).arrange_submobjects(RIGHT, buff=2).next_to(old, DOWN) br = Brace(pre, UP) old.shift(UP*0.5) self.play(Write(old)) self.wait() self.play(ShowCreation(b...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
from typing import Tuple import numpy as np import gym.spaces from . import transform_utils as T from .furniture_sawyer import FurnitureSawyerEnv from .models import furniture_name2id from ..util.logger import logger class FurnitureSawyerDenseRewardEnv(FurnitureSawyerEnv): """ Sawyer environment. Here, we call a...
<reponame>cog-isa/htm-rl import numpy as np from htm.bindings.sdr import SDR from htm_rl.modules.htm.temporal_memory import ApicalBasalFeedbackTM from htm.bindings.algorithms import SpatialPooler from htm_rl.modules.basal_ganglia import BasalGanglia, DualBasalGanglia from htm_rl.modules.htm.pattern_memory import Spatia...
self.assertEqual(v.is_symbol(), True) self.assertEqual(v.value(), 'empty-list') v = mlisp.prim_type('type', [mlisp.VCons(mlisp.VNumber(42), mlisp.VEmpty())]) self.assertEqual(v.is_symbol(), True) self.assertEqual(v.value(), 'cons-list') def prim(name, args): return (args[0], args[1]) v = mlisp.prim_type('type', ...
_cl_map_1d(self, function, mat1, out=None): """Call the map_1d kernel.""" if out is None: out = mat1 out, mat1 = self._consistify_args(1, out, mat1) kvw = self._optimal_vector_width( out.size, self.safe_cast_non_logical(out.dtype, mat1.dtype)) k_getter = lambda e: self.get_program( 'map_1d', MAP_FUNCTION=funct...
# Copyright (c) 2016, Science and Technology Facilities Council # This software is distributed under a BSD licence. See LICENSE.txt. """ mrcobject --------- Module which exports the :class:`MrcObject` class. Classes: :class:`MrcObject`: An object representing image or volume data in the MRC format. """ # Import P...
None: self.xy = np.delete(self.xy, nodes, axis=0) if return_indices is True: return np.array(nodes) def to_df( self, **kwargs ) -> pd.DataFrame: """Get object as pandas DataFrame. Parameters ---------- **kwargs : keyword arguments, optional Keyword arguments passed to pd.DataFrame constructor. Retur...
<reponame>tahmadvand/recipe_app_api from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient # use that for making our API requests from core.models import Recipe, Tag, Ingredient from ....
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time import copy from ytypes import * from color_print import fatal_print class NilObj(object): def __init__(self): self.obj_header = ObjHeader(OT_NIL, nil_cls, self) self.nil = None def __hash__(self): return hash(self.nil) def __eq__(self,...
Tip: If KPOINTS file is generated by this module, ticks on kpath are auto-picked. [See Docs](https://massgh.github.io/pivotpy/) """ def __init__(self,path=None,skipk=None,elim=[],shift_kpath=0,try_pwsh=True): try: from IPython import get_ipython shell = get_ipython().__class__.__name__ if shell == 'ZMQInteractiv...
pia, pibc, pii = 0,0,0 if Nia>0 or Nibc>0 or Nii>0 : if Nia>0 : pia = float(Nia)/(Nia+Nibc+Nii) if Nibc>0 : pibc = float(Nibc)/(Nia+Nibc+Nii) if Nii>0 : pii = float(Nii)/(Nia+Nibc+Nii) if verbose : print( " P(Ia) = %.4f"%pia ) #self._colorClassificationMag = np.array([pia, pibc, pii]) self._colorClassificatio...
longDesc = u""" """, ) entry( index = 1899, label = "N3s-(CdCd)CsH", group = """ 1 * N3s u0 {2,S} {5,S} {6,S} 2 Cd u0 {1,S} {3,D} {4,S} 3 Cd u0 {2,D} 4 R u0 {2,S} 5 Cs u0 {1,S} 6 H u0 {1,S} """, thermo = ThermoData( Tdata = ([300,400,500,600,800,1000,1500],'K'), Cpdata = ([5.8,6.1,6.4,6.7,7.5,8.1,9.1],'cal/(m...
from collections import namedtuple import logging from operator import itemgetter import re import string import unicodedata from django.db import transaction from django.db.utils import IntegrityError from django.utils import timezone from spotify.spotify import spotify from trackmap.models import Album, Track, Trac...
<reponame>tlambert03/llspy2 # Form implementation generated from reading ui file '/Users/talley/Dropbox (HMS)/Python/LLSpy/llspy/gui/main_gui.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from qtpy import QtCore, QtGui, QtWidgets class Ui_Main_GUI: def se...
# -*- coding: utf-8 -*- """ Tests for falcon_marshmallow.middleware """ # Std lib from __future__ import ( absolute_import, division, print_function, unicode_literals, ) try: from unittest import mock except ImportError: import mock # type: ignore from typing import Optional # Third party import pytest from f...
<gh_stars>1-10 # Copyright (C) 2020-2022 <NAME>, <NAME>, and others # SPDX-License-Identifier: MIT import numpy as np from warnings import warn import numpy.polynomial.legendre as np_legendre import scipy.special as sp_special import scipy.integrate as sp_integrate from . import _roots from . import _gauss try: from...
<gh_stars>1-10 import abc import io import json from collections import namedtuple from typing import Any, Optional, Tuple try: from avro import io as avro_io from avro import schema have_avro = True except ImportError: have_avro = False try: import msgpack have_msgpack = True except ImportError: have_msgpa...
out2), dim=1) def _forward_first_plus_last(self, embedded, batch): batch_size = embedded.size(0) batch_ids = np.arange(batch_size) w = self.subword_w first1 = batch.token_starts[batch_ids, batch.idx1+1] first2 = batch.token_starts[batch_ids, batch.idx2+1] last1 = batch.token_starts[batch_ids, batch.idx1+2] - 1 ...
<filename>qopen/imaging.py # Copyright 2015-2019 <NAME>, MIT license """ Plotting functions Arguments supported by all plotting functions via its \*\*kwargs are: :fname: file name for the plot output (if not provided the figure will be left open) :title: title of the plot :figsize: figure size (tuple of inches) :dpi...
""" Copyright (c) 2018-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 writing,...
in these columns. # #### Step 3.2.2 Data Processing # In[22]: # group df_sea_list_price by property_type and room_type with a median price and count calculated for listings in each group df_sea_list_property_price = df_sea_list_price.groupby( ['property_type','room_type']).price.agg(np.median).reset_index() df_sea...
import json import os import tempfile import math import traceback from shutil import copyfile from collections import OrderedDict from datetime import datetime from shapely.geometry import shape,MultiPoint,Point from shapely.geometry.polygon import Polygon from shapely.geometry.multipolygon import MultiPolygon from s...
<reponame>renaudll/omtk<gh_stars>10-100 import pymel.core as pymel from maya import OpenMaya from maya import cmds from omtk.libs import libRigging def create_shape_circle(size=1.0, normal=(1, 0, 0), *args, **kwargs): transform, make = pymel.circle(*args, **kwargs) make.radius.set(size) make.normal.set(normal) # ...
import os import torch import torchvision import torch.nn as nn from SCNN import SCNN from PIL import Image from scipy import stats import random import torch.nn.functional as F import numpy as np import time import scipy.io import itertools from torch.optim import lr_scheduler def pil_loader(path): # open path as f...
: '2017-01-30T22:01:21Z', ## 'state' : 'active' ## } api.update_conference_member(my_conf_id, my_member_id, mute=True, hold=True) my_conf = api.get_conference_member(my_member_id) ## { ## 'addedTime': '2017-01-30T22:01:11Z', ## 'call' : 'https://api.catapult.inetwork.com/v1/users/u-abc123/calls/c-callId', ##...
80.754), )) self.assertEqual( testee, AIAircraftShotdownByObjectEvent.from_primitive(testee.to_primitive()), ) class AIAircraftShotdownByStationaryUnitEventTestCase(unittest.TestCase): def test_derives_from_ShootdownEvent(self): self.assertTrue(issubclass(AIAircraftShotdownByStationaryUnitEvent, ShotdownEvent...
import sys import time from math import * from random import * global valm1 global stratDict sys.setrecursionlimit(2**31-1) stratDict=dict() partitions=dict() stratDict[""]=0 stratDict["1"]=1 partitions[1]=[[1]] partitions[0]=[] q = { 1: [[1]] } g={ 1: [[1]] } valm1=dict() amountsasdf=[] placing=dict() try: open("str...
"pt_BR": "Faro", "ru_RU": "Фаро" }, "BLACKDEATH_SCENARIO_FRANCE": { "de_DE": "Frankreich", "es_ES": "Francia", "fr_FR": "France", "it_IT": "Francia", "ja_JP": "フランス", "ko_KR": "프랑스", "pl_PL": "Francja", "pt_BR": "França", "ru_RU": "Франция" }, "BLACKDEATH_SCENARIO_FRANCE_ABILITY": { "de_DE": "Päpstliche ...
<reponame>SkyLeach/BlenderPanda from __future__ import print_function import math import base64 import struct from panda3d.core import * # pylint: disable=wildcard-import try: from panda3d import bullet HAVE_BULLET = True except ImportError: HAVE_BULLET = False class Converter(): def __init__(self): self.camer...
<reponame>SiliconLabs/mltk from typing import List import sys import os import re import shutil import logging import time import copy import typer from mltk import cli from mltk import __version__ as mltk_version from mltk import MLTK_ROOT_DIR from mltk.utils.shell_cmd import run_shell_cmd from mltk.utils.path import...
# Tkinter import tkinter as tk from tkinter import ttk # Matplotlib import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import matplotlib.dates as mdates # Serial from pySerialTransfer import pySerialTransfer as txfer # Other import time from datetime import datetime, timedel...
<gh_stars>1-10 # -*- coding: utf-8 -*- # Auto-generated by Stone, do not modify. # @generated # flake8: noqa # pylint: skip-file """ This namespace contains endpoints and data types for basic file operations. """ try: from . import stone_validators as bv from . import stone_base as bb except (ImportError, SystemErro...
<filename>tests/helpers/base_query.py<gh_stars>0 # Copyright (c) 2019 <NAME>. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
json.dumps(dic) return HttpResponse(json_data) def findContainersJson(self, currentACL, userID, pageNumber): admin = Administrator.objects.get(pk=userID) if admin.acl.adminStatus != 1: return ACLManager.loadError() finalPageNumber = ((pageNumber * 10)) - 10 endPageNumber = finalPageNumber + 10 containers = AC...
import numpy as np import pickle as pkl from sklearn.metrics import accuracy_score import matplotlib.pyplot as plt import logging import sys, os sys.path.append(os.getcwd()) try: from weak_learner import * from label_encoder import LabelEncoder, OneHotEncoder, AllPairsEncoder from datasets import MNISTDataset fro...
#!/usr/bin/env python """Stitch together the same HiRISE color-filter CCDs from an observation to create a single mosaicked image file. This program: - Optionally performs cubenorm processing on each CCD using a training area that has been selected by the user. Cubenorm processing is required whenever radiometric p...
yang_name="messages-sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/system', defining_module='openconfig-system', yang_type='oc-yang:counter64', is_config=False) self.__messages_received = YANGDynClass(base=RestrictedClassType(b...
< 0))'.format(self._print(func.args[0])) def _print_Max(self, expr): if "Max" in self.known_functions: return self._print_Function(expr) def inner_print_max(args): # The more natural abstraction of creating if len(args) == 1: # and printing smaller Max objects is slow return self._print(args[0]) # when there are...
{} try: appList = self.appLauncher.getAppList() self.hashCallbackFunction[ 40000 ]( appList ) except socket.error: self.hashCallbackFunction[ 40000 ]( appList ) #return appList #the server is not running except: tb.print_exc() return False def isConnected(self): return self.connected def disconnectFr...
] ) I11 . start ( ) return if 4 - 4: Oo0Ooo * Oo0Ooo / OoOoOO00 if 4 - 4: I1IiiI * OoOoOO00 % I11i . OoOoOO00 if 11 - 11: OOooOOo - OoOoOO00 - o0oOOo0O0Ooo * OoOoOO00 + ooOoO0o if 62 - 62: I1IiiI * i11iIiiIii . iII111i if 35 - 35: IiII . O0 + Oo0Ooo + OOooOOo + i1IIi if 65 - 65: O0 * I1IiiI / I1IiiI . OoOoOO00 ...
<filename>cadee/ana/alanize.py #!/usr/bin/env python """ The script reads an sqlite3 database produced by CADEE and creates an interactive web UI application for visualizing and analysing the results (index.html). usage: python analyse.py cadee.db this will create your index.html Author: {0} ({1}) This program is ...
inverse DFT and quadratic output factor along x. Axes are (xo, yo, kx). gradxQinvTPx (3D array): Derivative of above w.r.t output x. Note that z is constant - the derivative is along a transverse plane rather than the surface. QinvTPy (3D array): Product propagator, inverse DFT and quadratic output factor along x. A...
outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_)) else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='LineDrawingRegionType'): if self.id is not None and 'id' not in already_processed: already_processed.add('id') outfile.write...
#!/usr/bin/env python # Copyright (c) 2015-2016 University Corporation for Atmospheric Research/Unidata # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT import asyncio import functools import glob import logging import os import os.path import shutil import struct import sys import thre...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
self._external_attributes[full_name] = cap else: self.debug('%s.getXAttr: using %s proxy to %s' % (self._locals.get('ATTRIBUTE'),'taurus' if self.UseTaurus else 'PyTango',full_name)) if write: self.info('getXAttr(Write): %s(%s)'%(type(wvalue),wvalue)) self._external_attributes[full_name].write(wvalue) result = w...
a job." % submit_response return lambda: self.wait_for_job(jobs[0]["id"], history_id, maxseconds=maxseconds) def run_tool(self, testdef, history_id, resource_parameters={}): # We need to handle the case where we've uploaded a valid compressed file since the upload # tool will have uncompressed it on the fly. inp...
from typing import Optional import torch from torch import matmul from torch_extensions.ops import ( batch_cholesky_inverse, batch_diag, kron, symmetrize, matvec, cov_from_invcholesky_param, inv_from_invcholesky_param, cholesky, ) from inference.analytical_gausian_linear.inference_step import ( filter_forward_...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import """ This defines the DataShape type system, with unified shape and data type. """ import sys import ctypes import operator from math import ceil import datashape import numpy as np from .py2help import ( OrderedDict, _intt...
1'][0] form = self._assessment_bank.get_response_form(section_2['section_id'], section_2['questions'][0].ident) form.add_choice_id(wrong_answer['id']) self._assessment_bank.submit_response(section_2['section_id'], section_2['questions'][0].ident, form) sections = self.get_questions_for_taken(taken.ident) self....
settings to...") self.file_opt = options = {} options['defaultextension'] = '.ini' options['filetypes'] = [ ('INI files', '.ini'),('all files', '.*')] options['title'] = 'Set filename to export the settings to...' ans = tkFileDialog.asksaveasfilename(**self.file_opt) if ans != '' and ans != '.' and an...
xy[0] >= 0.0 and xy[1] < 0.0: ax.text(xy[0] + 0.025, xy[1] - 0.025, name, ha='left', va='top', size='small') elif xy[0] >= 0.0 and xy[1] >= 0.0: ax.text(xy[0] + 0.025, xy[1] + 0.025, name, ha='left', va='bottom', size='small') ax.axis('equal') return ax def _id_callback(self, event): # event.ind is the index...
<reponame>CommonRoad/commonroad-io<filename>commonroad/visualization/icons.py """Module for drawing obstacle icons.""" from typing import Union import matplotlib as mpl import numpy as np import math from commonroad.geometry.transform import rotate_translate from commonroad.scenario.obstacle import ObstacleType __au...
"Xds": -793, "cXr": -794, "liX": -795, "crX": -796, "iXn": -797, " zX": -798, "Xya": -799, "nXm": -800, "X2": -801, "kanlIGI yXk ": 802, "zalarInda Xl": 803, " in Xldugun": 804, "itelerin yX": 805, "y yerinde X": 806, "Sinin de Xl": 807, "kerinin Xl": 808, "e dXkumanl": 809, " olan yXk ": 810, "da dXndurd": -811, ...
<gh_stars>10-100 import pandas as pd from xlsxwriter.format import Format class GPTable: """ A Good Practice Table. Stores a table and metadata for writing a table to excel. Attributes ---------- table : pandas.DataFrame table to be written to an Excel workbook title : str description of the table subtitle...
cand) return larger def func_7b0a748f0d1748a7826768d5660e8fea(budget, cc, placed): queue = sorted(set(queue)) seen = set(queue) while queue: lowest = queue.pop() if lowest == 0: continue needed_budget = (37 - len(placed)) * lowest for p in placed: needed_budget += max(0, lowest - p) if budget < needed_budg...
16:46:00+00:00 56644.02 56663.43 56605.17 56605.18 27.573654 2021-05-02 16:47:00+00:00 56605.18 56657.55 56605.17 56625.76 14.615437 2021-05-02 16:48:00+00:00 56625.75 56643.60 56614.32 56623.01 5.895843 Close time Quote volume \\ Open time 2021-05-02 14:48:00+00:00 2021-05-02 14:48:59.999000+00:00 1.633534e+06 ...
self.sabio_insensitive: if 'bigg_name' in self.sabio_insensitive.get(met): bigg_chemicals.append(coefficient + __reformat_met_name(self.sabio_insensitive.get(met)['bigg_name'])) else: bigg_chemicals.append(coefficient + __reformat_met_name(met)) elif met in self.bigg_insensitive: if 'bigg_name' in self.bigg_insen...
ConfigCACsrCa object. :param str expiry: (optional) The expiration for the root CA certificate. :param float pathlength: (optional) The pathlength field is used to limit CA certificate hierarchy. 0 means that the CA cannot issue CA certs, only entity certificates. 1 means that the CA can issue both. """ self.exp...
"""Core functionality for foamPy.""" from __future__ import division, print_function import numpy as np import os import re import datetime import sys import time import subprocess import pandas import glob from .dictionaries import * from .templates import * def gen_stripped_lines(fpath): with open(fpath) as f: f...
# -*- coding: utf-8 -*-1 """ 2014, LAAS/CNRS @author: <NAME> """ from __future__ import print_function from dynamic_graph import plug import numpy as np from dynamic_graph.sot.core.latch import Latch from dynamic_graph.sot.core.operator import Selec_of_vector, Mix_of_vector from dynamic_graph.sot.torque_control.numer...