text
stringlengths
3.07k
22.1k
"""CleanAmps.py is a module that contains functions that are designed to help clean a pandas dataframe of 'amplitude level' issues. The 'amplitude level' issues that are relatated to physical conditions are outlined in the Holt et al. (in prep) paper. There are other functions that are cleaning issues in formatting of ...
# 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 fro...
# flake8: noqa from typing import Optional, Sequence import os from buffer import OffpolicyReplayBuffer from db import RedisDB import gym from misc import GameCallback, soft_update, Trajectory import numpy as np from sampler import ISampler import torch import torch.nn as nn from torch.utils.data import DataLoader fr...
#!/usr/bin/env python3 import collections import datetime import boto3 import ipaddress import json import netaddr import logging import os import re import requests import socket import tokens import botocore.exceptions from flowlogs_reader import FlowLogsReader from redis import StrictRedis AZ_NAMES_BY_REGION = {} ...
# -*- coding:utf-8 -*- import os import copy from ncnnqat import unquant_weight, merge_freeze_bn, register_quantization_hook,save_table import unittest import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim import lr_scheduler from torchvision import models from ...
import autograd.numpy as np import autograd.numpy.random as npr import torch from autograd.numpy.random import multivariate_normal as mvn from autograd import grad, jacobian, hessian import scipy as sc from scipy import optimize from scipy import stats import random import multiprocessing nb_cores = multiprocessing....
"""Test utilities for AdaNet single graph implementation. Copyright 2018 The AdaNet 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 https://www.apache.org/license...
__all__ = ["grid2geoio", "geo2gridio", "gdatrans7"] import geodepy.convert import pandas as pd import tkinter as ttk import geodepy.transform as tf import geodepy.convert as cv import geodepy.constants as cs ''' The inputoutput module acts as the backend for the GUI and manages the calls to the GeodePy functions. Th...
#!/usr/bin/env python # coding: utf-8 #AL - the above code is new for the griffin paper version #modified print commands for python3 #Analyze read depth in comparison to transcription start import sys import argparse import numpy import scipy import scipy.stats import os.path import pysam import random # Calculate...
""" Example plugins for PgLogForward daemon. """ import datetime import re import socket import time import skytools from zmq.eventloop.ioloop import PeriodicCallback import cc.json from cc.daemon.pg_logforward import pg_elevels_atoi from cc.daemon.plugins.pg_logforward import PgLogForwardPlugin from cc.message impo...
""" * This file is part of PYSLAM * Adapted from https://github.com/tensorflow/models/blob/master/research/delf/delf/python/examples/extract_features.py, see the license therein. * * Copyright (C) 2016-present <NAME> <<EMAIL>> * * PYSLAM is free software: you can redistribute it and/or modify * it under the terms of...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from functools import wraps from datetime import datetime as dt import traceback from flask import current_app, request from flask_restful import abort from zpark import app from zpark.tasks import * def authorize_webhook(webhook_data): """ Authorize webhook requests so that only trusted users can issue com...
import os import time import random import argparse import datetime import numpy as np import torch import torch.utils.data import torchvision from ssd_logger import mllogger from mlperf_logging.mllog.constants import (SUBMISSION_BENCHMARK, SUBMISSION_DIVISION, SUBMISSION_STATUS, SSD, CLOSED, ONPREM, EVAL_ACCURAC...
import configparser import json import schedule from datetime import datetime import os import subprocess from etcd import EtcdKeyNotFound from etcd_client import write, get import sqlalchemy from sqlalchemy import Table, Column, String, select, cast from sqlalchemy.dialects.postgresql import JSONB #logging.basicConf...
#!/usr/bin/env python '''Convert BibTeX to HTML via YAML.''' import argparse import bibtexparser import re import string import sys import yaml from util import MONTHS # What do we know how to do? VERBS = { 'bib2md', 'bib2yml', 'yml2md' } def main(args): '''Main driver.''' config = parseArgs(...
#!/usr/bin/env python import wx #---------------------------------------------------------------------- ID_CopyBtn = wx.NewIdRef() ID_PasteBtn = wx.NewIdRef() ID_BitmapBtn = wx.NewIdRef() #---------------------------------------------------------------------- class ClipTextPanel(wx.Panel): def __in...
"""Utilities for using and building controllers. .. versionadded:: 0.9 """ import time from threading import Lock class TimedLooper: """A class to easily control how timed loops are run. Usage:: looper = TimedLooper(dt=0.01) while looper: ... do stuff ... if need to ...
from itertools import accumulate import numba import numpy as np from matplotlib import pyplot as plt from scipy.optimize import curve_fit from scipy import stats def do_rw(n=1000000, w=0.1, sigma=1): deltas = sigma * np.random.randn(n) x = np.array(list(accumulate(deltas, lambda x0, xi: x0 + xi - w * x0)))...
from __future__ import absolute_import, division, print_function # LIBTBX_PRE_DISPATCHER_INCLUDE_SH export PHENIX_GUI_ENVIRONMENT=1 # LIBTBX_PRE_DISPATCHER_INCLUDE_SH export BOOST_ADAPTBX_FPE_DEFAULT=1 import wxtbx.plots from libtbx.utils import Sorry, Abort, Usage from libtbx import group_args import wx import os imp...
# -*- coding: utf-8 -*- """ Created on Sun Nov 12 17:31:02 2017 @author: gianni """ import numpy as np class Flux0D(): '''Represents the computation of the flux when considering only a single direction''' def compute_flux_nu(self,tau_nu,source_function,solid_angle): '''Computes the observed flux in...
from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import webbrowser import random from kivy.app import App from kivy.clock import Clock from kivy.uix.popup import Popup from kivy.uix.button import Button from kivy.core.window import Window from kivy.core.text imp...
# plot import matplotlib.pyplot as plt import calendar import datetime from datetime import datetime as dt import csv import seaborn as sns import pandas as pd from tqdm import tqdm # 現在の年を取得 def get_year(): currentDateTime = datetime.datetime.now() date = currentDateTime.date() year = date.strftime("%Y")...
import collections import os import random import re import subprocess import sys from functools import reduce from pathlib import Path import six from pyspark.ml.linalg import DenseVector from pyspark.sql import DataFrame from pyspark.sql import functions as F from optimus import ROOT_DIR from optimus.infer import i...
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2020 FABRIC Testbed # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
# Import Vison API related libraries from ..utils.types import IIIF_Photo from ..utils.clean_text import clean_text from typing import List, Dict from google.cloud import vision from google.cloud.vision import types # Import urllib to read images import urllib.request as ur def add_tag(new_tags: List, tag_collection:...
import os import numpy as np import tvm from tvm import te from tvm import autotvm from tvm import relay import tvm.relay.testing from tvm.autotvm.tuner import XGBTuner, GATuner, RandomTuner, GridSearchTuner from tvm.contrib import utils, ndk from tvm.contrib.utils import tempdir import tvm.contrib.graph_runtime as run...
import os import numpy as np import cv2 from time import sleep # import scripts import proba from supermarket import Customer TILE_SIZE = 32 MARKET = """ ################## ##..............## #p..Bt..Is..dA..b# #l..Bg..IL..Te..a# #p..Kg..zP..Tm..f# #h..KS..zH..kc..u# #h..lS..iY..sO..o# ##...............# ##..C#..C#...
import unittest as ut from os.path import join, basename import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from netCDF4 import Dataset as NetCDF from wrf import get_proj_params from wrf.projection import getproj, RotatedLatLon, PolarStereographic PYNGL = True try: import Ngl except I...
#! /bin/env python # -*- coding: utf-8 -*- """ importer.py - """ import logging from io import StringIO from django.contrib import messages from django.http import HttpResponseBadRequest from django.template.response import TemplateResponse from django.urls import reverse from django.utils.html import format_html_join...
""" The ``mlflow.keras`` module provides an API for logging and loading Keras models. This module exports Keras models with the following flavors: Keras (native) format This is the main flavor that can be loaded back into Keras. :py:mod:`mlflow.pyfunc` Produced for use by generic pyfunc-based deployment tools ...
import numpy as np import pandas as pd from hyperts.utils import get_tool_box from hypernets.utils import logging logger = logging.get_logger(__name__) try: import matplotlib.pyplot as plt enable_mpl = True except: enable_mpl = False logger.error('Importing matplotlib failed. Plotting will not work.')...
import argparse import math import torch from torchvision import utils from model import EqualLinear, StyledGenerator @torch.no_grad() def get_mean_style(generator, device, dim=1024): mean_style = None for i in range(10): style = generator.mean_style(torch.randn(dim, 512).to(device)) if me...
# Copyright 2011 Brown University Robotics. # Copyright 2017 Open Source Robotics Foundation, Inc. # All rights reserved. # # Software License Agreement (BSD License 2.0) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Mar 27 23:49:14 2021 @author: <NAME> """ """ DESCRIPTION - TABLE CREATION FOR FURTHER ANALYSIS IN MULTIPLE COMPARATIVE ANALYSIS (several FLYCOP runs) Series of functions to apply in "MultipleComparativeAnalysis.py" script or others similar. Th...
import numpy as np # import image_registration as imreg import scipy.optimize as opt #import gaussfitter as gf import scipy.special as special # import ipdb def rotateXY(xvals, yvals, thetadeg = 0): theta = np.pi/180.0*thetadeg return (np.cos(theta)*xvals- np.sin(theta)*yvals, np.sin(theta)*xvals...
# vim: set fileencoding=utf-8 : # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Insecure.Com LLC. ...
from builtins import str from builtins import object import unicodecsv from openelex.base.load import BaseLoader from openelex.models import RawResult from openelex.lib.insertbuffer import BulkInsertBuffer from openelex.lib.text import ocd_type_id from .datasource import Datasource """ Pennsylvania elections have pre...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 <NAME> #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 #Unless required by applic...
import os.path import sys from glad.lang.common.generator import Generator from glad.lang.common.util import makefiledir if sys.version_info >= (3, 0): from io import StringIO basestring = str else: from StringIO import StringIO def _gl_types(gen, f): f.write(''' GLdebugProc = procedure ( sou...
# -*- coding: utf-8 -*- # -------------------------------------------# # author: <NAME> # # email: <EMAIL> # # -------------------------------------------# import pytest import xmnlp xmnlp.set_model('/Users/seanlee/Workspace/xmnlp-models/') @pytest.fixture def lexical_da...
# -*- coding: utf-8 -*- from __future__ import print_function from itertools import combinations import numpy as np from scipy import stats import pandas as pd from lifelines.utils import group_survival_table_from_events from lifelines._statistics import concordance_index as _cindex def concordance_index(event_time...
""" SimSTB - Dateizugriff auf Analoger Funktionsgenerator SimSTB - Simulation digitaler und analoger Ein- und Ausgaben Das Modul Funktionsgenerator stellt drei Klassen zur Realisierung des analogen Funktionsgenerators zur Verfügung. 1. In der Klasse GeneratorGUI wird ein Toplevel-Fenster erzeugt, in d...
from save_data import save_data from bs4 import BeautifulSoup import pandas as pd import requests import re # Url to RA website used to build links for each promoter base_url = 'https://www.residentadvisor.net' # Headers to mimic browser behavior headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64...
from objdetecteval.metrics.iou import iou import pandas as pd from typing import List __all__ = [ "get_inference_metrics", "summarise_inference_metrics", "match_preds_to_targets", "get_inference_metrics_from_df" ] def get_inference_metrics_from_df(predictions_df, labels_df): matche...
import csv from collections import Counter, namedtuple import numpy as np from numpy import nan CONTRIBUTOR_TEMPLATE = namedtuple("Contributor", ["name", "first_name", "last_name", "prefix", "domain"]) def wfi_levenshtein(string_1, string_2): """ Calculates the Levenshtein distance between two strings. This...
# -*- coding: utf-8 -*- """ Created on Tue Dec 22 14:56:13 2015 The Huber_braun neuronal model function @author: porio """ import numpy as np from numba import jit,float64 # PARAMETERS -- Must be defined first to allow numba compile # Node parameters # Any of them can be redefined as a vector of length nnodes gd = 2....
"""Advent of Code 2018 Day 17.""" from collections import deque import re CLAY = '#' SAND = '.' WATER = '|' REST_WATER = '~' SPRING = '+' def main(file_input='input.txt'): lines = [line.strip() for line in get_file_contents(file_input)] clays = parse_clays(lines) boundaries = get_boundaries(clays) b...
import numpy as np import tensorflow as tf from tensorflow.keras.layers import Dense from tf2rl.algos.policy_base import OffPolicyAgent from tf2rl.networks.noisy_dense import NoisyDense from tf2rl.envs.atari_wrapper import LazyFrames from tf2rl.misc.target_update_ops import update_target_variables from tf2rl.misc.hube...
######################################################################################################################## # This script reads in the new gold standard and compairs it to the BookNLP output files # The data used here consists of only the 12 overlapping novels with their respecive overlapping # parts of th...
from genericpath import exists from operator import mul import subprocess import torch.onnx import torch import numpy as np import os def torch_to_onnx(net, input_shape, out_name="out/model.onnx", input_names=["input0"], output_names=["output0"], device="cpu"): batch_size = 1 if len(input_shape) == 3: ...
# Contains all actions that the Python component can execute on behalf of the Java component. # author: <NAME> """ Originally, Gilles split the code below across 3 files: client, server, inputhandler. We did notice that this would lead to some ghost threads being spawned due to recursive imports. Thus, to limit the num...
# ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
"""Train found model on ImageNet dataset.""" import argparse import glob import logging import os import sys import time ############# APEX ############# from apex.parallel import DistributedDataParallel as DDP from apex.fp16_utils import to_python_float ################################ import numpy as np import torc...
# # Copyright (c) 2021 Project CHIP 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 or agreed to i...
# pylint: disable=too-many-arguments # TODO: user_id should be injected every request in api instances, i.e. a new api-instance per request import logging from collections import deque from typing import Callable, Deque, Dict, List, Union from uuid import UUID from fastapi import APIRouter, Depends from models_librar...
#!/usr/bin/env python import re from pathlib import Path import luigi from .bcftools import NormalizeVcf from .core import VanqcTask class DownloadFuncotatorDataSources(VanqcTask): dest_dir_path = luigi.Parameter(default='.') gatk = luigi.Parameter(default='gatk') n_cpu = luigi.IntParameter(default=1) ...
from re import search import disnake from disnake.ext import commands from utils.bot import Bot from utils.constants import CLAN_ROLES from utils.events import ON_BUTTON_CLICK from utils.forms import ClanApplicationForm, ReasonForm from utils.utils import extract_regex from utils.views import ClansButtonsView class...
import os import sys import argparse import torch from torch.utils.data import Dataset, DataLoader, TensorDataset from pytorch_lightning.plugins import DDPPlugin from pytorch_lightning import LightningModule, Trainer, seed_everything import torch.optim as optim from transformers import BertForSequenceClassification,...
from pyrsistent import pmap from . import logger from . import types class UnifyError(Exception): def __init__(self, t1, t2): self.t1 = t1 self.t2 = t2 super().__init__(f"cannot unify {t1} and {t2}") class Visitor: "抽象構文木をたどり型推論を行うVisitorクラス" def __init__(self, extenv): ...
# Copyright 2017 The Forseti Security 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 ap...
import os import sys import subprocess import logging import tempfile import shutil from multiprocessing.pool import ThreadPool from translate import FrameworkUpgrader class BitcodeBuildFailure(Exception): """Error happens during the build""" pass class LogFormatter(logging.Formatter): """Customized l...
import cv2 import numpy as np import math import _utils import argparse import os.path # A simple convolution function that returns the filtered images. def getFilterImages(filters, img): featureImages = [] for filter in filters: kern, params = filter fimg = cv2.filter2D(img, cv2.CV_8UC3, ker...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from bitarray import bitarray from netaddr import * import cfgm_common.exceptions class AddrMgmtError(Exception): pass # end class AddrMgmtError class AddrMgmtSubnetUndefined(AddrMgmtError): def __init__(self, vn_fq_name): self.v...
#!/Hellusr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 25 10:45:57 2020 @author: heiko """ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer import time from COERbuoy.simulation import start_simu, reg_wave, bretschneider_wave, decay_test; import numpy as np; import os.path import ...
import os from unittest import mock import posixpath import pytest from mlflow.store.artifact.mlflow_artifacts_repo import MlflowArtifactsRepository from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository from mlflow.exceptions import MlflowException @pytest.fixture(scope="module", aut...
import glob import os from . import BOTOCORE_ROOT from .compat import json from .compat import OrderedDict from .exceptions import ApiVersionNotFoundError from .exceptions import DataNotFoundError def cachable(func): """ A convenient decorator for getting the data (either from the cache or populating the...
""" Module containing manifolds of fixed rank matrices. """ from __future__ import division import numpy as np from pymanopt.manifolds.manifold import Manifold from pymanopt.manifolds import Stiefel class FixedRankEmbedded(Manifold): """ Note: Currently not compatible with the second order TrustRegions sol...
import re from datetime import datetime from typing import Optional, Pattern from localstack.testing.snapshots.transformer import ( JsonpathTransformer, KeyValueBasedTransformer, RegexTransformer, ResponseMetaDataTransformer, ) PATTERN_UUID = re.compile( r"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]...
import re import random import string from datetime import datetime from pytz import UTC def to_utc(dt): if not isinstance(dt, datetime): dt = datetime(dt.year, dt.month, dt.day) if dt.tzinfo is None: return UTC.localize(dt) else: return dt.astimezone(UTC) source = string.ascii_low...
import os import re import cmakeutil import gitutil from setuptools import Extension from pathlib import Path as _Path, PurePath as _PurePath from distutils import sysconfig class CMakeBuilder: path = cmakeutil.findexe("cmake") default_setup_data_files = [ "cmakecommands.py", "cmakebuilder.py...
from rfc3339 import rfc3339 class Activity(object): actor = None object = None target = None verb = None time = None generator = None icon_url = None service_provider = None links = None def __init__(self, actor = None, object = None, target = None, verb = None, time = None, ge...
############################################################# # <NAME> # # Hartree-Fock Theory # # Python Coding Example # ############################################################# impo...
# -*- coding: utf-8 -*-" import argparse import errno import glob import json import logging import os import os.path import subprocess import sys from contextlib import contextmanager logging.basicConfig() LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) ROOT_DIR = os.path.dirname(os.path.abspath(_...
import numpy as np from tqdm import tqdm import pandas as pd import plotly.express as px # ███████╗██╗ ██╗███████╗ ██████╗██╗ ██╗████████╗██╗ ██████╗ ███╗ ██╗ # ██╔════╝╚██╗██╔╝██╔════╝██╔════╝██║ ██║╚══██╔══╝██║██╔═══██╗████╗ ██║ # █████╗ ╚███╔╝ █████╗ ██║ ██║ ██║ ██║ ██║██║ ██║██╔██╗ ...
import requests from colorama import Fore, init from threading import Thread import random, time, names, string, json, os from threading import Lock from random import choice s_print_lock = Lock() def s_print(*a, **b): """Thread safe print function""" with s_print_lock: print(*a, **b) def log(tag,...
from sklearn.neighbors import DistanceMetric from .utils.distance import distance import numpy import pandas import matplotlib.pyplot as plt from sklearn.base import BaseEstimator ####################################################################### class RiemannDistanceMetric(DistanceMetric): def __init__(s...
"""A widget for surface-warped neuroimaging data.""" from __future__ import print_function import os from collections import defaultdict from xml.parsers.expat import ExpatError import ipyvolume.pylab as p3 import matplotlib.pyplot as plt import nibabel as nb import numpy as np from IPython.display import display fro...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#coding: utf-8 import time ADDR=0x77 # this value is necessary to calculate the correct height above sealevel # its also included in airport weather information ATIS named as QNH # unit is hPa QNH=1020 # power mode # POWER_MODE=0 # sleep mode # POWER_MODE=1 # forced mode # POWER_MODE=2 # forced mode POWER_MODE=3 #...
# -*- coding: utf-8 -*- # Detector with Multi Scale and Orientation (MSO) import math import tensorflow as tf from common.tf_layer_utils import * from common.tf_train_utils import get_activation_fn def building_block(inputs, out_channels, projection_shortcut, stride, ...
from __future__ import division import contextlib import json import numbers try: import requests except ImportError: requests = None from jsonschema import _utils, _validators from jsonschema.compat import ( Sequence, urljoin, urlsplit, urldefrag, unquote, urlopen, str_types, int_types, iteritems, l...
import time import unittest import dash import plotly import dash_html_components as html from dash import authentication, plotly_api import six from six.moves import http_cookies from six import iteritems if six.PY3: from unittest import mock else: import mock # This is a real live access token associated w...
import os import sys import glob import h5py import open3d as o3d import numpy as np from scipy.spatial.transform import Rotation from torch.utils.data import Dataset # Part of the code is referred from: https://github.com/charlesq34/pointnet def download(): BASE_DIR = os.path.dirname(os.path.abspat...
# 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 portions of this softwar...
#!/usr/bin/python import pycarwings2 import time from ConfigParser import SafeConfigParser import logging import sys import pprint import paho.mqtt.client as mqtt import schedule from datetime import datetime import os config_file = 'config.ini' logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.in...
from rdkit import Chem from rdkit.Chem import MolSurf as MOE , Descriptors from rdkit.Chem.EState import EState_VSA as EVSA def getLabuteASA(mol): return Descriptors.LabuteASA(mol) def getTPSA(mol): return Descriptors.TPSA(mol) def getSlogP_VSA1(mol): return Descriptors.SlogP_VSA1(mol) def getSlogP_VSA2...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from recipe_engine.recipe_api import Property DEPS = [ 'depot_tools/bot_update', 'file', 'depot_tools/gclient', 'recipe_engine/json', 'recipe_engi...
""" This file handles argument parsing and loading/serialization for all scripts in this repository. """ from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter import subprocess import json import os import shutil import torch def current_git_hash(): """ Get the hash of the latest commit in this...
__author__ = "<NAME> (<EMAIL>)" __copyright__ = "Copyright 2014, Washington University in St. Louis" __credits__ = ["<NAME>", "<NAME>", "<NAME>"] __license__ = "XNAT Software License Agreement " + \ "(see: http://xnat.org/about/license.php)" __version__ = "2.1.1" __maintainer__ = "<NAME>" __email__ = "<EM...
""" Copyright 2018 EPAM Systems, 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 or agreed...
# Unless explicitly stated otherwise all files in this repository are licensed # under the 3-clause BSD style license (see LICENSE). # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. import copy import logging import os import subprocess import f...
# #create one label # #update it with images # #create callback for mouse hover and click # #register the clicked point # #use a button for operations on registered pixel coord import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QLabel, QSlider from PyQt5.QtGui import QIcon, QImage, QPixmap from ...
import uuid import enum import api.flash from collections import namedtuple import hashlib try: # is this really how imports like this is supposed to work? from bits.hwaddress import HWAddress from bits.target_errno import TargetErrno except ModuleNotFoundError: from hwaddress import HWAddress from...
""" Code adapted from https://github.com/UKPLab/sentence-transformers """ import csv import gzip import os from typing import Union, List from torch.utils.data import Dataset from typing import List import torch import logging from tqdm import tqdm class InputExample: """ Structure for one input example with...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Test the discrete_domain utilities. Caveat assumes that the MNI template image is available at in ~/.nipy/tests/data In those tests, we often access some ROI directly by a fixed index instead of using...
import os import numpy as np import numpy.testing as npt import numpy.testing.decorators as dec from scipy.signal import signaltools from scipy import fftpack import nitime from nitime import algorithms as tsa from nitime import utils as ut #Define globally test_dir_path = os.path.join(nitime.__path__[0], 'tests') ...
import sys import subprocess import commands import os import six import copy import argparse import time import random from utils.stream import stream_by_running as get_stream_m from utils.args import ArgumentGroup, print_arguments, inv_arguments from finetune_args import parser as finetuning_parser from extend_pos i...
from abc import ABCMeta, abstractmethod import logging import glfw import numpy import vispy.util.transforms as transform from OpenGL.GL import * import shader as shader_class from configuration import shaders import openglUtils logging.basicConfig() class Program(metaclass=ABCMeta): """ A program is a pr...
import pytest import pathlib import uproot from tdub.data import ( SampleInfo, Region, avoids_for, branches_from, categorize_branches, features_for, selection_for, selection_branches, selection_as_numexpr, selection_as_root, ) from tdub.config import ( FEATURESET_1j1b, ...