text
stringlengths
2
999k
import sys if (sys.version_info >= (2,7)): import unittest else: import unittest2 as unittest from pydevtest_common import assertiCmd, assertiCmdFail, getiCmdOutput, create_local_testfile, get_hostname, RUN_IN_TOPOLOGY, get_irods_config_dir, get_irods_top_level_dir import pydevtest_sessions as s from resource_s...
from datamart.joiners.join_feature.feature_classes import * from functools import reduce import numpy as np class FeatureFactory: subclasses = { (DistributeType.CATEGORICAL, DataType.NUMBER): CategoricalNumberFeature, (DistributeType.CATEGORICAL, DataType.STRING): CategoricalStringFeature, ...
import logging import os from PyQt5.QtCore import * from PyQt5.QtWidgets import * from nodeeditor.node_edge import Edge, EDGE_TYPE_BEZIER from nodeeditor.node_graphics_view import QDMGraphicsView from nodeeditor.node_node import Node from nodeeditor.node_scene import Scene, InvalidFile class NodeEditorWidget(QWidge...
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest i...
#!/usr/bin/python # Copyright (c) YugaByte, Inc. # This script would generate a kubeconfig for the given servie account # by fetching the cluster information and also add the service account # token for the authentication purpose. import argparse from subprocess import check_output import json import base64 import te...
# encoding: utf-8 """ protocol.py Created by Thomas Mangin on 2009-08-25. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ import os import traceback # ================================================================ Registration # from exabgp.reactor.network.outgoing import Outgoing # from exabgp.re...
# Generated by Django 3.0.8 on 2020-10-28 17:58 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('docs', '0002_article_version'), ] operations = [ migrations.AlterModelOptions( name='article', options={'verbose_name': '插件内...
# Copyright 2021 Jacob Baumbach # # 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 writin...
import glob import os import sys import random import time import numpy as np import cv2 import math from collections import deque from keras.applications.xception import Xception from keras.layers import Dense, GlobalAveragePooling2D from keras.optimizers import Adam from keras.models import Model ''' Carla 패키지가 사용하는...
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """email package exception classes.""" class MessageError(Exception): """Base class for errors in the email package.""" class MessageParseError(MessageError): """Base class for message parsing erro...
''' Configure: python setup.py install pyVideoDatasets Colin Lea 2013 ''' from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy as np ext_modules = [] for e in ext_modules: e.pyrex_directives = { "boundscheck": False, "wraparound...
from pytest import raises from ..quoted_or_list import quoted_or_list def test_does_not_accept_an_empty_list(): with raises(StopIteration): quoted_or_list([]) def test_returns_single_quoted_item(): assert quoted_or_list(["A"]) == '"A"' def test_returns_two_item_list(): assert quoted_or_list([...
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from r...
''' ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License");...
#!/usr/bin/env python3 #------------------------------------------------------------------------------# # fortnet-python: Python Tools for the Fortnet Software Package # # Copyright (C) 2021 - 2022 T. W. van der Heide # # ...
from rest_framework import serializers from bumblebee.buzzes.api.serializers.interaction_serializers import ( BuzzInteractionsSerializer, ) from bumblebee.buzzes.models import Buzz, BuzzImage from bumblebee.core.exceptions import UnknownModelFieldsError from .user_serializers import BuzzUserSerializer ##########...
# Copyright 2021 Google 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/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import numpy as np from prml.nn.optimizer.optimizer import Optimizer class AdaDelta(Optimizer): """ AdaDelta optimizer """ def __init__(self, parameter, rho=0.95, epsilon=1e-8): super().__init__(parameter, None) self.rho = rho self.epsilon = epsilon self.mean_squared_d...
# coding: utf-8 """ barcodeapi Barcode APIs let you generate barcode images, and recognize values from images of barcodes. # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import copy import logg...
from ...utils import DataDump, logger from ..node import Node class GenerationNode(Node): def __init__(self, inputs, trigger_time, idx, dag, parent=None): """ Node for data generation jobs Parameters: ----------- inputs: bilby_pipe.main.MainInput The user-defin...
from array import array from random import randint import sys @profile def create_data(): return array('i', [randint(1, 10000000) for i in range(100000)]) def proc(): cnt = 0 data = create_data() for i in range(100000): if randint(1, 10000000) in data: cnt += 1 if __name__ == '_...
# Copyright (c) 2003-2015 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free Software # Foundation; either version 2 of the Lic...
## @file # This file is used to define common string related functions used in parsing # process # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which a...
from msdsl.expr.expr import ModelExpr from msdsl.expr.signals import Signal, DigitalSignal, AnalogSignal from msdsl.expr.format import RealFormat from msdsl.expr.table import Table class Assignment: def __init__(self, signal: Signal, expr: ModelExpr, check_format=True): self.signal = signal ...
import warnings import numpy as np import cmath as math import scipy as scp import scipy.optimize as opt from types import FunctionType def parse_multidatasets(V,K,weights,precondition=False): #=============================================================================== # Identify if the sig...
import contextlib import errno import socket import unittest import sys from .. import support HOST = "localhost" HOSTv4 = "127.0.0.1" HOSTv6 = "::1" def find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM): """Returns an unused port that should be suitable for binding. This is achieved by...
# Generated by Django 2.0.4 on 2018-05-07 07:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0002_auto_20180507_0653'), ] operations = [ migrations.AlterField( model_name='post', name='banner_photo', ...
import logging import ibmsecurity.utilities.tools logger = logging.getLogger(__name__) def get_all(isamAppliance, check_mode=False, force=False): """ Retrieving a list of all Web Service connections """ return isamAppliance.invoke_get("Retrieving a list of all Web Service connections", ...
import torch from ..utils.stream import ItemFeature from .base_infocpler import BaseInfoCpler class OCRVQAInfoCpler(BaseInfoCpler): def __init__(self, cfg): super().__init__(cfg) def complete_info(self, item_feature: ItemFeature): tokens = self.tokenizer.tokenize(item_feature.question.strip...
# Mini Black Heaven Mount Coupon | (2434762) if sm.getSkillByItem() == 0:# Check whether item has an vehicleID stored, 0 if false. sm.chat("An Error occurred whilst trying to find the mount.") elif sm.hasSkill(sm.getSkillByItem()): sm.chat("You already have the 'Mini Black Heaven' mount.") else: sm.consu...
import pytest def pytest_addoption(parser): parser.addoption( "--master", action="store", default="", help="IP address of GKE master") parser.addoption( "--namespace", action="store", default="", help="namespace of server") parser.addoption( "--service", action="store", default="", help...
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
# -*- coding: utf-8 -*- """Implements the xonsh parser.""" from xonsh.lazyasd import lazyobject from xonsh.platform import PYTHON_VERSION_INFO @lazyobject def Parser(): if PYTHON_VERSION_INFO > (3, 6): from xonsh.parsers.v36 import Parser as p elif PYTHON_VERSION_INFO > (3, 5): from xonsh.pars...
parentheses = input() stack_opening_brackets = [] pairs = { '(': ')', '{': '}', '[': ']' } balanced = True for el in parentheses: if el in "({[": stack_opening_brackets.append(el) else: if len(stack_opening_brackets) > 0: opening_bracket = stack_opening_brackets.pop() ...
# Copyright 2013-present Barefoot Networks, 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 ...
''' Created on Aug 9, 2017 @author: Hao Wu ''' from ScopeFoundry import HardwareComponent from .daq_do_dev import DAQSimpleDOTask from PyDAQmx import * import numpy as np import time class DAQdoHW(HardwareComponent): ''' Hardware Component Class for receiving AI input for breathing, licking etc ''' ...
# test_malquery.py # This class tests the malquery service class import os import sys import pytest # Authentication via test_authorization.py from tests import test_authorization as Authorization # Import our sibling src folder into the path sys.path.append(os.path.abspath('src')) # Classes to test - manually imported...
#!/usr/bin/env python # import required packages import emcee import numpy as np from numpy import exp, log # import model function from separate file from mymodel import mymodel # import post-processing function from theonlinemcmc package from theonlinemcmc import * # initialise error code value errval = 0 # defi...
from turtle import Turtle FONT = ("Courier", 20, "normal") class Scoreboard(Turtle): def __init__(self): super().__init__() self.hideturtle() self.penup() self.level = 1 self.goto(x=-230, y=260) self.update_scoreboard() def update_scoreboard(self): sel...
from django.shortcuts import render from decouple import config from .models import Images # Create your views here. def index(request, **kwargs): """ Render single page application and provide context data. :param request: :param kwargs: :return: """ context = { 'images': Images...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class Sparskit(MakefilePackage): """SPARSKIT: A basic tool-kit for sparse matrix comp...
# -*- coding: utf-8 -*- """ pygments.lexers.verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Intermediate Verification Languages (IVLs). :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include...
from DownloadSECFilings import * # SEC EDGAR system saves all the URL links for each filing under quarterly folders. These files storing # the URL information are called "master" files. # 1) You need to call for the "createMasterFile" function if you want to keep the master file updated. # createMasterFile generates ...
try: tests=int(input()) z=[] for _ in range(tests): n,x=[int(xi) for xi in input().split(" ")] arr=list(map(int,input().rstrip().split())) m=max(arr)-min(arr) if m>x: z.append("NO") else: z.append("YES") for x in z: prin...
from enum import Enum class Suite(Enum): Diamond = 1 Heart = 2 Club = 3 Spade = 4
from quapy.data import LabelledCollection from .base import BaseQuantifier class MaximumLikelihoodPrevalenceEstimation(BaseQuantifier): """ The `Maximum Likelihood Prevalence Estimation` (MLPE) method is a lazy method that assumes there is no prior probability shift between training and test instances (pu...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import dis import inspect import os.path from types import FrameType from typing import ( TYPE_CHECKING, Any, Callable,...
# Copyright (c) OpenMMLab. All rights reserved. import copy import platform import random from functools import partial import numpy as np from mmcv.parallel import collate from mmcv.runner import get_dist_info from mmcv.utils import Registry, build_from_cfg from torch.utils.data import DataLoader from .samplers impo...
from sys import path from os.path import dirname as dir import webbrowser import os path.append(dir(path[0])) from tkinter import ttk import tkinter as tk from tkinter import * from ui.Pantalla_TS import * from ui.Pantalla_AST import * from ui.Pantalla_Error import * import tkinter.messagebox from analizer import inter...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # Configuration file for JupyterHub import os # pre-spawn settings NB_UID = 65534 NB_GID = 65534 CUDA = 'cuda' in os.environ['HOSTNODE'] c = get_config() # read users/teams & images import os, yaml with open('...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import requests import os # disable insecure warnings requests.packages.urllib3.disable_warnings() if not demisto.params().get('useProxy', False): del os.environ['HTTP_PROXY'] del os.environ['H...
import bpy import mathutils import compas_blender from compas.robots.base_artist import BaseRobotModelArtist __all__ = [ 'RobotModelArtist', ] class RobotModelArtist(BaseRobotModelArtist): """Visualizer for robot models inside a Blender environment. Parameters ---------- model : :class:`compas....
import itertools import pytest import numpy as np from skimage.data import shepp_logan_phantom from skimage.transform import radon, iradon, iradon_sart, rescale from skimage._shared.utils import convert_to_float from skimage._shared import testing from skimage._shared.testing import test_parallel from skimage._shared...
# -*- coding: utf-8 -*- # Copyright 2017 IBM RESEARCH. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the getchaintips API. We introduce a network split, work # on chains of different lengths, an...
from torchvision import transforms from ..base import BaseTransforms class ResizeCenterCropFlipHVToTensor(BaseTransforms): def __call__(self, sample): data_transforms = transforms.Compose([ transforms.ToPILImage(), transforms.Resize(256), transforms.CenterCro...
import subprocess import sys import setup_util from os.path import expanduser home = expanduser("~") ############## # start(args) ############## def start(args, logfile, errfile): setup_util.replace_text("treefrog/config/database.ini", "HostName=.*", "HostName=" + args.database_host) setup_util.replace_text("tre...
"""Plot intensity profile of theoretical beam patterns.""" import matplotlib.pyplot as plt import numpy as np from scipy.stats import binned_statistic as bstat from frbpoppy.survey import Survey OBSERVATORIES = [('parkes', 'htru'), ('apertif', 'apertif')] n = int(1e6) for obs in OBSERVATORIES: ...
from sciwing.modules.embedders import * from sciwing.modules.bow_encoder import BOW_Encoder from sciwing.modules.lstm2vecencoder import LSTM2VecEncoder from sciwing.modules.lstm2seqencoder import Lstm2SeqEncoder from sciwing.modules.charlstm_encoder import CharLSTMEncoder
import itertools import datetime import util import asyncio import random import os import sys import traceback import subprocess import time import json import urllib.request import ast from google.cloud import storage # ======================================================================== def collect_cluster_c...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template import Context, Template, TemplateSyntaxError from django.utils.translation import override import pytest from djmoney.models.fields import MoneyPatched from djmoney.templatetags.djmoney import MoneyLocalizeNode from moneyed import ...
from . import distributions from . import functional from . import nn
def mergesort(items): if len(items) <= 1: return items mid = len(items) // 2 left = items[:mid] right = items[mid:] left = mergesort(left) right = mergesort(right) return merge(left, right) def merge(left, right): merged = [] left_index = 0 right_index...
#!/usr/bin/env python # -*- coding: utf-8 -*- from bluebird import BlueBird for username in BlueBird().get_followers('brunn3is'): print(username)
# !/usr/bin/env python import re import requests import collections import hashlib import os import json import time def _prefix(cmd): prefix = os.path.basename(cmd.replace('-', '_')) for i in ['.pyc', '.py', '-cli', '-tool', '-util']: prefix = prefix.replace(i, '') return prefix.upper() PREFI...
import json import os from mininet.topo import Topo import subprocess class Mapper(object): def __init__(self, topo, physical_network_file, mapper): self.topo = topo self.physical_network_file = physical_network_file self.mapper = mapper self.topo_file = self.create_topo_file(topo...
""" Time Series API For Digital Portals Time series data, end-of-day or intraday, tick-by-tick or subsampled. Additional vendor-specific endpoints provide a modified interface for seamless integration with the ChartIQ chart library. # noqa: E501 The version of the OpenAPI document: 2 Generated by: ht...
import unittest def soma(param, param1): return param + param1 class BasicoTests(unittest.TestCase): def test_soma(self): resultado = soma(1, 2) self.assertEqual(3, resultado) resultado = soma(3, 2) self.assertEqual(5, resultado) if __name__ == '__main__': unittest.main...
# -*- coding: utf-8 -*- """ Test suite specifically targeting ICC profiles """ # Standard library imports ... from datetime import datetime try: import importlib.resources as ir except ImportError: # pragma: no cover # before 3.7 import importlib_resources as ir import struct import tempfile import unit...
import sys from copy import deepcopy from random import SystemRandom from .aggregation_info import AggregationInfo from .ec import (AffinePoint, JacobianPoint, default_ec, generator_Fq, hash_to_point_Fq2, hash_to_point_prehashed_Fq2, y_for_x) from .fields import Fq from .signature import Signature fro...
#!usr/bin/env python import sys import re import shelve from parameter.common_parameters import common_parameters import utils.setting_utils as utils utils.now_time("phastcons_score_list script starting...") p = utils.Bunch(common_parameters) def main(): utils.now_time("Input_file: " + p.phastcons_sc...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import re import sys # TODO make this less brittle sys.path = [ os.path.join(os.path.dirname(__file__), "../"), # os.path.jo...
"""The tests for Monoprice Media player platform.""" from collections import defaultdict from serial import SerialException from homeassistant.components.media_player.const import ( ATTR_INPUT_SOURCE, ATTR_INPUT_SOURCE_LIST, ATTR_MEDIA_VOLUME_LEVEL, DOMAIN as MEDIA_PLAYER_DOMAIN, SERVICE_SELECT_SO...
"""Character count This program counts how often each character appears in a string. """ def main(): message = 'It was a bright cold day in April, and the clocks were striking thirteen.' """str: Message to count characters.""" count = {} """dict: Characters as keys and counts as values.""" ...
import sys import os import torch import argparse import collections uer_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, uer_dir) from scripts.convert_bert_from_huggingface_to_uer import convert_bert_transformer_encoder_from_huggingface_to_uer parser = argparse.ArgumentParser(...
# coding: utf-8 """ LUSID API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.11.4425 Contact: info@finbourne.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility lib...
import inspect from typing import Iterable, Optional from tqdm import tqdm from ..utils.translations import trans _tqdm_kwargs = { p.name for p in inspect.signature(tqdm.__init__).parameters.values() if p.kind is not inspect.Parameter.VAR_KEYWORD and p.name != "self" } class progress(tqdm): """This...
from flask import Blueprint, render_template from macronizer_cores import db # create error blueprint errors = Blueprint('errors', __name__) # SECTION - routes # NOTE - app_errorhandler() is a method inherited from Blueprint that is equivalent to errorhandler() inherited from flask @errors.app_errorhandler(404) def...
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005-2010 (ita) """ Tasks represent atomic operations such as processes. """ import os, shutil, re, tempfile, time, pprint from waflib import Context, Utils, Logs, Errors from binascii import hexlify # task states NOT_RUN = 0 """The task was not executed yet""" ...
"""Tests for the `dictionaries` module.""" from __future__ import division, print_function, absolute_import import foampy from foampy.dictionaries import * def test_replace_value(): """Test the `replace_value` function.""" print("\nTesting dictionaries.replace_value") orig = read_single_line_value(dictna...
import os from time import sleep # # The azure library provides access to services made available by the # Microsoft Azure platform, such as storage and messaging. # # See https://go.microsoft.com/fwlink/?linkid=254360 for documentation and # example code. # from azure.servicebus import ServiceBusService from azure.s...
import torch.nn as nn from ..registry import HEADS from ..utils import ConvModule from mmdetection.core import auto_fp16 @HEADS.register_module class MGANHead(nn.Module): def __init__(self, num_convs=2, roi_feat_size=7, in_channels=512, conv_ou...
import redis host = '127.0.0.1' port = 6379 client = redis.Redis(host=host, port=port) client.set("redis", "value111", None, 1000) print(str(client.get("redis"))) if client.get("redis1") != None and len(client.get("redis1")) > 0: print("sss") else: print("no")
from onegov.ballot import Ballot from onegov.ballot import BallotCollection from onegov.ballot import Candidate from onegov.ballot import CandidateCollection from onegov.ballot import Election from onegov.ballot import ElectionCollection from onegov.ballot import ElectionCompound from onegov.ballot import ElectionCompo...
#!/usr/bin/env python3 import os import math from numbers import Number from cereal import car, log from common.numpy_fast import clip from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL from common.profiler import Profiler from common.params import Params, put_nonblockin...
with open('log.txt') as f: text = f.read().lower() if ('python' in text): print ('Yes, Python is present') else: print ('No, Python is not present')
from PIL import Image, ImageTk import random as rand import turtle as trtl # import required module from playsound import playsound import tkinter.messagebox from pynput.keyboard import Key, Listener import glob #import prgm_image # prgm_image_list = [] # for filename in glob.glob('/Users/khaase/Desktop/VroomFold/prgm_...
# Copyright 2021 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" Contains various data structures used by Bionic's infrastructure. """ import attr from .utils.misc import ImmutableSequence, ImmutableMapping @attr.s(frozen=True) class EntityDefinition: """ Describes the immutable properties of an entity. These properties generally have to do with the entity's "con...
import paramiko from time import localtime, strftime # Create a ssh client client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect('ocare', username='taiwanet', password='qwe7891') file_name = strftime("/home/taiwanet/capture_image/%Y%m%d_%H%M%S.jpg", localtime()) st...
# HotSpotMap: A python based temperature (thermal) map generation # tool for HotSpot-6.0 (http://lava.cs.virginia.edu/HotSpot/) # This tool uses python's turtle library # # Author: Gaurav Kothari (gkothar1@binghamton.edu) Copyright 2021 # # This tool generates: # 1) Floor-plan image (using floor-plan file) # 2) Thermal...
import os from setuptools import setup, find_packages def read(fn): path = os.path.join(os.path.dirname(__file__), fn) try: file = open(path, encoding='utf-8') except TypeError: file = open(path) return file.read() setup( name='litewql', version=__import__('litewql').VERSION,...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import uuid from jsonlint.compat import string_types, text_type __all__ = ( 'DataRequired', 'data_required', 'Email', 'email', 'EqualTo', 'equal_to', 'IPAddress', 'ip_address', 'InputRequired', 'input_required', 'Length', 'length',...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from __future__ import print_function import functools import hashlib import os from azure.core.exceptions import ResourceNotFoundError from devtools_testutils import R...
""" This module implements the class `truncated_chi2` which performs (conditional) UMPU tests for Gaussians restricted to a set of intervals. """ import numpy as np import mpmath as mp from scipy.stats import chi, chi2 from .base import truncated, find_root class truncated_chi(truncated): """ >>> from inte...
#!/usr/bin/env python3 # # This command requires HatSploit: https://hatsploit.netlify.app # Current source: https://github.com/EntySec/HatSploit # from hatsploit.lib.command import Command class HatSploitCommand(Command): details = { 'Category': "transfer", 'Name': "upload", 'Authors': [...
import numpy as np np.random.seed(1337) from keras.models import Sequential from keras.layers import Dense import matplotlib.pyplot as plt model = Sequential() model.add(Dense(units=50, input_dim=1, activation='relu')) model.add(Dense(units=50, activation='relu')) model.add(Dense(units=1, activation='sigmoid')) model...
#!/usr/bin/python3 # -*- coding: utf-8 -*- from PyQt5.uic import loadUi from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * #from matplotlib.backends.backend_qt5agg import (NavigationToolbar2QT as NavigationToolbar) import matplotlib.image as mpimg import sys import radiomics_single a...
input = """ 1 2 0 0 1 3 0 0 1 4 0 0 1 5 0 0 1 6 0 0 1 7 0 0 1 8 0 0 1 9 0 0 1 10 0 0 1 11 0 0 1 12 0 0 1 13 0 0 1 14 0 0 1 15 0 0 1 16 0 0 1 17 0 0 1 18 0 0 1 19 0 0 1 20 0 0 1 21 0 0 1 22 0 0 1 23 0 0 1 24 0 0 1 25 0 0 1 26 0 0 1 27 0 0 1 28 0 0 1 29 0 0 1 30 0 0 1 31 0 0 1 32 0 0 1 33 0 0 1 34 0 0 1 35 0 0 1 36 0 0 1...