text
stringlengths
6.04k
39.5k
import torch import torchelie as tch import torchelie.utils as tu from torchelie.recipes.gan import GANRecipe import torchvision.transforms as TF import torchelie.loss.gan.standard as gan_loss from torchelie.loss.gan.penalty import zero_gp, R1 from torchelie.datasets.pix2pix import UnlabeledImages from torchelie.models...
import tensorflow as tf import numpy as np import cv2 import matplotlib.pyplot as plt from tensorflow_graphics.math.interpolation import bspline def get_trajectories(dataset): trajectories = [] avails = [] object_types = [] for i, batch in enumerate(dataset): future_states = tf.squeeze(batch['gt_future_st...
# coding: utf-8 # # Experimenting with how to do fdr correction on masked array # In[1]: import os from os.path import join as opj # from nipype.interfaces import afni import nibabel as nib import json import numpy as np import os from os.path import join as opj import itertools import nibabel as nib from multipr...
from typing import Union from qtpy.QtCore import Qt, QObject, Signal, QTimer from qtpy.QtWidgets import ( QWidget, QLabel, QComboBox, QSpinBox, QDoubleSpinBox, QLineEdit, QPushButton ) from superqt import QLabeledSlider from qtpy.QtWidgets import QFormLayout, QGridLayout, QGroupBox fro...
# Load from emBrick serial Module the connect class from emBRICK.modbus_rtu import connect # Here you can change with: # connect.port = "COM*" or "/dev/ttySC0" |your port # connect.unit_id = [1,2] |your connected nodes # connect.timeout = 0.1 | to change the Timeout for the Modbus Connection # connect.baudrate = 460800...
import random import math from typing import List import numpy as np import torch import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from sklearn import manifold, decomposition from scipy.stats import pearsonr from model import LSTMModel from joint_model import JointModel from irt.irt_trainin...
import logging import re import time from celery import chain from django.core.cache import cache from django.db import transaction from django.core.exceptions import ValidationError from cacheops import invalidate_model import app.ciscoeox.api_crawler as cisco_eox_api_crawler from app.ciscoeox.exception import CiscoA...
import datetime, json, os, uuid, urllib.request, urllib.error, re import flask, werkzeug.exceptions, cairosvg import mimetypes from flask import jsonify, request from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.web...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math import os import numpy as np from numpy import pi,cos,sin import pandas as pd import logging from plotnine import * from scipy.stats.mstats import winsorize from plotnine.stats.stat_summary import bootstrap_statistics #%% put PUPIL LABS data into PANDAS...
"""Pipes are composite Rules built out of Components. Components are text processing operations expressed as Python generators. """ import collections import re import itertools from ..core.recipe import Rule, RecipeFile, OptionalDep from ..core.utils import safe_zip, progress def apply_component(component, para=Fa...
import collections import datetime import os import shutil import tempfile import unittest import re try: from unittest.mock import patch except ImportError: from mock import patch import testing.postgresql from pgbackup import main from pgbackup import pg_utils from pgbackup import backup DAYS_PER_WEEK = 7...
# # record.py # Simple recorder and viewer element # from atom import Element from atom.messages import Response, LogLevel from threading import Thread import time import msgpack import os import matplotlib.pyplot as plt import numpy as np import math # Where to store temporary recordings TEMP_RECORDING_LOC = "/shar...
#!/usr/bin/python from slides import Lecture, Slide, Image, Bullet, PRE, URL, SubBullet, NumSlide, toHTML import os class Bad: """Marks the text in red.""" def __init__(self, text): self.text = text def toHTML(self): return '<font color="red">%s</font>' % toHTML(self.text) class Lectu...
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np import yfinance as yf from pandas_datareader import data as pdr import xlsxwriter import requests from yahoo_fin import stock_info as si import pickle import bs4 as bs # You need to change this to a convenient spot on your own...
# -*- coding: utf-8 -*- from __future__ import division import inspect from decimal import ROUND_DOWN, Decimal from django import VERSION from django.conf import settings from django.core.exceptions import ImproperlyConfigured, ValidationError from django.db import models from django.db.models import F from django.db...
from dataclasses import dataclass import os import json import re import click import pandas as pd from hashlib import sha256 from pandas import read_csv, DataFrame from cli_util import DipException from src import settings from flashtext import KeywordProcessor split_compiled = re.compile(r"\n|\s") WORDS_REGEX = r'...
import mtlogging import os import fnmatch from mountainclient import MountainClient from .mountainjob import MountainJob import json import inspect import multiprocessing from typing import Optional, List local_client = MountainClient() @mtlogging.log() def createJobs(proc, argslist, verbose=None) -> List[MountainJo...
import sqlalchemy import logging import os import sys import numpy as np import pandas as pd import pandas.io.sql from itertools import chain, product from functools import reduce from datetime import datetime, timedelta, date try: from repoze.lru import lru_cache except ImportError: from functools import lr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # """RAMSES RF - RAMSES-II compatible Message processor. Operates at the msg layer of: app - msg - pkt - h/w """ import asyncio import logging import signal from datetime import datetime as dt from datetime import timedelta as td from queue import Empty, Full, PriorityQu...
from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import WebDriverException from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selen...
# Copyright(c) 2020 <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,...
import copy import functools import random import re from collections import OrderedDict from random import Random from typing import Any, Callable, Dict, Hashable, List, Optional, Pattern, Sequence, Tuple, Union from .config import DEFAULT_LOCALE from .exceptions import UniquenessException from .factory import Facto...
from math import pi from traceback import print_exc from browser import doc, html from browser.timer import set_timeout, clear_timeout levels = { 1: '''......... .1.1.1.1. ......... .1.1.1.1. ......... .1.1.1.1. .........''', 2: '''123123123123 ...
# -*- coding: utf-8 -*- """ Colors ====== Provides a collection of :class:`~PyQt5.QtWidgets.QWidget` subclasses for handling colors in :mod:`~matplotlib`. """ # %% IMPORTS # Built-in imports from importlib import import_module from itertools import chain import re # Package imports from cmasher.utils import get_cm...
from PIL import Image import numpy as np import torch import os import argparse from torch import nn from skimage import exposure from skimage import img_as_float, transform def save_image(im, path): """ Saves a numpy matrix or PIL image as an image Args: im_as_arr (Numpy array): Matrix of sha...
import gzip import sys import os import argparse import subprocess import config_parser import re from binner_analysis import * from genfunc import * from checkm_analysis import * from novel_analysis import * from kraken_analysis import * # default to look for polish contig, if polished contig not exist, use unpoli...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ MIT License Copyright (c) 2021 <NAME> (<EMAIL>) https://github.com/schwanbeck/UMG_Antigen_Evaluator 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 Soft...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# -*- coding: utf-8 -*- # FlexRay configuration parameters definition, loading, saving, and conversion from python dict to c struct import struct from math import ceil, floor from constants import * default_fr_config = { # Cluster parameters, use naming convention in FLexRay spec 'gdMinPropagationDelay': 0.0,...
from filename_database.models import ExperimentType, ChargerDriveProfile, Category, SubCategory, ValidMetadata import re import datetime import itertools def guess_exp_type(file, root): """ This function takes a file as input and guesses what experiment type it is. :param file: :param root: :return...
from enum import IntEnum, IntFlag, auto from typing import Final, List, NamedTuple, Optional from ctypes import POINTER, byref, create_string_buffer, Structure from ctypes import c_uint, c_void_p, c_int, c_char_p, c_char, c_uint32 from .dll_loader import d2lib from . import OS_TYPE, FtHandle, Ok, Err, Result, FtStatus...
import os #from subprocess import call import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt def convertToFullCartersianCoordinates(data, dofsnp=np.array([18, 19, 20, 24, 25, 43]), dtype=int, x_dim_red=60, x_dim_original=66): dofs = dofsnp batch_size = data.shape[0] ...
""" View for document generator 3000 """ import json import re from django.contrib.auth.models import User from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from django.http import JsonResponse, HttpResponse, HttpResponseRedirect, FileResponse, Http404 from django.utils.translation import ...
import warnings; warnings.filterwarnings("ignore") from hyperopt import fmin, tpe, hp, STATUS_OK, STATUS_FAIL, Trials, space_eval # For surpressing print import os, sys print(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.abspath('bayesian_optimization/')) prepend_path = "bayesian_optimization/"...
import asyncio import enum import json import logging import random import time from asyncio.events import AbstractEventLoop from concurrent.futures import ThreadPoolExecutor from functools import partial from json.decoder import JSONDecodeError from mmap import ACCESS_WRITE, mmap from pathlib import Path from typing i...
# -*- coding: utf-8 -*- # # STS spectrometer # ================ # # To implement further functionality you basically just need to look at # the two communication layer functions: # self._send_command and self._query_data # # based on those you can implement other commands. # call them with the right message constant i...
import json import os,sys,platform,time from base64 import b64encode from datetime import datetime import re import lxml import lxml.html import lxml.etree import html import urllib.parse from collections import OrderedDict from collections import Mapping from xmljson import BadgerFish import io def getResourceFolder...
""" oct 2009 - multiple output files Dear Matthias, Yes, you can define number of outputs dynamically in Galaxy. For doing this, you'll have to declare one output dataset in your xml and pass its ID ($out_file.id) to your python script. Also, set force_history_refresh="True" in your tool tag in xml, like this: <tool ...
import numpy as np import networkx as nx import pextant_cpp from .SEXTANTsolver import sextantSearch, SEXTANTSolver, sextantSearchList from .astar import aStarSearchNode, aStarNodeCollection, aStarCostFunction, aStarSearch from pextant.EnvironmentalModel import EnvironmentalModel, GridMeshModel from pextant.lib.geoshap...
import matplotlib matplotlib.use('Agg') import os import time import itertools import json import requests from flask import Blueprint, request, jsonify, render_template, make_response, send_file from flask_jwt_extended import jwt_required from utils.connect import client, db, fs from itertools import chain from collec...
# Plex IPTV plug-in that plays live streams (like IPTV) from a M3U playlist # Copyright © 2013-2018 <NAME> # 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 #...
# -*- coding:utf-8 -*- from __future__ import unicode_literals from future.builtins import map from future.builtins import str from future.builtins import object from future.utils import with_metaclass import re from copy import copy from limpyd import model, fields from limpyd.exceptions import * from limpyd.contrib...
from typing import Iterable, List, Optional, Set, Tuple import numpy as np from text_utils.language import Language from text_utils.pronunciation.ipa_symbols import (APPENDIX, CHARACTERS, CONSONANTS, ENG_ARPA_DIPHTONGS,...
# -*- coding:utf-8 -*- # # Tencent is pleased to support the open source community by making QTA available. # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may not use this # file except in compliance with the License. You may ...
from flask import Flask,render_template, abort, request, redirect, url_for, current_app,session, flash, get_flashed_messages from flask_pymongo import PyMongo from jinja2 import TemplateNotFound from flask_wtf import FlaskForm from wtforms import StringField, SelectMultipleField, SubmitField, TextAreaField, IntegerFiel...
import datetime from collections import OrderedDict from django import forms from django.conf import settings from django.contrib import admin from django.contrib.admin.filters import SimpleListFilter from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.utils import get_model_fr...
""" Base Request Handlers """ import asyncio import datetime import logging import typing import uuid from email import utils import jsonpatch import problemdetails import sprockets_postgres as postgres from openapi_core.deserializing.exceptions import DeserializeError from openapi_core.schema.media_types.exceptions ...
# 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...
import itertools import string import numpy as np from numpy import random import pytest import pandas.util._test_decorators as td from pandas import DataFrame, MultiIndex, Series, date_range, timedelta_range import pandas._testing as tm from pandas.tests.plotting.common import TestPlotBase, _check_plot_works impor...
"""Delay space spectrum estimation and filtering. """ import numpy as np import scipy.linalg as la from caput import mpiarray, config from cora.util import units from ..core import containers, task, io from ..util import random class DelayFilter(task.SingleTask): """Remove delays less than a given threshold. ...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 <NAME> # Copyright (c) 2012 NTT DOCOMO, INC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
import numpy as np import pickle import logging import random import os import os.path import errno from pandas import DataFrame import sys from timeit import default_timer as timer from datetime import timedelta import traceback from statsmodels.distributions.empirical_distribution import ECDF import ranking from ran...
""" module: setupcfg.py """ # Stdlib imports import argparse import atexit import logging import logging.config import os import pkgutil import sys import warnings from pathlib import Path from time import localtime, strftime # Third-party app imports import confuse # Initialize config with your app import errorhandl...
# Copyright 2013 IBM Corp. # # 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 agree...
#!/usr/bin/env python2.7 # coding=utf-8 """ Sopel - An IRC Bot Copyright 2008, <NAME>, inamidst.com Copyright © 2012-2014, <NAME> <<EMAIL>> Licensed under the Eiffel Forum License 2. https://sopel.chat """ from __future__ import unicode_literals, absolute_import, print_function, division import argparse import os imp...
import torch import torch.nn as nn import torch.nn.functional as F import math import numpy as np from scipy import signal from scipy import linalg as la from functools import partial from model.rnncell import RNNCell from model.orthogonalcell import OrthogonalLinear from model.components import Gate, Linear_, Modrelu...
# Data Parallel Control (dpctl) # # Copyright 2020-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....
from enum import Enum import logging import binascii from blatann.nrf.nrf_dll_load import driver import blatann.nrf.nrf_driver_types as util from blatann.nrf.nrf_types.enums import * from blatann.nrf.nrf_types.gap import BLEGapAddr logger = logging.getLogger(__name__) class BLEGapSecMode(object): d...
""" Clean a DataFrame column containing duplicate values. """ from typing import Tuple, List, Dict, Any, Union from ipywidgets.widgets import Label, Dropdown, Checkbox, Button, HBox, VBox, Box, Layout, Text import pandas as pd import dask.dataframe as dd from .clean_duplication_utils import Clusterer DEFAULT_NGRAM ...
import logging from typing import Type, List, Union, Tuple, Optional import torch import numpy as np from pathlib import Path from farm.infer import Inferencer from haystack.document_store.base import BaseDocumentStore from haystack import Document from haystack.document_store.elasticsearch import ElasticsearchDocume...
import sys from pyHGT.data import * from pyHGT.model import * from warnings import filterwarnings filterwarnings("ignore") import argparse parser = argparse.ArgumentParser(description='Training GNN on Author Disambiguation task') ''' Dataset arguments ''' parser.add_argument('--data_dir', type=str, default='./da...
# Copyright 2008-2012 Nokia Siemens Networks Oyj # # 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...
import numpy as np from math import sqrt import time import multiprocessing import copy from functools import partial from datetime import date import matplotlib.pyplot as plt import matplotlib from ROAI_class import ROAI, RANDOM, RR, WRR # this function is used to generate the instance def single_run_RR(instance,...
from __future__ import annotations from enum import Enum import logging import copy log = logging.getLogger(__name__) class TagType(Enum): REQUIRE = 2 PREFER = 1 ACCEPT = 0 REJECT = -1 def __int__(self): return self.value class Tag: def __init__(self, name, value, tag_type: Enum...
import itertools import json import warnings from pathlib import Path from typing import Any, Dict, Generator, Iterable, Optional, Type, Union import yaml from lhotse.utils import Pathlike, is_module_available from lhotse.workarounds import gzip_open_robust # TODO: figure out how to use some sort of typing stubs # ...
# ActivitySim # See full license in LICENSE.txt. import os import shutil import logging import yaml import pandas as pd from activitysim.core import config from activitysim.core import simulate from activitysim.core.util import reindex from activitysim.abm.models.util import canonical_ids as cid logger = logging...
"""Implementation of GRU-D model. The below implementation is based on and adapted from https://github.com/PeterChe1990/GRU-D Which is published unter the MIT licence. """ from collections.abc import Sequence from collections import namedtuple import tensorflow as tf from tensorflow.keras import backend as K from ten...
import functools import operator import os import re try: import simplejson as json except ImportError: import json from flask import Blueprint from flask import Response from flask import abort from flask import flash from flask import redirect from flask import render_template from flask import request from ...
""" SOM-VAE model as described in https://arxiv.org/abs/1806.02199 Copyright (c) 2018 Author: <NAME> Institution: Biomedical Informatics group, ETH Zurich License: MIT License """ import functools import numpy as np import tensorflow as tf def weight_variable(shape, name): """Creates a TensorFlow Variable with a...
import functools import operator import sys import warnings import numbers from collections import namedtuple import inspect import math import numpy as np try: from numpy.random import Generator as Generator except ImportError: class Generator(): # type: ignore[no-redef] pass def _lazywhere(cond, ...
import numpy as np from mayavi import mlab def sectional2nodal(x): return np.r_[x[0], np.convolve(x, [0.5, 0.5], "valid"), x[-1]] def nodal2sectional(x): return 0.5 * (x[:-1] + x[1:]) def set_axes_equal(ax): """Make axes of 3D plot have equal scale so that spheres appear as spheres, cubes as cubes...
# coding: utf-8 # pylint: disable=invalid-name, no-member, too-many-arguments # pylint: disable=too-many-instance-attributes, too-many-locals # pylint: disable=arguments-differ """ dynamic EIT solver using JAC """ # Copyright (c) <NAME>. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt fo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is the 1st assignment in the Global Internship Program at HDE. The target is a Twitter clone with basic functions. Project name: pposter Developer: <NAME> Date: 10 Nov 2015 """ # set this variable to "threading", "eventlet" or "gevent" to test the # different asy...
import os from os import path from dotenv import load_dotenv from bs4 import BeautifulSoup as bsp import requests as rq import re import psycopg2 as pg2 from psycopg2 import sql import time #################################### Basics ################################### # Remove all file contents before writing anyth...
import numpy as np import datetime import time ts = time.time() timestamp = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S').replace(' ', '-').replace(':', '-') import os os.environ["OMP_NUM_THREADS"] = "4" # export OMP_NUM_THREADS=4 os.environ["OPENBLAS_NUM_THREADS"] = "4" # export OPENBLAS_NUM_THREA...
""" Get the absolute timing of the pulses by use of the gps time Calculate also a non hex representation of leading and falling edges of the pulses """ # for the pulses # 8 bits give a hex number # but only the first 5 bits are used for the pulses time, # the fifth bit flags if the pulse is considered valid # the se...
# mbed SDK # Copyright (c) 2011-2013 ARM Limited # # 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 ag...
""" Functions for processing input commands. All global functions in this module whose name does not start with "_" is considered an inputfunc. Each function must have the following callsign (where inputfunc name is always lower-case, no matter what the OOB input name looked like): inputfunc(session, *args, **kwa...
# # 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 us...
""" This file defines actions, i.e. functions the URLs are mapped into The @action(path) decorator exposed the function at URL: http://127.0.0.1:8000/{app_name}/{path} If app_name == '_default' then simply http://127.0.0.1:8000/{path} If path == 'index' it can be omitted: http://127.0.0.1:8000/ The pa...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import time import wandb import numpy as np from functools import reduce from itertools import chain import torch from onpolicy.runner.separated.base_runner_multitype import Runner def _t2n(x): return x.detach().cpu().numpy() class SMACRunner(Runner): """Runner class to perform training, evaluation. and dat...
# Copyright 2020–2021 Cirq on IQM developers # # 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...
import igl import numpy as np import mpmath as mp import os import argparse import matplotlib.pyplot as plt from conformal_py import * from overload_math import * from render import * from collections import namedtuple from copy import deepcopy import meshplot as meshp import pickle RenderInfo = namedtuple('RenderInfo...
# Derived from cpython/Lib/http/server.py. # Changes dedicated to the public domain under CC0: https://creativecommons.org/publicdomain/zero/1.0/. import mimetypes import sys import time from email.utils import formatdate as format_email_date from html import escape as html_escape from http import HTTPStatus from http...
# <NAME>, <EMAIL> # Copyright 2012 Mandiant # # Mandiant licenses this file to you 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...
#!/usr/bin/env python from __future__ import print_function import numpy as np import pandas as pd import argparse import sys import itertools import re def get_segment_range(bin_start, bin_end): return range(int(bin_start), int(bin_end)+1) def get_1D_peak(segment_range, MACS2_peak_ranges_list): for segment i...
#!/usr/bin/env python3 # 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. r""" Batch Knowledge Gradient (KG) via one-shot optimization as introduced in [Balandat2019botorch]_. For broader discu...
import os import copy import glob import json import logging import typing from django.db.models import Q, Model from django.db.models.signals import post_save from .. import settings from ..data.models import LegislativeSession, Person, Bill from ..exceptions import DuplicateItemError, UnresolvedIdError, DataImportErr...
# -*- coding: utf-8 -*- """A searcher to find file entries within a file system.""" import re import sre_constants from dfvfs.lib import definitions from dfvfs.lib import errors from dfvfs.lib import glob2regex from dfvfs.lib import decorators from dfvfs.path import factory as path_spec_factory class FindSpec(objec...
import copy import logging import warnings from typing import List, Optional, Set, Union, Sequence from slack_sdk.models import show_unknown_key_warning from slack_sdk.models.basic_objects import ( JsonObject, JsonValidator, ) from slack_sdk.models.messages import Link ButtonStyles = {"danger", "primary"} Dyn...
import cv2 import numpy as np import glob from scipy.stats import multivariate_normal import copy out = cv2.VideoWriter('3D_GMM.avi', cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), 5, (640, 480)) DATASET = "DETECTBUOY-FRAMES/Data" def Ellipse_Fit(mask): processed = mask.astype(np.uint8) processed = cv2....
#!/usr/bin/env python # coding: utf-8 # - In this notebook - # - generate random edits of type (s',r',o') and (s',r',o') # - i.e. generate totally random edits, not restricted to the neighboourhood of target triple # - this random baseline is needed for comparison with decoy composition where edits are n...
import splat.simulate as spsim import splat.evolve as spev from .config import DATA_FOLDER, POLYNOMIALS, EVOL_MODELS_FOLDER, FIGURES from .tools import teff_to_spt, teff_from_spt from .abs_mags import get_abs_mag, get_teff_from_mag, get_teff_from_mag_ignore_unc #import pymc3 as pm from scipy.interpolate import griddat...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. r""" This module allows obtaining standard models for benchmarking attribution methods. The models can be obtained via the function :func:`get_model`. The function can edit models slightly to make them compatible with benchmarks. Optional modific...
import configparser from datetime import datetime from math import cos from skimage import filters from skimage import measure from math import radians from scipy.interpolate import splprep, splev import numpy as np import pandas as pd import scipy.ndimage as img """ Tools to manipulate and analyze data """ def can...
from abc import ABC, abstractmethod import os import getpass import yaml import copy import numpy as np from .utils import (get_time, get_datetime, create_unique_folder, benchmark_matrix_inverse, benchmark_sha_hashing) from .procedures import Procedure from .functions import TestFunction, MLFunctio...
import sys,os import numpy as np import tqdm from PyQt5.QtWidgets import QApplication, QLineEdit, QFileDialog, QDialog,QVBoxLayout,QMessageBox,QCheckBox from PyQt5 import QtGui from PyQt5 import QtCore, QtWidgets import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt from matplotlib.backends.backe...
#! /usr/bin/python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # ****************************************************************************** # * Licensed Materials - Property of IBM # * IBM Cloud Container Service, 5737-D43 # * (C) Copyright IBM Corp. 2017, 2018 All Rights Reserved. # * US Government Users Restricte...
# pylint: disable=missing-module-docstring,import-error,protected-access,missing-function-docstring import datetime import json import os import pathlib import shutil import sys import tempfile import nox from nox.command import CommandFailed from nox.virtualenv import VirtualEnv # Nox options # Reuse existing virtu...