text
stringlengths
3.07k
22.1k
# -*- coding: utf-8 -*- # from collections.abc import Sequence import sys from .helpers import create_padding_tuple def _create_alignment(alignment, num_columns): if len(alignment) == 1: alignment = num_columns * alignment assert len(alignment) == num_columns return alignment def _get_border_ch...
#================================================================ # Functions to show the evolutions of omega in function of t #================================================================ # Load modules import numpy as np import matplotlib.pyplot as plt # Load personal modules from stellapy.utils.deco...
"""Support for MQTT binary sensors.""" from __future__ import annotations from datetime import timedelta import functools import logging import voluptuous as vol from homeassistant.components import binary_sensor from homeassistant.components.binary_sensor import ( DEVICE_CLASSES_SCHEMA, BinarySensorEntity, ...
import numpy as np import tensorflow as tf import tensorflow.keras.backend as K def brier_score(y_true, y_pred): y_true_f = K.flatten(K.round(y_true)) y_pred_f = K.flatten(K.round(y_pred)) # print(y_true_f) # print(y_pred_f) # print(K.mean(K.sum(K.pow(y_pred_f - y_true_f, 2)))) # np.mean(np.su...
import os import glob import time import tensorflow as tf import numpy as np import tensorflow.contrib.slim as slim import subprocess from datetime import datetime from tensorflow.python.ops import control_flow_ops from modules.videosr_ops import * class EASYFLOW(object): def __init__(self): self.num_fram...
from abc import ABC from enum import Enum from typing import List, Set, Optional, Dict class MessageType(Enum): INFO = 0 WARNING = 1 ERROR = 2 class ViewObserver: def on_change(self, change): pass class ViewComponent(ABC): """ Represents a GUI component """ def __init__(se...
# sqlalchemy/pool.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """Pool implementation classes. """ import traceback import weakref from .ba...
# Copyright 2018 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 ...
# Natural Language Toolkit: XML Corpus Reader # # Copyright (C) 2001-2019 NLTK Project # Author: <NAME> <<EMAIL>> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Corpus reader for corpora whose documents are xml files. (note -- not named 'xml' to avoid conflicting w/ standard xml package) """...
import numpy as np import matplotlib.pyplot as plt import os import pydicom as pyd from glob import glob from keras.preprocessing.image import ImageDataGenerator from keras.utils import to_categorical import bisect import random import math from Augmentor import * def import_dicom_data(path): data_path = path + '/...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # pyre-ignore-all-errors[2,3,16,33,6,23] # NOTE: most Any type in this file should be torch._C.Value - which was not yet annotated. # pyre also doesn't work well with many Optional in this file import typing from collections import Counter, Ordered...
import os import uuid import base64 import logging import urllib.request import time import numpy as np import yaml import cv2 import paddle.fluid as fluid from yolo_infer import offset_to_lengths from yolo_infer import coco17_category_info, bbox2out from yolo_infer import Preprocess def temp_directory(): return ...
''' show_acl.py IOSXR parsers for the following show commands: * show access-lists afi-all ''' # Python import re # Metaparser from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Schema, Any, Optional # parser utils from genie.libs.parser.utils.common import Common # =========...
"""A selection of rate functions, i.e., *speed curves* for animations. Please find a standard list at https://easings.net/. Here is a picture for the non-standard ones .. manim:: RateFuncExample :save_last_frame: class RateFuncExample(Scene): def construct(self): x = VGroup() f...
from EP_N_Env import * import math import random import numpy as np import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from pdb import set_trace as bp Tensor = torch.FloatTensor def get_input_optimizer(input_array): # this line to show ...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Utilities for test host microVM network setup.""" import os import socket import struct import threading from io import BytesIO from subprocess import run, PIPE from nsenter import Namespace from retry ...
# $Id$ # -*- coding: utf8 -*- # Authors: <NAME> <<EMAIL>>; <NAME>; <NAME> # Maintainer: <EMAIL> # Copyright: This module has been placed in the public domain. """ Transforms needed by most or all documents: - `Decorations`: Generate a document's header & footer. - `Messages`: Placement of system messages stored in ...
from finrl_meta.data_processors.processor_alpaca import AlpacaProcessor as Alpaca from finrl_meta.data_processors.processor_wrds import WrdsProcessor as Wrds from finrl_meta.data_processors.processor_yahoofinance import YahooFinanceProcessor as YahooFinance from finrl_meta.data_processors.processor_binance import Binan...
from __future__ import absolute_import, print_function, unicode_literals import os import sys from attr import attrib, attrs from twisted.python import failure from zope.interface import implementer from ._boss import Boss from ._interfaces import IDeferredWormhole, IWormhole from ._key import derive_key from .error...
# -*- coding: utf-8 -*- """Analyzes the gat2vec parameters to find optimal non-default values.""" # part 4 import logging import os import warnings # Suppress warnings warnings.simplefilter('ignore') import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from guiltytargets.pipeline import rank_...
# # Copyright (c) 2015-2021 Canonical, Ltd. # # This file is part of Talisker # (see http://github.com/canonical-ols/talisker). # # 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 # regardin...
"""This is the module containing all codes needed for the lexer. This module would take the character stream and generate a collection of tokens. Example: >>> from lex import Lexer >>> >>> with open(path_to_file, "r") as f: >>> character_stream = f.read() >>> lexer = Lexer(character_stream) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ * Filename: data.py * Description: used to process various data. * Time: 2020.11.30 * Author: liuf5 */ """ import re import json import os import time import hashlib from zoomeye import config, file from zoomeye.sdk import ZoomEye, fields_tables_host from zoomeye.sdk...
# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for cros_portage_upgrade.py.""" from __future__ import print_function import os import sys import tempfile fr...
"""Support for Xiaomi Gateways.""" import asyncio import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helpers import discovery from homeassistant.helpers.entity import Entity from homeassistant.components.discovery import SERVICE_XIAOMI_GW from homeassistant.c...
import logging from enum import Enum from typing import Any, Dict, List, Optional, Union from ... import Logger from .base import BaseValidator from .exceptions import SchemaValidationError RULES_KEY = "rules" FEATURE_DEFAULT_VAL_KEY = "default" CONDITIONS_KEY = "conditions" RULE_MATCH_VALUE = "when_match" CONDITION_...
import math import StringIO import types __pychecker__ = 'no-returnvalues' WS = set([' ', '\t', '\r', '\n', '\x08', '\x0c']) DIGITS = set([str(i) for i in range(0, 10)]) NUMSTART = DIGITS.union(['.', '-', '+']) NUMCHARS = NUMSTART.union(['e', 'E']) ESC_MAP = {'n': '\n', 't': '\t', 'r': '\r', 'b': '\x08', 'f': '\x0c'} R...
from argparse import ArgumentParser from sqrt import my_sqrt DOT = "." NUMBERS = "0123456789" SIGNS = "+-" MULTI = '*' POWER = '^' VARIABLE = 'xX' def convert_sign_list(signs:list): new_signs = [] for letter in signs: if letter in SIGNS: new_signs.append('-' if letter == '+' else '+') ...
from collections import namedtuple from itertools import groupby import numpy as np import torch from fairseq import utils from fairseq.data.dictionary import Dictionary from fairseq.iterative_refinement_generator import IterativeRefinementGenerator DecoderOut = namedtuple('IterativeRefinementDecoderOut', [ 'out...
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import logging from base64 import b64encode from .compat import urlparse, str from .utils import parse_dict_header try: from ._oauth import ...
import copy import datetime import io import os import tempfile import warnings from django.core.files.storage import FileSystemStorage from django.db import models from django.http import HttpResponse from django.urls import reverse from django.utils.deconstruct import deconstructible from django.utils.encoding impor...
''' gui_multilabel.py Copyright @ 2018 Jiaoyan<<EMAIL>>, Ziqi<<EMAIL>>, Han <<EMAIL>> License: MIT ''' from tkinter import * from control import * import pandas as pd import numpy as np from tkinter import messagebox from Model import * def show_result(): BENE_SEX_IDENT_CD_1, BENE_SEX_IDENT_CD_2 = set_gender(gen...
from __future__ import absolute_import import os.path import numpy as np from skimage import draw import cv2 from scipy.ndimage import filters from ocrd_modelfactory import page_from_file from ocrd_models.ocrd_page import to_xml, AlternativeImageType from ocrd import Processor from ocrd_utils import ( getLogger, ...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains convenience functions for coordinate-related functionality. This is generally just wrapping around the object-oriented coordinates framework, but it is useful for some users who are used to more functional interfaces. """ import...
import os import sox from tqdm import tqdm from . import tools, parser, inserter from multiprocessing import Pool def convert_select(mode,corporas,autoreplace,convert_settings,trimm_settings): tools.printer(2,'output settings',str(convert_settings).replace('[','').replace(']','').replace(',','').replace('\'','')...
from script.model.sklearn_like_model.AE.AE import AE from script.util.Stacker import Stacker from script.util.tensor_ops import * from script.util.summary_func import * def common_linear_stack(stack: Stacker, net_shapes, bn=True, activation='relu') -> Stacker: for shape in net_shapes: stack.linear...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/env python3 import sys, os #sys.path.append("/scratch/bbecker/cv/lib/python3.6/dist-packages") #sys.path.append("/scratch/bbecker/kmcuda/src/build") #sys.path.append("/scratch/bbecker/python-libs/lib/python3.6/site-packages/") import cv2 from pai4sk.cluster import KMeans import cudf, cuml import pandas as p...
from const import * from statistics import mean, median import numpy as np sadpanda = 'NO ENTRIES\n' class Plugin: """Parent class definition for all plugins.""" name = '' def process(self, entry): return entry def finalize(self): pass def get_data(self): return [] de...
#!/net/kodiak/volumes/lake/shared/users/marghoob/my_env/bin/python from __future__ import print_function import argparse import os import sys import logging import subprocess import re import hashlib import uuid from multiprocessing import Process import random from functools import partial from itertools import compr...
# Copyright (c) 2017-present, Facebook, 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Void Copyright NO ONE # # Void License # # The code belongs to no one. Do whatever you want. # Forget about boring open source license. # # AEAD cipher for shadowsocks # from __future__ import absolute_import, division, print_function, \ with_statement from ctypes...
# pylint: disable=unused-variable """Definition of task function. Task can be constructed from tuple of func, args, and kwargs. func is a state-less function, or a string that registers the standard task. """ import numpy as np from ... import tensor, expr, container, target as _target from ..util import get_const_...
#!/usr/bin/env python # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2022 The GPflow Contributors. 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 appl...
import hail as hl from hail.typecheck import typecheck, sequenceof from hail.expr.expressions import expr_str, expr_call, expr_locus, expr_array from typing import List @typecheck(locus=expr_locus(), alleles=expr_array(expr_str), proband_call=expr_call, father_call=expr_call, ...
import mmcv import numpy as np from numpy import random from mmdet.core import poly2bbox from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps from pycocotools.coco import maskUtils import cv2 from functools import partial import copy def TuplePoly2Poly(poly): outpoly = [poly[0][0], poly[0][1], ...
# -*- coding: utf-8 -*- import os import psutil import traceback import h5py import numpy as np from buffalo.data import prepro from buffalo.misc import aux, log from buffalo.data.base import Data, DataOption class MatrixMarketOptions(DataOption): def get_default_option(self) -> aux.Option: opt = { ...
from click import BadParameter import re import typer from typing import Tuple, List, Dict, Optional from pathlib import Path import os import importlib import importlib.util import importlib.machinery import sys from inspect import signature, _empty import inspect from dovado_rtl.doc_parsing import get_directives, get...
# flake8: noqa: E501 """ Example: Large-scale ML Ingest ================================================= In this example, you will learn how to build, deploy and scale up a machine learning shuffle ingestion pipeline using `Ray Dataset <https://docs.ray.io/en/latest/data/dataset.html>`_ and `Dataset Pipelines <https:...
from django.db import models from django.db.models import F, Max, Min, Q from django.db.transaction import atomic from django.contrib.contenttypes.models import ContentType from django.core import signing from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django_comments.manag...
import asyncio import discord import json import os import logging import DBSkr import hcskr from discord.ext import commands from pymongo import MongoClient my_client = MongoClient("mongodb://localhost:27017/") mydb = my_client['jindan'] mycol = mydb['userinfo'] loop = asyncio.get_event_loop() def get_bot_setting...
"""Elasticsearch index data mapping, settings, management and import/export. We maintain an append-only document mapping with a number of wildcard fields. One wildcard field mapping example is the private tags field - a different field for every user. """ from contextlib import contextmanager from datetime import dat...
from dataset import Dataset import sqlite3 import dlib import cv2 import os import numpy as np import pandas as pd from loggers import Log class AflwDataset(Dataset): """Class that abstracts Aflw dataset. """ def __init__(self,config): # self.conn = sqlite3.connect("/home/mtk/dataset/aflw-files/a...
import ast from collections import defaultdict from typing import DefaultDict, List, Union from typing_extensions import final from wemake_python_styleguide import constants from wemake_python_styleguide.logic.nodes import get_parent from wemake_python_styleguide.logic.tree.functions import is_method from wemake_pyth...
import numpy as np import scipy.io.wavfile as wav import librosa import os,sys,shutil,argparse,copy,pickle import math,scipy from faceformer import Faceformer from transformers import Wav2Vec2FeatureExtractor,Wav2Vec2Processor import torch import torch.nn as nn import torch.nn.functional as F import cv2 import tempfi...
# Copyright (c) 2013 Mirantis 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 writ...
from __future__ import annotations import shlex import string from os import getenv from pathlib import Path from typing import Any, Callable import requests from requests.sessions import PreparedRequest from rich import print from rich.panel import Panel from rich.prompt import InvalidResponse from ideaseed.utils i...
from prompt_toolkit.application import get_app from prompt_toolkit.document import Document from prompt_toolkit.enums import DEFAULT_BUFFER from prompt_toolkit.filters import ( Condition, emacs_insert_mode, emacs_mode, has_focus, has_selection, vi_insert_mode, ) from prompt_toolkit.key_binding i...
################################ ########### Imports ############ ################################ import sys import os sys.path.append('../../python/') import warnings warnings.filterwarnings("ignore", message="numpy.dtype size changed") warnings.filterwarnings("ignore", message="numpy.ufunc size changed") #set up m...
import os import warnings from bento.core.pkg_objects \ import \ Extension from bento.core.node \ import \ split_path def translate_name(name, ref_node, from_node): if from_node != ref_node: parent_pkg = ref_node.path_from(from_node).replace(os.sep, ".") return ".".join([p...
# -*- coding: utf-8 -*- """Kwik GUI.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import logging from pathlib import Path import shutil from tempfile import TemporaryDirectory import nump...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ bootstrap.py - bootstrapping utility for cabal-install. See bootstrap/README.md for usage instructions. """ USAGE = """ This utility is only intended for use in building cabal-install on a new platform. If you already have a functional (if dated) cabal-install pleas...
import logging from itertools import combinations from collections import defaultdict import numpy as np import scipy.spatial as spatial from opensfm import bow from opensfm import context logger = logging.getLogger(__name__) def has_gps_info(exif): return (exif and 'gps' in exif and '...
import os import argparse os.environ["OMP_NUM_THREADS"] = "1" import numpy as np import numpy.random as npr import mimo from mimo.distributions import NormalGamma from mimo.distributions import MatrixNormalWishart from mimo.distributions import GaussianWithNormalGamma from mimo.distributions import LinearGaussianWit...
# Copyright 2018-2019 The glTF-Blender-IO 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 or ...
""" Code for retrieving the value of attributes. """ import ast import asynq from dataclasses import dataclass from enum import Enum import inspect import qcore import sys import types from typing import Any, Dict, Sequence, Tuple, Optional from .annotations import type_from_runtime, Context from .safe import safe_i...
#!/usr/bin/env python # -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- """ Demo script showing detections in sample images. ...
import numpy as np import paddle import paddle.nn as nn import paddle.fluid as fluid from paddlenlp.transformers import LayoutXLMPretrainedModel class Crf_decoding(paddle.fluid.dygraph.Layer): def __init__(self, param_attr, size=None, is_test=True, dtype='float32'): super(Crf_decoding, self).__init__() ...
# Copyright 2021 the .NET Foundation # Licensed under the MIT License """ The WWT kernel data relay Jupyter notebook server extension. """ import json from queue import Empty from tornado import gen, web from jupyter_client.session import Session from notebook.utils import url_path_join from notebook.base.handlers ...
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime import six from celery.exceptions import MaxRetriesExceededError from celery.schedules import crontab from celery.task import task from celery.task.base import periodic_task from celery.utils.log import get_tas...
import os from collections import OrderedDict from pathlib import Path from typing import Dict import math import torch from catalyst import utils from catalyst.callbacks.checkpoint import BaseCheckpointCallback from catalyst.dl import IRunner, Callback, CallbackOrder __all__ = [ "BestMetricCheckpointCallback", ...
import os import sys import re from datetime import datetime from Util import * from Const import * def check_if_env_exists(conda_path, env_name): env_dir = os.path.join(conda_path, '..', 'envs', env_name) if os.path.isdir(env_dir): print("INFO...environment {env} already exists".format(env=env_name))...
import pytest from draconic import DraconicInterpreter from draconic.exceptions import * from draconic.helpers import DraconicConfig @pytest.fixture() def i(): # 1000-size iterables, don't limit us by loops, signed 32b int limit config = DraconicConfig(max_loops=99999999, max_const_len=1000, max_int_size=32)...
import socket import json import threading import sys import argparse import os from datetime import datetime from message import Message from streaming import create_msg, stream_data, initialize_AES, decrypt_msg, return_vector from client_connection_obj import ClientConnection import pyDHE import time # DiffieHellman...
from __future__ import annotations import dataclasses import enum import io import secrets import struct from typing import Callable, Generator, Optional, Sequence, Tuple from . import exceptions, extensions from .typing import Data try: from .speedups import apply_mask except ImportError: # pra...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2018 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...
""" LATRDProducer - load LATRD packets from packet capture file and send via UDP. <NAME>, STFC Application Engineering Group. """ import struct import logging import argparse import os import socket import time import random import dpkt import threading class LATRDPacket(object): IDLE_PACKET_MASK = 0x0000...
# https://deeplearningcourses.com/c/deep-reinforcement-learning-in-python # https://www.udemy.com/deep-reinforcement-learning-in-python from __future__ import print_function, division from builtins import range # Note: you may need to update your version of future # sudo pip install -U future import gym import os impo...
""" node.py Contains the base class for Nodes. """ import traceback from logging import Logger from functools import wraps from typing import Any, Union, Tuple, Dict, Optional, Type, List, Callable, TypeVar from .. import NodeBase from .. import QtGui, QtCore, Signal, Slot, QtWidgets from ..data.datadict import Data...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2020, <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: nomad_job_info author: <NAME> (@chr...
import selenium from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.webdriver import Options from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from ...
""" Support for Apple TV. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.apple_tv/ """ import asyncio import logging from homeassistant.core import callback from homeassistant.components.apple_tv import ( ATTR_ATV, ATTR_POWER, DATA_APPL...
import warnings from typing import Any, Dict, Optional from lhotse import CutSet, Seconds from lhotse.dataset.sampling.base import CutSampler, TimeConstraint from lhotse.dataset.sampling.data_source import DataSource from lhotse.utils import is_none_or_gt class SimpleCutSampler(CutSampler): """ Samples cuts ...
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # Importing the Kratos Library import KratosMultiphysics from KratosMultiphysics.json_utilities import read_external_json # Import KratosUnittest import KratosMultiphysics.KratosUnitte...
import requests import re import os import zipfile from bs4 import BeautifulSoup from sys import argv, exit from Errors import Errors from utils import * URL_SITE = "https://subscene.com" URL_SEARCH_BY_TITLE = f"{URL_SITE}/subtitles/searchbytitle" def get_args(argv: list): """gets the args and dictionarize them""...
""" Interface to the SQL database. Use SQLAlchemy to convert between DB tables and python objects. """ import os from sqlalchemy import Column, ForeignKey, Integer, String, Float from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy.orm import sessionmaker from ...
from PyQt5.QtWidgets import * from MyWizardPage import MyWizardPage from fontTools.designspaceLib import SourceDescriptor from PyQt5.QtCore import Qt, pyqtSlot, QPoint, pyqtSignal from PyQt5 import QtGui import re, os from QDesignSpace import DesignSpaceVisualizer import defcon class DragDropArea(QPushButton): go...
from bilibili import bilibili from statistics import Statistics import printer from printer import Printer import rafflehandler from configloader import ConfigLoader import utils import asyncio import struct import json import sys import aiohttp class BaseDanm...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt import traceback import json from rq.timeouts import JobTimeoutException import smtplib import quopri from email.parser import Parser import frappe from frappe import _, safe_encode, t...
from mpmath import * from numpy import * from matplotlib.pyplot import * import matplotlib.patches as patches from flint import acb from matplotlib.colors import ListedColormap, LinearSegmentedColormap rc('text', usetex=True) realcolor = [] imagcolor = [] highlightcolor = [] highlightbordercolor = [] branchcutcolor =...
# -*- coding: utf-8 -*- # Copyright (c) 2019 by University of Kassel, T<NAME>, RWTH Aachen University and Fraunhofer # Institute for Energy Economics and Energy System Technology (IEE) Kassel and individual # contributors (see AUTHORS file for details). All rights reserved. import numpy as np import pandas as pd impo...
from typing import Any, Dict, List, Optional, Sequence, Set, Union import numpy from . import _vroom from .amount import Amount from .location import Location, LocationCoordinates, LocationIndex from .time_window import TimeWindow class JobBaseclass: """Baseclass for all Job classes containing common attribute...
""" Simple Baseline Model for AV-Sync. Organinzed in PyTorch Lightning Flatten both audio and video features; concat them and feed into sequential linear layers. """ import numpy as np import torch import torch.nn as nn import pytorch_lightning as pl class PrintSize(nn.Module): def __init__(self): super(P...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django import forms from django.utils.safestring import mark_safe from django.utils.timezone import now from pagedown.widgets import PagedownWidget from junction.base.constants import ( ConferenceSettingConstants, ProposalRe...
#!/usr/bin/env python3 import re from pathlib import Path from typing import NamedTuple, Optional, List, Iterable import subprocess, os, sys, shutil from contextlib import contextmanager import json class CompilationError(Exception): ... class FlintCompilationError(CompilationError): ... class MoveRuntimeError(Runt...
from img2dataset import download import os import shutil import cv2 import pytest import glob import time import pandas as pd import tarfile def test_basic(): print("it works !") current_folder = os.path.dirname(__file__) test_folder = current_folder + "/" + "test_folder" if not os.path.exists(test_folder): o...
import requests import confidential from selenium import webdriver from selenium.webdriver.chrome.options import Options import json import time from base64 import b64encode debug = 2 def sendMessage (chat_id, text, parse_mode, no_link_preview): link='https://api.telegram.org/bot' + confidential.api_key + '/sendM...