text stringlengths 8.04k 46.5k |
|---|
# Copyright 2016 Stanford University
#
# 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 w... |
import time
import collections
import Qt
from Qt import QtWidgets, QtCore, QtGui
import qtawesome
from openpype.style import (
get_objected_colors,
get_default_tools_icon_color,
)
from openpype.tools.flickcharm import FlickCharm
from .views import (
TreeViewSpinner,
DeselectableTreeView
)
from .widge... |
# ---
# jupyter:
# jupytext:
# formats: ipynb,py
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.6.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# ## Telecom Churn Case Study
#... |
'''Copyright 2018 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, ... |
import torch
import numpy as np
import pandas as pd
import sacred
from datetime import datetime
import h5py
import feature.util as util
dataset_ex = sacred.Experiment("dataset")
@dataset_ex.config
def config():
# Path to reference genome FASTA
reference_fasta = "/users/amtseng/genomes/hg38.fasta"
# Path ... |
import concurrent.futures
import json
import time
from pathlib import Path
import pytest
import web3
from eth_bloom import BloomFilter
from eth_utils import abi, big_endian_to_int
from hexbytes import HexBytes
from pystarport import cluster, ports
from .utils import (
ADDRS,
CONTRACTS,
KEYS,
Greeter,
... |
"""MPS.py: Class definition for Matrix Product State object."""
import numpy as np
import scipy.sparse.linalg.eigen.arpack as arp
import sys
import time
import scipy.sparse as sps
import scipy as sp
def dag(x):
return np.transpose(np.conj(x))
class MatrixWrapper(object):
"""
Class the wraps a given mat... |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# erode.py -- a script to simulate erosion of height fields
# (c) 2014 <NAME> (varkenvarken)
# with some modifications by <NAME> (nerk)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as publ... |
#!/usr/bin/env python
import asyncio
import urwid # type: ignore
import argparse
import atexit
import os
import sys
import logging
from typing import Tuple
from numpy.linalg import inv # type: ignore
from numpy import dot, array # type: ignore
from opentrons import types
from opentrons.hardware_control import API, ... |
import tensorflow as tf
import pickle
from methods.dpf import DPF
from methods.rnn import RNN
from utils.data_utils import load_data, noisyfy_data, make_batch_iterator, reduce_data
from utils.exp_utils import get_default_hyperparams
from utils.method_utils import compute_sq_distance
from utils.plotting_utils import plo... |
# -*- coding: utf-8 -*-
from gluon import current
from s3 import *
from s3layouts import *
try:
from .layouts import *
except ImportError:
pass
import s3menus as default
RC = {"organisation_type.name" : "Red Cross / Red Crescent"}
# ============================================================================... |
"""
Test-time optimization to fit to observations using HuMoR as a motion prior.
This is a 3-stage optimization. Stages 1 & 2 are initialization that DON'T use the motion prior,
and stage 3 is the main optimization that uses HuMoR.
"""
import sys, os
cur_file_path = os.path.dirname(os.path.realpath(__file__))
sys.p... |
"""
Open compressed files transparently.
"""
__all__ = [
"xopen",
"PipedGzipReader",
"PipedGzipWriter",
"PipedIGzipReader",
"PipedIGzipWriter",
"PipedPigzReader",
"PipedPigzWriter",
"PipedPythonIsalReader",
"PipedPythonIsalWriter",
"__version__",
]
import gzip
import sys
import... |
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import numpy as np
import os
from collections import OrderedDict
from nuscenes.nuscenes import NuScenes
from nuscenes.utils.geometry_utils import view_points
from os import path as osp
from pyquaternion import Quaternion
from shapely.geometry import MultiPoint... |
#! /usr/bin/env python2
import numpy as np
import sys,os,time
import argparse
import cv2
from chumpy import ch
from scipy import optimize
sys.path.append(os.environ['MRFLOW_HOME'])
# Local imports
from utils import flow_homography as fh
from utils import plot_debug as pd
from utils import print_exception as pe
fr... |
# coding: utf8
""" Implementation of exotic DPP objects:
- Uniform spanning trees :class:`UST`
- Descent procresses :class:`Descent`:
* :class:`CarriesProcess`
* :class:`DescentProcess`
* :class:`VirtualDescentProcess`
- :class:`PoissonizedPlancherel` measure
.. seealso:
`Documentation on ReadTheDo... |
# -*- coding: utf-8 -*-
"""
Convert a PSD file to/from nested layers.
"""
from collections import OrderedDict
import sys
import numpy as np
import six
from .. import core
from .. import enums
from .. import image_resources
from .. import layers as mlayers
from .. import path
from .. import tagged_block
from .. ... |
# file: __init__.py
#===============================================================================
# Copyright 2014-2018 Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to ... |
#! /usr/bin/env python
from __future__ import print_function
import sys
from concurrent.futures import ThreadPoolExecutor, wait
from cyvcf2 import VCF
HOM_ALT = 3
GT_UNKNOWN = 2 #this isn't used, just stated for clarity
HET = 1
HOM_REF = 0
SEX_KEY = {"male": 1, "female": 2}
QUIET_MODE = False
grch37_par1 = {
"x"... |
###### It is just for research purpose, and commercial use is not allowed!! ######
import numpy as np
import cv2
from multiprocessing import Process, Queue, Manager, Value
import time
import dlib
import os
from scipy.signal import find_peaks
import heartpy as hp
import matplotlib.pyplot as plt
from... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import torch.nn.functional as F
import cv2
import math
import numpy as np
from eino... |
# Copyright (c) 2020 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
#
# Un... |
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization
# Copyright (C) 2020-2021, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
import logging
import re
import sys
from io import StringIO
from random import randint
f... |
"""
Tool to enable the development of a GP model based on an AIMD
trajectory with many customizable options for fine control of training.
Contains methods to transfer the model to an OTF run or MD engine run.
Seed frames
-----------
The various parameters in the :class:`TrajectoryTrainer` class related to
"Seed frame... |
import itertools
import numpy as np
import pytest
from alphago.games.noughts_and_crosses import (NoughtsAndCrosses, UltimateNoughtsAndCrosses,
UltimateGameState, UltimateAction)
from .constants import (expected_next_states_list, non_terminal_states, actions_to_binary_lis... |
# -*- coding: utf-8 -*-
import re
from calendar import monthrange
from datetime import datetime
from time import sleep
import numpy as np
import pandas as pd
import requests
from bs4 import BeautifulSoup
from fake_headers import Headers
from nordvpn_switcher import initialize_VPN, rotate_VPN, terminate_VPN
from Goog... |
from spikeextractors import RecordingExtractor
from spikeextractors import SortingExtractor
import numpy as np
from pathlib import Path
from copy import copy
from spikeextractors.extraction_tools import check_get_traces_args, check_get_unit_spike_train
try:
import exdir
import exdir.plugins.quantities
impo... |
import logging
from .io import get_file
logger = logging.getLogger(__name__)
def load_tox21(featurizer='ECFP'):
import deepchem as dc
# Featurize Tox21 dataset
tox21_tasks = [
'SR-HSE',
'SR-MMP',
'SR-ATAD5',
'NR-PPAR-gamma',
'NR-ER-LBD',
'NR-Aromatase',... |
def roundcount(round):
rc = { 1: 0x01, 2: 0x02, 3: 0x04, 4: 0x08, 5: 0x10, 6: 0x20, 7: 0x40, 8: 0x80, 9: 0x1B, 10: 0x36}
return rc[round]
def xor_8(a,b):
if(type(a) != bytearray or type(b) != bytearray): raise ValueError("types should be bytearray, they are ", type(a), type(b))
if(len(a) != 1 or len(b)... |
import unittest
from random import random
from math import atan2, isnan, copysign
import operator
INF = float("inf")
NAN = float("nan")
# These tests ensure that complex math does the right thing
class ComplexTest(unittest.TestCase):
def assertAlmostEqual(self, a, b):
if isinstance(a, complex):
... |
import itertools
import re
import sys
from functools import partial
from docutils import nodes, utils
from docutils.parsers.rst import roles
import six
from .models import Issue, ISSUE_TYPES, Release, Version, Spec
from .line_manager import LineManager
from ._version import __version__
def _log(txt, config):
""... |
#!python3
"""
A tree in which each node is an agent category,
and each path from root to leaf is a recipe.
For more information on tree implementations in Python, see here:
https://stackoverflow.com/q/2358045/827927
"""
import collections
import logging
import sys
from typing import *
from anytree import NodeMixin,... |
"""Experiment Manager: A tool for managing deep learning experiments."""
import argparse
import datetime
import os
from os import path as osp
import shelve
import shutil
import sys
import pygit2
GIT_UNCH = {pygit2.GIT_STATUS_CURRENT, pygit2.GIT_STATUS_IGNORED}
EM_KEY = '__em__'
E_BRANCH_EXISTS = 'error: branch "{}... |
import importlib
import subprocess
import sys
import os
from copy import deepcopy
from dataclasses import dataclass
from logging import warning
from glob import glob
from typing import Any
from enum import Enum, auto
from generalsmodbuilder.build.common import ParamsToArgs
from generalsmodbuilder.build.copy import Buil... |
"""
Models for supervised meta-learning.
"""
import numpy as np
import tensorflow as tf
import random
UNK = "$UNK$"
NUM = "$NUM$"
NONE = "O"
#DEFAULT_OPTIMIZER = partial(tf.train.AdamOptimizer, beta1=0)
_BIAS_VARIABLE_NAME = "bias"
_WEIGHTS_VARIABLE_NAME = "kernel"
def softmax(x):
return np.exp(x) / np.sum(... |
from convokit.model import Corpus, Utterance, Speaker
# test utterances
GRATITUDE = 'I really appreciate that you have done them. Thanks a lot.'
DEFERENCE = 'Nice work so far on your rewrite.'
GREETING = 'Hey, how are you doing these days?'
APOLOGY = 'Sorry to bother you, but I need someone to work on this project.'
... |
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from easydict import EasyDict as edict
import logging
logger = logging.getLogger(__name__)
class LabelSmoothingLoss(nn.Module):
"""
With label smoothing,
KL-divergence between q_{smoothed ground truth prob.}(w)
and p_{prob.... |
#!/usr/bin/python2.7
# -*- 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) a... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... |
#!/usr/bin/python3
import copy
import itertools
import math
import os
import types
import numpy as np
def parseGauFile(gauFile:str):
with open(gauFile,"rt") as f:
fileAsList = f.readlines()
lIdx=0
orbitalFits = list()
nlPPFits = list()
weightFits = list()
outDict = dict()
outDict["orbitals"] = None
outDi... |
#! /usr/bin/env python3
import argparse
import usb.core
import usb.util
import array
import sys
import hashlib
import csv
from progressbar.bar import ProgressBar
class PrecursorUsb:
def __init__(self, dev):
self.dev = dev
self.RDSR = 0x05
self.RDSCUR = 0x2B
self.RDID = 0x9F
... |
from __future__ import print_function
import os
import argparse
import socket
import time
import sys
import torch
import torch.optim as optim
import torch.nn as nn
import torch.backends.cudnn as cudnn
from torch.utils.data import DataLoader
import torch.nn.functional as F
import math
from cifar import CIFAR100, Met... |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# file from https://github.com/Nircek/nr4c-editor
# licensed under MIT license
'''
MIT License
Copyright (c) 2018 Nircek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to... |
'''
COPYRIGHT STATUS:
Dec 1st 2001, Fermi National Accelerator Laboratory (FNAL) documents and
software are sponsored by the U.S. Department of Energy under Contract No.
DE-AC02-76CH03000. Therefore, the U.S. Government retains a world-wide
non-exclusive, royalty-free license to publish or reproduce these documents
an... |
import numpy as np
import pandas as pd
from sklearn import svm
from sklearn.ensemble import RandomForestClassifier
import tensorflow as tf
from scipy.stats import norm
from sklearn.neighbors import KNeighborsClassifier
from sklearn.neighbors import NearestNeighbors
from sklearn.neural_network import MLPClassifier
fro... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2018 <NAME>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the ho... |
#!/usr/bin/env python
# <NAME>
# Classes for running Rosetta on a cluster using pre-defined sets of options stored in Json file.
# Used by itself or subclassed for benchmarking.
# Can also use in other code by passing the parser to RunRosetta.
import os
import sys
from collections import defaultdict
import argparse
f... |
# Copyright 2019 <NAME>. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... |
#------------------------------------------------------------------------------
#
# Copyright (c) 2014-2015, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions descri... |
## UnitName
## by Ruff_Hi
## for BUG Mod
##-------------------------------------------------------------------
## Naming Convention
## - ^civ4^ - no naming convention, uses standard civ4
## - ^rd^ - random name
## - ^rc^ - random civ related name
## - ^ct^ - City
## - ^cv^ - Civilization
## - ^ut^ - uni... |
"""
Module containing helper functions such as overlap sum and Fourier kernels generators
"""
import sys
import torch
from torch.nn.functional import conv1d, fold
import numpy as np
from time import time
import math
from scipy.signal import get_window
from scipy import signal
from scipy.fftpack import fft
import warn... |
#!/usr/bin/env python
from __future__ import print_function, division
import sys
import numpy as np
import os
import argparse
import uuid
import subprocess
import re
import shlex
def read_xvg(file_handle):
"""Parses XVG file legends and data"""
_ignored = {'legend', 'view'}
_re_series = re.compile('s[0-9... |
"""
Copyright 2020 KableKompany
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, subl... |
from models.misc import *
from torch import nn
nyu_class = ['wall','floor','cabinet','bed','chair','sofa','table','door','window','bookshelf','picture','counter','blinds','desk','shelves','curtain','dresser','pillow','mirror','floor mat','clothes','ceiling','books','refridgerator','television','paper','towel','shower c... |
from allennlp.training import Trainer, GradientDescentTrainer, BatchCallback, EpochCallback
# Authors Note: Significant chunks of code are taken directly from AllenNLP
# This is because we need to modify the Trainer class to work for Meta models
from allennlp.models import Model
from typing import List, Optional, Dict... |
#!/usr/bin/env python
from load import ROOT as R
import numpy as N
from gna import constructors as C
from gna.bindings import common
from matplotlib import pyplot as P
from mpl_tools.helpers import savefig, add_to_labeled_items, plot_hist
from gna.graphviz import savegraph
from gna.env import env
from matplotlib.backe... |
import cv2
import numpy as np
import math
import os
import glob
from PLY import PLY
from PointCloudTable import PointCloudTable
input_dir = "../Resources/Fountain/"
output_dir = "F:/Projects/Github/Major-Project-2020/Output/xyz"
format_img = ".jpg"
def KeyPointsToPoints(keypoints):
out = []
for kp in keypoint... |
#!/usr/bin/env python
###################################
# Author: <NAME>
# Licence: wxWindows licence
###################################
import os
import re
import sys
import builder
import glob
import optparse
import platform
import shutil
import types
import subprocess
# builder object
wxBuilder = None
# other... |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 18 08:51:21 2020
@author: Licheng
"""
import glob,os,ase,shutil
from openbabel.pybel import (readfile,Outputfile)
import numpy as np
from rdkit import Chem
from rdkit.Chem import AllChem
from dscribe.descriptors import SOAP
from ase.io import read
#%%
# s... |
from bs4 import BeautifulSoup
import requests
import boto3
import random
import datetime
import json
class CrawlingFunction():
def subway(self, station):
try:
header = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ... |
import argparse
import os, time
import torch
import shutil
import numpy as np
import torch.nn as nn
import torchvision.transforms as transforms
import torchvision.datasets as datasets
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
import models
import optim
import torch.... |
"""Nodes in the AST which represent statements or declarations."""
import shivyc.ctypes as ctypes
import shivyc.il_cmds.control as control_cmds
import shivyc.il_cmds.value as value_cmds
import shivyc.token_kinds as token_kinds
import shivyc.tree.decl_nodes as decl_nodes
from shivyc.ctypes import (PointerCType, ArrayCT... |
#
# Copyright 2015-2018 University of Southern California
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
#
from deriva.core import PollingErmrestCatalog, HatracStore, urlquote, get_credential, DEFAULT_CREDENTIAL_FILE
from volspy.util import load_image
import sys
import traceback
import plat... |
r"""
Fitting Data (:mod:`desicos.conecylDB.fit_data`)
==================================================
.. currentmodule:: desicos.conecylDB.fit_data
This module includes functions used to fit measured imperfection data.
"""
from random import sample
import os
import numpy as np
from numpy import sin, cos, pi, deg... |
########################################################################################
# This file is licensed under CC0: #
# #
# https://github.com/svenevs/nanogui-customizati... |
# Copyright (c) 2018 SONATA-NFV, 5GTANGO, Paderborn University
# 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 errno
import re
import signal
import time
import subprocess as ssubprocess
import sshuttle.helpers as helpers
import os
import sshuttle.ssnet as ssnet
import sshuttle.ssh as ssh
import sshuttle.ssyslog as ssyslog
import sys
import platform
from sshuttle.ssnet import SockWrapper, Handler, Proxy, Mux, MuxWrapper
f... |
#
# Copyright (c) 2021, 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 appl... |
from src import stopwords
from Elastic import searchIndex
from evaluation import evaluation_paper as evaluation
import csv
from nltk.corpus import wordnet as wn
import nltk
import re
import sys
import nltk
import time
from SPARQLWrapper import SPARQLWrapper, JSON
from multiprocessing.pool import ThreadPool
#import m... |
import os
import sys
import time
import numpy as np
__author__ = "<NAME> <<EMAIL>>"
__version__ = "v1.0"
class ElementalSFFTSubtract_Numpy:
@staticmethod
def ESSN(PixA_I, PixA_J, SFFTConfig, SFFTSolution=None, Subtract=False, NUM_CPU_THREADS_4SUBTRACT=8):
import pyfftw
pyfftw.config.NUM_THREA... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. py:currentmodule:: xray.mac.model.element_properties
.. moduleauthor:: <NAME> <<EMAIL>>
Properties of elements.
"""
###############################################################################
# Copyright 2021 <NAME>
#
# Licensed under the Apache License, Versi... |
"""
MIT License
Copyright (c) 2021 madboy482
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... |
import os, yaml
import numpy as np
from ROSCO_toolbox.ofTools.case_gen.CaseGen_General import CaseGen_General
from ROSCO_toolbox.ofTools.case_gen.CaseGen_IEC import CaseGen_IEC
from ROSCO_toolbox.ofTools.case_gen.HH_WindFile import HH_StepFile
# ROSCO
from ROSCO_toolbox import controller as ROSCO_controller
from ROS... |
from pydec.testing import *
from scipy import array,array,sparse,zeros,ones,eye,allclose,alltrue, \
isreal,real,dot,concatenate,factorial,comb,sqrt,shape,ix_
from scipy.linalg import eigvals,inv,det
from pydec.dec import simplicial_complex, regular_cube_complex
from pydec.mesh import simplex, regular_... |
from operator import (
# comparisons
lt, le, eq, ne, ge, gt,
# booleans
not_, truth,
# object identity
is_, is_not,
)
from collections import (
Callable,
Container,
Hashable,
Iterable,
Iterator,
Mapping,
MutableMapping,
MappingView,
ItemsView,
KeysV... |
import concurrent.futures as futures
from dataclasses import dataclass
from easydict import EasyDict as edict
import io
import numpy as np
import os
from pathlib import Path
import pickle
import tqdm
from typing import Optional, NamedTuple
from PIL import Image
import fire
import skimage.io
class SynthiaVideoDataset... |
#!/usr/bin/python
import vcf as pyvcf
import argparse
import os
import time
import collections
import sys
import multiprocessing as mp
import queue
import re
import numpy as np
import pysam
import configparser
# Set arguments
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(description='Put here a ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: efourrier
Purpose : This is a framework for Modeling with pandas, numpy and skicit-learn.
The Goal of this module is to rely on a dataframe structure for modelling g
"""
#########################################################
# Import modules and global h... |
#! /usr/bin/env python3
"""
PACER RSS feed scraper and reporter
========================================
----GENERIC VERSION----
To use this program for your own purposes, fork this and write your own
`make_notifier` (together with any custom notifiers) and `entry_filter`,
modify the main loop as necessary, an... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import assert_equals, assert_true, assert_false, assert_raises
from flaky import flaky
import time
import datetime
from decimal import Decimal
from amazon.api import (AmazonAPI,
CartException,
... |
# -*- coding: utf-8 -*-
"""
This file is part of the Shotgun Lipidomics Assistant (SLA) project.
Copyright 2020 <NAME> (UCLA), <NAME> (UCLA), <NAME> (UW).
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 Licen... |
# ============================================================================
#
# Copyright (C) 2007-2016 Conceptive Engineering bvba.
# www.conceptive.be / <EMAIL>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... |
#MIT License
#
#Copyright (c) 2017 <NAME>
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publ... |
"""This module is a command line script which lists the reference and/or
mapping files associated with the specified contexts by consulting the CRDS
server. More generally it's for printing out information on CRDS files.
"""
from __future__ import print_function
from __future__ import division
from __future__ import ... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Written by <NAME>
Utility functions to work with 3d_Rest Test
These functions create master lists to directories for data, converts DICOMs to NIFTI stacks, splits the data, saves to HDF5 for easier loading etc.
"""
import h5py
import os, glob, re
import nibabel as nib
... |
# -*- coding: utf-8 -*-
"""
Main wrapper of the caviar program
Contains: str2bool(), arguments(), printv(), and run()
"""
import sys, os
from caviar.prody_parser import parsePDB
from caviar.cavity_identification import *
from caviar.cavity_characterization import *
from caviar.misc_tools import *
from argparse import ... |
from collections import OrderedDict
from time import sleep
from IPython import get_ipython
from ipywidgets import Box
import ipywidgets
from traitlets.traitlets import List
# The below classes have been copied from
# the deprecated menpowidgets package
# MenpoWidget can be found in abstract.py
# LinearModelParametersW... |
import collections, random, sys, traceback
from dbsim import *
class EagerDoomedT1(AbortTransaction): pass
class EagerDoomedT2(AbortTransaction): pass
class PrecommitT2(AbortTransaction): pass
class ReadSkew(AbortTransaction):
'''Read and overwrote different versions'''
pass
class WriteSkew(AbortTransaction)... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Transforms and validates cros config from source YAML to target JSON"""
from __future__ import print_fun... |
# Author: <NAME>
# Date: Dec.01.2020
# Title: Graph-based Deep Generative Model version 3 (single batch only)
# Affiliation: JLK Genome Research Centre
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions.categorical import Categorical
import dgl
from functools import p... |
#!/usr/bin/env python
#
# edittransform.py - The EditTransformPanel class.
#
# Author: <NAME> <<EMAIL>>
#
"""This module provides the :class:`EditTransformPanel` (a.k.a. "Nudge")
class, a FSLeyes control panel which allows the user to adjust the
``voxToWorldMat`` of an :class:`.Image` overlay.
"""
import logging
imp... |
import os
from concurrent.futures import ThreadPoolExecutor
from copy import deepcopy
from dataclasses import dataclass
from functools import partial
from pathlib import Path
from typing import (
Any,
Callable,
Hashable,
Iterator,
List,
Mapping,
MutableMapping,
MutableSequence,
Optio... |
import sys, numpy
from numpy import sin, cos, log10, log2, sqrt, pi
from scipy.special import jv as besselj
sys.path.insert(0,'../Stage_0/')
from conversions import *
k_elect = 0.125 # proportionality constants
k_rotor = 0.125
from blade_wt_modelv2 import blade_wt_modelv2
from rotor_wt import rotor_weight
from ... |
import facefinder
import matplotlib.pyplot as plt
import time
from multiprocessing import Pool, Value
from functools import partial
from mpl_toolkits.axes_grid1 import make_axes_locatable
from collections import defaultdict
import networkx as nx
import numpy as np
import copy
import random
import math
import json
impor... |
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 <NAME> <<EMAIL>>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free Software F... |
import functools
import random
import string
import urllib.parse
import flask # PyPI: Flask
import flask_dance.contrib.discord # PyPI: Flask-Dance
import flask_dance.contrib.twitch # PyPI: Flask-Dance
import flask_login # PyPI: Flask-Login
import flask_wtf # PyPI: Flask-WTF
import jinja2 # PyPI: Jinja2
import pytz # P... |
#!/usr/bin/env python
import json
import os
import threading
import time
import Queue
import cStringIO as StringIO
import concurrent.futures
import numpy
import PIL.Image
import pizco
import matplotlib
import cv2
import scipy.misc
import scipy.ndimage
import itfbarcode
import itfbarcode.linescan
import montage
from... |
import asyncio
import json
import os
import random
import string
import time
from datetime import datetime
import aiohttp
import discord
import discord_slash
from discord.ext import commands
from discord_slash import cog_ext, SlashContext
from discord_slash.context import InteractionContext, ComponentContext
from disc... |
import binascii
import datetime
import gc
import glob
import importlib
import json
import logging
import os
import random
import shutil
import signal
import socket
import time
import traceback
from ssl import SSLError
import boto3
import psutil
import redis
import smart_open
import zmq
from azure.storage.blob import B... |
"""
Program to test text map-relative and view-relative placement.
Select what to show and experiment with placement parameters.
Usage: test_text_placement.py [-h|--help] [-d] [(-t|--tiles) (GMT|OSM)]
"""
import os
import sys
import wx
import pyslip
from appstaticbox import AppStaticBox
from rotextctrl import ROText... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.