text
stringlengths
475
200k
# 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. import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml import gyp.MSVSNew a...
# ##### BEGIN MIT LICENSE BLOCK ##### # Copyright (C) 2011 by Lih-Hern Pang # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
import logging import mimetypes mimetypes.init() mimetypes.types_map['.dwg'] = 'image/x-dwg' mimetypes.types_map['.ico'] = 'image/x-icon' mimetypes.types_map['.bz2'] = 'application/x-bzip2' mimetypes.types_map['.gz'] = 'application/x-gzip' import os import re import stat import time from urllib import unquote import ...
# -*- 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...
import unittest from mock import patch from mock import MagicMock as Mock from oioswift.common.ring import FakeRing from oioswift import server as proxy_server from swift.common.swob import Request from swift.proxy.controllers.base import headers_to_container_info from swift.common.request_helpers import get_sys_meta_...
import unittest import idlelib.CallTips as ct CTi = ct.CallTips() # needed for get_entity test in 2.7 import textwrap import types import warnings default_tip = '' # Test Class TC is used in multiple get_argspec test methods class TC(object): 'doc' tip = "(ai=None, *args)" def __init__(self, ai=None, *b)...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Verifies that GRD resource files define all the strings used by a given set of source files. For file formats where it is not po...
from future.builtins import int from collections import defaultdict from django.core.urlresolvers import reverse from django.template.defaultfilters import linebreaksbr, urlize from mezzanine import template from mezzanine.conf import settings from theme.forms import ThreadedCommentForm from mezzanine.generic.model...
# Copyright 2014 - Rackspace US, 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 ...
#!/usr/bin/env python3 #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <[EMAIL]> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtai...
# Copyright 2007 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <[EMAIL]> # # 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', 's...
from __future__ import unicode_literals import collections from rest_framework.compat import OrderedDict, unicode_to_repr class ReturnDict(OrderedDict): """ Return object from `serialier.data` for the `Serializer` class. Includes a backlink to the serializer instance for renderers to use if they need ...
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
#copied from http://code.activestate.com/recipes/576611-counter-class/ from operator import itemgetter from heapq import nlargest from itertools import repeat, ifilter class Counter(dict): '''Dict subclass for counting hashable objects. Sometimes called a bag or multiset. Elements are stored as dictionary ...
import os from time import time from enigma import eDVBDB, eEPGCache, setTunerTypePriorityOrder, setPreferredTuner, setSpinnerOnOff, setEnableTtCachingOnOff, eEnv, Misc_Options, eBackgroundFileEraser, eServiceEvent from Components.About import about from Components.Harddisk import harddiskmanager from config import Con...
"""This is part of the Mouse Tracks Python application. Source: https://github.com/Peter92/MouseTracks """ #Easy to use wrappers for sockets from __future__ import absolute_import import psutil import socket import struct from select import select from .compatibility import pickle def send_msg(sock, msg): """P...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 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 versio...
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from django.core.exceptions import ValidationError from django.db import transaction import json import productmd from productmd.common import create_release_id from pdc.apps.common import hacks as common_hack...
from sympy import ( Symbol, gamma, I, oo, nan, zoo, factorial, sqrt, Rational, log, polygamma, EulerGamma, pi, uppergamma, S, expand_func, loggamma, sin, cos, O, lowergamma, exp, erf, erfc, exp_polar, harmonic, zeta,conjugate) from sympy.core.function import ArgumentIndexError from sympy.utilities.randtest ...
# Copyright 2014 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines class that describes C++ typedef declaration """ from . import declaration from . import dependencies class typedef...
# coding=utf-8 # Copyright 2014, Rafael Bodill http://github.com/rafi # vim: set ts=8 sw=4 tw=80 et : import logging import requests import json from beets.plugins import BeetsPlugin from beets import ui from beets import dbcore from beets import config from pprint import pprint from beets.dbcore import types log = ...
# -*- coding: utf-8 -*- from mako.template import Template import unittest from util import result_lines, flatten_result class FilterTest(unittest.TestCase): def test_basic(self): t = Template(""" ${x | myfilter} """) assert flatten_result(t.render(x="this is x", myfilter=lambda t: "MYFILT...
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingResults.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
# -*- test-case-name: twisted.test.test_htb -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Hierarchical Token Bucket traffic shaping. Patterned after U{Martin Devera's Hierarchical Token Bucket traffic shaper for the Linux kernel<http://luxik.cdi.cz/~devik/qos/htb/>}. @seealso: U{HT...
''' XbrlSemanticJsonDB.py implements an JSON database interface for Arelle, based on a concrete realization of the Abstract Model PWD 2.0 layer. This is a semantic representation of XBRL information. This module may save directly to a JSON Server (TBD) or to append to a file of JSON. This module provides the execu...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 - Thierry Godin. All Rights Reserved # @author Thierry Godin <[EMAIL]> # # This program is free software: you can redistribute it an...
#!/usr/bin/env python # coding=utf8 """ Add list of closed bugs to changes table @contact: Debian FTP Master <[EMAIL]> @copyright: 2012 Ansgar Burchardt <[EMAIL]> @license: GNU General Public License version 2 or later """ # This program is free software; you can redistribute it and/or modify # it under the terms of...
#!/usr/bin/python2.4 # # Copyright 2008 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...
from distutils.core import setup import os LOCALE_DIR= '/usr/share/locale' locales = [] if os.path.exists('po/locale'): for lang in os.listdir('po/locale'): locales.append(os.path.join(lang, 'LC_MESSAGES')) data_files = [("share/applications/", ["share/applications/mageiasync.desktop"]), ("...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
""" Tests for Django's bundled context processors. """ from django.test import TestCase class RequestContextProcessorTests(TestCase): """ Tests for the ``django.core.context_processors.request`` processor. """ urls = 'regressiontests.context_processors.urls' def test_request_attributes(self): ...
########################################################################## # # Copyright (c) 2012, John Haddon. 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 sou...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: APP_NAME = 'FoodSnag' MAILER_NAME = 'Snagger' MAILER_EMAIL = '[EMAIL]' MG_KEY = os.environ.get('MG_KEY') MG_URL = 'https://api.mailgun.net/v3/sandbox86fa708b0be84193924a6900094a11cf.mailgun.org' SECRET_KEY = os.enviro...
# # PIDA Basic Block # Copyright (C) 2006 Pedram Amini <[EMAIL]> # # $Id: basic_block.py 194 2007-04-05 15:31:53Z cameron $ # # 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 ...
# NOTE: Documentation is intended to be processed by epydoc and contains # epydoc markup. """ Overview ======== The ``grizzled.forwarder`` module contain classes that make building proxies easier. """ from __future__ import absolute_import __docformat__ = "restructuredtext en" # -----------------------------------...
from Components.ActionMap import ActionMap from Components.Ipkg import IpkgComponent from Components.Label import Label from Components.Slider import Slider from Screens.Screen import Screen from Screens.MessageBox import MessageBox from enigma import eTimer class Ipkg(Screen): def __init__(self, session, cmdList=Non...
import os import io import tarfile import sys import pytest import docker.errors __client = None if sys.version_info.major == 2: file_not_found_error = IOError else: file_not_found_error = FileNotFoundError def get_client(): """ Returns: docker.DockerClient """ global __client i...
# 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 unittest from bisect_results import BisectResults import source_control class MockDepotRegistry(object): def ChangeToDepotDir(self, dep...
# 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...
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Red...
# -*- coding: utf-8 -*- # # SelfTest/Hash/MD2.py: Self-test for the MD2 hash function # # Written in 2008 by Dwayne C. Litzenberger <[EMAIL]> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the p...
#!/usr/bin/env python import copy import operator import os import os.path import pickle import string import sys # Constant for C++ files. FILETYPE_CPP = 2 # Constant for DDDOC files. FILETYPE_DDDOC = 1 # Constant for none of the above. FILETYPE_OTHER = 0 SOURCE_ENCODING = 'iso8859-1' # Extension of C++ files. CPP...
#!/usr/bin/python # coding=utf-8 ############################################################################### from test import CollectorTestCase from test import get_collector_config from test import run_only from mock import patch from slony import SlonyCollector def run_only_if_psycopg2_is_available(func): ...
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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 ## ## ht...
#!/usr/bin/env python # 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 http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Anthony Verez [EMAIL] from celery.sc...
from .kernel_struct import * from .raw_dump import * from .fingerprint import * from xml.dom.minidom import parse, Document import os.path CONFIG_VERSION = 1.0 class Config: init_task = None arch = None offsets = {} dumpfile = None debug = False @classmethod def setDebug(cls, debug=False): ...
# Author: Mr_Orange <[EMAIL]> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrik Lundin <[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 #...
#!/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. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import subprocess import sys class CommandRunner(obje...
#!/usr/bin/python -tt # # Copyright (C) 2005-2012 Erik de Castro Lopo <[EMAIL]> # # Released under the 2 clause BSD license. """ This program checks C code for compliance to coding standards used in libsndfile and other projects I run. """ import re import sys class Preprocessor: """ Preprocess lines of C code to...
""" Useful auxilliary data structures for query construction. Not useful outside the SQL domain. """ class EmptyResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was attempted (if the caller wants to treat that ...
IOC_TO_ISO = { 'AFG': 'AF', 'ALB': 'AL', 'ALG': 'DZ', 'AND': 'AD', 'ANG': 'AO', 'ANT': 'AG', 'ARG': 'AR', 'ARM': 'AM', 'ARU': 'AW', 'ASA': 'AS', 'AUS': 'AU', 'AUT': 'AT', 'AZE': 'AZ', 'BAH': 'BS', 'BAN': 'BD', 'BAR': 'BB', 'BDI': 'BI', 'BEL': 'BE',...
# # Copyright (C) 2010 The Android Open Source Project # # 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 la...
""" Letsencrypt Integration Test Tool - Configures (canned) boulder server - Launches EC2 instances with a given list of AMIs for different distros - Copies letsencrypt repo and puts it on the instances - Runs letsencrypt tests (bash scripts) on all of these - Logs execution and success/fail for debugging Notes: - ...
""" Module containing the Independent class to handle all operations pertaining to the independent model. """ import os import pandas as pd class Independent: """Returns an Independent object that reads in the data, splits into sets, trains and classifies, and writes the results.""" def __init__(self, co...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.utils.timezone import now class Migration(SchemaMigration): def forwards(self, orm): db.rename_column('order_ordernote', 'date', 'date_created') # Addi...
import os import tempfile import unittest import numpy import chainer from chainer import cuda from chainer import gradient_check from chainer import links from chainer.serializers import npz from chainer import testing from chainer.testing import attr from chainer.testing import condition from chainer.utils import t...
from pandajedi.jediconfig import jedi_config from pandajedi.jedicore import Interaction # interface to DDM class DDMInterface: # constructor def __init__(self): self.interfaceMap = {} # setup interface def setupInterface(self): # parse config for configStr in jedi_config.ddm....
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw, Thomas Wouters, Anthony Baxter # Contact: [EMAIL] """A parser of RFC 2822 and MIME email messages.""" __all__ = ['Parser', 'HeaderParser'] import warnings from cStringIO import StringIO from email.feedparser import FeedParser from email.me...
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class KickStarterIE(InfoExtractor): _VALID_URL = r'https?://www\.kickstarter\.com/projects/(?P<id>[^/]*)/.*' _TESTS = [{ 'url': 'https://www.kickstarter.com/projects/1404461844/intersection-the-story-of-josh-g...
# Copyright (c) 2011 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. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
from datetime import datetime def main(request, response): last_event_id = request.headers.get("Last-Event-Id", "") ident = request.GET.first('ident', "test") cookie = "COOKIE" if ident in request.cookies else "NO_COOKIE" origin = request.GET.first('origin', request.headers["origin"]) credentials =...
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies build of an executable in three different configurations. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('configur...
import json import sys from ansible.module_utils.basic import env_fallback from ansible.module_utils.urls import fetch_url def scaleway_argument_spec(): return dict( api_token=dict(required=True, fallback=(env_fallback, ['SCW_TOKEN', 'SCW_API_KEY', 'SCW_OAUTH_TOKEN', 'SCW_API_TOKEN']), ...
# -*- 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...
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Calculates timelines from the client.""" from grr.lib import aff4 from grr.lib import data_store from grr.lib import flow from grr.lib import rdfvalue from grr.lib import utils from grr.proto import flows_pb2 class MACTimesArgs(rdfvalue.RDFPro...
#!/usr/bin/env python import os, unittest from xdis.load import load_module def get_srcdir(): filename = os.path.normcase(os.path.dirname(os.path.abspath(__file__))) return os.path.realpath(filename) srcdir = get_srcdir() class TestMarshal(unittest.TestCase): def test_basic(self): """Tests xdi...
"""creates: bigpicture.svg bigpicture.png""" import os from math import pi, cos, sin import numpy as np import matplotlib #matplotlib.use('Agg') import matplotlib.patches as mpatches import matplotlib.pyplot as plt class Box: def __init__(self, name, description=(), attributes=(), color='grey'): self.na...
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import int_or_none class LiveLeakIE(InfoExtractor): _VALID_URL = r'https?://(?:\w+\.)?liveleak\.com/view\?(?:.*?)i=(?P<id>[\w_]+)(?:.*)' _TESTS = [{ 'url': 'http://www.liveleak.com/view?i=757...
# Copyright (c) 2012 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 or agreed to in writing, s...
try: frozenset except NameError: # Import from the sets module for python 2.3 from sets import Set as set from sets import ImmutableSet as frozenset try: any except: # Implement 'any' for python 2.4 and previous def any(iterable): for element in iterable: if element: ...
#!/usr/bin/env python """Unit tests for the with statement specified in PEP 343.""" __author__ = "Mike Bland" __email__ = "mbland at acm dot org" import sys import unittest from collections import deque from contextlib import GeneratorContextManager, contextmanager from test.test_support import run_unittest class...
# -*- coding: utf-8 -*- # # 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/python # -*- coding: utf-8 -*- # # (c) 2017, Yanis Guenane <[EMAIL]> # 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', ...
from nose import SkipTest from nose.tools import assert_true import networkx as nx class TestConvertPandas(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): try: import pandas as pd except ImportError: ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 Radware LTD. # # 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...
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
""" A Python Markdown extension to convert plain-text diagrams to images. """ # The MIT License (MIT) # # Copyright (c) 2014 Sergey Astanin # # 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 logging from c2corg_api import DBSession from c2corg_api.models.feed import FollowedUser from c2corg_api.views import cors_policy, restricted_json_view from c2corg_api.views.document_listings import get_documents_for_ids from c2corg_api.views.document_schemas import user_profile_documents_config from c2corg_api...
# 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 def execute(): from stock.stock_ledger import update_entries_after item_warehouse = [] # update valuation_rate in transaction doc...
# # 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 # ...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'EU Mini One Stop Shop (MOSS)', 'category': 'Localization', 'description': """ EU Mini One Stop Shop (MOSS) VAT for telecommunications, broadcasting and electronic services =========================...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Daniel Zhang (張道博)' __copyright__ = 'Copyright (c) 2014, University of Hawaii Smart Energy Project' __license__ = 'https://raw.github.com/Hawaii-Smart-Energy-Project/Smart-Grid' \ '-PV-Inverter/master/BSD-LICENSE.txt' import unittest from inser...
"""Exceptions used throughout package""" from __future__ import absolute_import class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class ...
# -*- coding: utf-8 -*- """ werkzeug.exceptions ~~~~~~~~~~~~~~~~~~~ This module implements a number of Python exceptions you can raise from within your views to trigger a standard non-200 response. Usage Example ------------- :: from werkzeug.wrappers import BaseRequest ...
''' datetime.tzinfo timezone definitions generated from the Olson timezone database: ftp://elsie.nci.nih.gov/pub/tz*.tar.gz See the datetime section of the Python Library Reference for information on how to use these modules. ''' # The Olson database has historically been updated about 4 times a year OLSON_VERSI...
from scrapy.selector import HtmlXPathSelector from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.contrib.spiders import CrawlSpider, Rule from appcrawl.items import AppItem, AppStoreItem from scrapy.http import Request import datetime import re class PlaystoreSpider(CrawlSpider): def gen...
# (c) 2017, Frederic Van Espen <[EMAIL]> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callback: stde...
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
# Storage configuration spoke classes # # Copyright (C) 2011-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program...
""" Module Analysing code to extract positive subscripts from code. """ # TODO check bound of while and if for more occurate values. import ast import copy from pythran.analyses import Globals, Aliases from pythran.intrinsic import Intrinsic from pythran.passmanager import FunctionAnalysis from pythran.range import ...
# (C) 2012, Michael DeHaan, <[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 # (at your option) any later version. # # A...
from optparse import make_option from django.conf import settings from django.core.management.commands.runserver import Command as RunserverCommand from django.contrib.staticfiles.handlers import StaticFilesHandler class Command(RunserverCommand): option_list = RunserverCommand.option_list + ( make_optio...
from django.conf.urls.defaults import * from views import empty_view, absolute_kwargs_view other_patterns = patterns('', url(r'non_path_include/$', empty_view, name='non_path_include'), ) urlpatterns = patterns('', url(r'^places/(\d+)/$', empty_view, name='places'), url(r'^places?/$', empty_view, name="pl...
from django import template from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models, transaction from django.forms.models import modelform_factory from django.http import Http404, HttpResponse from django.utils.encoding import force_unicode, smart_unicode from django.utils.h...
# -*- coding: utf-8 -*- import random import string from itertools import cycle from django.core.exceptions import ValidationError import mock from nose.tools import eq_, ok_ import mkt.site.tests import mkt.feed.constants as feed from mkt.feed.models import (FeedApp, FeedBrand, FeedCollection, FeedItem, ...
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...