gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# -*- 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
#... | |
# *****************************************************************************
#
# 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
#
# ... | |
#!/opt/datadog-agent/embedded/bin/python
'''
Datadog
www.datadoghq.com
----
Make sense of your IT Data
Licensed under Simplified BSD License (see LICENSE)
(C) Boxed Ice 2010 all rights reserved
(C) Datadog, Inc. 2010-2013 all rights reserved
'''
# set up logging before importing any other c... | |
# 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.
# --------------------------------------------------------------------... | |
from common_fixtures import * # NOQA
from cattle import ApiError
import yaml
@pytest.fixture(scope='module')
def image_uuid(context):
return context.image_uuid
def test_create_env_and_svc(client, image_uuid):
env = client.create_environment(name=random_str())
env = client.wait_success(env)
assert e... | |
import json
import requests
from requests.auth import HTTPBasicAuth
from django.http import HttpResponse
from django.contrib.auth import login, logout
from django.contrib.auth.models import User, Group
from django.conf import settings
from rest_framework.views import APIView
from rest_framework.permissions import IsAut... | |
# -*- coding: utf-8 -*-
"""
Django settings for opendatahub project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
from __future__ import unicode_literals
# Bu... | |
"""
Tests for 2D compatibility.
"""
import numpy as np
import pytest
from pandas._libs.missing import is_matching_na
import pandas as pd
from pandas.core.arrays.integer import INT_STR_TO_DTYPE
from pandas.tests.extension.base.base import BaseExtensionTests
class Dim2CompatTests(BaseExtensionTests):
def test_tra... | |
"""
An RDF/XML parser for RDFLib
"""
from xml.sax import make_parser
from xml.sax.handler import ErrorHandler
from xml.sax.saxutils import handler, quoteattr, escape
from urllib.parse import urljoin, urldefrag
from rdflib.namespace import RDF, is_ncname
from rdflib.term import URIRef
from rdflib.term import BNode
fro... | |
# Copyright (c) 2012 NetApp, Inc.
# Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/l... | |
# -*- 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
#... | |
import pygame
import random
from .components import *
from .utils import getBasesLinear
from .core import globalSystem
from .maths import Vector2D
class Bullet(object):
"""
The most basic bullet object representable in DML. Every
projectile, weapon, generator, or particle effect is a
child class of Bu... | |
#!/usr/bin/env python
# miedema.py v1.6 12-13-2012 Jeff Doak jeff.w.doak@gmail.com
# adapted by S. Kirklin 1/7/14
import numpy as np
import sys
import yaml
import logging
import qmpy
from qmpy.utils import *
logger = logging.getLogger(__name__)
__all__ = ["Miedema"]
# data rows:
# Element_name Phi Rho Vol Z Valence ... | |
"""Artnotizen organizes all dated files in a given directory in year/month/day
folders, compiles are markdown files to HTML, and constructs an easy to navigate
single-page index in index.html."""
from collections import OrderedDict
from datetime import datetime
import os
import pipes
import re
import shlex
import subpr... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | |
#!/usr/bin/env python2
# Copyright (c) 2014 The BeCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test pruning code
# ********
# WARNING:
# This test uses 4GB of disk space.
# This test takes 30 mins or mo... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
if sys.version_info < (2, ... | |
#!/usr/bin/python
"""
This is a Python script for the Lastline Analyst Connector for Bit9 Security Platform.
Copyright Bit9, Inc. 2015
support@bit9.com
Disclaimer
+++++++++++++++++++
By accessing and/or using the samples scripts provided on this site (the Scripts), you hereby agree to the following terms:
The Scrip... | |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import numpy as np
import pandas as pd
from . import dtypes
from . import duck_array_ops
from . import nputils
from . import ops
from .combine import concat
from .common import (
Implements... | |
# Copyright 2014-2018 The PySCF Developers. 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 appl... | |
# Copyright (c) 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | |
"""
High Level Operations for every infrastructure
"""
from common.exceptions import ProfileNotFound
from common.exceptions import ResourcesNotAvailable
from common.exceptions import PlatformDoesNotExist
from common.sessions import Sessions
from common.platform import Platform
from urllib2 import URLError
from threadi... | |
"""
Pythia's Verifiable, Partially-Oblivious Pseudorandom Function (POP) protocol
constructed using the BN-256 pairing-based curves provided by the RELIC library.
Also includes serialization and encoding routines for elements that are commonly
transmitted.
"""
from pbc import *
def eval(w,t,x,msk,s):
"""
Pyth... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import json
import datetime
import decimal
import mimetypes
import os
import frappe
from frappe import _
import frappe.model.document
import frappe.utils
import frappe.sessions
im... | |
# Copyright 2011 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... | |
# orm/loading.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
"""private module containing functions used to convert database
rows into object inst... | |
# SPDX-License-Identifier: ISC
# -*- coding: utf-8 -*-
"""
Overview
========
pymenuconfig is a small and simple frontend to Kconfiglib that's written
entirely in Python using Tkinter as its GUI toolkit.
Motivation
==========
Kconfig is a nice and powerful framework for build-time configuration and lots
of projects ... | |
# Copyright (c) 2016, Matt Layman
import inspect
import os
import tempfile
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from tap.i18n import _
from tap.tests import TestCase
from tap.tracker import Tracker
class TestTracker(TestCase):
def _make_header(self, test_case)... | |
# 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... | |
"""Copyright 2014 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 agreed to in ... | |
# 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
#
# DNATool - A program for DNA sequence manipulation
# Copyright (C) 2012- Damien Farrell & Jens Erik Nielsen
#
# 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 vers... | |
from pyglet.sprite import Sprite
from pyglet.text import Label
from pyglet import gl
from pyglet import graphics
from functions import *
class UI:
def __init__(self, window):
self.window = window
self.buttons = []
self.bars = []
self.progressbars = []
self.combat_text = []... | |
"""SCons.Subst
SCons string substitution.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# 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 ... | |
import difflib
from lxml import etree
from lxml.html import fragment_fromstring
import cgi
import re
__all__ = ['html_annotate', 'htmldiff']
try:
_unicode = unicode
except NameError:
# Python 3
_unicode = str
try:
basestring = __builtins__["basestring"]
except (KeyError, NameError):
# Python 3
... | |
'''
Title: ParcelFabricInvestigator_addin
Author: Stephanie Wendel
Created: 1/13/2014
Update: 4/21/2014
Version: 1.4.1
Description: Provides a toolbar of buttons to use in ArcGIS Desktop that
investigate potential data issues with the Parcel Fabric.
'''
import arcpy
import pythonaddins
import os
# Global Variables
... | |
import urlparse
from django.views import generic as generic_views
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.utils.importlib import import_module
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.template.r... | |
# 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 2013, Nachi Ueno, NTT MCL, 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
#
# Unles... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2013 Codernity (http://codernity.com)
#
# 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/L... | |
#
# 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... | |
# Copyright 2011-2012 10gen, 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... | |
# Copyright 2012 Nebula, 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 agree... | |
import numpy as np
'''
Library containing pulse shapes.
'''
from pycqed.measurement.waveform_control.pulse import Pulse, apply_modulation
from pycqed.utilities.general import int_to_bin
class MW_IQmod_pulse(Pulse):
'''
Block pulse on the I channel modulated with IQ modulation.
kwargs:
amplitude (... | |
"""
Support for installing and building the "wheel" binary package format.
"""
from __future__ import with_statement
import compileall
import csv
import functools
import hashlib
import os
import re
import shutil
import sys
from base64 import urlsafe_b64encode
from pip.backwardcompat import ConfigParser, StringIO
fro... | |
import os
import textwrap
import unittest
from parameterized import parameterized
from conans import __version__ as client_version
from conans.test.utils.test_files import temp_folder
from conans.test.utils.tools import TestClient
from conans.tools import save
from conans.util.files import load
class NewCommandTest... | |
# $Header$
'''Faults.
'''
from pyremotevbox.ZSI import _copyright, _children, _child_elements, \
_get_idstr, _stringtypes, _seqtypes, _Node, SoapWriter, ZSIException
from pyremotevbox.ZSI.TCcompound import Struct
from pyremotevbox.ZSI.TC import QName, URI, String, XMLString, AnyElement, UNBOUNDED
from pyrem... | |
#
# Copyright (c) 2016, SUSE LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the foll... | |
#!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | |
#!/usr/bin/env python
from __future__ import division
from __future__ import with_statement
import numpy as np
#from pylab import ion
import matplotlib as mpl
#from matplotlib.path import Path
from matplotlib import pyplot as plt
from scipy.optimize import curve_fit
#import numexpr as ne
#from numba import autojit
i... | |
# -*- coding: utf-8 -*-
"""
sphinx.domains.javascript
~~~~~~~~~~~~~~~~~~~~~~~~~
The JavaScript domain.
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from sphinx import addnodes
from sphinx.domains import Domain, ObjType
from sphinx.lo... | |
# -*- 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):
# Deleting field 'ClinicalTrial.full_title'
db.delete_column('arkestra_cl... | |
# -*- coding: utf-8 -*-
# Copyright 2020 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... | |
# -*- coding: utf-8 -*-
import logging
import traceback
import sys
from graphic_utils import DynamicBackground, \
ScreenObjectsManager, TouchAndTextItem
from input import InputManager
import mopidy
from pkg_resources import Requirement, resource_filename
import pygame
import pdb
# StreamsScreen, SystemScreen... | |
# 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
#
# Copyright (C) 2007-2014 Rich Lewis <rl403@cam.ac.uk>
# License: MIT
# -*- coding: utf-8 -*-
# pylint: disable=too-many-instance-attributes,too-many-arguments
""" Module implementing the creation of synergy map objects. """
from collections import defaultdict
from rdkit.Chem.Draw import Mo... | |
from __future__ import print_function
import yaml
import sys, os, time
import shlex, shutil
import tarfile, gzip, StringIO
from . import checkout
from xmlrpclib import Binary
import logging
log = logging.getLogger(__name__)
VALID_TYPES = {"abstract", "shared", "builder", "default"}
# Allow specfiles to know where the... | |
# Copyright 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.
from itertools import izip
import logging
import re
from net import bsonrpc
from net import gorpc
from vtdb import dbexceptions
from vtdb import field_types
from vtd... | |
#!/usr/bin/python
import gevent
import logging
import dpkt.tftp as tftp
import gevent.socket as _socket
import tftpz.util
from itertools import count
class TftpException(Exception):
@classmethod
def from_other_exception(cls, pyexception):
return cls(tftp.EUNDEF, str(pyexception))
def __init... | |
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import shutil
import tempfile
from os import path
from docker.errors import APIError
from six import StringIO
from six import text_type
from .. import mock
from .testcases import DockerClientTestCase
from .testcases import pull_... | |
from vilya.models.project import CodeDoubanProject
from vilya.models.sphinx_docs import SphinxDocs
import nose
from tests.base import TestCase
from tests.utils import delete_project
base_yaml_conf_old = """
sphinx_docs:
dir: ""
"""
base_yaml_conf = """
docs:
docs:
dir: ""
builder: pickle
"""
... | |
from __future__ import absolute_import
from pyswagger.spec import base
import unittest
import six
import copy
class GrandChildObj(six.with_metaclass(base.FieldMeta, base.BaseObj)):
__swagger_fields__ = {
'name': ''
}
class GrandChildContext(base.Context):
__swagger_ref_object__ = GrandChildObj
c... | |
# -*- coding: utf-8 -*-
"""
gspread.models
~~~~~~~~~~~~~~
This module contains common spreadsheets' models
"""
import re
from collections import defaultdict
from itertools import chain
from xml.etree import ElementTree
from xml.etree.ElementTree import Element, SubElement
from . import urlencode
from .ns import _... | |
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
from toontown.toonbase.ToontownGlobals import *
from toontown.toonbase import TTLocalizer
from toontown.parties import PartyGlobals
from toontown.hood import *
import Fireworks
imp... | |
#!/usr/bin/env python
"""
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");... | |
import os
import shutil
import platform
import pandas as pd
import matplotlib.pyplot as plt
import flopy
import pyemu
model_ws = os.path.join("extra_crispy")
nam_file = "freyberg.nam"
ml = flopy.modflow.Modflow.load(nam_file,exe_name="mf2005",model_ws=model_ws,verbose=True)
ml.dis.sr.xul = 619653
ml.dis.sr.yul = 3353... | |
# 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 python2
"""Script to do basic sanity checking for target_link_libraries() commands in
CMakeLists.txt files.
Scans C++ sources specified in add_library() commands for includes that look
like they are in the Quickstep source tree, then makes sure that the
corresponding libraries appear in the target_link... | |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | |
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy import cos, sin, pi
from numpy.testing import (assert_equal, assert_almost_equal, assert_allclose,
assert_, suppress_warnings)
from scipy.integrate import (quadrature, romberg, romb, newton_cotes,... | |
"""Just an empty models file to let the testrunner recognize this as app."""
from decimal import Decimal
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.core.excepti... | |
from symbol.builder import add_anchor_to_arg
from symbol.builder import ResNetV1bFPN as Backbone
from models.FPN.builder import FPNNeck as Neck
from models.FPN.builder import FPNRoiAlign as RoiExtractor
from models.FPN.builder import FPNBbox2fcHead as BboxHead
from mxnext.complicate import normalizer_factory
from mode... | |
from __future__ import absolute_import
from django.db.models.signals import post_save
from sentry import analytics
from sentry.adoption import manager
from sentry.models import FeatureAdoption, GroupTombstone, Organization
from sentry.plugins import IssueTrackingPlugin, IssueTrackingPlugin2
from sentry.plugins.bases.... | |
import datetime
from typing import Any, List, Mapping
from unittest import mock
import orjson
from django.utils.timezone import now as timezone_now
from zerver.lib.actions import do_change_can_create_users, do_change_user_role
from zerver.lib.exceptions import JsonableError
from zerver.lib.streams import access_strea... | |
# Copyright (c) 2014 Dave McCoy (dave.mccoy@cospandesign.com)
# This file is part of Nysa (wiki.cospandesign.com/index.php?title=Nysa).
#
# Nysa 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 ... | |
#!/usr/bin/env python3
import sys
import os
import mmap
import cairocffi as cairo
import wayland.protocol
from wayland.client import MakeDisplay
from wayland.utils import AnonymousFile
import math
import select
import time
import logging
# See https://github.com/sde1000/python-xkbcommon for the following:
from xkbcom... | |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# License: BSD 3 clause
import pytest
import numpy as np
from numpy.testing import assert_allclose
from scipy import sparse
from sklearn.base import BaseEstimator
from sklearn.dummy import DummyClassifier
from sklearn.model_selection import Leave... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Testing :mod:`astropy.cosmology.parameter`."""
##############################################################################
# IMPORTS
# STDLIB
import ast
import inspect
import sys
# THIRD PARTY
import pytest
import numpy as np
# LOCAL
import ast... | |
"""
sentry.models.release
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import logging
import re
import six
from django.db import models, IntegrityError, transac... | |
#!/usr/bin/python
# Copyright (c) 2011 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.
"""Prints the size of each given file and optionally computes the size of
libchrome.so without the dependencies added for building w... | |
from common_fixtures import * # NOQA
from cattle import ApiError
class Context:
def __init__(self, ctx, driver):
self.new_context = ctx
self.driver = driver
@pytest.fixture(scope='function')
def storage_driver_context(new_context, super_client):
client = new_context.client
stack = clien... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation.
# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
# 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 ... | |
'''
Taken from salt: salt/utils/jinja.py
https://github.com/saltstack/salt/blob/develop/salt/utils/jinja.py
Copyright 2014 SaltStack Team
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at... | |
"""
Analysing Scales of Precipitation diagnostics
Space-time Coherence package
These functions allow the user to compute and plot diagnostics of the
spatial and temporal coherence of precipitation in observations and/or
models. These functions should work for any resolution or timescale.
These functions assume that... | |
############################################
#
# Author: Luca Cinquini
#
############################################
"""
Abstract
--------
The wps module of the OWSlib package provides client-side functionality for executing invocations to a remote Web Processing Server.
Disclaimer
----------
PLEASE NOTE: the owsl... | |
''' A handler for loading sequenced assets from binaries & turtle metadata. '''
import logging
import os
import re
import sys
import yaml
from rdflib import Graph, Literal, Namespace, URIRef
from classes import pcdm
from classes.exceptions import ConfigException, DataReadException
from namespaces import bibo, dc, dcmi... | |
# Original project at https://github.com/psychomario/pyinject
# The project is licensed under the terms of the MIT license; see
# accompanying LICENSE.md for details.
import ctypes
import ctypes.wintypes as wintypes
import platform
import binascii
import os
wintypes.LPTSTR = ctypes.POINTER(ctypes.c_char)
wintypes.LPB... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from froide.helper.auth_migration_util import USER_DB_NAME
APP_MODEL, APP_MODEL_NAME = 'account.User', 'account.user'
class Migration(SchemaMigration):
def forwards(self, orm):
... | |
# Copyright 2009-2010 by 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 w... | |
# Copyright 2013 NetApp
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | |
"""Extracting and changing portions of the current line
All functions take cursor offset from the beginning of the line and the line of
Python code, and return None, or a tuple of the start index, end index, and the
word."""
from itertools import chain
from collections import namedtuple
from bpython.lazyre import Laz... | |
# Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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... | |
"""Bayesian variant calling with FreeBayes.
https://github.com/ekg/freebayes
"""
import os
import sys
import toolz as tz
from bcbio import utils
from bcbio.distributed.transaction import file_transaction
from bcbio.heterogeneity import chromhacks
from bcbio.pipeline import config_utils, shared
from bcbio.pipeline i... | |
# Copyright (c) 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | |
# -*- coding: utf-8 -*-
# Copyright 2016 Mirantis, 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 2 of the License, or
# (at your option) any later version... | |
import hashlib
import random
import re
import unicodedata
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib import messages
from ... | |
# Copyright (c) 2015 Thales Services SAS
#
# 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 l... | |
# -*- coding: utf-8 -*-
# This script is designed to be run as a Web2Py application:
# python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py
# or
# python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A testscript
import argparse
import unittest
from gluon import current
from gl... | |
# -*- coding: utf-8 -*-
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | |
"""
Extensible Authorizer
"""
import logging
import operator
from functools import reduce
from flowsieve import events
from flowsieve.acl.acl_result import ACLResult
from flowsieve.packet.eapol import ETH_TYPE_EAPOL
from flowsieve.secure_switch import SecureSwitch
from flowsieve.user_store import UserStore
from ryu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.