text
stringlengths
2
999k
"""批量生成VOC文件名""" import os #格式JPEGImages path = r"D:/Python37/User/envs/MASK/maskProject/ObjectDetect/fasterRCNN/myfrcnn/MyVOC2007/JPEGImages/" # 目标路径 """os.listdir(path) 操作效果为 返回指定路径(path)文件夹中所有文件名""" filename_list = os.listdir(path) # 扫描目标路径的文件,将文件名存入列表 stk_code = 0 for i in filename_list: used_name = path + ...
# Inspired by: # https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/ import codecs import os import re from setuptools import find_packages, setup ################################################################### NAME = "tessdataproducts" PACKAGES = find_packages(where="src") META_PATH = os...
#------------------------------------------------------------------------------ # # XLINK namespace # # Project: XML Metadata Handling # Authors: Martin Paces <martin.paces@eox.at> # #------------------------------------------------------------------------------- # Copyright (C) 2013 EOX IT Services GmbH # # Permi...
# Abstract functionality from abc import ABC, abstractmethod # Data Pre-processing from fastquant import get_stock_data # General Needed libraries import matplotlib.pyplot as plt import pandas as pd import numpy as np import math import os #Base model class class Base_Model(ABC): # params should be a dict of you...
# Copyright 2019 https://github.com/kodi-addons # # 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, p...
from __future__ import print_function from __future__ import absolute_import from builtins import str from . import adsearch from . import pyadutils from .adbase import * class ADObject(ADBase): """Python object that represents any active directory object.""" _ldap_adsi_obj = None _gc_adsi_obj ...
from portray._version import __version__ ascii_art = rf""" __ /\ \__ _____ ___ _ __\ \ ,_\ _ __ __ __ __ /\ '__`\ / __`\/\`'__\ \ \/ /\`'__\/'__`\ /\ \/\ \ \ \ \L\ \/\ \L\ \ \ \/ \ \ \_\ \ \//\ \L\.\_\ \ \_\ \ \ \ ,__/\ \____/\ \_\ \ \__\\ \_\\ \__/.\_\\/`...
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", default="79EkBvbB1...
def foo(): print("foo") def bar(): print("bar")
import sqlalchemy import sqlalchemy.ext.declarative import sqlalchemy.orm import contextlib import logging import os BASE = sqlalchemy.ext.declarative.declarative_base() class ApartmentEntry(BASE): __tablename__ = 'apartment_entries' address = sqlalchemy.Column(sqlalchemy.String, primary_key=True, nullable=...
#F28PL prepared me for this def fibonacci(n): if (n == 0): return 0 elif(n ==1): return 1 else: return fibonacci(n-1) + fibonacci(n-2) n = int(input()) print(fibonacci(n))
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # File: transform.py import numpy as np from PIL import Image from .extend_transform import HFlipTransform, NoOpTransform, Transform __all__ = ["ExtentTransform", "ResizeTransform"] class ExtentTransform(Transform): ...
import high_dimensional_sampling as hds import numpy as np try: from turbo import TurboM except ImportError: pass import sys class TuRBO(hds.Procedure): def __init__(self, max_evals=1000, trust_regions=5, max_cholesky_size=2000, n_trainin...
""" Provides linkedin api-related code """ import random import logging from time import sleep from urllib.parse import urlencode import json from linkedin_api.utils.helpers import get_id_from_urn from linkedin_api.client import Client logger = logging.getLogger(__name__) def default_evade(): """ A catch-a...
# Copyright 2014 Google 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, ...
from __future__ import annotations import asyncio from contextlib import contextmanager, asynccontextmanager from dataclasses import dataclass, field as data_field from datetime import timedelta import typing from inspect import currentframe from types import SimpleNamespace from collections import OrderedDict from en...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import requests from jumeaux.models import * from jumeaux.notification_handlers import NotificationHandler class SlackPayload(OwlMixin): text: str channel: str username: str icon_emoji: TOption[str] icon_url: TOption[str] link_names: i...
from rdflib import URIRef from .constants import * from .identified import Identified from .location import OwnedLocation from .mapsto import MapsTo from .measurement import Measurement from .property import URIProperty, OwnedObject, ReferencedObject class ComponentInstance(Identified): def __init__(self, type_u...
# Copyright 2016 Yanis Guenane <yguenane@redhat.com> # Author: Yanis Guenane <yguenane@redhat.com> # # 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...
from utils import parse_run_ids, parse_steer_functions, parse_planners from retrieve import retrieve_planner_stats_by_run, retrieve_planner_stats_by_steering from trajectory import visualize from plot_stats import plot_smoother_stats from plot_stats import plot_planner_stats import json import os import statistics impo...
""" Django settings for qf project. Generated by 'django-admin startproject' using Django 2.0.2. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os # Buil...
# @Time : 2020/11/14 # @Author : Junyi Li # @Email : lijunyi@ruc.edu.cn r""" Optimizer ##################### """ import numpy as np class ScheduledOptim(): r"""A simple wrapper class for learning rate scheduling """ def __init__(self, optimizer, init_lr, d_model, n_warmup_steps): self._optim...
# 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. # -------------------------------------------------------------------...
from django import forms from django.contrib import messages from django.core.exceptions import PermissionDenied from django.http import HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ from django.views.generic.detail import SingleObjectTemplateResponseMixin, BaseDetailView from wagtail.co...
import torch import torch.nn as nn import torch.nn.functional as F from queue import Queue import numpy as np import math from ..util import box_ops from ..util.misc import accuracy, get_world_size, is_dist_avail_and_initialized def focal_loss(preds, gts, alpha, gamma): pos_inds = gts.gt(0).float() neg_inds ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Oros # 2015/06/03 # License : CC0 1.0 Universal """ This program shows you IMSI numbers of cellphones around you. /!\ This program was made to understand how GSM network work. Not for bad hacking ! What you need : 1 PC with more than 3Go of RAM to compile gr-gsm ...
# -*- coding: utf-8 -*- import pickle import click import logging from pathlib import Path import os.path import pandas as pd import numpy as np from sklearn.decomposition import PCA project_dir = Path(__file__).resolve().parents[2] @click.command() @click.argument('input_filepath', type=click.Path(exists=True)) @cl...
from typing import List from apicheck.core.generator import generator from apicheck.core.generator.open_api_strategy import strategy as open_api_strategies def test_string_field(): field = { "type": "string", "example": "fieldname" } gen = generator(field, open_api_strategies) res =...
# YOLOv5 image augmentation functions import logging import random import cv2 import math import numpy as np from ..utils.general import colorstr, segment2box, resample_segments, check_version from ..utils.metrics import bbox_ioa class Albumentations: # YOLOv5 Albumentations class (optional, only used if packa...
#!/usr/bin/env python3 import logging import threading import time import os import Server import websocket import LightSchedule import PCA9685 import PCA9685_dummy import Settings import Channel from WeatherType import WeatherType import json from objdict import ObjDict from outlet import outlet DEBUG = True MAIN_LO...
import logging log = logging.getLogger(__name__) class HistoryQuery(object): """ An object for describing the collections to pull out of a history, used by DataCollectionToolParameter. """ def __init__(self, **kwargs): self.collection_type_descriptions = kwargs.get("collection_type_descriptio...
# Generated by Django 2.0.6 on 2018-06-18 14:36 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('posts', '0002_post_user'), ] operations = [ migrations.AddField( model_nam...
############################################################################### # # This line is a COMMENT -- a note to human readers of this file. # When the Python interpreter RUNS (i.e. EXECUTES) a program, it ignores # everything from a # (hash) mark to the end of the line with the # mark. # # We call f...
#!/usr/bin/env python import argparse import re import sys import textwrap import matplotlib import numpy as np from os import path from pathlib import Path import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib.patches import Patch from cyvcf2 import VCF, Writer plt.rcParams["figure.f...
# 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. # Changes ...
from unittest import TestCase from dsa.lib.algo.sort.counting_sort import counting_sort class CountingSortTest(TestCase): def test_sortInt(self): nums = [1, 3, 2] counting_sort.sortInt(nums) self.assertEqual([1, 2, 3], nums) def test_sortIntPlace(self): nums = [13, 32, 21] ...
# Задача 5. Вариант 50 # Напишите программу, которая бы при запуске случайным образом отображала # имя одной из трех официальных жен Зевса. # Bronnikov I. S. # 25.05.2016 import random wifes = ["Пики", "Крести", "Черви", "Бубны"] number = random.randint(0, 3) name = wifes[number] print(name, "- масть фр...
""" Django settings for mysite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
import numpy as np from PIL import Image, ImageDraw, ImageFont, ImageMath from pyray.rotation import planar_rotation from pyray.shapes.twod.line import Line class MapCoord(object): def __init__(self,scale=64,origin=np.array([8,8]), im_size=np.array([1024,1024])): """ See ON//Buildi...
import random import scipy import numpy as np import torch from PIL import Image import cv2 from torchvision.transforms import functional as tfn class OCIDTransform: """Transformer function for OCID_grasp dataset """ def __init__(self, shortest_size, longest_max_size, ...
n1 = float(input('Digite a nota 1: ')) n2 = float(input('Digite a nota 2: ')) media = (n1+n2)/2 print(f'A média é {media}'.replace('.',',')) #PERCEBA: O float ainda é float, mas está dentr de uma string # que pode ser modificada com replace
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.views import LoginView from django.views.generic import TemplateView from django.shortcuts import render class IndexView(LoginRequiredMixin, TemplateView): template_name = "main/base.html" site = { 'name': 'FamilyTools'...
from time import perf_counter import argparse import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from utils import load_reddit_data, sgc_precompute, set_seed from metrics import f1 from models import SGC # Args parser = argparse.ArgumentParser() parser.add_argument('--no-cuda',...
import re import os import json import logging import numpy as np import pandas as pd import requests as rq import multiprocessing from datetime import datetime HOME = os.path.expanduser("~") _RETURN_NONE = (lambda: None).__code__.co_code minimal_headers = { "Connection": "keep-alive", "Upgrade-Insecure-Reque...
from os.path import dirname, join from unittest import TestCase from pytezos import pytezos, ContractInterface, Unit initial_storage = { 'admin': { 'admin': pytezos.key.public_key_hash(), 'paused': False }, 'assets': { 'hook': { 'hook': """ { DROP ; ...
from django import template register = template.Library() def tier(participation, event): if participation.ranking: if participation.account_language == 'JP': if participation.ranking <= event.japanese_t1_rank: return 'T1' elif participation.ranking <= event.japanese...
# -*- coding: utf-8 -*- # Copyright (c) 2021, Hardik Gadesha and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class CustomerContactPerson(Document): pass
from .base import GnuRecipe from ..urls import Urls class AutoConfRecipe(GnuRecipe): def __init__(self, *args, **kwargs): super(AutoConfRecipe, self).__init__(*args, **kwargs) self.sha256 = '954bd69b391edc12d6a4a51a2dd14765' \ '43da5c6bbf05a95b59dc0dd6fd4c2969' self....
import itertools as it from typing import Tuple, Union import numpy as np import scipy.stats as ss from statsmodels.sandbox.stats.multicomp import multipletests from statsmodels.stats.multicomp import pairwise_tukeyhsd from statsmodels.stats.libqsturng import psturng from pandas import DataFrame def __convert_to_df( ...
import math from functions import * class Boat: def __init__(self): #Load the image and format it self.img,self.rect = load_image('images/1stship_3.png',-1) #Scale down the image dimensions = (int(self.rect.width*scaling), int(self.rect.height*scaling)) self.img = pygame.tra...
#!/usr/bin/env python # encoding: utf-8 # 访问 http://tool.lu/pyc/ 查看更多信息 import lib601.sm as sm from soar.io import io robotWidth = 0.2 forwardSpeed = 0.2 rotationalSpeed = 0.2 stop = io.Action(0, 0,voltage=5) go = io.Action(forwardSpeed, 0,voltage=5) goFast = io.Action(2 * forwardSpeed, 0,voltage=5) left = i...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Constants for APRS Module. """ __author__ = 'Greg Albrecht W2GMD <gba@orionlabs.co>' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2015 Orion Labs, Inc.' import logging APRSIS_URL = 'http://srvr.aprs-is.net:8080' APRSIS_HTTP_HEADERS = { ...
#!/usr/bin/env python3 import csv from collections import defaultdict import click import re import math def topic_name_html(word_weights, global_min=None, global_max=None): def invert_hex(hex_number): inverse = hex(abs(int(hex_number, 16) - 255))[2:] # If the number is a single digit add a preced...
from . import project, record, proxy
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 applica...
''' test filters ''' import pytest from tests.checker import check @pytest.mark.vcr() def test_agent_filters(api): ''' test to get agent filters ''' filters = api.filters.agents_filters() assert isinstance(filters, dict) for data in filters: check(filters[data], 'choices', list, allow_n...
# Copyright 2017 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/LICENSE-2.0 # # Unless required by applicab...
""" ASGI entrypoint file for default channel layer. Points to the channel layer configured as "default" so you can point ASGI applications at "HomeAutomation.asgi:channel_layer" as their channel layer. """ import os from channels.asgi import get_channel_layer os.environ.setdefault("DJANGO_SETTINGS_MODULE", "MainAPP.s...
# coding: utf-8 # project base path import os basedir = os.path.abspath(os.path.dirname(__file__)) """ common configuration -- SECRET_KEY: secret key -- SQLALCHEMY_COMMIT_ON_TEARDOWN: True -- SQLALCHEMY_RECORD_QUERIES: -- Can be used to explicitly disable or enable query recording. Query recording automa...
"""Apply transformations that work on (almost) all entities.""" import itertools from collections import defaultdict from typing import Dict, Tuple, List from srctools.bsp_transform import trans, Context from srctools.logger import get_logger from srctools import Output from srctools.packlist import FileType LOGGER ...
import datetime import importlib import io import os import sys from unittest import mock from django.apps import apps from django.core.management import CommandError, call_command from django.db import ( ConnectionHandler, DatabaseError, OperationalError, connection, connections, models, ) from django.db.back...
import re from collections import OrderedDict from django import template from django.template import loader from django.urls import NoReverseMatch, reverse from django.utils.encoding import force_str, iri_to_uri from django.utils.html import escape, format_html, smart_urlquote from django.utils.safestring import Safe...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zotero', '0007_draftccrelation'), ] operations = [ migrations.AddField( model_name='importaccession', ...
import requests from tqdm import tqdm from typing import Union from bs4 import BeautifulSoup import time import re class Cleaner: user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36' login_headers = { "X-Requested-With": "XML...
import uuid import time import ipaddress from .. import context from lyrebird import utils from lyrebird import application from lyrebird.log import get_logger from lyrebird.mock.blueprints.apis.bandwidth import config from urllib.parse import urlparse, unquote from .http_data_helper import DataHelper from .http_heade...
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
#!/usr/bin/env python # coding:utf8 import lasagne import numpy as np import multiverso as mv class MVModelParamManager(object): ''' MVModelParamManager is manager to make managing and synchronizing the variables in lasagne more easily ''' def __init__(self, model): ''' The constructor of...
import sys import json import re from flask_cors import CORS from flask import Flask, request, jsonify, abort from flask_restful import Resource, Api from json import dumps import couchdb from nltk.corpus import wordnet bad_words_txt = open('badwords.txt', 'r').read() bad_words_arr = bad_words_txt.splitlines() com...
""" init-declarator-list: init-declarator init-declarator-list , init-declarator init-declarator: declarator initializer? declarator requires-clause """ import glrp from ....parser import cxx98 from be_typing import TYPE_CHECKING from . import declarator from . import name from . import function @gl...
# -*- coding: utf-8 -*- """ oy.contrib.form.signals ~~~~~~~~~~~~~~~~~~~~~ Some helpfull signals related to form submissions. :copyright: (c) 2018 by Musharraf Omer. :license: MIT, see LICENSE for more details. """ from blinker import Namespace _signals = Namespace() before_accepting_submission ...
# Copyright 2014 Google Inc. All Rights Reserved. """Common classes and functions for forwarding rules.""" import abc import argparse import textwrap from googlecloudsdk.calliope import actions from googlecloudsdk.calliope import exceptions from googlecloudsdk.compute.lib import base_classes from googlecloudsdk.comput...
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import datetime import mock import unittest import webapp2 import webtest from google.appengine.api import users from dashboard.api import api_auth from d...
# -*- coding: utf-8 -*- import os import sys current_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.append('../datatype') sys.path.append('../setting') sys.path.append('../utility') import pandas as pd import pytz from Postgres import Postgres, Structure from Setting import Setting from Timeseries import Ti...
import datetime import math import sys import numpy as np ''' Computes the coherence metric from a specifically formatted graph and also offers the possibility to synchronize selections with a subgraph and its dual from selecting types in the dual graph. The graph must be multilayer with each layer of the edge form...
from __future__ import annotations from typing import Dict, Union, Type from pydantic import BaseSettings class BaseConfig(BaseSettings): """ Base configuration class. This provides lazy loading of environment variable subgroups, allowing us to reference sub-configurations in an intuitive way and w...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...workbook import Workbook class TestWriteDefinedName(unittest.TestCase): """ ...
import logging import monster.active as active logger = logging.getLogger(__name__) class Retrofit(object): """Tool to retrofit a install.""" def __init__(self, deployment): self.deployment = deployment def __repr__(self): """Print out current instance.""" output = 'class: ' + se...
from __future__ import absolute_import from .napoleon_parse_tools import merge_google_napoleon_docs, merge_numpy_napoleon_docs from .numpy_parse_tools import merge_numpy_docs from .rest_parse_tools import merge_rest_docs __all__ = [ "merge_numpy_docs", "merge_rest_docs", "merge_numpy_napoleon_docs", "...
""" Modified from https://github.com/tensorflow/models/blob/master/tutorials/image/cifar10/cifar10_train.py """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys from datetime import datetime import time import numpy as np import tensorfl...
import logging from apps import App, action from apps.OpenVAS.pvsl import Client, exceptions from datetime import datetime import csv from tzlocal import get_localzone import subprocess import json # from apps.OpenVAS.events import pull_down logger = logging.getLogger(__name__) class OpenVAS(App): """ An...
import os.path from os import path import requests from pytz import timezone from datetime import datetime from datetime import datetime, time, timedelta def auth_essalud(): s = requests.Session() response = s.post('http://sgss.essalud/sgss/servlet/hmain', data={ "W0005_USECOD": "41713667", "W0005_CLAVE": "help7...
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
# automatically generated by the FlatBuffers compiler, do not modify # namespace: Example import flatbuffers class ArrayStruct(object): __slots__ = ['_tab'] # ArrayStruct def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # ArrayStruct def A(self): return self._tab....
#!/usr/bin/python # break weights up into chunks that contribute to one # sequential partial sum in NBout import numpy as np import math import sys def n_i_to_cycle(n,i,Nn,Ni,Tnn,Tii,Tn,Ti): # one cycles processes Ti inputs and produces Tn outputs ii = i/Ti nn = n/Tn #print Tii # think in terms of...
from encrypt import encrypt_text, generate_key, load_public_key, encrypt_text_with_key, decrypt_text_with_key from flask import Flask, render_template, request, url_for app = Flask(__name__) @app.route('/') def hello(): return render_template("welcome.html") @app.route('/encrypt', methods=['POST', 'GET']) def en...
# Copyright 2011 Rackspace # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2013 IBM Corp. # 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 # # ...
import numpy as np def bestMap(L1,L2): ''' bestmap: permute labels of L2 to match L1 as good as possible INPUT: L1: labels of L1, shape of (N,) vector L2: labels of L2, shape of (N,) vector OUTPUT: new_L2: best matched permuted L2, shape of (N,) vector ...
"""Modules for working with data of any type. In contrast to the `vectorbt.base` sub-package, focuses on the data itself. ## Accessors You can access methods listed in `vectorbt.generic.accessors` as follows: * `vectorbt.generic.accessors.Generic_SRAccessor` -> `pd.Series.vbt.*` * `vectorbt.generic.accessors.Generi...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.10.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
import base64 from xstrip_auth import XStripKeyConstruct, XStripKey construct = XStripKeyConstruct("#P@$$W0R9") assert(construct.generateKey('sha256').verify("#P@$$W0R9"))
from issa import * from random import randint from report import Report from data.temp import logs from ui import * def init_database(): product_table = ProductTable() log_table = LogTable() rf_table = RFTechTable() prf_table = ProductRFTechTable() benchmark_table = BenchmarkTable() pb_table =...
import numpy as np from .basic_filter import Filter class EKF(object): def __init__(self, x, P): super().__init__() # Basically, We assume that robot moves in 3D place self.state = x self.cov = P # Set Initial state / cov def setInitialState(self, initial_x, initial_cov):...
# MIT License # # Copyright (C) IBM Corporation 2018 # # 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...
import time, sys import os import json import copy from fsop_counters import FSOPCounters from common import FsDriftException, OK from common import KiB_PER_GiB, BYTES_PER_KiB, MiB_PER_GiB, BYTES_PER_MiB def output_thread_counters(outfile, start_time, total_errors, fsop_ctrs): jsondict = fsop_ctrs.json_dict() ...
# # Copyright 2019 The FATE 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/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup NAME = "libnacl" DESC = "Python bindings for libsodium based on ctypes" # Version info -- read without importing _locals = {} with open("libnacl/version.py") as fp: exec(fp.read(), None, _locals) VERSION = _locals["version"] setup( n...
from winappdbg import Debug, EventHandler, System import re import os import logging import sys import struct import binascii from datetime import datetime __description__ = 'WORD Macro Inspector' __author__ = "Antonio Parata" __version__ = '1.0' _dumped_macro = None _is_in_metadata = True _freed_strings = list() # ...
from distutils.core import setup from setuptools import find_packages import os # User-friendly description from README.md current_directory = os.path.dirname(os.path.abspath(__file__)) try: with open(os.path.join(current_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() except E...
"""Contains a collection of basic calculations. These include: * wind components """ from __future__ import division import warnings import numpy as np def get_wind_speed(u, v): r"""Compute the wind speed from u and v-components. Parameters ---------- u : array_like Wind component in th...
from ddt import ddt, data, unpack from unittest import TestCase from unittest.mock import patch from pagerduty_events_api import PagerdutyIncident @ddt class TestPagerdutyIncident(TestCase): def setUp(self): super().setUp() self.__subject = PagerdutyIncident('my_service_key', 'my_incident_key') ...