input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>jonesnc/deluge-client # Original bencode module by <NAME>, et al. # # Modifications by <NAME>: # # - Added support for floats (sent as 32-bit or 64-bit in network # order), bools, None. # - Allowed dict keys to be of any serializable type. # - Lists/tuples are always decoded as tuples (thus, tuples can be # u...
# -*- coding:utf-8 -*- """ """ from hypernets.searchers import make_searcher from hypernets.discriminators import make_discriminator from hypernets.experiment.cfg import ExperimentCfg as cfg from hypernets.tabular.cache import clear as _clear_cache from hypernets.utils import logging, isnotebook, load_module from hyp...
""" parse the error string for 'interesting' errors which can be grouped, such as disk space issues """ summary = '' # do disk space report first p = re.compile('needs (\d+)MB on the (\S+) filesystem') disk = {} for m in p.finditer(errstring): if m.group(2) not in disk: disk[m.group(2)] = int(m.group(1)) if di...
'ldap_srv_def_X', 'description': 'LDAP Srv Def #X', } with pytest.raises(InvalidResourceError) as exc_info: # the function to be tested: self.urihandler.post( self.hmc, '/api/console/ldap-server-definitions', new_ldap_srv_def_input, True, True) exc = exc_info.value assert exc.reason == 1 def test_update_v...
# -*- coding: utf-8 -*- """Python lib to access exchange rates from the Czech National Bank. Fork of (PyPI) cnb-exchange-rate (MIT licensed). install_requires = ['six', 'pytz'] Usage: import cnb from datetime import date, datetime, timedelta cnb.rate('USD') 24.688 cnb.convert(1000, 'USD') 24688.0 cnb.convert(1...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Sat Aug 18 14:05:10 2018 @author: yoelr """ from . import _Q import numpy as np from .utils import property_array, PropertyFactory, DisplayUnits, \ tuple_array, fraction, Sink, Source, MissingStream from ._flowsheet import find from ._species import Species...
<gh_stars>1-10 import pandas as pd import streamlit as st import numpy as np import folium from streamlit_folium import folium_static from folium.plugins import MarkerCluster import geopandas import plotly.express as px from datetime import datetime from PIL import Image # =============================================...
<reponame>yamamon75/PmagPy def get_apwp(plate): plate = plate.upper() if plate == 'AF': apwp = """ 0.0 90.00 0.00 1.0 88.38 182.20 2.0 86.76 182.20 3.0 86.24 177.38 4.0 86.08 176.09 5.0 85.95 175.25 6.0 85.81 174.47 7.0 85.67 173.73 8.0 85.54 173.04 9.0 85.40 172.39 10.0 85.26 171.77 11.0 85.12 171.19 12.0 84.97 170...
# 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...
<gh_stars>0 # Copyright 2011 OpenStack Foundation # Copyright 2014 Rackspace Hosting # 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/...
in self.__class__.__dict__: return self.default_child_resource_document else: return None def get_filters(self): """ Given the filters declared on this resource, return a mapping of all allowed filters along with their individual mappings of suffixes and operators. For example, if self.filters declares: { '...
<gh_stars>1-10 import random import warnings import numpy as np from nose.tools import raises, assert_not_equal from nose.tools import assert_true, assert_raises from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_equal from numpy.testing import assert_equal, assert_almost_equal ...
nmbx: t,r,s = None,None,None cmdbase = 'LIST' if subscribed: cmdbase = 'LSUB' self._doing_lsub = True else: self._doing_lsub = False if self.have_capability('MAILBOX-REFERRALS'): t,r,s = self.send('R' + cmdbase, astring(pfx), x, state='auth' ) else: t,r,s = self.send(cmdbase, astring(pfx), x, state='auth' ) ...
# -*- coding: utf-8 -*- # Copyright (C) 2014, <NAME> """ IPC in about 250 lines This modules implements inter process communication via a memory mapped file. The protocol is designed to be simple, so it can be implemented in other (dynamic) languages with ease. Nevertheless, communication is very fast and there are n...
<gh_stars>1-10 #!/usr/bin/env python """ METU CENG336 SPRING 2019 by <NAME> & <NAME> based on Mircea Agapie's pyrobosim2d project: http://sourceforge.net/projects/pyrobosim2d/ modified by <NAME> and <NAME> Simple 2D robot simulator in Python (2.7). You need to have Python, Pygame and PySerial installed for it t...
<reponame>Acidburn0zzz/Exporters<gh_stars>1-10 from ..logging import * from ..package_level import * from .nodes.abstract import * from .texture import BakedTexture import bpy DEFAULT_MATERIAL_NAMESPACE = 'Same as Filename' #=============================================================================== cl...
import sublime import sublime_plugin import os import socket import sys import threading # Load modules try: from .xdebug import * except: from xdebug import * # Set Python libraries from system installation python_path = S.get_project_value('python_path') or S.get_package_value('python_path') if python_path: pyt...
# pylint: disable=too-many-lines """ https://github.github.com/gfm/#link-reference-definitions """ import pytest from .utils import act_and_assert @pytest.mark.gfm def test_link_reference_definitions_161(): """ Test case 161: (part 1) A link reference definition does not correspond to a structural element of a doc...
:vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :param weekly_retention: The weekly retention policy for an LTR backup in an ISO 8601 format. :type weekly_retention: str :param monthly_retention: The monthly retention policy for an LTR backup in an ISO...
masukan salah. Silahkan masukan kembali tanggal dengan format DD/MM/YYYY") # Membuat string dari gadget yang user ingin kembalikan id_returned_gadget = updated_unique_personal_borrow_not_returned[option - 1] if id_returned_gadget[-5:] == "False": gadget.append([id_returned_gadget[:-5], "nama", "deskripsi", ]) ...
raises. self.assertRaises(ValueError, approx_equal, 100, 100, -1, 0.1) def test_bad_rel(self): # Test negative rel raises. self.assertRaises(ValueError, approx_equal, 100, 100, 1, -0.1) # --- Tests for NumericTestCase --- # The formatting routine that generates the error messages is complex enough # that it too...
<filename>nff/data/dataset.py ### Testing Comment import torch import numbers import numpy as np import copy import nff.utils.constants as const from copy import deepcopy from sklearn.utils import shuffle as skshuffle from sklearn.model_selection import train_test_split from ase import Atoms from ase.neighborlist impor...
max_digits=25, null=True)), ], options={ 'db_table': 'special_account_special_funs_outbound_proportional_limitation', }, ), migrations.CreateModel( name='stock_purchase_arrangement_in_secondary_market_after_payment', fields=[ ('row_id', models.AutoField(primary_key=True, serialize=False)), ('buying_body', mod...
1 else: raise RuntimeError("Unexpected fold_num %d" % fold_num[n]) if i != j and ((i in purine and j in pyrimidine) \ or (i in pyrimidine and j in purine)): if fold_num[n] == '0': Q0 += 1 elif fold_num[n] == '2': Q2 += 1 elif fold_num[n] == '4': Q4 += 1 else: raise RuntimeError("Unexpected fold_num %d" % fo...
rc def put(self, mover, volume, sg, vf): """ Add active request. :type mover: :obj:`str` :arg mover: active mover name :type volume: :obj:`str` :arg volume: volume associated with active mover :type sg: :obj:`str` :arg sg: storage group name associated with active mover :type vf: :obj:`str` :arg vf: volume...
: {T,F} If True, a true 3D PSF is fit to the data, otherwise, maximum intensity & x,y,z positions are returned, and guesses for the variances. Returns ------- dot_fits_dict : dict Contains 3D PSF parameter fit values, and other metrics used for quality control of the fit and feature localization. Attribu...
""" Typeclass for Player objects Note that this object is primarily intended to store OOC information, not game info! This object represents the actual user (not their character) and has NO actual precence in the game world (this is handled by the associated character object, so you should customize that instead for m...
> 0: def_val = col_data[_COLUMN_DEFAULT] # add quotes if needed if def_val.upper() != "CURRENT_TIMESTAMP": def_val = to_sql(def_val) values['default'] = " DEFAULT %s" % def_val if len(col_data[_COLUMN_EXTRA]) > 0: if col_data[_COLUMN_EXTRA].upper() != "AUTO_INCREMENT": values['extra'] = " %s" % col_data[_COLUMN...
instead.") def __getitem__(self, key: str) -> Any: ComputeInstanceResponse.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: ComputeInstanceResponse.__key_warning(key) return super().get(key, default) def __init__(__self__, *, compute_type: str, is_attached_c...
import json import numpy as np from scipy.spatial.distance import cdist import os try: import cPickle as pickle except ImportError: import pickle import torch import torch.nn.functional as F import cv2 import argparse name2id = {} results = [] def morpho(mask, iter, bigger=True): # return mask mask = mask * 255...
def validate_auditor(self, value): if self.instance.state != '新建': # 如果不是新建状态 不能更改信息 raise serializers.ValidationError("当前信息已提交,禁止更改") if settings.SAME_USER != True: if self.instance.create_user == value: # 审核帐号不能与创建帐号相同 raise serializers.ValidationError("审核帐号不能与创建帐号相同'") try: auditor = User.objects.get(u...
"""Internal pagelem node that retrieves text as an attribute to DOM component This is instantiated when template has eg. `<div>[text]</div>` . The text is not asserted, but rather appointed to an attribute of parent component. """ _name = 'text2attr' is_empty = True _consume_in = (DomContainerElement,) def __i...
""" In this file we run ours models one by one """ # Imports import random from random import shuffle import numpy as np import os import scipy.sparse as sp import torch from tqdm import tqdm import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data im...
# -*- coding: utf-8 -*- ''' config ====== logging ------- logging verwenden:: import logging logger = logging.getLogger( "MQTT" ) debug Meldungen ausgeben:: logger.setLevel( logging.DEBUG ) logging level: * CRITICAL - 50 * ERROR - 40 * WARNING - 30 * INFO - 20 * DEBUG - 10 * NOTSET - 0 CHANGELOG ========...
: int photon on rhs? (0 or 1) v_on_lhs : int vibrational energy level on lhs? (0 or 1) v_on_rhs : int vibrational energy level on rhs? (0 or 1) j_on_lhs : int rotational energy level on lhs? (0 or 1) j_on_rhs : int rotational energy level on rhs? (0 or 1) data : dict e : list of float Electron energies in u...
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains from selenium.common.exceptions import Tim...
<filename>gr37/VOR/vor_playback_sigmf_2.py #!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: VOR Decoder # Author: <NAME> # Description: Generic SigMF Recorder # GNU Radio version: 3.7.13.4 ###########################################...
<filename>multicomplexmat.py """ MultiComplexMat implements a wrapper for any objects (reals, np.arrays and sparse matrices) which can have multiple imaginary like units. E.g. rules i*i = -1, j*j = -1 but i*j = j*i will not simplify further. The MultiComplexMat overloads all common numerical operations: +,-,*,@ e...
!= DobotCommunicate.DobotCommunicate_NoError: dSleep(5) continue break elif masterDevType == DevType.Conntroller and slaveDevType == DevType.Idle: # 外部控制器 # if isUsingLinearRail: while(True): result = api.SetHOMECmd(c_int(masterId), c_int(-1), byref(cmd), isQueued, byref(queuedCmdIndex1)) if result != DobotCom...
request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.delete_stripe_gateway_by_id_with_http_info(stripe_gateway_id, async=True) >>> result = thread.get() :param async bool :param str stripe_gateway_id: ID of stripeGateway to delete. (required) :return: None If the met...
The name of the topic. :param pulumi.Input[int] partitions: The number of the topic's partitions. :param pulumi.Input[int] replication_factor: Amount of data copies (replicas) for the topic in the cluster. :param pulumi.Input['MdbKafkaClusterTopicTopicConfigArgs'] topic_config: User-defined settings for the topic. T...
from typing import List, Optional, Union from geopandas.array import points_from_xy import numpy as np import netCDF4 import pandas as pd import geopandas as gpd import shapely.vectorized from scipy.spatial import cKDTree from pathlib import Path # from joblib import Parallel, delayed import typer import shapely from ...
0, 1, 0, 0], [0, 1, 1, 0, 0], [1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 1, 1, 1, 1], [1, 0, 0, 0, 1], [0, 0, 0, 0, 1], [1, 0, 0, 1, 0] ], "Puffeur : Rake 1" : \ [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0,...
<reponame>erfanMhi/Cooperative-Coevolution-Transfer-Optimization<gh_stars>1-10 import numpy as np # import lhsmdu import argparse import os from copy import deepcopy from time import time from pprint import pprint from utils.data_manipulators import * from evolution.operators import * from to.probabilistic_model impo...
# RA Duty Scheduler # Copyright (c) 2021, <NAME> # # All rights reserved. # library import statements import calendar import pandas as pd import sys import random import os # module import statements from datetime import datetime from RA import ResidentAdviser from mplcal import MplCalendar # set global variables # ...
continue if identf == 2: icocur_readed['image_%s' %cnt].update({'hotspot_x' : wPlanes_or_wXHotSpot, 'hotspot_y' : wBitCount_or_wYHotSpot}) if datasize != totalsize: self.all_icocur_readed.update({self.path_icocur : "Icon/Cursor error: invalid %s, unexpected EOF." %typ[identf]}) return return icocur_readed d...
10% of the time ## Arguments --- | Argument | Type | Description | Default Value | | :------: | :--: | :---------: | :-----------: | | eps | 'float' | Value: 0-1, determines proportion of random arm movements | N/A | | remote_device | -- | see class description | `None` | |<img width=400/>|<img width=250/>|<im...
<gh_stars>1-10 import json import pandas as pd import time from numpy import array from sklearn.metrics import confusion_matrix, accuracy_score import gosdt # Import the GOSDT extension from model.encoder import Encoder from .imbalance.osdt_imb_v9 import bbound, predict # Import the special objective implementation fr...
from collections import deque from flask import Flask, request as user_req, jsonify from flask_cors import CORS, cross_origin import requests import re import json import time from tornado.wsgi import WSGIContainer from tornado.web import Application, FallbackHandler, RequestHandler from tornado.ioloop import IOLoop fr...
the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. """ return pulumi.get(self, "values") def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop @pulumi.output_type class IBMBlockCSIS...
#!/usr/bin/env python3 import random from popper.utils import Settings, Stats from popper.aspsolver import Clingo from popper.tester import Tester from popper.constrain import Constrain, Outcome, Con from popper.generate import generate_program from popper.core import Clause, Literal, Grounding, Program from datetime ...
0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1), sample([0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0), sample([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0], 0), sample([0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1], 0), sample([0, 0, 0, 0, 0, 0, 0, 0, ...
* len(annotators) else: n_candidate_pairs = int(np.sum(annotators)) if n_candidate_pairs < batch_size: warnings.warn( f"'batch_size={batch_size}' is larger than number of " f"candidates pairs. Instead, 'batch_size={n_candidate_pairs}'" f" was set." ) batch_size = n_candidate_pairs return X, y, candidates, a...
# 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, software # distributed under the Li...
if not os.path.exists('results/topics.txt'): with open('results/topics.txt', 'w'): pass f = open('results/topics.txt', 'w') for topic_idx, topic in enumerate(model.components_): print("Topic %d:" % (topic_idx)) f.write("Topic %d:" % (topic_idx)) print(" ".join([feature_names[i] for i in topic.arg...
<filename>rest-service/manager_rest/deployment_update/manager.py<gh_stars>100-1000 ######## # Copyright (c) 2017-2019 Cloudify Platform Ltd. 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 ...
<gh_stars>1-10 import numpy as np from random import shuffle from astropy.convolution import Box1DKernel from astropy.convolution import convolve import scipy.io as io import scipy.interpolate as interp from tqdm import tqdm from glob import glob import os import pickle import time from mpi4py import MPI import argpars...
vectors m4 = m1.unit assert m4.shape == shape1 # Overwritten Vector3d methods assert m1.angle_with(m1).shape == shape1 assert m1.cross(m1).shape == shape1 assert m1.dot(m1).shape == shape1 assert m1.dot_outer(m1).shape == shape1 + shape1 assert m1.mean().shape == (1,) # Round m5 = m1.round() assert m5.shap...
The callback function for asynchronous request. (optional) :param str id: Portal id (required) :param str id2: (required) :param str fk: (required) :param Portal data: :return: Design If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.ge...
#!/usr/bin/env python from __future__ import print_function, division, unicode_literals import os import pytz from datetime import datetime from copy import deepcopy from .worker_base import( WorkerBase , WorkerError , PreparationError ) from protocolbuffers.messages_pb2 import ( FamilyJob , WorkerJobDescript...
<reponame>TioWang/stash # coding: utf-8 """ Streams are channels taking input and talking to in-memory screen. There are two streams. One for User Input on Physical terminal. The other is for accepting outputs from running scripts. """ import logging import re # noinspection PyPep8Naming from .shcommon imp...
with an arg that causes a divide-by-zero error""" c = connect_to_test_contract with pytest.raises(SimplEthError) as excp: c.get_gas_estimate( constants.DB0_TRX_SENDER, constants.DB0_TRX_NAME, constants.DB0_TRX_ARG0 ) assert excp.value.code == 'C-040-040' def test_get_gas_estimate_with_bad_sender_raises_C_040...
'tracts': 13}, 'Iosco': {'pop': 25887, 'tracts': 9}, 'Iron': {'pop': 11817, 'tracts': 5}, 'Isabella': {'pop': 70311, 'tracts': 15}, 'Jackson': {'pop': 160248, 'tracts': 38}, 'Kalamazoo': {'pop': 250331, 'tracts': 57}, 'Kalkaska': {'pop': 17153, 'tracts': 5}, 'Kent': {'pop': 602622, 'tracts': 128}, 'Kewe...
<reponame>SoyGema/NannyML<filename>nannyml/chunk.py # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: Apache Software License 2.0 """NannyML module providing intelligent splitting of data into chunks.""" import abc import logging import warnings from datetime import datetime from typing import List import n...
Exception: values_partners[key1] = 0 for gov in governorates: key2 = "{}-{}-{}".format(month, partner['partner_id'], gov['location_adminlevel_governorate_code']) try: if report_type == 'live': denominator = denominator_indicator.values_partners_gov_live[key2] if key2 in denominator_indicator.values_partners_gov_...
# MINLP written by GAMS Convert at 05/15/20 00:51:26 # # Equation counts # Total E G L N X C B # 2105 89 448 1568 0 0 0 0 # # Variable counts # x b i s1s s2s sc si # Total cont binary integer sos1 sos2 scont sint # 841 521 320 0 0 0 0 0 # FX 0 0 0 0 0 0 0 0 # # Nonzero counts # Total const NL DLL # 5145 5033 112 0 #...
> num_samples: raise IndexError("%s_start_index + %s_index_count out of range" % (name, name)) return start_index, index_count @docval(*get_docval(AlignedDynamicTable.to_dataframe, 'ignore_category_ids'), {'name': 'electrode_refs_as_objectids', 'type': bool, 'doc': 'replace object references in the electrode colu...
'67388':{'en': 'DSTCom'}, '67389':{'en': 'DSTCom'}, '674553':{'en': 'Digicel'}, '674554':{'en': 'Digicel'}, '674556':{'en': 'Digicel'}, '674557':{'en': 'Digicel'}, '674558':{'en': 'Digicel'}, '674559':{'en': 'Digicel'}, '6746':{'en': 'Digicel'}, '6748':{'en': 'FSM Telecom'}, '67570':{'en': 'Digicel'}, '67571...
<reponame>kevslinger/DiscordCipherRace from discord.ext import commands import constants from utils import discord_utils, logging_utils from modules.perfect_pitch import perfect_pitch_utils, perfect_pitch_constants import discord import random import os import glob class PerfectPitch(commands.Cog, name="Perfect Pitch...
<filename>tests/testapp/tests/test_models.py from unittest.mock import Mock, patch import jsonpickle from django.test import TestCase from django.utils import timezone from django_chatbot import forms from django_chatbot.models import ( Bot, CallbackQuery, Chat, Form, Message, Update, User, _update_defaults) ...
809644103, 809520654, 128471, 809762815, 809593662, -1, 809775174, 809669301, -1, -53179, 809729714, 11194, -1, 809767791, 11195, -1, 809704192, 11196, -1, 809581825, 129397, 810102859, 809510035, -1, -53174, 810050840, 128025, -1, 810094917, 128721, -53172, 810063346, 128002, -53171, ...
<gh_stars>1-10 #!/usr/bin/python # # Copyright (c) 2018 <NAME>, <<EMAIL>> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['pr...
""" Parses the OpenCPN Table format. Example:: Herrington to Drum Point Name Herrington to Drum Point Depart From Destination Total distance 22.9 NMi Speed (Kts) 6 Departure Time (%x %H:%M) 05/25/2021 08:43 Time enroute 3H 49M Leg To waypoint Distance Bearing Latitude Longitude ETE ETA Speed Next tide eve...
""", 4: "Conversion error of a floating-point field (underflow) when converting to/from a non-IBM floating-point format.", 5: """Format conversion of field with NV option is not allowed (mainframe), Internal error (open systems)""", 6: "Invalid length was specified ( for example, a wide character field in Unicode e...
and with one background field as filling and one background field as contrours Input: Output: ''' import numpy as np from .utils import mask_features,mask_features_surface from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.colors import Normalize divider = make_axes_locatable(axes) if ...
run try: thisRunGroup = h5file.get_node(where = '/', name = this_run_group_name, classname='Group') roi_names = [] for roi_name in h5file.iter_nodes(where = '/' + this_run_group_name, classname = 'Group'): if len(roi_name._v_name.split('.')) > 1: hemi, area = roi_name._v_name.split('.') if roi_wildcard == are...
'61860118':{'en': 'Southern Cross'}, '61860119':{'en': 'Baandee'}, '61860130':{'en': 'Kambalda'}, '61860149':{'en': 'Narembeen'}, '61860160':{'en': 'Collurabbie'}, '6186100':{'en': 'Perth'}, '6186101':{'en': 'Perth'}, '61861020':{'en': 'Perth'}, '6186103':{'en': 'Perth'}, '6186104':{'en': 'Perth'}, '6186105':...
from gym import core, spaces from gym.utils import seeding from collections import OrderedDict import numpy as np import math import sys if sys.version_info[0] >= 3: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk as gtk from .tilemap import TileMap from .corecontrol import MicropolisCont...
from django.shortcuts import render,redirect from django.http import JsonResponse, HttpResponse from .models import Wheel, Recommend, ClothesType, Jacket, Pants, Shoes, Others, User, Cart, Address, \ OrderInfo, OrderGoods from django.core.paginator import Paginator import random import time import re from django.conf...
<reponame>hfurkanbozkurt/syne-tune # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LIC...
optional Name of the department of the person or device that creates the SR document instance. content_creator_name: Union[str, pydicom.valuerep.PersonName, None], optional Name of the person who created the content of this presentation state. content_creator_identification: Union[highdicom.ContentCreatorIdentifi...
''' Plotter to collect all plotting functionality at one place. If available, it uses simple plotting functionalities included into the different classes. Merges them together to create more meaningfull plots. ''' from __future__ import print_function, division import numpy as np import pandas as pd import math from w...
<filename>pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/meraki/configure.py '''IOSXE configure functions for meraki''' # Python import re import time # Genie from genie.utils.timeout import Timeout # Banner from pyats.log.utils import banner # Logger import logging log = logging.getLogger(__name__) # Unicon from unic...
#!/usr/bin/python # # Copyright 2020 <NAME>, <NAME> # # 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 agr...
recipes = list() for item, recipe in self._items_map.recipes(): screen_items = [results.get(x) for x in recipe] if all(screen_items) or self._settings.should_display_unavailable_recipes(): recipes.append((item, [x[0] for x in screen_items if x is not None], item in results, all(screen_items))) self._show_scan_res...
( b'z\xcc\x8ca\xcc\x81dna\xcc\x81 r\xcc\x8cer\xcc\x8cicha \xef\xbd\x81\xef\xbd\x82\xef\xbd\x83\xef\xbc\xa1\xef\xbc\xa2\xef\xbc\xa3'.decode("utf-8"), b'z\xcc\x8ca\xcc\x81dna\xcc\x81 r\xcc\x8cer\xcc\x8cicha abcABC'.decode("utf-8") ), ( b'\xc5\xbe\xc3\xa1dn\xc3\xa1 \xc5\x99e\xc5\x99icha abcABC'.decode("utf-8"), b'z\...
# Generated from Sql.g4 by ANTLR 4.7 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\u00a5") buf.write("\u05d7\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.wri...
<filename>sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py # 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.r...
the final species populations for the ith set of parameters for all rounds. x_arr[i, j] will give a list of arrays of species population sizes at the end of the observation period for the jth round of simulating the ith set of parameters, where x_arr[i, j, k] is the final population of species k for the jth roun...
nodes' data dictionaries where the scores will be put. Defaults to 'score' :param default_score: The initial score for all nodes. This number can go up or down. :param runs: The number of times to run the heat diffusion workflow. Defaults to 100. :param use_tqdm: Should there be a progress bar for runners? :return:...
import tensorflow as tf import numpy as np np.set_printoptions(precision=2, linewidth=200) import cv2 import os import time import sys #import tf_nndistance import argparse import glob import PIL import scipy.ndimage as ndimage sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from utils imp...
doesn't protect us from inner itself inner.cancel() # This should now raise, but be absorbed by the inner scope await _core.checkpoint() assert inner.cancelled_caught # make sure that cancellation propagates immediately to all children async def test_cancel_inheritance(): record = set() async def leaf(ident): ...
is used gcrSystemFiles = False missingSystemFiles = False for systemFile in [ '/boot.bin', '/bi2.bin', '/apploader.ldr', '/start.dol' ]: systemFileIid = gameId + systemFile if not Gui.isoFileTree.exists( systemFileIid ) and systemFile.endswith( '.bin' ): if Gui.isoFileTree.exists( gameId + '/iso.hdr' ):...
#!/usr/bin/env python """Very simple SVG rasterizer NOT SUPPORTED: - markers - symbol - color-interpolation and filter-color-interpolation attributes PARTIALLY SUPPORTED: - text (textPath is not supported) - fonts - font resolution logic is very basic - style font attribute is not parsed only font-* attrs are ...
# ----------------------------------------------------- # test_samclasses.py: Unit tests for samclasses.py. # ----------------------------------------------------- # Make sure we can import i2p import sys; sys.path += ['../../'] import traceback, time, thread, threading, random from i2p import eep, socket, samclasse...
<gh_stars>1-10 import os import tensorflow as tf import numpy as np import pandas as pd import time import utils import network_maker import network_helper import matplotlib import matplotlib.pyplot as plt matplotlib.use('TkAgg') from itertools import islice import struct import pickle # generate geometric parameters...
<filename>src/data_management/traffic.py import pandas as pd from util import execute_sql, normalize_text, normalize_numeric, conversion from errors import TradeIdError import os import json import dateutil.relativedelta script_dir = os.path.dirname(__file__) def addIds(df): df = df[df['Key Point'] != "FortisBC Lowe...
<filename>cupy/cuda/compiler.py import copy import hashlib import math import os import re import shutil import subprocess import sys import tempfile from cupy.cuda import device from cupy.cuda import function from cupy_backends.cuda.api import driver from cupy_backends.cuda.api import runtime from cupy_backends.cuda....
<filename>luna/gateware/usb/usb2/interfaces/eptri.py # # This file is part of LUNA. # """ Implementation of a Triple-FIFO endpoint manager. Intended to be mostly-compatible with ValentyUSB's `eptri` to enable code re-use. ***WARNING**: This isn't a final interface! This interface is intended to become binary-compatib...
import os import subprocess from collections import OrderedDict from datetime import datetime from astroplan import Observer from astropy import units as u from astropy.coordinates import EarthLocation from astropy.coordinates import get_moon from astropy.coordinates import get_sun from pocs.base import PanBase from ...