text
stringlengths
3.07k
22.1k
import logging import datetime import time import ray import cupy from ray.util.collective.collective_group import nccl_util from ray.util.collective.collective_group.base_collective_group \ import BaseGroup from ray.util.collective.types import AllReduceOptions, \ BarrierOptions, Backend, ReduceOptions, Broa...
from __future__ import print_function import argparse import numpy as np import os import shutil import torchnet as tnt import time import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from torch.optim.lr_scheduler import MultiStepLR import random import torch.nn as nn imp...
import numpy as np import os import math import glob import cv2 from buildModel import MTFNet from imgProcessing import preProcessTestImages from prepareTrainingData import readTFRecordDataset import tensorflow as tf from tensorflow.python.keras.models import load_model, Model from tensorflow.python import keras from ...
""" CNN model for raw audio classification Model contributed by: MITRE Corporation Adapted from: https://github.com/mravanelli/SincNet """ import logging from art.classifiers import PyTorchClassifier import numpy as np import torch from torch import nn # Load model from MITRE external repo: https://github.com/hkaki...
# -*- coding: utf-8 -*- """ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Render curved 4d polychoron examples ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright (c) 2018 by <NAME>. """ import os import subprocess from fractions import Fraction from polytopes.models import Polychora from polytopes.povray import pov_index_array1d...
# MIT License # # (C) Copyright [2020-2022] Hewlett Packard Enterprise Development LP # # 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...
#!/usr/bin/python3 -OO # -*- coding: utf-8 -*- # Copyright 2011-2021 The SABnzbd-Team <<EMAIL>> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your o...
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
import os import csv import json import re try: import mailparser except: print("Warning: failed to load mail-parser module. This will be an issue if you want to process .eml files.") try: import unidecode except: print("Warning: failed to load unidecode module. This will be an issue if you want to p...
# Copyright (c) 2019, 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 appli...
#from image_env_mnist1 import Image_env1 from RL_saccader_x1 import DeepQNetwork from RL_networks import Stand_alone_net import numpy as np import time import pickle import copy import SYCLOP_env as syc from misc import * import sys import os import tensorflow as tf import cv2 # cv2.ocl.setUseOpenCL(True...
from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urllib_parse_urlparse, ) from ..utils import ( dict_get, int_or_none, parse_duration, unified_timestamp, ) class SkyItPlayerIE(InfoExtractor): IE_NAME = 'player.sky.it' _VALID_URL = r'https?://player\.sky\...
import configparser import csv from cloudant.client import CouchDB, CouchDatabase from cloudant.design_document import DesignDocument from cloudant.query import Query from data import Data from utils import inherit_docstring from node import Node ID_KEY = 'id' X_KEY = 'x' Y_KEY = 'y' BORDERS_KEY = 'borders' DIRECTIO...
#!/usr/bin/env python3 """Create or serve the pyladies.cz website """ import sys if sys.version_info < (3, 0): raise RuntimeError('You need Python 3.') import os import fnmatch import datetime import collections from urllib.parse import urlencode from flask import Flask, render_template, url_for, send_from_dire...
#!/usr/bin/env python # -*- coding: utf-8 -*- import glob import datetime import numpy as np import pandas as pd import json import os import quantmod as qm import flask import dash from dash.dependencies import Input, Output import dash_core_components as dcc import dash_html_components as html from flask_caching im...
import json, datetime from django.db import models from django.conf import settings from django.utils import timezone from django.contrib.auth import get_user_model from . import managers class LabelsLockedError (Exception): pass class LabellingTask (models.Model): enabled = models.BooleanField(default=True...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
# flask_web/app.py import os from flask import Flask from flask import jsonify from flask import render_template from flask_bootstrap import Bootstrap from config import UPLOAD_FOLDER, STATIC_DIR from utils.asr import do_recognize from utils.common import save_file from utils.face import face_detect, face_verify, fa...
"""This module contains the general information for ConfigCpuItem ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class ConfigCpuItemConsts(): ARCH_DUAL_CORE_OPTERON = "Dual-Core_Opte...
import json import warnings from typing import Any import requests from seldom.running.config import Seldom from seldom.logging import log from seldom.utils import jsonpath as utils_jsonpath from seldom.utils import jmespath as utils_jmespath IMG = ["jpg", "jpeg", "gif", "bmp", "webp"] def formatting(msg): """fo...
import pytest pytestmark = [pytest.mark.working, pytest.mark.schema] @pytest.fixture def so_ont(testapp): return testapp.post_json('/ontology', {'ontology_name': 'SO'}).json['@graph'][0] @pytest.fixture def protein_term(testapp, so_ont): gterm = { 'uuid': '8bea5bde-d860-49f8-b178-35d0dadbd644', ...
# @date 2019-01-06 # @author <NAME>, All rights reserved without prejudices. # @license Copyright (c) 2019 Dream Overflow # Utils from __future__ import annotations from typing import Union, Set, Tuple, List import math from datetime import datetime, timedelta, tzinfo class UTC(tzinfo): """UTC""" def utc...
''' --- Day 13: Shuttle Search --- Your ferry can make it safely to a nearby port, but it won't get much further. When you call to book another ship, you discover that no ships embark from that port to your vacation island. You'll need to get from the port to the nearest airport. Fortunately, a shuttle bus servi...
import base64 import datetime import json import re import socket import struct from django.conf import settings from django.db import models, transaction import jwt from . import secrets, utils class User(models.Model): principal = models.CharField(max_length=255, unique=True) info = models.JSONField(defau...
"""Methods to generate optimization reports.""" import os import textwrap from collections import OrderedDict import hashlib from Bio import SeqIO import flametree import numpy as np from ..biotools import ( sequence_to_biopython_record, find_specification_label_in_feature, ) from ..version import __version_...
## @package sparse_lookup # Module caffe2.python.layers.sparse_lookup from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python.helpers.arg_scope import get_current_scope from caffe2.python import schema from ...
#!/usr/bin/env python """ Main driver node for the OnRobot RG2-FT gripper """ import math from rg2_driver.registers import * from rg2_driver.modbus_sim import ModbusSimClient # ros imports import rospy from std_msgs.msg import Bool, Float32, Header from sensor_msgs.msg import JointState from rg2_msgs.msg import Gripp...
"""Python virtual environment manager for xonsh.""" import os.path import subprocess import tempfile import typing as tp from pathlib import Path import xonsh.cli_utils as xcli import xontrib.voxapi as voxapi from xonsh.built_ins import XSH from xonsh.dirstack import pushd_fn from xonsh.platform import ON_WINDOWS from...
# -*- coding: utf-8 -*- """ Utility functions. Not all functions seem to belong here. This file should be reorganized. """ import contextlib import csv import json import math import os import sys import urllib.parse import boltons.mathutils import smart_open from scipy import stats class PheWebError(Exception):...
import argparse import traceback from pathlib import Path from time import time import tensorflow as tf import numpy as np from tqdm import trange from utils.config_manager import ConfigManager from preprocessing.data_handling import Dataset, ForwardDataPrepper from utils.decorators import ignore_exception, time_it f...
"""Genshin Impact wish history. Gets wish history from the current banners in a clean api. Requires an authkey that is fetched automatically from a logfile. """ import base64 import heapq import os import re import sys from itertools import chain, islice from tempfile import gettempdir from typing import Any, Dict, It...
""" Script calculates the minimum number of enembles to detect a statistically significant ensemble mean difference. Notes ----- Author : <NAME> Date : 24 June 2019 """ def readinData(varnames,simuh,period): ### Import modules import numpy as np import datetime import read_MonthlyData as MO ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging import re from itertools import takewhile from pyparsing import LineStart, Optional, Suppress from regparser.citations import internal_citations from regparser.grammar import appendix as grammar from regparser.grammar.utils import Marker,...
import numpy as np import torch from itertools import product # from models import EfficientDetBackbone, Detector from configs import Config from utils.utils import draw_pred_gt_boxes from utils.postprocess import box_fusion, change_box_order from utils.getter import * class BaseTTA: """ author: @shonenkov """ ...
from __future__ import unicode_literals from rest_framework.generics import ( RetrieveUpdateAPIView, CreateAPIView, UpdateAPIView, ListAPIView) from rest_framework.permissions import AllowAny, IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView import os from da...
""" Base code for RL training. Collects rollouts and updates policy networks. """ import os from time import time from collections import defaultdict, OrderedDict import gzip import pickle import h5py import torch import wandb import numpy as np import moviepy.editor as mpy from tqdm import tqdm, trange from rl.poli...
import hashlib import threading import urllib import time import requests import random import json from voicecontrollermodel.voice_and_text import Voice2text, Text2voice from PyQt5.QtCore import QThread, pyqtSignal, QObject class Chat_Tread(QThread): # 聊天线程 chatting_signal = pyqtSignal(str, bool) def __ini...
#!/usr/bin/env python import numpy as np import sys, os, os.path, time, gc, glob from astropy.table import Table from astropy.io import ascii import photutils as ph import astropy.io.fits as fits import astropy.stats as stats import matplotlib as mat mat.use('TkAgg') import matplotlib.pyplot as plt from matplotlib.colo...
import string from constants import COLLISION_RADIUS from lib.msgs import nb2msg from lib.nofloat import int_distance, int_angle, int_cos_1000, int_sin_1000 from lib.priodict import priorityDictionary from worldresource import Meadow SPACE_LIMIT = 144 def square_spiral(x, y, step=COLLISION_RADIUS * 25 / 10): yi...
import os import cv2 import random import numpy as np import scipy.io def gen_data_mask_train(min_size=500): try: print('gen train masks') os.system('mkdir ./data/MAFA/train_masks/') os.system( 'find ./data/MAFA/train_masks/ -name "*" -type f -exec rm {} \\;') mat = s...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, <NAME> <<EMAIL>> # # Permission to use, copy, modify, and/or distribute this software for any purpose # with or without fee is hereby granted, provided that the above copyright notice # and this permission notice appear in all copies. # # THE SOFTWARE IS P...
# Copyright (c) 2021 PaddlePaddle 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 appli...
#!/usr/bin/env python2 # Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
#!usr/bin/env python # MIT license # Copyright 2019 <NAME> # Python script which can run brainfuck files. from sys import argv from sys import exit from sys import maxsize from sys import stdout from time import time from time import sleep from argparse import ArgumentParser from os import path from os import _exit f...
import matplotlib # Force matplotlib to not use any Xwindows backend. matplotlib.use('Agg') import networkx as nx from subprocess import check_output from dag_util import get_roots from test_util import make_path def to_bracket_notation(tree): def aux(node): nbrs = sorted(tree.neighbors(node)) i...
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. 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 requir...
import warnings from pathlib import Path from typing import Union warnings.simplefilter(action='ignore', category=FutureWarning) import pandas as pd import os import numpy as np import matplotlib.pyplot as plt import warnings from scipy.stats import linregress from thoipapy.utils import normalise_0_1, make_sure_path_e...
from logging import exception from PIL import Image from os import write import streamlit as st from streamlit.type_util import Key import os #from conexão.conexao import cnxn,cursor #trocar o nome da pagina e o icone st.set_page_config(page_title = "Abro - Odontologia Especializada", page_icon=":smiley:") #re...
import inspect, platform, re, tempfile, math, datetime from coldtype.pens.draftingpens import DraftingPens try: import skia from coldtype.pens.skiapen import SkiaPen except ImportError: skia = None SkiaPen = None from enum import Enum from subprocess import run from pathlib import Path from coldtype...
#!/usr/bin/env python3 import threading import webbrowser import json import urllib.request import gi gi.require_version('AppIndicator3', '0.1') gi.require_version('Notify', '0.7') gi.require_version('Gtk', '3.0') from gi.repository import AppIndicator3 as appindicator # noqa: E402 from gi.repository import GLib, Gi...
#!/usr/bin/env python3 """Starwars traceroute using raw ethernet socket in Python3. This is my first dive into Python and learning the Pythonic ways. The fib and filter globals need modified for your environment. created: 2020-02-01 author: <NAME> <<EMAIL>> """ import ctypes import struct from ctypes import create_...
# coding: utf-8 # @时间 : 2022/1/17 3:08 下午 # @作者 : 文山 # @邮箱 : <EMAIL> # @作用 : # @文件 : model19.py # @微信 :qwentest123 import tensorflow as tf import numpy as np import pandas as pd from tensorflow.keras import Model, Sequential, layers from tensorflow.keras import Model import time, json, os class ConvBNRel...
import collections.abc from contextlib import contextmanager from typing import Optional, List, Sequence import torch from torch.distributed import distributed_c10d from torch.distributed import rpc from torch.distributed._shard.sharding_spec import ( ShardMetadata, ) from torch.distributed._shard.sharding_spec._i...
from collections import defaultdict import subprocess import os.path import numpy as np import pandas as pd from data import DATA_PATH WORKERS = 8 class GaussianKernel: def __init__(self, sigma2=1.0): self.sigma2 = sigma2 def __str__(self): return "Gaussian(sigma2={:.4f})".format(self.sigm...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from utils.collections import AttrDict import six import yaml import torch import torch.nn as nn from torch.nn import init import numpy as np import copy from ast import ...
''' pandas demo -数据清洗 ( numpy-1.19.2 pandas-1.1.2 scikit-learn-0.23.2 ) ''' import numpy as np from pandas import Series, DataFrame import pandas as pd from sqlalchemy import create_engine def is_null(): df = pd.DataFrame(np.random.randn(10, 6)) df.iloc[:4, 1] = None df.iloc[:2, 4:6] = None df.iloc[6, 3:5] ...
""" Based on https://github.com/suragnair/alpha-zero-general https://github.com/victoresque/pytorch-template/blob/master/base/base_trainer.py """ import os import sys import datetime from collections import deque from Arena import Arena, ArenaMP from MCTS import MCTS import numpy as np from tqdm import tqdm from pickl...
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
import json import os import random import bottle from api import ping_response, start_response, move_response, end_response from a_star import Position, GridPositionInfo#, AStarSearch class FloodNode: def __init__(self, position, colour='white'): self.position = position self.colour = colour ...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import math import re import time import traceback from odoo import api, fields, models, tools, _ _logger = logging.getLogger(__name__) try: from num2words import num2words except ImportError: _...
import numpy as np from scipy.interpolate import RectBivariateSpline, interp1d from os import path import mpmath as mp import alp_setup as setup import alp_constants as c import decay_widths as width import argparse # Derived from load_data.py for cross-check of B meson mode with 2mu decay parser = argparse.ArgumentP...
# Copyright (c) 2017 UFCG-LSD. # # 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,...
# Copyright 2018 The TensorFlow Probability 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 o...
import geopandas as gpd import pandas as pd import plotly.express as px import json import numpy as np import plotly.io as pio import os from zipfile import ZipFile from urllib import request pd.options.display.float_format = "{:,.2f}".format def donwload_sectors_shp_2010(ufs): try: for uf in ufs: ...
import json import os import time import numpy as np from PIL import Image from rl_coach.agents.clipped_ppo_agent import ClippedPPOAgentParameters from rl_coach.base_parameters import MiddlewareScheme, EmbedderScheme, VisualizationParameters, PresetValidationParameters, DistributedCoachSynchronizationType from rl_coach...
""" Interact with Gym environments using the keyboard An adapter object is defined for each environment to map keyboard commands to actions and extract observations as pixels. """ import pyglet # don't require an x server to import this file pyglet.options["shadow_window"] = False import sys import ctypes import os ...
import pytest import gc with pytest.suppress(ImportError): import numpy as np @pytest.fixture(scope='function') def arr(): return np.array([[1, 2, 3], [4, 5, 6]], '<u2') @pytest.requires_numpy def test_array_attributes(): from pybind11_tests.array import ( ndim, shape, strides, writeable, size,...
#!/usr/bin/env python # This Software (Dioptra) is being made available as a public service by the # National Institute of Standards and Technology (NIST), an Agency of the United # States Department of Commerce. This software was developed in part by employees of # NIST and in part by NIST contractors. Copyright in po...
# Image Classifier experimentation import matplotlib.pyplot as plt import numpy as np import torch import torchvision import torchvision.transforms as transforms import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import Dataset, TensorDataset, DataLoader ...
""" Author: <NAME> """ import psycopg2 import os import itertools as it import copy """ Attributes in the relation """ attrs = ['pname', 'discount', 'month', 'price'] """ List of tuple pairs are of the form: ([], []) ==> list of attributes in tuple[1] functionally depend on list of attributes in tuple[0] """...
from pypy.interpreter.error import OperationError from rpython.rtyper.lltypesystem import rffi, lltype from pypy.module.cpyext.api import ( cpython_api, cpython_struct, bootstrap_function, build_type_checkers, PyObjectFields, Py_ssize_t, CONST_STRING, CANNOT_FAIL) from pypy.module.cpyext.pyerrors import PyErr_B...
import json import os from time import time import numpy as np import warnings warnings.filterwarnings("ignore") import optparse import zipfile try: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # used for 3D plotting except ImportWarning: print('Could not import matplotlib - plots...
""" Authors: <<NAME>, <NAME>> Copyright: (C) 2019-2020 <http://www.dei.unipd.it/ Department of Information Engineering> (DEI), <http://www.unipd.it/ University of Padua>, Italy License: <http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0> """ import os os.environ["CUDA_VI...
"""This module contains the general information for CommCoreFile ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class CommCoreFileConsts(): ADMIN_STATE_DISABLED = "disabled" ADMI...
import datetime import os import shutil import bottleneck as bn import numpy as np import pandas as pd import tensorflow as tf from absl import app from absl import flags from absl import logging from scipy import sparse from model import MultiVAE FLAGS = flags.FLAGS flags.DEFINE_string('data_dir', 'data/ml-20m', 'd...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2020 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
import requests import json import sqlite3 import datetime import os import argparse import traceback import sys import logging from logging.handlers import RotatingFileHandler def show_pretty_json(path): if not os.path.exists(path): print("[x] Path '%s' does not exist!" % path) ret...
from __future__ import print_function import keras from keras.preprocessing.image import ImageDataGenerator from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization, Add, GlobalAveragePooling2D from keras.layers import Conv2D, MaxPooling2D from keras.preproces...
import logging import csv from collections import defaultdict import pandas as pd import numpy as np from sklearn.model_selection import GroupKFold from sklearn.metrics import roc_auc_score from pepnet import Predictor, SequenceInput, Output from data import ( load_mass_spec_hits_and_decoys_grouped_by_nested_se...
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
#!/usr/bin/env python3 import threading, time, sys import tools def setup(cenni): # by clsn cenni.data = {} refresh_delay = 300.0 if hasattr(cenni.config, 'refresh_delay'): try: refresh_delay = float(cenni.config.refresh_delay) except: pass def close(): print("Nobo...
from ..mesh import * from ..model import * from .timer import * from .rhs import * import copy,json import numpy as np from scipy.integrate import ode # should move this to arguments global Nt Nt = 10e5 # Helper functions -------------------------------------------------------- def tryexponential(rate): """ T...
import numpy as np import matplotlib.pyplot as plt from utils import * class LocalPlannerBase: def __init__(self, dt, horizon, occupancy=None, global_planner=None, dyn_obstacles=None): """ Initialization of the basic local planner :param dt: discrete time step size :param horizon:...
# LIBTBX_SET_DISPATCHER_NAME dxtbx.image_average # LIBTBX_SET_DISPATCHER_NAME cxi.image_average """ Average images of any dxtbx-supported format. Handles many individual images or single container files. """ from __future__ import absolute_import, division, print_function import copy import sys from builtins import ...
""" ################################################################################################## # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : yoro_recommender_head.py # Abstract : Implementations of the Attn-based recognition bra...
import ast import importlib import inspect import re import runpy import threading from pathlib import Path from types import ModuleType from typing import Any, Callable, Deque, Dict, List, Optional, Tuple, Union import tokenize import cachetools import io from hookpy import loader _CACHE_LOCK = threading.Lock() cl...
# Copyright 2020 The Cirq 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# -*- coding: utf-8 -*- # # Copyright 2017-2018 Spotify AB # # 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...
# -*- coding: utf-8 -*- """ datastructures ~~~~~~~~~~~~~~ lightweight datastructures for use inside and outside :py:class:`canteen`. :author: <NAME> <<EMAIL>> :copyright: (c) <NAME>, 2014 :license: This software makes use of the MIT Open Source License. A copy of this license is included a...
__author__ = '<NAME>' import mdtraj as md import os from fnmatch import fnmatch import sys from math import radians try: import openeye.oechem as oechem except ImportError: pass from torsionfit.utils import logger from openmoltools.openeye import generate_conformers import warnings import numpy as np from ccli...
# Copyright 2019 Regents of the University of Minnesota. # # 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 l...
import os from platform import python_version from jinja2 import Environment, PackageLoader from sanic import __version__ as sanic_version from sanic.exceptions import NotFound, PayloadTooLarge, SanicException, abort, add_status_code from sanic.log import logger from sanic.response import file_stream, html, redirect, ...
# -*- test-case-name: vumi.blinkenlights.tests.test_metrics -*- """Basic set of functionality for working with blinkenlights metrics. Includes a publisher, a consumer and a set of simple metrics. """ from twisted.internet.task import LoopingCall from twisted.python import log from vumi.service import Publisher, Con...
import logging from functools import cached_property, lru_cache from typing import Any, Dict, List, Optional, Tuple from brownie import chain from brownie.convert.datatypes import EthAddress from hexbytes import HexBytes from multicall import Call from y.classes.common import ERC20, ContractBase, WeiBalance from y.cla...
#!/usr/bin/env python # Copyright 2014-2018 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...
import tensorflow as tf import tensorflow_addons as tfa import numpy as np import matplotlib.pyplot as plt import seaborn as sns from PIL import Image import math import scipy def showimg(image,figsize=[8,8]): if len(image.shape)==4: for i in range(image.shape[0]): figh,ax = showimg(image[i], figsize=figsi...
# LLEPE: Liquid-Liquid Equilibrium Parameter Estimator # Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See LICENSE for more details. import llepe import pandas as pd import numpy as np import json def mod_lin_param_df(lp_df, input_val, mini_species, min...
""" This module provides an `AlignmentHitStub` class as well as a group of curated stub objects, allowing for decoupled testing. """ from __future__ import absolute_import, division, print_function import numpy as np from GenomicConsensus.utils import complement, reverseComplement from GenomicConsensus.variants import...
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any ...