text
stringlengths
6.04k
39.5k
import logging import os from typing import Union import numpy as np import torch import torch.nn as nn from deepethogram import utils from deepethogram.feature_extractor.models.CNN import get_cnn from deepethogram.flow_generator import models as flow_models from .utils import Fusion, remove_cnn_classifier_layer flo...
import os import sys import torch from pytorch_lightning.callbacks import ModelCheckpoint from sacred.config_helpers import DynamicIngredient, CMD from torch.nn import functional as F import numpy as np from ba3l.experiment import Experiment from ba3l.module import Ba3lModule from torch.utils.data import DataLoader ...
# -*- coding:utf-8 -*- # ##### 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. # # ...
import os import kaa from kaa import document, encodingdef, utils, consts from kaa.ui.dialog import dialogmode from kaa.ui.selectlist import selectlist from kaa.ui.itemlist import itemlistmode from kaa.ui.inputline import inputlinemode from kaa.ui.msgbox import msgboxmode from kaa.command import commandid from kaa.co...
""" Class to work with Salesforce Metadata API """ import os from base64 import b64encode, b64decode from xml.etree import ElementTree as ET from .util import call_salesforce from .messages import DEPLOY_MSG, CHECK_DEPLOY_STATUS_MSG,\ CHECK_RETRIEVE_STATUS_MSG, RETRIEVE_MSG from zeep import Client, Settings class...
import numpy as np import librosa import os from tensorflow.python.framework import tensor_util import tensorflow as tf from tensorflow.python.platform import gfile from tensorflow.core.framework import graph_pb2 import operator import itertools from numpy import inf #### Load Data #### # windowing fft/ifft function ...
#endstop locations def check_adj_nodes(dimensionsu, dimensionsv): for i in range(5): if abs(dimensionsu[i] - dimensionsv[i]) == 1: for k in range(5): if i != k: if dimensionsu[k] == dimensionsv[k]: return True return False def...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' roslaunch my_pkg ur5_bringup.launch turn on external program on teach pendant!! roslaunch pylon_camera pylon_camera_node.launch roslaunch aruco_ros single_pylon.launch rosrun my_pkg ibvs_eye2hand_hololens.py yxj 20210826 ''' import rospy from std_msgs.msg import Strin...
"""""" import os import sys import time import shutil import string import logging import argparse import datetime from pathlib import Path from typing import Optional import tweepy import sqlalchemy as sqla from sqlalchemy.orm import sessionmaker, Session import chainblocker LOGGER = logging.getLogger(__name__) L...
"""Additional functions used for the simulation experiments. To be ingrated into struct_lmm2._simulate?""" #=============================================================================== # Imports #=============================================================================== from collections import namedtuple from ...
"""pytest fixtures for kubespawner""" import asyncio import base64 import inspect import io import logging import os import sys import tarfile import time from functools import partial from threading import Event from threading import Thread import kubernetes_asyncio import pytest import pytest_asyncio from jupyterhub...
import os from collections import OrderedDict from labchain.network.networking import TransactionDoesNotExistException, BlockDoesNotExistException, BlockDoesNotExistException,NoPeersException from labchain.datastructure.transaction import Transaction from labchain.datastructure.txpool import TxPool from labchain...
import os import io import mmap from glob import glob import itertools import numpy as np import argparse as ap import concurrent.futures as cf import time from queue import Queue as Queue import torch.cuda.nvtx as nvtx import copy from mpi4py import MPI from mpi4py.util import dtlib import torch import io_helpers as...
#!/usr/bin/python # # Copyright 2018, International Business Machines 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 req...
import numpy as np import pandas as pd from matplotlib import pyplot as plt from sklearn.tree import DecisionTreeClassifier, _tree import seaborn as sns import gc import math def get_grouped_data( input_data, feature, target_col, bins, cuts=0, is_train=0): """ :...
from hdfs import InsecureClient from io import StringIO import json import numpy as np from operator import add import os import pandas as pd from pyspark import SparkConf, SparkContext, StorageLevel import sys def list_dir(file_path, hdfs_client=None, use_hdfs=False): """Lists all the files inside the directory ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for miscellaneous behaviors of the top-level L{twisted} package (ie, for the code in C{twisted/__init__.py}. """ from __future__ import division, absolute_import import re import sys from types import ModuleType, FunctionType from twi...
import numpy as np import torch import scipy.optimize as opt import time from .optimizer import Optimizer from ..ml.trainer_robot import TrainerRobot from ..ml.models import RobotNetwork, RobotSolver from .. import arguments from ..graph.visualization import scalar_field_paraview class OptimizerRobot(Optimizer): ...
## ## Script to Build CORE UEFI firmware ## ## ## Copyright Microsoft Corporation, 2015 ## IgnoreList = [ "nt32pkg.dsc", #NT32 pkg requires windows headers which are not supplied on build system "Nt32PkgMsCapsule.dsc", #NT32 capsule pkg requires windows headers which a...
""" Fast R-CNN: data = {'data': [num_images, c, h, w], 'rois': [num_rois, 5]} label = {'label': [num_rois], 'bbox_target': [num_rois, 4 * num_classes], 'bbox_weight': [num_rois, 4 * num_classes]} roidb extended format [image_index] ['image', 'height', 'width', 'flipped', 'boxes', 'gt_classe...
#!/usr/bin/env python """ This module contains classes and functions for reading and writing files in different formats for MD simulations including so-named "_at_" format for intrinsic MD codes from BSU laboratory of theoretical investigations and computer modeling. The reading is made to the structure class The ...
from __future__ import (absolute_import, division) import os, subprocess, pdb import numpy as np import seaborn as sns sns.set(style='ticks', font_scale=1.4, palette='Set2') def qa_montage_coadds(objid, objdir, htmlobjdir, clobber=False, verbose=True): """Montage the coadds into a nice QAplot.""" montagefil...
def process_input(file_contents): grid = [0]*7 for i in[3,5,7,9]: for j in [2,3]: grid.append(file_contents[j][i]) return tuple(grid) def find_neighbors_star1(current_node,goals,paths,distance): neighbors = list() neighbor_dict = dict() multiplier = {'A':1, 'B':10, 'C':100...
from typing import Callable, List, Any, Dict, Optional from comet_ml import Experiment from numpy import mod from torch.optim.optimizer import Optimizer # 必须引入,不然报错 from exp_loggers import init_loggers, get_comet_experiment import torch import pytorch_lightning as pl from data_module import LibriDataModule from schedu...
import os import simtk.unit as unit import mdtraj as md import numpy as np from sklearn.cluster import KMeans, OPTICS, DBSCAN from sklearn.metrics import silhouette_score, silhouette_samples from analyze_foldamers.parameters.angle_distributions import * from analyze_foldamers.ensembles.cluster import * import m...
import json import logging import voluptuous as vol from homeassistant.helpers import config_validation as cv from homeassistant.components.http import HomeAssistantView from homeassistant.const import (MAJOR_VERSION, MINOR_VERSION) from homeassistant.auth.const import ACCESS_TOKEN_EXPIRATION import homeassistant.aut...
import sys import json import gzip import logging import time import operator import re import numpy as np import nltk from collections import Counter from features import preprocessor as pp # Function: # input # dictionary of features to extract and the corresponding directory path to relevant files # output parame...
import time, gym import numpy as np from UTILS.tensor_ops import my_view from ..core import World, Agent, EntityState class collective_assultEnvV1(gym.Env): metadata = {'render.modes': ['human']} def __init__(self,numguards =5, numattackers = 5, size=1.0): from ..collective_assult_parallel_run imp...
"""Parameter optimization functions.""" # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> from math import ceil, floor from collections import OrderedDict import numpy as np import scipy.stats as stats from scipy.optimize import fmin_cobyla from .network_models import jones_2009_model from .dipole import _rms...
import cv2 import glob import json import re import math import numpy as np ### Module imports ### import sys #from modules.reconstruction.Triangulate import Triangulate class Camera: """ Class implementation for representing a camera """ def __init__(self, intrinsicPath=None, extrinsicPath=None):...
import ast, gast import unittest from chainer_compiler.elichika.testtools import generate_id2type_from_forward import chainer import chainer.functions as F import chainer.links as L import numpy as np class TestNumpy(unittest.TestCase): def test_numpy_array(self): class Test(): def forward(se...
# -*- coding: utf-8 -*- import xarray as xr import numpy as np import pandas as pd import pathlib class BaselineDatabase(object): def __init__(self): self.line_table = pd.DataFrame(columns=['site','install', 'line', 'instrument_id', 'comment']) self.instrument_table = pd.DataFrame(columns = ['inst...
import os import cv2 import numpy as np import pandas as pd from matplotlib import pyplot as plt import preprocess # Return a list of all image names with a given extension in a given folder def listImages(dir, extension): res = [] for img in os.listdir(dir): if img.endswith(extension): res...
import gdspy import numpy import colorsys from PIL import Image, ImageDraw, ImageFont class ColorDict(dict): def __missing__(self, key): layer, datatype = key rgb = tuple( int(255 * c + 0.5) for c in colorsys.hsv_to_rgb( (layer % 3) / 3.0 + (layer % 6 // 3) ...
import torch from torch.utils.data import DataLoader from torch import nn from pytorch_transformers import AdamW, WEIGHTS_NAME, WarmupLinearSchedule import csv import random import numpy as np import os import logging from fp16 import FP16_Module, FP16_Optimizer from parallel import DataParallelModel, DataPar...
#! /usr/bin/python # Copyright (c) 2015 <NAME> (<EMAIL>) # # This file is part of Nysa. # (http://wiki.cospandesign.com/index.php?title=Nysa.org) # # Nysa 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; eithe...
"""Module to manipulate objects in Blender regarding CityJSON""" import json import time import sys import bpy import idprop from datetime import datetime from .material import (BasicMaterialFactory, ReuseMaterialFactory, CityObjectTypeMaterialFactory) from .utils import (assign_properties, cl...
import sys import math import numpy as np import cv2 import os import _pickle as cPickle import gzip import subprocess import torch from dtw import dtw from constants import PAD_TOKEN # Plot a video given a tensor of joints, a file path, video name and references/sequence ID def plot_video(joints, f...
import zarr import dask.array as da import numpy as np import time import os import bz2 import random from utils import sample_utils, core_gene_utils, diversity_utils, HGT_utils from parsers import parse_midas_data, parse_HMP_data import config def parse_annotated_snps_to_zarr(snp_filename, zarr_dir, total_num_snps, ...
# # Copyright (c) 2020 Expert System Iberia # """Credibility reviewer for Tweet """ import logging from esiutils import citimings, bot_describer, dictu, isodate, hashu from semantic_analyzer import tweetrelsents as tweetsents from acred import content from acred.rating import agg from acred.reviewer.credibility import ...
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
#! /usr/bin/env python """ This module provides classes for querying Google Scholar and parsing returned results. It currently *only* processes the first results page. It is not a recursive crawler. """ # ChangeLog # --------- # # 1.7: Python 3 and BeautifulSoup 4 compatibility, as well as printing # of usage in...
#! python3 """Initial work on a hierarchy scanning module""" import re import os from collections import defaultdict from timeit import default_timer as timer start = timer() DEBUG = False # Global pattern for valid HDL names. IDENT_P = r"[a-zA-Z](?:[a-zA-Z0-9]|_(?!_))*[a-zA-Z0-9]*" # Global methods for buffer manipu...
from apps.geocode import geocoder import folium import copy import branca.colormap as cm import json import streamlit as st import numpy as np import pandas as pd import altair as alt from datetime import datetime, timedelta import leafmap.foliumap as leafmap from vega_datasets import data import time from streamlit.s...
"""An abstraction of a datastore, to use for syncing.""" from abc import ABC, abstractmethod from collections import OrderedDict import logging import psycopg2 from typing import Sequence, TypeVar, Generic, Tuple ID = TypeVar('ID') _REV = '_rev' _ID = '_id' _DELETED = '_deleted' logger = logging.getLogger(__name__...
from PySide2 import QtCore, QtGui, QtWidgets from OpenGL.GL import * import OpenGL.GL.framebufferobjects as glfbo import numpy as np from ...vendor.pyqtgraph import functions as fn from ...vendor.pyqtgraph import debug from ...vendor.pyqtgraph import opengl as gl from ...opengl import camera from ...base.data import ma...
#!/usr/bin/env python3 # # phase-deuce # https://github.com/gregkrsak/phase-deuce # # Automatically populates a random daily log of customers for businesses offering table service. # Inspired by Phase 2 of WA State Governor Inslee's COVID-19 reopening plan. Of course, this is # to be used for testing purposes only! # #...
from .profile import ProfileImpl import bz2 import copy import io import os import struct """ ProfileV2 is a profile data representation designed to keep the profile data on-disk as small as possible while still maintaining good access speed, specifically to avoid having to load the entire file to discover just the in...
# -*- coding: utf-8 -*- import cv2 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import matplotlib.image as mpimg from skimage.feature import hog # Define a function to compute color histogram features def color_hist(img, nbins=32, bins_range=(0, 256)): # Compute the...
from typing import List, Dict, Optional, Tuple import numpy as np from ...math.matrix import Matrix from ...common.config import Config from .gjk import PointPair from ...geometry.geom_algo import GeomAlgo2D from ...geometry.shape import Circle, Edge, Ellipse, Polygon, Shape, ShapePrimitive class ProjectedPoint(): ...
import string import textwrap from collections import OrderedDict from collections.abc import Mapping, MutableMapping from copy import copy from typing import Optional, Union import aesara import aesara.tensor as at from aesara.assert_op import Assert from aesara.compile.function.types import Function from aesara.grap...
# Copyright (c) 2021-2022, NVIDIA CORPORATION. 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 ...
import os import xlrd import time import traceback import datetime from django.core.files import File from Module_TeamManagement.src import utilities from Module_TeamManagement.models import * from Module_DeploymentMonitoring.models import * from Module_CommunicationManagement.src import tele_config #-----------------...
# <Copyright 2019, Argo AI, LLC. Released under the MIT license.> """Tests for frustum clipping functions.""" import numpy as np from argoverse.utils.frustum_clipping import ( clip_segment_v3_plane_n, cuboid_to_2d_frustum_bbox, fit_plane_to_point_cloud, form_left_clipping_plane, form_low_clipping_...
from functools import partial from collections import Counter from django import forms from django.conf import settings from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.admin.widgets import FilteredSelectMultiple from django.db.models import TextField from django.db i...
# !/usr/bin/env python # -*- coding: utf-8 -*- """Database functions.""" import os from datetime import datetime from json import dumps from typing import Any from typing import List from urllib.parse import quote from flask import g from flask_sqlalchemy import SQLAlchemy from pandas import read_csv from tqdm import ...
# Libaries from tkinter import * import random import numpy import time from pprint import pprint ################################################################################ ################################################################################ ############################################################...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, <NAME> <<EMAIL>> # Copyright: (c) 2019, <NAME> (@Andersson007) <<EMAIL>> # Certain parts are taken from Mark Theunissen's mysqldb module # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ...
import numba import numpy as np from sklearn.base import BaseEstimator, TransformerMixin from sklearn.utils.validation import check_is_fitted from vectorizers._window_kernels import _SLIDING_WINDOW_KERNELS, _SLIDING_WINDOW_FUNCTION_KERNELS @numba.njit(nogil=True) def sliding_windows( sequence, width, str...
from numpy import * import itertools import time import sys from matplotlib.pyplot import * matplotlib.rcParams['savefig.dpi'] = 100 import pandas as pd # Import NN utils from nn.base import NNBase from nn.math import softmax, sigmoid, make_onehot from nn.math import MultinomialSampler, multinomial_sample ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### ######################## PERIODIC ANALYSIS FUNCTIONS ########################## ############################################################################### # This module contains all the ...
''' Copyright (c) 2020 <NAME> This file is part of mac_apt (macOS Artifact Parsing Tool). Usage or distribution of this software/code is subject to the terms of the MIT License. Written by <NAME> & <NAME> Decrypts APFS volumes ''' import hashlib import logging import struct from cryptography.ex...
#!/usr/bin/env python # fix problems with pythons terrible import system import sys import os file_dir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(file_dir, '../')) sys.path.append(os.path.join(file_dir, '../../')) # package imports import prob2020.python.utils as utils from prob2020.pyt...
#!/usr/bin/env python import os import json import sys import pytest import datetime from pickle import UnpicklingError from decimal import Decimal from deepdiff import DeepDiff from deepdiff.helper import pypy3 from deepdiff.serialization import ( pickle_load, pickle_dump, ForbiddenModule, ModuleNotFoundError, ...
# _*_ coding: utf-8 _*_ import logging log = logging.getLogger(__name__) from django.utils.translation import ugettext as _ # , ungettext from django.utils.encoding import force_text from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.contrib impor...
""" js2esi.token.dtokens ply.lex token definitions for esi-to-js decompilation Generates esi-to-js decompilation lexer tokens. Note the following token naming pattern: sCOMMAND start ESI open element, eg "<esi:assign" oCOMMAND opening ESI element without attributes, eg "<esi:vars>" cCOMMAND closing ESI element...
''' Preprocess examples in a dataset and generate data for models. ''' import random import re import time import os import numpy as np #from itertools import izip from cocoa_folder.cocoa.core.util import read_pickle, write_pickle, read_json from cocoa_folder.cocoa.core.entity import Entity, CanonicalEntity, is_entit...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools import logging import string import warnings from collections import defaultdict from jsonschema.validators import Draft4Validat...
import pandas as pd import MDAnalysis as mda import numpy as np import matplotlib.pyplot as plt from enmspring.k_b0_util import get_df_by_filter_bp from enmspring.na_seq import sequences from enmspring.spring import Spring atomname_map = {'A': {'type1': 'N6', 'type2': 'N1', 'type3': 'C2'}, 'T': {'type...
# Copyright 2015 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Wrapper around GCE REST API.""" import re from components import net AUTH_SCOPES = [ 'https://www.googleapis.com/auth/compute', ] MAC...
""" Runs tests with valid zone files on different implementations. Either compares responses from mulitple implementations with each other or uses a expected response to flag differences (only when one implementation is passed for testing). usage: test_with_valid_zone_files.py [-h] [-path DIRECTORY_PATH] ...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Routines to get corrected p-values estimates, based on the observations. It implements 3 approaches: - Benjamini-Hochberg FDR: http://en.wikipedia.org/wiki/False_discovery_rate - a class that fits a G...
from __future__ import print_function from __future__ import division from builtins import zip from builtins import range from builtins import object from past.utils import old_div __author__ = 'grburgess' import collections import os import numpy as np import pandas as pd from pandas import HDFStore from threeML.ex...
# # -*- coding: utf-8 -*- # Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # utils from __future__ import absolute_import, division, print_function __metaclass__ = type import socket import re import js...
"""hepdata_lib main.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import shutil import tarfile import warnings from collections import defaultdict import numpy as np import yaml from future.utils import raise_from # try to use LibYAML bindin...
import webbrowser import click import pytest from ghutil import git # Betamax isn't good with parametrization, and parametrizing lengthy output # would result in very long cassette file names anyway, so no parametrization # for me. REPO_LIST = '''\ jwodder/advent350 jwodder/aptrepo jwodder/awesome-python jwodder/bi...
# coding=utf-8 from __future__ import with_statement import random, threading, time import pytest from whoosh import fields, formats, reading from whoosh.compat import b, u, xrange from whoosh.reading import SegmentReader from whoosh.filedb.filestore import RamStorage from whoosh.util.testing import TempIndex def _...
import numpy as np import scipy as sp import scipy.stats as st import scipy.interpolate import scipy.linalg as la import pylab as pl import math from scipy.stats import multivariate_normal from sklearn import preprocessing import statsmodels.api as sm import pickle import scipy as SP import scipy.optimize as opt de...
""" API to the the solver API Set VERBOSE = "1" to generate tracker outputs. Set SAVE_INTERMEDIATE = "1" to store intermediate tracking results to the working directory """ import time import multiprocessing as mp import math import copy import numpy as np import torch.nn as nn from src.utilities.decorator...
#encoding: utf-8 import sys import numpy as np import matplotlib as mpl from mpl_toolkits.basemap import Basemap import time from datetime import datetime #from matplotlib.nxutils import pnpoly from scipy import interpolate import pyroms from . import _interp def get_lonlat(iindex, jindex, grd, Cpos='rho'): """...
import itertools from collections import defaultdict import pandas as pd import numpy as np from matplotlib import pyplot as plt import seaborn as sns from tqdm import tqdm from gamexplainer.metaforest import MetaForest def plot_thresholds_hist(explainer, feature_index, ax1=None, bins=None): """ Plots a his...
""" HappyBase table module. """ import logging from numbers import Integral from operator import attrgetter from struct import Struct from .hbase.ttypes import TScan from .util import thrift_type_to_dict, str_increment, OrderedDict from .batch import Batch logger = logging.getLogger(__name__) make_cell = attrgetter...
# coding: utf-8 import time import ast import os, threading from watchdog.observers import Observer from watchdog.events import * from watchdog.utils.dirsnapshot import DirectorySnapshot, DirectorySnapshotDiff import requests import json, copy from urllib import parse from sklearn.feature_extraction.text im...
""" monobit.mac - MacOS suitcases and resources (c) 2019 <NAME> licence: https://opensource.org/licenses/MIT """ import logging from .binary import friendlystruct, bytes_to_bits from .formats import Loaders, Savers from .pack import Pack from .font import Font, Glyph, Coord ########################################...
""" Shared functions among fused or single input type data locading classes Modified from https://github.com/gurkirt/realtime-action-detection Author: <NAME> Date: 22 Feb 2019 """ import os, pdb import os.path import torch,json import cv2, pickle import numpy as np CLASSES = dict() CLASSES['ucf24'] = ['Basketball',...
#!/usr/bin/env python3 import subprocess import os import sys import re import time import shutil from typing import List, Set, Optional JNI_TESTS = "jni_tests" PYTHON_TESTS = "python_tests" CPP_TESTS = "cpp_tests" ANDROID_TESTS = "android-example" UNIT_TESTS = "unit_tests" DOC_TESTS = "doc_tests" RELEASE = "release"...
#!/usr/bin/env python # By <NAME>, Environment, Soils, and Land Use Dept., CELUP, Teagasc, # <NAME>le, Co. Wexford Y35 TC97, Ireland # email: guy <dot> serbin <at> teagasc <dot> ie # version 1.1.2 # This script creates Landsat scene processing lists for USGS/EROS/ESPA (https://espa.cr.usgs.gov) import os, sys, glob,...
#################################################################### # Interfaces with the NML2 version of the auditory cortex model of Beeman, # BMC Neuroscience (Suppl. 1), 2013 # # @author: <NAME>, 10/11/2017 #################################################################### import math import random import os im...
''' Frontend for xESMF, exposed to users. ''' import numpy as np import xarray as xr import os from .backend import (esmf_grid, add_corner, esmf_regrid_build, esmf_regrid_finalize) from .smm import read_weights, apply_weights def get_latlon_name(ds, boundary=False): if boundary: t...
import itertools, os, fastavro, pytest, before_after from collections import defaultdict from pymongo.operations import UpdateOne from ampel.core.AmpelContext import AmpelContext from ampel.dev.UnitTestAlertSupplier import UnitTestAlertSupplier from ampel.ingest.ChainedIngestionHandler import ChainedIngestionHandler f...
import os import numpy as np import tifffile from numba import jit from scipy.ndimage.measurements import find_objects from scipy.ndimage.morphology import binary_fill_holes def _fill_label_holes(lbl_img, **kwargs): lbl_img_filled = np.zeros_like(lbl_img) for l in (set(np.unique(lbl_img)) - set([0])): ...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
#!/usr/bin/env/python """ Usage: get_paired_zinc_test.py Options: -h --help Show this screen. This script should take two sys.argv arguments 1) A SMI file 2) A string which will be used as the root for the names of the output Alongside angle and distance, we add our pharmacophoric profile so...
""" Miscellaneous Utilities for Trident """ #----------------------------------------------------------------------------- # Copyright (c) 2016, Trident Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #--------...
from warnings import WarningMessage import numpy as np from numpy.lib.npyio import save from cellpose import models import torch import cv2 import os,sys,time import skimage default_cellpose_kwargs = { 'anisotropy': 1, 'diameter': 40, 'min_size': 500, 'stitch_threshold': 0.1, } default_pixel_sizes = [...
""" Sponge Knowledge Base Used for testing a Remote API server and clients. """ from java.util.concurrent.atomic import AtomicBoolean from org.apache.commons.io import IOUtils from java.time import LocalDateTime from java.nio.charset import StandardCharsets def onInit(): # Variables for assertions only. spong...
import datetime import pikepdf from PIL import Image from PyQt5 import QtCore from PyQt5.QtCore import pyqtSignal from fpdf import FPDF A3 = {'P': {'w': 297, 'h': 420}, 'L': {'w': 420, 'h': 297}} A4 = {'P': {'w': 210, 'h': 297}, 'L': {'w': 297, 'h': 210}} A5 = {'P': {'w': 149, 'h': 210}, 'L': {'w': 210, 'h': 149}} Let...
import os import sys import logging import coloredlogs import click import datetime as dt import yaml import asyncio import psutil import backoff import json import nest_asyncio import socket from crontab import CronTab from typing import List, Dict, Optional, cast from asyncio.subprocess import Process from asyncio i...
import os import sys import math import time import copy import pandas import struct import random import pickle import argparse import warnings import scipy.stats import numpy as np import scipy.signal import pandas as pd from sklearn import svm from sklearn import tree from matplotlib import pyplot import matplotlib....
#!/usr/bin/env python # Copyright 2017 Calico LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...