text
stringlengths
2
999k
__version__ = "1.0.2" __author__ = "Daniel Andersson" __maintainer__ = "Daniel Andersson" __email__ = "daniel.4ndersson@gmail.com" __status__ = "Production" __url__ = "https://github.com/Penlect/line-protocol-parser" __license__ = "MIT"
import json from datetime import datetime from datetime import timezone import click from py42.sdk.queries.query_filter import FilterGroup from code42cli.click_ext.options import incompatible_with from code42cli.click_ext.types import FileOrString from code42cli.logger.enums import ServerProtocol from code42cli.outpu...
from bddpokeapi import bddpokeapi from pokeApi import pokeApi import peewee from flask import Flask import random #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ db=peewee.SqliteDatabase('pokeapi.db') app = Flask(__name__) a=pokeApi() b=bddpokeapi() cl...
# Copyright (c) 2018, NVIDIA CORPORATION. from __future__ import print_function, division import pandas as pd import numpy as np import pickle from numba import cuda from . import cudautils, utils, columnops from .buffer import Buffer from .numerical import NumericalColumn from .column import Column from .serialize ...
""" Prisma Cloud API Endpoints Aggregation Class """ import concurrent.futures # TODO: Rename this class ... class ExtendedPrismaCloudAPIMixin(): """ Prisma Cloud API Endpoints Aggregation Class """ def get_policies_with_saved_searches(self, policy_list_current): result = {'policies': {}, 'searches'...
from configobj import ConfigObj from db import * from pyextdirect.configuration import (create_configuration, expose, LOAD, STORE_READ, STORE_CUD, SUBMIT) from validate import Validator import datetime import os import shutil import subliminal import subprocess import tempfile __all__ = ['Base', 'Directories', '...
# Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. { 'variables': { 'chromium_code': 1, 'cef_directory': '<(DEPTH)/third_party/cef/<(jcef_platform)', 'cef_directory_win': ...
# -*- test-case-name: twisted.internet.test.test_testing -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Assorted functionality which is commonly useful when writing unit tests. """ from collections.abc import Sequence from io import BytesIO from socket import AF_INET, AF_INET6 from t...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenMiniInneraccountCreateModel(object): def __init__(self): self._client_type = None self._out_biz_id = None @property def client_type(self): ...
# Generated by Django 3.0.8 on 2020-07-29 15:42 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('subjects', '0007_auto_20200729_0152'), ('timetable', '0007_auto_20200729_1619'), ] operations = [ migrations.RenameModel( old_na...
import numpy as np import cv2 import urllib.request from collections import deque from keras.models import load_model cen_pts = deque(maxlen=300) #Url should be written as provided by ip webcam. #(You can use your inbuilt camera feature also) but few lines of code will change) #Make sure you open the url in ch...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-01-30 17:41 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('corpus', '0001_initial'), ] operations = [ ...
# Copyright 2017 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 by applicable law or a...
import mock import re import socket import threading import time import warnings from unittest import TestCase import pytest from tests.test_tracer import get_dummy_tracer from ddtrace.api import API, Response from ddtrace.compat import iteritems, httplib, PY3 from ddtrace.internal.runtime.container import CGroupInf...
from .html5 import Element, CSS, JS, Title from .layout import Layout from .const import (bootstrap_css_path, bootstrap_js_path, jquery_js_path, shiny_js_path) class UI: _TITLE = "Shiny App" def __init__(self, title=None): self.html = Elemen...
## @package sampling_trainable_mixin # Module caffe2.python.layers.sampling_trainable_mixin import abc class SamplingTrainableMixin(metaclass=abc.ABCMeta): def __init__(self, *args, **kwargs): super(SamplingTrainableMixin, self).__init__(*args, **kwargs) self._train_param_blobs = None ...
''' * Project : Screenipy * Author : Pranjal Joshi * Created : 28/04/2021 * Description : Class for analyzing and validating stocks ''' import sys import math import numpy as np import pandas as pd import talib from scipy.signal import argrelextrema from cla...
# -*- coding: utf-8 -*- # generated from catkin/cmake/template/__init__.py.in # keep symbol table as clean as possible by deleting all unnecessary symbols from os import path as os_path from sys import path as sys_path from pkgutil import extend_path __extended_path = "/root/ros_catkin_ws/src/ros/roscreate/src".spli...
import sys from copy import copy from itertools import chain from numpy import * from scipy.signal import medfilt as MF from scipy.stats import scoreatpercentile as sap from numpy.random import normal, seed from statsmodels.robust import mad from george.kernels import ConstantKernel, Matern32Kernel from .core import...
# This class is replicates the mlp type network only with tensorflow. It is useful for machines without baselines # installed (i.e. Raspberry Pi) import tensorflow as tf import time import numpy as np class AgentMLP: def __init__(self, weight_file, activation): weight_list = {} exec(open(weight_fi...
#!/user/bin/env python import rospy import smach import actionlib from actionlib_msgs.msg import GoalStatus from sub_vision.msg import TrackObjectAction, TrackObjectGoal, TrackObjectFeedback, TrackObjectResult, VisualServoAction, VisualServoGoal, VisualServoFeedback, VisualServoResult from geometry_msgs.msg import Wren...
# Copyright 2013-2020 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) from spack import * class RJanitor(RPackage): """The main janitor functions can: perfectly format data.frame column ...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. # customized by Kruzliak Andrej, Pliska Michal and Hartvich Jiri import os import json from detectron2.model_zoo import model_zoo from detectron2.config import get_cfg # with open("ipalm/id_to_OWN.json") as json_labels: # new_dic...
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" """ Originally from https://github.com/naiquevin/lookupy The library is provided as-is under the MIT License Copyright (c) 2013 Vineet Naik (naikvin@gmail.com) Permission is hereby granted, free of charge, to any ...
import torch from .functional import ( wasserstein_discriminator_loss, wasserstein_generator_loss, wasserstein_gradient_penalty, ) from .loss import DiscriminatorLoss, GeneratorLoss __all__ = [ "WassersteinGeneratorLoss", "WassersteinDiscriminatorLoss", "WassersteinGradientPenalty", ] class ...
LOCAL_DATA_ROOT = '/Users/varunn/Documents/projects/Sentence_Embeddings/' INP_PATH = LOCAL_DATA_ROOT + 'raw_data/' INT_PATH = LOCAL_DATA_ROOT + 'inter_data/' PRE_PATH = LOCAL_DATA_ROOT + 'preprocessed_data/' MODEL_PATH = LOCAL_DATA_ROOT + 'modelling/' RESULTS_PATH = LOCAL_DATA_ROOT + 'results/' INP_TICKETS_FN = INP_PAT...
"""Supplement the missing support for GFF3 from biopython. Taken from FastaIO""" import re from Bio.SeqFeature import SeqFeature,FeatureLocation _gff3_strand_to_numeric = { '+': 1, '-': -1, '.': 0} _numeric_to_gff3_strand = { '1': '+', '-1': '-', '0': '.' } #This is a generator function! def GTFIterator(handle): "...
from casadi import vertcat, MX import biorbd class Dynamics: @staticmethod def forward_dynamics_torque_driven(states, controls, nlp): """ :param states: MX.sym from CasADi. :param controls: MX.sym from CasADi. :param nlp: An OptimalControlProgram class :return: Vertcat ...
from test.test_utilities import parse_any_template_yaml_file template = "artifacts/download/specific-pipeline-latest-artifact.yml" contents = parse_any_template_yaml_file(template) steps = contents["steps"] parameters = contents["parameters"] step = steps[0] inputs = step["inputs"] def test_num_steps(): assert l...
import project_name def test_main(): project_name.main()
from matplotlib.figure import Figure import pandas as pd from utils.math_utils import get_square, is_square from entities.plot.histogram_options import HistogramOptions from entities.plot.label_options import LabelOptions from entities.plot.figure_options import FigureOptions from enums.plot_legend_position import Plot...
# -*- coding: utf-8 -*- import schedule,time,logging import wether,zhihu FORMAT = '%(asctime)-15s %(levelname)s:%(module)s:%(message)s' logging.basicConfig(level=logging.INFO, format=FORMAT) schedule.every(1).minutes.do(zhihu.ListenZhihu()) schedule.every().day.at("6:00").do(wether.call) while True: schedule.run_...
"""locallibrary URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cla...
import sys from setuptools import setup from setuptools import find_packages version = '0.22.0.dev0' # Please update tox.ini when modifying dependency version requirements install_requires = [ 'acme=={0}'.format(version), 'certbot=={0}'.format(version), 'dns-lexicon', 'mock', # For pkg_resources...
from __future__ import annotations from typing import Tuple from dataclasses import dataclass def best_position_distance(filename: str): nanobots = list(_read_nanobots(filename)) x_coords = [bot.position[0] for bot in nanobots] y_coords = [bot.position[1] for bot in nanobots] z_coords = [bot.positi...
from django.forms import ModelForm, formset_factory from django.forms.models import inlineformset_factory from django import forms from bootstrap_datepicker_plus import DatePickerInput from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Field, Fieldset, Div, HTML, ButtonHolder, Submit f...
import os import scipy import numpy as np from ImageStatistics import UsefulImDirectory import scipy as sp import ast from bokeh.charts import Histogram, show import pandas as pd class Game(object): def __init__(self, gamefolder): self.gamefolder = os.path.abspath(gamefolder) file = open(os.path.jo...
# Copyright 2021 Lucas Fidon and Suprosanna Shit import os import torch import torch.nn.functional as F import numpy as np from monai.inferers import SlidingWindowInferer from monai.data import Dataset, DataLoader, NiftiSaver from monai.transforms import Zoomd, CenterSpatialCropd from src.networks.factory import get_n...
""" This file will test the convolution implementation """ __author__ = "Tibor Schneider" __email__ = "sctibor@student.ethz.ch" __version__ = "1.0" __license__ = "Apache 2.0" __copyright__ = """ Copyright (C) 2020 ETH Zurich. All rights reserved. Author: Tibor Schneider, ETH Zurich SPDX-License-Identifie...
#! /usr/bin/env python """ Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum. The isSubsetSum problem can be divided into two subproblems a) Include the last element, recur for n = n-1, sum = sum – set[n-1] b) Exclude the last el...
# pylint: disable=missing-docstring import unittest class TestCli(unittest.TestCase): def test_dummy(self): """ It's saturday evening and sauna is on, so have no time to implement tests for now. This is totally against my principals but sometimes "poikkeus vahvistaa säännön". Ins...
# Copyright 2020 DeepMind Technologies Limited. # 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 t...
from IPy import IP, IPSet import errors def aggregate_prefix_list(plist, t=False): ''' t = if True then truncate, means that will prune the network portion to match the netmask (i.e. 1.2.3.4/24 becomes 1.2.3.0/24) (i.e. 2001:db8:abcd:1234::dead:beef/64 becomes 2001:db8:abcd:1234::/64 ''' s = ...
import os import re def get_future_s3_filename(filename, bucket_objects): """ Allows us to get the filename to use when we upload the object in S3 e.g if filename='temp.txt' does not exist in bucket_objects, we return temp.txt; if temp.txt exists but temp-(\d?).txt does not, we return temp-1.txt; ...
# coding: utf-8 """ SendinBlue API SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h...
# coding: utf-8 import argparse import math import os import sys import time from pathlib import Path import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader import data import model sys.path.append("/home/herman/git/muspy/") import muspy LOG_DIR = Path("/home/herman/workspace/...
# image recognition with YOLO # Ruud Kapteijn 6-sep-21 # download pretrained model from https://pjreddie.com/darknet/yolo/ import cv2 as cv import numpy as np import argparse import time import matplotlib.pyplot as plt yolo = cv.dnn.readNet("yolov3.weights", "yolov3.cfg") classes = [] with open("coco.name...
import emoji import demistomock as demisto from CommonServerPython import * import traceback REPUTATION_COMMANDS = ['ip', 'domain', 'file', 'url', 'threatstream-email-reputation'] # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS/PARAMS ''' THREAT_STREAM = 'ThreatStream' NO_INDI...
# -*- coding: utf-8 -*- __all__ = ("percentage",) def percentage(num, den): return 100 * num / den if den else 0
# Generated by Django 3.2.12 on 2022-04-13 19:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rating', '0004_alter_rating_star'), ] operations = [ migrations.AlterField( model_name='rating', name='star', ...
""" oec.device ~~~~~~~~~~ """ import os import time import logging from more_itertools import chunked from coax import read_feature_ids, parse_features, ReadTerminalId, ReadExtendedId, \ Feature, ProtocolError from coax.multiplexer import PORT_MAP_3299 logger = logging.getLogger(__name__) class Devi...
import yaml import typing from aws_cdk import ( aws_s3_notifications as _s3notification, aws_lambda_event_sources as _lambda_event_source, aws_s3 as _s3, aws_cognito as _cognito, aws_sqs as _sqs, aws_iam as _iam, aws_events as _events, aws_events_targets as _event_targets, aws_rds a...
test_int = 5 test_float = 1.4 test_string = 'omg' test_bytes = b'lolz'
""" Transitive-Inference model implementation. """ import ccobra import random import numpy as np from modelfunctions import * class DeSoto(ccobra.CCobraModel): """ News reasoning CCOBRA implementation. """ def __init__(self, name='DeSoto-1965'): """ Initializes the news reasoning model. ...
import sys from typing import Any import unittest import json import subprocess alliumLSP = sys.argv[1] class LSPClient: def __init__(self, serverStdIn, serverStdOut): self.requestCount = 0 self.serverStdIn = serverStdIn self.serverStdOut = serverStdOut def encode(self, method: st...
import unittest import os import requests.exceptions from pterradactyl.util.download import extract_from_zip, extract_from_tar, download from mock import patch from zipfile import ZipFile import tarfile from os.path import basename import pytest import responses class TestDownloadUtil(unittest.TestCase): def s...
from distutils.core import setup import sys kw = dict( name = 'transwarp', version = '1.0.1', description = 'Transwarp web framework', long_description = open('README', 'r').read(), author = 'Michael Liao', author_email = 'askxuefeng@gmail.com', url = 'https://github.com/michaelliao/transwa...
#!/usr/bin/env python from __future__ import print_function from datetime import datetime import fileinput from getpass import getpass import netrc import os import requests import stat #from states import * import sys import types api = 'https://api.fallenlondon.com/api/{}' class Character: def __login(self): ...
# -*- coding: utf-8 -*- ''' Management of PostgreSQL users (roles) ====================================== The postgres_users module is used to create and manage Postgres users. .. code-block:: yaml frank: postgres_user.present ''' # Import Python libs # Import salt libs import salt.utils import logging ...
from string import punctuation, digits import csv import numpy as np import matplotlib.pyplot as plt import sys if sys.version_info[0] < 3: PYTHON3 = False else: PYTHON3 = True def load_data(path_data): """Return a dictionary for the state descriptions displayed to player""" global PY...
"""Defines main application object. Starting of the programm should be controlled by a launcher script """ import json import logging import os from PyQt5.QtCore import Qt, QSize, pyqtSignal, QPoint, QTimer from PyQt5.QtGui import QIcon, QKeySequence from PyQt5.QtWidgets import (QMainWindow, QToolBar, QStackedWidget, ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTCP}. """ import errno import random import socket from functools import wraps from typing import Callable, Optional from unittest import skipIf from zope.interface import implementer import hamcrest ...
# Farewell the World, it was a nice journey. name: str = "World" def bye(who: str) -> str: return f'Goodbye {who}' if __name__ == '__main__': farewell = bye(name) print(farewell)
from django.test import TestCase from faker import Faker from .models import Article, Tag from mixer.backend.django import mixer import pandas as pd # Create your tests here. # faker https://faker.readthedocs.io/en/latest/index.html # mixer http://klen.github.io/mixer.html # class ArticleTestCase(TestCase): # # ...
# Original work Copyright 2017 Carlos Scheidegger, Sorelle Friedler, Suresh Venkatasubramanian # Modified work Copyright 2018 IBM Corporation # # 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 h...
"""Setup configuration.""" import setuptools setuptools.setup( name="beerbolaget", version='0.4.0', author="Robert Kallin", author_email="kallin.roberts@gmail.com", description="A python package to get information about the latest beer available at Systembolaget.", long_description="A python p...
import json from mythril.analysis.symbolic import SymExecWrapper from mythril.analysis.callgraph import generate_graph from mythril.ether.ethcontract import ETHContract from mythril.ether.soliditycontract import SolidityContract from mythril.laser.ethereum.state import GlobalState, MachineState, Account from mythril.l...
#!/usr/bin/env python3 class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ n = len(matrix) for i in range(n): for j in range(i): mat...
# Spec: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#asset import base64 import io import json import logging import struct from collections import namedtuple import numpy from PIL import Image from pyrr import Matrix44, quaternion import moderngl import moderngl_window from moderngl_...
#! python3 # mcb.pyw - Saves and loads pieces of text to the clipboard. # Usage: py.exe mcb.pyw save <keyword> - Saves clipboard to keyword. # py.exe mcb.pyw <keyword> - Loads keyword to clipboard. # py.exe mcb.pyw list - Loads all keywords to clipboard. import shelve, pyperclip, sys mcbShelf = shelve.o...
import os import shutil import unittest from unittest import mock import github3 from github3 import GitHub import tests from spotify_gender_ex import downloader, workdir, replacement_table, lang_file, gh_issue RT_STRING = '''{ "version": 1, "spotify_versions": [ "unittest" ], "files": [ { "pat...
from economic_dispatch.utils.utils import *
from .LayerReservoir import LayerReservoir from .LayerLinearRegression import LayerLinearRegression from .LayerEsnReservoir import LayerEsnReservoir from .LayerEncoder import LayerPcaEncoder, LayerVaeEncoder from .LayerSandpileReservoir import LayerSandpileReservoir
# # Alberto MH 2021 # from typing import ( List, Dict, Union, ) from datetime import datetime, date from sqlalchemy.orm.session import Session import conf from fetch.symbol_fetcher import SymbolFetcher from fetch.data_fetcher import DataFetcher from db.connection import DatabaseConnection class Squeeze...
""" uqid.py version 0.3.0 https://github.com/denis-ryzhkov/uqidpy Copyright (C) 2015-2018 by Denis Ryzhkov <denisr@denisr.com> MIT License, see http://opensource.org/licenses/MIT """ ### import from datetime import datetime from random import choice try: xrange except NameError: xrange = range ### chars d...
import numpy as np import logging import os import numbers import tempfile import time import torch import torch.distributed as dist import ray from ray.exceptions import RayActorError from ray.tune import Trainable from ray.tune.resources import Resources from ray.tune.utils.util import merge_dicts from ray.util.sgd....
#!/usr/bin/python ############################################################################# # Licensed Materials - Property of HCL* # (C) Copyright HCL Technologies Ltd. 2017, 2018 All rights reserved. # * Trademark of HCL Technologies Limited ########################################################################...
from tir import Webapp import unittest class ATFA125(unittest.TestCase): @classmethod def setUpClass(inst): inst.oHelper = Webapp() inst.oHelper.Setup("SIGAATF", "01/04/2016", "T1", "D MG 01 ", "01") inst.oHelper.Program("ATFA125") inst.oHelper.AddParameter("MV_ULTDEPR", "", "2...
import copy import numpy as np from nasbench import api INPUT = 'input' OUTPUT = 'output' CONV3X3 = 'conv3x3-bn-relu' CONV1X1 = 'conv1x1-bn-relu' MAXPOOL3X3 = 'maxpool3x3' OPS = [CONV3X3, CONV1X1, MAXPOOL3X3] NUM_VERTICES = 7 OP_SPOTS = NUM_VERTICES - 2 MAX_EDGES = 9 def adj_mutate(nasbench, matrix,...
""" test_standard_json_helpers """ import _set_path # noqa: F401 import os from pipelineutilities.get_size_of_images import get_size_of_images, _get_image_size_given_uri import unittest from unittest.mock import patch local_folder = os.path.dirname(os.path.realpath(__file__)) + "/" class Test(unittest.TestCase): ...
""" The MIT License (MIT) Copyright (c) 2015-2021 Rapptz Copyright (c) 2021-present Awayume 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 r...
# Copyright 2014 OpenStack Foundation. # 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 req...
from django.shortcuts import render def about(request): return render(request, 'about/about.html',{"Name": "About"})
#!/usr/bin/env python3 # pylint: disable=invalid-name, too-many-branches, too-many-statements, broad-except, too-many-arguments, too-many-instance-attributes, line-too-long ''' this script replaces build.sh, coz bash/sed/awk is driving me insane ''' import argparse import atexit import glob import json import os imp...
# Copyright (c) 2015 Riverbed Technology, Inc. # # This software is licensed under the terms and conditions of the MIT License # accompanying the software ("License"). This software is distributed "AS IS" # as set forth in the License. """ This file defines custom models for this plugin A custom model is a Django mo...
#! /usr/bin/env python """File exceptions for rsrtools.""" class RsrError(Exception): """Super class for rsrtools errors.""" def __init__(self, message: str = None) -> None: """Minimal constructor for RsrErrors. Keyword Arguments: message {str} -- Custom error text. If no message...
#!/usr/bin/python # Copyright (C) International Business Machines Corp., 2005 # Author: Dan Smith <danms@us.ibm.com> from XmTestLib import * if ENABLE_HVM_SUPPORT: SKIP("Block-attach not supported for HVM domains") config = {"disk":"phy:/dev/ram0,xvda1,w"} dom1 = XmTestDomain(extraConfig=config) dom2 = XmTestD...
import _plotly_utils.basevalidators class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="histogram.error_x", **kwargs ): super(ArrayminusValidator, self).__init__( plotly_name=plotly_name, ...
x, y = sorted(list(map(int, input().split()))) if x+3 > y: print("Yes") else: print("No")
from data.data_loader import DataLoader from model.base_model import Model import tensorflow as tf from tensorflow import keras import datetime from typing import List import os import numpy as np from sklearn.metrics import r2_score class NNModel(Model): def __init__(self, data_loader: DataLoader, network_layers...
""" Measures that try to show how easy it is to verify a projects function. """ import os import re from recoda.analyse.helpers import search_filename PYTHON_TEST_LIBRARIES = ( # Unit testing 'unittest', 'doctest', 'pytest', 'testify', 'zope.testing', 'sancho', # Mocking libraries ...
import re from pathlib import Path import matplotlib import matplotlib.pyplot as plt from matplotlib import _pylab_helpers from pyrolite.util.plot import save_figure from sphinx_gallery import scrapers def alt_matplotlib_scraper(block, block_vars, gallery_conf, **kwargs): """Patched matplotlib scraper w...
__author__ = 'sibirrer' import pytest import numpy as np import numpy.testing as npt from lenstronomy.LensModel.lens_model import LensModel from lenstronomy.Util import util class TestNumerics(object): """ tests the source model routines """ def setup(self): self.lensModel = LensModel(['GAUS...
#!/usr/bin/python3 print(f"\"Programming is like building a multilingual puzzle")
# SPDX-License-Identifier: Apache-2.0 from .investigate import collect_intermediate_steps, compare_objects # noqa from .investigate import enumerate_pipeline_models # noqa
# Imports import tensorflow as tf import tensorflow_probability as tfp import numpy as np import time tfd = tfp.distributions # Start time measures start_time = time.clock() # Reset the graph tf.reset_default_graph() # Reproducibility # Seed setting for reproducable research. # Set numpy seed np.random.seed(1234) ...
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
import os import csv import scipy.signal from tqdm import tqdm import pickle import librosa import mir_eval import numpy as np import pandas as pd from scipy import signal from cfp import cfp_process dataset_path = '/mnt/sda1/genis/carnatic_melody_dataset/resources/Saraga-Synth-Dataset/' def get_C...
#!/usr/bin/env python3 import rospy import csv import pygame import math from std_msgs.msg import String from nav_msgs.msg import OccupancyGrid from nav_msgs.msg import MapMetaData from geometry_msgs.msg import Pose from geometry_msgs.msg import Quaternion import numpy as np from numpy import loadtxt import matplotlib...
# Copyright (c) 2007-2019 UShareSoft, 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 requi...