text
stringlengths
6.04k
39.5k
#################### # ES-DOC CIM Questionnaire # Copyright (c) 2017 ES-DOC. All rights reserved. # # University of Colorado, Boulder # http://cires.colorado.edu/ # # This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT]. #################### from djan...
from datetime import timedelta from logging import getLogger import random from typing import Optional, Tuple from atoma.exceptions import FeedDocumentError from atoma.simple import simple_parse_bytes, Feed as ParsedFeed from django.contrib.auth import get_user_model from django.conf import settings from django.core.f...
#!/usr/bin/env python # Author: <NAME> #[2021-03-15] added early_stopping; moved load_data to utils; added more training history information # TODOs # - customize data path # - remove annealing option (as is defaultly implemented) # - activate input_dim and latent_dim arguments (currently only working for default val...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File for reading and setting configurations for the whole library. I will not pretend this config file is a good way to do things. But it is flexible, and works so far. I make no guarantees that this will not destroy your computer. Example config file: ``` ini [Paths]...
""" @author sanjeethr, oligoglot Implements SGDClassifier using FeatureUnions for Sentiment Classification of text It also has code to experiment with hyper tuning parameters of the classifier """ from __future__ import print_function import numpy as np import pickle import json from pprint import pprint from time im...
import os import sys from collections import namedtuple import numpy as np import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt from matplotlib.widgets import RectangleSelector from matplotlib.backends.backend_qt5agg import (FigureCanvasQTAgg as Fig...
#This is my final course project of CSC530. #It is a simulation study of interlocus gene conversion (IGC) between paralogs together with point mutation process during evolution on a single branch. Simulated shotgun sequencing reads are then simulated using the simulated sequence and then re-assembled. It aims at unders...
import sys sys.path.append('.') # stdlib import os from glob import glob from tqdm.auto import tqdm import json import pickle from collections import defaultdict import time import argparse # numlib import numpy as np import pandas as pd from ensemble_boxes import nms, weighted_boxes_fusion #from include import * f...
########################################################################################### # # # This sample shows how to evaluate object detections applying the following metrics: # # * Precision x Recall curve ----> ...
import sys import onnx import os import argparse import numpy as np import cv2 import onnxruntime import torch import matplotlib import matplotlib.pyplot as plt from PIL import Image, ImageDraw, ImageFont from utils.utils import non_max_suppression # Note: # 1. run export.py ---> .onnx # 2. run de...
#!/usr/bin/env python # # Copyright 2015 British Broadcasting Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Open Source under Apache License #To add additional decisions/candiates, add an additional boolean at line 128. from flask import Flask, request, render_template, redirect, url_for from flask_sqlalchemy import SQLAlchemy from algosdk import account, encoding, mnemonic from vote import * from algosdk.future.transactio...
#-*. coding: utf-8 -*- ## Copyright (c) 2008-2011, <NAME>; 2012, <NAME> ## All rights reserved. ## ## This file is part of Cinfony. ## The contents are covered by the terms of the BSD license ## which is included in the file LICENSE_BSD.txt. """ rdkit - A Cinfony module for accessing the RDKit from CPython Global ...
import abc from typing import Dict, List, Tuple import numpy import torch from scipy.spatial.qhull import Delaunay from surrogates.drivers import Driver from surrogates.likelihoods.likelihoods import Likelihood from surrogates.utils.distributions import Distribution from surrogates.utils.numpy import add_parameter_di...
import torch import copy from torch.nn import functional as F import torch.nn as nn from torch.nn.modules import Module from torch.nn.modules.dropout import Dropout from torch.nn.modules.linear import Linear from torch.nn.modules.normalization import LayerNorm from torch.nn.init import xavier_uniform_ from torch.nn.ini...
#!/usr/bin/env python # original source code -> https://github.com/omorobot/omoros # modified by <NAME> import sys import rospy import serial import io import math from time import sleep from sensor_msgs.msg import Imu, JointState from nav_msgs.msg import Odometry from geometry_msgs.msg import Twist, Pose, Point, Ve...
import numpy as np from .baseStacker import BaseStacker import warnings __all__ = ['BaseMoStacker', 'MoMagStacker', 'AppMagStacker', 'CometAppMagStacker', 'SNRStacker', 'EclStacker'] # Willmer 2018, ApJS 236, 47 # VEGA V mag and AB mag of sun (LSST-equivalent bandpasses) VMAG_SUN = -26.76 # Vega mag AB_SUN = { 'u': ...
"""Pydantic Models for the v1 API endpoints.""" from __future__ import annotations import datetime from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Optional from pydantic import BaseModel, Field, HttpUrl, SecretStr, validator from keeper.editiontracking import EditionTrackingModes from keeper.exceptions ...
import random import tensorflow as tf import numpy as np import pickle import seaborn as sns import matplotlib.pyplot as plt from joblib import Parallel, delayed from math import log2, ceil from proglearn.forest import LifelongClassificationForest from proglearn.sims import generate_spirals def plot_spirals(spiral1, ...
#!/usr/bin/env python3 # vim: set fileencoding=utf-8 : # Standard library from urllib.parse import urljoin, urlsplit import argparse import sys import time import traceback import os # Third-party from bs4 import BeautifulSoup import grequests # WARNING: Always import grequests before requests from junit_xml import ...
#对比ecl prt中trans结果与cloud trans结果,NNC要实用 'ALLNNC' ##参数 PRTPATH = r"C:\Users\shixi\Documents\newLandProj\zaoyuan\SimCases\C_project\C\C.PRT" CLOUDTRANSPATH=r"C:\Users\shixi\Desktop\trans.test" NX=71 NY=140 NZ=42 ##PRTPATH = r"C:\Users\shixi\Desktop\cases\ZhanJiang\BASE_newC\BASE_newC.PRT" ##CLOUDTRANSPATH=r"C:\User...
from fontTools.ttLib import TTFont from fontTools.misc.py23 import basestring from defcon import Font from ufo2ft.outlineCompiler import OutlineTTFCompiler, OutlineOTFCompiler from fontTools.ttLib.tables._g_l_y_f import USE_MY_METRICS from ufo2ft import compileTTF import unittest import os def getTestUFO(name='TestFo...
# flake8: noqa import itertools as it from math import ceil, floor from copy import deepcopy import logging from whatshap.core import Read, ReadSet from whatshap.cli.compare import compute_switch_flips_poly_bt """ This class is exclusively used for debugging and development. """ """ This method only works for a tes...
#region Imports # HTTP requests and url parsing import requests import aiohttp import webbrowser import http.server from urllib.parse import urlparse, parse_qs # Data formats import json import yaml from helpers.ArgHandler import Get_Args # Logging from logger.AppLogger import build_logger # Build the logger object...
import csv import os from glob import glob from typing import Any, Callable, Optional, Sequence, Tuple, Union import cv2 import numpy as np from PIL import Image import pytorch_lightning as pl import torch from torch import Tensor from torch.utils.data import DataLoader from torchvision.datasets import VisionDataset i...
#!/usr/bin/python from __future__ import print_function, absolute_import ####################################################################### # pyQRC.py # # A Python implementation of Silva and Goodman's QRC approach # # From a Gaussian frequency c...
#!/usr/bin/env python3 import argparse import json from pathlib import Path import re KEY_MAP = { "Color4DBgCanvasEx": "schematic.background", "Color4DBodyBgEx": "schematic.component_body", "Color4DBodyEx": "schematic.component_outline", "Color4DBrightenedEx": ...
# Copyright (c) 2020 Graphcore Ltd. All rights reserved. import numpy as np import popart import time import os import sys import json from tqdm import tqdm from collections import deque import ctypes import logging_util from deep_voice_model import PopartDeepVoice import deep_voice_data import conf_util...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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 from .. import _utilitie...
import numpy as np import pandas as pd from pprint import pprint import argparse from pytorch_pretrained_bert.tokenization import (BasicTokenizer, BertTokenizer, whitespace_tokenize) import collections import torch from torch.utils.data import TensorDataset from pytorch...
import numpy as np import pandas as pd MAE = pd.read_csv('/Data/MAE.csv',index_col=0).astype('float32') MSE = pd.read_csv('/Data/MSE.csv',index_col=0).astype('float32') HITS = pd.read_csv('/Data/HITS.csv',index_col=0).astype('float32') Fold1_Hits = HITS["Fold 1"] Fold2_Hits = HITS["Fold 2"] Fold3_Hits = HITS["Fold 3"...
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import copyreg import functools import inspect import operator import warnings from functools import reduce from weakref import WeakValueDictionary import funsor.ops as ops from funsor.ops.builtin import parse_ellipsis, parse_slice fr...
# Copyright (c) 2016, <NAME> # All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the BSD license. See the accompanying LICENSE file # or read the terms at https://opensource.org/licenses/BSD-3-Clause. from __future__ import absolute_import, div...
import pandas as pd import numpy as np import sys # outlier detection from statsmodels.stats.stattools import medcouple from sklearn.neighbors import LocalOutlierFactor from sklearn.preprocessing import StandardScaler from sklearn.ensemble import IsolationForest sys.path.append('../src/') from utils import log from u...
""" Access to the Soliscloud API for PV monitoring. Works for all Ginlong brands using the Soliscloud API For more information: https://github.com/hultenvp/solis-sensor/ """ from __future__ import annotations import hashlib #from hashlib import sha1 import hmac import base64 import asyncio from datetime import dateti...
# Copyright 2018-2020 Xanadu Quantum Technologies 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 applicabl...
from __future__ import unicode_literals import imghdr import os import io import shutil import struct import json import time import random from uuid import uuid4 from PIL import Image, ExifTags, ImageFilter from math import ceil from . import config def download_photo(self, media_id, filename, media=False, folder...
import math import torch import torch.nn as nn from torch import Tensor from torch.nn import TransformerEncoder, TransformerEncoderLayer from torch.nn import functional as F from torch.nn.modules.activation import MultiheadAttention from torch.nn.modules.dropout import Dropout from torch.nn.modules.normalization impor...
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # # Script to preprocess the raw annotation output to NP/object annotation files import os import sys import json import a...
# License for stat-archiver, originally found here: # https://github.com/parkerhoyes/stat-archiver # # Copyright (C) 2019 <NAME> <<EMAIL>> # # This software is provided "as-is", without any express or implied warranty. In # no event will the authors be held liable for any damages arising from the use of # this software...
import numpy as np import tensorflow as tf from tensorflow.keras import layers as tfkl from tensorflow_probability import distributions as tfd import tensorflow_probability as tfp from tensorflow.keras.mixed_precision import experimental as prec import common from models.set_transformer import TransformerLayer from mod...
#!/usr/bin/env python # # Author: <NAME> <<EMAIL>> # import unittest import numpy import numpy as np from pyscf import gto from pyscf.dft import rks import pyscf.dft from pyscf.pbc import gto as pbcgto from pyscf.pbc.dft import gen_grid from pyscf.pbc.dft import numint import pyscf.pbc pyscf.pbc.DEBUG = False def ...
# -*- coding: utf8 -*- from mathics.builtin.base import Builtin, Predefined, BinaryOperator, Test from mathics.core.expression import Expression, String, Symbol, Integer from mathics.core.rules import Pattern from mathics.builtin.lists import (python_levelspec, walk_levels, InvalidL...
# Copyright 2018-2020 Xanadu Quantum Technologies 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...
import collections import itertools import logging import pickle l = logging.getLogger("cooldict") l.addHandler(logging.NullHandler()) class FinalizedError(Exception): pass class BranchingDictError(Exception): pass default_max_depth = 200 default_min_depth = 100 # for speed, cause the ABC instancecheck is ...
import logging as lg import time from collections import defaultdict import matplotlib.collections import matplotlib.colors import networkx import tabulate from eppy.bunch_subclass import EpBunch from tqdm import tqdm from archetypal.plot import save_and_show from archetypal.template.zonedefinition import is_core, re...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jan 17 00:29:22 2021 @author: <NAME> """ """ DESCRIPTION - OUTPUT PARAMETERS ANALYSIS Script for output analysis which calculates: ratio of metabolites, each produced by one of the two microbes in the corsortium (final product / i...
import json import logging from typing import Iterator, Tuple, List from api import ontology from api.dsp import DataSubmissionPortal from api.ingest import IngestAPI from archiver.accessioner import Accessioner from archiver.converter import ConversionError, SampleConverter, ProjectConverter, \ SequencingExperime...
""" Title: Dense Passage Retriever on TPU Author: [<NAME>](https://twitter.com/ankur310794) Date created: 2021/06/24 Last modified: 2021/06/24 Description: Implement a Dense Passage Retriever using NQ-Wikipedia Dataset. """ """ ## Introduction Open-domain question answering relies on efficient passage retrieval to sele...
import torch import torch.nn as nn import torch.nn.functional as F from .segbase import SegBaseModel from .model_zoo import MODEL_REGISTRY from ..modules import _ConvBNReLU, SeparableConv2d, _A_ASPP, _FCNHead from ..config import cfg from IPython import embed import math from collections import OrderedDict import nump...
""" ========================== Author: <NAME> / <NAME> Year: 2019 ========================== This module contains a generic A* Path Finder, along with a specific test implementation. Originally written in Java by <NAME>: http://www.cokeandcode.com/main/tutorials/path-finding/ and converted to Python, with modification...
""" Ffjord lite: a minimal working example of Free-Form Jacobian of Reversible Dynamics Ffjord was introduced in: > <NAME>., <NAME>., <NAME>., <NAME>., & <NAME>. > (2018). Ffjord: Free-form continuous dynamics for scalable reversible > generative models. arXiv preprint arXiv:1810.01367. > https://arxiv.org/abs/1810.01...
import json import requests from creation_time_utils import get_formatted_current_time, get_crafting_cooldown_duration_in_days from creation_time_utils import load_next_creation_time_data from personal_info import get_cookie_dict, update_and_save_cookie_to_disk_if_values_changed from utils import convert_listing_hash...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: <NAME> # Description : FFT Baseline Correction import sys, os import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, SpanSelector from matplotlib import gridspec import scipy.fftpack ...
import os import sys import struct import re import numpy as np from telemetry import visualization as im_aux from telemetry.visualization import flow def save_rgb_image(filename, image_numpy): import skimage.io as sio image_to_save = np.copy(image_numpy) if image_to_save.shape[0] == 3: image_t...
import bpy import bpy_extras import math import random import cv2 import bmesh import numpy as np from scipy.optimize import minimize, minimize_scalar from mathutils import Euler, Vector from abc import ABC, abstractmethod from blvcw.crystal_well_simulation_utils import get_random_euler, get_normal_distributed_values...
# Copyright (c) 2016 Uber Technologies, Inc. # # 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...
#!/usr/bin/python # Copyright (c) 2014 SUSE Linux Products GmbH # Copyright (c) 2016 SUSE LLC # # 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 limitati...
""" SGA.galex ========= Code to generate GALEX custom coadds / mosaics. """ import os, pdb import numpy as np from astrometry.util.util import Tan from astrometry.util.fits import fits_table import SGA.misc def _ra_ranges_overlap(ralo, rahi, ra1, ra2): import numpy as np x1 = np.cos(np.deg2rad(ralo)) y...
# pylint: disable=arguments-differ import sys import traceback import pickle import logging import uuid from io import BytesIO from collections import namedtuple from contextlib import contextmanager from six import iteritems from crl.interactivesessions import RunnerHandler from crl.interactivesessions.shells import M...
#!/usr/bin/env python3 import sys import os import argparse import json import random import shutil import copy import torch from torch import cuda import torch.nn as nn from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.nn.functional as F import numpy as np import h5py import...
"""Test functionality related to glm module.""" import os import pathlib import datetime import logging from unittest.mock import patch, call, MagicMock import numpy import pandas import pytest from .conftest import _mk_test_files from . import utils def test_get_basedir(tmp_path, monkeypatch): """Test getting...
import asyncio import json import logging import os import sys from datetime import datetime from itertools import accumulate from typing import Dict, List, Tuple from zipfile import ZipFile import requests from requests_oauthlib import OAuth1 PROCESS_WORKERS = 3 DOWNLOAD_WORKERS = 5 MAX_DOWNLOAD_QUEUE = 3 AWAIT_SLE...
#!/usr/bin/python # -*- coding: utf-8 -*- """ pywikibot framework is needed! """ import sys # To not have wikipedia and this in one dir we'll import sys import re # Used for regular expressions import os # used for os.getcwd() import pywikibot # pywikibot framework from ...
# # BSD 3-Clause License # # Copyright (c) 2019, Analog Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, ...
""" The main application window. """ import logging import os.path import importlib.resources from gi.repository import GLib from gi.repository import Gdk from gi.repository import GdkPixbuf from gi.repository import Gtk from gaphor import UML, Application from gaphor.UML.event import ModelFactoryEvent from gaphor.c...
# 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 # dist...
''' Author: <NAME> Contact: <EMAIL> This file contains the contents for the "msAllele" utilities. Specifically, the tool queries one or more BWTs for a single pattern. It returns the counts for each BWT and extracts the reads for a visual display (provided there are relatively few reads). The main difference between ...
from collections import OrderedDict from torch.nn import AvgPool2d, Linear, ModuleList from cnn.MixedFilter import Block from cnn.MixedFilter import MixedConvBNWithReLU as MixedConvWithReLU from cnn.MixedFilter import MixedConvBN as MixedConv from cnn.MixedLayer import MixedLayerNoBN as MixedLayer from cnn.models imp...
import torch import re import json import spacy import unicodedata import numpy as np import pandas as pd import argparse import collections import multiprocessing from concurrent.futures import ProcessPoolExecutor from tqdm import tqdm import logging from os.path import join from occam.utils import str2bool from occam...
# # Handler library for Linux IaaS # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
# Copyright (c) 2015 Infortrend Technology, Inc. # 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 # # ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' gnpy.core.equipment =================== This module contains functionality for specifying equipment. ''' from numpy import clip, polyval from operator import itemgetter from math import isclose from pathlib import Path from json import load from gnpy.core.utils impo...
import argparse import multiprocessing import os import platform import shutil import subprocess import sys def parse_argv(): parser = argparse.ArgumentParser(add_help=False) actions = parser.add_argument_group(title='Actions', description='If no action is specified, on Windows, OS X, and Linux the solution/make fi...
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import KFold from sklearn.preprocessing import StandardScaler from scipy.stats import multivariate_normal as mvn import seaborn as sn import math import gc import tensorflow as tf from tensorflow.keras.models import Sequ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import ast import keyword import sys import textwrap import unittest import six from ast_decompiler import decompiler from hypothesis import given from hypothesis.strategies import text from fluent_compiler import codegen from fluent_c...
import pygame import os from Constants_Objects import * from Objects_classes import * from Worlds import * from Players import * screen = pygame.display.set_mode([screen_width, screen_height]) pygame.mouse.set_visible(False) def game_over(): screen = pygame.display.set_mode([screen_width, screen_height]) sc...
import math import re import struct import sys from pathlib import Path from textwrap import dedent # https://en.wikipedia.org/wiki/X86_calling_conventions#List_of_x86_calling_conventions # CALLING_CONVENTION = 'x86 fastcall' # CALLING_CONVENTION = 'x86 thiscall' CALLING_CONVENTION = 'x64 fastcall' ENDINNES...
import logging from lxml import etree from restclients_core.exceptions import DataFailureException from uw_r25 import nsmap, get_resource from uw_r25.dao import R25_DAO from uw_r25.events import events_from_xml from uw_r25.models import Event logger = logging.getLogger(__name__) def live_url(self): return ( ...
import asyncio import http.client import logging import re import subprocess import sys from dataclasses import dataclass, field from typing import Callable, List, Optional, Set logger = logging.getLogger(__name__) FORWARDED_PATTERN = re.compile(rb"(\r\nForwarded:.*?)(\r\n)", re.IGNORECASE) CONTENT_LENGTH_PATTERN = re...
# Copyright 2016 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 or at # https://developers.google.com/open-source/licenses/bsd """Helper functions and classes used by the hotlist pages.""" from __future__ import print_func...
# Copyright 2020 <NAME> (@usimarit) # # 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 wr...
#!/usr/bin/python # -*- coding: UTF-8 -*- import requests import os import io import time import json,sys import threading #关闭调用api请求返回的警告 requests.packages.urllib3.disable_warnings() if sys.getdefaultencoding() != 'utf-8': reload(sys) sys.setdefaultencoding('utf-8') denpends_status=1 lock = threading.Lock() ...
# project/recipes/views.py ################# #### imports #### ################# from flask import render_template, Blueprint, request, redirect, url_for, flash, abort, jsonify from flask_login import current_user, login_required from project import db, app from project.models import Recipe, User from .forms import A...
import os import re import logging import plow.client from plow.gui.manifest import QtCore, QtGui from plow.gui.panels import Panel from plow.gui.event import EventManager LOGGER = logging.getLogger(__file__) DEFAULT_FONT_SIZE = 11 # pixels MIN_FONT_SIZE = 6 MAX_FONT_SIZE = 24 class LogsPanel(Panel): def __...
import logging import re from collections import OrderedDict from phovea_server.security import current_user, is_logged_in from .utils import clean_query __author__ = '<NAME>' _log = logging.getLogger(__name__) REGEX_TYPE = type(re.compile('')) class ArgumentInfo(object): def __init__(self, type=None, description=...
import json from typing import Optional from edtf_validate.valid_edtf import ( conformsLevel0, conformsLevel1, conformsLevel2, is_valid, ) from great_expectations.core.expectation_configuration import ExpectationConfiguration from great_expectations.execution_engine import ( PandasExecutionEngine,...
# #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module ... __author__ = "<NAME>" __copyright__ = "Copyright 2019, Sparkie Quadruped Robot" __credits__ = ["<NAME>", "<NAME>", "<NAME>"] __version__ = "1.0.0" __license__ = "MIT" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" """ # ...
import pytest import numpy as np import reciprocalspaceship as rs import gemmi from pandas.testing import assert_frame_equal def test_constructor_empty(): """Test DataSet.__init__()""" result = rs.DataSet() assert len(result) == 0 assert result.spacegroup is None assert result.cell is None @pyte...
""" This module contains classes for PDU controllers that supports the SNMP management protocol. The classes must implement the PduControllerBase interface defined in controller_base.py. """ import logging from controller_base import PduControllerBase from pysnmp.proto import rfc1902 from pysnmp.entity.rfc3413.oneli...
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Helpers for using libcloud. """ import socket from time import sleep from zope.interface import implementer from characteristic import attributes, Attribute from twisted.internet.defer import DeferredList, maybeDeferred from twisted.python.reflect import...
#!/usr/bin/env python # Copyright 2002 Google Inc. 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...
import copy from functools import partial from inspect import Parameter, signature from multiprocessing import get_logger import traceback from typing import Any, Tuple from ice.llutil.argparser import as_list, isa from ice.llutil.utils import auto_freeze_enabled def _inplace_surrogate(cls, funcname): backupname...
from django.shortcuts import render, redirect from django.contrib import messages from django.views import View from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.http import JsonResponse, HttpResponse from products.models import Category, Store fr...
from inspect import getmembers, isclass from typing import Dict, Set, Callable, Type, Tuple, List as PyList, Protocol from random import Random from zlib import adler32 from eth2spec.phase0 import spec from remerkleable.complex import Container, Vector, List from remerkleable.basic import boolean, bit, uint, byte, u...
#!/usr/bin/env python # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Simulation with reactive streams # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # """Transition graph representation of mixing problem onenote:https://d.doc...
"""The ``templates`` module allows for fast creation of a few select sample types and diffraction geometries without having to worry about any of the "under the hood" scripting. """ import numpy as np import pygalmesh from scipy.spatial.transform import Rotation from xrd_simulator.detector import Detector from xrd_sim...
import re import transaction from collections import namedtuple, defaultdict from onegov.core.security import Public, Private, Secret from onegov.core.utils import render_file from onegov.directory import Directory from onegov.directory import DirectoryCollection from onegov.directory import DirectoryEntry from onegov...
# BSD-3-Clause License # # Copyright 2017 Orange # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the followi...
import pickle import torch.nn as nn import torch import trimesh from utils import * from config import * class HandPoseLegitimizeLayer(nn.Module): def __init__(self,fingerPlanarize=True,flexionLegitimize=False,abductionLegitimize=True, planeRotationLegitimize=True,debug=False,r=9,relaxplane=False...