gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# AISim2.py # Reversi (Othello) """ Reversi Simulation 1 - a computer vs. computer tile flipping game simulation An example from Chapter 16 of 'Invent Your Own Games With Python' by Al Sweigart A.C. LoGreco """ import random import sys def drawBoard(board): """ This function prints out the board that it was...
#!/usr/bin/python3.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 app...
from __future__ import division import warnings import numpy as np import scipy.sparse as sp from sklearn.base import clone from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import a...
"""IMAP4 client. Based on RFC 2060. Public class: IMAP4 Public variable: Debug Public functions: Internaldate2tuple Int2AP ParseFlags Time2Internaldate """ # Author: Piers Lauder <piers@cs.su.oz.au> December 1997. # # Auth...
# 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 ...
# Copyright 2015 Cisco Systems, 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 requir...
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # 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...
import os import os.path import sys import string from datetime import date import itertools import operator import osgeo from osgeo import ogr import utils # These determine default isochrone time maximums and increments DEF_ISO_MAX=40 DEF_ISO_INC=10 CORRECT_NODATA_VALUE_BYTE=128 def make_average_raster(save_path...
"""Populate measurement info.""" # Author: Eric Larson <larson.eric.d<gmail.com> # # License: BSD (3-clause) from time import strptime from calendar import timegm import os.path as op import numpy as np from ...utils import logger, warn, _clean_names from ...transforms import (apply_trans, _coord_frame_name, invert...
import argparse import numpy as np from rstools.utils.batch_utils import iterate_minibatches from tqdm import trange from PG.reinforce import ReinforceAgent from common.networks import activations from wrappers.gym_wrappers import Transition from wrappers.run_wrappers import typical_args, typical_argsparse, run_wrapp...
# coding=utf-8 # Copyright 2020 The Learning-to-Prompt 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 appli...
from __future__ import division import logging import base64 import hmac import random import re import os.path import string from binascii import unhexlify from collections import namedtuple from copy import deepcopy from hashlib import sha256 from io import BytesIO from math import ceil from .flvconcat import FLVTa...
# coding=utf-8 import sys import os import csv from datetime import datetime, timedelta import numpy as np import matplotlib.pyplot as plt from matplotlib.dates import drange from matplotlib.patches import Rectangle import scenario_factory # http://www.javascripter.net/faq/hextorgb.htm PRIMA = (148/256, 164/256, 1...
from subprocess import CalledProcessError from distutils.command.config import config import re import os from subprocess import Popen, PIPE, CalledProcessError from tempfile import mkdtemp from unicodedata import normalize, combining from urlparse import urlsplit from citools.git import fetch_repository """ Help us ...
# Load MNIST data import input_data import tensorflow as tf mnist = input_data.read_data_sets('MNIST_data', one_hot=True) # Tensorflow relies on a highly efficient C++ backend to do its # computation. The connection to this backend is called a session. The # common usage for TensorFlow programs is to first create a g...
import os import sys import numpy as np from astropy.io import fits as pf from sklearn.neighbors import KernelDensity as kde from scipy import integrate import camb from camb import model from scipy.special import j0 from scipy import interpolate import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D a...
# Copyright 2013 OpenStack Foundation # # 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...
import datetime import decimal from django.db import models from django.db.models.sql.constants import LOOKUP_SEP from django.db.models.deletion import Collector from django.db.models.related import RelatedObject from django.forms.forms import pretty_name from django.utils import formats from django.utils.html import ...
# Copyright 2014 Blue Box Group, 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 requi...
#!/usr/bin/env python from __future__ import absolute_import import logging import os import optparse import warnings import sys import re from pip.exceptions import InstallationError, CommandError, PipError from pip.utils import get_installed_distributions, get_prog from pip.utils import deprecation from pip.vcs im...
"""Various helper functions""" import asyncio import base64 import datetime import functools import io import os import re from urllib.parse import quote, urlencode from collections import namedtuple from pathlib import Path from . import hdrs, multidict from .errors import InvalidURL try: from asyncio import en...
"""The tests for the Demo Media player platform.""" import asyncio import unittest from unittest.mock import patch import pytest import voluptuous as vol import homeassistant.components.media_player as mp from homeassistant.helpers.aiohttp_client import DATA_CLIENTSESSION from homeassistant.setup import async_setup_c...
# 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...
import numpy as np from compliance_checker.base import check_has, Result from compliance_checker.defined_base import DefinedNCBaseCheck from netCDF4 import Dataset from __builtin__ import RuntimeError #from docutils.math.math2html import LimitsProcessor ## ## UR-TODO - simple copy from ROMS, needs adjusting to SHOC #...
#!/usr/bin/env python3 ''' plugin/view.py View manager class. Manages and organizes views. The main purpose of this class is to help determine which views/files belong to the same project. Views in the same project may all share a single ycmd server backend. ''' import logging import threading from ..lib.subl.view ...
import datetime from xml.etree import ElementTree as etree import pytest from ..core.exceptions import ( FRITZ_ERRORS, ActionError, ServiceError, FritzActionError, FritzArgumentError, FritzActionFailedError, FritzArgumentValueError, FritzOutOfMemoryError, FritzSecurityError, Fr...
"""Non-Plow specific widgets.""" from itertools import izip_longest from plow.gui.manifest import QtGui, QtCore from plow.gui.common.help import getHelp, getHelpTextWidget from plow.gui import constants class TableWidget(QtGui.QTableView): def __init__(self, *args, **kwargs): super(TableWidget, self)._...
""" forecasting.py Assumption and Data Driven based forecasting calculation. Assumption based forecasting is useful for quickly playing with or understanding a concept; it can be used to evaluate various strategies without historical or real data. Data driven forecasting is useful for forecasting an actual financial...
"""Examine callable regions following genome mapping of short reads. Identifies callable analysis regions surrounded by larger regions lacking aligned bases. This allows parallelization of smaller chromosome chunks through post-processing and variant calling, with each sub-section mapping handled separately. Regions ...
### # Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2009-2010, James McCoy # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above ...
""" Copyright (c) 2017 Dell Inc. or its subsidiaries. All Rights Reserved. A set of super-simple matchers to use to self-test the matching framework. """ from gevent import monkey monkey.patch_dns() monkey.patch_time() monkey.patch_builtins() monkey.patch_select() import re import sys import optparse import uuid impor...
import os import genapi from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi import numpy_api h_template = r""" #ifdef _MULTIARRAYMODULE typedef struct { PyObject_HEAD npy_bool obval; } PyBoolScalarObject; #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyTypeO...
# Copyright 2020 IBM Corp. 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 agre...
# Copyright (c) 2013 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 or agreed to in writ...
# Copyright 2015 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 by applicable law or a...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # CLC: Views Command Line Client documentation build configuration file, created by # sphinx-quickstart on Mon Dec 14 13:00:42 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values a...
# This file taken from Python, licensed under the Python License Agreement from __future__ import print_function import gc import weakref import operator import copy import pickle from random import randrange, shuffle import sys import warnings import collections from blist.test import unittest from blist.test impor...
#!/usr/bin/env python """Lambda Lets-Encrypt Configuration/Setup Tool This is a wizard that will help you configure the Lambda function to automatically manage your SSL certifcates for CloudFront Distributions. Usage: setup.py setup.py (-h | --help) setup.py --version Options: -h --help Show this screen ...
#!/usr/bin/python import os import sys import numpy import pdb import scipy.io import gzip import cPickle import theano import cv2 ################################## ## Data Loading Functions ## ################################## # From the Theano Tutorials def shared_dataset(data_xy, borrow=True, svm_fl...
import urllib2, re, os, urllib, csv, sys, time import xml.etree.ElementTree as ET from datetime import datetime CACHES_DIR = '%s/download-cache' % os.path.dirname(os.path.abspath(__file__)) XBRL_ELEMENTS = [ 'OtherAssetsCurrent', 'OtherAssetsNoncurrent', 'OtherAssets', 'OtherLiabilities', 'OtherLiabilitiesCu...
"""Operations for rigid rotations in Klampt. All rotations are represented by a 9-list specifying the entries of the rotation matrix in column major form. These are useful for interfacing with C code. """ import math from . import vectorops def __str__(R): """Converts a rotation to a string.""" return '\n'....
try: import http.client as httplib except ImportError: import httplib import zlib import io from socket import timeout as SocketTimeout from ._collections import HTTPHeaderDict from .exceptions import ( ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked ) from .packages.six import string_type...
# Copyright 2017 The Abseil 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 ...
"""A module for consuming the Penn Dining API""" import datetime from .base import WrapperBase BASE_URL = "https://esb.isc-seo.upenn.edu/8091/open_data/dining/" V2_BASE_URL = "https://esb.isc-seo.upenn.edu/8091/open_data/dining/v2/?service=" ENDPOINTS = { 'MENUS': BASE_URL + 'menus', 'VENUES': BASE_URL + 've...
#!/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...
""" Defines the PlotAxis class, and associated validator and UI. """ from __future__ import with_statement # Major library import from numpy import array, around, absolute, cos, dot, float64, inf, pi, \ sqrt, sin, transpose # Enthought Library imports from enable.api import ColorTrait, LineStyle fr...
import logging from lib.utils import util, constants from lib.base_controller import ShellException from .log_analyzer_command_controller import LogAnalyzerCommandController class _GrepFile(LogAnalyzerCommandController): def __init__(self, modifiers): self.modifiers = modifiers self.logger = log...
#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_sec_services(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def telnet_sa_telnet_server_shutdown(self, **kwargs): """Auto Generated Code ...
""" Tests for botogram/objects/__init__.py Copyright (c) 2015 Pietro Albini <pietro@pietroalbini.io> Released under the MIT license """ import pytest import botogram.objects def test_user_avatar(api, mock_req): mock_req({ "getUserProfilePhotos": { "ok": True, "result...
# pylint: disable=too-many-lines """ homeassistant.components.camera ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Component to interface with various cameras. For more details about this component, please refer to the documentation at https://home-assistant.io/components/camera/ """ import logging import re import time import req...
#!/usr/bin/env python # # Copyright (c) 2013-2015 Kevin Steves <kevin.steves@pobox.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE...
from __future__ import print_function, division # Still to implement: # - Performance monitoring # - Remove resolved models # - Optional FITS input/output # - Output convolved fluxes import numpy as np from astropy import units as u from . import timer from .models import Models from .source import Source from .uti...
from __future__ import print_function import os import sys import glob try: from setuptools import setup, Extension, find_packages except ImportError: from distutils.core import setup, Extension, find_packages # noqa from distutils import sysconfig from distutils.errors import ( CCompilerError, Distu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 Espressif Systems (Shanghai) CO LTD # # 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/LIC...
import ast import traceback import os import sys userFunctions = {} renames = ['vex.pragma','vex.motor','vex.slaveMotors','vex.motorReversed'] classNames = [] indent = ' ' sameLineBraces = True compiled = {} def module_rename(aNode): if aNode.func.print_c() == 'vex.pragma': asC = '#pragma ' useComma =...
from copy import deepcopy import curves as c from sys import stderr #from micc.cgraph import cdfs def shift(path): ''' init ''' temp = path.index(min(path)) return path[temp:] + path[:temp] def invert(path): ''' init ''' return shift(path[::-1]) def contains(small, big): ...
from __future__ import unicode_literals import datetime from pathlib import Path from django.template import loader from django.conf.urls import url, include from django.conf import settings from django.contrib import admin from django.contrib.sitemaps.views import sitemap from django.contrib.flatpages.models import Fl...
#!/usr/bin/env python from panda3d.core import * import sys import os from direct.showbase.ShowBase import ShowBase from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import OnscreenText from direct.showbase.DirectObject import DirectObject from direct.actor import Actor from random import * # Fu...
# Copyright (c) 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 ...
# sql/default_comparator.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Default implementation of SQL comparison operations. """ from . impor...
# Copyright (c) 2012 OpenStack Foundation. # 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 ...
from datetime import datetime, timedelta import re import logging import os from flask import Flask from flask_dynamo import Dynamo from flask_ask import Ask, statement, question, session, context, request, version import src.pledgeFunc as pledgeFunc import src.picaFunc as picaFunc #import boto3 # Program Start app...
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 """Ansible module for retrieving and setting openshift related facts""" DOCUMENTATION = ''' --- module: openshift_facts short_description: Cluster Facts author: Jason DeTiberus requirements: [ ] ''' EXAMPLES = ''' ''' import ConfigParse...
from __future__ import division, absolute_import, print_function import functools as ft import numpy as np import tensorflow as tf from tensorflow.contrib.layers.python.layers import regularizers from niftynet.layer.convolution import ConvLayer from niftynet.layer.convolution import ConvolutionalLayer from tests.nift...
#!/usr/bin/python """ Code taken from SmartMeshSDK. The origin code was modified. Copyright (c) 2012, Dust Networks All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code m...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import logging import maya import mock from gcdt_testtools.helpers import logcapture from gcdt_lookups.lookups import _resolve_lookups, _identify_stacks_recurse, \ lookup, _find_matching_certificate, _acm_lookup from gcdt_lookups.cred...
import django_filters from rest_framework import filters from rest_framework import generics from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView from spiderhandler.models import QueryJob, QQInfo, WeiboInfo from spiderhandler.queryrecords.serializers i...
from django.contrib.admin.options import flatten_fieldsets, HORIZONTAL, VERTICAL from django.contrib.admin.util import get_fields_from_path, NotRelationField from django.contrib.admin.validation import validate as django_validate from django.core.exceptions import ImproperlyConfigured from django.db import models from ...
#!/usr/bin/python # Copyright 2015 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. """Runs Closure compiler on JavaScript files to check for errors and produce minified output.""" import argparse import os import re impor...
# Copyright 2018 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from __future__ import unicode_literals from contextlib import contextmanager from math import isnan, isinf from hy._compat import PY3, str_type, bytes_type, long_type, string_types from...
import sys import threading import time from unittest import skipIf, skipUnless from django.db import ( DatabaseError, Error, IntegrityError, OperationalError, connection, transaction, ) from django.test import ( TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature, ) from .models import Reporter @...
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines 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 ap...
# -*- coding: utf-8 -*- """ Evaluate model performance after training. This is for comparison of supervised accuracy on different datasets. Especially for the plots for the broken data comparison. The usual setup is that simulations are broken (so that the AE has not to be trained again) so 3 tests are necessary: ...
# 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...
#!/usr/bin/env python """GRR specific AFF4 objects.""" import re import StringIO import time import logging from grr.lib import access_control from grr.lib import aff4 from grr.lib import flow from grr.lib import queue_manager from grr.lib import rdfvalue from grr.lib import registry from grr.lib import utils from ...
#!/usr/bin/env python # MIT License # Copyright (c) 2015, 2017 Marie Lemoine-Busserolle # 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 th...
# Copyright (C) 2016 Nippon Telegraph and Telephone 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 required by appli...
import os import tempfile from http.server import BaseHTTPRequestHandler, HTTPServer from subprocess import CalledProcessError from threading import Thread import pytest import requests import pkgpanda.util from pkgpanda import UserManagement from pkgpanda.exceptions import ValidationError PathSeparator = '/' # Cur...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import contextlib import datetime import functools import socket import sys import threading import time from tornado import gen from tornado.ioloop import IOLoop, TimeoutError from tornado.log import app_log from ...
from collections import OrderedDict import pytest from flattentool.schema import ( JsonLoaderLocalRefsDisabled, SchemaParser, get_property_type_set, ) from flattentool.sheet import Sheet type_string = {"type": "string"} def test_sub_sheet_list_like(): # SubSheet object should be appendable and iter...
"""Common settings and globals.""" from os.path import abspath, basename, dirname, join, normpath from os import environ from sys import path import urlparse import djcelery redis_url = urlparse.urlparse(environ.get('REDISCLOUD_URL', 'redis://localhost:6379/0')) import djc...
""" ################################################################################ # # PyISPconfig - Benjamin Bouvier (benjamin.bouvier29@gmail.com) # ################################################################################ # Copyright (c) 2012, Bouvier # # All rights reserved. # # Redistribution and use in s...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# -*- coding: utf-8 -*- from collections import OrderedDict import pytest from marshmallow import fields, Schema from marshmallow.exceptions import ValidationError from tests.base import * # noqa class TestStrict: class StrictUserSchema(UserSchema): class Meta: strict = True def test_...
import xml.dom.minidom import sys, os, glob, time, string import multiprocessing def file_exists(filename): try: with open(filename): return True except: return False def parsefile(infile): filename = str(infile) print "Current file is: " + infile uniid = filename.split('y')[1].split('_'...
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
#!/usr/bin/python # import petsc4py # import sys # petsc4py.init(sys.argv) # from petsc4py import PETSc # from MatrixOperations import * from dolfin import * import numpy as np import matplotlib.pylab as plt import os import scipy.io from PyTrilinos import Epetra, EpetraExt, AztecOO, ML, Amesos from scipy2Trilinos imp...
#!/usr/bin/python2.5 # # Copyright 2010 the Melange 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...
""" Class for testing an IPTT response (translating raw html into processed IPTT data) for testing IPTT view response data""" import json from datetime import datetime, timedelta from bs4 import BeautifulSoup from indicators.models import Indicator from indicators.views.views_reports import IPTT_Mixin from factories....
import uuid import pytest from collections import deque from itertools import zip_longest from bluesky import Msg from bluesky.preprocessors import (msg_mutator, stub_wrapper, plan_mutator, pchain, single_gen as single_message_gen, ...
# 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 # d...
# 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 ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# -*- coding: utf-8 -*- import collections import datetime import io import json import os import re import traceback import six try: import configobj except ImportError: configobj = None try: import json5 except ImportError: json5 = None try: import toml except ImportError: toml = None try: ...
XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXX X XXXXXXX XXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXX...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """ During "collection", pytest finds all the tests it supports. These are called "items". The process is top-down, mostly tracing down through the file system. Aside from its own machinery, pytest supports hooks that find ...
# Copyright 2017 The TensorFlow Agents 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 ag...
# 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...
########################################################################## # # Copyright (c) 2011-2013, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
""" Histogram-related functions """ from __future__ import division, absolute_import, print_function import functools import operator import warnings import numpy as np from numpy.compat.py3k import basestring from numpy.core import overrides __all__ = ['histogram', 'histogramdd', 'histogram_bin_edges'] array_funct...