text
stringlengths
2
999k
# -*- coding: utf-8 -*- """Script to process QRC files (convert .qrc to _rc.py and .rcc). The script will attempt to compile the qrc file using the following tools: - pyrcc4 for PyQt4 and PyQtGraph (Python) - pyrcc5 for PyQt5 and QtPy (Python) - pyside-rcc for PySide (Python) - pyside2-rcc for PySide2...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django.contrib.sites.shortcuts import get_current_site from .models import RegistrationProfile from .users import UsernameField class RegistrationAdmin(admin.ModelAdmin): actions = ['activate_users', 'resend_activation_...
from torch import nn from cvpods.layers import ShapeSpec from cvpods.modeling.backbone import Backbone from cvpods.modeling.backbone import build_resnet_backbone from cvpods.utils import comm from barlow_twins import BarlowTwins def build_backbone(cfg, input_shape=None): """ Build a backbone from `cfg.MODE...
from django.http.response import JsonResponse from django.shortcuts import render from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from chatterbot.trainers import ListTrainer import os import openai openai.api_key = "OPENAI API KEY" completion = openai.Completion() start_chat_log...
"""Tests of the DiscreteCategorical class.""" import pytest from gemd.entity.value.discrete_categorical import DiscreteCategorical def test_probabilities_setter(): """Test that the probabilities can be set.""" test_probabilities = {"solid": 0.9, "liquid": 0.1} test_categorical = DiscreteCategorical() ...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from abc import ABC, abstractmethod from collections import deque from typing import Iterable class AbsMovingAverage(ABC): def __init__(self): pass @abstractmethod def record(self, data: object): """Record the historical data for forecasting. Args: data (object): The ...
"""Pushbullet platform for sensor component.""" import logging import threading from pushbullet import InvalidKeyError, Listener, PushBullet import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_API_KEY, CONF_MONITORED_CONDITIONS import homeassistant...
from xml.etree.ElementTree import Element, SubElement, Comment, tostring from xml.etree import ElementTree from xml.dom import minidom import urllib.request import argparse import time import sys import json def prettify(elem): rough_string = ElementTree.tostring(elem) reparsed = minidom.parseString(rough_str...
## @file # Target Tool Parser # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import print_function import edk2basetools.Common.LongFilePathOs as os import sys import traceback from optparse import OptionParser import edk2...
# -*- coding: utf-8 -*- import random import scipy.io from PIL import Image, ImageOps, ImageFilter, ImageFile import numpy as np import copy import os import torch import torch.utils.data as data import torchvision.transforms as ttransforms from datasets.cityscapes_Dataset import City_Dataset, City_DataLoader ImageFi...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
from app import BaseApp from gui.screens import Menu, InputScreen, Prompt, TransactionScreen from .screens import WalletScreen, ConfirmWalletScreen import platform import os from binascii import hexlify, unhexlify, a2b_base64, b2a_base64 from bitcoin.psbt import PSBT, DerivationPath from bitcoin.networks import NETWOR...
#!/usr/bin/python3 import scapy.all as scapy import time import sys import argparse sendpackets=0 def parser(): parser = argparse.ArgumentParser() parser.add_argument("-i","--interface",dest="interface",help="Interface to sniff data from, like wlan0 or eth0") parser.add_argument("-t","--target",dest="t...
""" Core recipes for the xTB code """ from __future__ import annotations from dataclasses import dataclass, field from typing import Any, Dict from ase.atoms import Atoms from jobflow import Maker, job from monty.dev import requires try: from xtb.ase.calculator import XTB except (ModuleNotFoundError, ImportError...
from ..field import StringField, FieldError class Relation(StringField): def __init__(self, model, cascade=False, *args, **kwargs): self._model = model self._cascade = cascade super(Relation, self).__init__(*args, **kwargs) def save(self, model, name): raise NotImplementedE...
"""Functions operating on the PEtab parameter table""" import numbers import pandas as pd import numpy as np from collections import OrderedDict from typing import Iterable, Set, List, Tuple, Dict, Union import libsbml from . import lint, core, measurements, conditions, observables from .C import * # noqa: F403 d...
# Generated by Django 2.1.5 on 2019-03-04 15:34 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("empresa", "0001_initial"), ("departamento", "0001_initial"), ] operations = [ migrations.AddField( ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Wrappers for E. Maglis's M-CALIC implementation """ __author__ = "Miguel Hernández Cabronero <miguel.hernandez@uab.cat>" __date__ = "30/04/2020" import os import sortedcontainers import tempfile import numpy as np import glob import copy import subprocess import shutil...
class Memcached(object): def __init__(self, servers, username=None, password=None, timeout=0): import pylibmc self.conn = pylibmc.Client(servers, binary=True, username=username, password=password) self.timeout = timeout def __getitem__(self, key): key = key.encode('utf-8', err...
import shutil import pytest from ape.contracts import ContractContainer from .utils import skip_projects, skip_projects_except skip_non_compilable_projects = skip_projects( [ "empty-config", "no-config", "script", "only-dependencies", "unregistered-contracts", "te...
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
is_nice = False state = "nice" if is_nice else "not nice" print(state)
from typing import List, Any, Mapping, Tuple from torch import Tensor from cvutils import transform as tf from cvutils import imread from mlutils import mod, Log from cfg import Opts from ssl_lab.utils.data_split import split_by_k_fold, split_by_proportion from ssl_lab.utils.preprocessing import load_npy, load_pickle ...
import warnings from abc import ABC, abstractmethod import numpy as np import tensorflow as tf from deprecated import deprecated warnings.warn(('`tf_keras_vis.utils.regularizers` module is deprecated. ' 'Please use `tf_keras_vis.activation_maximization.regularizers` instead.'), Deprecatio...
import numpy as np from . EquationException import EquationException from . UnknownQuantity import UnknownQuantity from .. import AdvectionInterpolation from .. TransportSettings import TransportSettings # BOUNDARY CONDITIONS (WHEN f_re IS DISABLED) BC_F_0 = 1 BC_PHI_CONST = 2 BC_DPHI_CONST = 3 # Interpolat...
import torch import torch.nn as nn import torch.nn.init as init class Net(nn.Module): def __init__(self, upscale_factor): super(Net, self).__init__() self.relu = nn.ReLU() self.conv1 = nn.Conv2d(1, 64, (5, 5), (1, 1), (2, 2)) self.conv2 = nn.Conv2d(64, 64, (3, 3), (1, 1), (1, 1)) ...
import json import jieba if __name__ == "__main__": with open("data/char.txt", "r", encoding="gbk") as f: lines = f.readlines() charDict = {} termDict = {} cnt = 0 for line in lines: tmp = line.strip().split() termDict[tmp[0]] = tmp[1:] for char in tmp[1:...
class Node: def __init__(self, value): self.value = value self.left = None self.right = None class BinaryTree: def __init__(self): self.root = None
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * """ test_txttk ---------------------------------- Tests for `txttk` module. """ import unittest class TestTxttk(unittest.TestCase): ...
# -*- coding: UTF-8 -*- """ Localized instance transfer. Reference: V. Vercruyssen, W. Meert, J. Davis. Transfer Learning for Anomaly Detection through Localized and Unsupervised Instance Selection. In AAAI Conference on Artificial Intelligence, New York, 2020. :author: Vincent Vercruyssen (2019) :licens...
from __future__ import unicode_literals from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.test import TestCase from rest_framework import ( exceptions, metadata, serializers, status, versioning, views ) from rest_framework.renderers import BrowsableAP...
"""Separation plot for discrete outcome models.""" import warnings import numpy as np import xarray as xr from ..data import InferenceData from ..rcparams import rcParams from .plot_utils import get_plotting_function def plot_separation( idata=None, y=None, y_hat=None, y_hat_line=False, expected...
#! usr/bin/env python import math # Custom imports import GlobalConstants as GC import Engine, Utility def flicker_image(image, color): color = tuple(Utility.clamp(c, 0, 255) for c in color) image = Engine.copy_surface(image) Engine.fill(image, color, None, Engine.BLEND_RGB_ADD) return im...
# Copyright 2016-2019 CERN for the benefit of the ATLAS collaboration. # # 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...
# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com> # Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P. # Copyright (c) 2016, Rackspace Australia # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING...
TOKEN = "Your app token" EMAIL = "Your email" PASSWORD = "Your password"
############################################################################# # # # Module of BFA that reads and manages bf-xml 1.1 # # ############################################################################# """ This module does process parsing for bf events in the event log. Dependencies: monitorin...
""" Base process for file IO Lukas Adamowicz Copyright (c) 2021. Pfizer Inc. All rights reserved. """ from pathlib import Path import functools from warnings import warn from skdh.io.utility import FileSizeError def check_input_file( extension, check_size=True, ext_message="File extension [{}] does not ...
import logging import sys import traceback from datetime import datetime from http.client import HTTPException from socket import timeout from colorama import Fore, Style from uiautomator2.exceptions import UiObjectNotFoundError from AllInOneInstagramBot.core.device_facade import DeviceFacade from AllInOneInstagramBo...
import networkx.algorithms.bipartite.tests.test_covering import pytest from graphscope.nx.utils.compat import import_as_graphscope_nx import_as_graphscope_nx(networkx.algorithms.bipartite.tests.test_covering, decorators=pytest.mark.usefixtures("graphscope_session"))
# -*- coding: utf-8 -*- from .context import tatsumaki from motor import MotorClient from tatsumaki.base import Document from tatsumaki.connection import connect, Connection # Importing testing libraries for async tests from tornado.testing import gen_test from tornado.testing import AsyncTestCase class DocumentTest...
from django import forms from django.contrib.auth.forms import UserCreationForm, UserChangeForm, AuthenticationForm from django.utils.translation import ugettext_lazy as _ from .models import CustomUser class CustomUserCreationForm(UserCreationForm): class Meta(UserCreationForm.Meta): model = CustomUser...
""" https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt """ # FOR METHODS/ FUNCTIONS """ shortDescription Parameters ---------- param1 : type shortDescription Returns ------- type shortDescription Raises ------ ExceptionType whenExceptionIsRaised """ # FOR CLASSES """ Array with ...
# Generated by Django 3.1.5 on 2021-01-22 15:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0008_auto_20210122_1959'), ] operations = [ migrations.AddField( model_name='userdetail', name='pic', ...
import numpy as np import pandas as pd class vehicle_ice: def __init__(self, name, mpg_hwy, mpg_city, average_override=None): self.mpg_hwy = mpg_hwy self.mpg_city = mpg_city self.name = name if average_override != None: self.mpg_hwy = average_override self.m...
from __future__ import absolute_import, division, print_function import os import numpy as np import glob import ast import json import time import matplotlib.pyplot as plt import matplotlib from PIL import Image import cv2 from ..datasets import GOT10k from ..utils.metrics import rect_iou from ..utils.viz import sho...
""" This file provides several support functions that are available after import. The functions are: Logpdet: Calculates the log pseudodeterminant of a matrix Backtracking_linesearch: Performs backtracking line search for homogeneous kernel inference problems Backtracking_linesearch_inhomogeneous: P...
#1.soru print("katma deger ciro hesaplama") tsm=int(input("toplam satis miktarinizi giriniz:")) hm=int(input("hammadde maliyetinizi giriniz:")) bog=int(input("bakim onarim maliyetinizi giriniz:")) sg=int(input("sevkiyat giderlerinizi giriniz:")) sahg=int(input("satin alinan hizmet giderlerinizi giriniz:")) def k...
# -*- coding: utf-8 -*- from cnlp.common.registrable import Registrable class Model(Registrable): def __init__(self, vocab, regularizer=None, serialization_dir=None): super().__init__() self.vocab = vocab self._regularizer = regularizer self.serialization_dir = serialization_dir ...
"""Find recomendations based on user's latest activities.""" from Bagpipe.importer import pre_analyzed_importer from itertools import chain from datetime import datetime, timedelta from operator import itemgetter from Rexy.Logging import logger from heapq import nlargest class LatestActivities: def __init__(self,...
#!/usr/bin/env python ''' Tests for bamutils minorallele ''' import unittest class MinorAlleleTest(unittest.TestCase): def testMinor1(self): 'MISSING TEST/EXPERIMENTAL' pass if __name__ == '__main__': unittest.main()
import os import sys ABSPATH = os.path.abspath(os.path.realpath(os.path.dirname(__file__)) + "/..") sys.path.append(ABSPATH) import asposecellscloud from asposecellscloud.rest import ApiException from asposecellscloud.apis.cells_api import CellsApi import AuthUtil from asposecellscloud.models import CalculationOptions...
from magma import * from mantle import Mux from .register import _RegisterName, Register, FFs __all__ = ['DefinePISO', 'PISO'] @cache_definition def DefinePISO(n, init=0, has_ce=False, has_reset=False): """ Generate Parallel-In, Serial-Out shift register. SI : In(Bit), PI : Out(Bits(n)), LOAD : In(Bit), ...
import base64 import flask import httpx import requests import backoff from flask_sqlalchemy_session import current_session from jose import jwt as jose_jwt from authutils.errors import JWTError from authutils.token.core import get_iss, get_keys_url, get_kid, validate_jwt from cryptography.hazmat.backends import defau...
# 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 ...
# 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 . import Transformer class CamemBERT(Transformer): """ DEPRECATED: Please use models.Transformer instead. """ pass
# Author: Graham Krizek <graham@krizek.io> import boto3 import os import json import sys from traceback import format_exception def ExecuteLambda(Function, Traceback): if 'LEH_AWS_KEY' in os.environ and 'LEH_AWS_SECRET' not in os.environ: raise Exception("'LEH_AWS_KEY' defined but not 'LEH_AWS_SECRET'") ...
# -*- coding: utf-8 -*- import furl from rest_framework import status as http_status import json from future.moves.urllib.parse import quote from lxml import etree import requests from framework.auth import authenticate, external_first_login_authenticate from framework.auth.core import get_user, generate_verificatio...
import base64 import binascii import io import logging import os import random import re import secrets import shutil import unicodedata import urllib from datetime import timedelta from mimetypes import guess_extension, guess_type from typing import Any, Callable, Optional, Tuple import boto3 import botocore from bot...
# -*- coding: utf-8 -*- """Public forms.""" from flask_wtf import Form from wtforms import PasswordField, StringField from wtforms.validators import DataRequired from deja_vous.user.models import User class LoginForm(Form): """Login form.""" username = StringField('Username', validators=[DataRequired()]) ...
from gym.envs.registration import register register( id='futures-v0', entry_point='gym_futures.envs:FuturesEnv', )
from typing import Dict, MutableMapping, Mapping from allennlp.data.fields.field import DataArray, Field from allennlp.data.vocabulary import Vocabulary class Instance(Mapping[str, Field]): """ An ``Instance`` is a collection of :class:`~allennlp.data.fields.field.Field` objects, specifying the inputs an...
# coding: utf-8 """ Speech Services API v2.0 Speech Services API v2.0. # noqa: E501 OpenAPI spec version: v2.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.endpoin...
# -*- coding: utf-8 -*- author = 'md5_salt' # 可选 timeout = 30 # 建议 vtype = 'all' #value type: all/int/float/str/url/json/special/ special|json def exploit(request, response, method, key, is_array=False): info = "this is a test" return {'result': 'safe', 'info': info, 'hash': None} # result为('safe', 'vul', 'unknown'...
# 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...
__author__ = 'root' import os from pagrant.exceptions import PagrantError from pagrant.provisioners import BaseProvisioner class PuppetProvisioner(BaseProvisioner): def __init__(self, machine, logger, provision_info, provider_info): super(PuppetProvisioner, self).__init__(machine, logger, provision_info,...
def event_handler(source,evt): if evt == lv.EVENT.VALUE_CHANGED: if source.is_checked(): print("State: checked") else: print("State: unchecked") # create a simple bar bar1 = lv.bar(lv.scr_act(),None) bar1.set_size(200,20) bar1.align(None,lv.ALIGN.CENTER,0,0) bar...
"""backend_test URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
#!/usr/bin/env python3 import numpy as np #For Arrays from math import sqrt lfail = 0 failtol = 1.0 fileext='bigtok' filename='diagno_bench.'+fileext data = np.loadtxt(filename) print('===== B-Field ======') for i in range(0, 75): cal = sqrt(data[i][6]*data[i][6] + data[i][7]*data[i][7] + data[...
"""Tests for Table Schema integration.""" from collections import OrderedDict import json import numpy as np import pytest from pandas.core.dtypes.dtypes import ( CategoricalDtype, DatetimeTZDtype, PeriodDtype, ) import pandas as pd from pandas import DataFrame import pandas._testing as tm from pandas.i...
# -*- coding: UTF-8 -*- # @Author : Chenyang Wang # @Email : THUwangcy@gmail.com import os import logging import torch import torch.nn as nn import numpy as np import torch.nn.functional as F from datetime import datetime from models.BaseModel import SequentialModel class TiMiRecLight(SequentialModel): runne...
from turtle import Turtle, Screen tim = Turtle() screen = Screen() def move_forwards(): tim.forward(10) screen.listen() screen.onkey(key="space", fun=move_forwards) screen.exitonclick()
""" # cfg-bnf Entender e reconhecer operações básicas de gramática generativa na notação BNF * Reconhecer linguagens regulares na forma de gramática livre de contexto. * Identificar quando uma gramática livre de contexto corresponde a uma linguagem regular. A regra para "seq" e "block" na gramática do ruspy está inc...
import json import datetime # DonationType, PaymentMode, Organisation Models payment_modes = [] organisations = [] donation_types = [] forme_du_dons = [] nature_du_dons = [] don_type_matrix = [(1, "Poujas"), (1, "Retraites"), (1, "CAVIMAC"), (1, "Travaux"), (1, "Dons généraux"), (2, "Participation aux enseignements"...
from abc import ABCMeta, abstractmethod import logging from typing import TYPE_CHECKING, Any, List import prefect from prefect.engine.result_handlers import ResultHandler from prefect.environments.storage import _healthcheck from prefect.utilities import logging as prefect_logging if TYPE_CHECKING: import prefect...
from tkinter import * from tkinter import messagebox from numpy.core.arrayprint import BoolFormat from transformations import escalate, rotX, rotY, rotZ, translate from pipeline import convertMesh2SRT, perspProj, sru2src from pipeline import isMeshVisible from savePoly import salvaPoligono import numpy as np from util...
# coding: utf-8 """ Line Items No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hu...
from flow.envs.base_env import SumoEnvironment from flow.core import rewards from flow.core import multi_agent_rewards from gym.spaces.box import Box from gym.spaces.tuple_space import Tuple import numpy as np class SimpleAccelerationEnvironment(SumoEnvironment): """ Fully functional environment for single l...
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class CountryTestCase(Integratio...
import logging from dotenv import find_dotenv, dotenv_values def load_config(): """ Load the variables from the .env file Returns: .env variables(dict) """ logger = logging.getLogger(__name__) dot_env_path = find_dotenv(raise_error_if_not_found=True) logger.info(f"Found config in {do...
import torch from torch.utils.data import Dataset import pandas as pd import os import numpy as np from PIL import ImageFile, Image, ImageDraw from torchvision import transforms from torchvision.transforms import functional as F import random class TrafficLightDataset(Dataset): def __init__(self, csv_file, im...
from argparse import ArgumentParser import re parser = ArgumentParser() parser.add_argument("-i", "--input", dest="filename", help="read footnotes input", metavar="FILE", required=True) parser.add_argument("-t", "--try", action="store_true", dest="verbose", default=False, ...
#!C:\Users\kosta\PycharmProjects\algorithms\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?...
from .tensor import * from .octree import * from .two_file_base import * from .write import * from .general import * __displayname__ = 'UBC Mesh Tools'
# Copyright 2018 Shengyang Sun # Copyright 2016 James Hensman, alexggmatthews # # 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 require...
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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 requ...
from models.model import Model, ModelState, AnalyticSegment from models.triangle_model import TriangleModel, TriangleModelState from models.drop_model import DropModel, DropModelState from models.peak_model import PeakModel from models.jump_model import JumpModel, JumpModelState from models.custom_model import CustomMo...
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.11 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ...
from sotabencheval.core import BaseEvaluator from sotabencheval.utils import calculate_batch_hash, change_root_if_server, is_server from sotabencheval.machine_translation.languages import Language from sotabencheval.machine_translation.metrics import TranslationMetrics from sotabencheval.utils import get_max_memory_all...
# Copyright (c) 2019 Eric Steinberger import numpy as np import torch from PokerRL.rl.buffers._circular_base import CircularBufferBase class CircularBufferRNN(CircularBufferBase): """ self.games stores references to Game subclass objects. One Game instance might be referenced multiple times, depending ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from scout.parse.omim import (parse_omim_line, parse_genemap2, parse_mim_titles, parse_mim2gene, get_mim_phenotypes) GENEMAP_LINES = [ "# Copyright (c) 1966-2016 Johns Hopkins University. Use of this"\ " file adheres to the terms specified at https://omim.org/help/agreement.\n", ...
""" Datos De entrada Temperatura-->t-->Float Datos de Salida Deporte-->d-->str """ #entrada t=float(input("Digite la temperatura: ")) #Caja Negra deporte="" if(t>85): Deporte= "Natacion: " elif(t>70 and t<=85): Deporte= "Tenis: " elif(t>32 and t<=70): Deporte= "Golf: " elif(t>12 and t<=32): Deporte= "Es...
from app.PointCloudReader import PointCloudReader import numpy as np from sklearn.cluster import DBSCAN, SpectralClustering from multiprocessing.dummy import Pool import scipy from itertools import repeat from math import sqrt from sklearn.cluster import AgglomerativeClustering def calculate_svd(cluster_points): ...
#!/usr/bin/env python # 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 # # Authors: # - Paul Nilsson, paul.nilsson@cern.ch, 2018 # Note: The Pilot 2...
"""Parsing functions for Binvox files. https://www.patrickmin.com/binvox/binvox.html Exporting meshes as binvox files requires binvox CL tool to be on your path. """ import os import subprocess import numpy as np import collections from distutils.spawn import find_executable from .. import util from ..base import T...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from torch.nn import functional as F from maskrcnn_benchmark.layers import smooth_l1_loss from maskrcnn_benchmark.modeling.box_coder import BoxCoder from maskrcnn_benchmark.modeling.matcher import Matcher from maskrcnn_benchmark.struc...
import numpy as np from .SudokuSquare import SudokuSquare from .SudokuLine import SudokuLine def build_squares(matrix, symbols, dimension=3): """Split the matrix into a (dim x dim) list of SudokuSquare""" rows = [] for row in range(dimension): cols = [] row_index = row * dimension row_slice = slice(row_index,...