gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2012, 2014 Tycho Andersen # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Sebastien Blot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and assoc...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2012 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the L...
from insights.client.auto_config import set_auto_configuration, _try_satellite6_configuration, try_auto_configuration from mock.mock import Mock, patch @patch("insights.client.auto_config.rhsmCertificate", Mock()) @patch("insights.client.auto_config.open", Mock()) @patch("insights.client.auto_config._importInitConfig...
import pytest import redis.commands.bf from redis.exceptions import ModuleError, RedisError from redis.utils import HIREDIS_AVAILABLE def intlist(obj): return [int(v) for v in obj] @pytest.fixture def client(modclient): assert isinstance(modclient.bf(), redis.commands.bf.BFBloom) assert isinstance(modc...
# -*- coding: utf-8 -*- # # Sorted list implementation. from __future__ import print_function from sys import hexversion from .sortedlist import recursive_repr from bisect import bisect_left, bisect_right, insort from itertools import chain, repeat, starmap from collections import MutableSequence from operator import...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import json import os import unittest import parlai.utils.testing as testing_utils from parlai.core.agents import creat...
import contextlib from types import MethodType from django.conf import settings from django.contrib.sessions.middleware import SessionMiddleware from django.core.urlresolvers import is_valid_path from django.http import (HttpRequest, HttpResponsePermanentRedirect, SimpleCookie) from django.mid...
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from __future__ import unicode_literals from django.utils import six from channels import Channel from channels.exceptions import RequestAborted, RequestTimeout from channels.handler import AsgiRequest from channels.test import ChannelTestCase class RequestTests(ChannelTestCase): """ Tests that ASGI request...
#!/usr/bin/env python from ctypes import * from ctypes.util import find_library from os import path from glob import glob import sys try: import scipy from scipy import sparse except: scipy = None sparse = None if sys.version_info[0] < 3: range = xrange from itertools import izip as zip __al...
# -*- coding: utf-8 -*- # Natural Language Toolkit: Interface to MaltParser # # Author: Dan Garrette <dhgarrette@gmail.com> # Contributor: Liling Tan, Mustufain, osamamukhtar11 # # Copyright (C) 2001-2017 NLTK Project # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_fun...
# Copyright (c) 2009-2010, Berend-Jan "SkyLined" Wever <berendjanwever@gmail.com> # Project homepage: http://code.google.com/p/testival/ # All rights reserved. See COPYRIGHT.txt for details. import os, re, sys LOCAL_PATH = os.path.dirname(sys.argv[0]) def HashXORSUB8(function_name, xor_value, start_value): hash = ...
from __future__ import unicode_literals import httplib import logging from modularodm import Q from modularodm.storage.base import KeyExistsException from flask import request from framework.auth import Auth from framework.exceptions import HTTPError from framework.auth.decorators import must_be_signed from websit...
from consts import * # noqa from _Framework.MixerComponent import MixerComponent from _Framework.ButtonElement import ButtonElement import time class TrackControllerComponent(MixerComponent): """ provide a one strip control on the current track : arm,solo,mute navigate in tracks left/right navigate in scene...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
import unittest from django import forms from django.forms.utils import ErrorList from django.core.exceptions import ValidationError from wagtail.wagtailcore import blocks class TestFieldBlock(unittest.TestCase): def test_charfield_render(self): block = blocks.CharBlock() html = block.render("He...
from fb.models import Author, RemoteAuthor, RemoteServer from fb.domain.models import DomainAuthor from fb.api.api_utils import RequestContext from fb.services.remote_server_service import RemoteServerService from fb.services.post_service import PostService import json def get_author_service(request): """ exp...
# 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 agree...
"""Collection of imbalanced datasets. This collection of datasets has been proposed in [1]_. The characteristics of the available datasets are presented in the table below. ID Name Repository & Target Ratio #S #F 1 ecoli UCI, target: imU 8.6:1 336 7 2 ...
import numpy as np from scipy.stats import pearsonr from __init__ import * # Most code in this file is either from Leander or Rick. SIGMAS = {'int': 0.0187, 'ple': 0.0176, 'dec': 0.0042} SIGMAS2 = {'int_mean': 0.1193, 'ple_mean': 0.1265, 'dec_mean': 0.0265, 'int...
import http import json from openbrokerapi import errors from openbrokerapi.catalog import ServicePlan from openbrokerapi.service_broker import Binding, BindDetails, BindResource, VolumeMount, SharedDevice, BindState, \ Service from tests import BrokerTestCase expected_credentials = {"uri": "mysql://mysqluser:pas...
from typing import List import stripe from ... import TransactionKind from ...interface import ( CreditCardInfo, CustomerSource, GatewayConfig, GatewayResponse, PaymentData, ) from .utils import ( get_amount_for_stripe, get_amount_from_stripe, get_currency_for_stripe, get_currency_...
import numpy as np from .utils import expand_array import os import json from pkg_resources import resource_stream, Requirement DEFAULT_START_YEAR = 2013 class Parameters(object): CUR_PATH = os.path.abspath(os.path.dirname(__file__)) PARAM_FILENAME = "params.json" params_path = os.path.join(CUR_PATH, PA...
"""Functions for builtin CherryPy tools.""" import logging import re from hashlib import md5 import six import cherrypy from cherrypy._cpcompat import text_or_bytes from cherrypy.lib import httputil as _httputil from cherrypy.lib import is_iterator # Conditional HTTP request support ...
from multiprocessing import Process, Queue from odmtools.controller.logicPlotOptions import Probability, BoxWhisker, Statistics import time from odmtools.odmservices import SeriesService __author__ = 'jmeline' import logging from odmtools.common.logger import LoggerTool # tool = LoggerTool() # logger = tool.setupLo...
# # 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 python """ ================================LICENSE====================================== Copyright (c) 2015 Chirag Mello & Mario Tambos 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 Softwa...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
# coding=utf-8 from tgbot import plugintest from plugins.admin import AdminPlugin class AdminPluginTest(plugintest.PluginTestCase): def setUp(self): self.bot = self.fake_bot( '', plugins=[AdminPlugin()], ) def test_users(self): self.receive_message('/users') ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re import shutil import sys import StringIO import tempfile import unittest from telemetry import benchmark from telemetry.core import exce...
# -*- coding: utf-8 -*- # # Copyright 2015-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
#!/usr/bin/env python """Execute the tests for the mason_variator program. The golden test outputs are generated by the script generate_outputs.sh. You have to give the root paths to the source and the binaries as arguments to the program. These are the paths to the directory that contains the 'projects' directory. ...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import gc import numpy as np from scipy import sparse as spsp from reveal_graph_embedding.common import get_file_row_generator from reveal_graph_embedding.datautil.insight_datautil.insight_read_data import scipy_sparse_to_csv,\ read_adjacency_matrix from reveal_g...
import logging import subprocess from cmd_basic import cmd_basic logger = logging.getLogger(__name__) class SboxCommand(): def __init__(self): self.cmd = cmd_basic() def sbox_useradd(self, user, passwd): cmd = "sbox_useradd.sh %s '%s'" % (user, passwd) self.cmd.call(cmd) def s...
"""Test various algorithmic properties of selectables.""" from sqlalchemy.test.testing import eq_, assert_raises, \ assert_raises_message from sqlalchemy import * from sqlalchemy.test import * from sqlalchemy.sql import util as sql_util, visitors from sqlalchemy import exc from sqlalchemy.sql import table, column,...
#!/usr/bin/env python # 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. """Unit tests for the MSVSSettings.py file.""" import unittest import gyp.MSVS.MSVSSettings as MSVSSettings try: # noinspection PyCompati...
#!/usr/bin/env python3 ###################### # User configuration # ###################### oauth_public = "" oauth_secret = "" username = "" password = "" user_agent = "script:League of Legends flair generator:v1.1 (by /u/TheEnigmaBlade), run by /u/{}".format(username) subreddit = "" sprite_dir = "sprites/" css_dir...
import sonnet as snt import tensorflow as tf from luminoth.utils.bbox_overlap import bbox_overlap_tf from luminoth.utils.bbox_transform_tf import encode as encode_tf class RPNTarget(snt.AbstractModule): """RPNTarget: Get RPN's classification and regression targets. RPNTarget is responsible for: * calc...
#!/usr/bin/env python # Reads everything from a config.yaml file located in the same directory. import argparse parser = argparse.ArgumentParser(description="Plot channel maps.") parser.add_argument("--config", default="config.yaml", help="The configuration file specifying defaults.") parser.add_argument("--measure"...
# ---------------------------------------------------------------------- # MR-MPI = MapReduce-MPI library # http://www.cs.sandia.gov/~sjplimp/mapreduce.html # Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories # # Copyright (2009) Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85...
""" import logging import logging.handlers import logging.config logging.config.fileConfig('logging.ini') log = logging.getLogger(__file__) """ import os, sys import subprocess import traceback import gevent from gevent.pool import Pool #import simplejson #from apscheduler import events #from apscheduler....
# 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...
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
from django.views import generic from django.db.models import Q from django.http import HttpResponseRedirect from django.contrib import messages from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.shortcuts import get_object_or_404, redirect from django.templ...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# -*- coding: utf-8 -*- from ..Node import Node from ...Qt import QtGui, QtCore import numpy as np from .common import * from ...SRTTransform import SRTTransform from ...Point import Point from ...widgets.TreeWidget import TreeWidget from ...graphicsItems.LinearRegionItem import LinearRegionItem from . import function...
# 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...
"""Ban logic for HTTP component.""" from collections import defaultdict from datetime import datetime from ipaddress import ip_address import logging from socket import gethostbyaddr, herror from typing import List, Optional from aiohttp.web import middleware from aiohttp.web_exceptions import HTTPForbidden, HTTPUnaut...
# Copyright (c) 2014 VMware, 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 a...
''' NL80211 module ============== TODO ''' import struct from pyroute2.common import map_namespace from pyroute2.netlink import genlmsg from pyroute2.netlink.generic import GenericNetlinkSocket from pyroute2.netlink.nlsocket import Marshal from pyroute2.netlink import nla from pyroute2.netlink import nla_base # nl802...
#!/usr/bin/env python3 # Copyright (c) 2015-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. """Test multisig RPCs""" import binascii import decimal import itertools import json import os from test_...
#!/usr/bin/env python # sqlite2elastic.py Code # # Copyright (c) Jose M. Molero # # All rights reserved. # # MIT License # # 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...
""" Core components of Home Assistant. Home Assistant is a Home Automation framework for observing the state of entities and react to changes. """ # pylint: disable=unused-import, too-many-lines import asyncio from concurrent.futures import ThreadPoolExecutor import enum import logging import os import re import signa...
import os import psutil import tracemalloc from typing import Dict, Optional, TYPE_CHECKING from ray.rllib.env import BaseEnv from ray.rllib.policy import Policy from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.evaluation import MultiAgentEpisode from ray.rllib.utils.annotations import PublicAPI fr...
import numpy as np, os.path as osp import openravepy as rave from numpy import inf, zeros, dot, r_, pi from numpy.linalg import norm, inv from threading import Thread from lfd.rapprentice import retiming, math_utils as mu,conversions as conv, func_utils, resampling import roslib roslib.load_manifest("pr2_controllers...
"""Utilities shared by tests.""" import collections import contextlib import io import logging import os import re import socket import sys import tempfile import threading import time from wsgiref.simple_server import WSGIRequestHandler, WSGIServer try: import socketserver from http.server import HTTPServer...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# # 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...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Error' db.create_table(u'aps_production_error', ( ...
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, 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...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import numpy as np from Bio import Phylo tavgii, davgii, tsqii, dtavgii, dsqii, sii = 0,1,2,3,4,5 def base_regression(Q, slope=None): """ this function calculates the regression coefficients for a given vector containing the averages of tip and branch quantities. Parameters ---------- Q :...
# 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...
""" Git Feed Views commit tests """ from django.test import TestCase from django.test import Client from django.conf import settings from django.utils import timezone from django.contrib.auth.models import User from app.logic.gitrepo.models.GitProjectModel import GitProjectEntry from app.logic.gitrepo.models.GitUserMo...
""" This file collects the various command line tasks accessed via ``python -m moldesign [command]`` The functions here are intended help users set up their environment. Note that MDT routines will NOT be importable from this module when it runs as a script -- you won't be working with molecules or atoms in this modu...
# 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 agreed to in...
# -*- coding: utf-8 -*- """ test_rfc7838 ~~~~~~~~~~~~ Test the RFC 7838 ALTSVC support. """ import pytest import h2.connection import h2.events import h2.exceptions class TestRFC7838Client(object): """ Tests that the client supports receiving the RFC 7838 AltSvc frame. """ example_request_headers = ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
"""Revision management for django-reversion.""" from __future__ import unicode_literals import operator from functools import wraps, reduce, partial from threading import local from weakref import WeakValueDictionary import copy from collections import defaultdict try: from django.apps import apps get_model ...
from __future__ import unicode_literals from unittest import TestCase from django import template from django.utils import six from .templatetags import custom class CustomFilterTests(TestCase): def test_filter(self): t = template.Template("{% load custom %}{{ string|trim:5 }}") self.assertEqua...
import os import logging import requests import ftplib import concurrent.futures as cf from parsl.data_provider.scheme import GlobusScheme from parsl.executors.base import ParslExecutor from parsl.data_provider.globus import get_globus from parsl.app.app import python_app logger = logging.getLogger(__name__) def _ht...
import sys import os myPath = os.path.dirname(os.path.abspath(__file__)) print(myPath) sys.path.insert(0, myPath + '/../SATSolver') from GA import GA from unittest import TestCase from individual import Individual from bitarray import bitarray class TestGA(TestCase): class FormulaReader: def __init__(se...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for bitcoind node under test""" import decimal import errno from enum import Enum import http.client ...
# Copyright (c) 2011 Sam Rushing """ECC secp256k1 OpenSSL wrapper. WARNING: This module does not mlock() secrets; your private keys may end up on disk in swap! Use with caution! This file is modified from python-planbcoinlib. """ import ctypes import ctypes.util import hashlib import sys ssl = ctypes.cdll.LoadLibra...
import os import lan import cgen import ast_buildingblock as ast_bb debug = False class SSGenerator(object): """ Uses the same visitor pattern as the NodeVisitor, but modified to return a stringstream from each visit method, using string accumulation in generic_visit. """ def __init__(s...
# -*- coding: utf-8 -*- from astropy import units import unittest from physicalproperty import PhysicalProperty # Classes used in tests # ===================== class MockClassEmpty(object): """ Class containing nothing. """ pass class MockClassDefaultInstantiation(object): """ Default instant...
"""Platform to control a Zehnder ComfoAir Q350/450/600 ventilation unit.""" import logging from pycomfoconnect import ( SENSOR_BYPASS_STATE, SENSOR_DAYS_TO_REPLACE_FILTER, SENSOR_FAN_EXHAUST_DUTY, SENSOR_FAN_EXHAUST_FLOW, SENSOR_FAN_EXHAUST_SPEED, SENSOR_FAN_SUPPLY_DUTY, SENSOR_FAN_SUPPLY_F...
from __future__ import absolute_import import warnings from django import forms from django.core.urlresolvers import reverse from django.core import exceptions from django.utils.translation import pgettext, ugettext_lazy as _, ugettext from django.contrib.auth import authenticate from django.contrib.auth.tokens impo...
#!/usr/bin/python # coding: utf-8 -*- # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
# Copyright (c) 2015 Mirantis, Inc. # Copyright (c) 2015 Rackspace, 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/lice...
# Copyright 2015 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 or agreed to in writing, ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
#!/usr/bin/env python #remove rospy.spin() and subscriber for this code to work.. how to get subscriber to work? import roslib roslib.load_manifest('smart_arm_controller') import rospy from std_msgs.msg import Float64 from numpy import matrix, array import numpy as np import sys import sensor_msgs.msg from sensor_m...
from __future__ import unicode_literals import sys import copy import datetime PYTHON3 = True if sys.version_info[0] < 3: PYTHON3 = False VERSION = "0.0.13" def is_map(obj): return PYTHON3 and isinstance(obj, map) def ensureUtf(s): try: if isinstance(s, str): return s else: ...
import logging import os import shutil import subprocess import tempfile import pytest import simtk.openmm.app as app import yaml from openmmtools import mcmc from openmmtools.multistate import MultiStateReporter from pkg_resources import resource_filename from simtk import unit from perses.annihilation.lambda_protoc...
from datetime import date import json from django.conf import settings from django.contrib import messages from django.contrib.auth.models import User from django.forms.forms import NON_FIELD_ERRORS from django.forms.utils import ErrorList from django.core.urlresolvers import reverse from django.http import ( Http...
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ from __future__ import unicode_literals import datetime import decimal import os import platform import sys import warnings from django.conf import settings from django.db import utils from django.db.backends.base.base ...
# coding: utf-8 # general imports import os, re from time import gmtime, strftime # django imports from django.shortcuts import render_to_response, HttpResponse from django.template import RequestContext as Context from django.http import HttpResponseRedirect, Http404 from django.contrib.admin.views.decorators import...
# -*- coding: utf8 -*- """ Tests for pika.adapters.blocking_connection.BlockingConnection """ # Disable pylint warnings concerning access to protected member # pylint: disable=W0212 # Disable pylint messages concerning missing docstring # pylint: disable=C0111 # Disable pylint messages concerning invalid method nam...
# 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 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
from troposphere import ( Parameter, Ref, Output, Tags, Join, ec2 ) from utils.cfn import ( get_availability_zones, get_recent_ami, get_subnet_cidr_block ) from utils.constants import ( ALLOW_ALL_CIDR, EC2_INSTANCE_TYPES, HTTP, HTTPS, VPC_CIDR ) from majorkirby...
# coding: utf-8 import itertools from operator import itemgetter import re import sqlalchemy as sa from sqlalchemy import BigInteger from sqlalchemy import Column from sqlalchemy import exc from sqlalchemy import ForeignKey from sqlalchemy import Identity from sqlalchemy import Index from sqlalchemy import inspect fr...
# Copyright 2018 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 os import json import shutil import tempfile import unittest from telemetry.core import util from telemetry.internal.browser import browser_finder fr...
from __future__ import unicode_literals from tastefulpy.exceptions import TastefulpyError, Unauthorized from tastefulpy.compat import get_module_name class Authorization(object): """ A base class that provides no permissions checking. """ def __get__(self, instance, owner): """ Makes ``...
from __future__ import unicode_literals import os import sys import tempfile import unittest import warnings from django.apps import apps from django.contrib.sites.models import Site from django.core import management from django.core.files.temp import NamedTemporaryFile from django.core.management import CommandErro...
from django import http import commonware import requests from rest_framework.exceptions import ParseError from rest_framework.generics import ListAPIView from rest_framework.response import Response from rest_framework.views import APIView from lib.metrics import get_monolith_client import amo from stats.models imp...
import datetime import json import logging import os import sys import tempfile import time import warnings import requests from .cache import CachingSession, FileCache # for backwards-compatibility w/ scrapelib <= 0.6 Headers = requests.structures.CaseInsensitiveDict ScrapeError = requests.RequestException if sys.v...
#!/usr/bin/python3 import serverboards import requests import subprocess import re import socket import time from urllib.parse import urlparse from serverboards import print @serverboards.rpc_method def ping(ip=None, url=None): """ Performs an ping to the given IP / URL It calls the system ping command....