input
stringlengths
2.65k
237k
output
stringclasses
1 value
= int(8e6) """ ################################################################################ ID Step maxR | avgR stdR avgS stdS | expR objC etc. 6 4.05e+03 34.11 | 6 4.05e+03 34.11 | 34.11 0.4 38 0 | 0.05 0.80 0.84 0.33 6 1.17e+05 62.90 | 6 1.17e+05 62.90 | 62.90 0.7 38 0 | 0.11 0.33 14.94 0.28 6 1.96e+05 313.13 |...
= kE2BT2+2 kY1 = kE2BT2+3 kY2 = kE2BT2+4 kY3 = kE2BT2+5 kY4 = kE2BT2+6 kY5 = kE2BT2+7 kY6 = kE2BT2+8 kY7 = kE2BT2+9 kY8 = kE2BT2+10 kY9 = kE2BT2+11 kY0 = kE2BT2+12 kX1T = kE2BT2+13 kY1T = kE2BT2+14 kX2T = kE2BT2+15 kY2T = kE2BT2+16 kX3T = kE2BT2+17 kY3T = kE2BT2+18 kX4T = kE2BT2+19 kY4T = kE2BT2+20 kX5T = kE2BT2+21 kY5...
<reponame>albinger/Adafruit_Learning_System_Guides<filename>PyPortal_EZ_Make_Oven/code.py # SPDX-FileCopyrightText: 2019 <NAME> for Adafruit Industries # # SPDX-License-Identifier: MIT import time import json import array import math import gc import board import busio import audioio import audiocore import displayio ...
<reponame>KrishanBhasin/giraffez # -*- coding: utf-8 -*- # # Copyright 2016 Capital One Services, LLC # # 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/LICENS...
# -*- coding: utf-8 -*- """ The :mod:`PyDynamic.uncertainty.propagate_DFT` module implements methods for the propagation of uncertainties in the application of the DFT, inverse DFT, deconvolution and multiplication in the frequency domain, transformation from amplitude and phase to real and imaginary parts and vice ve...
'73.0.3683.78', '74.0.3729.9', '74.0.3729.8', '74.0.3729.7', '75.0.3731.3', '75.0.3731.2', '75.0.3731.0', '74.0.3729.6', '73.0.3683.77', '73.0.3683.76', '75.0.3730.5', '75.0.3730.4', '73.0.3683.75', '74.0.3729.5', '73.0.3683.74', '75.0.3730.3', '75.0.3730.2', '74.0.3729.4', '73.0.3683.73', '73.0.3683...
np.array_equal(state, 0): raise Exception("Game has already ended!") if explore: move = env.get_random_action() move_from = move.from_square move_to = move.to_square else: action_space = env.project_legal_moves() # The environment determines which moves are legal action_values = self.get_action_values(np.expan...
vec1 = coords[j] - coords[i] vec2 = coords[k] - coords[i] if all(np.linalg.norm(vec) < max_triple_dist for vec in (vec1, vec2)): avg_vec = (vec1 + vec2) / 2.0 possible_axes.append(avg_vec/np.linalg.norm(avg_vec)) perp_vec = np.cross(vec1, vec2) possible_axes.append(perp_vec/np.linalg.norm(perp_vec)) unique_po...
# Created by fshaw at 13/09/2018 from dal.copo_da import Submission, DataFile import requests, os import json import traceback from bson import ObjectId from urllib.request import quote from collections import namedtuple from web.apps.web_copo.schemas.utils.cg_core.cg_schema_generator import CgCoreSchemas from web.apps...
<reponame>deepthiinduri/TRACK_THE_COVID<filename>symptomanalyser.py from tkinter import * from PIL import ImageTk, Image ,ImageDraw, ImageFont, ImageFilter import tkinter.ttk as ttk from ttkthemes import ThemedStyle import webbrowser import ctypes def Syptom_analyser(): newWindow = Toplevel() newWindow.title("SYMPT...
# Copyright 2021 D-Wave Systems 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 writi...
<reponame>AERPAW-Platform-Control/gateway # Copyright (c) 2014-2018 Barnstormer Softworks, Ltd. # 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/. from __future__ import ...
in multiple clusters. # [B, N, K, V, 3] times_idx = tf.concat([batch_idx, q_idx, head_idx], 5)[:, :, :, :, 0, :] # [B, q_length, N] times = tf.scatter_nd( times_idx, tf.cast(tf.ones_like(closest_q), scattered_prob.dtype), [B, q_length, N]) times = tf.maximum(1.0, times[:, :, :, None]) out = scattered_prob / tim...
and RingFileName is None: warning(" No file would be exported") pass array, columns = ReadFile(FilePath=InputFileName, header=0, get_values=True, get_columns=True) path, forwardArray, reversedPath, reversedArray = \ getRingAttachedBondsDatabase(database=array, MoleculeCol=MoleculeCol, BondIdxCol=BondIdxCol, aro...
randomize() instance.enabled = randomize("bool") instance.end_date = randomize("date") instance.targeted_namespace = randomize("slug") instance.disabled_date = randomize("date") return instance def create_accountcommon_list_users_with_platform_accounts_response_example() -> AccountcommonListUsersWithPlatformAcco...
None') evt = api.async_call(self, self.sessionUuid) self.out = evt return self.out class GetCreateEcsImageProgressAction(inventory.APIGetCreateEcsImageProgressMsg): def __init__(self): super(GetCreateEcsImageProgressAction, self).__init__() self.sessionUuid = None self.out = None def run(self): if not self.se...
import fnmatch import glob import os import re import tempfile from gppylib import gplog from gppylib.commands.base import WorkerPool, Command, REMOTE from gppylib.commands.unix import Scp from gppylib.db import dbconn from gppylib.db.dbconn import execSQL from gppylib.gparray import GpArray from pygresql import pg fro...
255);") self.no3_dr.setText("") self.no3_dr.setAlignment(QtCore.Qt.AlignCenter) self.no3_dr.setObjectName("no3_dr") self.no5_dr = QtWidgets.QLabel(self.th3dr) self.no5_dr.setGeometry(QtCore.QRect(540, 400, 211, 31)) font = QtGui.QFont() font.setFamily("Open Sans Light") font.setPointSize(11) self.no5_dr.setFon...
pos_adjustment if length <= 0: # We got all the data we need, go back immediately yield Transition(None, whence) trans = Transition(stream_event, self) @coroutine def _invalid_handler(type_octet, ctx): """Placeholder co-routine for invalid type codes.""" yield raise IonException('Invalid type octet: 0x%02X' %...
<gh_stars>10-100 import copy import json import time from json import JSONDecodeError from typing import List import numpy as np import pandas as pd from pandas.api.types import is_datetime64_any_dtype as is_datetime from pandas.api.types import is_numeric_dtype from typeguard import typechecked from .Report import R...
theme, subtheme, topic, period, difficulty, l_id): # Only show intro once per login if context.c.session.get("showed_test_intro"): page.page_params.set_param("theme", theme) page.page_params.set_param("subtheme", subtheme) page.page_params.set_param("topic", topic) page.page_params.set_param("period", period) ...
# # Copyright (c) 2016-2020, Dell Inc. or its subsidiaries. # All rights reserved. # See file LICENSE for licensing information. # # Module Name: # # transport.py # # Abstract: # # Async event loop, socket handling, and polling mechanisms # # Authors: <NAME> (<EMAIL>) # from builtins import object from errno import ( ...
all goal fields before alignment.' logger.info(msg) return raw_goals.append(goal) logger.info("Starting %s procedure with goals %s", self.procedure, raw_goals) self.install_pick_cam() self.auto_switch_cam = True alignment = self.alignments[self.procedure] for key_set in alignment: yags = [self.loader[key]['i...
<gh_stars>1-10 # -------------------------------------------------------- # Written by <NAME> (https://github.com/JudyYe) # -------------------------------------------------------- from __future__ import print_function import os import os.path as osp from typing import Tuple import numpy as np import torch import tor...
<gh_stars>1-10 import sys import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt plt.ioff() import random from scipy import sparse from scipy.special import comb from scipy.special import gammaln from scipy.special import erfcx from scipy.stats import norm import scipy.stats import s...
considered equal PBC: a list of periodic axes (1,2,3)->(x,y,z) Returns: a single index corresponding to the detected Wyckoff position. If no valid Wyckoff position is found, returns False """ index = check_wyckoff_position(points, wyckoffs, w_symm_all, exact_translation=exact_translation, PBC=PBC) if index is n...
<reponame>theanht1/rasa<filename>tests/test_train.py import logging import secrets import sys import tempfile import os from pathlib import Path from typing import Text, Dict, Any from unittest.mock import Mock import pytest from _pytest.capture import CaptureFixture from _pytest.logging import LogCaptureFixture from ...
#!/usr/bin/env python import numpy as np import sys from warnings import warn class Vertex(object): def __init__(self, x, y, z, name): """ Creates the Vertex Object with Carthesian coordinates Parameters ---------- x: float x coordinate y: float y coordinate z: float z coordinate coordinates: np array ...
from gmspython import * import gams_production,global_settings class pr_static(gmspython): def __init__(self,nt=None,pickle_path=None,work_folder=None,pw='pricewedge',kwargs_ns={},**kwargs_gs): databases = None if nt is None else [nt.database.copy()] super().__init__(module='pr_static',pickle_path=pickle_path,wor...
: iterable object of Feature, optional The features to create the :class:`Annotation` from. if not provided, an empty :class:`Annotation` is created. Examples -------- Creating an annotation from a feature list: >>> feature1 = Feature("CDS", [Location(-10, 30 )], qual={"gene" : "test1"}) >>> feature2 = Feature...
<reponame>maxmouchet/rtt<filename>localutils/pathtools.py """ pathtools.py provides functions handling IP hops, IXP detection and ASN information. """ from . import dbtools as db import os import copy import logging # load database from the local folder cur_path = os.path.abspath(os.path.dirname(__file__)) as_rel = d...
ABSTRACT PROPERTY abs_prop RENAME TO new_abs_prop; """) # Check we can create a new type that uses it await self.con.execute(""" CREATE TYPE RenameObj2 { CREATE PROPERTY prop EXTENDING new_abs_prop -> str; }; """) # Check we can create a new prop with the same name await self.con.execute(""" CREATE ABSTRAC...
kills the scheduler """ def __init__ (self): pass def execute (self, task, scheduler): scheduler.quit() class Sleep (BlockingOperation): """ Sleep for specified amount of time (seconds) None means unscheduler (i.e., sleep until an outside force wakes it) 0 means reschedule for later (no additional time) ""...
'qiáo', 0x77A8: 'pú', 0x77A9: 'zhǔ', 0x77AA: 'dèng', 0x77AB: 'shěn', 0x77AC: 'shùn', 0x77AD: 'liǎo,liào', 0x77AE: 'chè', 0x77AF: 'xián,jiàn', 0x77B0: 'kàn', 0x77B1: 'yè', 0x77B2: 'xuè', 0x77B3: 'tóng', 0x77B4: 'wǔ,mí', 0x77B5: 'lín', 0x77B6: 'guì,kuì', 0x77B7: 'jiàn', 0x77B8: 'yè', 0x77B9: 'ài', 0x77...
self.object, nazwa_urzadzenia = 'Czujnik objętości cieczy', nr_urzadzenia = 'x', opis_czynnosci = 'Legalizacja ponowna', jednostka_dozorowa = 'OUM w Zielonej Górze', data_ostatniej_czynnosci = now, nr_decyzji = 'Świadectwo Legalizacji ponownej znak wniosku: WZ4.400.864.18.2018', data_najblizszej_czynnosci = now,...
import logging import click import os import traceback import json import sys from aeternity import __version__ from aeternity.epoch import EpochClient from aeternity.config import Config, MAX_TX_TTL, ConfigException # from aeternity.oracle import Oracle, OracleQuery, NoOracleResponse from aeternity.signing import Ke...
<reponame>AdvaitDhingra/vector<gh_stars>10-100 # Copyright (c) 2019-2021, <NAME>, <NAME>, <NAME>, and <NAME>. # # Distributed under the 3-clause BSD license, see accompanying file LICENSE # or https://github.com/scikit-hep/vector for details. import typing def _recname(is_momentum: bool, dimension: int) -> str: nam...
except AttributeError as err: raise ImportError(f'Module {module_path} does not define a {class_name} attribute/class') from err def get_attr_if_exists(obj: Any, attr: str) -> Union[object, None]: if hasattr(obj, attr): return getattr(obj, attr) return None def time_format(seconds: float, format_='%H:%M:%S') ->...
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. ''' This module contains: * all low-level code for extracting, linking and unlinking packages...
hasattr( visitor, "visitLexerAtomCharSet" ): return visitor.visitLexerAtomCharSet(self) else: return visitor.visitChildren(self) class LexerAtomWildcardContext(LexerAtomContext): def __init__(self, parser, ctx:ParserRuleContext): # actually a ANTLRv4Parser.LexerAtomContext super().__init__(parser) self.copyFr...
:type P1: gp_Parab2d :param D1: :type D1: IntRes2d_Domain & :param P2: :type P2: gp_Parab2d :param D2: :type D2: IntRes2d_Domain & :param TolConf: :type TolConf: float :param Tol: :type Tol: float :rtype: None * Intersection between a parabola and an hyperbola. :param P: :type P: gp_Parab2d :param DP: ...
self.shape_info = {'dims': self.state.dims, 'coords': self.state.coords} else: self.state = np.array([init_state_value] * self.order) def __call__(self): if self.shape_info: return self.state[-1].reset_coords('_smooth', drop=True) else: return self.state[-1] def ddt(self): targets = np.roll(self.state, 1, a...
''' Code for handling files that are band sequential (BSQ). ''' from __future__ import absolute_import, division, print_function, unicode_literals import array import logging import numpy as np import os import sys import spectral as spy from ..utilities.python23 import typecode, tobytes, frombytes from .spyfile imp...
numberOfErrors + 1 wrongChars = wrongChars + "w" + ", " if guessChar == "X" or guessChar == "x" : if word[1] == "X" or word[1] == "x" : toGuess = toGuess[:1] + "x" + toGuess[2:] if word[2] == "X" or word[2] == "x" : toGuess = toGuess[:2] + "x" + toGuess[3:] if word[3] == "X" or word[3] == "x" : ...
#*****************************************************************************# #* Copyright (c) 2004-2008, SRI International. *# #* All rights reserved. *# #* *# #* Redistribution and use in source and binary forms, with or without *# #* modification, are permitted provided that the following conditions are *# #...
with the getCounterparts def getLinkedEntitiesByTemplateType(self, splitPath, isMeme, linkType = 0, forcedContinue = False, excludeLinks = [], returnUniqueValuesOnly = True, excludeCluster = []): """ This is a critically important method for finding associated (linked) entities. It parses the link path and follows e...
<filename>tests/test_style_api.py # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import pytest from datacube_ows.styles.api import (StandaloneStyle, apply_ow...
import random from excel4lib.macro.excel4_macro_extension import * from excel4lib.utils import * from excel4lib.macro.excel4_instruction import * from excel4lib.macro.excel4_argument import * from excel4lib.macro.excel4_formula import * from excel4lib.macro.excel4_value import * from excel4lib.macro.excel4_variable i...
# The master_shortname_mol_dict # Get it from the pickle file print("Getting master_shortname_mol_dict from pickle file") master_shortname_mol_dict = get_obj_from_pickle_file(master_shortname_mol_dict_pickle) return master_mol_dict, master_shortname_mol_dict #######################################################...
<gh_stars>0 import numpy as np import os from utils.io import IO path = os.path class Feature: def __init__(self, feature_id, class_id, class_name, start_clip_number, end_clip_number, event_id=None): """Create a new 'Feature' object. Args: feature_id: The position of the feature in the source video relative t...
ymax > self._state_dims[1]: # ymax = self._state_dims[1] # screen_ymax = screen_ymin + len(np.arange(ymin, ymax, self.yscale)) # if zmax > self._state_dims[2]: # zmax = self._state_dims[2] # screen_zmax = screen_zmin + len(np.arange(zmin, zmax, self.zscale)) # # # take image, mask it w agent trajectory # agent_...
<filename>openapi_client/api/default_api.py<gh_stars>0 # coding: utf-8 """ JDX reference application API This is a collection of schemas and endpoints for the various JDX, Concentric Sky facing REST endpoints, the schemas define an API contract of sorts between the request and response expectations of the JDX refer...
eforearm.tail = pforearm_driven.head else: if arm.helper_bones['arms']['ulna'] and arm.helper_bones['arms']['ulna'][index]: prefix, bone = bone_convert(arm.helper_bones['arms']['ulna'][index]) pulna = armature.pose.bones[prefix + bone] eforearm.tail = pulna.head if arm.symmetrical_bones['arms']['hand'] and arm...
Find best matching ground truth box sorted_ixs = np.argsort(overlaps[i])[::-1] # print('\n', i, ' sorted overlaps:',overlaps[i, sorted_ixs]) for j in sorted_ixs: # If ground truth box is already matched, go to next one if gt_match[j] == 1: continue # If we reach IoU smaller than the threshold, end the loop iou ...
List of strings or integers, each identifying a run :param extra_subdirs: Unpacked list of strings naming subdirectories of the level parent directory :return: Dictionary mapping string keys to string paths """ lvl_paths = {'parent': os.path.join(lvl_dir, sub_base + '_' + feat_name)} for run in runs: lvl_paths[...
<gh_stars>1-10 import pymongo import math import datetime import requests import json import numpy as np from astropy.time import Time import matplotlib.pyplot as plt import os from bs4 import BeautifulSoup import re from typing import Union import pyprind from zwickyverse import Private import glob date_type = Union...
Keras | neural network (sieci neuronowe) # Feed these vectors into a neural network classifier # basic layer architecture (1) model = Sequential() model.add(Dense(32, activation='relu', input_dim=200)) # 'sigmoid' model.add(Dense(1, activation='sigmoid')) # 'softmax' model.compile(optimizer='rmsprop', # 'ad...
], "url":"Limiter", \n' ' "tip":"Released under terms of the GNU General Public License ' 'version 2" },\n' ' { "id":"Limiter", "name":"Limiter", "params":\n' ' [ \n' ' { "key":"type", "type":"enum", "default":"SoftLimit", "enum":\n' ' [ "SoftLimit", "HardLimit", "SoftClip", "HardClip" ] },\n' ' { "key":"gain-L"...
# -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All rights reserved. # Copyright 2015 <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-...
constant? plc = 0x33 def __init__(self, kp_sn: str, sequence: int, bs_sn: str): self.bs_sn = bs_sn super().__init__(self.plc, kp_sn, sequence, self.msg_type, self.info_type, self.event_type, self.payload_body, self.footer_body) @classmethod def factory(cls, msg: BaseStationKeypadMessage, recurse: bool=True): i...
<reponame>ahameedx/intel-inb-manageability """ Allows API of xlink driver C library to be called in Python. Copyright (C) 2019-2022 Intel Corporation SPDX-License-Identifier: Apache-2.0 """ import logging import threading import os from ctypes import * from threading import Lock from typing import Callable, Tuple ...
main complaint at last visit"), "achievement"), "termination_type_id", S3SQLInlineComponent( "document", name = "file", label = T("Attachments"), fields = ["file", "comments"], filterby = {"field": "file", "options": "", "invert": True, }, ), "comments", ) # Custom list fields list_fields = ["person_id"...
"meta", MetaSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extens...
packed units (mm, 1e-3 m) #-- Altitude of COG above reference ellipsoid (interpolated value) Data_1Hz['Alt_1Hz'] = np.zeros((n_records),dtype=np.int32) #-- Roll: packed units (0.1 micro-degree, 1e-7 degrees) Data_1Hz['Roll'] = np.zeros((n_records),dtype=np.int32) #-- Pitch: packed units (0.1 micro-degree, 1e-...
#! /usr/bin/env python3 # Read from stdin, spit out C header or body. import argparse import copy import fileinput import re from collections import namedtuple Enumtype = namedtuple('Enumtype', ['name', 'value']) type2size = { 'pad': 1, 'struct channel_id': 32, 'struct short_channel_id': 8, 'struct ipv6': 16, ...
import os # If server, need to use osmesa for pyopengl/pyrender if os.cpu_count() > 20: os.environ['PYOPENGL_PLATFORM'] = 'osmesa' # https://github.com/marian42/mesh_to_sdf/issues/13 # https://pyrender.readthedocs.io/en/latest/install/index.html?highlight=ssh#getting-pyrender-working-with-osmesa else: os.environ[...
= -0.0000962359705999109 struct[0].Gy[1,31] = 0.000333217048202192 struct[0].Gy[2,2] = -1 struct[0].Gy[2,16] = 0.000966678295179781 struct[0].Gy[2,17] = -0.00000962359705999139 struct[0].Gy[2,18] = 0.00273067829517978 struct[0].Gy[2,19] = -0.00706562359705999 struct[0].Gy[2,20] = 0.000966678295179781 struct[0]....
def fit_and_test_model(clf, model_name, model_desc, hyperparams, feats, inspect_feat_coeffs=False): """Fit and test model. Args: clf: classifier model object model_name: short string naming model model_desc: string describing model hyperparams: list [p] of hyperparameters where each p is a string and clf.p giv...
# coding: utf-8 """ MailSlurp API MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailsl...
#!/usr/bin/python """ Distributed id and lock service for transaction support. """ import kazoo.client import kazoo.exceptions import logging import os import re import time import urllib from .inspectable_counter import InspectableCounter from ..dbconstants import MAX_GROUPS_FOR_XG from cassandra.policies import Fal...
# Set flag to tell trigger start that it has to recover its # trigger headers. self.triggerProtected = True def _restoreTrigger(self): """ Restores the triggers to previous settings """ # No need to do this if triggers are running as will have been # recovered already if required. if not self.trigger: self....
<reponame>HSF/iDDS #!/usr/bin/env python # # 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.0OA # # Authors: # - <NAME>, <<EMAIL>>, 2020 - 2021 # - <NA...
import os import shutil import numpy as np from collections import namedtuple import glob import time import datetime import pickle import torch import matplotlib.pyplot as plt from termcolor import cprint from navpy import lla2ned from collections import OrderedDict from dataset import BaseDataset from utils_torch_fil...
# well ties # @author <NAME>, Colorado School of Mines # @version 01.21.2014 from dtw import * from tputils import * from wtutils import * from imports import * # Params: fp = 35 q = 100 dz = getDz() dz2 = getDz2() # Image warping dr1 = 0.02 # 2D smoothness vertically dr2 = 0.50 # 2D smoothness vertically dr3 = 0.5...
''' <plugin key="HivePlug" name="Hive Plugin" author="imcfarla, MikeF and roadsnail" version="2.1-urllib" wikilink="http://www.domoticz.com/wiki/plugins" externallink="https://github.com/imcfarla2003/domoticz-hive"> <description> <h2>Hive Plugin</h2> <h3>Features</h3> <ul style="list-style-type:square"> <li>Thermo...
= m.get('telephone') if m.get('gmt_modified') is not None: self.gmt_modified = m.get('gmt_modified') if m.get('gmt_create') is not None: self.gmt_create = m.get('gmt_create') if m.get('unique_id') is not None: self.unique_id = m.get('unique_id') return self class PaidSpecInstance(TeaModel): def __init__( sel...
# region Description """ base.py: Base class for Raw-packet project (base) Author: <NAME> License: MIT Copyright 2020, Raw-packet Project """ # endregion # region Import from wpoium.plugins.networking.Utils.vendors import vendors_dictionary try: from platform import system, release, linux_distribution except ImportEr...
import networkx as nx import csv import pandas as pd import itertools import json import dedupe from itertools import combinations,product import sys import os import numpy as np from affinegap import normalizedAffineGapDistance import simplejson from tqdm import tqdm import tempfile from dedupe.clustering import clust...
TimelineCategory.MissionSelected, Missions.Contact, ActionTest.NoAT, ), ( "spy", "02:00.0", "seduce target selected.", (None,), (2 * 60 + 00.0), None, (None,), (None,), TimelineCategory.MissionSelected, Missions.Seduce, ActionTest.NoAT, ), ( "spy", "02:00.0", "bug ambassador enabled.", (None,), (2...
# # Copyright (c) 2017-2022 by QA Cafe. # All Rights Reserved. # from builtins import input import getpass import io import os import re import requests from threading import Lock from requests_toolbelt.downloadutils import stream from requests_toolbelt import sessions from requests_toolbelt.utils.user_agent import us...
use when sending faxes from the PC."), self.user_settings.cmd_fab), # SETTINGS/TOOLS (lambda : d.power_settings != POWER_SETTINGS_NONE and avail, self.__tr("Device Settings"), "settings", self.__tr("Your device has special device settings.<br>You may alter these settings here."), lambda : DeviceSetupDialog(sel...
# Copyright 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import csv import cv2 import itertools import json import numpy as np import pickle import time __all__ = ['House'] ###############...
Additional request parameters (provides support for parameters that may be added in the future). Returns: MyDict: JSON response. Access the object's properties by using the dot notation or the bracket notation. Raises: TypeError: If the parameter types are incorrect. MalformedRequest: If the request body creat...
'Zerg', 'type': 'Upgrade', 'is_morph': False, }, 'SIBarracksTrainInfestedCivilianLevel2': { 'build_time': 120, 'built_from': ['SICivilianStructure'], 'display_name': 'Infestation Level 1', 'race': 'Zerg', 'type': 'Upgrade', 'is_morph': False, }, 'SIBarracksTrainInfestedCivilianLevel3': { 'build_time': 120,...
can register more hooks. Applications should take care to avoid creating infinite loops by recursively registering hooks. Hooks are called only for a top-level commit. A savepoint creation does not call any hooks. If the transaction is aborted, hooks are not called, and are discarded. Calling a hook "consumes" i...
col_width_dict=col_width_dict, ) # review_api.review_edges = review_edges return review_api def get_match_status(ibs, aid_pair): """ Data role for status column """ aid1, aid2 = aid_pair assert not ut.isiterable(aid1), 'aid1=%r, aid2=%r' % (aid1, aid2) assert not ut.isiterable(aid2), 'aid1=%r, aid2=%r' % (aid1...
'Error: Undetermined' raise FieldTypeInDevError(fname) if self.flds.shape[0] == 1: self.im(' - Scalar field detected') self.fieldNature = 'Scalar' else: self.im(' - Vectorial field detected: '+str(self.flds.shape[0])+' fields') self.fieldNature ='Vectorial' self.im(' -> '+self.fieldType) self.im('Reading and r...
GL/glext.h:2014 GL_UNSIGNED_IDENTITY_NV = 34102 # GL/glext.h:2015 GL_UNSIGNED_INVERT_NV = 34103 # GL/glext.h:2016 GL_EXPAND_NORMAL_NV = 34104 # GL/glext.h:2017 GL_EXPAND_NEGATE_NV = 34105 # GL/glext.h:2018 GL_HALF_BIAS_NORMAL_NV = 34106 # GL/glext.h:2019 GL_HALF_BIAS_NEGATE_NV = 34107 # GL/glext.h:2020 GL_SIGNED_...
""" Generate `pyi` from corresponding `rst` docs. """ import rst from class_ import Class from rst2pyi import RST2PyI __author__ = rst.__author__ __copyright__ = rst.__copyright__ __license__ = rst.__license__ __version__ = "7.2.0" # Version set by https://github.com/hlovatt/tag2ver def pyb(shed: RST2PyI) -> None: ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import numpy as np from skimage.util import view_as_windows import warnings import tensorflow as tf from tensorflow.python.framework import ops from tensorflow.python.ops import nn_grad, math_grad fr...
<reponame>ulsdevteam/request_broker import re import inflect import shortuuid from request_broker import settings from asnake.utils import get_date_display, get_note_text, text_in_note, resolve_to_uri from ordered_set import OrderedSet CONFIDENCE_RATIO = 97 # Minimum confidence ratio to match against. OPEN_TEXT = ["O...
<filename>pixel_perturbation.py from torchvision import datasets, transforms, utils, models from misc_functions import * from gradcam import grad_cam from functools import reduce from saliency.inputgradient import Inputgrad import gc import argparse import matplotlib.pyplot as plt import numpy as np import torch.nn.fun...
<reponame>gefux/OQuPy # Copyright 2022 The TEMPO Collaboration # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file 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...
"""Find template-based model files, read columns, convert them to n-dim hypercubes, store as HDF5. """ import os, sys, re, warnings import numpy as N import h5py #from externals.padarray import padarray import filefuncs __author__ = "<NAME> <<EMAIL>>" __version__ = "20180921" # TODO: add simple logging class HdfFil...
8, 9, 0)]) def testDailyByMonthAndNWeekDay(self): self.assertEqual(list(rrule(DAILY, count=3, bymonth=(1, 3), byweekday=(TU(1), TH(-1)), dtstart=datetime(1997, 9, 2, 9, 0))), [datetime(1998, 1, 1, 9, 0), datetime(1998, 1, 6, 9, 0), datetime(1998, 1, 8, 9, 0)]) def testDailyByMonthDayAndWeekDay(self): self....
'v_9', 'v_4', 'v_8', 'c_1'}, 'City': {'c_1'}, 'Town': {'t_3', 't_2'}, 'Village': {'v_5', 'v_6', 'v_7', 'v_9', 'v_8', 'v_4'}, 'Road': {('t_2', 'c_1'), ('t_3', 'v_5'), ('t_3', 'c_1'), ('c_1', 'v_4'), ('t_3', 'v_8'), ('c_1', 't_2'), ('t_3', 'v_6'), ('v_9', 't_2'), ('v_7', 't_2'), ('v_8', 't_3'), ('v_5', 't_3'), ('v_6',...
<filename>lsdviztools/lsdplottingtools/lsdmap_basicmaps.py<gh_stars>1-10 #============================================================================= #============================================================================= # These functions create figures for Basic visualization # # # It creates separate plots...
<reponame>GambitBSM/gambit_2.0 # GUM: GAMBIT Universal Model Machine # *********************************** # \file # # Contains all routines for parsing input .gum files and # the SARAH/FeynRules model files. # # ************************************* # # \author <NAME> # (<EMAIL>) # \date 2018, 2019, 2020 # # \author ...
"""Actions to define on the Input parameters. This module defines some of the most common actions that a BigDFT user might like to perform on the input file. Such module therefore sets some of the keys of the input dictionary to the values needed to perform the operations. Users might also inspire to the actions perfo...
<filename>archived/Project2.py<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Sat May 1 12:52:41 2021 @author: JP """ import os import pandas as pd import requests from windpowerlib import ModelChain, WindTurbine, get_turbine_types from geopy.distance import geodesic import geocoder # Forecast pac...