gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP # Copyright 2017 Fujitsu 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/LICE...
# coding=utf-8 # Copyright 2021 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 applic...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil from migrate import exceptions from migrate.versioning.repository import * from migrate.versioning.script import * from migrate.tests import fixture from datetime import datetime class TestRepository(fixture.Pathed): def test_create(self): ...
import logging from fraud_detection.settings import FILE_DIRS logger = logging.getLogger(__name__) class DuplicateEdgeError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class NodeDoesntExistError(Exception): def __init__(self, v...
''' Created on 10 Jul 2013 @author: jamie@botsofbitcoin.com ''' #!/usr/bin/env python # -*- encoding: utf-8 -*- """ Copyright (c) 2013, LocalBitcoins Oy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:...
#!/usr/bin/env python """Tests for the flow.""" import time from grr.client import actions from grr.client import vfs from grr.lib import access_control from grr.lib import action_mocks from grr.lib import aff4 from grr.lib import data_store from grr.lib import flags from grr.lib import flow from grr.lib import flo...
import sys from Bio import Seq from Bio import SeqIO from Bio import SeqRecord import pandas as pd import numpy as np import ms_module as ms import re ############################ from Bio import Entrez from Bio import SeqIO from StringIO import StringIO import time from urllib2 import HTTPError # for Python 2 Entrez...
# -*- coding: utf-8 -*- """ Created on Wed Jan 25 13:50:30 2017 @author: Owner """ from __future__ import print_function import os import numpy as np np.random.seed(1337) import matplotlib.pyplot as plt import pandas as pd from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_seq...
import torch import torch.nn as nn from torch.autograd import Variable from functools import reduce class LambdaBase(nn.Sequential): def __init__(self, fn, *args): super(LambdaBase, self).__init__(*args) self.lambda_func = fn def forward_prepare(self, input): output = [] for m...
# 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...
# 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 (c) 2007, Columbia Center For New Media Teaching And Learning (CCNMTL) # 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 copy...
# # 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 # ...
#!/usr/bin/env python3 # coding: utf-8 """Test architectures.""" import unittest from triton import ARCH, TritonContext from random import randrange class TestX86ConcreteRegisterValue(unittest.TestCase): """Testing the X86 concrete value api.""" def setUp(self): """Define the arch.""" self...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cloudbase Solutions Srl # 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.ap...
# # 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...
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from . import nodes from .exceptions import TemplateSyntaxError, TemplateAssertionError from .lexer import describe_token...
# 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...
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from urllib3.poolmanager import PoolManager, proxy_from_url from urllib3.response import HTTPResponse from...
import os import logging import yaml import pytest import py import trello import requests.exceptions from _pytest.python import getlocation from _pytest.resultlog import generic_path try: from logging import NullHandler except ImportError: from logging import Handler class NullHandler(Handler): de...
from unittest import skipIf, skipUnless from django.contrib.gis.db.models import fields from django.contrib.gis.geos import MultiPolygon, Polygon from django.core.exceptions import ImproperlyConfigured from django.db import connection, migrations, models from django.db.migrations.migration import Migration from django...
import ctypes import inspect import os import subprocess import sys import tempfile import numpy as np from numba.core.typing.templates import AbstractTemplate, ConcreteTemplate from numba.core import (types, typing, utils, funcdesc, serialize, config, compiler, sigutils) from numba.core.compi...
import unittest import numpy as np import math as m from RULEngine.Util.Pose import Pose from RULEngine.Util.Position import Position class TestPose(unittest.TestCase): def test_init(self): # Default case pose = Pose() self.assertTrue(hasattr(pose, 'position')) self.assertTrue(h...
# ________________________________________________________________________ # # Copyright (C) 2014 Andrew Fullford # # 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.apa...
# -*- coding: utf-8 -*- """ Tests date parsing functionality for all of the parsers defined in parsers.py """ from distutils.version import LooseVersion from datetime import datetime, date import pytest import numpy as np import pandas._libs.lib as lib from pandas._libs.lib import Timestamp import pandas as pd impo...
#!/bin/python3 import relaiscommands as rc import reliablechoice as tplink import serial import time import socketserver import sys DEVICE='/dev/ttyS0' EXPECTED_CARDS=3 EXPECTED_FIRMWARES = [11] class RelaisRequestHandler(socketserver.StreamRequestHandler): def __init__(self, request, client_address, se...
import calendar import time from django.conf import settings from django.conf.urls.defaults import url from django.core.exceptions import ObjectDoesNotExist import commonware.log from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import AllowAny from rest_framework.resp...
#!/usr/local/bin/env python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ Test all test systems on different platforms to ensure differences in potenti...
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.geometry import allclose from compas.geometry import argmax from compas.geometry import axis_angle_vector_from_matrix from compas.geometry import basis_vectors_from_matrix from compas.geometry impor...
# Copyright 2014 Open Source Robotics Foundation, 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...
# 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 use ...
# Copyright 2013 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 datetime import glob import heapq import logging import os import os.path import re import shutil import subprocess as subprocess import sys import te...
import pytest from mock import Mock, patch, call from ramses import generators from .fixtures import engine_mock class TestGenerationHelpers(object): @patch('ramses.models.get_existing_model') def test_setup_data_model_existing_model(self, mock_get): mock_get.return_value = 1 model, auth_mod...
from __future__ import unicode_literals import logging import time from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.exceptions import MultipleObjectsReturned, ObjectDoesN...
import time import string import hashlib import binascii import logging.handlers import codecs import os.path import datetime import random import mimetypes import re from itertools import groupby import tg import pylons import webob.multidict from formencode import Invalid from tg.decorators import before_validate fr...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" import configparser from enum import Enum import logging import argpars...
from typing import Any, Dict, List, Optional, Union import great_expectations.exceptions as ge_exceptions from great_expectations.core.batch import Batch, BatchRequest, RuntimeBatchRequest from great_expectations.core.profiler_types_mapping import ProfilerTypeMapping from great_expectations.execution_engine.execution_...
""" This module contains all tests for glance_api.modules.functions.py """ import os import pytest import requests import sqlalchemy from glance_api.modules import functions from glance_api.modules import models from glance_api import api # TODO: Finish testing Item # TODO: Currently using sqlite3 database for tes...
import decimal import json import unittest import uuid from django import forms from django.core import exceptions, serializers, validators from django.core.exceptions import FieldError from django.core.management import call_command from django.db import IntegrityError, connection, models from django.test import Tran...
""" The Daemon Extension enables applications Built on Cement (tm) to easily perform standard daemonization functions. Requirements ------------ * Python 2.6+, Python 3+ * Available on Unix/Linux only Features -------- * Configurable runtime user and group * Adds the ``--daemon`` command line option * Adds ``a...
#this module is dedicated to the resolve issues occuring when writing a text onto image #- optimize font size for single line texte #- optimize font size AND carlim for multiline text #- resolve incorrect textSize estimation for single line texte from PIL import Image, ImageFont, ImageDraw import textwrap #from ImageEd...
#!/usr/bin/env python # Copyright 2019 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. """Merge results from code-coverage/pgo swarming runs. This script merges code-coverage/pgo profiles from multiple shards. It also merg...
# -*- coding: utf-8 -*- # Imports # ------- import time import common import hashlib import logging import threading # Data # ---- # Monitor data indices K_IP = 0 K_PORT = 1 K_SYSINFO = 2 K_TIMESTAMP = 3 K_RWLOCK = 4 # Contains monitor information { id -> (ip, port, sysinfodao, time, rwlock) } monitor_db = { } # E...
#!/usr/bin/env python # # argdist Trace a function and display a distribution of its # parameter values as a histogram or frequency count. # # USAGE: argdist [-h] [-p PID] [-z STRING_SIZE] [-i INTERVAL] # [-n COUNT] [-v] [-T TOP] # [-C specifier [specifier ...]] # ...
"""Data model""" from datetime import datetime, timedelta from django.db import models from django.contrib.auth.models import User, Group, Permission from django.db.models import signals from django.utils.dateformat import format as dateformat, time_format __all__ = ['Volunteer', 'Task', 'TaskAssignment', 'TaskStatu...
# 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...
# Copyright 2014 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 re from collections import OrderedDict from parsimonious.grammar import Grammar from parsimonious.exceptions import IncompleteParseError from .errors import IndentError, LyError, LySyntaxError, UnsupportedCommaNesting from .globals import BLK_OPEN, BLK_CLOSE, INDENT_SIZE, COMMENT_OPEN, COMMENT_CLOSE from .ly_t...
# Copyright 2013 UnitedStack 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...
# firebird/base.py # Copyright (C) 2005-2016 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 """ .. dialect:: firebird :name: Firebird Firebird Dialects -----------------...
import os import sys import textwrap import pytest from tests.lib import ( assert_all_changes, pyversion, _create_test_package, _change_test_package_version, ) from tests.lib.local_repos import local_checkout def test_no_upgrade_unless_requested(script): """ No upgrade if not specifically requested....
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 Lice...
# Copyright 2016-2017 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 ...
from sympy.integrals.transforms import (mellin_transform, inverse_mellin_transform, laplace_transform, inverse_laplace_transform, fourier_transform, inverse_fourier_transform, sine_transform, inverse_sine_transform, cosine_transform, inverse_cosine_transform, hankel_transform, inverse_hankel_transfo...
# -*- coding: utf-8 -*- # Copyright (C) 2016-2019 by Brendt Wohlberg <brendt@ieee.org> # Cristina Garcia-Cardona <cgarciac@lanl.gov> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE...
"""Plot timeseries data.""" import warnings import numpy as np from ..sel_utils import xarray_var_iter from ..rcparams import rcParams from .plot_utils import default_grid, get_plotting_function def plot_ts( idata, y, x=None, y_hat=None, y_holdout=None, y_forecasts=None, x_holdout=None, ...
from lab.nodes import LabNode class N9(LabNode): def __init__(self, **kwargs): super(N9, self).__init__(**kwargs) self._ports = None self._port_channels = None self._vlans = None self._neighbours_lldp = None self._neighbours_cdp = None self._vpc_domain = Non...
from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from panda3d.core import * from panda3d.direct import * from direct.fsm.FSM import FSM from toontown.ai.ToonBarrier import * from toontown.golf import GolfGlobals import ra...
# Copyright (c) 2013-2014 Rackspace, 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 ...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
import datetime from dojo.importers import utils as importer_utils from dojo.models import Test, Finding, \ Test_Type, \ BurpRawRequestResponse, \ Endpoint_Status, \ Test_Import from dojo.endpoint.utils import endpoint_get_or_create from dojo.utils import get_current_user, max_safe from django.core.ex...
# 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 os import re import struct import sys import textwrap sys.path.insert(0, os.path.dirname(__file__)) import ufunc_docstrings as docstrings sys.path.pop(0) Zero = "PyUFunc_Zero" One = "PyUFunc_One" None_ = "PyUFunc_None" # Sentinel value to specify that the loop for the given TypeDescription uses the # pointer ...
from __future__ import with_statement import os import posixpath import stat import re import uuid from fnmatch import filter as fnfilter from fabric.state import output, connections, env from fabric.utils import warn from fabric.context_managers import settings # TODO: use self.sftp.listdir_iter on Paramiko 1.15+ ...
# get the splines import numpy as np import scipy.interpolate as si # TODO - BSpline.predict() -> allow x to be of any shape. return.shape = in.shape + (n_bases) # MAYBE TODO - implement si.splev using keras.backend. # - That way you don't have to hash the X_spline in memory. class BSpline(): """Cl...
import logging from subprocess import CalledProcessError import tarfile """ Handles deployment of an installed problem. Deploying a problem means creating one or more instances, which are each templated with flags, the shell server URL, etc., and assigned a port (if required for their problem type). Flags and assign...
import os def add_source_files(self, sources, filetype, lib_env = None, shared = False): import glob; import string; #if not lib_objects: if not lib_env: lib_env = self if type(filetype) == type(""): dir = self.Dir('.').abspath list = glob.glob(dir + "/"+filetype) for f in list: sources.append( self.O...
""" Vaex is a library for dealing with larger than memory DataFrames (out of core). The most important class (datastructure) in vaex is the :class:`.DataFrame`. A DataFrame is obtained by either opening the example dataset: >>> import vaex >>> df = vaex.example() Or using :func:`open` to open a file. >>> df1 = vaex...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
import os from secret_settings import * PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) # PACKAGE_ROOT = os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)) PACKAGE_ROOT = PROJECT_ROOT BASE_DIR = PROJECT_ROOT # Build paths inside the project like this: os.path.join(BASE_DIR, .....
# 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 u...
#!/usr/bin/env python import os import re import yaml import threading import itertools import rospy import rospkg import roslaunch from launchtree_loader import LaunchtreeLoader from launchtree_config import LaunchtreeConfig, LaunchtreeArg, LaunchtreeRemap, LaunchtreeParam, LaunchtreeRosparam from python_qt_binding...
# 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...
#!/usr/bin/env python from sys import exit from os import environ environ['KERAS_BACKEND'] = 'theano' import numpy as np from functools import partial from tqdm import tqdm from utils import * from keras.layers import Input, Dense, Dropout, Activation, concatenate from keras.models import Model from keras.callb...
# 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 (C) 2013 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 applicab...
#!/usr/bin/python2.4 # Copyright 2009, 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...
# Copyright (c) 2013 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...
#!/usr/bin/env python """Pathspecs are methods of specifying the path on the client. The GRR client has a number of drivers to virtualize access to different objects to create a Virtual File System (VFS) abstraction. These are called 'VFS Handlers' and they provide typical file-like operations (e.g. read, seek, tell a...
#!/usr/bin/env python3 import itertools import math from abc import abstractmethod from itertools import combinations, product from unittest.mock import MagicMock, patch import torch import gpytorch from .base_test_case import BaseTestCase def _ensure_symmetric_grad(grad): """ A gradient-hook hack to ensu...
################################################################################ # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either...
#!/usr/bin/env python # # mallard2man.py # # Copyright (C) 2014 MongoDB, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
"""Tests for seaborn utility functions.""" import tempfile from urllib.request import urlopen from http.client import HTTPException import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from cycler import cycler import pytest from numpy.testing import ( assert_array_equal...
# -*- coding: utf-8 -*- import json from collections import OrderedDict from datetime import datetime, timedelta from typing import Any, Dict, Mapping from mock import patch from eduid_common.api.testing import EduidAPITestCase from eduid_webapp.lookup_mobile_proofing.app import MobileProofingApp, init_lookup_mobile...
# 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...
# -*- coding: utf-8 -*- """ Created on Tue Jan 26 12:57:46 2016 @author: zehl """ import datetime import os import sys import traceback from PyQt5 import QtCore, QtWidgets, QtGui # import wizards from .compsectionwiz import CompSectionWizard from .converterwiz import ConversionWizard from .filterwiz import FilterWi...
import libtaxii.messages_10 as tm10 from . import constants as const from .abstract import AbstractClient from .converters import ( to_subscription_response_entity, to_content_block_entity, to_collection_entities ) from .exceptions import NotSupportedError from .utils import ( pack_content_bindings, get_u...
# 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 u...
# -*- coding: utf-8 -*- """ sphinx.ext.graphviz ~~~~~~~~~~~~~~~~~~~ Allow graphviz-formatted graphs to be included in Sphinx-generated documents inline. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs import posixpath ...
#!/usr/bin/env python """ Copyright (c) 2014-2022 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function import csv import gzip import io import os import re import sqlite3 import zipfile import zlib from core.addr import a...
import mock import os import subprocess import unittest import colorama import testutils from bin.commands import state class TestStatePrintSection(unittest.TestCase): def test_printsection_withaccent(self): # setup text = 'the text\nhere\n' title = 'the title' accent = 'the ac...
# Copyright (c) 2015 Huawei Technologies Co., Ltd. # 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 # # ...
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes. Email: danaukes<at>seas.harvard.edu. Please see LICENSE.txt for full license. """ import popupcad import dev_tools import types import sys import popupcad_manufacturing_plugins #load external modules import PySide import numpy import shapely modules_before = sy...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.node.test.test_deploy -*- """ Deploy applications on nodes. """ from itertools import chain from warnings import warn from zope.interface import Interface, implementer, Attribute from characteristic import attributes from py...
''' datetime.tzinfo timezone definitions generated from the Olson timezone database: ftp://elsie.nci.nih.gov/pub/tz*.tar.gz See the datetime section of the Python Library Reference for information on how to use these modules. ''' # The Olson database is updated several times a year. OLSON_VERSION = '2014j' VERSI...
# -*- coding: utf-8 -*- import unittest import six from mongoengine import connect, Document, StringField from mongoengine import signals from mongoengine.connection import register_db, disconnect signal_output = [] class BaseSignalTests(unittest.TestCase): maxDiff = None def get_signal_output(self, fn, *...
from __future__ import absolute_import, division, print_function import collections import itertools as it import operator import warnings import numpy as np import pandas as pd from .core import DataFrame, Series, aca, map_partitions, no_default from .shuffle import shuffle from .utils import make_meta, insert_meta...
# 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...
# -*- coding: utf-8 -*- # # 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 #...