text
stringlengths
3.07k
22.1k
import logging import uuid from datetime import datetime from decimal import Decimal from typing import List, Mapping, Optional, Sequence import grpc import petlib import sqlalchemy.orm from common.constants import ( ADMIN_UUID, CURRENCY_TO_BLOCKCHAIN, PAGINATION_LIMIT, Currency, ) from common.utils.da...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import absolute_import, unicode_literals import json from collections import OrderedDict ...
import numpy as np from collections import OrderedDict from scipy import integrate # List of constants G_cm3_gi_si2 = 6.672599e-8 G_kpc_km2_Msi_si2 = 4.301313e-6 G_Mpc_km2_Msi_si2 = 4.301313e-9 kpc_to_cm = 3.085678e21 kpc_to_km = 3.085678e16 Mpc_to_m = 3.085678e22 Mpc_to_cm = 3.085678e24 Mpc_to_km = 3.085678e19 s_to_...
#!/usr/bin/env python import time import argparse import os os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # from multiprocessing import cpu_count import math import numpy as np import tensorflow as tf # print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU'))) from data_feeder import DataFeed...
#!/usr/bin/python3 from aos.util.trapezoid_profile import TrapezoidProfile from frc971.control_loops.python import control_loop from frc971.control_loops.python import controls import numpy import sys from matplotlib import pylab import gflags import glog FLAGS = gflags.FLAGS try: gflags.DEFINE_bool('plot', False,...
#!/usr/bin/env python """ Compliance Checker """ from __future__ import unicode_literals from functools import wraps import pprint from netCDF4 import Dataset from owslib.swe.observation.sos100 import SensorObservationService_1_0_0 from owslib.swe.sensor.sml import SensorML from owslib.namespaces import Namespaces f...
# Copyright 2015 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
import logging import os from connaisseur.image import Image from connaisseur.validate import get_trusted_digest from connaisseur.admission_review import get_admission_review from connaisseur.kube_api import request_kube_api from connaisseur.exceptions import BaseConnaisseurException, UnknownVersionError from connaisse...
from discord.ext import commands from utils import checks from collections import Counter, defaultdict from inspect import cleandoc import re import discord import datetime import asyncio import asyncpg import argparse, shlex import logging import random def pin_check(m): return not m.pinned ## Converters class...
# 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 u...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals import unittest import datetime import warnings import jsonpickle from jsonpickle.compat import PY2, PY3, PY_MINOR from helper import SkippableTest try: import numpy as np import numpy.testing as npt from numpy.co...
# -*- coding: utf-8 -*- """Parser for Windows Firewall Log file.""" from __future__ import unicode_literals import pyparsing from dfdatetime import time_elements as dfdatetime_time_elements from plaso.containers import events from plaso.containers import time_events from plaso.lib import errors from plaso.lib impor...
#!/usr/bin/python -Wall # ================================================================ # Please see LICENSE.txt in the same directory as this file. # <NAME> # <EMAIL> # 2008-11-14 # ================================================================ # Type module for F2[x]: polynomials with coefficients in the finit...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import OrderedDict from fairseq import utils from fairseq.models import ( FairseqMultiModel, register_model, reg...
import collections import functools import io import unicodedata import discord from discord.ext import commands from PIL import Image from .utils import formats, human_time class AnyUser(commands.Converter): async def convert(self, ctx, arg): try: return await commands.MemberConverter().conv...
import socket from scrapy.utils.log import configure_logging from twisted.internet.threads import deferToThread from typing import Optional, Union, Type from unittest import mock import pytest import scrapy from scrapy import Request, Spider from scrapy.http import Response from scrapy.utils.test import get_crawler f...
from xml.dom.minidom import parse import re # import en_core_web_sm import stanza import requests from time import sleep nlp = stanza.Pipeline(lang='en', processors='tokenize,ner') def grobid(pdfname): #input PDFfilename output XMLfilename url = 'http://localhost:8070/api/processFulltextDocument' params=di...
import types import itertools import collections import warnings __all__ = [] class Error(Exception): """ Base class for data-pipe errors. """ def __init__(self, msg): Exception.__init__(self, msg) __all__ += ['Error'] class NoResultError(Error): """ Indicates a pipeline termi...
#!/usr/bin/env python3 -u # -*- coding: utf-8 -*- # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """ Do-nothing script for making a release This idea comes from here: - https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to -gradual-automation/ The script is adapted from: - ht...
""" S3 is an abstraction layer for working with s3 buckets. Uses helper functions to manage connection and exposes a read/write api. Built on Boto3.s3 commands. """ import boto3 from boto3.s3.transfer import S3Transfer from botocore.exceptions import ClientError from io import BytesIO, TextIOWrapper import logging...
import csv import json import tarfile import urllib import datetime import time import os #get data info import zipfile import cv2 from face_attr_prediction.utils.data_transfer import _build_facex_model from tools.vis import xyxy2xywh def get_data(time): data = '{"beginTime":"%s"}' % (time) data = data.en...
from zope.interface import Interface, Attribute class IContentProvider(Interface): """Object that provides the content used to build the database that is used to serve the actual oai data """ def set_logger(self, log): """Set the logger instance for this class """ def update(from_...
import pynbt from ... import Packet from ....types import ( NBT, Integer, Boolean, UnsignedByte, String, Byte, Long, VarInt, PrefixedArray, Difficulty, GameMode, Dimension, ) def nbt_to_snbt(tag): '''Convert a pyNBT tag to SNBT ("stringified NBT") format.''' scalars = { pynbt.TAG_Byte: 'b', ...
import PIL.Image from mswavelet import MSWavelet import numpy as np import tensorflow as tf import sklearn import sklearn.model_selection import os import pandas as pd import matplotlib.pyplot as plt from models.squeezenet_model import SqueezeNet from models.alexnet_model import AlexNet from models.transferlearning_eff...
from enum import IntEnum import weakref from sdl2._sdl2 import ffi, lib from error import check_int_err from keycode import KeyCode, KeyMod from scancode import ScanCode from enumtools import get_items from gamecontroller import ControllerAxis, ControllerButton _event_reference_map = weakref.WeakKeyDictionary() _ev...
""" general_training_flow.py """ from __future__ import print_function from __future__ import division import os import torch import numpy as np import matplotlib.pyplot as plt import time import json import models_factory import optimizer_factory import loss_factory import datasources_factory import copy impor...
import copy import json import jsondiff import os import unittest from collections import defaultdict from unittest.mock import patch import generic_config_updater.change_applier import generic_config_updater.gu_common SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) DATA_FILE = os.path.join(SCRIPT_DIR, "fil...
""" Shell commands like git, django-admin etc. """ import functools import os import shlex import shutil import subprocess import sys from functools import lru_cache from pathlib import Path from typing import Callable, Dict, Iterable, Iterator, List, Optional, Union from .exceptions import ShellCommandException from...
# -*- coding: utf-8 -*- """ Created on Mon Jul 30 05:41:28 2018 @author: Administrator """ import numpy as np import pandas as pd from math import log from datetime import datetime import time import random eps=10e-8 def fill_zeros(x): return '0'*(6-len(x))+x class Environment: def __init__(self): ...
# -*- coding: utf-8 -*- import json, os, jsmin, logging, atexit, requests, time from urllib.parse import urlparse, urljoin from django.conf import settings from django.urls import reverse from . import signals logger = logging.getLogger('atlassian_connect_django') ngrok_url_by_ports = {} def read_json_file(filepath)...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright © Spyder Project Contributors # # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) # ----------------------------------------------------------------------------- """ Co...
import random import math import os import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from utils import Transition class DQN(nn.Module): """ DDDQN model Dueling DQN Implementation 2 FC Layers to calculate Q(s, a): Value stream calculates V(s) ...
from PIL import Image, ImageEnhance, ImageOps import numpy as np import random # Non-random random random.seed(0) class BasicPolicy(object): def __init__(self, mirror_ratio = 0, flip_ratio = 0, color_change_ratio = 0, is_full_set_colors = False, add_noise_peak = 0.0, erase_ratio = -1.0): # Random color ch...
""" Modified the A2C method from https://github.com/raillab/a2c """ import argparse import numpy as np import gym import torch.nn.functional as F from nle import nethack import time from model import ActorCritic import torch import torch.optim as optim from torch.autograd import Variable device = torch.device("cuda" ...
# -*- coding: utf-8 -*- import logging import datetime from copy import copy from django.contrib.gis.db import models as gis_models from django.contrib.gis.db.models.functions import GeoFunc, Distance from django.contrib.gis.geos import Point from django.core.exceptions import ValidationError from django.db import mod...
from typing import Dict, Optional import numpy as np import pandas as pd from scipy import stats from scipy.spatial.distance import pdist, squareform from sklearn.metrics.pairwise import linear_kernel from sklearn.preprocessing import KernelCenterer from sklearn.utils import check_random_state from typing import Dict ...
""" GFA1 Serializer for nodes, edge, Subgraphs and networkx graphs. Can serialize either one of the object from the group mentioned before or from a dictionary with equivalent key. """ import copy import logging import networkx as nx from pygfa.graph_element.parser import field_validator as fv from pygfa.serializer ...
#!/usr/bin/python # Copyright 2016-2022 Intel Corporation # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- ##===-----------------------------------------------------------------------------*- Python -*-===## ## _ ## | | ## __| | __ ___ ___ ___ ## / _` |/ _` \ \ /\ / / '_ | ## ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2021 Intel 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 # # Unl...
# Copyright (c) 2014 Adafruit Industries # Author: <NAME> # Based on Adafruit_I2C.py created by <NAME>. # # 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 withou...
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. """ Contains functions related to pattern matching in transformations. """ from dace.config import Config from dace.sdfg import SDFG, SDFGState from dace.sdfg import graph as gr, nodes as nd import networkx as nx from networkx.algorithms impor...
import datetime, discord, time from .botmanager import start, stop, aliases, titles, bots from utils.datautils import config, data, save_data, default, set_client from utils.discordbot import BotClient, send, get_member client = None botlist = ["timer", "neutrino"] class SummonerClient(BotClient): def __init__(s...
# Copyright 2016-2022 Bitmain Technologies 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...
from astropy.time import Time import os import subprocess import pandas as pd import email, imaplib, base64 import logging, traceback, argparse import sqlite3 import numpy as np import healpy as hp from hp_funcs import err_circle2prob_map def cli(): parser = argparse.ArgumentParser() parser.add_argument('--r...
import torch import argparse import sys, os sys.path.append('models') sys.path.append('.') sys.path.append('..') from torch.autograd import Variable from torch.utils import data from torch import optim from loader import get_loader, get_data_path from triplet_resnet_softmax import * from loss import * from utils im...
# MIT License # Copyright (c) 2017 GiveMeAllYourCats # 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, mer...
from abc import abstractmethod import time from pathlib import Path from typing import Optional import logging from scipy.spatial.transform import Rotation import numpy as np # Hydra and omegaconf from hydra.conf import dataclass # Project Imports from slam.backend import Backend, BackendConfig, BACKEND from slam.co...
import numpy as np import scipy.sparse as sparse from typing import Any from torch.utils.checkpoint import checkpoint import torch import torch.nn as nn import torch.nn.functional as F from torch_scatter import scatter_max from .. import register_model, BaseModel from cogdl.utils import mul_edge_softmax, spmm, get_a...
from copy import deepcopy import numpy as np, matplotlib.pyplot as plt from sklearn import cluster from PIL import Image,ImageOps def resize_and_crop(img, size=(100,100), crop_type='middle'): # If height is higher we resize vertically, if not we resize horizontally # Get current and desired ratio for the image...
from xml.sax.handler import ContentHandler from xml.sax import make_parser import xml.sax.saxutils as saxutils import os import re import langid import io, zipfile import logging # I know this code is dirty :( class RePostprocessor(): def __init__(self, re_str='<.+?>'): self.re_compiled = re.compile(re_st...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import os import tempfile import zipfile from flask import Flask, request, abort, Response, jsonify from flask_cors import CORS, cross_origin from functool...
# Copyright 2020 ByteDance 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
import builtins import distutils.errors import distutils.sysconfig import inspect import io import keyword import linecache import os import re import site import sys import sysconfig import tokenize import traceback class SyntaxHighlighter: _default_style = { "comment": "\x1b[30m\x1b[1m{}\x1b[0m", ...
# Copyright 2021 <NAME> <<EMAIL>>. All Rights Reserved. # Author: <NAME> <<EMAIL>> # # 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 ...
import pandas as pd import numpy as np import microdf as mdf import plotly.express as px from pathlib import Path import os import sys from clean_data import format_census_geo_col # Get the current working directory cwd = os.getcwd() def read_spm_person_stata(filepath_or_buffer): # Read in the spm person data i...
# # CORE # Copyright (c)2011-2013 the Boeing Company. # See the LICENSE file included in this distribution. # # author: <NAME> <<EMAIL>> # from core.netns import nodes from xml.dom.minidom import Node def addelementsfromlist(dom, parent, iterable, name, attr_name): ''' XML helper to iterate through a list and add...
import numpy as np import sys import cv2 import random import logging from os import getenv, path def get_base_path(): mode = getenv('MODE', 'development') prefix = '..' if mode == 'development' else '.' return path.abspath(path.join(prefix, 'assets')) class ImagePainter: R_CHANNEL, G_CHANNEL, B_CHA...
import itertools from inspect import Signature from types import FunctionType, MethodType from pydot import Dot, Edge, Node from sqlalchemy.exc import CompileError from sqlalchemy.orm import class_mapper from sqlalchemy.orm.properties import RelationshipProperty __version__ = "0.3" NODE_TABLE = ( '<<TABLE BORDER...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
from __future__ import annotations import errno import logging import pathlib import select import string import sys import unicodedata from typing import Tuple import pandas as pd from rich.console import Console from rich.table import Table import machine_learning_with_python from machine_learning_with_python.con...
''' Copyright (c) 2019 <NAME> 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, distribute, ...
# Module for implementing gradients used in the autograd system import syft from syft.workers.abstract import AbstractWorker from . import gradients __all__ = ["GradFunc", "apply_dim_transformations"] def forward_grad(tensor): ## tensor here should be an AutogradTensor or a Tensor where we can set .grad t...
import tkinter as tk from tkinter import font from DisplayFilter import DisplayFilter from LogLevelLoader import * from UdpServer import * import threading class LogMessage: def __init__(self): self.level = -1 self.data = '' class LoggerApplication: def __init__(self, win): self.win =...
#!/usr/bin/env python #=============================================================================# # # # NAME: 3_extract_spectra.py # # ...
# -*- coding: utf-8 -*- """ @file @brief Some automation helpers to grab mails from students about projects. """ import time import random import numpy from pyquickhelper.loghelper import noLOG from pyquickhelper.texthelper.templating import apply_template from pymmails.sender import send_email template_mail_feedbac...
import json import tba_config from google.appengine.ext import ndb from api.apiv3.api_base_controller import ApiBaseController from api.apiv3.model_properties import filter_event_properties, filter_team_properties, filter_match_properties from consts.playoff_type import PlayoffType from database.award_query import Ev...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Pre-configured remote application for enabling sign in/up with ORCID. 1. Edit you...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jul 7 07:33:21 2018 @author: <NAME> """ # ============================================================================= # Import statements # ============================================================================= # imports from copy import ...
"""Functions to call poa software.""" from bisect import bisect_left import os from pathlib import Path import subprocess from typing import List, Dict, Union, Optional from pangtreebuild.affinity_tree import parameters from pangtreebuild.pangenome import graph from pangtreebuild.pangenome.parameters import msa from ...
import os import time import logging import copy import shutil import numpy as np from tqdm import tqdm import torch.nn as nn import torch import argparse from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter from torchsummary import summary from soundspaces.utils import load_metad...
import shlex import subprocess from datetime import datetime import sys import logging class KwArgsForwarder: def __init__(self, map_arg_name_to_type): self.map_arg_name_to_type = map_arg_name_to_type self.args = {} def check_params(self, **kwargs): for param_name, param_value in kwa...
from ..core.atom import Atom from ..core.molecule import Molecule from ..core.settings import Settings, read_template from ..core.job import Job from os import mkdir, chdir, getcwd, system from os.path import exists, join from shutil import copyfile, move __all__ = ["GaussJob"] class GaussJob(Job): """Class for ...
import hashlib import logging import os import random import string import tempfile import time from typing import IO, Any, Dict, List, NamedTuple, Optional, Tuple import boto3 import botocore import pandas import yaml log = logging.getLogger("aws") SUPPORTED_EMR_VERSION = "emr-6.0.0" STREAM_TO_ONLINE_JOB_TYPE = "ST...
# ----------------------------------------------------------------------- # Name: log_to_ADL.py # Author: <NAME> # Created: 2018.05.23 # Copyright: (c) yoshimura 2018 # # Purpose: Convert raw log file into ADLtagger format (csv) # # ----------------------------------------------------------------------- import os im...
import numpy as np import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from util import kdpp,get_mnist,remove_warnings,gpu_sess,plot_imgs class gmm_sampler_class(object): def __init__(self,_name='gmm',_z_dim=16,_k=5,_var=0.05): self.name = _name self.z_dim = _z_dim se...
#!/usr/bin/env python """Export cuneiform corpus from ORACC """ import sys import os import argparse import logging import json import re import shutil from selenium import webdriver from selenium.webdriver.remote import webelement from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import W...
""" Copyright 2019 Akvelon 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
#!/usr/bin/python3 # # Copyright (C) 2020 The Android Open Source Project # # 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 requir...
import itertools from collections import OrderedDict, Iterable from functools import wraps from nltk import flatten from nltk.corpus import wordnet from nltk.corpus.reader import Synset from nltk.stem import PorterStemmer from overrides import overrides from xnym_embeddings.dict_tools import balance_complex_tuple_di...
#!/usr/bin/env python ################################################################################ # # # Maps a 3d dump file to 2d # # ...
import time import pytest from unittest import mock import mlflow import mlflow.spark from mlflow._spark_autologging import _SPARK_TABLE_INFO_TAG_NAME from tests.tracking.test_rest_tracking import BACKEND_URIS from tests.tracking.test_rest_tracking import tracking_server_uri # pylint: disable=unused-import from tes...
# Copyright 2015 Cisco Systems, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
from typing import List import matplotlib.pyplot as plt import matplotlib import numpy as np from PIL import Image from face_detection.Config import cig def ellipse_to_Rectangle_label(x : float, y : float, a : float, b : float, shamt=1.0): if a < b: # make sure a is the larger one a, b = b, a...
"""Tasks related to metrics for Tamr Categorization projects""" import logging from tamr_unify_client.categorization.taxonomy import Taxonomy from tamr_unify_client.dataset.resource import Dataset from tamr_unify_client.project.resource import Project from tamr_toolbox.models import data_type from tamr_toolbox.utils ...
#!/usr/bin/env python3 import preprocessor as p import numpy as np import pandas as pd import emoji import spacy import tensorflow as tf from keras.layers import Bidirectional, Dropout, SpatialDropout1D from keras.layers.core import Dense from keras.layers.embeddings import Embedding from keras.layers.recurrent import ...
import pytest from sqlalchemy import insert, select, and_, or_, delete from sqlalchemy.exc import OperationalError, CompileError, IntegrityError, NoSuchTableError from tests.database.model import Base2 from tests.database.model.address import Address # noqa from tests.database.model.address2 import Address2 # noqa f...
# -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use the computer # program from someone who is...
# project imports from ..db.junctiondb import JunctionsDatabase, Gene, Junction, Stats from ..utils.io import get_sam_filelist, get_file_list, make_fasta_file, concatenate_dicts, count_lines from ..utils.time import elapsed_time from proteinprocessor import ProteinProcessor as PProcessor # Other imports import os impor...
import os import sys BASE_DIR = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname( os.path.abspath(__file__))))) sys.path.append(BASE_DIR) from tools.path import pretrained_models_path from simpleAICV.detection.common import load_state_dict from simpleAICV.detection.models.backbone import ...
# MIT License # # Copyright (c) 2017 liukuang # # 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, pub...
# coding=utf-8 import pygame import pygame.locals class Board(object): """ Plansza do gry. Odpowiada za rysowanie okna gry. """ def __init__(self, width, height): """ Konstruktor planszy do gry. Przygotowuje okienko gry. :param width: szerokość w pikselach ...
# -*- coding:utf-8 -*- # Copyright xmuspeech (Author: JFZhou 2020-05-31) import numpy as np import os import sys sys.path.insert(0, 'subtools/pytorch') import libs.support.kaldi_io as kaldi_io from plda_base import PLDA class CORAL(object): def __init__(self, mean_diff_scal...
# -*- coding=utf-8 -*- """ 주요 기능: - Process XingAPI Query 사용례: - """ ##@@@ Package/Module ##============================================================ ##@@ Built-In Package/Module ##------------------------------------------------------------ import os, sys import time from datetime import datetime ##...
import torch import torch.nn as nn import torch.optim as optim import torchvision.transforms as transforms import time import os import numpy as np import configure as c import pandas as pd from DB_wav_reader import read_feats_structure from SR_Dataset import read_MFB, TruncatedInputfromMFB, ToTensorInput, ...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
# Copyright 2019 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 or a...
import os import pandas as pd import numpy as np import math import gkernel import torch from torchvision.io import read_image from torch.utils.data import * import ctypes import multiprocessing as mp from PIL import Image from image_resize import image_resize from utils import functions class SuperResolutionDataset...
import random import re from PIL import Image from nonebot import on_command, on_message, on_notice, require, get_driver, on_regex from nonebot.typing import T_State from nonebot.adapters.cqhttp import Message, Event, Bot from random import randint import asyncio from src.libraries.image import image_to_base64, path,...
import logging import pytest import importers.common.helpers from importers.platsannons import converter from importers.common import taxonomy from importers.common.helpers import clean_html # TODO: from tests.test_data import test_ads from tests.integration_tests.test_resources.new_test_ads import test_ads log = log...