repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
py4a/peewee | refs/heads/master | setup.py | 3 | import os
from setuptools import find_packages
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
try:
from Cython.Build import cythonize
except ImportError:
ext_modules = None
else:
speedups = cythonize('playhouse/speedups.pyx')
ex... |
japeto/Vigtech-Services | refs/heads/master | env/lib/python2.7/site-packages/django/conf/app_template/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
geminy/aidear | refs/heads/master | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/build/android/adb_logcat_printer.py | 27 | #!/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.
"""Shutdown adb_logcat_monitor and print accumulated logs.
To test, call './adb_logcat_printer.py <base_dir>' where
<base_dir> c... |
muntasirsyed/intellij-community | refs/heads/master | python/lib/Lib/doctest.py | 81 | # Module doctest.
# Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
# Major enhancements and refactoring by:
# Jim Fulton
# Edward Loper
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
r"""Module doctest -- a framework for running examples in docstrings.
In... |
chenyujie/hybrid-murano | refs/heads/hybrid-master | murano/dsl/serializer.py | 2 | # Copyright (c) 2014 Mirantis, 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... |
aperigault/ansible | refs/heads/devel | lib/ansible/module_utils/f5_utils.py | 124 | #
# Copyright 2016 F5 Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# An... |
sbc100/native_client | refs/heads/master | src/trusted/validator_ragel/proof_tools_test.py | 8 | #!/usr/bin/python
# Copyright (c) 2014 The Native Client 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 re
import unittest
import proof_tools
import spec
class ProofToolsTest(unittest.TestCase):
def testOpsMerge(self):
... |
DirectXMan12/nova-hacking | refs/heads/feature_novnc_krb | nova/objectstore/__init__.py | 29 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... |
TheTimmy/spack | refs/heads/develop | var/spack/repos/builtin/packages/r-curl/package.py | 2 | ##############################################################################
# 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, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
jmatthed/clamav-devel | refs/heads/master | libclamav/c++/llvm/utils/DSAclean.py | 147 | #! /usr/bin/python
#changelog:
#10/13/2005b: replaced the # in tmp(.#*)* with alphanumeric and _, this will then remove
#nodes such as %tmp.1.i and %tmp._i.3
#10/13/2005: exntended to remove variables of the form %tmp(.#)* rather than just
#%tmp.#, i.e. it now will remove %tmp.12.3.15 etc, additionally fixed a spell... |
tuxfux-hlp-notes/python-batches | refs/heads/master | archieves/Batch-63/14-files/myenv/lib/python2.7/site-packages/wheel/pkginfo.py | 565 | """Tools for reading and writing PKG-INFO / METADATA without caring
about the encoding."""
from email.parser import Parser
try:
unicode
_PY3 = False
except NameError:
_PY3 = True
if not _PY3:
from email.generator import Generator
def read_pkg_info_bytes(bytestr):
return Parser().pars... |
stvstnfrd/edx-platform | refs/heads/master | import_shims/studio/third_party_auth/tests/specs/test_google.py | 4 | """Deprecated import support. Auto-generated by import_shims/generate_shims.sh."""
# pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long
from import_shims.warn import warn_deprecated_import
warn_deprecated_import('third_party_auth.tests.specs.test_google', 'common... |
adamjmcgrath/glancydesign | refs/heads/master | src/django-nonrel/django/db/backends/postgresql/client.py | 638 | import os
import sys
from django.db.backends import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'psql'
def runshell(self):
settings_dict = self.connection.settings_dict
args = [self.executable_name]
if settings_dict['USER']:
args += ["-U"... |
nuuuboo/odoo | refs/heads/8.0 | openerp/addons/test_access_rights/tests/__init__.py | 404 | import test_ir_rules
|
GuillaumeGomez/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/status.py | 405 | def main(request, response):
code = int(request.GET.first("code", 200))
text = request.GET.first("text", "OMG")
content = request.GET.first("content", "")
type = request.GET.first("type", "")
status = (code, text)
headers = [("Content-Type", type),
("X-Request-Method", request.met... |
wd5/jangr | refs/heads/master | django/db/backends/oracle/creation.py | 153 | import sys, time
from django.db.backends.creation import BaseDatabaseCreation
TEST_DATABASE_PREFIX = 'test_'
PASSWORD = 'Im_a_lumberjack'
class DatabaseCreation(BaseDatabaseCreation):
# This dictionary maps Field objects to their associated Oracle column
# types, as strings. Column-type strings can contain fo... |
gimoh/ansible-modules-core | refs/heads/devel | files/acl.py | 38 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
sadmansk/servo | refs/heads/master | tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/__init__.py | 12133432 | |
Shrhawk/edx-platform | refs/heads/master | lms/djangoapps/psychometrics/__init__.py | 12133432 | |
thomasgilgenast/spqr-nonrel | refs/heads/master | django/views/static.py | 151 | """
Views and functions for serving static files. These are only to be used
during development, and SHOULD NOT be used in a production setting.
"""
import mimetypes
import os
import posixpath
import re
import urllib
from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseNotModified
from djan... |
owais/django-setman | refs/heads/master | testproject/core/tests/test_forms.py | 1 | from django import forms
from django.test import TestCase
from setman.forms import SettingsForm
from setman.utils import AVAILABLE_SETTINGS
from testproject.core.choices import ROLE_CHOICES
from testproject.core.validators import abc_validator, xyz_validator
__all__ = ('TestForms', )
SETTINGS_FIELDS = {
'BOOL... |
TwinkleChawla/nova | refs/heads/master | nova/tests/unit/objects/test_instance_action.py | 52 | # Copyright 2013 IBM Corp.
#
# 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... |
antoinecarme/pyaf | refs/heads/master | tests/artificial/transf_Quantization/trend_LinearTrend/cycle_7/ar_12/test_artificial_128_Quantization_LinearTrend_7_12_100.py | 1 | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 7, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 12); |
sajeeshcs/nested_quota_final | refs/heads/master | nova/tests/unit/cells/test_cells_filters.py | 30 | # Copyright (c) 2012-2013 Rackspace Hosting
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... |
nickster5001/ctracker | refs/heads/master | flask/lib/python3.4/site-packages/sqlparse/functions.py | 127 | '''
Created on 17/05/2012
@author: piranna
Several utility functions to extract info from the SQL sentences
'''
from sqlparse.filters import ColumnsSelect, Limit
from sqlparse.pipeline import Pipeline
from sqlparse.tokens import Keyword, Whitespace
def getlimit(stream):
"""Function that return the LIMIT of a i... |
chbrown/pybtex | refs/heads/master | pybtex/textutils.py | 4 | # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Andrey Golovizin
#
# 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 ... |
leppa/home-assistant | refs/heads/dev | tests/components/demo/test_water_heater.py | 3 | """The tests for the demo water_heater component."""
import unittest
import pytest
import voluptuous as vol
from homeassistant.components import water_heater
from homeassistant.setup import setup_component
from homeassistant.util.unit_system import IMPERIAL_SYSTEM
from tests.common import get_test_home_assistant
fro... |
ajoaoff/django | refs/heads/master | tests/migrations2/test_migrations_2_first/__init__.py | 12133432 | |
leonardoo/django-pipeline | refs/heads/master | tests/models.py | 12133432 | |
SoundMoose/SoundMoose | refs/heads/master | server/project/__init__.py | 12133432 | |
ikaee/bfr-attendant | refs/heads/master | facerecognitionlibrary/jni-build/jni/include/tensorflow/tensorboard/backend/__init__.py | 12133432 | |
gennad/Django-nonrel-stub-for-Google-App-Engine | refs/heads/master | django/contrib/sessions/backends/cache.py | 268 | from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.core.cache import cache
class SessionStore(SessionBase):
"""
A cache-based session store.
"""
def __init__(self, session_key=None):
self._cache = cache
super(SessionStore, self).__init__(session_key)
... |
forrestv/myhdl | refs/heads/master | myhdl/test/core/test_Cosimulation.py | 2 | # This file is part of the myhdl library, a Python package for using
# Python as a Hardware Description Language.
#
# Copyright (C) 2003-2008 Jan Decaluwe
#
# The myhdl 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 t... |
fyfcauc/android_external_chromium-org | refs/heads/du44 | chrome/common/extensions/docs/server2/mock_file_system_test.py | 24 | #!/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.
from copy import deepcopy
from file_system import FileNotFoundError, StatInfo
from mock_file_system import MockFileSystem
from test_fil... |
nicobustillos/odoo | refs/heads/8.0 | addons/warning/warning.py | 73 | # -*- 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... |
deathglitch/metarigging | refs/heads/master | python/model/ui_tools/mirror_mesh_ui.py | 1 | import pymel.core as pm
import PySide2.QtCore as qtcore
import PySide2.QtGui as qtgui
from PySide2 import QtWidgets
import qtutils.qt_utils as MetaWindow
import model.mesh
class MirrorMeshToolUI(MetaWindow.MetaWindow):
VERSION = 1.0
def __init__(self):
MetaWindow.MetaWindow.__init__(self, MirrorMeshToolUI.__nam... |
HuaweiSwitch/ansible | refs/heads/devel | lib/ansible/cli/adhoc.py | 4 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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 lat... |
chouseknecht/ansible | refs/heads/devel | lib/ansible/plugins/lookup/aws_ssm.py | 18 | # (c) 2016, Bill Wang <ozbillwang(at)gmail.com>
# (c) 2017, Marat Bakeev <hawara(at)gmail.com>
# (c) 2018, Michael De La Rue <siblemitcom.mddlr(at)spamgourmet.com>
# (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_im... |
courtiol/choosiness | refs/heads/master | Visualization/VisualizationWithPygame/CVisualizationWithPygameBaseClass.py | 1 | __author__ = 'robert'
import pygame
import CIndividual
from Visualization.CVisualizationBaseClass import CVisualizationBaseClass
"""
In this module all visualization using pyGame are stored. You find here also the base class which deals with standard
user interactions and the initialization of pygame. Since in pyGame... |
danieljaouen/ansible | refs/heads/devel | lib/ansible/modules/cloud/profitbricks/profitbricks_nic.py | 36 | #!/usr/bin/python
# Copyright: 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',
'status': ['preview'],
... |
nkgilley/home-assistant | refs/heads/dev | tests/components/honeywell/test_climate.py | 18 | """The test the Honeywell thermostat module."""
import unittest
from unittest import mock
import pytest
import requests.exceptions
import somecomfort
import voluptuous as vol
from homeassistant.components.climate.const import (
ATTR_FAN_MODE,
ATTR_FAN_MODES,
ATTR_HVAC_MODES,
)
import homeassistant.compone... |
pwz3n0/buck | refs/heads/master | programs/buck_project.py | 9 | from __future__ import print_function
import os
import subprocess
import tempfile
import textwrap
import shutil
import sys
from tracing import Tracing
def get_file_contents_if_exists(path, default=None):
with Tracing('BuckProject.get_file_contents_if_it_exists', args={'path': path}):
if not os.path.exist... |
y12uc231/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/foldit_module.py | 56 | import logging
from lxml import etree
from pkg_resources import resource_string
from xmodule.editing_module import EditingDescriptor
from xmodule.x_module import XModule
from xmodule.xml_module import XmlDescriptor
from xblock.fields import Scope, Integer, String
from .fields import Date
from .util.duedate import get... |
rismalrv/edx-platform | refs/heads/master | cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py | 43 | """ Tests for library reindex command """
import ddt
from django.core.management import call_command, CommandError
import mock
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from common.test.utils... |
migueldvb/george | refs/heads/master | george/__init__.py | 3 | # -*- coding: utf-8 -*-
__version__ = "0.2.1"
try:
__GEORGE_SETUP__
except NameError:
__GEORGE_SETUP__ = False
if not __GEORGE_SETUP__:
__all__ = ["kernels", "GP", "BasicSolver", "HODLRSolver"]
from . import kernels
from .gp import GP
from .basic import BasicSolver
from .hodlr import HOD... |
rutsky/letsencrypt | refs/heads/master | letsencrypt/tests/renewer_test.py | 2 | """Tests for letsencrypt.renewer."""
import datetime
import os
import tempfile
import shutil
import unittest
import configobj
import mock
import pytz
from letsencrypt import configuration
from letsencrypt import errors
from letsencrypt.storage import ALL_FOUR
from letsencrypt.tests import test_util
CERT = test_uti... |
tmpgit/intellij-community | refs/heads/master | python/testData/inspections/PyAugmentAssignmentInspection/differentOperations.py | 74 | # PY-2488
<weak_warning descr="Assignment can be replaced with augmented assignment">a = a ** 1</weak_warning>
<weak_warning descr="Assignment can be replaced with augmented assignment">x = x % 3</weak_warning>
<weak_warning descr="Assignment can be replaced with augmented assignment">x = x | 3</weak_warning>
<weak_wa... |
sYnfo/samba-1 | refs/heads/master | third_party/waf/wafadmin/Utils.py | 12 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005 (ita)
"""
Utilities, the stable ones are the following:
* h_file: compute a unique value for a file (hash), it uses
the module fnv if it is installed (see waf/utils/fnv & http://code.google.com/p/waf/wiki/FAQ)
else, md5 (see the python docs)
For large... |
chromium/chromium | refs/heads/master | build/android/stacktrace/java_deobfuscate_test.py | 7 | #!/usr/bin/env vpython
#
# Copyright 2017 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.
"""Tests for java_deobfuscate."""
import argparse
import os
import subprocess
import sys
import tempfile
import unittest
# Set by c... |
albertrdixon/CouchPotatoServer | refs/heads/master | libs/rsa/pem.py | 216 | # -*- coding: utf-8 -*-
#
# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
#
# 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
#
# Unl... |
alphagov/notifications-delivery | refs/heads/master | notifications_delivery/job/job_scheduler.py | 1 | from apscheduler.schedulers.background import BackgroundScheduler
from notifications_delivery.job.jobs import process_jobs
from notifications_delivery.processor.sqs_processor import process_notification_job
class JobScheduler(object):
def __init__(self, config):
self.scheduler = BackgroundScheduler()
... |
NL66278/OCB | refs/heads/8.0 | openerp/addons/test_limits/__openerp__.py | 435 | # -*- coding: utf-8 -*-
{
'name': 'test-limits',
'version': '0.1',
'category': 'Tests',
'description': """A module with dummy methods.""",
'author': 'OpenERP SA',
'maintainer': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'data': ['ir.model.access.csv'],
... |
andrejtokarcik/python-czechtile | refs/heads/master | czechtile/macros.py | 1 | # -*- coding: utf-8 -*-
import re
from sneakylang import parse, Macro, Document
from sneakylang.parser import ParserRollback
from . import nodes
class CzechtileMacro(Macro):
def _macroCallWithoutRequiredQuotes(self, *args):
content = ''.join([''.join([arg, ' ']) for arg in args])[:-1]
... |
markfinger/recipe-crawler-for-beaney | refs/heads/master | requests/packages/urllib3/util/request.py | 780 | from __future__ import absolute_import
from base64 import b64encode
from ..packages.six import b
ACCEPT_ENCODING = 'gzip,deflate'
def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
basic_auth=None, proxy_basic_auth=None, disable_cache=None):
"""
Shortcuts for generatin... |
asedunov/intellij-community | refs/heads/master | python/testData/inspections/PyStringFormatInspection/PercentStringKeywordListArgument.py | 29 | "%(foo)s" % <warning descr="Format requires a mapping">[1, 2, 3]</warning> |
Acehaidrey/incubator-airflow | refs/heads/master | airflow/kubernetes/kubernetes_helper_functions.py | 7 | # 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... |
louietsai/python-for-android | refs/heads/master | python-modules/twisted/twisted/internet/test/test_udp.py | 49 | # Copyright (c) 2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for implementations of L{IReactorUDP}.
"""
__metaclass__ = type
from zope.interface.verify import verifyObject
from twisted.internet.test.reactormixins import ReactorBuilder
from twisted.internet.interfaces import IListeningPort
... |
sunlianqiang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_pathlib.py | 60 | import collections
import io
import os
import errno
import pathlib
import pickle
import shutil
import socket
import stat
import sys
import tempfile
import unittest
from contextlib import contextmanager
from test import support
TESTFN = support.TESTFN
try:
import grp, pwd
except ImportError:
grp = pwd = None
... |
trib3/xhtml2pdf | refs/heads/master | demo/djangoproject/ezpdf.py | 166 | #! /usr/bin/python
# -*- encoding: utf-8 -*-
from django.template.loader import get_template
from django.template import Context
from django.http import HttpResponse
import cStringIO as StringIO
from sx.pisa3 import pisaDocument
import cgi
def render_to_pdf(template_src, context_dict):
'''
Renderiza el templa... |
gazpachoking/Flexget | refs/heads/develop | flexget/components/imdb/api.py | 4 | from __future__ import unicode_literals, division, absolute_import
from flask import jsonify
from flexget.api import api, APIResource
from flexget.api.app import etag
from flexget.components.imdb.utils import ImdbSearch
imdb_api = api.namespace('imdb', description='IMDB lookup endpoint')
class ObjectsContainer(obj... |
ar7z1/ansible | refs/heads/devel | lib/ansible/modules/cloud/azure/azure_rm_mysqlfirewallrule.py | 25 | #!/usr/bin/python
#
# Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com>
#
# 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',
... |
jsheedy/worldmap-dynamic-zoom | refs/heads/master | server/queries.py | 1 | import config
class Query():
def country_list(self, bbox): pass
def country(self, id): pass
class World(Query):
def country_list(self, bbox=None):
query = """SELECT MAX(fips) from world_borders """
if bbox:
envelope = ','.join(map(str, bbox))
query += """ WHERE... |
thesquelched/libcloud | refs/heads/trunk | libcloud/compute/drivers/elastichosts.py | 58 | # 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 use ... |
x303597316/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/db_typecasts/__init__.py | 12133432 | |
OpringaoDoTurno/airflow | refs/heads/master | airflow/api/auth/backend/__init__.py | 1049 | # -*- 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
... |
tedor/yandex-dns-manager | refs/heads/master | vendors/__init__.py | 2 | __author__ = 'Vitalyi'
|
django-nonrel/django | refs/heads/nonrel-1.6 | tests/admin_scripts/complex_app/models/__init__.py | 739 | from .bar import Bar
from .foo import Foo
__all__ = ['Foo', 'Bar']
|
lamby/django-cache-toolbox | refs/heads/master | tests/__init__.py | 12133432 | |
gabrielfalcao/lettuce | refs/heads/master | tests/integration/lib/Django-1.3/django/contrib/localflavor/ca/__init__.py | 12133432 | |
qgis/QGIS-Django | refs/heads/master | qgis-app/lib/templatetags/__init__.py | 12133432 | |
lautriv/Just-Metadata | refs/heads/master | modules/intelgathering/__init__.py | 12133432 | |
openstack/senlin | refs/heads/master | contrib/vdu/vdu/__init__.py | 12133432 | |
sam-tsai/django | refs/heads/master | django/conf/locale/nl/__init__.py | 12133432 | |
jdiez17/pagmo | refs/heads/master | PyGMO/problem/_tsp.py | 1 | from PyGMO.problem._problem import tsp, tsp_cs, tsp_vrplc, _tsp_encoding
from PyGMO import __extensions__
if __extensions__["gtop"] is True:
from PyGMO.problem._problem import tsp_ds
tsp_ds.encoding_type = _tsp_encoding
# Renaming and placing the enums
tsp.encoding_type = _tsp_encoding
tsp_vrplc.encoding_type ... |
nickdirienzo/flask-dance | refs/heads/master | flask_dance/contrib/meetup.py | 3 | from __future__ import unicode_literals
from flask_dance.consumer import OAuth2ConsumerBlueprint
from functools import partial
from flask.globals import LocalProxy, _lookup_app_object
try:
from flask import _app_ctx_stack as stack
except ImportError:
from flask import _request_ctx_stack as stack
__maintainer... |
nesdis/djongo | refs/heads/master | tests/django_tests/tests/v21/tests/schema/fields.py | 68 | from functools import partial
from django.db import models
from django.db.models.fields.related import (
RECURSIVE_RELATIONSHIP_CONSTANT, ManyToManyDescriptor, ManyToManyField,
ManyToManyRel, RelatedField, create_many_to_many_intermediary_model,
)
class CustomManyToManyField(RelatedField):
"""
Ticket... |
SteveHNH/ansible | refs/heads/devel | lib/ansible/modules/network/ovs/openvswitch_port.py | 29 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, David Stygstra <david.stygstra@gmail.com>
# Portions copyright @ 2015 VMware, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIB... |
vganapath/rally | refs/heads/master | rally/plugins/openstack/context/nova/flavors.py | 6 | # Copyright 2014: Mirantis 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 b... |
cretin45/htc-kernel-ruby | refs/heads/ics | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
chromium/chromium | refs/heads/master | third_party/tensorflow-text/src/tensorflow_text/python/ops/wordshape_ops_test.py | 7 | # coding=utf-8
# Copyright 2021 TF.Text Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
deepakselvaraj/federated-horizon | refs/heads/master | openstack_dashboard/dashboards/project/routers/tables.py | 12 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, 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... |
Nick-OpusVL/odoo | refs/heads/8.0 | openerp/addons/base/ir/ir_actions.py | 174 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2014 OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... |
abcsds/tw | refs/heads/master | dashboard/views.py | 1 | from django.shortcuts import render, redirect
from .models import *
from twitter_stream.models import FilterTerm
def dashboard(request):
tweets = []
overall = 0
try:
for tweet in SenTweet.objects.all():
if tweet.lang == 'en':
tweets.append(tweet)
text = ... |
vim-IDE/python-mode | refs/heads/develop | pymode/libs/pep8.py | 7 | #!/usr/bin/env python
# pep8.py - Check Python source code formatting, according to PEP 8
# Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net>
# Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com>
# Copyright (C) 2014-2015 Ian Lee <ianlee1521@gmail.com>
#
# Permission is hereby granted, free... |
addon-onlinetv/plugin.video.onlinetv | refs/heads/master | resources/lib/__init__.py | 12133432 | |
GiladE/birde | refs/heads/master | venv/lib/python2.7/site-packages/django/conf/locale/te/__init__.py | 12133432 | |
FHannes/intellij-community | refs/heads/master | python/testData/refactoring/move/module/before/src/p1/__init__.py | 12133432 | |
dronefly/dronefly.github.io | refs/heads/master | flask/lib/python2.7/site-packages/wtforms/ext/appengine/__init__.py | 177 | import warnings
warnings.warn(
'wtforms.ext.appengine is deprecated, and will be removed in WTForms 3.0. '
'The package has been split out into its own package, wtforms-appengine: '
'https://github.com/wtforms/wtforms-appengine ',
DeprecationWarning
)
|
Fokusnica/codecombat | refs/heads/master | scripts/analytics/mixpanelGetEvent.py | 97 | # Get mixpanel event data via export API
# Useful for debugging Mixpanel data weirdness
targetLevels = ['dungeons-of-kithgard', 'the-raised-sword', 'endangered-burl']
targetLevels = ['dungeons-of-kithgard']
eventFunnel = ['Started Level', 'Saw Victory']
# eventFunnel = ['Saw Victory']
# eventFunnel = ['Started Level']... |
dsavransky/EXOSIMS | refs/heads/master | EXOSIMS/SimulatedUniverse/KnownRVPlanetsUniverse.py | 1 | from EXOSIMS.Prototypes.SimulatedUniverse import SimulatedUniverse
import numpy as np
import astropy.units as u
from astropy.time import Time
class KnownRVPlanetsUniverse(SimulatedUniverse):
"""
Simulated universe implementation inteded to work with the Known RV planet
planetary population and target list ... |
XeCycle/indico | refs/heads/master | indico/MaKaC/webinterface/pages/conferences.py | 2 | # This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... |
iemejia/coursera-dl | refs/heads/master | coursera/test/test_utils.py | 2 | # -*- coding: utf-8 -*-
"""
Test the utility functions.
"""
import datetime
import os
import pytest
import random
import json
from time import time
import requests
import six
from mock import Mock
from coursera import utils
from coursera import coursera_dl
from coursera import api
from coursera.test.utils import sl... |
levkar/odoo | refs/heads/10.0 | addons/delivery/models/delivery_price_rule.py | 24 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api
import odoo.addons.decimal_precision as dp
class PriceRule(models.Model):
_name = "delivery.price.rule"
_description = "Delivery Price Rules"
_order = 'sequence, list_pr... |
bartosh/zipline | refs/heads/master | zipline/finance/performance/period.py | 5 | #
# Copyright 2014 Quantopian, 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 wr... |
aptivate/django-filer | refs/heads/develop | filer/fields/__init__.py | 12133432 | |
xuxiao19910803/edx-platform | refs/heads/master | lms/djangoapps/django_comment_client/tests/mock_cs_server/mock_cs_server.py | 47 | from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import json
from logging import getLogger
logger = getLogger(__name__)
class MockCommentServiceRequestHandler(BaseHTTPRequestHandler):
'''
A handler for Comment Service POST requests.
'''
protocol = "HTTP/1.0"
def do_POST(self):
... |
paolodedios/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/identity_op_py_test.py | 13 | # 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... |
hackaugusto/contracts.py | refs/heads/master | contracts.py | 1 | '''
'''
import codecs
import encodings
import re
import sys
import tokenize
import unittest
from collections import namedtuple
try:
from cStringIO import StringIO
except:
# py3
from io import StringIO
__all__ = ('contract', )
KEYWORDS = ('require', 'ensure', 'body')
ENDMARKER = (tokenize.ENDMARKER, '')
... |
BRupholdt/KissTodo | refs/heads/master | todo/views.py | 1 | # KissTodo - a simple, Django based todo management tool.
# Copyright (C) 2011 Massimo Barbieri - http://www.massimobarbieri.it
#
# 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 ... |
uni-peter-zheng/autotest | refs/heads/master | frontend/tko/csv_encoder.py | 4 | import csv
import django.http
try:
import autotest.common as common
except ImportError:
import common
from autotest.frontend.afe import rpc_utils
class CsvEncoder(object):
def __init__(self, request, response):
self._request = request
self._response = response
self._output_rows = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.