text
stringlengths
2
999k
#!/usr/bin/env python3 # Copyright 2021 Battelle Energy Alliance, LLC import os import itertools from collections import Counter import socket from copy import copy import pkg_resources import pickle import string import openpyxl import openpyxl.styles from openpyxl.worksheet.table import Table import netaddr from t...
from setuptools import setup, find_packages setup( name="autodynatrace", version="1.0.8", packages=find_packages(), package_data={"autodynatrace": ["wrappers/*"]}, install_requires=["wrapt>=1.11.2", "oneagent-sdk>=1.2.1"], author="David Lopes", author_email="davidribeirolopes@gmail.com", ...
# Generated by Django 2.2.6 on 2019-10-17 14:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateMo...
from django.urls import path, include from accounts.api import endpoints from rest_framework_simplejwt import views as jwt_views urlpatterns = [ path('',include('rest_auth.urls')), path( 'token/', endpoints.AuthTokenView.as_view(), name='obtain_token' ), path( 'me/', ...
# -*- coding: utf-8 -*- """ ============================================================================== Base class for structure molecules (:mod:`sknano.core.molecules._molecules`) ============================================================================== .. currentmodule:: sknano.core.molecules._molecules """...
# Generated by Django 3.2.4 on 2021-07-07 15:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('createuser', '0007_projectfiles'), ] operations = [ migrations.AddField( model_name='assigntaskfiles', name='project...
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('cart/', include('cart.urls', namespace='cart')), path('orders/', include('orders.urls', namespace='orders...
# # 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"); you may not...
""" TODO: implement Images2Neibs.{perform,infer_shape}() methods """ from theano import Op, Apply import theano.tensor as T from theano.gradient import grad_not_implemented from theano.gradient import grad_undefined class Images2Neibs(Op): def __init__(self, mode='valid'): """ Modes: ...
from sparkdq.analytics.Analyzer import ComplexAnalyzer, GroupingAnalyzer, ScanShareableAnalyzer from sparkdq.analytics.analyzers.ApproxQuantile import ApproxQuantile from sparkdq.analytics.analyzers.Size import Size from sparkdq.analytics.GroupingAnalyzers import FrequencyBasedAnalyzer, ScanShareableFrequencyBasedAnaly...
import opcodetools.cpu.base_cpu # http://www.keil.com/support/man/docs/is51/is51_opcodes.htm OPCODES = [ {"mnemonic": "NOP", "code": "00", "use": "" }, {"mnemonic": "AJMP p", "code": "01pp", "use": "p=code_11" }, {"mne...
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 9 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_2_2 from i...
import pandas as pd import pytest from etna.datasets import TSDataset from etna.datasets import generate_ar_df @pytest.fixture def ts_with_exog(random_seed) -> pd.DataFrame: df = generate_ar_df(periods=100, start_time="2020-01-01", n_segments=4) df_exog_1 = generate_ar_df(periods=100, start_time="2020-01-01...
import os import langdetect as ld PATH_VALIDATION = ld.PATH_DATASETS + "validation/" TESTING_LANGUAGES = {"it": "Italian", "pl": "Polish", "ru": "Russian", "sk": "Slovak", "pt": "Portuguese", "ro": "Romanian", "da": "Danish", "sv": "Swedish", "no": "Norwegian", "en": "English", ...
# Copyright 2018 Jetperch 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,...
# Software License Agreement (BSD License) # # Copyright (c) 2012, Fraunhofer FKIE/US, Alexander Tiderko # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code mus...
''' This is the input node that receives spikes and converts to Baxter joint angles. ''' import argparse from brian_multiprocess_udp import BrianConnectUDP def from_spikes_to_baxter(spikes_pipe_in, spikes_pipe_out): """ This function substitutes the run_brian_simulation and converts the received spikes in...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time # !! This is the configuration of Nikola. !! # # !! You should edit it to your liking. !! # # ! Some settings can be different in different languages. # ! A comment stating (translatable) is used to denote those. # ! There are two ways to...
# This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from __future__ import print_function import array import copy import sys import warnings # Remove unittest2 import after dropping support for Python ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright (C) 2021 Priyanka Golia, Subhajit Roy, and Kuldeep Meel 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 w...
# Copyright 2014 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 logging import os from integration_tests import network_metrics from telemetry.page import page_test from telemetry.value import scal...
# # File: # cn12p.py # # Synopsis: # Draws a color filled contour map over Africa. # # Category: # Contours over maps # # Author: # Fred Clare (based on examples of Dave Kennison and Mary Haley). # # Date of initial publication: # September, 2004 # # Description: # This example...
# Copyright 2018 The Cirq Developers # # 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.6.0-bd605d07 (http://hl7.org/fhir/StructureDefinition/Location) on 2018-12-20. # 2018, SMART Health IT. from . import domainresource class Location(domainresource.DomainResource): """ Details and position information for a physical place. ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
# -*- coding: utf-8 -*- """Default api blueprints for Demo application.""" from flask import Blueprint, jsonify route = Blueprint('default', __name__) @route.route("/api") def hello(): return "Hello from Flask using Python 3.6.2!!" @route.route("/api/ping") def ping(): return jsonify({"status": 200, "msg": ...
import os from pyspark_tooling.logger import log def get_parallellism(): """The EMR cluster should provide information about how many partitions are available""" parallellism = int(os.environ["PYSPARK_DEFAULT_PARALLELLISM"]) log.info("check pyspark parallellism", parallellism=parallellism) ass...
from __future__ import absolute_import # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('fmristat', parent_package, top_...
# Generated by Django 2.0.13 on 2019-03-12 10:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0008_auto_20190312_0320'), ] operations = [ migrations.AlterField( model_name='user', name='gender', ...
from openpyxl import load_workbook filename = 'aalh_iit_churches_002.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 8 maximumcol = 8 minimumrow = 7 maximumrow = 43 iterationrow = 7 targetcol = 46 linkstring = 'Terms associated with the photograph are: ' for row in ws.ite...
#!/usr/bin/env python def main(): import sys from verification_utils import run_verification dim_list = [[32, 160, 128,1], [32, 256, 64, 3]] # intra tile parallelizm: (tgs, nwf, thz, thy, thx) intra_tile_l = [(2,2,2,1,1), (2,2,1,2,1), (2,1,1,1,2), (4,4,4,1,1),...
# Copyright (c) 2013-2015 Christian Geier et al. # # 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 sys import os import json import struct import subprocess low_bits = 0x3F high_bits = 0xFFFFFFC0 pointer_begin = 0xDD320 pointer_end = 0xE62EF types = {'lzssrle': 3, 'dummy': 99, 'lzss': 1, 'iecs': 4} ext = {83: 'SCPK', 73: 'IECS'} compress_decompress = True def get_pointers(): f = open("SLPS_251.72", 'rb'...
# Generated by Django 2.1.5 on 2019-07-03 18:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('customer', '0005_auto_20190702_2354'), ] operations = [ migrations.AddField( model_name='cart', name='comments', ...
# Copyright (c) 2019 Mycroft AI, Inc. # # This file is part of Mycroft Skills Manager # (see https://github.com/MatthewScholefield/mycroft-light). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional inf...
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core Developers // Copyright (c) 2015 Solarminx # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test for -rpcbind, as well as -rpcallowip and -rpcconnect # Add python-sola...
#!/usr/bin/env python # # Copyright 2006,2007,2010,2011,2013,2017 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Generates HTML pages for Categories and Tags in posts. Dependencies: - git - ruamel.yaml v2.0 https://github.com/cotes2020/jekyll-theme-chirpy © 2018-2019 Cotes Chung MIT License ''' import os import shutil import sys import subprocess from ruamel.yaml import ...
from flask import Flask, request, Response import subprocess import csv import socket import json # Initialize the Flask application app = Flask(__name__) # route http posts to this method @app.route('/api/test', methods=['POST']) def test(): client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/space/story_loot/shared_loot_dantooine_slave.iff" result.attribute_...
import glob import logging import logging.handlers from twisted.internet import reactor import signal import sys reactor_active=False def signal_handler(signal, frame): print('You pressed Ctrl+C!') #if reactor_active: reactor.stop() logging.shutdown() sys.exit(0) def initLog(fileName,standalone):...
# Setup Django settings and models import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "acacia_main.settings") import django django.setup() # Begin program import time from trades.models import OrderTask from trades.execute import batch_execute def trades_needed(order): done_proportion = 1.0 * (time.time(...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import logging import os i...
# Copyright 2013-2018 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 PyLzstring(PythonPackage): """lz-string for python.""" homepage = "https://github.com...
#!/usr/bin/env python3 import rospy rospy.logerr("###\n###\n###\n###\n###\nYou didn't specifiy which robot you want to start!\nPlease add minibot:=true or wolfgang:=true or davros:=true behind you roslaunch.\n###\n###\n###\n###\n###")
#!/bin/python3 import math import os import random import re import sys # Complete the checkMagazine function below. def checkMagazine(magazine, note): words = {} ok = True for word in magazine: if words.get(word, None): words[word] += 1 else: words[word] = 1 fo...
import os import tempfile import pytest from api import api
from dataclasses import dataclass from typing import List, Optional, Tuple, Union import numpy from ..media_type_registration import serialization_registry from ..utils import modules_available from .array import ArrayMacroStructure from .array import MachineDataType as BuiltinType @dataclass class Field: name:...
""" Agent documentation goes here. """ __docformat__ = 'reStructuredText' import logging import sys from datetime import timedelta as td, datetime as dt from volttron.platform.agent.utils import format_timestamp, get_aware_utc_now from volttron.platform.agent import utils from volttron.platform.vip.agent import Agent...
class Queue: def __init__(self): self.items = [] def enque(self,item): self.items.insert(0,item) def deque(self): self.items.pop() def print_que(self): print(self.items) def is_empty(self): return self.items == [] ...
#!/usr/bin/env python """ the scipt is used to test the mesh dependency on tunneling model it uses the new set of parameter from Sambit in Sep2010 """ ### import modules ### import pdb import sys import fvm fvm.set_atype('double') from math import * import fvm.fvmbaseExt as fvmbaseExt import fvm.importers as importer...
import os import re import math import numpy import numpy.ma import xml.etree.ElementTree from IntervalReport import * ########################################################################## ########################################################################## #################################################...
''' Los generadores son exhaustivos, quiere decir que después de llamar los valores que necesita se agotan al llamarlos en un loop. LLamar next en un generador exhausto hace un raise: stopIteration ''' even = (n%2 for n in range(10)) # Loop for de un generador. for n in (i for i in range(10)): print(n) # Pue...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import unittest from parse_map import parse_map from find_square import _find_square, get_map_with_square def get_test(name, dir_path): """return string map with square for test file""" path = os.path.join(dir_path, "tests", name + "_test") map_inf...
#!/bin/env python import web from SphinxReport import Cache from SphinxReport import DataTree urls = ( '/data/(.*)', 'DataTable', '/index/(.*)', 'Index' ) # expose zip within templates global_vars = {'zip': zip } render = web.template.render('templates/', globals = global_vars) app = web.application(url...
import pytest from .queue import Queue def test_make_invalid_queue(): """Test that a instantiating a new Queue with a non-iterable will raise an error""" with pytest.raises(TypeError) as err: Queue(1) assert str(err.value) == 'Invalid iterable' def test_make_valid_empty_queue(empty_queue): "...
import pytest import httpx from .utils import MockRawSocketBackend async def test_proxy_tunnel_success(backend): raw_io = MockRawSocketBackend( data_to_send=( [ b"HTTP/1.1 200 OK\r\n" b"Date: Sun, 10 Oct 2010 23:26:07 GMT\r\n" b"Server: proxy-s...
import json import requests from requests.auth import AuthBase from typing import List, TypedDict, Union from time import sleep from requests.models import PreparedRequest class BasicAuth(AuthBase): def __init__(self, token: str) -> None: self.token = token def __call__(self, r: PreparedRequest) -> ...
import GPy import numpy as np from emukit.core.loop.loop_state import create_loop_state from emukit.bayesian_optimization.acquisitions import ExpectedImprovement from emukit.bayesian_optimization.local_penalization_calculator import LocalPenalizationPointCalculator from emukit.core import ParameterSpace, ContinuousPar...
import aspose.words as aw from docs_examples_base import DocsExamplesBase, MY_DIR, ARTIFACTS_DIR class WorkingWithPdfLoadOptions(DocsExamplesBase): def test_load_encrypted_pdf(self): #ExStart:LoadEncryptedPdf doc = aw.Document(MY_DIR + "Pdf Document.pdf") save_options = aw.savi...
import numpy as np import json def parafile_prep(nz, nx, dz, dx, nSteps, dt, f0, filter_para, nPml, isAc, para_fname, survey_fname, data_dir_name, scratch_dir_name=""): # nPad = 32 - (nz+2*nPml)%32 nPad = 0 # Par_file_name = '../Par/Par_file.json' para = {} # para['nz'] = nz + 2*nPml + nPad # para['nx'] = nx +...
""" Common functions for the build system """ from __future__ import print_function import locale import sys import subprocess import platform from os.path import dirname, realpath, join, isdir, isfile from os import makedirs from sys import argv, stdout, stderr, exit from panda3d.core import PandaSystem, Filename...
"""V2 backend for `asr_recog.py` using py:class:`espnet.nets.beam_search.BeamSearch`.""" import json import logging import torch from packaging.version import parse as V from espnet.asr.asr_utils import add_results_to_json, get_model_conf, torch_load from espnet.asr.pytorch_backend.asr import load_trained_model from...
#!/usr/bin/env python import os import subprocess import sys import zipfile EXTENSIONS_TO_SKIP = [ '.pdb' ] PATHS_TO_SKIP = [ 'angledata', #Skipping because it is an output of //ui/gl that we don't need './libVkLayer_', #Skipping because these are outputs that we don't need './VkLayerLayer_', #Skipping becaus...
from setuptools import setup, find_packages setup( name='Continuous-bandit', version='0.1.0', url='https://github.com/y-mitsui/continuous_bandit', package_dir={'': 'src'}, py_modules=['helpers','bayes_optim'], description='Bayesian optimizetion using gaussian process that optimized by cuda', i...
# coding=utf-8 import os import textwrap import unittest from parameterized import parameterized from conans.model.ref import ConanFileReference from conans.test.assets.genconanfile import GenConanfile from conans.test.utils.tools import TestClient class InfoCommandTest(unittest.TestCase): def setUp(self): ...
import unittest from programy.processors.pre.normalize import NormalizePreProcessor from programy.bot import Bot from programy.brain import Brain from programy.config.brain import BrainConfiguration from programy.config.bot import BotConfiguration class NormalizeTests(unittest.TestCase): def setUp(self): ...
import pandas as pd import datetime import numpy as np import os import matplotlib.pyplot as plt import logging from acoustic_data_science import config, helpers durations_stats_txt_path = os.path.join( config.project_dir, "figures/transient_durations", "durations_stats.txt", ) def report_transient_stat...
# -*- coding: utf-8 -*- """ Created on Mon Jul 30 15:17:42 2018 @author: 20270917 """ #%% import matplotlib.pyplot as plt import pandas import numpy as np import xarray as xr from matplotlib.dates import num2date, date2num import matplotlib import datetime import os import pdb from zutils import qc_conventions def...
#!/usr/bin/env python3 import sys import json objects = json.load(sys.stdin) for i in range(len(objects) - 1, -1, -1): obj = objects[i] # Remove everything except .c files if not obj["file"].endswith(".c"): objects.remove(obj) continue # remove duplicates introduced my multiarch ...
import json from http import HTTPStatus import pytest from flask import url_for from src.models.domain.Agent import Agent from src.models.domain.Bot import Bot from src.models.domain.Installation import Installation from tests.factories.slackfactories import SlackEventFactory, SlackTokensFactory from tests.func.slack...
#!/usr/bin/env python """ (C) Copyright 2016 Nuxeo SA (http://nuxeo.com/) and contributors. 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 re...
# -*- coding: utf-8 -*- import yfinance as yf import pandas as pd from datetime import datetime from pathlib import Path import logging from tashares.cfg import config logging.basicConfig(format='%(asctime)s %(levelname)s:%(message)s', level=logging.INFO, datefmt='%m/%d/%Y %I:%M...
# Jogo da Adivinhação v2.0 '''Melhore o jogo do DESAFIO 028 onde o computador vai "pensar" em um NÚMERO ENTRE 0 E 10. Só que agora o jogador vai tentar advinhar até acertar, mostrando no final quantos palpites foram necessários para vencer''' from random import randint computador = randint(0, 10) print('\033[35m''Sou ...
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ChargeInfoOption: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key i...
"""Exceptions used in multisma2.""" from enum import Enum, auto class NormalCompletion(Exception): """Normal completion, no errors.""" class AbnormalCompletion(Exception): """Abnormal completion, error or exception detected.""" class FailedInitialization(Exception): """multisma2 initialization failed...
from time import time get_dimensions = lambda x: list(map(int, x.split('x'))) def get_shortest_side_area(sides): temp = sides; temp.remove(max(temp)) return temp[0]*temp[1] area = lambda l, b, h: 2*(l*b + b*h + h*l) + get_shortest_side_area([l, b, h]) def main(): res = 0 with open('../input.txt') a...
import math import torch from ..optimizer import Optimizer class Adam(Optimizer): r"""Implements Adam algorithm with multi tensor APIs. It has been proposed in `Adam: A Method for Stochastic Optimization`_. The implementation of the L2 penalty follows changes proposed in `Decoupled Weight Decay Regula...
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
# -*- coding: utf-8 -*- """Stateful interaction functions.""" from __future__ import annotations import itertools as itt import logging import math from abc import ABC, abstractmethod from typing import Any, Callable, Generic, Mapping, MutableMapping, Optional, Sequence, Set, Tuple, Union, cast import torch from cl...
import time,sys men = { "Chicken Strips" : 1, "French Fries" : 2, "Hamburger" : 3, "Hotdog" : 4, "Large Drink" : 5, "Medium Drink" : 6, "Milk Shake" : 7, "Salad" : 8, "Small Drimk" : 9 } price = { 1 : 3.50, 2 : 2.50, 3 : 4.00, 4 : 3.50, 5 : 1.75, 6 : 1.50, 7 : 2.25, 8 : 3.7...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os import nipype.interfaces.fsl as fsl from nipype.interfaces.base import InterfaceResult from nipype.interfaces.fsl import check_fsl, no_fsl import pytest @pytest.mark.ski...
""" This is the simplest possible, brute force test of the informative learning scheme. Author: Ilias Bilionis Date: 10/08/2014 01/29/2015 10/13/2015 """ import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import pybgo import shutil import numpy as...
from __future__ import absolute_import from django.core.exceptions import FieldDoesNotExist from test_app.shared.models import Client def create_client(name, schema_name, domain_url): kwargs = {} try: Client._meta.get_field("domain_url") except FieldDoesNotExist: pass else: k...
from techdump import techdump def test_foo(): '''Placeholder to remind me that I need to write some tests''' assert True
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. # What is the 10 001st prime number? import math def is_prime(n): if n==2: return True for i in range(2,int(math.sqrt(n)+1)): if (n%i==0): return False return True def main...
from unittest import TestCase from unittest.mock import patch import pytest from functools import reduce from samtranslator.model import InvalidResourceException from samtranslator.model.api.http_api_generator import HttpApiGenerator from samtranslator.open_api.open_api import OpenApiEditor class TestHttpApiGenerato...
import json from flask import Blueprint from flask_apis.example_api import long_method example_bp = Blueprint('example_bp', __name__) example_ws = Blueprint('example_ws', __name__) @example_ws.route("/echo-example") def echo_example(socket): # Example usage of web socket to receive and send messages while ...
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") # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED...
# -*- coding: utf-8 -*- # Copyright (C) 2020-2022 by SCICO Developers # All rights reserved. BSD 3-clause License. # This file is part of the SCICO package. Details of the copyright and # user license can be found in the 'LICENSE' file distributed with the # package. """Radon transform LinearOperator wrapping the ASTR...
"""DeeplabV3+ with ResNet-50-d8.""" _base_ = [ "../_base_/models/deeplabv3plus_r50-d8.py", "../_base_/datasets/bdd100k_512x1024.py", "../_base_/default_runtime.py", "../_base_/schedules/schedule_40k.py", ] load_from = "https://dl.cv.ethz.ch/bdd100k/sem_seg/models/deeplabv3+_r50-d8_512x1024_40k_sem_seg_...
#!/usr/bin/env python3 """ This file contains entry points for all of the various commands in the SE toolset. For example, `se build` and `se typogrify`. Most of the commands are entirely contained in this file. Some very long ones, like `create-draft`, are broken out to external modules for readability and maintaina...
# Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/env python """ 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");...
""" This module demonstrates BUILDING-UP a new SEQUENCE, one item at a time, using the ACCUMULATOR pattern. -- We will later see a more efficient way to build-up and/or modify sequences, namely by MUTATING their elements. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, ...
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. # # Modifications Copyright OpenSearch Contributors. See # GitHub history for details. # # Licensed to Elasticsearch B.V. under...
# 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 may ...
""" Pod API This document refers to Symphony API calls that do not need encryption or decryption of content. - sessionToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined...