gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- ''' Control the Salt command interface ================================== The Salt state is used to control the salt command interface. This state is intended for use primarily from the state runner from the master. The salt.state declaration can call out a highstate or a list of sls: web...
import pytest import demistomock as demisto import json import io from TOPdesk import Client, INTEGRATION_NAME, MAX_API_PAGE_SIZE, \ fetch_incidents, entry_types_command, call_types_command, categories_command, subcategories_command, \ list_persons_command, list_operators_command, branches_command, get_incident...
import base64 import hmac import time import uuid from django.conf import settings from django.contrib.auth import authenticate from django.core.exceptions import ImproperlyConfigured from django.middleware.csrf import _sanitize_token, constant_time_compare from django.utils.translation import ugettext as _ from tasty...
#!/usr/bin/env python # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) | | .` | (_) || | | _|| |) | | ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import itertools import pytest import numpy as np from numpy.testing import assert_allclose, assert_almost_equal from astropy.convolution.convolve import convolve, convolve_fft from astropy.convolution.kernels import (AiryDisk2DKernel, Box1DKernel, Box...
from boto.exception import BotoServerError class ResponseErrorFactory(BotoServerError): def __new__(cls, *args, **kw): error = BotoServerError(*args, **kw) newclass = globals().get(error.error_code, ResponseError) obj = newclass.__new__(newclass, *args, **kw) obj.__dict__.update(e...
# Copyright (c) 2015 Presslabs SRL # # 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...
'''gen_python_api.py generates a python.api file for SciTE The generated api file includes *) all Python keywords *) all builtin functions *) all module attributes Module functions are represented by their docstring if available, otherwise by the function definition from the source file. Classes are represente...
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2007,, Frank Scholz <coherence@beebits.net> import time from coherence.extern.simple_plugin import Plugin from coherence import log import coherence.extern.louie as louie from coherence.upnp.core....
# Copyright 2012-2013 James McCauley # # 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 cv2 import face_recognition as fr import logging import numpy as np import struct import time from tornado import gen from gateway import net, face from gateway.app import gateway from gateway.camera.recognizor import recognize_face from gateway.camera.tracker import track_object from gateway.firebase import f...
""" Helper for views.py """ from base_handler import base_handler, REMOVED_TENANTS import traceback from flask import g, render_template import datetime import json class netmon_handler(base_handler): def __init__(self): """ Manages all the operations related with network monitoring :retu...
# Copyright (c) 2010 Christopher Rebert <code@rebertia.com> # # 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, mod...
# -*- coding: utf-8 -*- """ (c) 2012-2021 Martin Wendt; see https://github.com/mar10/pyftpsync Licensed under the MIT license: https://www.opensource.org/licenses/mit-license.php """ import os import yaml from ftpsync.cli_common import common_parser, creds_parser, verbose_parser from ftpsync.synchronizers import CON...
# ============================================================================ # Group Allocator - allocates students to balanced groups # ============================================================================ # The MIT License (MIT) # Copyright (c) 2014 Michael Fairley (mfai035@aucklanduni.ac.nz) # Permission...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ from datetime import datetime import endpoints from protorpc import messages from protor...
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import unittest from django.core.checks import Error, Warning as DjangoWarning from django.db import connection, models from django.test import TestCase from django.test.utils import override_settings from django.utils.timezone import now from .base i...
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
# Copyright 2014-2015 Zuercher Hochschule fuer Angewandte Wissenschaften # Copyright (c) 2013-2015, Intel Performance Learning Solutions Ltd, Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Lice...
# Copyright 2012, Google 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: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the fol...
import pprint import argparse import sys import os import json import errno import zk_utils import cmd_pred gdata = { 'all_clients_node_path': "/all_clients", } CONFIG_MICROSERVICE_URL="io.seldon.algorithm.external.url" CONFIG_MICROSERVICE_NAME="io.seldon.algorithm.external.name" EXTERNAL_RECOMMENDER="externalI...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.db.models import signals from djangotoolbox.fields import ListField from djangotoolbox.utils import getattr_by_path from copy import deepcopy import re import string _PUNCTUATION_REGEX = re.c...
import math from mock import Mock, patch from elasticmagic import agg, Params, Term, Document, DynamicDocument from elasticmagic.types import Integer, Boolean, List from elasticmagic.expression import Field from .base import BaseTestCase class AggregationTest(BaseTestCase): def test_aggs(self): f = Dyna...
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import sys from mixbox.binding_utils import * from . import cybox_common from . import memory_object from . import process_object from . import win_handle_object from . import win_thread_object class MemorySectio...
#!/usr/bin/env python # encoding: utf-8 # # The MIT License # # Copyright (c) 2008 William T. Katz # # 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 ...
#!/usr/bin/env python #This tool allow users to plot SVM-prob ROC curve from data from svmutil import * from sys import argv, platform from os import path, popen from random import randrange , seed from operator import itemgetter from time import sleep #search path for gnuplot executable #be careful on using windows ...
# Copyright 2017 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...
import toml import copy import pytest import os import sys from decimal import Decimal from toml.decoder import InlineTableDict TEST_STR = """ [a]\r b = 1\r c = 2 """ TEST_DICT = {"a": {"b": 1, "c": 2}} def test_bug_148(): assert 'a = "\\u0064"\n' == toml.dumps({'a': '\\x64'}) assert 'a = "\\\\x64"\n' == ...
import wx import sys import time import threading import math import wx.lib.colourselect as csel import os from manta import * from pycallback import * from MantaCapture import * # from MantaPlot import * import FloatSpin as FS ###############################################################################...
# 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 2020 The TF-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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
from __future__ import unicode_literals import io import os import subprocess import time from .common import AudioConversionError, PostProcessor from ..compat import ( compat_subprocess_get_DEVNULL, ) from ..utils import ( encodeArgument, encodeFilename, get_exe_version, is_outdated_version, ...
# NOTE: DO NOT UPDATE THIS FILE - Create a new views_common.py and place any views there if you need it. then reference # your new one in the urls.py file (which should be edited by you) import os import logging import mimetypes import importlib.util import json import codecs from django.conf import settings # fro...
# -*- coding: utf-8 -*- """ github3.pulls ============= This module contains all the classes relating to pull requests. """ from __future__ import unicode_literals from json import dumps from uritemplate import URITemplate from . import models from . import users from .decorators import requires_auth from .issues ...
#!/usr/bin/python ''' creates node in multi scaffold graph ''' ### imports ### import sys import os import logging import networkx as nx import numpy as np import subprocess from operator import itemgetter # hack for metis. #os.environ['METIS_DLL'] = '/usr/local/lib/libmetis.so' #import metis import helpers.io as i...
"""Loads configurations from .yaml files and expands environment variables. """ import copy import collections import glob import math import os import sys import yaml import toolz as tz class CmdNotFound(Exception): pass # ## Generalized configuration def update_w_custom(config, lane_info): """Update the c...
from __future__ import absolute_import, division, print_function import copy import logging import six import numpy as np from numpy.testing import (assert_equal, assert_array_almost_equal, assert_array_equal) from nose.tools import assert_true, raises, assert_raises from skbeam.core.fittin...
# -*- coding: utf-8 -*- # # Spec work for ibride.com documentation build configuration file, created by # sphinx-quickstart on Tue Nov 17 17:18:01 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogene...
# Copyright (C) 2013 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
#!/usr/bin/env python # Purpose : Python Boot Camp - Basemap Teaching Program 2. # Ensure that environment variable PYTHONUNBUFFERED=yes # This allows STDOUT and STDERR to both be logged in chronological order import sys # platform, args, run tools import os # platform, ...
# 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 ...
import feedparser import os.path import sys, getopt, time, socket, os, csv, re, json import requests import xml.etree.ElementTree as ET import zipfile, zlib import argparse import subprocess import itertools import pandas as pd import urllib2 from urllib2 import urlopen from urllib2 import URLError from urllib2 impo...
from __future__ import absolute_import, print_function import pytz import six from croniter import croniter from datetime import datetime, timedelta from dateutil import rrule from django.db import models from django.db.models import Q from django.utils import timezone from uuid import uuid4 from sentry.constants im...
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
# -*- coding: utf-8 -*- # See LICENSE file for copyright and license details ''' Test 'misc' module. ''' import unittest from misery import ( misc, ) class TestDiff(unittest.TestCase): ''' Test misc.diff func. ''' def test_lists(self): ''' Diff lists. ''' list1 = [1, 2, 3, 4, 5] ...
# Copyright 2016 Capital One Services, 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 applicable law or agreed to in...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: david@reciprocitylabs.com # Maintained By: david@reciprocitylabs.com from ggrc import db from ggrc.models.mixins import Identifiable from ggrc.mode...
import time import pandas as pd from warnings import warn from carto.auth import APIKeyAuthClient from carto.datasets import DatasetManager from carto.exceptions import CartoException, CartoRateLimitException from carto.sql import SQLClient, BatchSQLClient, CopySQLClient from pyrestcli.exceptions import NotFoundExce...
#coding=utf-8 import math import triangle import matplotlib.pyplot as plt class TriAxisCenter: def __init__(self, points): ''' initiate the triaxiscenter with points list without duplicate point points: [[x0,y0],[x1,y1],...,[xn,yn]] ''' # initiate polygon points, an...
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2008, James Vega # 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 copyri...
from compliance_checker.ioos import (IOOS0_1Check, IOOS1_1Check, IOOS1_2Check, NamingAuthorityValidator) from compliance_checker.tests.resources import STATIC_FILES from compliance_checker.tests import BaseTestCase from compliance_checker.tests.helpers import MockTimeSeries, MockVar...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_ssl_certificate s...
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
#!/usr/bin/env python # Copyright 2016 Daniel Nunes # # 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...
# Copyright 2018 DeepMind Technologies Limited. # # 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...
import abc import copy import logging import collections import threading import datetime import string class ParamTemplate(string.Template): """ Templating for the param: accepts dots for replacing ExecutionContext values """ idpattern = r"[\._a-z][\._a-z0-9]*" class TemplateModelAdapter: de...
import functools from functools import partial from django import http from django.conf import settings from django.db import IntegrityError, transaction from django.shortcuts import (get_list_or_404, get_object_or_404, redirect) from django.contrib import auth from django.contrib.auth.fo...
# -*- encoding: utf-8 -*- from __future__ import print_function import abc import os import time import traceback import numpy as np import autosklearn.pipeline.classification import autosklearn.pipeline.regression from sklearn.dummy import DummyClassifier, DummyRegressor from autosklearn.constants import * from auto...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import time import tensorflow as tf # from tensorflow.python import debug as tf_debug sys.path.append(os.path.abspath('../../')) from models...
# Copyright 2016-2019 Capital One Services, 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 applicable law or agreed ...
#!/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...
"""Plugin for plex media server (www.plexapp.com).""" from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import re import logging import os from datetime import datetime from os.path import basename from socket import getho...
import pytest from unittest.mock import MagicMock, call from typing import List, Tuple, Dict, Any from opentrons.calibration_storage import modify, helpers from opentrons.types import Mount, Point from opentrons.hardware_control import pipette from opentrons.config.pipette_config import load from robot_server.service....
""" CumulusCI Tasks for running Apex Tests """ import html import io import json import re from cumulusci.tasks.salesforce import BaseSalesforceApiTask from cumulusci.core.exceptions import ( TaskOptionsError, ApexTestException, CumulusCIException, ) from cumulusci.core.utils import process_bool_arg, proc...
import json import io import mock from nose.tools import ( assert_equal, assert_false, assert_is_instance, raises, assert_raises, assert_regexp_matches) import werkzeug, werkzeug.test from .. import wsgi, metrics, py3comp def env(path, **kwargs): data = werkzeug.test.EnvironBuilder(path, environ_overrid...
from freezegun import freeze_time from app.dao import dao_create_record from app.models import MAGAZINE, TICKET_STATUS_UNUSED, OrderError from app.utils.time import get_local_time from tests.db import ( create_article, create_book, create_event, create_email, create_fee, create_member, crea...
#!/usr/bin/env python import argparse import decimal import gpudb import itertools import os import struct import socket import sys import tempfile if sys.version_info < (3,): def _decode_char(b): return b[::-1].rstrip(b"\x00").decode("utf-8", errors="replace") def _decode_string(b): return b...
from StringIO import StringIO import pickle import sys import gc from os import path from numpy.testing import * import numpy as np rlevel = 1 def assert_valid_refcount(op): a = np.arange(100 * 100) b = np.arange(100*100).reshape(100, 100) c = b i = 1 rc = sys.getrefcount(i) for j in range(1...
from __future__ import print_function, division, absolute_import import matplotlib matplotlib.use('Agg') import os os.environ['ODIN'] = 'gpu,float32,seed=1234' from collections import OrderedDict import numpy as np import tensorflow as tf from sklearn.decomposition import PCA from sklearn.metrics import confusion_ma...
# Copyright (C) 2014, Hitachi, 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/LICENSE-2.0 # # Unless required by applicable law or...
"""All pytest-django fixtures""" from __future__ import with_statement import os import pytest from . import live_server_helper from .db_reuse import (monkey_patch_creation_for_db_reuse, monkey_patch_creation_for_db_suffix) from .django_compat import is_django_unittest from .lazy_django impor...
# Copyright 2012, Red Hat, 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 agr...
# -*- coding: UTF-8 -*- """Definitions for `Nester` class.""" import gc import pickle import sys import numpy as np from astrocats.catalog.model import MODEL from astrocats.catalog.quantity import QUANTITY from mosfit.samplers.sampler import Sampler from mosfit.utils import pretty_num class Nester(Sampler): """...
""" Functions for creating and restoring url-safe signed JSON objects. The format used looks like this: >>> signing.dumps("hello") 'ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk' There are two components here, separated by a ':'. The first component is a URLsafe base64 encoded JSON of the object passed to dumps(). T...
''' /* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "...
__author__ = 'oonarfiandwi' from flask import Flask from flask import request from google.appengine.api import taskqueue, memcache from google.appengine.datastore import entity_pb from google.appengine.ext import ndb from model_profile import Profile from datetime import datetime, timedelta from os import environ from...
## # \namespace cross3d.studiomax # # \remarks The cross3d.studiomax.Clip module contains an # abstraction of the MAXScript MXClip class for interacting # with the Motion Mixer. # # \author willc # \author Blur Studio # \date 09/28/15 # import Py3dsMax from Py3dsMax import mxs from cross3d import ClipPortion...
"""Testing utilities.""" # Copyright (c) 2011, 2012 # Authors: Pietro Berkes, # Andreas Muller # Mathieu Blondel # Olivier Grisel # Arnaud Joly # Denis Engemann # License: BSD 3 clause import inspect import pkgutil import warnings import sys import re import platform impor...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import unittest from pymatgen.io.qchem.sets import * from pymatgen.util.testing import PymatgenTest __author__ = "Samuel Blau, Brandon Wood, Shyam Dwaraknath" __copyright__ = "Copyright 2018, The M...
# -*- coding: utf-8 -*- from __future__ import absolute_import from typing import Any, Callable, Optional from django.http import HttpRequest, HttpResponse from django.test import TestCase from zerver.models import ( get_client, get_realm, get_stream, get_user_profile_by_email, Message, Recipient, UserProfile...
import struct import numpy as np import scipy as sp from ctypes import * """ iwlnl_struct.py This class has methods that extracts CSI information from NETLINK data. Can also parse data from file, stored using log_to_file.c tool. It has the following methods that compress and quantize the V matrix according to...
#!/usr/bin/env python # -*- coding: utf-8 -*- from io import BytesIO from datetime import datetime from struct import Struct from ftplib import FTP from netrc import netrc class Helper(object): @classmethod def nonull(cls, line): return str(line.split('\x00')[0]) class FormatException(Exception):...
#!/usr/local/bin/python2.7 """ The MIT License (MIT) Copyright (c) 2015 Maker Musings 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...
from __future__ import unicode_literals import unittest from rdflib import URIRef, RDF from r2dto_rdf import RdfSerializer, RdfIriField, RdfStringField, RdfObjectField, RdfSetField from tests.utils import RdflibTestCaseMixin, get_triples class SerializerTests(RdflibTestCaseMixin, unittest.TestCase): def test_...
#!/usr/bin/env python from __future__ import with_statement from __future__ import print_function import os import os.path import glob import subprocess import traceback import platform from distutils.command.build import build as _build from setuptools import setup, Extension, Command, find_packages from setuptools....
#! /usr/bin/env python # -*- coding: utf-8 -*- # import sys import os from loguru import logger import sys import os.path import numpy as np from io import open from .image import DataPlus path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "./extern/sPickle")) ...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Sarielsaz Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Functionality to build scripts, as well as SignatureHash(). This file is modified from python-sariel...
""" A Printer for generating readable representation of most sympy classes. """ from __future__ import print_function, division from sympy.core import S, Rational, Pow, Basic, Mul from sympy.core.mul import _keep_coeff from sympy.core.numbers import Integer from .printer import Printer from sympy.printing.precedence ...
# Copyright 2018 PerfKitBenchmarker 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 appli...
from test.lib.testing import eq_, is_, is_not_ from test.lib import testing from test.lib.schema import Table, Column from sqlalchemy import Integer, String, ForeignKey, bindparam from sqlalchemy.orm import backref, subqueryload, subqueryload_all, \ mapper, relationship, clear_mappers, create_session, lazyload, \ ...
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
import logging import collections import bintrees import networkx from ...errors import SimEngineError from ..plugin import KnowledgeBasePlugin from .function import Function l = logging.getLogger("angr.knowledge.function_manager") class FunctionDict(dict): """ FunctionDict is a dict where the keys are fu...
import math, sys import numpy as np import pandas as pd import brewer2mpl from pylab import figure, plot from scipy.stats.kde import gaussian_kde import matplotlib.pyplot as plt from django.http import HttpResponse from django.core.exceptions import ImproperlyConfigured, FieldError from django.db.models.loading impor...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UniqueEntityView' db.create_table('website_uniqueentityview', ( ('id', self.gf('...
"""Test the Tradfri config flow.""" import pytest from homeassistant import data_entry_flow from homeassistant.components.tradfri import config_flow from tests.async_mock import patch from tests.common import MockConfigEntry @pytest.fixture def mock_auth(): """Mock authenticate.""" with patch( "home...
"""Advanced timeout handling. Set of helper classes to handle timeouts of tasks with advanced options like zones and freezing of timeouts. """ from __future__ import annotations import asyncio import enum from types import TracebackType from typing import Any from .async_ import run_callback_threadsafe ZONE_GLOBAL ...
import logging import os import socket import sqlite3 from datetime import date, datetime, timedelta from os.path import normpath, split from uuid import uuid4 import icalendar from atomicwrites import AtomicWriter from dateutil.rrule import rrulestr from dateutil.tz import tzlocal from todoman import exceptions log...
"""Weak reference support for Python. This module is an implementation of PEP 205: http://python.sourceforge.net/peps/pep-0205.html """ # Naming convention: Variables named "wr" are weak reference objects; # they are called this instead of "ref" to avoid name collisions with # the module-global ref() function import...
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla.org/MPL/ # # Softwa...