repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
Chiel92/evolutionary-computing | refs/heads/master | final1/source/setup.py | 1 | from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
setup(
ext_modules=cythonize("*.pyx",
compiler_directives={'profile': True})
)
|
doismellburning/django | refs/heads/master | django/contrib/gis/tests/geoapp/feeds.py | 367 | from __future__ import unicode_literals
from django.contrib.gis import feeds
from .models import City
class TestGeoRSS1(feeds.Feed):
link = '/city/'
title = 'Test GeoDjango Cities'
def items(self):
return City.objects.all()
def item_link(self, item):
return '/city/%s/' % item.pk
... |
Tesora/tesora-tempest | refs/heads/master | tempest/common/custom_matchers.py | 2 | # Copyright 2013 NTT 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 required by applicable law or ag... |
akintolga/superdesk-aap | refs/heads/master | server/aap_mm/aap_mm_datalayer.py | 1 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import datet... |
Zhongqilong/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py | 2754 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
adrianholovaty/django | refs/heads/master | django/template/loaders/app_directories.py | 5 | """
Wrapper for loading templates from "templates" directories in INSTALLED_APPS
packages.
"""
import os
import sys
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.template.base import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.u... |
Mohamed711/Quiz-Program | refs/heads/master | vendor/bundle/ruby/2.2.0/gems/libv8-3.16.14.7/vendor/v8/tools/testrunner/network/perfdata.py | 100 | # Copyright 2012 the V8 project authors. 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 conditi... |
ssaeger/scikit-learn | refs/heads/master | examples/feature_selection/plot_permutation_test_for_classification.py | 94 | """
=================================================================
Test with permutations the significance of a classification score
=================================================================
In order to test if a classification score is significative a technique
in repeating the classification procedure aft... |
DXCanas/kolibri | refs/heads/develop | kolibri/core/device/models.py | 1 | import time
from django.conf import settings
from django.core.cache import cache
from django.db import models
from .permissions import UserCanManageDevicePermissions
from kolibri.core.auth.models import Facility
from kolibri.core.auth.models import FacilityUser
device_permissions_fields = [
'is_superuser',
'... |
nlandais/ansible-modules-core | refs/heads/devel | packaging/__init__.py | 12133432 | |
rudaoshi/neuralmachines | refs/heads/master | neural_machine/tasks/language/common/corpus/__init__.py | 12133432 | |
TechBK/horizon-dev | refs/heads/master | openstack_dashboard/dashboards/logdashboard/detail/__init__.py | 12133432 | |
talk-to/PjSip-Repo | refs/heads/master | tests/pjsua/scripts-pesq/201_codec_speex_16000.py | 42 | # $Id$
#
from inc_cfg import *
# Call with Speex/16000 codec
test_param = TestParam(
"PESQ codec Speex WB (RX side uses snd dev)",
[
InstanceParam("UA1", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --null-audio"),
InstanceParam("UA2", "--max-calls=1 --clock-rate 16... |
jk1/intellij-community | refs/heads/master | python/helpers/pydev/_pydev_bundle/pydev_localhost.py | 10 | from _pydevd_bundle import pydevd_constants
from _pydev_imps._pydev_saved_modules import socket
import sys
IS_JYTHON = sys.platform.find('java') != -1
_cache = None
def get_localhost():
'''
Should return 127.0.0.1 in ipv4 and ::1 in ipv6
localhost is not used because on windows vista/windows 7, there c... |
Lightmatter/django-inlineformfield | refs/heads/master | .tox/py27/lib/python2.7/site-packages/django/template/defaultfilters.py | 18 | """Default variable filters."""
from __future__ import unicode_literals
import re
import random as random_module
from decimal import Decimal, InvalidOperation, Context, ROUND_HALF_UP
from functools import wraps
from pprint import pformat
from django.template.base import Variable, Library, VariableDoesNotExist
from dj... |
mdaniel/intellij-community | refs/heads/master | python/helpers/tests/generator3_tests/data/FileSystemUtil/copy_skeleton_package_replaced/dst/before/foo/bar/baz/__init__.py | 50 | version = 1 |
oinopion/django | refs/heads/master | django/conf/locale/mn/formats.py | 619 | # -*- 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 = 'd F Y'
TIME_FORMAT = 'g:i A'
# DA... |
adrianlee/rcon-cs | refs/heads/master | rconsoft/rcon/__init__.py | 6 | # Read LICENSE for licensing details. |
allenlavoie/tensorflow | refs/heads/master | tensorflow/contrib/autograph/utils/testing.py | 22 | # 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... |
8u1a/plaso | refs/heads/master | tools/psort_test.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the psort CLI tool."""
import os
import unittest
from plaso.cli.helpers import interface as helpers_interface
from plaso.cli.helpers import manager as helpers_manager
from plaso.lib import errors
from plaso.output import manager as output_manager
from tests impor... |
frubar/rpi-wheatley | refs/heads/master | wheatley/admin.py | 1 | # -*- coding: UTF-8 -*-
from django.contrib import admin
from wheatley.models import Photo, Location, Tweet, Settings
class SettingsAdmin(admin.ModelAdmin):
list_display = ('id', 'created_at',)
list_display_links = ('id', 'created_at',)
date_hierachy = ('created_at',)
list_filter = ('created_at',)
class PhotoA... |
kangkot/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/objgraph.py | 96 | #! /usr/bin/env python
# objgraph
#
# Read "nm -o" input (on IRIX: "nm -Bo") of a set of libraries or modules
# and print various interesting listings, such as:
#
# - which names are used but not defined in the set (and used where),
# - which names are defined in the set (and where),
# - which modules use which other ... |
vikas1885/test1 | refs/heads/master | lms/djangoapps/instructor/features/common.py | 63 | """
Define common steps for instructor dashboard acceptance tests.
"""
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from __future__ import absolute_import
from lettuce import world, step
from mock import patch
from nose.tools import assert_in # pylint: disable=no-name-in-module
from c... |
lidiamcfreitas/FenixScheduleMaker | refs/heads/master | oldFiles/project-env/lib/python2.7/site-packages/wheel/test/simple.dist/simpledist/__init__.py | 12133432 | |
patrickm/chromium.src | refs/heads/nw | tools/memory_inspector/memory_inspector/backends/__init__.py | 12133432 | |
Zahajamaan/Fudulbank | refs/heads/master | mailer/migrations/__init__.py | 12133432 | |
open-switch/ops-cli | refs/heads/master | ops-tests/component/test_vtysh_ct_bgp_router_cli.py | 1 | # -*- coding: utf-8 -*-
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP
# 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.a... |
kanagasabapathi/python-for-android | refs/heads/master | python-build/python-libs/python-twitter/setup.py | 90 | #!/usr/bin/python2.4
#
# Copyright 2007 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... |
shyamalschandra/scikit-learn | refs/heads/master | examples/covariance/plot_robust_vs_empirical_covariance.py | 73 | r"""
=======================================
Robust vs Empirical covariance estimate
=======================================
The usual covariance maximum likelihood estimate is very sensitive to the
presence of outliers in the data set. In such a case, it would be better to
use a robust estimator of covariance to guar... |
mgorny/PyGithub | refs/heads/master | tests/IssueEvent.py | 2 | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <[email protected]> #
# Copyright 2012 Zearin <[email protected]> ... |
meteorcloudy/tensorflow | refs/heads/master | tensorflow/contrib/autograph/utils/py_func.py | 27 | # 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... |
blooparksystems/odoo | refs/heads/9.0 | addons/payment_paypal/tests/test_paypal.py | 25 | # -*- coding: utf-8 -*-
from openerp.addons.payment.models.payment_acquirer import ValidationError
from openerp.addons.payment.tests.common import PaymentAcquirerCommon
from openerp.addons.payment_paypal.controllers.main import PaypalController
from openerp.tools import mute_logger
from lxml import objectify
import u... |
phammin1/QaManagement | refs/heads/master | QaManagement/env/Lib/site-packages/setuptools/tests/test_upload_docs.py | 151 | import os
import zipfile
import contextlib
import pytest
from setuptools.command.upload_docs import upload_docs
from setuptools.dist import Distribution
from .textwrap import DALS
from . import contexts
SETUP_PY = DALS(
"""
from setuptools import setup
setup(name='foo')
""")
@pytest.fixture
def ... |
mmoya/ansible | refs/heads/devel | plugins/inventory/gce.py | 18 | #!/usr/bin/env python
# Copyright 2013 Google 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 ... |
ddico/odoo | refs/heads/master | addons/website_crm_partner_assign/tests/__init__.py | 87 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import test_partner_assign
|
bretlowery/snakr | refs/heads/master | lib/django/utils/deconstruct.py | 502 | from importlib import import_module
from django.utils.version import get_docs_version
def deconstructible(*args, **kwargs):
"""
Class decorator that allow the decorated class to be serialized
by the migrations subsystem.
Accepts an optional kwarg `path` to specify the import path.
"""
path =... |
aroche/django | refs/heads/master | tests/m2m_through_regress/tests.py | 182 | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.core import management
from django.test import TestCase
from django.utils.six import StringIO
from .models import (
Car, CarDriver, Driver, Group, Membership, Person, UserMembership,
)
class M2MThroughTestCase(TestCa... |
buguelos/odoo | refs/heads/master | yowsup/ConnectionIO/bintreenode.py | 4 | '''
Copyright (c) <2012> Tarek Galal <[email protected]>
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,
m... |
40223211/2015cd_midterm2 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/xml/dom/minicompat.py | 781 | """Python version compatibility support for minidom."""
# This module should only be imported using "import *".
#
# The following names are defined:
#
# NodeList -- lightest possible NodeList implementation
#
# EmptyNodeList -- lightest possible NodeList that is guaranteed to
# remain empty... |
heitorlessa/serverless-encryption-workshop | refs/heads/master | lab4/compiled_lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py | 103 | # -*- coding: utf-8 -*-
# Self-tests for the user-friendly Crypto.Random interface
#
# Written in 2013 by Dwayne C. Litzenberger <[email protected]>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to t... |
saumishr/django | refs/heads/master | tests/modeltests/proxy_model_inheritance/app1/__init__.py | 12133432 | |
michal-ruzicka/archivematica | refs/heads/cesnet-ltp-pilot/1.4.x | src/dashboard/src/components/ingest/__init__.py | 12133432 | |
adamjmcgrath/glancydesign | refs/heads/master | src/django-nonrel/tests/regressiontests/db_typecasts/models.py | 12133432 | |
emakis/erpnext | refs/heads/develop | erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/__init__.py | 12133432 | |
vizual54/MissionPlanner | refs/heads/master | Lib/unittest/main.py | 53 | """Unittest main program"""
import sys
import os
import types
from . import loader, runner
from .signals import installHandler
__unittest = True
FAILFAST = " -f, --failfast Stop on first failure\n"
CATCHBREAK = " -c, --catch Catch control-C and display results\n"
BUFFEROUTPUT = " -b, --... |
BT-ojossen/bank-statement-reconcile | refs/heads/8.0 | __unported__/account_statement_ofx_import/statement.py | 15 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Pedro Manuel Baeza Romero
# Copyright 2013 Servicios Tecnológicos Avanzados
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... |
foobarbazblarg/stayclean | refs/heads/master | stayclean-2015-september/relapse.py | 13 | #!/usr/bin/python
import sys
import participantCollection
names = sys.argv[1::]
participantCollection = participantCollection.ParticipantCollection()
for name in names:
if participantCollection.hasParticipantNamed(name):
participant = participantCollection.participantNamed(name)
if participant.is... |
gtko/CouchPotatoServer | refs/heads/develop | couchpotato/core/media/_base/providers/nzb/binnewz/nzbindex.py | 23 | from bs4 import BeautifulSoup
from nzbdownloader import NZBDownloader, NZBGetURLSearchResult
from couchpotato.core.helpers.rss import RSS
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode
from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog
from couchpotato.... |
jiajiax/crosswalk-test-suite | refs/heads/master | webapi/tct-xmlhttprequest-w3c-tests/inst.xpk.py | 456 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... |
weolar/miniblink49 | refs/heads/master | third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/logger.py | 489 | class NoOpLogger(object):
def critical(self, msg):
pass
def error(self, msg):
pass
def info(self, msg):
pass
def warning(self, msg):
pass
def debug(self, msg):
pass
logger = NoOpLogger()
_set_logger = False
def set_logger(new_logger):
global _set_log... |
kutenai/django | refs/heads/master | django/conf/locale/bn/formats.py | 575 | # -*- 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 = 'j F, Y'
TIME_FORMAT = 'g:i A'
# D... |
feroda/odoo | refs/heads/pos-multicurrency | addons/project_timesheet/project_timesheet.py | 237 | # -*- 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... |
lantz/nox-tutorial | refs/heads/tutorial-destiny | src/nox/netapps/spanning_tree/spanning_tree.py | 5 | # ----------------------------------------------------------------------
# Spanning tree -- software based
# Authors: Glen Gibb <[email protected]>
# Date: 08/08/08
#
# Changes:
#
# Notes: This won't work correctly if there are more than 2 switches on
# any one "link". ie. if we were on a broadcast network or the... |
LiangfengD/code-for-blog | refs/heads/master | 2012/plugins_python/htmlize/__init__.py | 12133432 | |
farhaadila/django-cms | refs/heads/develop | cms/management/commands/subcommands/__init__.py | 12133432 | |
brian-l/django-1.4.10 | refs/heads/master | tests/modeltests/get_latest/__init__.py | 12133432 | |
akosel/servo | refs/heads/master | tests/wpt/css-tests/css21_dev/html4/support/fonts/makegsubfonts.py | 820 |
import os
import textwrap
from xml.etree import ElementTree
from fontTools.ttLib import TTFont, newTable
from fontTools.misc.psCharStrings import T2CharString
from fontTools.ttLib.tables.otTables import GSUB,\
ScriptList, ScriptRecord, Script, DefaultLangSys,\
FeatureList, FeatureRecord, Feature,\
LookupLi... |
nakato/AuthKit | refs/heads/master | authkit/authorize/__init__.py | 3 | """\
Please update your code to use authkit.authorize.wsgi_adaptors instead of this
module.
"""
from authkit.authorize.wsgi_adaptors import *
|
caterinaurban/Lyra | refs/heads/master | src/lyra/unittests/numerical/interval/forward/indexing3/filterX.py | 1 |
X: List[int] = [0, 5, 10]
y: int = int(input())
z: int = int(input())
if y < 2 or y > 10 or z < 3 or z > 5:
raise ValueError
print("")
# STATE: X -> 0@[0, 0], 1@[5, 5], 2@[10, 10], _@⊥; len(X) -> [3, 3]; y -> [2, 10]; z -> [3, 5]
if X[1] - y - z >= 0:
# STATE: X -> 0@[0, 0], 1@[5, 5], 2@[10, 10], _@⊥; len(X) -... |
fisele/slimta-abusix | refs/heads/develop | slimta/relay/http.py | 1 | # Copyright (c) 2013 Ian C. Good
#
# 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, distrib... |
lokirius/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/unittest/result.py | 50 | """Test result object"""
import os
import io
import sys
import traceback
from . import util
from functools import wraps
__unittest = True
def failfast(method):
@wraps(method)
def inner(self, *args, **kw):
if getattr(self, 'failfast', False):
self.stop()
return method(self, *args,... |
quattor/aquilon | refs/heads/upstream | lib/aquilon/worker/commands/show_city_all.py | 2 | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2013,2014 Contributor
#
# 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... |
houzhenggang/hiwifi-openwrt-HC5661-HC5761 | refs/heads/master | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/encodings/charmap.py | 860 | """ Generic Python Character Mapping Codec.
Use this codec directly rather than through the automatic
conversion mechanisms supplied by unicode() and .encode().
Written by Marc-Andre Lemburg ([email protected]).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import codecs
### Codec APIs
class... |
Ms2ger/servo | refs/heads/master | tests/wpt/css-tests/tools/py/testing/io_/__init__.py | 9480 | #
|
eseidel/native_client_patches | refs/heads/master | tools/modular-build/treemappers.py | 1 |
# Copyright 2010 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 os
import hashlib
import sys
import types
# Do not add any more imports here! This could lead to undeclared
# dependencies, changes to which ... |
mzdaniel/oh-mainline | refs/heads/master | vendor/packages/celery/funtests/suite/test_basic.py | 18 | import operator
import os
import sys
import time
# funtest config
sys.path.insert(0, os.getcwd())
sys.path.insert(0, os.path.join(os.getcwd(), os.pardir))
import suite
from celery.tests.utils import unittest
from celery.tests.functional import tasks
from celery.tests.functional.case import WorkerCase
from celery.ta... |
knuu/competitive-programming | refs/heads/master | atcoder/corp/mujin2018_a.py | 1 | S = input()
print("Yes" if S.startswith("MUJIN") else "No")
|
Samweli/inasafe | refs/heads/develop | safe/messaging/item/line_break.py | 14 | """
InaSAFE Disaster risk assessment tool developed by AusAid - **Paragraph.**
Contact : [email protected]
.. note:: 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... |
nabilt/Like-List | refs/heads/master | embedly/client.py | 1 | """
Client
======
The embedly object that interacts with the service
"""
import re
import urllib
import httplib2
try:
import json
except ImportError:
import simplejson as json
from models import Url
USER_AGENT = 'Mozilla/5.0 (compatible; embedly-python/0.3;)'
class Embedly(object):
"""
Client
... |
jiangwei1221/django-virtualenv-demo | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/de_CH/__init__.py | 12133432 | |
gablg1/PerfKitBenchmarker | refs/heads/master | perfkitbenchmarker/packages/openblas.py | 4 | # 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 agr... |
2ndy/RaspIM | refs/heads/master | usr/lib/python2.7/encodings/zlib_codec.py | 533 | """ Python 'zlib_codec' Codec - zlib compression encoding
Unlike most of the other codecs which target Unicode, this codec
will return Python string objects for both encode and decode.
Written by Marc-Andre Lemburg ([email protected]).
"""
import codecs
import zlib # this codec needs the optional zlib modu... |
varunkamra/kuma | refs/heads/master | vendor/packages/translate/storage/placeables/test_lisa.py | 26 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2006-2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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... |
MaheshIBM/keystone | refs/heads/master | keystone/common/cache/backends/mongo.py | 2 | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... |
shirou/ansible | refs/heads/devel | lib/ansible/errors.py | 46 | # (c) 2012-2014, Michael DeHaan <[email protected]>
#
# 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) an... |
pk-sam/crosswalk-test-suite | refs/heads/master | webapi/tct-fonts-css3-tests/css3-fonts-app/testscripts/steps/steps.py | 226 | from atip.common.steps import *
from atip.web.steps import *
|
woylaski/notebook | refs/heads/master | graphic/kivy-master/kivy/tests/test_uix_boxlayout.py | 78 | '''
Box layout unit test
====================
Order matter.
On the screen, most of example must have the red->blue->green order.
'''
from kivy.tests.common import GraphicUnitTest
class UIXBoxLayoutTestcase(GraphicUnitTest):
def box(self, r, g, b):
from kivy.uix.widget import Widget
from kivy.gr... |
j-marjanovic/myhdl | refs/heads/master | myhdl/_misc.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... |
tastynoodle/django | refs/heads/master | django/contrib/gis/management/__init__.py | 12133432 | |
campbe13/openhatch | refs/heads/master | vendor/packages/Django/django/contrib/gis/db/backends/spatialite/__init__.py | 12133432 | |
korealerts1/sentry | refs/heads/master | src/sentry/plugins/base/__init__.py | 32 | """
sentry.plugins.base
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
from sentry.plugins.base.manager import PluginManager
from sentry.plugins.base.notifier import... |
rhuss/bazel | refs/heads/master | third_party/py/gflags/tests/gflags_helpxml_test.py | 139 | #!/usr/bin/env python
# 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 l... |
philippe89/compassion-modules | refs/heads/master | logging_compassion/wizards/__init__.py | 2 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Maxime Beck <[email protected]>
#
# The licence is in the file __openerp__.py
... |
oe-alliance/oe-alliance-enigma2 | refs/heads/master | lib/python/Components/Sources/OnlineUpdate.py | 66 | from Source import Source
from Components.Element import cached
from Components.OnlineUpdateCheck import versioncheck
from enigma import eTimer
class OnlineUpdateStableCheck(Source):
def __init__(self):
Source.__init__(self)
self.check_timer = eTimer()
self.check_timer.callback.append(self.poll)
self.check_ti... |
theflofly/tensorflow | refs/heads/master | tensorflow/python/keras/layers/convolutional_recurrent_test.py | 13 | # 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... |
DANCEcollaborative/forum-xblock | refs/heads/master | XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/django/conf/locale/fy_NL/formats.py | 1293 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
# DATE_FORMAT =
# TIME_FORMAT =
# DATETIME_FORMAT =
# YEAR_MONTH_FORMAT =
# MONTH_DA... |
Gabotero/GNURadioNext | refs/heads/master | gr-utils/python/modtool/gr-newmod/python/__init__.py | 29 | #
# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This application is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This application is di... |
hgl888/web-testing-service | refs/heads/master | wts/tests/csp/csp_media-src_asterisk_audio_allowed_int.py | 25 | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0])
response.headers.set(
... |
abhiatgithub/shogun-toolbox | refs/heads/master | examples/undocumented/python_modular/modelselection_grid_search_libsvr_modular.py | 17 | #!/usr/bin/env python
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Written (W) 2012 Heiko Strathmann
# Copyrigh... |
zbqf109/goodo | refs/heads/master | openerp/addons/payment_ogone/models/ogone.py | 2 | # -*- coding: utf-'8' "-*-"
import datetime
from hashlib import sha1
import logging
from lxml import etree, objectify
from openerp.tools.translate import _
from pprint import pformat
import time
from urllib import urlencode
import urllib2
import urlparse
from openerp import SUPERUSER_ID
from openerp.addons.payment.mo... |
scorphus/django | refs/heads/master | tests/timezones/tests.py | 165 | from __future__ import unicode_literals
import datetime
import re
import sys
import warnings
from unittest import SkipTest, skipIf
from xml.dom.minidom import parseString
from django.contrib.auth.models import User
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django... |
CingHu/neutron-ustack | refs/heads/master | neutron/services/loadbalancer/drivers/haproxy/templates/__init__.py | 12133432 | |
bb111189/Arky2 | refs/heads/master | boilerplate/external/PIL/ImageTk.py | 39 | #
# The Python Imaging Library.
# $Id$
#
# a Tk display interface
#
# History:
# 96-04-08 fl Created
# 96-09-06 fl Added getimage method
# 96-11-01 fl Rewritten, removed image attribute and crop method
# 97-05-09 fl Use PyImagingPaste method instead of image type
# 97-05-12 fl Minor tweaks to match the IFUNC9... |
nuncjo/odoo | refs/heads/8.0 | openerp/addons/base/tests/test_view_validation.py | 396 | # This test can be run stand-alone with something like:
# > PYTHONPATH=. python2 openerp/tests/test_view_validation.py
from lxml import etree
from StringIO import StringIO
import unittest2
from openerp.tools.view_validation import (valid_page_in_book, valid_att_in_form, valid_type_in_colspan,
... |
ryanmockabee/golfr | refs/heads/master | flask/lib/python3.6/site-packages/sqlalchemy/sql/schema.py | 14 | # sql/schema.py
# Copyright (C) 2005-2017 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
"""The schema module provides the building blocks for database metadata.
Each element... |
paulondc/gaffer | refs/heads/master | python/GafferUITest/ButtonTest.py | 5 | ##########################################################################
#
# Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... |
gavin-feng/odoo | refs/heads/8.0 | openerp/report/render/rml2pdf/trml2pdf.py | 256 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
mistakes-consortium/Supybot-Titler | refs/heads/master | test.py | 3 | ###
# Copyright (c) 2013, spline
# All rights reserved.
#
#
###
from supybot.test import *
class TitlerTestCase(PluginTestCase):
plugins = ('Titler',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
kostyll/micropython | refs/heads/master | tests/basics/set_specialmeth.py | 113 | # set object with special methods
s = {1, 2}
print(s.__contains__(1))
print(s.__contains__(3))
|
patricksnape/menpo | refs/heads/master | menpo/shape/adjacency.py | 2 | import numpy as np
def mask_adjacency_array(mask, adjacency_array):
# Find the indices that have been asked to be removed
indices_to_remove = np.nonzero(~mask)[0]
# Set intersection to find any rows containing those elements,
# reshape back in to the same size as adjacency array
entries_to_remove ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.