text
stringlengths
1
927k
from bc4py import __version__, __chain_version__, __message__ from bc4py.config import C, V, P from bc4py.chain.utils import GompertzCurve, DEFAULT_TARGET from bc4py.chain.difficulty import get_bits_by_hash, get_bias_by_hash from bc4py.database import obj from bc4py.user.api.utils import error_response, local_address f...
from ma import ma from models.emergency_contact import EmergencyContactModel from marshmallow import fields, validates, ValidationError from schemas.contact_number import ContactNumberSchema class EmergencyContactSchema(ma.SQLAlchemyAutoSchema): class Meta: model = EmergencyContactModel contact_numb...
# coding: utf-8 # cf.http://d.hatena.ne.jp/white_wheels/20100327/p3 import numpy as np import matplotlib.pylab as plt from mpl_toolkits.mplot3d import Axes3D def _numerical_gradient_no_batch(f, x): h = 1e-4 # 0.0001 grad = np.zeros_like(x) for idx in range(x.size): tmp_val = x[idx] x[idx]...
"""1765. Map of Highest Peak https://leetcode.com/problems/map-of-highest-peak/ """ from typing import List class Solution: def highest_peak(self, is_water: List[List[int]]) -> List[List[int]]: m, n = len(is_water), len(is_water[0]) ans = [[-1] * n for _ in range(m)] q = [] for i i...
#!/usr/bin/env python3 """ Dividing integer numbers and returning list [q, r]. Which are quotient and remainder, respectively. """ from sys import argv from errorhandler import zerodiv, inputerror def divide(a,b): try: q = a // b except ZeroDivisionError: zerodiv("b") r = a - b*q retu...
#### 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/lair/base/shared_poi_all_lair_warren_large_fog_mustard.iff" result....
#!/usr/bin/python # -*- coding:utf-8 -*- import sys import os picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic') libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib') if os.path.exists(libdir): sys.path.append(libdir) import logging from ...
import os class ServerConfig: def __init__(self, env): self.update_plugins_on_start_up = env[ 'UPDATE_PLUGINS_ON_STARTUP'] if 'UPDATE_PLUGINS_ON_STARTUP' in env else True self.make_slower_responses = float( env['DEBUG_MAKE_SLOWER_RESPONSES']) if 'DEBUG_MAKE_SLOWER_RESPONSES...
from __future__ import division import numpy as np from scipy.spatial.distance import pdist, squareform from scipy.sparse.csgraph import connected_components import pandas as pd from tqdm import tqdm import blob import pickle import glob import os import sys import scipy.misc from skimage.io import imread from skimage ...
#!/bin/env python3 """ This script creates a TSV of node pairs linked by an 'equivalent_to'/'same_as' relationship in KG2. The TSV file is created in the same directory the script is run from. Example of rows in the output file: UMLS:C0027358 UMLS:C0014563 UMLS:C0878440 UMLS:C0014563 Usage: python dump_kg2_equivalencie...
import socket import threading import SocketServer import crypto import time import binascii from opcode import opcode as opcode_enm class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): while True: data = self.request.recv(1024) cur_thread = threading.current_thread() pr...
"""Test-cases for ODE filters.""" import pytest_cases from probnum import diffeq, randprocs import probnum.problems.zoo.diffeq as diffeq_zoo # logistic.rhs is implemented backend-agnostic, # thus it works for both numpy and jax @pytest_cases.case(tags=("numpy", "jax")) def problem_logistic(): return diffeq_zoo...
from django.apps import AppConfig class PardakhtConfig(AppConfig): name = 'pardakht'
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 51.0.0 from . import AWSObject, AWSProperty, PropsDictType from .validators import boolean, integer class Grant(...
# # pieces - An experimental BitTorrent client # # Copyright 2016 markus.eliasson@gmail.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-2.0 # # ...
import logging import prodtest class MultipleOutputsTest(prodtest.ProduceTestCase): """ Tests the handling of recipes with multiple outputs. """ def test_without(self): """ Without the outputs attribute, the recipe is run twice, once for each target, thus two INFO messages are...
""" Handle symmetry factor stuff """ import automol from autofile import fs from lib import structure def symmetry_factor(pf_filesystems, pf_models, spc_dct_i, rotors, frm_bnd_keys=(), brk_bnd_keys=()): """ Calculate the symmetry factor for a species Note: ignoring for saddle pts the ...
from django.db import models class Person(models.Model): name = models.TextField() def __str__(self): return "{} ({})".format(self.name, self.pk) class PersonContent(models.Model): person = models.ForeignKey(Person, on_delete=models.CASCADE) language = models.TextField() text = models.T...
from django.contrib import admin from app.models import DataStore, GameSale # Show files uploaded in django admin admin.site.register(DataStore) # Show record in django admin admin.site.register(GameSale)
import abc from datetime import datetime from typing import List, Optional from pydantic import BaseModel from sqlalchemy.sql.elements import BinaryExpression from app.models import Car from app.models.car import AcType, CarType, DriveType, FuelType, GearboxType class RangeCriterion(BaseModel): __metaclass__ = ...
'''show_interface.py NXOS parsers for the following show commands: * show interface * show vrf all interface * show ip interface vrf all * show ipv6 interface detail vrf all * show interface switchport * show ip interface brief * show ip interface brief | vlan * show interface brief ...
a, b, c, d, e = map(int, input().split()) score = int(input()) if 100 >= score >= a: print('A') elif a > score >= b: print('B') elif b > score >= c: print('C') elif c > score >= d: print('D') elif d > score >= e: print('E') else: print('F')
# import convert_ui_and_qrc_files import json import os import pathlib import shutil import sys from functools import partial from pprint import pprint import imagehash from PIL import Image from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt from PyQt5.QtGui import QColor, QKeySequence, QPalette fr...
# This file is part of DEAP. # # DEAP 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 3 of # the License, or (at your option) any later version. # # DEAP is distributed ...
import numpy as np from mher.common.schedules import ConstantSchedule, PiecewiseSchedule def test_piecewise_schedule(): ps = PiecewiseSchedule([(-5, 100), (5, 200), (10, 50), (100, 50), (200, -50)], outside_value=500) assert np.isclose(ps.value(-10), 500) assert np.isclose(ps.value(0), 150) assert n...
"""Support for HERE travel time sensors.""" from datetime import datetime, timedelta import logging from typing import Callable, Dict, Optional, Union import herepy import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_LAT...
# Lint as: python3 # Copyright 2018 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 agr...
# File: __init__.py # Audiophiler main flask functions import hashlib import os import random import subprocess import json import requests import flask_migrate from flask import Flask, render_template, request, jsonify, redirect from flask_pyoidc.provider_configuration import * from flask_pyoidc.flask_pyoidc import O...
from rubik_solver.Move import Move from .. import Solver from ..Beginner.WhiteFaceSolver import WhiteFaceSolver class F2LSolver(Solver): STEPS = { 'FUR': { 'UB': ["R", "U", "R'"], 'FU': ["U'", "F'", "U", "F"], 'FR': ["U", "F'", "U", "F", "U", "F'", "U2", "F"], ...
import torch from torch import nn class FCN(nn.Module): def __init__(self, dimension, num_layers=3, num_class=2): super(FCN, self).__init__() self.first_layer = nn.Linear(dimension, 1000) self.first_layer_relu = nn.ReLU() mid_layers = [] for i in range(num_layers - 2): ...
import pytest from plenum.common.constants import DOMAIN_LEDGER_ID, PREPREPARE, PREPARE, COMMIT from plenum.common.messages.internal_messages import ViewChangeStarted, NewViewCheckpointsApplied from plenum.common.messages.node_messages import NewView from plenum.server.consensus.utils import preprepare_to_batch_id fro...
from brownie import Dogeviathan, accounts, config def main(): dev = accounts.add(config["wallets"]["from_key"]) attacker = accounts.add(config["wallets"]["from_attacker_key"]) dogeviathan = Dogeviathan[len(Dogeviathan) - 1] dogeviathan.burn(0, {"from": dev}) #dogeviathan.burn(1, {"from": attacker}...
import warnings import openpyxl import os import datetime as dt import re from statistics import mean, stdev from math import ceil, floor import add_bloomberg_excel_functions as abxl from CONSTANTS import ( OPTION_DESCRIPTION_PATTERN_INT, OPTION_DESCRIPTION_PATTERN_FLOAT, OPTION_SHEET_PATTERN_INT, OPTION_SHEET_PATTERN_...
# Generated by Django 2.2.6 on 2019-10-08 20:43 import django.core.validators import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("passbook_core", "0001_initial"), ] operations = [ migrati...
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Funnel(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "funnel" _valid_props = { "alignmentgroup", "cliponaxis", "connector", "c...
# -*- coding: utf-8 -*- # # Copyright (C) 2022 TU Wien. # # Invenio-Users-Resources is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Elasticsearch version 6 mappings."""
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'arvinddhindsa.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ...
import sys import numpy as np import scipy as sp from robo.maximizers.base_maximizer import BaseMaximizer class DifferentialEvolution(BaseMaximizer): def __init__(self, objective_function, lower, upper, n_iters=20, rng=None): """ Parameters ---------- objective_function: acquisi...
from audio_util import * from dataloader import * noise_path = '/home/smg/haoyuli/SiibGAN/database/Train/Noise/' clean_path = '/home/smg/haoyuli/SiibGAN/database/Train/Clean/' gen_file_list = get_filepaths('/home/smg/haoyuli/SiibGAN/database/Train/Clean/') genloader = create_dataloader(gen_file_list,noise_path) x = ...
import os, time, sys, traceback, weakref import numpy as np import threading try: import __builtin__ as builtins import cPickle as pickle except ImportError: import builtins import pickle # color printing for debugging from ..util import cprint class ClosedError(Exception): """Raised when an event...
# !/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: sebanie15 """
import os, inspect from lib import navpy from util import transformations as tr from util import SRTM, common, file_tools, mavlink_meta from shapely.geometry import LineString from shapely import affinity # Samuel Dudley # September 2018 # Mission planning tool for mavlink enabled vehicles # Setup logging # gene...
import numpy as np class SubScreen(): def __init__(self, x, y, width, height, curses): self.x = x self.y = y self.width = width self.height = height self.curses = curses def put_char(self, x, y, char=' ', foreground='white', background='transparent'): if x <...
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
""" Created by Robin Baumann <mail@robin-baumann.com> at 08.06.20. """
from django.urls import path from .views import ( tweet_view, like_tweet, unlike_tweet, tweet_detail_view ) urlpatterns = [ path('', tweet_view, name='tweet'), path('<int:id>/', tweet_detail_view, name='tweet'), path('like/<int:tweet_id>/', like_tweet, name='like'), path('unlike/<int:tw...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2012 Michal Kalewski <mkalewski at cs.put.poznan.pl> # # This file is a part of the Simple Network Simulator (sim2net) project. # USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO # THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD H...
from models import Linear3 from core.Optimizers import sgd, bgd from core.Functions import one_hot_f import numpy as np from tensorflow import keras from core.Dataloader import batch_iterator def test(model, test_inputs, test_labels): num_of_sample = test_inputs.shape[0] cnt_correct, cnt_tot = 0, 0 for i ...
# -*- coding: utf-8 -*- # Copyright 2020 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...
""" This is free and unencumbered software released into the public domain. https://github.com/sesh/django-middleware """ import logging logger = logging.getLogger("django") def set_remote_addr(get_response): def middleware(request): request.META["REMOTE_ADDR"] = request.META.get( "HTTP_X_R...
#!/usr/bin/env python # # Copyright (c) 2014, Yelp, Inc. # class HTTPError(IOError): """Initialize HTTPError with 'response' and 'request' object """ def __init__(self, *args, **kwargs): response = kwargs.pop('response', None) self.response = response # populate request either fro...
import socket import traceback import datetime SERVER_IP = '127.0.0.1' SERVER_PORT = 3341 MAX_UDP = 65507 # Maximum UDP size f = open("debug.log", "w+") class ServerSocket(): clients = {} def __init__(self, ip, port): self.server_socket = socket.socket(socket.AF_INET, ...
# (c) Copyright IBM Corp. 2019. All Rights Reserved. # -*- coding: utf-8 -*- """Tests using pytest_resilient_circuits""" from __future__ import print_function import pytest from resilient_circuits.util import get_config_data, get_function_definition from resilient_circuits import SubmitTestFunction, FunctionResult fro...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_timeseries.ipynb (unless otherwise specified). __all__ = []
import numpy as np from neupy import layers from base import BaseTestCase class ReshapeLayerTestCase(BaseTestCase): def test_reshape_layer_1d_shape(self): x = np.random.random((5, 4, 3, 2, 1)) input_layer = layers.Input((4, 3, 2, 1)) reshape_layer = layers.Reshape() input_layer ...
import os from ufs_tools.folder_tool import ensure_dir def get_log_file_path(folder, log_file_name, ext=".log"): log_folder_relative_path = os.path.join('logs', folder) log_filename = '%s%s' % (log_file_name, ext) current_dir = os.path.join(os.getcwd()) folder_log_full_path = os.path.join(current_dir...
ownerclass = 'AppDelegate' ownerimport = 'AppDelegate.h' # Init result = Window(330, 110, "Tell me your name!") result.xProportion = 0.8 result.yProportion = 0.2 result.canResize = False nameLabel = Label(result, text="Name:") nameLabel.width = 45 nameField = TextField(result, text="") helloLabel = Label(result, text=...
#!/usr/bin/env python3 import unittest import subprocess import tempfile import requests import os TEST_ROOT = os.path.abspath(os.path.dirname(__file__)) class ServicesTest(unittest.TestCase): @staticmethod def _test_service(service_name: str, binary_path: str): print(f'Testing {service_name}') with open(bin...
# Copyright (c) 2021 SUSE LLC # # This program is free software; you can redistribute it and/or # modify it under the terms of version 3 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; witho...
import platform def ctrl_or_command_key(): if platform.system() == 'Darwin': return 'COMMAND' return 'CONTROL'
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) 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 co...
""" Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. """ import os import stat __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', 'getsize', 'isdir', 'isfile', 'samefile', 'sameopenfil...
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
from typing import Callable def joinThread(treadId: str) -> None: """Ожидает завершения указанного потока. Параметры --------- treadId: :class:`str` id потока """ raise NotImplementedError def killThread(treadId: str) -> None: """Заканчивает исполнение указанного потока. Па...
''' a = [[1 for j in range(5)], [2 for j in range(5)], [3 for j in range(5)], [4 for j in range(5)], [5 for j in range(5)], [6 for j in range(5)]] for i in range(6): for j in range(5): print(a[i][j], end='') print() print() x, y = 0, 0 while True: if x == 6: print...
#!/usr/bin/env python # -*- coding: utf-8 -*- """"WRITEME""" import matplotlib.pyplot as plt import numpy as np import pygimli as pg from pygimli.viewer.mpl import createColorBar # , updateColorBar from .ratools import shotReceiverDistances def drawTravelTimeData(ax, data, t=None): """ Draw first arr...
# BSD 3-Clause License # # Copyright (c) 2019, Elasticsearch BV # 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 must retain the above copyright notice, t...
import os import sfaira import sys # Set global variables. print("sys.argv", sys.argv) data_path = str(sys.argv[1]) path_meta = str(sys.argv[2]) path_cache = str(sys.argv[3]) processes = int(str(sys.argv[4])) ds = sfaira.data.dataloaders.Universe( data_path=data_path, meta_path=path_meta, cache_path=path_cache )...
# (C) William W. Cohen and Carnegie Mellon University, 2017 import logging import numpy as np import os import unittest import sys import collections import tempfile from tensorlog import xctargets if xctargets.tf: import tensorflow as tf from tensorlog import tensorflowxcomp else: tensorflowxcomp=None if xct...
# Copyright 2016 ZTE 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 ...
# qubit number=3 # total number=7 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from ...
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # 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...
########################################################################## # # Copyright (c) 2010, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
from django.urls import path from member.views import events app_name = 'member' urlpatterns = [ path('events/', events.events_google, name='events'), path('booking/create/<username>/', events.create_booking, name='create_booking'), path('booking/confirm/<room>/<start>/<end>/<date>/<rate>/', events.confir...
# -*- coding: utf-8 -*- """ @Time: 2021/8/11 14:53 @Author: zzhang zzhang@cenboomh.com @File: extend_param.py @desc: """ from collect.service_imp.before_plugin.before_plugin import BeforePlugin class HandlerReqCountParam(BeforePlugin): def handler(self, params, template): params_result= self.get_params_re...
from pathlib import Path, PurePosixPath import pandas as pd import pytest from adlfs import AzureBlobFileSystem from fsspec.implementations.http import HTTPFileSystem from fsspec.implementations.local import LocalFileSystem from gcsfs import GCSFileSystem from pandas.testing import assert_frame_equal from s3fs.core im...
from pygments.style import Style from pygments.token import ( Comment, Error, Keyword, Literal, Name, Number, Operator, String, Text ) class BaseSixteenStyle(Style): base00 = '#222222' base01 = '#313131' base02 = '#555D55' base03 = '#644646' base04 = '#5A5A5A' base05 = '#DEDEE7' base06...
# # This source file is part of the EdgeDB open source project. # # Copyright 2020-present MagicStack Inc. and the EdgeDB authors. # # 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...
#!/usr/bin/env python3 # # 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 "Li...
import os import urlparse import re import pickle import zlib from datetime import timedelta , datetime from chart3.link_crawler import link_crawler class DiskCache: def __init__(self , cache_dir = "cache",max_length = 255, expires=timedelta(days=30) ): self.cache_dir = cache_dir self.max_leng...
# Copyright 2014-2021 The Matrix.org Foundation C.I.C. # # 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...
#!/usr/bin/env python # # Copyright (c) 2002, Google Inc. # 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 must retain the above copyright # notice, this ...
# GYP file to build a V8 sample. { 'targets': [ { 'target_name': 'SkV8Example', 'type': 'executable', 'mac_bundle' : 1, 'include_dirs' : [ '../third_party/externals/v8/include', '../third_party/externals/v8', ], 'sources': [ '../experimental/SkV8Example/...
import jinja2 import numpy as np from PyQt5 import QtCore, QtWidgets import os.path import core.elements import core.bonds from collections import Counter from core.calculation.discretization import Discretization from gui.tabs.statistics.tree_list import TreeList from gui.util.webview import WebWidget def render_htm...
from djongo import models from datetime import * class MaterialType(models.Model): _id = models.ObjectIdField() typeName = models.CharField(max_length=255, blank=False) def __str__(self): return self.typeName class Material(models.Model): _id = models.ObjectIdField() materialType = models...
# Copyright 2020 Alibaba Group Holding Limited. 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 ...
from django.contrib import admin from .models import Bird, State, Bird_type admin.site.register(Bird) admin.site.register(State) admin.site.register(Bird_type)
#!/usr/bin/env python from containers_publisher import containersSending from containers_subscriber import containersReceiver from containers_ui import Ui_containersUi from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QObject, QRect import rospy greenControl = "../src/containers_gui/src/resources/i...
import unittest import numpy import six import chainer from chainer.backends import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer_tests.functions_tests.pooling_tests import pooling_nd_helper @testing.parameterize(*test...
from datetime import datetime from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.hybrid import hybrid_property from flask import current_app from app.api.utils.models_mixins import Base from app.extensions import db from .now_application im...
import sys from abc import ABC from dataclasses import dataclass, field from enum import Enum from typing import List, Tuple from abides_core import Message, NanosecondTime from ..orders import Side @dataclass class MarketDataSubReqMsg(Message, ABC): """ Base class for creating or cancelling market data sub...
from fdtd_venv import fdtd_mod as fdtd from numpy import arange, flip, meshgrid, array from matplotlib.pyplot import plot, show def main(): grid = fdtd.Grid(shape=(200, 200, 1), grid_spacing=155e-9) lens_width = 10 lens_order = 3 lens_radius = 25 x, y = arange(-90, 90, 1), arange(lens_radius-lens_order*lens_widt...
# Copyright (C) 2013 Google Inc. 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 must retain the above copyright # notice, this list of conditions and the f...
# coding=utf8 # Copyright 2018 JDCLOUD.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-2.0 # # Unless required by applicable law or agreed ...
# type: ignore from typing import List, Optional from uuid import uuid4 import pytest from nwastdlib import const from orchestrator.domain.lifecycle import change_lifecycle from orchestrator.forms import FormPage, post_process from orchestrator.types import State, SubscriptionLifecycle from orchestrator.utils.state ...
# @Title: 和为s的连续正数序列 (和为s的连续正数序列 LCOF) # @Author: 18015528893 # @Date: 2021-01-29 17:00:07 # @Runtime: 172 ms # @Memory: 14.9 MB from typing import List class Solution: def findContinuousSequence(self, target: int) -> List[List[int]]: left = 0 right = 0 window = 0 l = range(1, tar...
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind with different proxy configuration. Test plan: - Start versessd's with different proxy c...
# Generated by Django 2.0.9 on 2018-10-28 15:38 from django.db import migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'), ('images', '0002_auto_20181028_1656'), ] operations = [ migrations.AddField( ...
# coding: utf-8 # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. from __future__ import absolute_import import sys import unittest im...
# coding: utf-8 """ Harbor API These APIs provide services for manipulating Harbor project. # noqa: E501 OpenAPI spec version: 2.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import harbor from api.repository_api...