gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack 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 # # htt...
""" This module manages all of the code around Sprites. """ # pylint: disable=too-many-arguments, too-many-locals, too-few-public-methods import ctypes import math import pyglet.gl as gl from arcade.draw_commands import load_texture from arcade.draw_commands import draw_texture_rectangle from arcade.draw_commands imp...
# 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 python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from pprint i...
#!/usr/bin/env python # Copyright (c) 2012 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 argparse import BaseHTTPServer import logging import multiprocessing import os import SimpleHTTPServer # pylint: disable=W0...
#!/usr/bin/python import os import sys import json import argparse from collections import OrderedDict TEMP_NETCFG_FILE = '/tmp/bmv2-demo-cfg.json' BASE_LONGITUDE = -115 SWITCH_BASE_LATITUDE = 25 HOST_BASE_LATITUDE = 28 BASE_SHIFT = 8 VLAN_NONE = -1 DEFAULT_SW_BW = 50 DEFAULT_HOST_BW = 25 if 'ONOS_ROOT' not in os.en...
"""Utilities using NDG HTTPS Client, including a main module that can be used to fetch from a URL. """ __author__ = "R B Wilkinson" __date__ = "09/12/11" __copyright__ = "(C) 2011 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc....
# 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. """Interactive tool for finding reviewers/owners for a change.""" from __future__ import print_function import os import copy import owners as owners_modul...
################################################################################ # Copyright (c) 2011-2021, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy # of the License at # # ...
# -*- coding: UTF8 -*- # -------------------------------------------------------------- # Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # ...
# -*- coding: utf-8 -*- from os import path try: import json # try stdlib (Python 2.6) except ImportError: try: import simplejson as json # try external module except: import gluon.contrib.simplejson as json # fallback to pure-Python module from gluon import current from gluon.html import...
import pytest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from javelin.grid import Grid def test_init(): grid = Grid() assert_array_equal(grid.bins, [101, 101, 1]) assert_array_equal(grid.ll, [0, 0, 0]) assert_array_equal(grid.lr, [1, 0, 0]) assert_a...
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
import sys import time from ctypes import * from exceptions import * import random # disable error checking (python -O) to make this code work :) from pyglet import options import pyglet.window from pyglet import clock from pyglet.shader import * from pyglet.ext.model.geometric import * from pyglet.gl import * from ...
import cle import pickle import nose import gc import os import claripy import angr from angr import SimState binaries_base = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries') def test_state(): s = SimState(arch='AMD64') s.registers.store('sp', 0x7ffffffffff0000) nose.to...
from docker.utils import create_host_config from common_fixtures import * # NOQA import websocket as ws from test_container import assert_execute, assert_stats, assert_ip_inject CONTAINER_APPEAR_TIMEOUT_MSG = 'Timed out waiting for container ' \ 'to appear. Name: [%s].' NATIVE_TEST_IMA...
import csv file = open("Generic_c_array.txt", "w") with open('Generic.csv', 'rb') as csvfile: for row in csvfile: a = row.split(";;") file.write("{ \"") try: if(a[0][:1] == ";"): a[0] = a[0][1:] file.write(a[0]) except: file.write("...
import os import unittest import mock import json from werkzeug.datastructures import ImmutableMultiDict os.environ['ES_HOST'] = 'localhost:9200' os.environ['ES_INDEX'] = 'searchable_items_blue' os.environ['ES_AWS'] = 'false' from services.helpers import * from server import app class SearchEndpointsTest(unittest.Te...
# --------------------------------------------------------------------- # JSON normalization routines from __future__ import annotations from collections import ( abc, defaultdict, ) import copy from typing import ( Any, DefaultDict, Iterable, ) import numpy as np from pandas._libs.writers import...
""" Provide functionality to interact with Cast devices on the network. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cast/ """ # pylint: disable=import-error import logging import voluptuous as vol from homeassistant.components.media_pla...
# 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...
from copy import deepcopy from datetime import datetime from twisted.internet.defer import Deferred, succeed, inlineCallbacks from twisted.trial.unittest import SkipTest, TestCase, FailTest from vumi.blinkenlights.metrics import MetricMessage from vumi.message import TransportUserMessage, TransportEvent from vumi.tes...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 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 copy of ...
# Copyright (c) - 2015, Tom Barron. All rights reserved. # Copyright (c) - 2016 Mike Rooney. 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://...
import json import os import sys import select import time import io import threading import sh as real_sh from contextlib import contextmanager plugin_id = os.environ.get("PLUGIN_ID") # May be overwritten by user program to fore all error to log stderr = sys.stderr def ellipsis_str(str, maxs=50): if len(str) < ...
import mock from urlparse import urlparse import pytest from nose.tools import * # flake8: noqa from framework.auth import core from framework.guid.model import Guid from api.base.settings.defaults import API_BASE from api.base.settings import osf_settings from api_tests import utils as test_utils from tests.base i...
# -*- coding: utf-8 -*- import os from django.db import models from django.db.models.signals import post_delete from django.conf import settings from django.core.files.storage import FileSystemStorage from django.contrib.auth.models import User from django.template.loader import render_to_string from django.template.d...
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Generate certificates for testing Usage: generate_test_certificate.py --dir=<name of directory> """ import sys import os import subprocess import tempfile from argparse import ArgumentParser from subprocess import check_call import c_rehash as c_rehash_tools de...
"XYAPTU: Lightweight XML/HTML Document Template Engine for Python" __version__ = '1.0.0' __author__= [ 'Alex Martelli (aleax@aleax.it)', 'Mario Ruggier (mario@ruggier.org)' ] __copyright__ = '(c) Python Style Copyright. All Rights Reserved. No Warranty.' __dependencies__ = ['YAPTU 1.2, http://aspn.activestate.com...
import os import re from PresentationObject import PresentationObject from qt import * from qtcanvas import * true = success = 1 false = failure = 0 class td( PresentationObject ): """ &lt;td&gt; is used to display content in a table. It can only be used in &lt;tr&gt; since &lt;tr&gt; is used to group adjacent t...
# -*- coding: utf-8 -*- # Copyright (C) 2012 Yahoo! 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...
"""Sensors for the Elexa Guardian integration.""" from __future__ import annotations from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_TEMPERATURE, PERCENTAGE, TEMP_FAHRENHEI...
from __future__ import absolute_import from sentry.integrations.client import ApiClient, OAuth2RefreshMixin from sentry.utils.http import absolute_uri UNSET = object() FIELD_MAP = { "title": "/fields/System.Title", "description": "/fields/System.Description", "comment": "/fields/System.History", "lin...
""" MSSP - Mud Server Status Protocol This implements the MSSP telnet protocol as per http://tintin.sourceforge.net/mssp/. MSSP allows web portals and listings to have their crawlers find the mud and automatically extract relevant information about it, such as genre, how many active players and so on. """ from dja...
#----------------------------------------------------------------------------- # Copyright (c) 2008-2015, David P. D. Moss. All rights reserved. # # Released under the BSD license. See the LICENSE file for details. #----------------------------------------------------------------------------- """IPv4 address logic....
import base64 import platform import sys import tempfile import six if six.PY3: import socketserver else: import SocketServer as socketserver from gssapi import AcceptContext, Credential, C_INITIATE, S_DUPLICATE_TOKEN, S_GAP_TOKEN, S_UNSEQ_TOKEN class AddressReusingServer(socketserver.ThreadingTCPServer): ...
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
from django.db import connection from api.base.exceptions import (Conflict, EndpointNotImplementedError, InvalidModelValueError, RelationshipPostMakesNoChanges) from api.base.serializers import (DateByVersion, HideIfRegistration, IDField, ...
import sys import logging from typing import Type, Optional, Dict, Any, Callable, List, Iterable, Union, TextIO, Tuple import numpy as np from checklist.test_suite import TestSuite from checklist.editor import Editor from checklist.test_types import MFT, INV, DIR from checklist.perturb import Perturb from allennlp.com...
# # 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 -*- """Installer script for Pywikibot 3.0 framework.""" # # (C) Pywikibot team, 2009-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, print_function, unicode_literals import itertools import os import sys try: # Work around a traceback on Pytho...
import prophy import pytest @pytest.fixture(scope = 'session') def GreedyScalarArray(): class GreedyScalarArray(prophy.with_metaclass(prophy.struct_generator, prophy.struct)): _descriptor = [("x", prophy.array(prophy.u32))] return GreedyScalarArray @pytest.fixture(scope = 'session') def Composite(): ...
# 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...
from functools import partial import numpy as np from scipy.sparse import bsr_matrix from menpo.base import name_of_callable from menpo.math import as_matrix from menpo.shape import UndirectedGraph from menpo.visualize import print_progress, bytes_str, print_dynamic def _covariance_matrix_inverse(cov_mat, n_componen...
import datetime import numpy from matplotlib.dates import num2date from . import _color as mycol from . import _files from . import _path as mypath from ._markers import _mpl_marker2pgfp_marker from ._util import get_legend_text, has_legend, transform_to_data_coordinates def draw_line2d(data, obj): """Returns t...
# -*- coding: utf-8 -*- #!/usr/bin/env python import socket import threading from Crypto.PublicKey import RSA import Utils import Database import select import Queue from Keyring import PrivateRing, PublicRing, find_pubkey_in_ring, choose_randomly_enc_key MESSAGES_TO_ROOM = Queue.Queue() class Client(threading.Thre...
import os import shutil import subprocess import sys from scripts.lib.zulip_tools import run, ENDC, WARNING, parse_lsb_release from scripts.lib.hash_reqs import expand_reqs ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) VENV_CACHE_PATH = "/srv/zulip-venv-cache" if 'TRAVIS' ...
# Copyright (c) 2013-2021 khal contributors # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publi...
# Copyright 2014 Google 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 writing, s...
# Copyright 2015, 2016 OpenMarket Ltd # Copyright 2018 New Vector # Copyright 2021 The Matrix.org Foundation C.I.C. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
""" The :mod:`sklearn.kernel_approximation` module implements several approximate kernel feature maps based on Fourier transforms and Count Sketches. """ # Author: Andreas Mueller <amueller@ais.uni-bonn.de> # Daniel Lopez-Sanchez (TensorSketch) <lope@usal.es> # License: BSD 3 clause import warnings import n...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA 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 License. # You may obtain a cop...
from sympy import ( symbols, expand, expand_func, nan, oo, Float, conjugate, diff, re, im, Abs, O, exp_polar, polar_lift, gruntz, limit, Symbol, I, integrate, S, sqrt, sin, cos, sinh, cosh, exp, log, pi, EulerGamma, erf, erfc, erfi, erf2, erfinv, erfcinv, erf2inv, gamma, uppergamma, Ei, expi...
import math import random import pyglet from pyglet import gl WIDTH = 800 HEIGHT = 600 ROTATION_SPEED = 200 ACCELERATION = 300 SPACESHIP_RADIUS = 40 ASTEROID_SPEED = 100 ASTEROID_ROTATION_SPEED = 3 ASTEROID_RADIUSES = { 1: 8, 2: 15, 3: 20, 4: 42, } def load_image(filename): image = pyglet.image.l...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import urllib3 import ...
import json import textwrap import unittest from conans.client.tools.env import environment_append from conans.test.utils.tools import TestClient, GenConanfile class GraphLockBuildRequireTestCase(unittest.TestCase): def test_duplicated_build_require(self): t = TestClient() t.save({ '...
#!/usr/bin/env python """This modules contains tests for clients API handlers.""" from grr.gui import api_test_lib from grr.gui.api_plugins import client as client_plugin from grr.lib import aff4 from grr.lib import client_index from grr.lib import events from grr.lib import flags from grr.lib import test_lib fro...
""" Copyright (c) 2014, ICFLIX Media FZ LLC All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Desc: Receive encrypted check_multi output via HTTP POST and save it for further processing. """ import hashlib import os import re import time import trace...
import os import numpy as np from copy import deepcopy import pickle from timeit import default_timer as timer from chimp.utils.policies import RandomPolicy from chimp.utils.policies import DQNPolicy class DQNAgent(object): def __init__(self, learner, memory, simulator, settings, dqn_policy=None, rollout_policy=...
from django.db import models from django.conf import settings from django.contrib.gis.db import models as gis from django.core import mail from django.template.loader import get_template from django.template import Context from django.contrib.sites.models import Site from django.db.models import Count from .manager im...
from __future__ import unicode_literals """ Various utilities useful for converting one Bitcoin format to another, including some the human-transcribable format hashed_base58. The MIT License (MIT) Copyright (c) 2013 by Richard Kiss Permission is hereby granted, free of charge, to any person obtaining a copy of thi...
__author__ = 'Noah Peeters' import copy import mathexpressions.lib as lib print_indent = 0 class Kind(): K_OPERATOR = 0 K_FUNCTION = 1 K_CONST = 2 K_VAR = 3 K_BRACKET = 4 K_LATEX = 5 class Part: def __init__(self, kind, name, value, parts): self.name = name self.kind ...
from collections import defaultdict, deque, namedtuple from datetime import datetime import json import pprint import sys import time from tabulate import tabulate import colors from .stats import percentile fromtimestamp = datetime.fromtimestamp FormatOptions = namedtuple('FormatOptions', [ 'pretty_printer...
from __future__ import unicode_literals, division, absolute_import, print_function native_int = int from builtins import * # pylint: disable=unused-import, redefined-builtin import atexit import codecs import copy import fnmatch import logging import os import shutil import signal import sys import threading import t...
import numpy as np import scipy as sp import scipy.stats from numpy import dot from limix.core.linalg.linalg_matrix import QS_from_K import sys def standardize_design(G, mean_var=None): if mean_var is None: mean_var = (0., 1./G.shape[1]) np.apply_along_axis(lambda x: _change_sample_stats(x, (0., 1....
# Copyright 2015 MongoDB, 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 writing, so...
# Copyright 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
import os import logging from openpyxl import load_workbook from openpyxl.worksheet.datavalidation import DataValidation from openpyxl.styles import Border, Side, Alignment, Font, PatternFill from openpyxl.formatting.rule import FormulaRule import ovbpclient from ..base import BaseModel from .mixin_generator import G...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ # See LICENSE.txt for licensing terms # Some fragments of code are copied from Reportlab under this license: # ##################################################################################### # # Copyright (c) 2000-2008, ReportLa...
from datetime import date, datetime import hashlib import json from urlparse import urlsplit, urlunsplit, urljoin import certifi from juriscraper.lib.date_utils import json_date_handler from juriscraper.lib.log_tools import make_default_logger from juriscraper.lib.string_utils import ( harmonize, clean_string, tru...
"""Test for serializer's patch_resource.""" from sqlalchemy_jsonapi import errors from sqlalchemy_jsonapi.unittests.utils import testcases from sqlalchemy_jsonapi.unittests import models from sqlalchemy_jsonapi import __version__ class PatchResource(testcases.SqlalchemyJsonapiTestCase): """Tests for serializer....
# Copyright 2015 Google 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 writing, s...
from rpython.translator.translator import TranslationContext from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rtyper import rint from rpython.rtyper.lltypesystem import rdict, rstr from rpython.rtyper.test.tool import BaseRtypingTest from rpython.rlib.objectmodel import r_dict from rpython.rlib.rarithm...
import os from numpy import pi, seterr, linspace from skyfield.api import load from skyfield.constants import GM_SUN_Pitjeva_2005_km3_s2 as GM_SUN from skyfield.data import mpc from skyfield.keplerlib import _KeplerOrbit as KeplerOrbit, propagate, _CONVERT_GM from skyfield.tests.test_elementslib import compare, ele_to...
#!/usr/bin/env python import unittest from pentai.base.defines import * from pentai.base.direction_strips import * class DirectionStripsTest(unittest.TestCase): # East def test_e_create_direction_strips(self): ds = EDirectionStrips(board_size = 13) def test_e_unset_is_empty(self): d...
# Distributed under the MIT licesnse. # Copyright (c) 2013 Dave McCoy (dave.mccoy@cospandesign.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 lim...
### # Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2008-2010, James McCoy # Copyright (c) 2014, Valentin Lorentz # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistribution...
# encoding: utf-8 from __future__ import unicode_literals import re import time import hashlib from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse, compat_urlparse, ) from ..utils import ( clean_html, ExtractorError, int_or_none, float_or_none, pars...
# orm/strategies.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 """sqlalchemy.orm.interfaces.LoaderStrategy implementations, and related Mapper...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
# -*- coding: iso-8859-15 -*- # ============================================================================= # Copyright (c) 2004, 2006 Sean C. Gillies # Copyright (c) 2005 Nuxeo SARL <http://nuxeo.com> # # Authors : Sean Gillies <sgillies@frii.com> # Julien Anguenot <ja@nuxeo.com> # # Contact email: sgillie...
# -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2009-2012 HDE, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without lim...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/bin/env python # # Copyright 2010 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...
# Copyright 2018 German Aerospace Center (DLR) # # 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...
import logging import os import sys from rbtools.api.errors import APIError from rbtools.clients import SCMClient, RepositoryInfo from rbtools.utils.checks import check_gnu_diff, check_install from rbtools.utils.filesystem import make_tempfile from rbtools.utils.process import die, execute # This specific import is n...
import datetime import pytz import metraapi.metra import metraapi.metraapi_internal import unittest import nose.exc class ArrivalTests(unittest.TestCase): def test_1ad(self): raise nose.exc.SkipTest("This test is incomplete, it has no assertions.") acquity_data = {u'requestTime': u'/Date(-621355...
# sqlite/base.py # Copyright (C) 2005-2015 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:: sqlite :name: SQLite .. _sqlite_datetime: Date and Time Types ...
# Copyright (c) 2012 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 base64 import hashlib import heapq import json import logging import os import re import select import socket import subprocess import sys import t...
# Copyright (c) 2018 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 app...
# # 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 n...
#!/usr/bin/env python # Copyright 2017 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...
"""Functions that read and write gzipped files. The user of the file doesn't have to worry about the compression, but random access is not allowed.""" # based on Andrew Kuchling's minigzip.py distributed with the zlib module import struct, sys, time, os import zlib import io import __builtin__ __all__ = ["GzipFile"...
import numpy as np from os import path from scipy.interpolate import interp1d import fnmatch import yaml import bisect import os from LabPy import Core # @UnresolvedImport materialsDir = path.join(path.dirname(path.realpath(__file__)), r"../materials") if not path.isdir(materialsDir): materialsDir = os.environ["...
#!/usr/bin/env python # Copyright 2015 gRPC 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 o...
#!/usr/bin/env python from tornado import httpclient, simple_httpclient, netutil from tornado.escape import json_decode, utf8, _unicode, recursive_unicode, native_str from tornado.httpserver import HTTPServer from tornado.httputil import HTTPHeaders from tornado.iostream import IOStream from tornado.simple_httpclient ...
""" Types and routines used by the ceph CLI as well as the RESTful interface. These have to do with querying the daemons for command-description information, validating user command input against those descriptions, and submitting the command to the appropriate daemon. Copyright (C) 2013 Inktank Storage, Inc. LGPL2....
import re from datetime import datetime, timedelta from email.utils import formataddr from HTMLParser import HTMLParser from django.conf import settings from django.contrib.humanize.templatetags.humanize import apnumber from django.template import loader from django.utils import translation import waffle from email...
#!/usr/bin/env python import unittest from socket import AF_INET, AF_INET6, inet_pton from framework import VppTestCase, VppTestRunner from vpp_neighbor import VppNeighbor, find_nbr from vpp_ip_route import VppIpRoute, VppRoutePath, find_route from scapy.packet import Raw from scapy.layers.l2 import Ether, ARP, Dot1...