gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""Pilot Manager tests """ import os import sys import radical.pilot import unittest import uuid from copy import deepcopy from radical.pilot.db import Session from pymongo import MongoClient # DBURL defines the MongoDB server URL and has the format mongodb://host:port. # For the installation of a MongoDB server, re...
# encoding: utf-8 """ Utilities for path handling. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os import sys import errno import shutil import random import glob from warnings import warn from IPython.utils.process import system from IPython.utils i...
import pytest try: import builtins except ImportError: import __builtin__ as builtins from steams_logos import Downloader from steams_logos.downloader import ( DownloadError, HtmlParserError, BASE_URL, find_team, download) class FakeResponse(object): def __init__(self, status_code=200, content=''): ...
# Copyright 2021 The Magenta 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 in ...
#!/usr/bin/env python # ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ class for handling .bb files Reads a .bb file and obtains its metadata """ # Copyright (C) 2003, 2004 Chris Larson # Copyright (C) 2003, 2004 Phil Blundell # # This program is free software; ...
""" Test Scipy functions versus mpmath, if available. """ import sys import re import numpy as np from numpy.testing import dec import scipy.special as sc from scipy.special._testutils import FuncData, assert_func_equal if sys.platform == 'cli': mpmath = None else: try: import mpmath except Impor...
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
import numpy as np import pytest from lsh.cache import Cache from lsh.minhash import MinHasher @pytest.fixture def default_hasher(): return MinHasher(seeds=100) @pytest.fixture def default_cache(default_hasher): return Cache(default_hasher) def is_nondecreasing(L): # http://stackoverflow.com/a/498335...
""" A module for mapping operators to their corresponding eigenstates and vice versa It contains a global dictionary with eigenstate-operator pairings. If a new state-operator pair is created, this dictionary should be updated as well. It also contains functions operators_to_state and state_to_operators for mapping b...
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
""" Test ability to freeze and run app with an update available. May require admin privileges on Windows, due to issue where PyInstaller doesn't embed a sensible default manifest in the EXE. """ from argparse import Namespace import gzip import json import logging import os import shutil import subprocess import sys i...
""" Written by Christopher Pratt 2017-1-12 Turns all .obj files, in this file's folder and all its subdirectories, into .txt files which can be loaded as custom levels in the virtual reality game climbey. Takes no arguments and returns no arguments, just run the python code. """ import sys import os import numpy as np...
import storjnode from storjnode.network import DEFAULT_BOOTSTRAP_NODES from storjnode.network.file_transfer import FileTransfer from storjnode.network.process_transfers import process_transfers from storjnode.util import address_to_node_id from storjnode.network.file_transfer import enable_unl_requests from storjnode.n...
from sqlalchemy import * from sqlalchemy import testing from sqlalchemy.dialects import mysql from sqlalchemy.engine import default from sqlalchemy.testing import AssertsCompiledSQL, eq_, fixtures from sqlalchemy.testing.schema import Table, Column class _UpdateFromTestBase(object): @classmethod def define_ta...
# pylint: disable=g-bad-file-header # Copyright 2016 The TensorFlow 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/LICENS...
from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from haystack.exceptions import SearchFieldError, NotHandled from haystack import indexes from haystack.utils import loading from test_haystack.core.models import MockModel, AnotherMockModel import unittest if not hasattr(unittes...
#!/usr/bin/env python """Instant output plugins used by the API for on-the-fly conversion.""" import itertools import re from grr.lib import export from grr.lib import rdfvalue from grr.lib import registry from grr.lib import utils class InstantOutputPlugin(object): """The base class for instant output plugins....
# -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Python Library supporting GDAL/OGR Test Suite # Author: Frank Warmerdam <warmerdam@pobox.com> # ###############################################################...
# -*- coding: utf-8 -*- """This file contains the interface for ESE database plugins.""" import os import pyesedb from plaso.lib import dtfabric_helper from plaso.lib import errors from plaso.parsers import logger from plaso.parsers import plugins class ESEDBPlugin(plugins.BasePlugin, dtfabric_helper.DtFabricHelpe...
#!/usr/bin/python import struct,sys import traceback import lzma import StringIO import colorsys from tiles import * from PIL import Image class UnRecognisedFormat(Exception): def __init__(self,magicNumber,majorVersion,minorVersion): self.magicNumber = magicNumber self.majorVersion = majorVersio...
from copy import deepcopy import click # from headerparser import Error import pytest from ghutil.edit import edit_as_mail @pytest.mark.parametrize( "obj,fields,bodyfield,edit_in,edit_out,ret", [ ( {"title": None, "labels": (), "body": None}, "title labels", "bod...
from __future__ import unicode_literals import hashlib import os from django.db import models from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.utils.encoding import python_2_unicode_compatible from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.cont...
# scheduler.dispatcher: Scheduler logic for matching resource offers to job requests. import os import sys import time import threading import re import operator from collections import deque, OrderedDict from core import * from mesosutils import * from opts import * import mesos.interface from mesos.interface import...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2017 Rapptz 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 u...
# -*- 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. """Tests the `cros chroot` command.""" from __future__ import print_function import sys import mock from chromite.cli import c...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
"Parser for Maya.env" import sys, os, os.path, logging #import external.ply.lex as lex try: from pymel.util.external.ply import lex except ImportError: from ply import lex from pymel.mayautils import getMayaAppDir _logger = logging.getLogger(__name__) # lexer and parser for the Maya.env file # first level ...
"""Contains the BufferViewer class, which is used as a debugging aid when debugging render-to-texture effects. It shows different views at the bottom of the screen showing the various render targets.""" __all__ = ['BufferViewer'] from panda3d.core import * from direct.task import Task from direct.task.TaskManagerGlo...
# Copyright 2021 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. # [VPYTHON:BEGIN] # python_version: "3" # wheel: < # name: "infra/python/wheels/pywin32/${vpython_platform}" # version: "version:300" # > # [VPYTHON:END...
import weakref import copy from ..cache.buffer_cache import buffer_cache from ... import get_dict_hash import json import asyncio import logging logger = logging.getLogger("seamless") def print_info(*args): msg = " ".join([str(arg) for arg in args]) logger.info(msg) def print_warning(*args): msg = " ".j...
from __future__ import division, print_function, absolute_import import copy import itertools import os import numpy as np import scipy.spatial.qhull as qhull from numpy.testing import (assert_equal, assert_almost_equal, run_module_suite, assert_, dec, assert_allclose, assert_array_equal, ...
import json import os import re import urlparse from impactlib.github import GitHub from impactlib.semver import SemanticVersion from impactlib import config def extract_dependencies(fp): deps = {} contents = fp.read() contents = contents.replace("\n","") contents = contents.replace("\r","") pat =...
# Copyright (c) 2011 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. """Operation, including output and progress display This module implements the concept of an operation, which has regular progress updates, verbose t...
import logging import os import sys def find_project_dir(): """ Go through the path, and look for app.yaml """ for path in sys.path: abs_path = os.path.join(os.path.abspath(path), "app.yaml") if os.path.exists(abs_path): return os.path.dirname(abs_path) raise Runtim...
# vim: set ts=4 sw=4 et: coding=UTF-8 class Section(object): """ Basic object for parsing each section of spec file. It stores the lines in a list and remembers content of previous line at hand. The unbrace_keywords content is passed from creating object to reduce calculation price. Vario...
""" This is the Django template system. How it works: The Lexer.tokenize() function converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). The Parser() class takes a list ...
from unittest import TestCase from regulations.generator.layers import tree_builder from regulations.generator.node_types import REGTEXT import itertools class TreeBuilderTest(TestCase): def build_tree(self): child = { 'text': 'child text', 'children': [], 'label_id':...
from bottle import route,request from cassandra.cluster import Cluster import uuid, collections, traceback, bcrypt, requests, sys, appcontext, auth, organization, user, interaction, course, lesson, program, permission def callback(r, v): if r.query.get('callback') is not None: return '%s(%s)' % (r.query.get('...
#!/usr/bin/python3 import urllib.request import urllib.parse from urllib import request, error from urllib.parse import urlparse, urljoin from bs4 import BeautifulSoup import re import os from collage_maker import collage_maker import hashlib def verify_real_url(url): """Return True if a url is legitimate or fal...
#!/usr/bin/python2.6 # closestMeshpoint # DLowenberg Mar 05, 2012 # v1.3 version = 'closestMeshpoint from maya v1.42' print 'version= %s' %version import sys import os import subprocess import maya.OpenMaya as om import maya.cmds as cmds import math import maya.mel as mel import pymel.core as pm from functools impor...
#!/usr/bin/env python # # 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 # "L...
import copy import logging import os import sys from datetime import datetime from shutil import which from svtplay_dl.error import UIException from svtplay_dl.fetcher import VideoRetriever from svtplay_dl.postprocess import postprocess from svtplay_dl.service import Generic from svtplay_dl.service import service_hand...
import eisoil.core.pluginmanager as pm import eisoil.core.log logger=eisoil.core.log.getLogger('ofed') GMAv1DelegateBase = pm.getService('gmav1delegatebase') gfed_ex = pm.getService('gfedv1exceptions') config = pm.getService('config') geniutil = pm.getService('geniutil') class OMAv1Delegate(GMAv1DelegateBase): V...
# -*- test-case-name: twisted.trial.test.test_runner -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A miscellany of code used to run Trial tests. Maintainer: Jonathan Lange """ from __future__ import absolute_import, division __all__ = [ 'TestSuite', 'DestructiveTestSuite',...
# -*- coding: utf-8 -*- """ <DefineSource> @Date : Fri Nov 14 13:20:38 2014 \n @Author : Erwan Ledoux \n\n </DefineSource> """ #<DefineAugmentation> import ShareYourSystem as SYS import types BaseModuleStr="ShareYourSystem.Standards.Controllers.Systemer" DecorationModuleStr="ShareYourSystem.Standards.Classors.Clas...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # ================================================================= # ================================================================= import httplib import json import logging import sys import requests import os import hashlib def enum(*sequential, **named): enums...
# Copyright 2017 The TensorFlow 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 applica...
from django.test import TestCase from django.contrib.gis.geos import LineString, Point from django.conf import settings from unittest import skipIf from geotrek.core.factories import PathFactory, TopologyFactory, NetworkFactory, UsageFactory from geotrek.core.models import Path, Topology @skipIf(not settings.TREKKI...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
""" Robust location and covariance estimators. Here are implemented estimators that are resistant to outliers. """ # Author: Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause import warnings import numbers import numpy as np from scipy import linalg from scipy.stats import chi2 from . import empir...
# Copyright 2016 The TensorFlow 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 applica...
#!/usr/bin/env python """ Save polynomial basis on reference elements or on a mesh for visualization into a given output directory. """ from __future__ import absolute_import import sys from six.moves import range sys.path.append('.') import os from argparse import ArgumentParser import numpy as nm from sfepy.base.bas...
import functools import os from flask import Blueprint from flask import abort from flask import flash from flask import g from flask import redirect from flask import render_template from flask import request from flask import session from flask import url_for from peewee import * from wtforms import Form from wtform...
# Copyright 2016 The TensorFlow 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 applica...
"""Unit tests for module /scripts/init/indicator.py.""" import unittest from shared.utils import get_test_case_name, get_authorization from scripts.constants import IndicatorType from scripts.indicator import Indicator from scripts import utils class TestIndicator(unittest.TestCase): """Unit tests for class Indic...
# -*- coding: utf-8 -*- """ Tools for analyzing the autocorrelation time of a time series. The ipce and icce routines are implementations of the initial positive correlation time estimator, and the initial convex correlation estimator proposed by Geyer [1]_. The acor algorithm was proposed by Sokal [2]_. The associat...
# Copyright 2014->future! Mikko Korpela # # 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 agree...
"""Creative Applications of Deep Learning w/ Tensorflow. Kadenze, Inc. Copyright Parag K. Mital, June 2016. TODO: argparse better sound example/model prime with text input """ import tensorflow as tf import numpy as np import os import sys import collections import gzip def build_model(txt, batch_si...
import logging import pika import sys if sys.version[0] == '2': import Queue as queue else: import queue as queue from .. import rabbitutils import esgfpid.defaults as defaults from esgfpid.utils import loginfo, logdebug, logtrace, logerror, logwarn, log_every_x_times LOGGER = logging.getLogger(__name__) LOGGE...
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
#!/usr/bin/env python """Additional tests focused on robustness testing""" __author__ = 'Carlos Rueda' # bin/nosetests -sv ion/agents/platform/test/test_platform_agent_robustness.py:TestPlatformRobustness.test_instrument_reset_externally # bin/nosetests -sv ion/agents/platform/test/test_platform_agent_robustness.py:...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from ModestMaps.Core import Coordinate import unittest class TestProcess(unittest.TestCase): def _make_json_tiles( self, coord, post_process_data={}, db_features=[], cut_coords=[], buffer_cfg={}): from tilequeue.process import process_coord from tilequeue.tile import coord...
# Copyright 2018 The TensorFlow 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 applica...
# 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. import ast from telemetry.internal.util import atexit_with_log import contextlib import gc import logging import os import sys import tempfile import traceba...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
# encoding: utf-8 # from __future__ import absolute_import, division, print_function import numpy as np import pytest as pt from numpy.testing import assert_array_almost_equal import mpnum.factory as factory import mpnum.mparray as mp import mpnum.mpsmpo as mm from mpnum import utils def _get_reductions(red_fun, mp...
import pytest from numpy.testing import assert_equal from spacy.attrs import TAG from spacy import util from spacy.training import Example from spacy.lang.en import English from spacy.language import Language from thinc.api import compounding from ..util import make_tempdir @pytest.mark.issue(4348) def test_issue43...
# Copyright 2012 OpenStack Foundation. # 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 req...
import dragonfly import dragonfly.pandahive import bee from bee import connect import math, functools from panda3d.core import NodePath import dragonfly.scene.unbound, dragonfly.scene.bound import dragonfly.std import dragonfly.io import dragonfly.canvas import Spyder # ## random matrix generator from random impor...
from diofant import (BlockDiagMatrix, BlockMatrix, Expr, Identity, ImmutableMatrix, Inverse, Matrix, MatrixExpr, MatrixSymbol, Transpose, Tuple, block_collapse, blockcut, det, symbols, trace, transpose) from diofant.matrices.expressions.blockmatrix import (...
"""The wrapping code for providing natural ctypes-based OpenGL interface""" import ctypes, logging from OpenGL import platform, error from OpenGL._configflags import STORE_POINTERS, ERROR_ON_COPY, SIZE_1_ARRAY_UNPACK glGetError = platform.OpenGL.glGetError from OpenGL import converters from OpenGL.converters import Def...
# Copyright 2013 vArmour Networks 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 req...
#!/usr/bin/env python ############################################################################## # Copyright (c) 2015 Ericsson AB and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distrib...
import sys import os, os.path import time import json METADATA_FILE_EXTENSION = ".metadata" if sys.version_info < (3,): range = xrange # EnumGenerator def Enum(*sequential, **named): enums = dict(zip(sequential, list(range(len(sequential))), **named)) reverse = {value: key for key, value in enums.items()} en...
"""Supporting functions for core overshooting plots.""" import os import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy.interpolate import interp1d from scipy.signal import savgol_filter from .config import FIGEXT, TRACKS_LOC from .track import Track from .inset_plot import adjust_zoomgri...
"""Trackable data structures.""" # Copyright 2018 The TensorFlow 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...
# -*- coding: utf-8 -*- """ tests.test_has_features ~~~~~~~~~~~~~~~~~~~~~~~ Test basic metaclasses functionalities. :copyright: 2015 by Lantz Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import (division, unicode_literals, print_function,...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def ge...
""" Differential and pseudo-differential operators. """ # Created by Pearu Peterson, September 2002 __all__ = ['diff', 'tilbert','itilbert','hilbert','ihilbert', 'cs_diff','cc_diff','sc_diff','ss_diff', 'shift'] from numpy import pi, asarray, sin, cos, sinh, cosh, tanh, iscomplexobj i...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for requests_kerberos.""" from mock import Mock, patch import requests try: import kerberos kerberos_module_name='kerberos' except ImportError: import kerberos_sspi as kerberos # On Windows kerberos_module_name='kerberos_sspi' import requests_k...
# Copyright 2015 The TensorFlow 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 applica...
"""Access point for the HomematicIP Cloud component.""" import asyncio import logging from homematicip.aio.auth import AsyncAuth from homematicip.aio.home import AsyncHome from homematicip.base.base_connection import HmipConnectionError from homematicip.base.enums import EventType from homeassistant.config_entries im...
#!/usr/bin/env python # -*- coding: utf-8 -*- # """Contains classes and functions that a SAML2.0 Identity provider (IdP) or attribute authority (AA) may use to conclude its tasks. """ import logging import os import importlib import dbm import shelve import six import threading import saml2.cryptography.symmetric fr...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
''' TestCPU ======= Tested platforms: * Windows * Linux - nproc ''' import sys import unittest from os import environ from os.path import join from mock import patch, Mock from textwrap import dedent from plyer.tests.common import PlatformTest, platform_import, splitpath class MockedKernelCPU(object): def __i...
from itertools import chain from datetime import datetime, date import logging import os import warnings from django.conf import settings from django.contrib.staticfiles.finders import find from django.core.exceptions import ValidationError, ImproperlyConfigured from django.core.validators import RegexValidator from d...
# Copyright (c) 2014 Mirantis, 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...
# Copyright 2019 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, 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 requi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Create FHIR search params from NoSQL-like query structures. # 2014, SMART Health IT. try: from urllib.parse import quote_plus except Exception as e: from urllib.parse import quote_plus class FHIRSearch(object): """ Create a FHIR search from NoSQL-like q...
""" The rechunk module defines: intersect_chunks: a function for converting chunks to new dimensions rechunk: a function to convert the blocks of an existing dask array to new chunks or blockshape """ from __future__ import annotations import heapq import math from functools import reduce from ...
# Copyright 2014 DreamHost, LLC # # Author: DreamHost, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
# -*- coding: utf-8 -*- # Version: 2.5 # # This is an Anki add-on for creating notes by importing media files from a # user-selected directory. The user is able to map properties of the imported # file to fields in a note type. For example, a user can map the media file # to the 'Front' field and the file name to the '...
from zrest.statuscodes import * from http.server import BaseHTTPRequestHandler, HTTPServer from socketserver import ThreadingMixIn from .basedatamodel import RestfulBaseInterface from .statuscodes import * from zashel.utils import threadize, daemonize from urllib.parse import urlparse, parse_qsl from math import ceil i...
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/...
from math import sqrt, pi, exp, gamma from mpmath import gammainc import sys #------------------------------------------------------------------------------- class X2: def __init__(self, scale=1, prefactors=[], q=[0,0,0,0,0,0], kind='S', ...