text
stringlengths
475
200k
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
# Copyright 2016 The Kubernetes 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 ...
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ from __future__ import unicode_literals import base64 import cgi from django.conf import settings from django.core.exceptions import SuspiciousOperation fro...
# -*- mode: python -*- # # Copyright: Ansible Team # 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': ['stablein...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# coding: utf-8 """ From http://code.google.com/p/cherrypy-jsonrpc (LGPL) Some modifications: - Content-Type (application/json) """ import sys import httplib import cherrypy import traceback try: import jsonlib2 as json _ParseError = json.ReadError except ImportError: import json _ParseError = ValueEr...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
""" Tests for built in Function expressions. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=50) alias = models.CharField(max_leng...
from setuptools import setup import os, glob, shutil import re, json, numpy import nibabel as ni here = os.path.abspath(os.path.dirname(__file__)) setup( name="hcp2bids", # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see ...
import sys import getopt import re import string # # Originally written by Einar Lielmanis et al., # Conversion to python by Einar Lielmanis, [EMAIL], # MIT licence, enjoy. # # Python is not my native language, feel free to push things around. # # Use either from command line (script displays its usage when run # with...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <[EMAIL]> # Copyright (C) 2015 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
from treadmill.infra.setup import base_provision from treadmill.infra import configuration, connection, constants, instances from treadmill.api import ipa import time class LDAP(base_provision.BaseProvision): def setup( self, image, count, key, cidr_bloc...
#!/usr/bin/python ###################################################################### # Cloud Routes Bridge # ------------------------------------------------------------------- # Actions Module ###################################################################### import requests import time def action(**kwargs)...
# -*- coding: utf-8 -*- """ *************************************************************************** WrongScriptException.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************...
""" Create an applet from a Python script. You can drag in packages, Info.plist files, icons, etc. It's expected that only one Python script is dragged in. """ from __future__ import print_function import os, sys from distutils.core import setup from plistlib import Plist import py2app import tempfile import shutil ...
from tests import TestCase, add from yasm import SymbolTable, Expression, YasmError class TSymbolTable(TestCase): def setUp(self): self.symtab = SymbolTable() def test_keys(self): self.assertEquals(len(self.symtab.keys()), 0) self.symtab.declare("foo", None, 0) keys = self.symt...
# 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...
# Mailbox name generator # # Copyright (C) 2002-2015 John Goerzen & contributors # # 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 opti...
from __future__ import absolute_import from django.core.urlresolvers import reverse from django.http import HttpRequest from sentry.models import User from sentry.testutils import TestCase from sentry.utils.auth import EmailAuthBackend, get_login_redirect class EmailAuthBackendTest(TestCase): def setUp(self): ...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
#!/usr/bin/env python # Polygraph (release 0.1) # Signature generation algorithms for polymorphic worms # # Copyright (c) 2004-2005, Intel Corporation # All Rights Reserved # # This software is distributed under the terms of the Eclipse Public # License, Version 1.0 which can be found in the file ...
''' John Whelchel Summer 2013 Forms used just for gateways (AG, RG, and UG). ''' from django import forms from django_lib.forms import LONGEST_CHAR_FIELD, LONGEST_PASS_FIELD, LONGEST_JSON_FIELD, ReadOnlyWidget LARGEST_PORT = 65535 class ModifyGatewayConfig(forms.Form): json_config = forms.FileField(required...
## A script for extracting info about the patients used in the analysis ## Load necessary modules from rpy2 import robjects as ro import numpy as np import os ro.r('library(survival)') import re ##This call will only work if you are running python from the command line. ##If you are not running from the command lin...
# -*- encoding: utf-8 -*- # # Copyright © 2012-2013 eNovance <[EMAIL]> # # Author: Julien Danjou <[EMAIL]> # # 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/licen...
# Copyright 2016 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...
# ############################################################################ # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution. If # you can...
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """A kernel module rewriter. This is a hack that rewrites kernel modules such that they can be loaded on kernels they were not compiled for. """ import os import platform import struct import sys import logging from grr.lib import flags c...
""" Copyright 2018-present Airbnb, 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, sof...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Phil Schwartz <[EMAIL]> # Copyright: (c) 2015, Trond Hindenes # Copyright: (c) 2015, Hans-Joachim Kliemeck <[EMAIL]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1....
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Artem Feofanov <[EMAIL]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or ...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes @webnotes.whitelist() def get_items(price_list, sales_or_purchase, item=None, item_group=None): condition = "" args = {"price_list...
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 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 # # Un...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2015, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #----------------------------------------...
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
"PYTEST_DONT_REWRITE" import pytest, py from _pytest.assertion import util def exvalue(): return py.std.sys.exc_info()[1] def f(): return 2 def test_not_being_rewritten(): assert "@py_builtins" not in globals() def test_assert(): try: assert f() == 3 except AssertionError: e = e...
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
# # Copyright 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
# -*- coding: utf-8 -*- import cgi import json import os.path import glob import re import collections from lxml import etree import openerp.addons.base.ir.ir_qweb import openerp.modules from openerp.tests import common from openerp.addons.base.ir import ir_qweb class TestQWebTField(common.TransactionCase): def ...
""" Script for finding all courses whose org/name pairs == other courses when ignoring case """ from django.core.management.base import BaseCommand from xmodule.modulestore.django import modulestore from xmodule.modulestore import ModuleStoreEnum # # To run from command line: ./manage.py cms --settings dev course_id_...
#!/usr/bin/env python # New_Jeans2.py # PatternMaker: Susan Spencer Conklin # pants shell pattern from tmtpl.constants import * from tmtpl.pattern import * from tmtpl.client import Client from math import sqrt class PatternDesign(): def __init__(self): self.styledefs={} self.markerdefs={} ...
import os import os.path import string paRootDirectory = '../../' paHtmlDocDirectory = os.path.join( paRootDirectory, "doc", "html" ) ## Script to check documentation status ## this script assumes that html doxygen documentation has been generated ## ## it then walks the entire portaudio source tree and check that ##...
# -*- coding: UTF-8 -*- from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, VPC from boto.ec2.securitygroup import SecurityGroup DESCRIBE_VPCS = b'''<?xml version="1.0" encoding="UTF-8"?> <DescribeVpcsResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-0...
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above ...
""" Utilities for use in Mako markup. """ import markupsafe # Text() can be used to declare a string as plain text, as HTML() is used # for HTML. It simply wraps markupsafe's escape, which will HTML-escape if # it isn't already escaped. Text = markupsafe.escape # pylint: disable=invalid-name ...
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
import pytest import mock from mock import call from django.utils import timezone from osf.management.commands.add_notification_subscription import add_reviews_notification_setting from osf.management.commands.populate_registration_provider_notification_subscriptions import populate_registration_provider_notification_...
from __future__ import print_function import time import pytest from sssd.testlib.common.utils import sssdTools @pytest.mark.adsites class Testadsites(object): """ @Title: IDM-SSSD-TC: ad_provider: adsites: Improve AD site discovery process Test cases for BZ: 1819012 @Steps: 1. Join client to...
from django.http import HttpResponse import json import socket from data.models import Comment def processRequestFromOtherServer(obj, dict_type): json_dict = {} json_dict_list = [] if dict_type is "author": json_dict_list.append(getAuthorDict(obj)) elif dict_type is "posts": for posts...
# 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...
# pylint: disable-msg=W0611, W0612, W0511,R0201 """Tests suite for mrecords. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function import warnings import pickle import numpy as np import numpy.ma as ma from numpy import recarray from n...
# # gPrime - A web-based genealogy program # # Copyright (C) 2004-2007 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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 versi...
# Copyright 2013 Embrane, 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...
""" Period formatters and locators adapted from scikits.timeseries by Pierre GF Gerard-Marchant & Matt Knox """ # TODO: Use the fact that axis can have units to simplify the process import numpy as np from matplotlib import pylab from pandas.tseries.period import Period from pandas.tseries.offsets import DateOffset ...
""" Global Django exception and warning classes. """ class DjangoRuntimeWarning(RuntimeWarning): pass class ObjectDoesNotExist(Exception): "The requested object does not exist" silent_variable_failure = True class MultipleObjectsReturned(Exception): "The query returned multiple objects when only one w...
# Tests for mongodb_replica_set ansible module # # How to run these tests: # 1. move this file to playbooks/library # 2. rename mongodb_replica_set to mongodb_replica_set.py # 3. python test_mongodb_replica_set.py import mongodb_replica_set as mrs import unittest, mock from urllib import quote_plus from copy import de...
"""A minimal subset of the locale module used at interpreter startup (imported by the _io module), in order to reduce startup time. Don't import directly from third-party code; use the `locale` module instead! """ import sys import _locale if sys.platform.startswith("win"): def getpreferredencoding(do_setlocale=...
"""The CardConnection abstract class manages connections with a card and apdu transmission. __author__ = "http://www.gemalto.com" Copyright 2001-2012 gemalto Author: Jean-Daniel Aussel, mailto:[EMAIL] This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under the terms of...
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import remove_end class CharlieRoseIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?charlierose\.com/video(?:s|/player)/(?P<id>\d+)' _TESTS = [{ 'url': 'https://charlierose.com/videos/27996', 'md5': 'fd...
#@+leo-ver=4 #@+node:@file observer.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # [EMAIL] # # This file is part of faces. # ...
from django.db.backends import BaseDatabaseIntrospection class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type codes to Django Field types. data_types_reverse = { 16: 'BooleanField', 20: 'BigIntegerField', 21: 'SmallIntegerField', 23: 'IntegerField', 25: '...
"""A readline()-style interface to the parts of a multipart message. The MultiFile class makes each part of a multipart message "feel" like an ordinary file, as long as you use fp.readline(). Allows recursive use, for nested multipart messages. Probably best used together with module mimetools. Suggested use...
"""Base class for SharedKeyDB and VerifierDB.""" import anydbm import thread class BaseDB: def __init__(self, filename, type): self.type = type self.filename = filename if self.filename: self.db = None else: self.db = {} self.lock = thre...
#!/usr/bin/env python """This modules contains tests for artifact API handler.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import io import os from absl import app from grr_response_core import config from grr_response_core.lib.rdfvalues import ar...
from django.shortcuts import render from django.http import HttpResponse from django.template import RequestContext, loader def tiepoint_registration_1(request): from voxel_globe.meta import models image_set_list = models.ImageSet.objects.all() return render(request, 'tiepoint_registration/html/tiepoint_registra...
from webob import * def simple_app(environ, start_response): start_response('200 OK', [ ('Content-Type', 'text/html; charset=utf8'), ]) return ['OK'] def test_response(): req = Request.blank('/') res = req.get_response(simple_app) assert res.status == '200 OK' assert res.status...
'''An helper file for the pydev debugger (REPL) console ''' from code import InteractiveConsole import sys import traceback import _pydev_completer from pydevd_tracing import GetExceptionTracebackStr from pydevd_vars import makeValidXmlValue from pydev_imports import Exec from pydevd_io import IOBuf from pydev_console...
# Copyright 2014-2018 The ODL contributors # # This file is part of ODL. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. """Functions for folders and files.""" from...
# -*- encoding: utf-8 -*- import sys import unittest import ttk class MockTkApp: def splitlist(self, arg): if isinstance(arg, tuple): return arg return arg.split(':') def wantobjects(self): return True class MockTclObj(object): typename = 'test' ...
# -*- coding: utf-8 -*- # Copyright(C) 2018 Phyks (Lucas Verney) # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 o...
# BSP Note: For TI EK-TM4C1294XL Tiva C Series Connected LancuhPad (REV D) import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') #device options PART_TYPE = 'PART_TM4C129XNCZAD' # cross_tool provides the cross compiler # EXEC_...
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class ProjectConfig(OpenShiftCLIConfig): ''' project config object ''' def __init__(self, rname, namespace, kubeconfig, project_options): super(ProjectConfig, self).__init__(rname, None, kubeconfig, project_options) cl...
#!/usr/bin/env python # Copyright (c) 2009 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. # TODO: remove this script when GYP has for loops import sys import optparse def main(argv): parser = optparse.OptionParser() ...
from click.testing import CliRunner import pytest from peewee_migrate.cli import cli, get_router runner = CliRunner() @pytest.fixture def dir_option(tmpdir): return '--directory=%s' % tmpdir @pytest.fixture def db_url(tmpdir): db_path = '%s/test_sqlite.db' % tmpdir open(db_path, 'a').close() retur...
# Copyright 2018-2019 Akretion France (http://www.akretion.com/) # @author: Alexis de Lattre <[EMAIL]> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models class AccountStatementLabelCreate(models.TransientModel): _name = 'account.statement.label.create' _descr...
# -*- coding: utf-8 -*- # from django.conf import settings from .ansible.inventory import BaseInventory from common.utils import get_logger __all__ = [ 'JMSInventory', 'JMSCustomInventory', ] logger = get_logger(__file__) class JMSBaseInventory(BaseInventory): windows_ssh_default_shell = settings.WINDOWS...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests Task 04.""" # Import Python libs import unittest import task_04 class Task04TestCase(unittest.TestCase): """Test cases for Task 04.""" testmap = { 'not_enough_litterboxes': [2, 1, True, True], 'plenty_of_litterboxes': [1, 2, True, False...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
def test_nested_modules(): import pybind11_tests from pybind11_tests.submodule import submodule_func assert pybind11_tests.__name__ == "pybind11_tests" assert pybind11_tests.submodule.__name__ == "pybind11_tests.submodule" assert submodule_func() == "submodule_func()" def test_reference_interna...
# -*- coding: utf-8 -*- """ pygments.lexers.textedit ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for languages related to text processing. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from bisect import bisect from pygments.lexer im...
from os.path import dirname, join from setuptools import setup, find_packages with open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f: version = f.read().decode('ascii').strip() setup( name='Scrapy', version=version, url='http://scrapy.org', description='A high-level Web Crawling and Web...
# # ovirt-hosted-engine-setup -- ovirt hosted engine setup # Copyright (C) 2013-2017 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, o...
'''Tools for interacting with VARYPED model equilibria''' import numpy as np from sys import argv import string import copy def create_db(file_path): '''Create a dictionary from a VARYPED results text file. Parameters: file_path -- string, path to the text file containing VARYPED results. The fi...
from __future__ import print_function import re from datetime import datetime, timedelta import numpy as np import pandas as pd from pandas.tseries.base import DatetimeIndexOpsMixin from pandas.util.testing import assertRaisesRegexp, assertIsInstance from pandas.tseries.common import is_datetimelike from pandas import ...
""" Provided code for Application portion of Module 2 Answers 4/6 Application Grade is 13 out of 15 Text Answers -Question 2: All three graphs are resilient in this case. Question5: -UPA and ER graphs are steel resilient (UPA is very close to overcoming 25% roughnes) in this type of attack. """ # general imports...
from functools import partial import numpy as np from skimage import img_as_float, img_as_uint from skimage import color, data, filters from skimage.color.adapt_rgb import adapt_rgb, each_channel, hsv_value from skimage._shared._warnings import expected_warnings # Down-sample image for quicker testing. COLOR_IMAGE =...
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import int_or_none class CollegeHumorIE(InfoExtractor): _VALID_URL = r'^(?:https?://)?(?:www\.)?collegehumor\.com/(video|embed|e)/(?P<videoid>[0-9]+)/?(?P<shorttitle>.*)$' _TESTS = [ { ...
# # 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...
""" SQLite3 backend for django. Works with either the pysqlite2 module or the sqlite3 module in the standard library. """ from __future__ import unicode_literals import datetime import decimal import warnings import re from django.conf import settings from django.db import utils from django.db.backends import (utils...
"""Tests for letsencrypt.auth_handler.""" import functools import logging import unittest import mock from acme import challenges from acme import client as acme_client from acme import messages from letsencrypt import errors from letsencrypt import le_util from letsencrypt.tests import acme_util TRANSLATE = { ...
# 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. """Presubmit script for Chromium browser resources. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about t...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
from django.contrib.admin import ModelAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget from django.contrib.gis.db import models from django.contrib.gis.gdal import HAS_GDAL, OGRGeomType from django.core.exceptions import ImproperlyConfigured spherical_mercator_srid = 3857 class GeoModelAdmin(Model...
import json import util from collections import defaultdict def get_fb_stats(freebase_data_file): with open(freebase_data_file) as fb: fact_counter = 0 relation_set = set() entity_set = set() for line in fb: line = line.strip() line = line[1:-1] ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import logging import os import re import docutils import docutils.core import docutils.io from docutils.writers.html4css1 import HTMLTranslator import six # import the directives to have pygments support from pelican import rstdirective...
"""Tests for letsencrypt.proof_of_possession.""" import os import tempfile import unittest import mock from acme import challenges from acme import jose from acme import messages from letsencrypt import achallenges from letsencrypt import proof_of_possession from letsencrypt.display import util as display_util from...
# Copyright (c) 2019, Matt Layman and contributors import contextlib import os import unittest import unittest.case from tap.i18n import _ from tap.runner import TAPTestResult from tap.tests import TestCase from tap.tracker import Tracker class FakeTestCase(unittest.TestCase): def runTest(self): pass ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- 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...