text
stringlengths
475
200k
# 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 agreed to ...
from __future__ import absolute_import import time import logging from ..exceptions import ( ConnectTimeoutError, MaxRetryError, ProtocolError, ReadTimeoutError, ResponseError, ) from ..packages import six log = logging.getLogger(__name__) class Retry(object): """ Retry configuration. ...
from django.contrib.admin.utils import NotRelationField, get_fields_from_path from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured from django.db import models from django.forms.models import ( BaseModelForm, BaseModelFormSet, _get_foreign_key, ) """ Does basic ModelAdmin option validation. C...
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- ##---------------------------------------------------------------------------## ## ## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer ## Copyright (C) 2003 Mt. Hood Playing Card Co. ## Copyright (C) 2005-2009 Skomoroh ## ## This program is free ...
__author__ = 'salvia' import pickle class ICPProtocolException(Exception): pass class BaseIPCProtocol(object): """ Class which handles how the data is passed through the socket. This base class implements a very simple mechanism of pickling objects and prefixing the message with `HEADER_SIZE` h...
# -*- coding: utf-8 -*- # file openpyxl/writer/theme.py # Copyright (c) 2010 openpyxl # # 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 ...
# 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 ...
# -*- coding: utf-8 -*- """ pygments.lexers.data ~~~~~~~~~~~~~~~~~~~~ Lexers for data file format. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, ExtendedRegexLexer, LexerContext, \ ...
# Copyright 2011, 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 f...
# -*- 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...
import logging import time import slackweb WEBHOOK = None logging.config.fileConfig('log.config') logger = logging.getLogger('slackLogger') def message(title, link): attachments = [ { 'fallback': 'Save links to Evernote.', 'color': 'good', 'title': title, ...
""" termcolors.py """ from django.utils import six color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = {color_names[x]: '3%s' % x for x in range(8)} background = {color_names[x]: '4%s' % x for x in range(8)} RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink...
import create_bwc_index import logging import os import random import shutil import subprocess import sys import tempfile def fetch_version(version): logging.info('fetching ES version %s' % version) if subprocess.call([sys.executable, os.path.join(os.path.split(sys.argv[0])[0], 'get-bwc-version.py'), version]) != ...
# encoding: utf-8 import datetime import south.db from south.db import dbs from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'MachineConfig' db = dbs['stats'] db.dry_run = south.db.db.dry_run ...
# Status: ported. # Base revision: 64429. # # Copyright (c) 2005-2010 Vladimir Prus. # # Use, modification and distribution is subject to the Boost Software # License Version 1.0. (See accompanying file LICENSE_1_0.txt or # http://www.boost.org/LICENSE_1_0.txt) import b2.build.type as type import b2.build.generat...
from muntjac.demo.sampler.APIResource import APIResource from muntjac.demo.sampler.Feature import Feature, Version from muntjac.terminal.gwt.server.web_browser import WebBrowser class BrowserInformation(Feature): def getDescription(self): return ('Browser differences are mostly hidden by Muntjac but in ...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j\-\a \d\e F Y' # '26-a ...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Reporter(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.EmailField(...
# -*- coding: utf-8 -*- """ Update an Attendify schedule XLSX file with the currently accepted talks. Usage: manage.py attendify_schedule_xlsx ep2016 schedule.xlsx Note that for Attendify you have to download the schedule before running this script, since they add meta data to the downloaded file ...
from __future__ import unicode_literals template = { "Resources": { "HostedZone": { "Type": "AWS::Route53::HostedZone", "Properties": {"Name": "my_zone"}, }, "my_health_check": { "Type": "AWS::Route53::HealthCheck", "Properties": { ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# This is the Twisted Fast Poetry Server, version 3.0 from zope.interface import implements from twisted.python import usage, log from twisted.plugin import IPlugin from twisted.internet.protocol import ServerFactory, Protocol from twisted.application import internet, service # Normally we would import these classe...
# -*- 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...
"""Plot the mass and stiffness data from Sandia and VABS. First, data from mass and stiffness matrices for the Sandia blade are written to the file 'sandia_blade/blade_props_from_VABS.csv' Then, these data are plotted against published data from Griffith & Resor 2011. Usage ----- Open an IPython terminal an...
# -*- coding: utf-8 -*- """Test for LTI Xmodule functional logic.""" import datetime from django.utils.timezone import UTC from mock import Mock, patch, PropertyMock import textwrap from lxml import etree from webob.request import Request from copy import copy import urllib from xmodule.fields import Timedelta from x...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Breit (@kbreit) <[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_versio...
# (c) 2012-2014, 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. ...
""" Sahana Eden Automated Test - ORG010 Change User Roles @copyright: 2011-2012 (c) Sahana Software Foundation @license: MIT 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 wi...
#!/usr/bin/env python from setuptools import setup try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except(IOError, ImportError): long_description = "" packages = [ 'editor' ] requires = [ 'numpy>=1.12.1' 'Kivy>=1.10.0' 'pillow>=2.1.0' 'cython' ] setup( ...
import pytest from unittest import mock from django.core.urlresolvers import reverse from django.core import mail from taiga.base.utils import json from taiga.hooks.github import event_hooks from taiga.hooks.github.api import GitHubViewSet from taiga.hooks.exceptions import ActionSyntaxException from taiga.projects....
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009-2010 Soluciones Tecnologócias Prisma S.A. All Rights Reserved. # José Rodrigo Fernández Menegazzo, Soluciones Tecnologócias Prisma S.A. # (http://www.solucionesprisma.com) # # This program is ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Urwid BigText fonts # Copyright (C) 2004-2006 Ian Ward # # 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...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-02-06 09:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0001_initial'), ] operations = [ migrations.CreateModel( ...
# -*- coding: utf-8 -*- import unittest from sorl.thumbnail.helpers import ThumbnailError from sorl.thumbnail.parsers import parse_crop, parse_geometry class CropParserTestCase(unittest.TestCase): def test_alias_crop(self): crop = parse_crop('center', (500, 500), (400, 400)) self.assertEqual(crop...
""" ================================= Gaussian Mixture Model Sine Curve ================================= This example demonstrates the behavior of Gaussian mixture models fit on data that was not sampled from a mixture of Gaussian random variables. The dataset is formed by 100 points loosely spaced following a noisy ...
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
""" Clickjacking Protection Middleware. This module provides a middleware that implements protection against a malicious site loading resources from your site in a hidden frame. """ from django.conf import settings from django.utils.deprecation import MiddlewareMixin class XFrameOptionsMiddleware(MiddlewareMixin): ...
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
from __future__ import unicode_literals import os from subprocess import PIPE, Popen import sys from django.utils.encoding import force_text, DEFAULT_LOCALE_ENCODING from django.utils import six from .base import CommandError def popen_wrapper(args, os_err_exc_type=CommandError): """ Friendly wrapper aroun...
# -*- 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 re from .common import InfoExtractor from ..utils import ( ExtractorError, ) class ARDIE(InfoExtractor): _VALID_URL = r'^(?:https?://)?(?:(?:www\.)?ardmediathek\.de|mediathek\.daserste\.de)/(?:.*/)(?P<video_id>[^/\?]+)(?:\?.*)?' _TITLE = r'<h1(?: class="boxTopHeadline")?>(?P<title>.*)</h1>' _ME...
#! /usr/bin/env python # Sample input data (piped into STDIN): ''' 118238@10 Sen.~^~Barack~^~Obama~^~and~^~his~^~wife~^~,~^~Michelle~^~Obama~^~,~^~have~^~released~^~eight~^~years~^~of~^~joint~^~returns~^~. O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~DURATION~^~DURATION~^~O~^~O~^~O~^~O 118238@12...
""" oauthlib.oauth2.draft_25 ~~~~~~~~~~~~~~ This module is an implementation of various logic needed for signing and checking OAuth 2.0 draft 25 requests. """ from tokens import prepare_bearer_uri, prepare_bearer_headers from tokens import prepare_bearer_body, prepare_mac_header from parameters import prepare_grant_ur...
__all__ = ['Distribution'] import re import sys from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install from setuptools.command.sdist import sdist from setuptools.command.install_lib import install_lib from setuptools.compat import ...
# -*- coding: utf-8 -*- from __future__ import absolute_import """ oauthlib.parameters ~~~~~~~~~~~~~~~~~~~ This module contains methods related to `section 3.5`_ of the OAuth 1.0a spec. .. _`section 3.5`: http://tools.ietf.org/html/rfc5849#section-3.5 """ from urlparse import urlparse, urlunparse from . import util...
#*************************************************************************** #* (c) sliptonic ([EMAIL]) 2014 * #* * #* This file is part of the FreeCAD CAx development system. * #* ...
""" Helper methods for use in profile image tests. """ from contextlib import contextmanager import os from tempfile import NamedTemporaryFile from django.core.files.uploadedfile import UploadedFile from PIL import Image @contextmanager def make_image_file(dimensions=(320, 240), extension=".jpeg", force_size=None): ...
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, compat_urllib_request, ) from ..utils import ( int_or_none, str_to_int, ) from ..aes import aes_decrypt_text class Tube8IE(InfoExtractor): _VALID_U...
#!/usr/bin/python # # @author: Gaurav Rastogi ([EMAIL]) # Eric Anderson ([EMAIL]) # module_check: supported # Avi Version: 17.1.2 # # Copyright: (c) 2017 Gaurav Rastogi, <[EMAIL]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIBLE_METADATA = {'metadata_versi...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/userfunctions.py: tests for user-defined functions and # aggregates. # # Copyright (C) 2005-2007 Gerhard Häring <[EMAIL]> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warr...
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 require...
from __future__ import unicode_literals from .common import InfoExtractor from .zdf import extract_from_xml_url class PhoenixIE(InfoExtractor): _VALID_URL = r'''(?x)https?://(?:www\.)?phoenix\.de/content/ (?: phoenix/die_sendungen/(?:[^/]+/)? )? (?P<id>[0-9]+)''' _TESTS = ...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
import sys from pyasn1.compat.octets import octs2ints from pyasn1 import error from pyasn1 import __version__ flagNone = 0x0000 flagEncoder = 0x0001 flagDecoder = 0x0002 flagAll = 0xffff flagMap = { 'encoder': flagEncoder, 'decoder': flagDecoder, 'all': flagAll } class Debug: defaultPr...
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo...
# Copyright 2019 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. """ Runs the bindings code generator for the given tasks. """ import optparse import sys import bind_gen import web_idl def parse_options(): parser =...
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 without restriction, including # without li...
import mock from datetime import datetime, timedelta from nose.tools import * # noqa from tests.base import OsfTestCase from tests.factories import UserFactory from scripts.triggered_mails import main, find_inactive_users_with_no_inactivity_email_sent_or_queued from website import mails class TestTriggeredMails(OsfT...
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_ide...
#!/usr/bin/env python """Python-Pinboard Python script for downloading your saved stories and saved comments on Hacker News and converting them to a JSON format for easy use. Originally written on Pythonista on iPad """ __version__ = "1.1" __license__ = "BSD" __copyright__ = "Copyright 2013-2014, Luciano Fiandesio" ...
"""SCons.Util Various utility functions go here. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 th...
#!/usr/bin/env python # -*- encoding: 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...
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <[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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# # 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...
def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface SpecialMethodSignatureMismatch1 { getter long long foo(long index); }; """) results = parser.finish() except: threw = True harness.ok(threw, "Should have...
import unittest class Empty(Exception): pass class Stack: class _Node: __slots__ = '_element', '_next' def __init__(self, e, n): self._element = e self._next = n def __init__(self): self._head = self._Node(None, None) self._length = 0 def __len...
############################################################################# # Documentation # ############################################################################# # Author: Todd Whiteman # Date: 16th March, 2009 # Verion: 2.0.0 # License: Public Domain - free to d...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2015 HGST # 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) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Marius Gedminas <[EMAIL]> # (c) 2016, Matthew Gamble <[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...
# 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/. def should_throw(parser, harness, message, code): parser = parser.reset(); threw = False try: parser...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # 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', ...
import cgi import urllib, urllib2, Cookie import cookielib import re import logging from urlparse import urlparse from django.utils import simplejson from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.api import...
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import hashlib import logging import os import shutil import subprocess import tempfile try: from threading import Thread except ImportErr...
# coding: utf-8 import logging import os import tempfile from django.conf import settings from django.core.mail.message import EmailMessage from excel_renderer import ExcelRenderer log = logging.getLogger(__name__) class GenerateExcelSheet: def __init__(self, shifts, mailer): if not shifts: ...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
""" Author: Armon Dadgar Date: June 11th, 2009 Description: This simple script reads "code" from stdin, and runs safe.safe_check() on it. The resulting return value or exception is serialized and written to stdout. The purpose of this script is to be called from the main repy.py script so that the memory used b...
"""Tests for our `watches just_indices_stats` subcommand.""" import json from subprocess import PIPE, Popen as popen from secure_support import TestSecureSupport class TestJustIndicesStats(TestSecureSupport): def test_returns_index_per_line(self): cmd = self.appendSecurityCommands(['watches', 'just_ind...
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Tomasz Wójcik <[EMAIL]> # # 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 u...
# Copyright (c) 2010 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 ...
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP864.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
# 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...
"""CherryPy tools. A "tool" is any helper, adapted to CP. Tools are usually designed to be used in a variety of ways (although some may only offer one if they choose): Library calls All tools are callables that can be used wherever needed. The arguments are straightforward and should be detailed w...
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test download.py TODO(epoger): Create a command to update the expected results (in self._output_dir_expected) when appropriate. For now, you should: 1. examine the resu...
# 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 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 ag...
# Copyright 2015 Adam Greenstein <[EMAIL]> # # Switcharoo Cartographer 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. # # Switcharoo C...
#!/usr/bin/python -tt # # Copyright (c) 2010, 2011 Intel 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; version 2 of the License # # This program is distributed in the hope that it will ...
from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible clas...
# # 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...
# Copyright 2015 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 a...
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <[EMAIL]>' __docformat__ = 'restructuredtext en' from functools import partial from PyQt5.Qt import QIcon, Qt from calibre.gui2.actions import InterfaceAction from calibre.gui2.prefe...
#!/usr/bin/env python2 from distutils.core import setup, Extension import os import subprocess import sys def pkg_config(package): if os.name == "nt": if package == "MagickCore": # pkg-config cannot be used, try to find needed libraries from the filesystem import fnmatch ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # # 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 ...
""" Component to interface with binary sensors. For more details about this component, please refer to the documentation at https://home-assistant.io/components/binary_sensor/ """ from datetime import timedelta import logging import voluptuous as vol from homeassistant.helpers.entity_component import EntityComponen...
# 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. """Applies a fix to CR LF TAB handling in xml.dom. Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293 Working around this: http://bugs.python.or...
# -*- 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...