text
stringlengths
475
200k
# (c) 2015, Toshio Kuratomi <[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. # # ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Upside Travel, 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 app...
import logging import random from pyleus.storm import Spout log = logging.getLogger('counter') LINES = """ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pharetra ante eget nunc blandit vestibulum. Curabitur tempus mi a risus lacinia egestas. Nulla faucibus elit vitae dignissim euismod. Fusce ac ...
import unittest from django.template.smartif import IfParser, Literal class SmartIfTests(unittest.TestCase): def assertCalcEqual(self, expected, tokens): self.assertEqual(expected, IfParser(tokens).parse().eval({})) # We only test things here that are difficult to test elsewhere # Many other test...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Qt widget integrating Tegaki/Tomoe handwriting character recognition for Japanese Kanji and Chinese Hanzi. Includes a QApplication demonstrating the wiget. 10.02.2009 Christoph Burgmer ([EMAIL]) History: * 11.02.2009, show boundaries and keep handwriting within them,...
# -*- coding: utf-8 -*- # # namcap tests - invalidstartdir # Copyright (C) 2011 Rémy Oudompheng <[EMAIL]> # # 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...
""" Unsupervised evaluation metrics. """ # Authors: Robert Layton <[EMAIL]> # # License: BSD 3 clause import numpy as np from ...utils import check_random_state from ..pairwise import pairwise_distances def silhouette_score(X, labels, metric='euclidean', sample_size=None, random_state=None, **...
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
""" ====================== SVM with custom kernel ====================== Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface and the support vectors. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import svm, datasets # import some data...
"""cryptomath module This module has basic math/crypto code.""" import os import math import base64 import binascii import sha from compat import * # ************************************************************************** # Load Optional Modules # ****************************************************************...
#!/bin/env python # -*- python -*- # # Copyright 2003,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 (...
import unittest, struct import os from test import test_support import math from math import isinf, isnan, copysign, ldexp import operator import random import fractions import sys INF = float("inf") NAN = float("nan") have_getformat = hasattr(float, "__getformat__") requires_getformat = unittest.skipUnless(have_get...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView from django.contrib.auth.mixins import LoginRequiredMixin from .models import User class UserDetailView(Login...
# -*- coding: utf-8 -*- from openerp import models, fields, api, osv # We just create a new model class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name'), 'state': osv.fie...
""" This is a Metropolis Adjusted Langevin Algorithm (MALA) proposal. Author: Ilias Bilionis """ __all__ = ['MALAProposal'] import numpy as np from scipy.stats import norm from . import GradProposal from . import SingleParameterTunableProposalConcept class MALAProposal(GradProposal, SingleParameterTunablePro...
# Copyright (c) 2009, 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...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-04 17:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
""" Unit tests for the SSE backend. """ from __future__ import unicode_literals, absolute_import import json import unittest import mock from fmn.consumer.backends import SSEBackend @mock.patch('fmn.consumer.backends.sse.protocol.ClientCreator', mock.Mock()) class TestSSEBackend(unittest.TestCase): def test_f...
import copy import operator from functools import total_ordering, wraps from django.utils import six from django.utils.six.moves import copyreg # You can't trivially replace this with `functools.partial` because this binds # to classes and returns bound instances, whereas functools.partial (on # CPython) is a type a...
"""engine.SCons.Tool.cvf Tool-specific initialization for the Compaq Visual Fortran compiler. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentatio...
# -*- coding: utf-8 -*- # # This file is part of kwalitee # Copyright (C) 2014, 2015 CERN. # # kwalitee is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) an...
# -*- 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 sys, traceback import mal_readline import mal_types as types from mal_types import (MalSym, MalInt, MalStr, _keywordu, MalList, _list, MalVector, MalHashMap, MalFunc) import reader, printer # read def READ(str): return reader.read_str(str) # eval def eval_ast(...
''' Clipboard Pygame: an implementation of the Clipboard using pygame.scrap. ''' __all__ = ('ClipboardPygame', ) from kivy.utils import platform from kivy.compat import PY2 from kivy.core.clipboard import ClipboardBase if platform not in ('win', 'linux', 'macosx'): raise SystemError('unsupported platform for pyg...
#!/usr/bin/env python # Copyright (c) 2014 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. """ Test VCCLCompilerTool EnableEnhancedInstructionSet setting. """ import TestGyp import os import sys if sys.platform == 'win32': tes...
#!/usr/bin/env python3 import argparse import pandas import os import json import re import numpy as np from scipy import stats from babyai import plotting as bp parser = argparse.ArgumentParser("Analyze performance of imitation learning") parser.add_argument("--path", default='.', help="path to model logs") par...
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Versioning plugin for DB Manager Description : Set up versioning support for a table Date : Mar 12, 2012 copyright : (C) 2012 by Giuseppe Sucameli email ...
# *-* coding: UTF-8 *-* # standard library imports import logging import re import traceback import sys # related third party imports import webapp2 from google.appengine.api.users import NotAllowedError from webapp2_extras import jinja2 from webapp2_extras import auth from webapp2_extras import sessions from google.a...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # # Program Parameters # import os import...
# -*- coding: utf-8 -*- # # File: srmoduleconfig.py # # Copyright (c) 2017 by Condat AG # Generator: ConPD2 # http://www.condat.de # __author__ = '' __docformat__ = 'plaintext' """Definition of the SRModuleConfig content type. See srmoduleconfig.py for more explanation on the statements below. """ from Acc...
data = ( 'Chey ', # 0x00 'Thak ', # 0x01 'Thak ', # 0x02 'Thang ', # 0x03 'Thayk ', # 0x04 'Thong ', # 0x05 'Pho ', # 0x06 'Phok ', # 0x07 'Hang ', # 0x08 'Hang ', # 0x09 'Hyen ', # 0x0a 'Hwak ', # 0x0b 'Wu ', # 0x0c 'Huo ', # 0x0d '[?] ', # 0x0e '[?] ', # 0x0f 'Zhong ', ...
# -*- 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 -*- import StringIO import sys import time from nose import tools from docker_registry.core import exceptions import docker_registry.testing as testing from docker_registry.testing import mock_boto # noqa from . import mock_s3 # noqa class StringIOWithError(StringIO.StringIO): '''Throw...
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <[EMAIL]> and contributors. 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...
# util/__init__.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .compat import callable, cmp, reduce, \ threading, py3k, py33, py36, py2k...
"""Backport of importlib.import_module from 3.x.""" # While not critical (and in no way guaranteed!), it would be nice to keep this # code compatible with Python 2.3. import sys def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" if not hasattr(package, 'rindex...
# Copyright (C) 2001-2010 Python Software Foundation # Author: Barry Warsaw # Contact: [EMAIL] """Classes to generate plain text from a message object tree.""" from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from futur...
# (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. ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
from __future__ import unicode_literals from xml.dom import minidom from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_settings, skipUnlessDBFeature, ) if HAS_GEOS: from .mode...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-31 17:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ApplicationManagement', '0011_auto_20170331_1649'), ] operations = [ migrat...
import Queue import threading import time import serial class ComMonitorThread(threading.Thread): """ A thread for monitoring a COM port. The COM port is opened when the thread is started. data_q: Queue for received data. Items in the queue are (data, ti...
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. # # Copyright 2014 Michal Schmidt # # systemd 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; eith...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class BitbucketOAuth2Account(ProviderAccount): def get_profile_url(self): return (self.account.extra_data .get('links', {}) .get('html...
from common_fixtures import * # NOQA test_network_policy = os.environ.get( 'TEST_NETWORK_POLICY', "False") np_reason = \ 'Intended to not execute this network policy test' if_network_policy = pytest.mark.skipif(test_network_policy != "ALL", reason=np_reason) if_network_...
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <[EMAIL]> # # 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...
from subprocess import call import os import json BUILDER_PATH = os.path.dirname(os.path.abspath(__file__)) ROOT_PATH = os.path.join(BUILDER_PATH, '..') FONTS_FOLDER_PATH = os.path.join(ROOT_PATH, 'fonts') CSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'css') SCSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'scss') LESS_FOLDER_...
""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supported data source. For example, a SHP file or a TIGER/Line...
# # crypto.py # # Copyright (C) 2009 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
# Copyright 2015 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 copy import default_flavor """iOS flavor utils, used for building for and running tests on iOS.""" class iOSFlavorUtils(default_flavor.DefaultFla...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/engine.h> """ TYPES = """ st...
# # Copyright (C) 2020 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 is distributed in the hope that it will be...
#!/usr/bin/env pmpython # # Copyright (C) 2016 Sitaram Shelke. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # Thi...
#!/usr/bin/env python # # Copyright (c) 2013 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. """Command line tool for forwarding ports from a device to the host. Allows an Android device to connect to services running on ...
#!/usr/bin/env python # # Copyright 2008, 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...
# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import ( compat_etree_fromstring, compat_parse_qs, compat_str, compat_urllib_parse_urlparse, compat_urlparse, compat_xml_parse_error, compat_HTTPError, ) from ..uti...
from bongo.apps.bongo.tests import factories from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from django.utils.text import slugify import os """ Test content type models and related: test, video, PDF, photo, HTML, pullquote, post """ class TextTestCase(Te...
# ----------------------------------------------------------------------------- # cpp.py # # Author: David Beazley (http://www.dabeaz.com) # Copyright (C) 2007 # All rights reserved # # This module implements an ANSI-C style lexical preprocessor for PLY. # -------------------------------------------------------------...
# 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 ag...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, os from frappe import _ from frappe.utils import cint, today, formatdate import frappe.defaults from frappe.model.document import Docu...
import macpath from test import test_support, test_genericpath import unittest class MacPathTestCase(unittest.TestCase): def test_abspath(self): self.assertEqual(macpath.abspath("xx:yy"), "xx:yy") def test_isabs(self): isabs = macpath.isabs self.assertTrue(isabs("xx:yy")) sel...
#!/usr/bin/env python3 """ ############################# Server applycation version python: python3 based on socket ############################# """ import select import socket import sys import datetime from PyQt5 import QtWidgets from PyQt5.QtCore import QThread, QPoint import userf...
# NOTE: contains only one test, _est_cont_fit, that is renamed so that # nose doesn't run it # I put this here for the record and for the case when someone wants to # verify the quality of fit # with current parameters: relatively small sample size, default starting values # Ran 84 tests in 401.797s # ...
# Copyright 2016 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 unittest from form_classification_test import FormClassificationTest """Unittest class for testing signin forms. The test methods were generated by ...
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
#!/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 compare_rendered_pictures.py TODO(epoger): Create a command to update the expected results (in self._output_dir_expected) when appropriate. For now, you should: 1....
''' deploy operations for setup zstack database. @author: Youyk ''' import zstackwoodpecker.test_util as test_util import apibinding.api_actions as api_actions import account_operations import resource_operations as res_ops import zstacklib.utils.sizeunit as sizeunit import zstacklib.utils.jsonobject as ...
'''Pulsar HTTP test application:: python manage.py Implementation ====================== .. autoclass:: HttpBin :members: :member-order: bysource Server Hooks =================== This example shows how to use :ref:`server hooks <setting-section-application-hooks>` to log each request .. automodule:: exa...
"""Test lldb reloads the inferior after it was changed during the session.""" import os, time import unittest2 import lldb from lldbtest import * import lldbutil class ChangedInferiorTestCase(TestBase): mydir = os.path.join("functionalities", "inferior-changed") @unittest2.skipUnless(sys.platform.startswith...
from __future__ import absolute_import import inspect from django.utils import six def getargspec(func): if six.PY2: return inspect.getargspec(func) sig = inspect.signature(func) args = [ p.name for p in sig.parameters.values() if p.kind == inspect.Parameter.POSITIONAL_OR_KEYWOR...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, unified_strdate, urlencode_postdata, xpath_element, xpath_text, urljoin, update_url_query, ) class Laola1TvEmbedIE(InfoExtractor): IE_NAME = 'laola1tv:embed'...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
#!/usr/bin/env python # example basictreeview.py import pygtk pygtk.require('2.0') import gtk import os import dialogs class SnaphuConfigEditor: def snaphuParser(self, set=None, setFile=None): if setFile is None: setFile=self.setFile; if set is None: set=self.set; ...
# Copyright (c) 2012 VMware, Inc. All Rights Reserved. # This file is part of ATOMac. #@author: Nagappan Alagappan <[EMAIL]> #@copyright: Copyright (c) 2009-12 Nagappan Alagappan #http://ldtp.freedesktop.org # ATOMac is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publ...
import aiohttp from registrar import AbstractCommand, bot_command @bot_command class Command(AbstractCommand): """ Template for bot command classes. """ _name = 'changepic' _aliases = ['changepic'] _enabled = True tags = {'misc': ['private'], 'args': {'req': ['pic'], 'nreq': []}} @staticmeth...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import determine_ext class OnionStudiosIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?onionstudios\.com/(?:videos/[^/]+-|embed\?.*\bid=)(?P<id>\d+)(?!-)' _TESTS = [{ 'url': 'http:/...
# stdlib import unittest # project from aggregator import Histogram, MetricsAggregator from config import get_histogram_aggregates, get_histogram_percentiles class TestHistogram(unittest.TestCase): def test_default(self): stats = MetricsAggregator('myhost') for i in xrange(20): stats....
import logging import os from flask import Flask, json, render_template from flask_ask import Ask, request, session, question, statement app = Flask(__name__) ask = Ask(app, "/") logging.getLogger('flask_ask').setLevel(logging.DEBUG) COLOR_KEY = "COLOR" @ask.launch def launch(): card_title = render_template(...
""" Implementation of Harwell-Boeing read/write. At the moment not the full Harwell-Boeing format is supported. Supported features are: - assembled, non-symmetric, real matrices - integer for pointer/indices - exponential format for float values, and int format """ from __future__ import division, print_...
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP # # 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 limi...
__author__ = "eloraiby" __date__ = "$5-Sep-2010 9:35:29 PM$" atomic_types = ["unsigned char", "unsigned short", "unsigned int", "signed char", "signed short", "signed int", "float", "double"] glsl_vector_types = ["tvec2", "tvec3", "tvec4"] glsl_matrix_types = ["tmat2x2", "tmat2x3", "tmat2x4", "...
# Copyright 2018 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 in writing, s...
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
############################################################################# # # Copyright (c) 2008 by Casey Duncan and contributors # All Rights Reserved. # # This software is subject to the provisions of the MIT License # A copy of the license should accompany this distribution. # THE SOFTWARE IS PROVIDED "AS IS", W...
#!/usr/bin/env python # Copyright 2013 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. """ Replaces gyp files in tree with files from here that make the build use system libraries. """ import optparse import os.path impo...
""" Author: Fabio Brandespim Email: [EMAIL] Location: Brazil - Goiania Date: 09-19-2016 """ #!C:/Python27_32/python.exe import pygame import math import particle import titulos import email_py #import time from threading import Thread from pygame.locals import * img = pygame.image.load("terra_plana.bmp") i...
# # 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...
from nose.tools import eq_, ok_ import mkt.site.tests from mkt.site.utils import app_factory from mkt.tags.models import attach_tags, Tag from mkt.websites.utils import website_factory class TestTagManager(mkt.site.tests.TestCase): def test_not_blocked(self): """Make sure Tag Manager filters right for n...
"""Support for KEBA charging stations.""" import asyncio import logging from keba_kecontact.connection import KebaKeContact import voluptuous as vol from homeassistant.const import CONF_HOST from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(_...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
# Author: Nyaran <[EMAIL]> # # This file is part of SickRage. # # SickRage 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. # # SickRage...
# Author: Steven J. Bethard <[EMAIL]>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The following is a s...
from queue import Queue from bears.haskell.HaskellLintBear import HaskellLintBear from coalib.testing.LocalBearTestHelper import LocalBearTestHelper from coalib.testing.BearTestHelper import generate_skip_decorator from coalib.settings.Section import Section good_single_line_file = """ myconcat = (++) """.splitlines...
# (c) 2014, Brian Coca, Josh Drake, et al # # 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. ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, Eike Frost <[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', ...