input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>oguzhan-yilmaz/balcony from __future__ import annotations import services import nodes from utils import camel_case_split import json from thefuzz import fuzz from collections import namedtuple from typing import List import os import boto3 from pprint import pprint from collections import namedtuple from ite...
stair.p0 v1 = stair.p1 manipulator.set_pts([(v0.x, v0.y, stair.top), (v1.x, v1.y, stair.top), (side, 0, 0)]) manipulator.type_key = 'SIZE' manipulator.prop1_name = 'length' for i in range(stair.n_step): stair.make_step(i, verts, faces, matids, uvs, nose_y=nose_y) if s < len(self.stairs) - 1 and self.steps_type ...
voutdc = dsn_specs['vout_list'][0] f_unit = dsn_specs['f_unit'] gain_max = max(self._amp_info['gain_tot']) f_bw_log = int(np.floor(np.log10(f_unit / gain_max))) f_unit_log = int(np.ceil(np.log10(f_unit))) top_specs['layout_params'].update(self._amp_info['layout_info']) meas = top_specs['measurements'][0] meas[...
from unittest.mock import MagicMock import pytest import prefect from prefect.tasks.kubernetes import ( CreateNamespacedService, DeleteNamespacedService, ListNamespacedService, PatchNamespacedService, ReadNamespacedService, ReplaceNamespacedService, ) from prefect.utilities.configuration import set_temporary_co...
% len(ipo.getCurve('ScaleX').bezierPoints) + r'">') spacer = '' for i in range(len(ipo.getCurve('ScaleX').bezierPoints)): if use_no_shift_over: if ipo.getCurve('ScaleX').bezierPoints[i].pt[0] != 1: fout.write(spacer + "%0.6f" % (round((ipo.getCurve('ScaleX').bezierPoints[i].pt[0] - 0) / anim_fps, 6),)) else: fou...
namedtuple('Extent', 'left right') extents = tuple(Extent(i, j) for i, j in zip(left, right)) return EnrichedTuple(*extents, getters=self.dimensions, left=left, right=right) @cached_property def _mask_modulo(self): """ A boolean mask telling which :class:`Dimension`s support modulo-indexing. """ return tuple(...
None, client_session_max_lifespan: Optional[pulumi.Input[str]] = None, consent_required: Optional[pulumi.Input[bool]] = None, description: Optional[pulumi.Input[str]] = None, direct_access_grants_enabled: Optional[pulumi.Input[bool]] = None, enabled: Optional[pulumi.Input[bool]] = None, exclude_session_state_from...
domains extend from TSS a basal region. """ gene_iterator = GTF.gene_iterator(iterator) counter = E.Counter() upstream, downstream = options.upstream, options.downstream radius = options.radius outfile = options.stdout regions = [] #################################################################### # d...
<filename>metaflow/metadata/metadata.py import json import os import re import time from collections import namedtuple from datetime import datetime from metaflow.exception import MetaflowInternalError from metaflow.util import get_username, resolve_identity DataArtifact = namedtuple('DataArtifact', 'name ds_type d...
from . import bits from . import defs from . import opcode from . import (OrderedDict, FRAME_TYPE_OBJECT, FRAME_TYPE_LITERAL_FRAME, FRAME_TYPE_BYTECODE_FRAME, FRAME_TYPE_EXCEPTIONS_FRAME) from . import (behavior_label, cclass_label, class_label, cfun_label, fun_label, cmod_label, mod_label, closure_name) f...
<reponame>ivis-tsukioka/datalad # emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil; coding: utf-8 -*- # ex: set sts=4 ts=4 sw=4 et: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for th...
CHW = Au.shape[1] C_out = Au.shape[2] H_out = Au.shape[3] W_out = Au.shape[4] Au_temp = Au.view(batch, CHW, -1) # shape (batch, CHW, C_out H_out W_out) Au_temp = torch.transpose(Au_temp, 1, 2) # shape (batch, C_out H_out W_out, CHW) Al_temp = Al.view(batch, CHW, -1) # shape (batch, CHW, C_out H_out W_out) Al_te...
<reponame>PaulPauls/Bluetooth_LE_MITM import logging import scapy.layers.bluetooth as bt from .helpers import setup_logging class BluetoothHandler: """ Representing a Bluetooth LE interface, and offering scanning, connecting, transmitting, etc Build upon the socket of the underlying socket_handler and Scapy HCI c...
<reponame>cogerk/walk-up-music-scrapper<gh_stars>0 """ Public API for all plots supported by HoloViews, regardless of plotting package or backend. Every plotting classes must be a subclass of this Plot baseclass. """ from itertools import groupby, product from collections import Counter, defaultdict import numpy as n...
<filename>shb-vgg/exp/12-05_13-19_SHHB_VGG_1e-05_[norm+flip]/code/old-cca/loaders.py import csv import math import os from glob import glob import cv2 import numpy as np from scipy.io import loadmat def get_density_map_gaussian(im, points): """ Create a Gaussian density map from the points. Credits: https://githu...
0 0 0 0 0 0 0 0 0] ... sage: L = M[0].integral_structure(); L Free module of degree 19 and rank 2 over Integer Ring Echelon basis matrix: [ 0 1 1 0 -2 1 -1 1 -1 -2 2 0 0 0 0 0 0 0 0] [ 0 0 3 0 -3 2 -1 2 -1 -4 2 -1 -2 1 2 0 0 -1 1] sage: K.coordinate_module(L) Free module of degree 8 and rank 2 over Integer Ring...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test suite for zcomx/modules/tumblr.py """ import datetime import unittest import uuid from bs4 import BeautifulSoup from pydal.objects import Row from applications.zcomx.modules.activity_logs import ActivityLog from applications.zcomx.modules.book_pages import BookP...
in deleted_sample_files: deleted_sample_files.append( ctx_file_name ) else: sample_files.append( ctx_file_name ) tmp_ctx_file_name = os.path.join( dir, ctx_file_name.replace( '.sample', '' ) ) fh = open( tmp_ctx_file_name, 'wb' ) fh.write( fctx.data() ) fh.close() return sample_files, deleted_sample_files def ...
<reponame>WinterSnowfall/gog_gles<filename>scripts/gog_builds_scan.py<gh_stars>0 #!/usr/bin/env python3 ''' @author: <NAME> @version: 3.00 @date: 20/04/2022 Warning: Built for use with python 3.6+ ''' import json import threading import sqlite3 import signal import requests import logging import argparse import diffl...
in ['AccessKeyId', 'SecretAccessKey', 'SessionToken']): return { 'AccessKeyId': creds['AccessKeyId'], 'SecretAccessKey': creds['SecretAccessKey'], 'Token': creds['SessionToken'] }, 'webidentity:' + ','.join([role_arn, token_file]) # Fail if credentials cannot be fetched from the given aws_creds_uri if is_fatal:...
args.eph_de_rotated: num_ephs = len(psr[0].roemer.keys()) ephnames = psr[0].roemer.keys() elif args.eph_de_rotated: num_ephs = len(sorted(glob.glob(nxdir+'/data/de_rot/de*-rot.npy'))) ephnames = ['DE'+ii.split('rot/de')[-1].split('-rot.npy')[0] for ii in sorted(glob.glob(nxdir+'/data/de_rot/de*-rot.npy'))] else:...
return response def reset_instance( self, request: Union[service.ResetInstanceRequest, dict] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Resets a notebook instance. Args: request (Union[google.clou...
<filename>A3/code/others/utils.py<gh_stars>1-10 """ All functions combined """ import math import cv2 import matplotlib.pyplot as plt import numpy as np HARRIS = False FEATURE_EXTRACTOR = 'brisk' # 'sift'|'surf'|'brisk'|'orb' FEATURE_MATCHER = 'bf' # 'bf'|'knn' NUM_GOOD_MATCHES = 200 LOWES_RATIO = 0.75 SCALING = 20 #...
+ "$root", name : "", data : { "$type" : "none", "$width" : 1, "$height" : 1 }, children : ch }; delegate.loadJSON(root); this.normalizeDims(); delegate.compute(); delegate.select(delegate.root); if (animate) { if (isH) { delegate.fx.animate({ modes : ["node-property:width:dimArray"], duration : 1500, ...
<gh_stars>0 import pytest import requests import logging import json import copy import random # ----------------------------------- basic ----------------------------------- class TestHTTPBasic: default_conf = {'cpu_cache_capacity': 4, 'cache_insert_data': False, 'use_blas_threshold': 1100, 'gpu_search_threshold': ...
#@+leo-ver=5-thin #@+node:peckj.20150428142633.1: * @file python_terminal.py #@@language python #@@tabwidth -4 # this code from http://stackoverflow.com/questions/12431555/enabling-code-completion-in-an-embedded-python-interpreter # with modifications from <NAME> # to do: # styling #@+<< docstring >> #@+node:peckj....
CIN HAU SANDHI GLOTTAL STOP FINAL': 72426, 'PAU CIN HAU SANDHI TONE': 72428, 'PAU CIN HAU SANDHI TONE FINAL': 72430, 'PAU CIN HAU SANDHI TONE LONG': 72427, 'PAU CIN HAU SANDHI TONE LONG FINAL': 72429, 'PAW PRINTS': 128062, 'PDF': 983220, 'PDI': 983229, 'PEACH': 127825, 'PEAR': 127824, 'PEDESTRIAN': 128694, 'PEN OVER ST...
<reponame>dvds/mkvedit<gh_stars>0 """Contains functions to edit a matroska file.""" from collections import namedtuple from inspect import getmembers, isfunction from os import SEEK_CUR from sys import argv, modules from ebml.core import encode_element_id, encode_element_size, encode_unicode_string, encode_unsigned...
= "fast" # Not so bad elif scenario == 3: familiar_left = 0 familiar_lower = 1 familiar_right = 2 familiar_upper = 3 speed_left = "fast" speed_lower = "fast" speed_right = "fast" speed_upper = "fast" elif scenario == 4: familiar_left = 0 familiar_lower = 1 familiar_right = 2 familiar_upper...
"""This file contains the various potential functions we have defined.""" import numpy as np import math try: import cPickle as pickle except: import pickle def cosine_potential(coords): """ Calculate the Potential Energy and Force of Cos(x). Parameters: ----------- coords : float (or array of floats) Loca...
# MIT License # # Copyright (c) 2016-2018 <NAME>, <NAME>, <NAME>, <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
self, *, id: str = None, version: int = None, created_at: datetime.datetime = None, last_modified_at: datetime.datetime = None, last_modified_by: typing.Optional["LastModifiedBy"] = None, created_by: typing.Optional["CreatedBy"] = None, sequence_number: int = None, resource: "Reference" = None, resource_versi...
# 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...
from pyjamas_core import Supermodel from pyjamas_core.util import Input, Output, Property from datetime import datetime, timedelta from Models._utils.time import datetime2utc_time, utc_time2datetime import numpy as np from pytz import timezone import json from scipy.interpolate import griddata import pandas as pd impor...
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import pytest from ansible.module_utils import ...
True else: end_point = (x, y) if prior_rect: graph.delete_figure(prior_rect) if upper_back: graph.delete_figure(upper_back) graph.delete_figure(lower_back) if None not in (start_point, end_point): ymin = min(start_point[1], end_point[1]) ymax = max(start_point[1], end_point[1]) width = ymax - ymin...
import collections from itertools import dropwhile import logging from typing import Iterator, Optional from .plugin import SimStatePlugin from ..errors import AngrError, SimEmptyCallStackError l = logging.getLogger(name=__name__) class CallStack(SimStatePlugin): """ Stores the address of the function you're in a...
<reponame>RisjioMaujio/Portal-Of-Programs<filename>Webportal/webportal.py import webbrowser import datetime import os from tabulate import * import csv import pandas as pd import sys import os navigator_symbol = "/" if os.name == "nt": navigator_symbol = "\\" display=open(r"assets"+navigator_symbol+"websit...
## # filegdb.py # # Description: Read file geodatabase, create tables for subtypes and domains # Prepare sql scripts for indexes and foreign key constraints # Author: <NAME> # Copyright: Cartologic 2017-2020 # ## from os import getcwd, mkdir, path from ruamel.yaml import YAML from slugify import slugify import arcpy ...
# -*- test-case-name: epsilon.test.test_juice -*- # Copyright 2005 Divmod, Inc. See LICENSE file for details import warnings, pprint import keyword import io import six from twisted.internet.main import CONNECTION_LOST from twisted.internet.defer import Deferred, maybeDeferred, fail from twisted.internet.protocol imp...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # standard modules import glob import itertools import json import os from collections import defaultdict # third party modules import luigi import unicodecsv as csv # local modules from alleletraj import utils from alleletraj.ancient.snps import AncientSNPsP...
self.weight_percentile: temp_w_min = w_min.clone() temp_w_max = w_max.clone() # temp_w_min = x_transform.min(dim=1)[0] # temp_w_max = x_transform.max(dim=1)[0] for i in range(self.group_number): w_min[i * group_length: (i + 1) * group_length] = \ temp_w_min[i * group_length: (i + 1) * group_length].min().repeat...
encountered an uncategorized error condition """ Arg1 = self return self._execute('ResumeEchoRequest', payload=locals(), response_object=None) def ResumeEchoRequest(self, SessionIndices): """Executes the resumeEchoRequest operation on the server. Resume Sending Echo Request Messages Args: ...
fs.username = request.user.username fs.repo_id = repo_id fs.path = path fs.token = token try: fs.save() except IntegrityError, e: return api_err(status.HTTP_500_INTERNAL_SERVER_ERROR, e.msg) http_or_https = request.is_secure() and 'https' or 'http' domain = RequestSite(request).domain file_shared_link = '%s...
# # Sublime Text 2/3 SimpleSync plugin # # based on https://github.com/tnhu/SimpleSync # import os # import sys import platform import subprocess import threading # import re import sublime import sublime_plugin import zipfile # print(os.path.join(sublime.packages_path(), 'Default')) # Caches #__name__ # ST3 bug with...
def test_simple_array_alloc_scatter(self): alloc_shape = [2, 3, 4] value_shape = [1, 3, 4] input_features = [('alloc_shape', datatypes.Array(len(alloc_shape))), ('value', datatypes.Array(*value_shape)), ('index', datatypes.Array(1))] output_features = [('output', None)] builder = neural_network.NeuralNetworkBui...
<reponame>YoavLotem/NeuriteOutgrowth import numpy as np def segment_nuclei_by_quarters(dapi_im, nuclei_maskrcnn): """ Performs Nuclei instance segmentation to the DAPI image by dividing it to 4 quarters and performing instance segmentation to each quarter seperately, then combining the results. This procedure all...
possible, just after any existing gates on ``self``'s qubit wires. * `late` - add the gate in the last open time moment in ``self``, unless a conflict arises, in which case, add the gate in the next (new) time moment. * `next` - add the gate in the next (new) time moment. copy (bool): copy the gate or not? (default ...
+ 1 top_level_item = top_level_item.parent() top_level_item = top_level_item.child(0) # cause the top level ist not the service, but the header try: resp_org = str(top_level_item.data(1, 0).respOrg) self.dlg.labelOrga.setText(resp_org) except: QgsMessageLog.logMessage("No attribute respOrg for this resource", 'G...
<gh_stars>0 """Copyright 2016 Mirantis, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
AccountWithRestoreAccess: **[REQUIRED]** The identifier of the AWS customer account that can no longer restore the specified snapshot. :rtype: dict :returns: """ pass def rotate_encryption_key(self, ClusterIdentifier: str) -> Dict: """ Rotates the encryption keys for a cluster. See also: `AWS API Documentatio...
= api.datacenters_labels_find_by_key_with_http_info(datacenter_id, key, async_req=True) >>> result = thread.get() :param datacenter_id: The unique ID of the Data Center (required) :type datacenter_id: str :param key: The key of the Label (required) :type key: str :param pretty: Controls whether response is prett...
Check Analysis: {}'.format(check_analysis)) log_file_logger.error('#17: Users with empty passwords: {}\n'.format(users_emptypass)) writeFile(report_file, 'Result: WARNING - {}\n'.format(check_analysis)) writeFile(report_file, 'Action: {}\n\n'.format(check_action)) else: log_file_logger.info('#...
Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.3) Gecko/200409...
<reponame>mikeshardmind/salamander # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Original Author: https://github.com/Rapptz # This file contains code which was copi...
<filename>quest/lib/structure/Structure.py import os from copy import deepcopy, copy from collections import OrderedDict import tempfile import numpy as np import lib from lib.math.linalg import vector from lib.structure import cStructure from lib.io.PDB import Pdb import os.path clusterCriteria = ['maxclust', 'in...
<filename>mne/minimum_norm/resolution_matrix.py # -*- coding: utf-8 -*- """Compute resolution matrix for linear estimators.""" # Authors: <EMAIL> # # License: BSD-3-Clause from copy import deepcopy import numpy as np from .. import pick_channels_forward, EvokedArray, SourceEstimate from ..io.constants import FIFF fro...
""" Working with Lackenby"s taut ideal triangulations as described in http://arxiv.org/abs/math/0003132 A taut ideal triangulation gives an angle structure where all the angles are 0 or pi. Such an angle structure gives instructions on how to turn the 2-skeleton of the ideal triangulation into a branched surfac...
ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. # END OF TERMS AND CONDITIONS # How to Apply These Terms to Your New Programs # If you develop a new program, and you want it to be of the greatest # possible use to the public, the best way to achieve this is to make it # free software which everyone can red...
<reponame>cuihantao/Andes<gh_stars>10-100 # [ANDES] (C)2015-2022 <NAME> # # 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; either version 3 of the License, or # (at your option) any later version...
<reponame>riseofthetigers/GDAL # This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.12 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(...
[] for model_input_file in model_input_files: arr = np.loadtxt(model_input_file) org_file = df.loc[df.model_file==model_input_file,"org_file"].values org_file = org_file[0] org_arr = np.loadtxt(org_file) if "zone_file" in df.columns: zone_file = df.loc[df.model_file == model_input_file,"zone_file"].dropna().un...
<reponame>Kodeworks/imu-fpv-processor<gh_stars>1-10 """ Assumptions: 1. If any single value in a row of 5 values is NaN, then the entire row is NaN Explainations: Pose - Both position and orientation of an object DOF/dof - Degree of freedom, here used to describe data from one of the six sensor readings (acc x-y...
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # justice-platform-service (4.10.0) # pylint: disabl...
<reponame>zhuokaizhao/artifice """Implements artifice's detection scheme from end to end. """ import os from time import time import itertools import numpy as np from stringcase import snakecase import tensorflow as tf from tensorflow import keras from artifice.log import logger from artifice import dat from artifice...
"""Manager utility implementations of authorization managers.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods # Number of methods are defined in specification # pylint: disable=too-many-ancestors # Inheritance defined in specification from ..osid impor...
self.assertEqual(cert_pattern, f"software:x_misp_certificate = '{certificate}'") self.assertEqual(domain_pattern, f"software:x_misp_domain = '{domain}'") self._populate_documentation( misp_object = event['Event']['Object'][0], indicator = self.parser.stix_objects[-1] ) def test_event_with_android_app_observable_...
""" Admin objects declaration for Nine CMS """ __author__ = '<NAME>' __copyright__ = 'Copyright 2015, <NAME>' __licence__ = 'BSD-3' __email__ = '<EMAIL>' from django.contrib import admin, messages from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.conf import settings ...
"heatsource/4/state" ] self.checkEvents(send, expect) def testHeatSourceSolarEast(self): # test the heat source logic self._log.debug( "testHeatSourceSolarEast" ) self.loadPrimitive( "PersistZonesAll", TestHeatingVentilationACConfigHeatSource3, (heatSource3FileList,) ) # the events we send send ...
description self._description=[] for rn,newcol in self.col: if newcol.iFldType==_SQL_NUMERIC or newcol.iFldType==_SQL_DECIMAL: dsize=newcol.iUnits1+newcol.iUnits2+1 isize=newcol.iUnits1+newcol.iUnits2 elif newcol.iFldType==_SQL_SMALLINT: dsize=5 isize=2 elif newcol.iFldType==_SQL_INTEGER: dsize=10 ...
import numpy as np import os import h5py import json from .utils import asymptotic_error_quantile, bootstrap,\ dict_to_margins, margins_to_dict, matrix_to_list from sklearn.utils import check_random_state from scipy.stats import gaussian_kde, norm from .vinecopula import Conversion class ListDependenceResult(list)...
# ============================================================================== # This file is part of the SPNC project under the Apache License v2.0 by the # Embedded Systems and Applications Group, TU Darmstadt. # For the full copyright and license information, please view the LICENSE # file that was distributed wit...
445 446 380 1 535 3 0 419 420 377 1 536 3 0 418 419 376 1 537 3 0 417 418 375 1 538 3 0 444 417 374 1 539 3 0 443 444 373 1 540 3 0 414 415 370 1 541 3 0 413 414 369 1 542 3 0 412 413 368 1 543 3 0 442 412 367 1 544 3 0 441 442 366 1 545 3 0 440 451 363 1 546 3 0 439 452 360 1 547 3 0 428 455 388 1 548 3 0 427 456 385 ...
0) BridgeType (str(bridges|providerBridges)): NOT DEFINED CistRegRootCost (number): (For use with PVST+ and RPVST+ only) The Common Spanning Tree (CST) root path cost. The valid range is 0 to 4294967295. (default = 0) CistRegRootMac (str): (For use with PVST+ and RPVST+ only) The Common Spanning Tree (CST) ...
""" Provides functionality related to Maya GUI controls. """ import re import maya.cmds as mc import maya.mel as mel class Control(object): """ Represents a single UI control contained within a Gui. Provides a wrapper for the MEL command associated with whatever control type, including methods to edit and query ...
<filename>core/ability.py<gh_stars>0 from core.afflic import AFFLICT_LIST class Ability: COND_ELE = ('flame', 'water', 'wind', 'light', 'shadow') COND_WT = ('axe', 'blade', 'bow', 'dagger', 'lance', 'staff', 'sword', 'wand') def __init__(self, name, mod=None): self.name = name self.mod = mod or [] def check_ele...
repos_by_tag: result.append(rel_matcher.match_releases_by_tag( repos_by_tag, time_from, time_to, release_settings)) if repos_by_branch: result.append(rel_matcher.match_releases_by_branch( repos_by_branch, branches, default_branches, time_from, time_to, release_settings)) result = await gather(*result) result = p...
# MIT License # # Copyright (c) 2019 SSL-Roots # # 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, pu...
shuffle != 0: if words[0] not in interactomeNodes: interactomeNodes.append(words[0]) if words[1] not in interactomeNodes: interactomeNodes.append(words[1]) line = e.readline() e.close() # dirEndpoints stores edge endpoints of all directed edges together in one set # dirEdges is dict<str, dict<str, str>> dirEn...
'2'), 2): 385.262403905, (('0', '-1', '2', '2', '0', '-1', '1', '-1'), 1): -1000, (('1', '2', '2', '-1', '1', '2', '-1', '-1'), 1): -76.76, (('1', '1', '0', '1', '0', '1', '1', '1'), 3): -100, (('0', '2', '1', '2', '2', '1', '0', '2'), 2): 256.668440335, (('2', '-1', '1', '2', '1', '-1', '2', '-1'), 3): 738.022273...
import threadsafe_tkinter as tk import tkinter.ttk as ttk from copy import deepcopy from traceback import format_exc from binilla import editor_constants as e_c from binilla.widgets.scroll_menu import ScrollMenu from binilla.widgets.field_widgets import field_widget, container_frame,\ data_frame class ArrayFrame(c...
<reponame>Exlsunshine/mlprodict """ @file @brief Implements a class able to compute the predictions from on an :epkg:`ONNX` model. """ from collections import OrderedDict from io import BytesIO import json from time import perf_counter import warnings import numpy from onnx import load, load_model, checker, shape_infer...
WorkflowExecutionId, the AWS queue and state machine resources assiciated with the workflow execution and the current execution status of the workflow. .. code-block:: python { "Name": string, "StartAt": "Preprocess", "Stages": { "stage-name": { "Type": "NestedQueue", "Resource": queueARN, "StateMachine": s...
<reponame>pierricklee/tensorflow<gh_stars>0 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
<gh_stars>1-10 # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator....
<gh_stars>0 #!/usr/bin/env python # # 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, publish, dist...
<reponame>SeoFernando25/The-dawn-of-Otrozhny # Just placed some draw functions here because # otherwise it would become messy import textDraw import renderer import colors import entities def render_tutorial_tab_1(): textDraw.message_display_MB( renderer.SCREEN, "Enemy Status", renderer.SCREEN_WIDTH//1...
<gh_stars>10-100 """Test for serializer's get_collection.""" from sqlalchemy_jsonapi import errors from sqlalchemy_jsonapi.unittests.utils import testcases from sqlalchemy_jsonapi.unittests import models from sqlalchemy_jsonapi import __version__ class GetCollection(testcases.SqlalchemyJsonapiTestCase): """Tests f...
<gh_stars>0 """ Functions to visualize matrices of data. It is a custom version of a Heatmap allowing cells size's customization. It is based on matrix.py in https://github.com/mwaskom/seaborn by <NAME> ( commit id: https://github.com/mwaskom/seaborn/pull/1830 ) """ from __future__ import division import itertoo...
in use by issuing the PLNSOL,TEMP command (with PowerGraphics and /ESHAPE active). The /ESHAPE,1 and /ESHAPE,FAC commands are incompatible with the /CYCEXPAND command used in cyclic symmetry analyses. This command is valid in any processor. """ warnings.warn( "pymapdl does not support /ESHAPE when plotting i...
<https://docs.microsoft.com/en-us/bing/bing-news-search/overview>`_ parameter. :type headline_count: int :param market: The market where the results come from. Typically, mkt is the country where the user is making the request from. However, it could be a different country if the user is not located in a country wh...
<reponame>Komanawa-Solutions-Ltd/SLMACC-2020-CSRA """ Author: <NAME> Created: 3/11/2020 9:07 AM """ import numpy as np import pandas as pd import copy def calc_smd(rain, pet, h2o_cap, h2o_start, a=0.0073, p=1, return_drn_aet=False): """ calculate the soil moisture deficit from aet, assuems that if these are arr...
ключа if key: key = key else: # присваивание ключую значения введенного пользователем key = message.text # подключение к БД sqlither = SQLighter(message.from_user.id) # поиск класса по ключу введенному пользователем name = sqlither.search_class(key) # в случае, если такого класса не существует вывод Exception...
updated', 'Relatives': 'Relatives', 'Relief': 'Relief', 'Relief Team': 'Relief Team', 'Religion': 'Religion', 'Religious': 'Religious', 'Religious Leader': 'Religious Leader', 'Relocate as instructed in the <instruction>': 'Relocate as instructed in the <instruction>', 'Remote Error': 'Remote Error', 'Remove': 'Remove'...
curve_address_provider_abi = [ { "name": "NewAddressIdentifier", "inputs": [ {"type": "uint256", "name": "id", "indexed": True}, {"type": "address", "name": "addr", "indexed": False}, {"type": "string", "name": "description", "indexed": False}, ], "anonymous": False, "type": "event", }, { "name": "AddressMo...
<reponame>konradko/directory-api<filename>company/tests/test_views.py import datetime import http from io import BytesIO import uuid from unittest import mock from directory_constants import company_types, choices, sectors, user_roles from elasticsearch_dsl import Index from elasticsearch_dsl.connections import connec...
at this stage? vm.events_enabled = False self._test_generic_bool_property(vm, 'autostart', False) @vanir.tests.skipUnlessDom0 def test_281_autostart_systemd(self): vm = self.get_vm() self.assertFalse(os.path.exists( '/etc/systemd/system/multi-user.target.wants/' 'vanir-vm@{}.service'.format(vm.name)),...
#!/usr/bin/env python2 import sys from datetime import date, timedelta from StringIO import StringIO from copy import copy import psycopg2 import codecs import zipfile #from settings.const import beltac_database_connect #Can be run standalone as python beltacreader.py $path $filename charset = 'cp1252' # yes, this is...
value; if omitted, an empty list is used. :args**kwds: Optional additional keyword arguments, passed to base class. """ if default is None: default = [] if item_type is not None and item_type not in ALLOWED_PROPERTY_TYPES: raise ValueError('item_type %s not in %s' % (item_type, ALLOWED_PROPERTY_TYPES)) self.i...
<filename>secv_guis/bimask_app/main_window.py # -*- coding:utf-8 -*- """ This module contains the logic and widgets pertaining to the main window of the bimask app: An app that allows displaying an image, editing a mask on it and also displaying/editing a preannotation mask. It can be used to efficiently annotate la...