text
stringlengths
6.04k
39.5k
""" Utility functions. """ from typing import ( Any, Union, Iterable, Iterator, Set, Dict, List, Tuple, NamedTuple, ) from pathlib import Path import warnings import importlib import pkgutil import codecs import re from collections import deque, defaultdict from functools import wr...
# coding=utf-8 # Copyright 2018 The TF-Agents 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...
import argparse import os import logging import sys import itertools import torch import torch.nn as nn from torch.utils.data import DataLoader, ConcatDataset from torch.optim.lr_scheduler import CosineAnnealingLR, MultiStepLR from detection_configuration import load_model_configuration from vision.utils....
from typing import Tuple from CommonServerPython import * # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' CONSTANTS ''' INTEGRATION_NAME = 'FireEye Central Management' INTEGRATION_COMMAND_NAME = 'fireeye-cm' INTEGRATION_CONTEXT_NAME = 'FireEyeCM' DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' # ISO...
# FASTQFile.py: read and manipulate FASTQ files and data # Copyright (C) University of Manchester 2012-2020 <NAME> # ######################################################################## # # FASTQFile.py # ######################################################################### """ A set of classes for rea...
# -*- coding: utf-8 -*- """ Created on Wed Jun 17 12:06:45 2020 @author: biomet """ import numpy as np import pandas as pd import scipy as sp from statsmodels.stats.multitest import fdrcorrection import itertools from scipy import interp from itertools import cycle from sklearn.utils import check_rand...
# -*- coding: UTF-8 -*- # A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2006-2020 NV Access Limited, <NAME>, <NAME>, <NAME> # This file is covered by the GNU General Public License. # See the file COPYING for more details. """App module for Windows Explorer (aka Windows shell and renamed to File Expl...
# Copyright (c) 2019-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
""" CoNLL-2011/2012 scores for coreference detection. ## References - **Scoring Coreference Partitions of Predicted Mentions: A Reference Implementation.** <NAME>, <NAME>, <NAME>, <NAME>, <NAME> and <NAME>. *Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics*, Baltimore, MD, June...
# -*- coding: utf-8 -*- r""" Compute invariants of quintics and sextics via 'Ueberschiebung' .. TODO:: * Implement invariants in small positive characteristic. * Cardona-Quer and additional invariants for classifying automorphism groups. AUTHOR: - <NAME> """ from sage.rings.all import ZZ from sage.rings.a...
# -*- coding: utf-8 -*- import logging from collections import OrderedDict from elasticsearch_dsl.search import Q from elasticsearch_dsl import connections, Object, Document, Index, Nested, \ InnerDoc, Integer, Text, Boolean, Ip, Date, Search from elasticsearch.helpers import reindex from parsedmarc.utils impor...
#Hacking arts - <NAME> # Nov. 11, 2017 import sys sys.path.append('..') from common.core import * from common.audio import * from common.synth import * from common.gfxutil import * from common.clock import * from common.metro import * from common.noteseq import * import random import demo_chords MYPY = False if M...
"""Methods to calculate internal coordinates from the cartesian coordinates""" import numpy as np import scipy.linalg from itertools import combinations, ifilter import logging from contact import atom_distances from dihedral import compute_dihedrals from angle import bond_angles from scipy.spatial.distance import sq...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ************************************************************************** python ontofetch.py [owl ontology file path or URL] Ontology term fetch to tabular or json output Author: <NAME> Ontology() class __main__() reads in given ontology file via path or URL an...
"""The Latticework AmberOS component.""" from __future__ import annotations import asyncio from collections.abc import Callable from datetime import timedelta import logging from typing import Any from homeassistant.core import HomeAssistant, ServiceCall, callback from homeassistant.config_entries import ConfigEntry ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 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 Licen...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import matplotlib.patches as mp import matplotlib.dates as md import matplotlib.ticker as ticker from yattag import Doc import base64 import numpy as np import datetime import time import gc import math import smtplib import ssl from email.mime.tex...
# Basic imports import matplotlib.pyplot as plt import matplotlib.lines as mlines from matplotlib.lines import Line2D import numpy as np import pandas as pd # Advanced imports from sklearn.preprocessing import scale, StandardScaler from sklearn.model_selection import train_test_split from sklearn.neural_network impo...
import os import matplotlib.patches as patches import matplotlib.pyplot as plt import numpy as np from IPython.core.display import HTML from ipywidgets import widgets, Layout from IPython.core.display import display from NeuNorm.normalization import Normalization from NeuNorm.roi import ROI from __code import utilit...
""" img.py ====== Helper functions for working with images. Created by <NAME> (email: <EMAIL>) """ from typing import Tuple, Optional, Dict, Union, List from collections import OrderedDict import numpy as np import cv2 from scipy import fftpack, ndimage from sklearn.feature_extraction.image import extract_patches_2d...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
from __future__ import unicode_literals import datetime import inspect import json import os import re from io import BytesIO import string from xml.etree.ElementTree import ParseError from xml.etree import ElementTree import jsonschema import lxml from lxml.etree import XMLSyntaxError import lxml.html from lxml.csss...
import unittest import json import base64 import hashlib import hmac from django.conf import settings if not settings.configured: settings.configure() from django.contrib.sites.models import Site from django.test.utils import override_settings from unittest import TestCase try: from unittest import mock excep...
####################################################################### # Name: scoping.providers.py # Purpose: Meta-model / scope providers. # Author: <NAME> # License: MIT License ####################################################################### from os.path import dirname, abspath, join from textx.exceptions ...
from __future__ import division, absolute_import __copyright__ = "Copyright (C) 2012 <NAME>" __license__ = """ 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 witho...
# Author: <NAME> # Build on top of the monodepth2 # (Automatically pulled from git repo, monodepth2 source code is not included in this repository) # This is the training script of the MonoDEVSNet framework. # MonoDEVSNet: Monocular Depth Estimation through Virtual-world Supervision and Real-world SfM Self-Supervision ...
r""" Crystal of Rigged Configurations AUTHORS: - <NAME> (2010-09-26): Initial version We only consider the highest weight crystal structure, not the Kirillov-Reshetikhin structure, and we extend this to symmetrizable types. """ #***************************************************************************** # C...
""" Factory methods to build Data objects from files""" """ Implementation notes: Each factory method conforms to the folowing structure, which helps the GUI Frontend easily load data: 1) The first argument is a file name to open 2) The return value is a Data object 3) The function has a .label attribute that desc...
# -*- coding: utf-8 -*- """ @file @brief Quelques problèmes récurrents avec `matplotlib <http://matplotlib.org/>`_. """ import numpy def graph_style(style='ggplot'): """ Changes :epkg:`matplotlib` style. @param style style .. faqref:: :tag: matplotlib :title: Changer le st...
# -*- coding: utf-8 -*- """ /*------------------------------------------------------* | Spatial Uncertainty Research Framework | | | | Author: <NAME>, UC Berkeley, <EMAIL> | | | | Date: 07/11/...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Nipype : Neuroimaging in Python pipelines and interfaces package. Nipype intends to create python interfaces to other neuroimaging packages and create an API for specifying a full ...
# mysql/reflection.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: http://www.opensource.org/licenses/mit-license.php import re from .enumerated import _EnumeratedValues from .enumerated import SET...
# tests for llc_rearrange.py import pytest import numpy as _np import sys sys.path.append('/Users/Mikejmnez/llc_transformations/llc_rearrange/') from LLC_rearrange import LLCtransformation as LLC from LLC_rearrange import make_chunks, make_array, pos_chunks, chunk_sizes, face_connect, arct_connect, init_vars from LLC_r...
from __future__ import print_function from collections import defaultdict import boto3 import json import argparse import time import os import re """ Copyright 2018, 2019 Signal Media Ltd ECS service discovery for tasks. Please enable it by setting env variable PROMETHEUS to "true". Metric path and scape interval i...
from webrecorder.basecontroller import BaseController from tempfile import SpooledTemporaryFile, NamedTemporaryFile from bottle import request from warcio.archiveiterator import ArchiveIterator from warcio.limitreader import LimitReader from har2warc.har2warc import HarParser from warcio.warcwriter import BufferWARCW...
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: movie.py # # Tests: Tests various aspects of "visit -movie" movie-making. # # Notes: # # Programmer: <NAME> # Date: Fri Sep 18 17:29:49 PDT 2015 # # Modifications: # <NAME>, Tue ...
import inspect from flask_apispec import use_kwargs, marshal_with, doc, MethodResource, Ref from marshmallow import Schema, fields from sqlalchemy import desc, asc, not_, or_, and_ from .exceptions import ConflictError, ValidationError from .schemas import ResponseWrapper, DjangoPageSchema, error_response, val_error_...
# -*- coding: utf-8 -*- """ Unfinished non-wbia dependent version of interact matches """ import utool as ut import numpy as np from wbia.plottool import abstract_interaction BASE_CLASS = abstract_interaction.AbstractInteraction # TODO: move to plottool and decouple with IBEIS # TODO: abstract interaction @ut.reload...
from __future__ import unicode_literals from django.db import models # from django.contrib.auth.models import AbstractUser # from django.contrib.auth.models import User # from django.dispatch import receiver # from django.db.models.signals import post_save from django.urls import reverse import uuid from django.contrib...
# -*- coding: utf-8 -*- import base64 import itertools import functools from datetime import datetime import traceback from PyQt5.QtCore import QByteArray, QTimer from PyQt5.QtNetwork import ( QNetworkAccessManager, QNetworkProxyQuery, QNetworkRequest, QNetworkReply ) from twisted.python import log fr...
import discord import random import time import datetime as dt from discord.ext import commands from urllib.parse import unquote #from html.parser import HTMLParser import html from Cogs import DL, Message def setup(bot): settings = bot.get_cog("Settings") bot.add_cog(Comic(bot, settings)) c...
# encoding: utf-8 import datetime import logging from sqlalchemy.sql import and_, or_ from sqlalchemy import orm, types, Column, Table, ForeignKey from ckan.common import config from ckan.model import ( meta, core, license as _license, types as _types, domain_object, activity, extension, ...
"""This module contains the available structural response functions and their base class""" from __future__ import print_function, absolute_import, division # importing the Kratos Library import KratosMultiphysics from KratosMultiphysics import Parameters, Logger import KratosMultiphysics.StructuralMechanicsApplicatio...
# =========================================================================== # Some functions in this module adpats the idea from: Lasagne library # Original idea Copyright (c) 2014-2015 Lasagne contributors # Modified work Copyright 2016-2017 TrungNT # =================================================================...
# Owner(s): ["module: nn"] import inspect import torch from unittest import mock from unittest.mock import MagicMock, patch from torch.testing import floating_types from torch.testing._internal.common_device_type import instantiate_device_type_tests, dtypes from torch.testing._internal.common_quantization import skipI...
""" Module containing common classes """ # # 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, ...
from pylabnet.network.client_server import si_tt from pylabnet.utils.logging.logger import LogClient, LogHandler from pylabnet.gui.igui.iplot import SingleTraceFig, MultiTraceFig from pylabnet.gui.pyqt.external_gui import Window from pylabnet.utils.helper_methods import (generic_save, get_gui_widgets, ...
''' --------------------------- Licensing and Distribution --------------------------- Program name: Q2DTor Version : 2020.1 License : MIT/x11 Copyright (c) 2020, <NAME> (<EMAIL>) and <NAME> (<EMAIL>) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associat...
# (c) Copyright IBM Corp. 2010, 2017. All Rights Reserved. """Pytest Fixture for Testing Resilient Circuits Components""" from __future__ import print_function import os import sys import time import calendar import json import traceback import logging import pytest from pytest_resilient_circuits.circuits_fixtures im...
#!/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. import collections import itertools import logging import unittest import crypten import torch import torch.nn as nn...
#!/usr/bin/python3 #import threading from time import sleep #import urllib.request import subprocess import re import sys import os import cgi import datetime #from pushover import Client #client = Client("ucGDF9dXuEPgUmNFWoGvGxKj9KVEgx", api_token="<KEY>") # NEED BETTER LOGGING topPoints = {} magdic = {} def log(l...
import os.path import typing import warnings from abc import abstractmethod from contextlib import suppress from io import BytesIO from pathlib import Path from threading import Lock import numpy as np import tifffile.tifffile from czifile.czifile import CziFile from defusedxml import ElementTree from oiffile import O...
# -*- coding: utf-8 -*- """ ORM for sqlite3 like Django ORM. Usage: >>>from datetime import datetime >>>import database >>>db = database.Sqlite('blog.db') >>>class Post(db.Model): ... title = database.CharField(20) ...
from psyneulink.core import llvm as pnlvm __all__ = ['AdamOptimizer','SGDOptimizer'] class Optimizer(): def __init__(self, pytorch_model): self._pytorch_model = pytorch_model self._composition = pytorch_model._composition self._structs = [] self._DELTA_W_NUM = 0 # gets the ...
# %%[markdown] # Author: <NAME> # # Email: [<EMAIL>](mailto:<EMAIL>) # %%[markdown] # Content: # * Load the model comparison examples from AutoMATES/UAriz # * Plot results # %% import os import json import networkx as nx import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from typing import D...
# -*- coding: utf-8 -*- """PyOBO's Resolution Service. Run with ``python -m pyobo.apps.resolver`` """ import gzip import logging import os import sys from collections import Counter, defaultdict from functools import lru_cache from typing import Any, List, Mapping, Optional, Union import click import pandas as pd i...
# import numpy in two ways, both uses needed import numpy as np import numpy import unittest from numba import njit, jit from numba.core.errors import TypingError, UnsupportedError from numba.core import ir from numba.tests.support import TestCase, IRPreservingTestPipeline class TestClosure(TestCase): def run_j...
import time import numpy as np import torch import logging from torch import optim from torch.optim import lr_scheduler from torch.utils.data.sampler import SubsetRandomSampler from torchvision import datasets from matplotlib import pyplot as plt from PIL import Image import os import re import sys import csv import...
import uuid import random import time from datetime import datetime, timedelta import sentry_sdk from sentry_sdk.utils import logger from sentry_sdk._types import MYPY if MYPY: import typing from typing import Optional from typing import Any from typing import Dict from typing import List ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2018 <NAME> """ generic ray optics commands for creating plots and tables .. Created on Thu Nov 8 21:21:57 2018 .. codeauthor: <NAME> """ import math import pathlib from opticalglass import glassmap as gm from opticalglass import glassfactory as gfact i...
from __future__ import absolute_import from __future__ import with_statement import sys import socket from datetime import datetime, timedelta from kombu import pidbox from mock import Mock, patch from celery import current_app from celery.datastructures import AttributeDict from celery.task import task from celery...
# -*- coding: utf-8 -*- """ PARASCHUT: parallel job scheduling utils. see also: README.md, example.ipynb this submodule handles job submission and monitoring. @author: <NAME>, Tuller Lab Created on Wed Mar 18 22:45:50 2015 """ from collections import Counter import os import shutil import time import warnings import...
import datetime import hashlib import io import logging import math import random from typing import List, Dict, Tuple, Set, Union import bitarray import trio import bencode import display import file_manager import messages import peer_connection import requests import peer_state from token_bucket import NullBucket,...
__docformat__ = 'reStructuredText en' import setpath import json from hashlib import md5 from binascii import b2a_base64 import math import collections import functions class graphpowerhash: """ .. function:: graphpowerhash(steps, [undirected_edge], node1, node2, [node1_details, edge_details, node2_details]) ...
#!/usr/bin/env python3 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2014 California Institute of Technology. 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...
""" This file is part of the repo: https://github.com/tencent-ailab/hifi3dface If you find the code useful, please cite our paper: "High-Fidelity 3D Digital Human Creation from RGB-D Selfies." <NAME>*, <NAME>*, <NAME>*, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, and <NAME>. arXiv: https://arxiv.org/abs/2010.05...
from __future__ import division, print_function from os.path import join import os import sys import helpers import textwrap import load_data2 as ld2 import match_chips2 as mc2 import report_results2 as rr2 import draw_func2 as df2 import vizualizations as viz import params import itertools import numpy as np import db...
import os import random from tqdm import tqdm from glob import glob import torch import numpy as np from scipy import linalg import zipfile import cleanfid from cleanfid.utils import * from cleanfid.features import build_feature_extractor, get_reference_statistics from cleanfid.resize import * """ Numpy implementatio...
# coding: utf8 """ Viewer classes Original author: <NAME> """ from tkinter import * from tkinter import ttk from tkinter import messagebox from tkinter.filedialog import * import PIL from PIL import ImageTk, Image, ImageOps from PIL.Image import * from PIL.Image import BOX, LINEAR, NEAREST, EXTENT, fromarray import num...
import splitfolders import tensorflow as tf gpus = tf.config.list_physical_devices('GPU') try: for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) except RuntimeError as e: print(e) import numpy as np import matplotlib.pyplot as plt from collections import Counter from tensorflow.kera...
import numpy as np import tensorflow as tf import tensorlayer as tl # CNN based on specified depth, width and hyper-parameters def deepnn(x, fsize, ldepth, lwidth, bn=True, act=0, itype=4, tb=True, training=True): B = 3 keep_prob = tf.placeholder(tf.float32) network = x blockc = (np.floor(ldepth[0]/B)*np.one...
"""The invest_natcap.testing package defines core testing routines and functionality.""" import os import logging import codecs import re from types import StringType import invest_natcap import pygeoprocessing.geoprocessing import table_generator LOGGER = logging.getLogger('invest_natcap.reporting') REPORTING_DATA ...
"""Test InterpIdw_py.cpp.""" import unittest import numpy as np from xms.core.misc import Observer from xms.interp.interpolate import InterpIdw class MockObserver(Observer): """Mock Observer class for testing.""" def __init__(self, obs_id="X"): """Constructor. Args: obs_id (str...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Apr 10 22:15:17 2021 @author: jmontp """ import numpy as np import pandas as pd import pickle from sklearn.decomposition import PCA #Relative Imports from .context import math_utils #Set test assert_pd for speed boost math_utils.test_pd = False ...
# Copyright 2017 ProjectQ-Framework (www.projectq.ch) # # 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 app...
# Example of detecting and reading a block from a MiFare NFC card. # Author: <NAME> (<EMAIL>) # # Copyright (c) 2016 <NAME> # # MIT License # # 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 w...
from __future__ import print_function import json import optparse import sqlite3 import sys version = "0.4.0" gene_count = 0 class Sequence(object): def __init__(self, header, sequence_parts): self.header = header self.sequence_parts = sequence_parts self._sequence = None @property ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import datetime import calendar from django.contrib import messages from django.db import models as db from django.http import HttpResp...
import sys import glob import os import json from Training.Client import ServiceClient import Training.Stanford import Training.OpenNLP import Training.GATE import TokenType """ This is the Feature Library which will take the input files and user selected features. It will determine the sequence of pipeline to be cal...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Providing a common interface for simulating amino acid sequences using various simulation programs. At this stage, the module only support simulate sequences using EVOLVER (inside PAML program) and Seq-Gen. The minimum requirement of this interface asks users to provi...
# Copyright (c) ByteDance, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import datetime import numpy as np import os import time import random import torch import torch.nn as nn ...
""" Band math related tests against both - 0.4.0-style ImageCollectionClient - 1.0.0-style DataCube """ import numpy as np import pytest from openeo.rest import BandMathException from .. import get_download_graph from ..conftest import reset_graphbuilder from ... import load_json_resource from .test_datacube import...
""" Django REST Framework serializers for the User API Accounts sub-application """ import json import logging import re from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.exceptions import ObjectDoesNotExist from django.u...
import cv2 import time import math import statistics import autograd.numpy as np #import numpy as np from autograd import grad import matplotlib.pyplot as plt import itertools import random from Lane_finder import line_compare from Lidar_tools_AG import coords_ro_move_2D, build_rotation_matrix_2D def to...
# -*- coding: utf-8 -*- # Copyright (c) 2020 Nekokatt # Copyright (c) 2021-present davfsa # # 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 t...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
import warnings import logging import numpy as np from scipy import ndimage from ..masks import slice_image, mask_image from ..find import grey_dilation, drop_close from ..utils import (default_pos_columns, is_isotropic, validate_tuple, pandas_concat) from ..preprocessing import bandpass from ..r...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ HTTP Proxy Server in Python. :copyright: (c) 2013 by <NAME>. :license: BSD, see LICENSE for more details. """ VERSION = (0, 2) __version__ = '.'.join(map(str, VERSION[0:2])) __description__ = 'HTTP Proxy Server in Python' ...
import logging import sys import pandas as pd import pyprind import six import warnings from joblib import Parallel, delayed from collections import deque, OrderedDict import heapq from itertools import chain import py_entitymatching.catalog.catalog_manager as cm from py_entitymatching.blocker.blocker import Blocker ...
# # Copyright <NAME> 2009 # """ Code to implement a test harness. """ import corebio.seq_io.fasta_io, os, logging, hmm, cPickle, numpy as N, sys, numpy.random as R from hmm.pssm import seq_to_numpy, numpy_to_seq from optparse import OptionParser from cookbook.dicts import DictOf from itertools import imap, cycle _l...
# coding=utf-8 # Copyright 2021 The Deeplab2 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 ...
import warnings import numpy as np from joblib import Parallel, delayed from scipy.stats.distributions import chi2 from scipy.stats.stats import _contains_nan from sklearn.metrics import pairwise_distances from sklearn.metrics.pairwise import pairwise_kernels def contains_nan(a): # from scipy """Check if inputs...
from ctypes import ( CDLL, POINTER, Structure, c_char, c_char_p, c_long, c_int, c_ulong, c_uint, c_uint8, c_ubyte, cdll, string_at, pointer, ) from pathlib import Path from typing import Optional, List, Dict, Tuple, NamedTuple, Union import ctypes import os from ...
#!/usr/bin/env python # Copyright 2018 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. import sys sys.dont_write_bytecode = True sys.excepthook = sys.__excepthook__ import os impor...
# Copyright (C) 2010, 2011 <NAME> (<EMAIL>) and contributors # # This module is part of GitDB and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php """Contains basic c-functions which usually contain performance critical code Keeping this code separate from the beginning makes ...
# Copyright © 2020 by <NAME>. # Simple GUI with screens filled with widgets, some touchable. # Colors: # For best performance and lowest memory use, this GUI cean use a GS4_HSMB "4-bit greyscale" # framebuffer. This is used to represent 16 colors and # the display driver (it's display() method specifically) is expecte...
import pysb.core import pysb.bng import numpy import scipy.integrate import code try: # weave is not available under Python 3. from scipy.weave import inline as weave_inline import scipy.weave.build_tools except ImportError: weave_inline = None import distutils.errors import sympy import re import iter...