text
stringlengths
2
999k
from cnns4qspr.loader import voxelize from cnns4qspr.visualizer import plot_field, plot_internals from cnns4qspr.featurizer import featurize, gen_feature_set from cnns4qspr.trainer import Trainer, CNNTrainer import argparse import numpy as np def run(): voxels = voxelize('examples/sample_pdbs', path_type='folder',...
from django.http import HttpResponse from django.http import HttpResponseForbidden from django.template import RequestContext, loader from django.dispatch import receiver from django.db.models.signals import post_save from django.contrib.auth.models import User from django.contrib import auth from django.shortcuts impo...
import sys sys.path.append("/app") from distributed_asgi import Node class ASGIApp: def __init__(self, scope): self.scope = scope async def __call__(self, recieve, send): await send({ "type":"http.response.start", "status": 200 }) await send({ ...
#!/usr/bin/python # -*- coding: utf-8 -*- from common import * import param import luigi var_target_files = [] for group in param.health_stat_report_targets: for url in group["urls"]: filename = "var/{}_{}_{}.{}".format(group["name"],url["year"],group["subname"],url["type"]) output = { ...
# Generated by Django 3.1.1 on 2020-09-10 16:21 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0010_auto_20200910_1617'), ] operations = [ migrations.RemoveField( model_name='trackpo...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
_base_ = '../mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py' model = dict( backbone=dict( norm_cfg=dict(type='SyncBN', requires_grad=True), norm_eval=False))
########################################################################### # # Copyright 2019 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 # # https://www.apache.org/...
from scipy.io import loadmat import numpy as np from PIL import Image import os import random from imgaug import augmenters as iaa def load_data(train_list, val_list, augment=True): augment_size = 150 #define how many times the augmented dataset comparing to the original images. ## one-hot conversion def ...
from typing import Tuple import math from scripts.probability.distributions import normal_cdf, inverse_normal_cdf def normal_approximation_to_binomial(n: int, p: float) -> Tuple[float, float]: """Returns mu and sigma corresponding to a Binomial(n, p)""" mu = p * n sigma = math.sqrt(p * (1 - p) * n) re...
from cereal import car from selfdrive.car.volkswagen.values import CAR, BUTTON_STATES from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase GEAR = car.CarState.GearShifter EventName = car.CarEvent.EventName class C...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-11-02 03:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("jacc", "0005_auto_20171030_1958"), ] operations = [ migrations.AddField( ...
# Copyright 2019 YugaByte, Inc. and Contributors # # Licensed under the Polyform Free Trial License 1.0.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://github.com/YugaByte/yugabyte-db/blob/master/licenses/POLYFORM-FREE-TRIAL-LIC...
from sopel.module import commands @commands('parents') def parents(bot, trigger): Mom = "Ameenekosan" Dad = "alxgnon" if trigger.nick == Mom: bot.reply("You're my mommy and %s is my daddy! <3" % Dad) elif trigger.nick == Dad: bot.reply("%s is my mommy and you're my daddy! <3" % Mom) ...
import re from functools import reduce def solution(dartResult): numScores = [] scores = re.findall(r'(\d{1,2})([SDT])+([*#])*', dartResult, flags=0) for idx, score in enumerate(scores): res = int(score[0]) # bonus, S = pow(res, 1) if score[1] == 'D': res = pow(res, 2) elif...
from __future__ import annotations from imports import k8s from cdk8s import Chart from kubeasy_sdk.container import Container from kubeasy_sdk.utils.collections.containers import Containers from kubeasy_sdk.utils.resource import Rendered from kubeasy_sdk.volume import Volume from kubeasy_sdk.utils.collections.volumes...
from django.contrib.auth.models import AbstractUser from django.db import models from itsdangerous import TimedJSONWebSignatureSerializer from django.conf import settings # Create your models here. from shopping_mall.utils.BaseModel import BaseModel class User(AbstractUser): mobile=models.CharField( uniq...
from .losses import * from .models import DenseModel, ConvModel from .mnist import load as load_mnist
import codecs import sys import main import os from searchController import * from functools import partial from PyQt5 import QtCore from PyQt5.QtCore import QMutex, QObject, QThread, pyqtSignal, pyqtSlot class Worker(QtCore.QThread): sgnOutput = pyqtSignal(str) sgnFinished = pyqtSignal() def __i...
# Builtins import unittest from harvest.plugin._base import Plugin class TestPlugin(unittest.TestCase): def test_init(self): plugin = Plugin("my_plugin", ["pandas", "finta", "yaml"]) self.assertEqual(plugin.name, "my_plugin") if __name__ == "__main__": unittest.main()
from utilities.exceptions import ElementNotFoundError from utilities.utilities import iterable, get_class_from_parent_module import json from json import JSONEncoder class Model(object): def __init__(self, root_element=None, version=None): self._version = version # access to model elements ...
from django.conf import settings from django.views.generic import TemplateView from djangosaml2idp.models import ServiceProvider class IndexView(TemplateView): template_name = "idp/index.html" def get_context_data(self, **kwargs): context = super(IndexView, self).get_context_data(**kwargs) co...
print "importing nested", __name__ _y = 2 y = 2 def bar(): print "bar" class D(object): pass
import logging from celery import chain, chord from django.apps import apps from django.db import OperationalError, transaction from mayan.apps.documents.tasks import task_generate_document_page_image from mayan.celery import app from .events import event_ocr_document_version_finish from .literals import DO_OCR_RET...
# Copyright (c) 2020 NVIDIA CORPORATION. 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...
valores = [] maior = menor = 0 for c in range (0, 5): valores.append(int(input(f'Digite um valor para a posição {c}: '))) if c == 0: maior = menor = valores[c] else: if valores[c] > maior: maior = valores[c] if valores[c] < menor: menor = valores[c] print(f'Os...
# # 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...
# !/usr/bin/env python3 # -*- coding:utf-8 -*- # # Author: Flyaway - flyaway1217@gmail.com # Blog: zhouyichu.com # # Python release: 3.4.5 # # Date: 2016-11-13 10:33:58 # Last modified: 2016-11-13 13:50:02 """ Decision Tree """ import collections import queue import random import math class ID3Node: """Tree node...
from typing import List import matplotlib.pyplot as plt import numpy as np from evt import utils from evt._compiled_expressions.compiled_expressions import gevmle_fisher_information from evt.estimators.estimator_abc import Estimator, Estimate from evt.methods.block_maxima import BlockMaxima from scipy.stats import gen...
"""Account access and data handling for beehive endpoint.""" import binascii import os import shutil import requests try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin from .robot import Robot class Account: """ Class with data and methods for interacting with a ...
from radical.cm.planner import HeftPlanner import pandas as pd import sys from time import time def df_to_lists(cmp, size): tmp_workflows = list() tmp_numoper = list() for i in range(size): point = cmp.loc[i] workflow = {'description': None} workflow['id'] = int(point['id']) ...
print ("1")
import os import pickle import torch META_FILE = 'meta.pt' class CheckpointManager: def __init__(self, path): self.path = path def __fullpath(self, name): return os.path.join(self.path, name) def __ensure_folder(self): if not os.path.exists(self.path): os.makedirs(se...
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose Pty Ltd" file="DiscUsage.py"> # Copyright (c) 2003-2019 Aspose Pty Ltd # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of t...
from unittest import TestLoader, TextTestRunner, TestSuite from . import test_frameprocessing from . import test_movementdetection from . import test_videoinput modules = [test_frameprocessing, test_movementdetection, test_videoinput] def test(verbosity=1): suite =TestSuite() for module in modules: ...
# do not import all apis into this module because that uses a lot of memory and stack frames # if you need the ability to import all apis from one package, import them with # from fds.sdk.ExchangeDataFeedSnapshotAPISymbolList.apis import SnapshotApi
# # 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...
#bubble sort algorithm def bubble_sort(lst): for j in range(len(lst)-1): for i in range(j): print(lst) if lst[i]>lst[i+1]: lst[i],lst[i+1]=lst[i+1],lst[i] print() lst=[4,3,2,5,6,7] # num=int(input("how many number you want to enter")) # for i in range(num): #...
# -*- coding: utf-8 -*- # Copyright 2022 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...
# -*- encoding: utf-8 -*- """ Created by Ênio Viana at 15/05/2021 """ from py_dss_interface.models.Example.ExampleBase import ExampleBase dss = ExampleBase("13").dss # Integer methods print(45 * '=' + ' Integer Methods' + 45 * '=') print(f'dss.dssprogress_pct_progress(): {dss.dssprogress_pct_progress(12.5)}') print(...
#coding: utf-8 """ REVERSE A STRING: Enter a string and the program will reverse the string and print it. """ if __name__ == '__main__': # Prompt to the user for the string string = raw_input("Please, ingress a string to invert: ") # Reverse the string using slice syntax [begin:end:step] reversed_str...
# BSD 3-Clause License # # Copyright (c) 2021, 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...
""" Defines the LogMapper and InvalidDataRangeException classes. """ # Major library imports from numpy import array, isnan, log, log10, exp, zeros, sometrue,\ floor, ceil, ndarray # Enthought library imports from traits.api import Bool, Float #Local relative imports from .base_1d_mapper import Base1DMa...
print("Hello World :From Python")
"""Module containing a class to run a (Standford Research) SR 830 Lock-In Amplifier in a pyqt5 application Classes: SR830_Updater: a class for interfacing with a SR 830 Lock-In Amplifier inherits from AbstractLoopThread there, the looping behaviour of this thread is defined ...
from itertools import cycle import numpy as np import torch import torch.nn as nn from torch.nn import functional as F import models from util import to_var, time_desc_decorator import os from tqdm import tqdm from math import isnan import re import math import pickle import gensim from sklearn.metrics im...
import unittest import tempfile import os import shutil import requests_mock from pixget.pixget import PixGet class TestPixGet(unittest.TestCase): def setUp(self): """ some test data, a temp dir and the pixget object """ self.good_ct = 'images/jpg' self.bad_ct = 'text/html' self...
import pygame , sys pygame.init() # Set window size and create window: size = 200, 200 screen = pygame.display.set_mode(size) # Define colours: black = [0, 0, 0] red = [200, 0, 0] green = [0, 200, 0] # Main loop while True: # Check for window close: for event in pygame.event.get(): if...
salario = float(input("\033[4;36mSalario do funcionario: \033[m")) novo_salario = salario + (salario*15/100) print("\033[4;36mSalario normal\033[m \033[4;32mR$: {0:.2f} reais\033[m\n\033[4;36mSalario com\033[m \033[4;30m15%\033[m \033[4;36mde aumento\033[m \033[4;32mR$: {1:.2f} reais\033[m".format(salario, novo_salar...
import torch def load_checkpoint(checkpoint_path: str, device: str): """Load checkpoint from file. Args: checkpoint_path (str): Path to checkpoint file device (str): Device to load checkpoint on """ if "cpu" in device: checkpoint = torch.load(checkpoint_path, map_location=torch...
""" MIT License Copyright (c) 2022 Alpha Zero 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, publish, di...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-10-31 02:43 from __future__ import unicode_literals import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone from django.utils.timezone import utc import django_pr...
import asyncio from dataclasses import dataclass from exhibition.base import * @dataclass class Message: action: ActionEnum name: str = None process: asyncio.subprocess.Process = None stream: StreamEnum = None readline: str = None export: 'ExportNode' = None airport: 'AirportNode' = None ...
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from profiles_api import serializers class HelloApiView(APIView): """Test API View""" serializer_class = serializers.HelloSerializer def get(self, request, format=None): """Retu...
# coding=utf-8 from . import test_usage
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import warnings import numpy as np from scipy import sparse from inspect import signature ############################################################################## def clone(esti...
# Copyright (c) 2020, NVIDIA CORPORATION. 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 a...
while True: a = 1 break print(a) # pass
from utils import State, Exit, StateUpdate, Challenge class exitableRange: def __init__(self, start, is_set): self.start = start class Erc20PlasmaContract: def __init__(self, eth, address, erc20_contract, state_update_chain, DISPUTE_PERIOD): # Settings self.eth = eth self.addre...
from flask import Flask def create_app(): app = Flask(__name__) app.config.from_pyfile('settings.py') from . import database database.db.init_app(app) db = database.db from .web.routes import web_routes app.register_blueprint(web_routes) @app.cli.command('db_drop') def db_drop()...
from telegram.ext import BaseFilter from work_materials.globals import admin_ids, moscow_tz, dispatcher import datetime class FilterIsAdmin(BaseFilter): def filter(self, message): return message.from_user.id in admin_ids filter_is_admin = FilterIsAdmin() class FilterDeleteYourself(BaseFilter): def ...
#https://github.com/zisianw/FaceBoxes.PyTorch/issues/5 - added to work on python2 - there was a problem in tensors shape from __future__ import print_function, division import torch from itertools import product as product import numpy as np from math import ceil class PriorBox(object): def __init__(self, cfg, ima...
# Copyright 2021 Neal Lathia # # 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 agre...
from regression_tests import * class Test(Test): settings = TestSettings( tool='fileinfo', input='wappwd' ) def test_correctly_analyzes_input_file(self): assert self.fileinfo.succeeded self.assertEqual(self.fileinfo.output['File format'], 'ELF') self.assertEqual(se...
# dataset_settings dataset_type = 'FabricData' train_pipeline = [ dict(type='LoadImageFromFile', key='lq'), dict(type='LoadImageFromFile', key='gt'), # dict(type='CropBoundingBoxArea', keys=['lq', 'gt']), dict(type='RandomFlip', keys=['lq', 'gt'], flip_prob=0.5, direction='horizontal'), dict(type='...
from django.conf import settings from django.db import models from django.utils import timezone # Create your models here. class Post(models.Model): title = models.CharField(max_length=100) author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) content = models.TextField() tim...
from django.core.exceptions import SuspiciousOperation class InvalidSessionKey(SuspiciousOperation): """Invalid characters in session key""" pass class SuspiciousSession(SuspiciousOperation): """The session may be tampered with""" pass
import unittest from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient class ConditionalRequirementsIdTest(unittest.TestCase): def test_basic(self): # https://github.com/conan-io/conan/issues/3792 # Default might be improved 2.0 in https://github.com/conan-io/conan/issues/3762 ...
from setuptools import setup import cryptory setup(name='cryptory', version='0.1.1', url='https://github.com/dashee87/cryptory', author='David Sheehan', author_email='davidfsheehan87@gmail.com', description='Retrieve historical cryptocurrency and other related data', ke...
# Copyright The PyTorch Lightning team. # # 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 i...
from cpu_element import CPU_element from elements import Adder from tests.tools import set_signals signals = ["a", "b"] result = "result" def test_write_outputs(): source = CPU_element([], signals) adder = Adder(signals, [result]) assert isinstance(adder, CPU_element) adder.connect([source]) a =...
import argparse import codecs import hashlib import os import time from string import Template import logging import pem from twisted.enterprise import adbapi from twisted.internet import task, reactor from twisted.internet.protocol import ServerFactory try: from OpenSSL.SSL import TLSv1_2_METHOD from twiste...
# pylint: disable=missing-docstring,invalid-name import datetime from unittest import mock from django.apps import apps from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser, Group from django.core.management import call_command from django...
from view_models.shared.viewmodel import ViewModelBase from fastapi import Request class LoginViewModel(ViewModelBase): def __init__(self, request: Request): super().__init__(request) self.email = "" self.password = "" async def load(self): form = await self.request.form() ...
"""create packages table Revision ID: f1b9ee79cb54 Revises: Create Date: 2020-05-28 15:59:13.444152 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "f1b9ee79cb54" down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands a...
# This file is part of the faebryk project # SPDX-License-Identifier: MIT import logging logger = logging.getLogger("library") from faebryk.library.kicad import has_kicad_footprint from faebryk.library.core import Footprint from faebryk.library.traits import * from enum import Enum class DIP(Footprint): def __...
# -*- coding: utf-8 -*- """ plexOdus """ import threading from resources.lib.modules import control,log_utils,trakt control.execute('RunPlugin(plugin://%s)' % control.get_plugin_url({'action': 'service'})) traktCredentials = trakt.getTraktCredentialsInfo() try: AddonVersion = control.addon('plugin.video.plexo...
# # Copyright (C) 2020 IBM. All Rights Reserved. # # See LICENSE.txt file in the root directory # of this source tree for licensing information. # from typing import Dict, List, Union, Optional from pydantic import BaseModel # pylint: disable=too-few-public-methods,dangerous-default-value,too-many-arguments class P...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/env python3 # In this test, the receiver is extremely slow. Sender should detect that and # wait for the receiver to finish. Read timeout for sender is small to trigger # tcp unacked bytes checking code. from common_utils import * # 1 time setup create_test_directory("/tmp") generate_random_files(140 * 10...
#!/usr/bin/env python from setuptools import setup, find_packages import setuptools.command.develop import setuptools.command.build_py import os import subprocess from os.path import exists version = '0.0.1' # Adapted from https://github.com/pytorch/pytorch cwd = os.path.dirname(os.path.abspath(__file__)) if os.gete...
"""Guild table""" from mysqldb_wrapper import Base, Id class Guild(Base): """Guild class""" __tablename__ = "guild" id = Id() guild_id = bytes() guild_id_snowflake = str() verified_role_id = str() admin_role_id = str() last_notification_date = str() language = str() created_...
from time import time # Timer def timer(func): """Function decorator to get the execution time Parameters ---------- func : function input function Returns ------- function wrapped function """ def f(*args, **kwargs): before = time() rv = func(*ar...
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram 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 S...
import itertools import json from dataclasses import dataclass import numpy as np import pandas as pd import seqeval.metrics as seqeval_metrics import torch from scipy.stats import pearsonr from scipy.stats import spearmanr from sklearn.metrics import f1_score from sklearn.metrics import matthews_corrcoef from typin...
from __future__ import print_function import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils from h2o.estimators.glm import H2OGeneralizedLinearEstimator def glm_solvers(): predictors = ["displacement","power","weight","acceleration","year"] for solver in ["AUTO", "IRLSM", "L_BFGS", ...
''' Simple things should be simple Ported from https://www.pygame.org/docs/tut/PygameIntro.html ''' import os import numpy as np from godot import bindings from godot.core.types import Vector2 from godot.globals import gdclass from godot.nativescript import register_class with open(os.path.join(os.path.dirname(__fi...
import os import re from conans.model import Generator from conans.paths import BUILD_INFO_VISUAL_STUDIO class VisualStudioGenerator(Generator): template = '''<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ImportGroup Label="Pro...
from celery import Celery app = Celery('tasks', backend='rpc://', broker='pyamqp://guest@rabbitmq//') @app.task def add(x, y): return x + y
from ModelHelper.evolution import EvolutionManager from ModelHelper.chromosome_helper import * import ModelHelper.globals as g # from ModelHelper.task_queue import TaskQueueManager
import re from django.shortcuts import get_object_or_404 from rest_framework import serializers from authors.apps.authentication.models import User def validate_email(email): check_email = User.objects.filter(email=email) email_regex = r'^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA...
from plotly.graph_objs.layout import Template from templategen.utils import initialize_template from .utils.colors import colors import colorcet as cc # dict of template builder functions # This way we can loop over definitions in __init__.py builders = {} def ggplot2(): # Define colors # ------------- #...
# coding=utf-8 # Copyright 2021 The Deeplab2 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://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
from dagster import DagsterInvariantViolationError, check from dagster_pandas.constraints import ( CategoricalColumnConstraint, ColumnDTypeFnConstraint, ColumnDTypeInSetConstraint, Constraint, ConstraintViolationException, DataFrameConstraint, InRangeColumnConstraint, NonNullableColumnCo...
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) # learning...
import re from nonebot import on_command, export, logger from nonebot.typing import T_State from nonebot.adapters.cqhttp.bot import Bot from nonebot.adapters.cqhttp.event import MessageEvent, GroupMessageEvent, PrivateMessageEvent from nonebot.adapters.cqhttp.permission import GROUP, PRIVATE_FRIEND from nonebot.adapter...
import uuid from datetime import datetime from flask import Response, jsonify, request from api import app from api.auth import verify_decorator from api.schema import Box, Post, User @app.route("/posts", methods=["POST"]) @verify_decorator def posts(uid: str) -> Response: """Paginate the posts""" limit = 2...
"""mutation routes""" # Add imports here from .tf_routes import * # Handle versioneer from ._version import get_versions versions = get_versions() __version__ = versions['version'] __git_revision__ = versions['full-revisionid'] del get_versions, versions
from numpy import inf, nan from sklearn.preprocessing import QuantileTransformer as Op from lale.docstrings import set_docstrings from lale.operators import make_operator class _QuantileTransformerImpl: def __init__(self, **hyperparams): self._hyperparams = hyperparams self._wrapped_model = Op(**...