text
stringlengths
3.07k
22.1k
""" Blend mode implementations. """ import numpy as np import functools from psdtoolsx.constants import BlendMode from psdtoolsx.terminology import Enum import logging logger = logging.getLogger(__name__) # Separable blend functions def normal(Cb, Cs): return Cs def multiply(Cb, Cs): return Cb * Cs def s...
## Unit Plot List Utilities ## ## Holds the information used to display the unit plot list ## ## Copyright (c) 2007-2009 The BUG Mod. ## ## Author: Ruff_Hi from CvPythonExtensions import * import MonkeyTools as mt import BugUtil # globals gc = CyGlobalContext() ArtFileMgr = CyArtFileMgr() localText = CyTranslator() ...
from collections import namedtuple from functools import partial from itertools import chain, takewhile import re import sublime from .fns import accumulate, pairwise MYPY = False if MYPY: from typing import Final, Iterator, List, NamedTuple, Optional, Tuple, Type from .types import LineNo if MYPY: Spl...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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, overload from . import ...
import logging import random from types import ( TracebackType, ) from typing import ( AsyncIterator, Callable, Dict, Optional, Tuple, Type, TypeVar, ) import trio from trio.abc import ( ReceiveChannel, SendChannel, ) from trio.hazmat import ( checkpoint, ) from eth_utils i...
# -*- encoding: utf-8 -*- import re import os import glob import typing import numpy as np scores_dict = { 'train_single': ["single_best_train_score", "single_best_optimization_score"], 'test_single': ["single_best_test_score"], 'train_ensamble': ["ensemble_optimization_score"], 'test_ensamble': ["en...
# -*- coding: utf-8 -*- # Copyright 2015-2016 Yelp # # 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 collections.abc import MutableMapping from typing import Any, Dict, Optional, Tuple, Union import numpy as np import xarray as xr import zarr from . import Model from .utils import get_batch_size, normalize_encoding from .variable import VarType VarKey = Tuple[str, str] EncodingDict = Dict[str, Dict[str, Any]]...
""" Based on: https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html In this tutorial, you will learn how to train your network using transfer learning. You can read more about the transfer learning at `cs231n notes <http://cs231n.github.io/transfer-learning/>`__ Quoting these notes, In practice...
from __future__ import print_function, division, absolute_import import aiohttp import asyncio import re import requests import weakref from urllib.parse import urlparse from fsspec import AbstractFileSystem from fsspec.spec import AbstractBufferedFile from fsspec.utils import tokenize, DEFAULT_BLOCK_SIZE from fsspec....
import os import sys from pathlib import Path import pytest from isort import exceptions, settings from isort.settings import Config from isort.wrap_modes import WrapModes class TestConfig: instance = Config() def test_init(self): assert Config() def test_init_unsupported_settings_fails_gracef...
from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from selenium.webdriver.common.by import By from selenium.common import exceptions as SeleniumEx from json.decoder import JSONDecodeError from time import sleep import platform import requests import random import json S...
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 2 # of the License, or (at your option) any later version. # # This program is distrib...
from django.shortcuts import render from django.shortcuts import HttpResponse from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from datetime import datetime from django.db.models import Q import json from system import models from system import helpClass from system.helpClass i...
"""Basic tests to check that the main examples work.""" import os import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from dna_features_viewer import (BiopythonTranslator, GraphicFeature, GraphicRecord, CircularGraphicRecord) from bokeh.resources import CDN from bok...
"""Export a YOLOv5 *.pt model to TorchScript, ONNX, CoreML formats Usage: $ python path/to/export.py --weights yolov5s.pt --img 640 --batch 1 """ import argparse import sys import time from pathlib import Path import torch import torch.nn as nn from torch.utils.mobile_optimizer import optimize_for_mobile FILE =...
import os import sys from zipfile import ZipFile from django.conf import settings from django.core.files.temp import NamedTemporaryFile from django.core.mail.message import EmailMessage from django.template.defaultfilters import linebreaksbr import six from celery.task import task from corehq.apps.translations.gener...
#-- coding: utf-8 -- from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from djaludir.core.sql import ( ACTIVITY_SEARCH, RELATIVES_ORIG...
from __future__ import print_function import sys import os import platform import io import getopt import re import string import errno import copy import glob from jsbeautifier.__version__ import __version__ from jsbeautifier.cli import * from jsbeautifier.javascript.options import BeautifierOptions from jsbeautifier....
import json import os from pathlib import Path from random import shuffle from fabric import task from patchwork.transfers import rsync HOSTS = [ '10.42.0.50', '10.42.0.29', '10.42.0.105', '10.42.0.56', '10.42.0.180', '10.42.0.235', '10.42.0.244', '10.42.0.239', '10.42.0.191', ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths import os import os.path as osp import cv2 import logging import argparse import motmetrics as mm import numpy as np import torch from tracker.multitracker import JDETracker from tracking_ut...
from geopy import distance from geopy.geocoders import Nominatim CITY_DATA = { 'Калуга': { 'type': 'city', 'importance': 0.657295410002972, 'area': 358.911060027607, 'lat': 54.5101087, 'lon': 36.2598115 }, 'Волжский': { 'type': 'city', 'importance': 0...
import math from PIL import Image RIGHT = 1 BOTTOM = 2 LEFT = 3 TOP = 4 def write_image(image, tiles, ids): y_max = len(tiles[ids[0]].grid) assert y_max == 10 # Skip first and last row for y in range(1,y_max-1): row = [] for i in ids: tile = tiles[i] ...
import os import sys import csv from pathlib import Path import time import fiona from collections import OrderedDict, defaultdict from rtree import index from shapely.geometry import mapping, shape, Point, LineString, MultiLineString from vtra.utils import load_config # C Incoming data/20170801.zip -> data/raw/c...
from sympy.physics.units.systems.si import dimsys_SI from sympy.utilities.pytest import warns_deprecated_sympy from sympy import (Add, Mul, Pow, Tuple, pi, sin, sqrt, sstr, sympify, symbols) from sympy.physics.units import ( G, centimeter, coulomb, day, degree, gram, hbar, hour, inch, joule, kelvin, kilogr...
from __future__ import print_function import os import re import numpy as np import sys import argparse from operator import itemgetter, attrgetter, methodcaller def main(): parser = argparse.ArgumentParser() parser.add_argument("--new", action='store_true', help='new runs starting from a run') parser.ad...
""" BioSimulators-compliant command-line interface to the `RBApy <https://sysbioinra.github.io/RBApy/>`_ simulation program. :Author: <NAME> <<EMAIL>> :Date: 2021-08-12 :Copyright: 2021, Center for Reproducible Biomedical Modeling :License: MIT """ from biosimulators_utils.combine.exec import exec_sedml_docs_in_archi...
### edited from the code by https://twitter.com/deKxi import os import sys import cv2 from imageio import imsave import numpy as np import PIL import torch import torch.nn.functional as F from torchvision import transforms as T from torchvision.transforms import functional as TF from kornia.enhance import equalize ...
import sys sys.path.append('core') import argparse import os import cv2 import glob import numpy as np import torch from PIL import Image from frame_utils import writeFlow from raft import RAFT from utils import flow_viz from utils.utils import InputPadder import subprocess as sp import code import re import struct i...
import numpy as np from .node import Node, BatchRenderNode, InstanceRenderNode, VolumeRenderNode from ..geometry.colour import Colour from ..geometry.primitive import create_sphere, create_plane, create_cuboid from ..math.matrix import Matrix44 from ..math.transform import rotation_btw_vectors from ..util import Attrib...
# http://problemkaputt.de/gbatek.htm#dscartridgenitrofontresourceformat from typing import List, Dict from formats.filesystem import FileFormat from formats.binary import BinaryReader import numpy as np class NFTRHeader: magic_value: bytes # b"RTFN" byte_order: int # 0xFEFF version: int # 0x100 to 0x1...
import os import uuid import time import subprocess import numpy as np import utils.working_directory as working_directory from concurrent.futures import ProcessPoolExecutor from datetime import date, datetime def compute_trajectory(particles, madx_configuration, number_of_workers): """ Compute trajectory for...
from torchvision.transforms import ToTensor, Normalize, Compose, ColorJitter, ToPILImage, RandomAffine import torch from torch.utils.data import Dataset import pandas as pd from os.path import join from PIL import Image, ImageOps import numpy as np import random class SketchyDB(Dataset): """ class representing th...
import numpy as np import pytest import xarray as xr from xarray.core import dtypes, merge from . import raises_regex from .test_dataset import create_test_data class TestMergeInternals: def test_broadcast_dimension_size(self): actual = merge.broadcast_dimension_size( [xr.Variable("x", [1]),...
#!/usr/bin/env python import os import cv2 as cv import numpy as np from tests_common import NewOpenCVTests, unittest def normAssert(test, a, b, msg=None, lInf=1e-5): test.assertLess(np.max(np.abs(a - b)), lInf, msg) def inter_area(box1, box2): x_min, x_max = max(box1[0], box2[0]), min(box1[2], box2[2]) ...
# coding: utf-8 # created by deng on 10/12/2018 import jieba import pandas as pd import numpy as np from time import time from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer, HashingVectorizer from sklearn.model_selection import train_test_split from sklearn.preprocessing import MultiLabelBin...
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
import json import math import time import asyncio import websockets import adafruit_gps import adafruit_lsm303_accel import adafruit_lsm303dlh_mag import board import busio import digitalio import serial # ########################## Configuration ############################### TESTMODE = False # Test P values...
#!/usr/bin/python # # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # """ Swift upload image file. This file contains implementation of gett swift download URL for the uploaded image file """ from builtins import object from builtins import str from future import standard_library # noqa standard_...
#!/usr/bin/python """ sipros_post_module.py sipros_post_module.py module includes common classes, definitions, and funcitons for sipros post-processing programs. Created by Tae-Hyuk (<NAME> on 10/10/2012. Copyright (c) 2012 <NAME> (ORNL). Allrights reserved. """ ## Import standard modules import sys, warnings, os, ...
from sqlite3 import connect from sqlalchemy import create_engine from os import getenv from random import choice from rdkit.Chem import MolFromFASTA, MolToSmiles, RDKFingerprint, MolFromSmiles from rdkit.DataStructs import CosineSimilarity three_letter_code = {'A': 'ala', 'R': 'arg', ...
import os from sequana import adapters from sequana import sequana_data, FastA from easydev import TempFile from sequana.adapters import FindAdaptersFromDesign def test_fasta_fwd_rev_to_columns(): a1 = sequana_data("adapters_PCRFree_fwd.fa") a2 = sequana_data("adapters_PCRFree_rev.fa") f1 = FastA(a1) ...
#!/usr/bin/env python3 # Import required libraries import pygatt # To access BLE GATT support import signal # To catch the Ctrl+C and end the program properly import os # To access environment variables from threading import Thread from dotenv import load_dotenv # To load the environment variables from the .env fi...
import numpy as np import itertools from math import exp, sqrt, log def l2_regularization(W, reg_strength): ''' Computes L2 regularization loss on weights and its gradient Arguments: W, np array - weights reg_strength - float value Returns: loss, single value - l2 regularization los...
import os import io import time import random import requests # Speech Recognition Imports import pydub import speech_recognition as sr # Selenium from selenium.webdriver.firefox.options import Options from selenium.webdriver.firefox.service import Service from selenium.webdriver.common.keys import Keys ...
import json from openbadges_bakery import unbake from pydux import create_store import traceback from .actions.input import set_input_type, store_input from .actions.tasks import add_task, report_message, resolve_task, trigger_condition from .exceptions import SkipTask, TaskPrerequisitesError from .logger import logge...
from webdriver_manager.chrome import ChromeDriverManager from selenium import webdriver from selenium.webdriver.chrome.options import Options import os import logging import re import time import yaml import datetime import slackweb from slack_sdk import WebClient from slack_sdk.errors import SlackApiError import argpa...
""" This module includes dataflow firetask tasks """ __author__ = '<NAME>' __email__ = '<EMAIL>' __copyright__ = 'Copyright 2016, Karlsruhe Institute of Technology' import sys from fireworks import Firework from fireworks.core.firework import FWAction, FireTaskBase from fireworks.utilities.fw_serializers import load_...
#!/usr/bin/env python3 import math import torch from torch.distributions import MultivariateNormal as TMultivariateNormal from torch.distributions.kl import register_kl from torch.distributions.utils import _standard_normal, lazy_property from .. import settings from ..lazy import LazyTensor, lazify from .distributi...
import json, urllib, cookielib, urllib2, sys from slam.models import Pool, Host, Address, Property from slam import interface, generator import django.contrib.auth.models HTTP_OPENER = None def request(url, method, data=None): url = "http://12172.16.31.10:8737" + url if data: request = urllib2.Reque...
import sublime import sublime_plugin PACKAGE_SETTINGS = "ExportHtml.sublime-settings" def get_highlight_style(): style_flag = 0 settings = sublime.load_settings(PACKAGE_SETTINGS) scope = settings.get("annotation_highlight_scope", "comment") style = settings.get("annotation_highlight_style", "outline"...
# -*- test-case-name: vumi.tests.test_fake_amqp -*- from uuid import uuid4 import re from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks, returnValue, Deferred from txamqp.client import TwistedDelegate from txamqp.content import Content from vumi.service import WorkerAMQClient fro...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose from regions import CircleSkyRegion from astropy import units as u from astropy.time import Time from gammapy.data import EventList from gammapy.irf import EDispKernel from gammapy....
from __future__ import absolute_import from .myglobals import * from .pypi_simple_download import * import re import tkinter as tk from collections import deque def pypi_index_load(): d = dict() for line in open(PYPI_INDEX_DAT): name, href = line.split(" ", maxsplit=1) d[name] = href ret...
#!/usr/bin/python # encoding: utf-8 # (c) 2013, <NAME> <<EMAIL>> # (c) 2014, <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 ANSIBLE_METADATA = {'metadata_version': '...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
#!/bin/env python import torch import torch.nn as nn import torch.nn.functional as F import pydiffvg from torchvision.models import resnet50 import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from .backbone import ResMLP, MLPblock, Aff pydiffvg.set_use_gpu(torch.cuda.is_available()) class Encode...
import itertools import unittest from datetime import timedelta import numpy as np import pandas as pd import pytest from feast import FeatureService from feast.errors import ( FeatureNameCollisionError, RequestDataNotFoundInEntityRowsException, ) from tests.integration.feature_repos.repo_configuration import...
import logging import numpy as np from copy import deepcopy from pathlib import Path import yaml import torch import argparse from cosypose.bop_config import BOP_CONFIG # from cosypose.bop_config import PBR_COARSE, PBR_REFINER, PBR_DETECTORS from cosypose.bop_config import SYNPICK_REAL_COARSE, SYNPICK_REAL_REFINER, SY...
import pdb import subprocess from collections import Counter, defaultdict from functools import partial, reduce, wraps from itertools import count, groupby from math import prod from operator import itemgetter, methodcaller, mul from pathlib import Path from pprint import pprint from string import ( ascii_lowercase...
"""Contains all the logic that handles code errors.""" import re from typing import List, Union from argparse import Namespace from slugify import slugify from .utils import HINT_MESSAGES, SEARCH_URL from .utils import ( SINGLE_QUOTE_CHAR, SINGLE_SPACE_CHAR, EMPTY_STRING, ) def handle_error(error_info: ...
# python3.7 """Utility functions for latent codes manipulation.""" import numpy as np from sklearn import svm from .logger import setup_logger __all__ = ['train_boundary', 'project_boundary', 'linear_interpolate'] def train_boundary(latent_codes, scores, chosen_num_or_ratio=0.0...
#!/usr/bin/env python # -*- coding: utf8 -*- import sys from xml.etree import ElementTree from xml.etree.ElementTree import Element, SubElement try: from lxml import etree print("running with lxml.etree") except ImportError: try: # Python 2.5 import xml.etree.cElementTree as etree print("running with...
from typing import Union, List from copy import copy from sympy import MatrixSymbol, Basic, HadamardProduct, Symbol, MatrixExpr from symgp.superexpressions.supermatbase import SuperMatBase from symgp.superexpressions.supermatexpr import SuperMatSymbol, Covariance, Variable, \ CompositeVariable from symgp.superexp...
import mmcv import numpy as np import os from concurrent import futures as futures from os import path as osp class S3DISData(object): """S3DIS data. Generate s3dis infos for s3dis_converter. Args: root_path (str): Root path of the raw data. split (str): Set split type of the data. Defau...
import argparse import logging import os import random import socket import sys import time import argh import tensorflow as tf from tensorflow import gfile from tqdm import tqdm import alphagozero_agent import network import preprocessing from config import GLOBAL_PARAMETER_STORE from constants import PATHS from alp...
#!/usr/bin/python # ################################################## ######## Please Don't Remove Author Name ######### ############### Thanks ########################### ################################################## # # __author__=''' <NAME> <EMAIL> http://bitforestinfo.blogspot.com/ ''' # =======...
import os import sys import time from datetime import date, timedelta from selenium import webdriver from selenium.webdriver.firefox.options import Options from db_utils import * import subprocess import argparse import tempfile import getpass import json def get_driver(download_folder, executable_path): """ ...
import argparse import base64 import logging import os import random import subprocess from datetime import datetime from tempfile import TemporaryDirectory import random import requests from PIL import Image from tqdm import tqdm from kili.transfer_learning import TransferLearning logging.basicConfig( format='%...
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2017, 2018, 2019, 2020, 2021 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Flask application configuration.""" import copy import os import r...
import datetime import logging import os import tzlocal class TestStatusError(RuntimeError): pass class TestStatesStruct: """A class containing the valid test state constants. Rules: - The value should be an ascii string of the constant name. - The constants have a max length of 15 character...
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union import dask.dataframe as dd import dask.delayed import pandas as pd from dask.dataframe.groupby import SeriesGroupBy import ibis.backends.pandas.execution.util as pd_util import ibis.common.exceptions as com import ibis.expr.operations as ops ...
#!/usr/bin/env python from sys import stdout,stderr,exit from optparse import OptionParser from os.path import basename, exists, isdir, join from itertools import combinations from multiprocessing import cpu_count from Bio import SeqIO from bisect import bisect import logging import csv import os LOG = logging.getLog...
""" Copyright (c) 2020 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 Unless required by applicable law or agreed to in writin...
import sys, math, os, io, re, copy import numpy as np from rfpimp import importances, plot_importances, plot_corr_heatmap, feature_corr_matrix from collections import Counter, defaultdict import scipy.stats as ss from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier, GradientBoostingClassifier from ...
#============================================================================== # Copyright 2011 Amazon.com, Inc. or its 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 ...
""" Mask R-CNN Train on the toy Balloon dataset and implement color splash effect. Copyright (c) 2018 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by <NAME> ------------------------------------------------------------ Usage: import the module (see Jupyter notebooks for examples),...
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # # # Overlay To Underlay Mapper # # Utility to get the Underlay information for the Overlay flow(s). # import json from sandesh.viz.constants import * from opserver_util import OpServerUtils class OverlayToUnderlayMapperError(Exception): """Ba...
# -*- coding: utf-8 -*- import os import requests from datetime import timedelta from six.moves.urllib.parse import urlparse, urljoin from flask import current_app, send_from_directory, render_template, abort, request from flask_assets import Bundle from flask_wtf.csrf import generate_csrf from coaster.utils import ma...
# Welcome to WelcomeBot. # Find source, documentation, etc here: https://github.com/shaunagm/WelcomeBot/ # Licensed https://creativecommons.org/licenses/by-sa/2.0/ # Import some necessary libraries. import select import sys import time import json import os.path import random import re import signal import ssl import...
# from abc import ABC, abstractmethod from copy import copy from typing import List import numpy as np from pyqtgraph import ImageView, PlotWidget, ErrorBarItem, ScatterPlotItem import pyqtgraph as pg from qtpy.QtCore import Signal from qtpy.QtWidgets import QWidget, QComboBox, QVBoxLayout from matplotlib import pypl...
import os import io import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from PIL import Image from pymongo import MongoClient from gridfs import GridFS client = MongoClient("mongodb://db:27017") db = client.accendo fs = GridFS(db) # define Gram Mat...
""" Test the numpy_conversions module This test file is in nilearn/tests because nosetests seems to ignore modules whose name starts with an underscore """ import numpy as np import os import tempfile from nose.tools import assert_true, assert_raises from nilearn._utils.numpy_conversions import as_ndarray, csv_to_ar...
################################################################################# # THE isinstance(SOFTWARE, PROVIDED) "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EV...
#!/usr/bin/env python import sys import os import wandb import socket import setproctitle import numpy as np from pathlib import Path from collections import deque import torch from onpolicy.config import get_config from onpolicy.envs.habitat.Habitat_Env import MultiHabitatEnv from onpolicy.envs.env_wrappers import ...
import argparse import gzip import io import logging import os import random import sys from os import path from QA_pairs import prep from SEReader import SEDataReader, POST_TYPE_QUESTION from nltk.corpus import stopwords logger = logging.getLogger('root') def read_questions(path): reader = S...
#!/usr/bin/env python """Calculates the measures for the PAN16 diarization task""" from __future__ import division import json import pan09 import os import getopt import sys evaluationOutputFileName = "evaluation.prototext" ########## INTRINSIC PLAGIARISM DETECTION EVALUATION ########## def g...
import pandas as pd from cv_experiment import * import sys import pdb import numpy as np from matplotlib import pyplot as plt """ - weights von mv linear - pertubation experiment auf mehr models - falsch klassifizierte dinger speichern und gucken ob es die gleichen sind """ MIR_names = ["spectral\nflux", "super\nflux...
from .rename import RENAME_MARKER from inspect import findsource, getframeinfo, getmodule, signature, stack, Traceback from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, TypeVar, Union __all__ = ['match', 'match_pred'] Val = TypeVar('Val') class MatchError(Exception): def __init__(self...
import numpy as np import pandas as pd import copy from collections import defaultdict import astropy.units as u from scipy.interpolate import UnivariateSpline from scipy import optimize from scipy.fftpack import fft from altaipony.altai import find_iterative_median from altaipony.utils import sigma_clip import m...
# # Copyright (c) 2021 salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause # """ The autoencoder-based anomaly detector for multivariate time series """ import torch import torc...
#!/usr/bin/env python # coding: utf-8 # # Author: <NAME> # URL: https://kazuto1011.github.io # Date: 07 January 2019 from __future__ import absolute_import, division, print_function import os from pathlib import Path import click import cv2 import matplotlib import matplotlib.cm as cm import matplotlib.pyplot as...
#!/usr/bin/env python -tt # -*- coding: utf-8 -*- # Author: <NAME> (alecsrad) # Author: <NAME> (rucarrol) # Purpose: Generate a table of common IX points between two ASNs. import argparse import requests from prettytable import PrettyTable from dataclasses import dataclass from ipaddress import IPv4Address, IPv6Addr...
import os import sys import shutil import numpy as np import time, datetime import torch import random import logging import argparse import torch.nn as nn import torch.utils import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.utils.data.distributed import timm from utils import * from ...
# Copyright (c) 2015 Intel Corpration # # 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 w...
""" Copyright 2018 <NAME>. 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, software distribut...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """ Pipeline helper class to create pipelines loading modules from a flexible manifest. """ from azure.ml.component import Component from dataclasses import dataclass, field import os import logging from typing import Optional, List, Tuple fro...
#!/Users/pongpisit/anaconda3/bin/python import snowboydecoder import sys import signal import Microphone import subprocess import getpass from subprocess import Popen, PIPE import os import vlc import pyttsx3 from random import randint import connectViaSocket as client interrupted = False def reduce_noise(): subp...
import json import os import sys import yaml from lib.common import connect, parse_profile, Context from pprint import pprint from pathlib import Path # # History related functions # def longest_name(histories: list): longest = 0 for history in histories: if len(history['name']) > longest: ...
from tkinter import * import tkinter.scrolledtext as tkst from tkinter.ttk import * from tkinter import messagebox from tkinter.font import Font, nametofont #from PIL import Image, ImageTk import datetime import os class textbox(Frame): def __init__(self, parent, orientation, message, ...