repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
rg3/youtube-dl
refs/heads/master
youtube_dl/extractor/aenetworks.py
4
from __future__ import unicode_literals import re from .theplatform import ThePlatformIE from ..utils import ( smuggle_url, update_url_query, unescapeHTML, extract_attributes, get_element_by_attribute, ) from ..compat import ( compat_urlparse, ) class AENetworksBaseIE(ThePlatformIE): _TH...
tersmitten/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_firewall_port_list.py
38
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2...
aguadev/aguadev
refs/heads/master
apps/node/node-v0.10.15/deps/v8/tools/testrunner/server/work_handler.py
123
# 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...
rapidhere/rpbtman_autosign
refs/heads/master
pytz/zoneinfo/America/Mendoza.py
9
'''tzinfo timezone information for America/Mendoza.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Mendoza(DstTzInfo): '''America/Mendoza timezone definition. See datetime.tzinfo for details''' zone = 'America/Mendoza' ...
Lektorium-LLC/edx-platform
refs/heads/master
common/lib/capa/capa/inputtypes.py
8
# # File: courseware/capa/inputtypes.py # """ Module containing the problem elements which render into input objects - textline - textbox (aka codeinput) - schematic - choicegroup (aka radiogroup, checkboxgroup) - imageinput (for clickable image) - optioninput (for option list) - filesubmission (upload a file) - c...
pyconca/2013-web
refs/heads/pyconca2013
symposion/cms/admin.py
7
from django.contrib import admin import reversion from .models import Page class PageAdmin(reversion.VersionAdmin): pass admin.site.register(Page, PageAdmin)
alvarofierroclavero/scikit-learn
refs/heads/master
sklearn/tree/tests/test_tree.py
72
""" Testing for the tree module (sklearn.tree). """ import pickle from functools import partial from itertools import product import platform import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import coo_matrix from sklearn.random_projection import sparse_rand...
provaleks/o8
refs/heads/8.0
addons/point_of_sale/test/test_frontend.py
309
import openerp.tests @openerp.tests.common.at_install(False) @openerp.tests.common.post_install(True) class TestUi(openerp.tests.HttpCase): def test_01_pos_basic_order(self): self.phantom_js("/", "openerp.Tour.run('pos_basic_order', 'test')", "openerp.Tour.tours.pos_basic_order", login="admin")
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-web/azure/mgmt/web/models/dimension.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
aboSamoor/polyglot
refs/heads/master
polyglot/mapping/__init__.py
7
from .base import CountedVocabulary, OrderedVocabulary, VocabularyBase from .embeddings import Embedding from .expansion import CaseExpander, DigitExpander __all__ = ['CountedVocabulary', 'OrderedVocabulary', 'VocabularyBase', 'Embedding', 'CaseExpander', 'DigitEx...
lfz/Guided-Denoise
refs/heads/master
Attackset/Iter4_ensv3_resv2_inresv2_random/nets/inception_v1.py
28
# 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 applicable ...
dlazz/ansible
refs/heads/devel
lib/ansible/modules/network/ovs/openvswitch_bridge.py
75
#!/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 ANSI...
Dezmonius/Deslium
refs/heads/master
Deslium Software/Deslium Hestia/CreatorKivyProject-master/libs/plugins/button/__init__.py
3
# -*- coding: utf-8 -*- # # Пример простого плагина. Добавляет кнопку в actionbar. # from kivy.clock import Clock def test_plugin(interval): app.screen.ids.action_bar.right_action_items = [ ['shopping-cart', lambda x: None], ['more-vert', lambda x: None] ] Clock.schedule_once(test_plugin, 5)
uranix/ttpy
refs/heads/python3
examples/test_amen.py
2
import sys sys.path.append('../') import tt from tt.amen import amen_solve """ This program test two subroutines: matrix-by-vector multiplication and linear system solution via AMR scheme""" d = 12 A = tt.qlaplace_dd([d]) x = tt.ones(2,d) y = amen_solve(A,x,x,1e-6)
teemulehtinen/a-plus
refs/heads/master
lib/api/authentication/__init__.py
3
from lib.crypto import get_signed_message GRADER_AUTH_TOKEN = 'token' def get_graderauth_submission_params(submission): token = "s{:x}.{}".format(submission.id, submission.hash) return [(GRADER_AUTH_TOKEN, token)] def get_graderauth_exercise_params(exercise, user=None): user_id = str(user.id) if user ...
devs1991/test_edx_docmode
refs/heads/master
lms/djangoapps/class_dashboard/views.py
57
""" Handles requests for data, returning a json """ import logging import json from django.http import HttpResponse from opaque_keys.edx.locations import SlashSeparatedCourseKey from courseware.courses import get_course_overview_with_access from courseware.access import has_access from class_dashboard import dashboa...
pschmitt/home-assistant
refs/heads/dev
tests/components/awair/const.py
21
"""Constants used in Awair tests.""" import json from homeassistant.const import CONF_ACCESS_TOKEN from tests.common import load_fixture AWAIR_UUID = "awair_24947" CONFIG = {CONF_ACCESS_TOKEN: "12345"} UNIQUE_ID = "foo@bar.com" DEVICES_FIXTURE = json.loads(load_fixture("awair/devices.json")) GEN1_DATA_FIXTURE = jso...
jfinkels/networkx
refs/heads/master
networkx/algorithms/tests/test_smetric.py
95
from nose.tools import assert_equal,raises import networkx as nx def test_smetric(): g = nx.Graph() g.add_edge(1,2) g.add_edge(2,3) g.add_edge(2,4) g.add_edge(1,4) sm = nx.s_metric(g,normalized=False) assert_equal(sm, 19.0) # smNorm = nx.s_metric(g,normalized=True) # assert_equal(sm...
whitzhu/kolibri
refs/heads/master
kolibri/auth/test/test_api.py
2
from __future__ import absolute_import, print_function, unicode_literals import collections import factory import sys from django.core.urlresolvers import reverse from rest_framework import status from rest_framework.test import APITestCase as BaseTestCase from django.contrib.sessions.models import Session from .. ...
eq0rip/three.js
refs/heads/master
utils/exporters/blender/addons/io_three/exporter/api/texture.py
125
from bpy import data, types from .. import constants, logger from .constants import IMAGE, MAG_FILTER, MIN_FILTER, MAPPING from . import image def _texture(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: ...
BartoszCichecki/onlinepython
refs/heads/master
onlinepython/pypy-2.4.0-win32/lib-python/2.7/encodings/quopri_codec.py
419
"""Codec for quoted-printable encoding. Like base64 and rot13, this returns Python strings, not Unicode. """ import codecs, quopri try: from cStringIO import StringIO except ImportError: from StringIO import StringIO def quopri_encode(input, errors='strict'): """Encode the input, returning a tuple (outpu...
svinota/cxnet
refs/heads/master
cxnet/netlink/generic.py
1
# -*- coding: utf-8 -*- """ cxnet.netlink.generic ~~~~~~~~~~~~~~~~~~~~~ This module implements generic Netlink socket object. :copyright: (c) 2011 by Peter V. Saveliev, see AUTHORS for more details. :license: GPL, see LICENSE for more details. """ from __future__ import absolute_import import sy...
Lujeni/ansible
refs/heads/devel
lib/ansible/modules/system/setup.py
17
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.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': '...
raschuetz/foundations-homework
refs/heads/master
07/data-analysis/lib/python3.5/site-packages/pip/req/__init__.py
806
from __future__ import absolute_import from .req_install import InstallRequirement from .req_set import RequirementSet, Requirements from .req_file import parse_requirements __all__ = [ "RequirementSet", "Requirements", "InstallRequirement", "parse_requirements", ]
mcking49/apache-flask
refs/heads/master
Python/Lib/site-packages/pip/_vendor/html5lib/treebuilders/_base.py
915
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from ..constants import scopingElements, tableInsertModeElements, namespaces # The scope markers are inserted when entering object elements, # marquees, table cells, and table captions, and are used to prevent for...
marckuz/django
refs/heads/master
tests/migrations/test_migrations_squashed_erroneous/6_auto.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "5_auto")] operations = [ migrations.RunPython(migrations.RunPython.noop) ]
golismero/golismero-devel
refs/heads/master
thirdparty_libs/django/views/decorators/http.py
228
""" Decorators for views based on HTTP headers. """ import logging from calendar import timegm from functools import wraps from django.utils.decorators import decorator_from_middleware, available_attrs from django.utils.http import http_date, parse_http_date_safe, parse_etags, quote_etag from django.middleware.http i...
banebg/embedded
refs/heads/master
blog/login/models.py
792
from __future__ import unicode_literals from django.db import models # Create your models here.
nitin-cherian/Webapps
refs/heads/master
TalkPython/P4E/my_web_app/.env/lib/python3.5/site-packages/pip/__main__.py
834
from __future__ import absolute_import import os import sys # If we are running from a wheel, add the wheel to sys.path # This allows the usage python pip-*.whl/pip install pip-*.whl if __package__ == '': # __file__ is pip-*.whl/pip/__main__.py # first dirname call strips of '/__main__.py', second strips off ...
DualSpark/ansible
refs/heads/devel
lib/ansible/plugins/action/fetch.py
15
# (c) 2012-2014, 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) an...
shail2810/nova
refs/heads/master
nova/compute/task_states.py
96
# Copyright 2010 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 requ...
affan2/django-activity-stream
refs/heads/master
example_project/registration/__init__.py
30
VERSION = (0, 8, 0, 'alpha', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] != 'final': version = '%s %...
sidartaoliveira/ansible
refs/heads/devel
lib/ansible/plugins/callback/profile_tasks.py
34
# (C) 2016, Joel, http://github.com/jjshoe # (C) 2015, Tom Paine, <github@aioue.net> # (C) 2014, Jharrod LaFon, @JharrodLaFon # (C) 2012-2013, Michael DeHaan, <michael.dehaan@gmail.com> # # This file is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
iafan/zing
refs/heads/master
pytest_pootle/fixtures/models/translation_project.py
1
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import pytest def pytest_generate_tests(me...
PetePriority/home-assistant
refs/heads/dev
homeassistant/components/sensor/ruter.py
5
""" A sensor platform that give you information about next departures from Ruter. For more details about this platform, please refer to the documentation at https://www.home-assistant.io/components/sensor.ruter/ """ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from hom...
MyRookie/SentimentAnalyse
refs/heads/master
venv/lib/python2.7/site-packages/nltk/tag/brill.py
3
# -*- coding: utf-8 -*- # Natural Language Toolkit: Transformation-based learning # # Copyright (C) 2001-2015 NLTK Project # Author: Marcus Uneson <marcus.uneson@gmail.com> # based on previous (nltk2) version by # Christopher Maloof, Edward Loper, Steven Bird # URL: <http://nltk.org/> # For license informat...
b-me/django
refs/heads/master
django/conf/locale/fy/formats.py
852
# -*- 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 = # TIME_FORMAT = # DATETIME_FORMA...
RTS2/rts2
refs/heads/master
scripts/u_point/u_model.py
3
#!/usr/bin/env python3 # (C) 2016, Markus Wildi, wildi.markus@bluewin.ch # # 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, or (at your option) # any later version. # # ...
frewsxcv/servo
refs/heads/master
tests/wpt/harness/wptrunner/wpttest.py
40
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. DEFAULT_TIMEOUT = 10 # seconds LONG_TIMEOUT = 60 # seconds import os import mozinfo from wptmanifest.parser import ...
mapnik/mapnik
refs/heads/master
scons/scons-local-4.1.0/SCons/Tool/packaging/rpm.py
2
"""SCons.Tool.Packaging.rpm The rpm packager. """ # # __COPYRIGHT__ # # 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, ...
Precis/Diamond
refs/heads/master
src/collectors/nagios/test/testnagios.py
31
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from nagios import NagiosS...
aidanlister/django
refs/heads/master
django/templatetags/cache.py
471
from __future__ import unicode_literals from django.core.cache import InvalidCacheBackendError, caches from django.core.cache.utils import make_template_fragment_key from django.template import ( Library, Node, TemplateSyntaxError, VariableDoesNotExist, ) register = Library() class CacheNode(Node): def __in...
jdesgats/mongrel2
refs/heads/master
examples/chat/www.py
99
import web import random urls = ( '/(.*)', 'hello' ) app = web.application(urls, globals()) class hello: def GET(self, name): if not name: name = 'World' data = 'Hello, ' + name + '!' return data * random.randint(1, 1000) if __name__ == "__main__": app.run()
uiri/pxqz
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/formtools/tests/wizard/wizardtests/tests.py
78
from __future__ import with_statement import os from django import forms from django.test import TestCase from django.test.client import RequestFactory from django.conf import settings from django.contrib.auth.models import User from django.contrib.formtools.wizard.views import CookieWizardView from django.contrib.for...
kewisch/python-crucible
refs/heads/master
src/modules/crucible/rest.py
2
import urllib import urllib2 import json import functools def buildUrl(url, params = []): if(len(params) > 0): url += '?' first = True for key, value in params: if(first): first = False else: url += '&' ur...
Donkyhotay/MoonPy
refs/heads/master
twisted/test/test_import.py
61
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.python.runtime import platformType class AtLeastImportTestCase(unittest.TestCase): """I test that there are no syntax errors which will not allow importing. """ failureExce...
datenbetrieb/odoo
refs/heads/8.0
addons/account_anglo_saxon/stock.py
57
# -*- encoding: 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 t...
benoitsteiner/tensorflow-opencl
refs/heads/master
tensorflow/contrib/slim/python/slim/summaries_test.py
73
# 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...
elopezga/ErrorRate
refs/heads/master
ivi/agilent/agilentDSOX3032A.py
7
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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...
SummerLW/Perf-Insight-Report
refs/heads/test
telemetry/telemetry/internal/backends/android_app_backend_unittest.py
7
# 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 collections import mock import unittest from telemetry.internal.backends import android_app_backend from devil.android.sdk import intent as intent_mod...
amanharitsh123/zulip
refs/heads/master
zerver/migrations/0103_remove_userprofile_muted_topics.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-31 00:13 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0102_convert_muted_topic'), ] operations = [ migrations.RemoveField( model_name='userprofile', ...
seanli9jan/tensorflow
refs/heads/master
tensorflow/contrib/data/python/ops/iterator_ops.py
19
# 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...
rhelmer/socorro-lib
refs/heads/master
socorro/external/crash_data_base.py
10
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from socorro.external import ( MissingArgumentError, ResourceNotFound, ResourceUnavailable, ServiceUnava...
RyanYoung25/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/depthwise_conv_op_test.py
1
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
baoboa/pizza-lammps
refs/heads/master
src/cfg.py
54
# Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html # Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories # # Copyright (2005) Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains # certain rights in this software. This software is...
kazcw/bitcoin
refs/heads/master
test/functional/rpc_fundrawtransaction.py
8
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the fundrawtransaction RPC.""" from decimal import Decimal from test_framework.test_framework imp...
anisku11/sublimeku
refs/heads/master
Packages/pygments/all/pygments/lexers/smalltalk.py
47
# -*- coding: utf-8 -*- """ pygments.lexers.smalltalk ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Smalltalk and related languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, bygroups, defa...
sonata-nfv/son-cli
refs/heads/master
setup.py
5
# Copyright (c) 2015 SONATA-NFV, UBIWHERE # 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 app...
TerryHowe/ansible-modules-hashivault
refs/heads/master
ansible/modules/hashivault/hashivault_approle_role_secret_list.py
1
#!/usr/bin/env python from hvac.exceptions import InvalidPath from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivault import hashiwrapper ANSIBLE_ME...
you21979/phantomjs
refs/heads/2.0
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/update.py
124
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
matrix-org/synapse
refs/heads/master
tests/rest/admin/test_user.py
1
# Copyright 2018 New Vector Ltd # # 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 writin...
bgxavier/nova
refs/heads/master
nova/image/download/__init__.py
61
# Copyright 2013 Red Hat, 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...
mquandalle/rethinkdb
refs/heads/next
external/v8_3.30.33.16/testing/gtest/scripts/upload_gtest.py
1963
#!/usr/bin/env python # # Copyright 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...
loseblue/vim-ycm-windows-64
refs/heads/master
third_party/requests/requests/packages/chardet/sbcharsetprober.py
2926
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
ethan1341/angular-rc5
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
1467
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os....
kustomzone/Rusthon
refs/heads/master
regtests/dict/contains.py
6
"""key in dict""" def main(): a = {'2': 22, 3:33} TestError( '2' in a ) TestError( 3 in a )
slowfranklin/samba
refs/heads/master
source4/torture/libnet/python/samr-test.py
67
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Unix SMB/CIFS implementation. # Copyright (C) Kamen Mazdrashki <kamen.mazdrashki@postpath.com> 2009 # # 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 Founda...
alexmorozov/django
refs/heads/master
tests/utils_tests/test_module/good_module.py
582
content = 'Good Module'
h3biomed/ansible
refs/heads/h3
lib/ansible/modules/crypto/openssl_privatekey.py
4
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # 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_v...
Transtech/omim
refs/heads/master
3party/protobuf/python/google/protobuf/service.py
242
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
pomegranited/edx-platform
refs/heads/master
lms/djangoapps/instructor/paidcourse_enrollment_report.py
38
""" Defines concrete class for cybersource Enrollment Report. """ from courseware.access import has_access import collections from django.conf import settings from django.utils.translation import ugettext as _ from courseware.courses import get_course_by_id from instructor.enrollment_report import BaseAbstractEnrollm...
salguarnieri/intellij-community
refs/heads/master
python/testData/formatter/newLineAfterColon.py
83
if True: pass
jnovinger/django
refs/heads/master
django/contrib/gis/db/models/functions.py
209
from decimal import Decimal from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import AreaField from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as DistanceMeasure, ) from django.core.ex...
skevy/django
refs/heads/master
tests/regressiontests/forms/localflavor/br.py
89
from django.contrib.localflavor.br.forms import (BRZipCodeField, BRCNPJField, BRCPFField, BRPhoneNumberField, BRStateSelect, BRStateChoiceField) from utils import LocalFlavorTestCase class BRLocalFlavorTests(LocalFlavorTestCase): def test_BRZipCodeField(self): error_format = [u'Enter a zip code i...
SilentCircle/sentry
refs/heads/master
conftest.py
3
from django.conf import settings import base64 import os import os.path def pytest_configure(config): import warnings warnings.filterwarnings('error', '', Warning, r'(sentry|raven)') if not settings.configured: os.environ['DJANGO_SETTINGS_MODULE'] = 'sentry.conf.server' test_db = os.environ....
adw0rd/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/utils/module_loading.py
38
import os import sys import unittest from zipimport import zipimporter from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule class DefaultLoader(unittest.TestCase): def test_loader(self): "Normal module existence can be tested" test_module = ...
pap/nupic
refs/heads/master
external/linux32/lib/python2.6/site-packages/matplotlib/transforms.py
69
""" matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of :class:`TransformNode` objects whose actual value depends on their children. When the contents of children change, their pare...
avielman/IU-SCRUM
refs/heads/master
back-end/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/refactoring/inlineFunction/importAs/main.after.py
12
from source import foo as foo1 foo = 1 x = foo1() res = x + 2
odoousers2014/LibrERP
refs/heads/master
account_no_dashboard/__init__.py
526
# -*- 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...
pyblish/pyblish-win
refs/heads/master
lib/Python27/Lib/json/tests/test_pass3.py
145
from json.tests import PyTest, CTest # from http://json.org/JSON_checker/test/pass3.json JSON = r''' { "JSON Test Pattern pass3": { "The outermost value": "must be an object or array.", "In this test": "It is an object." } } ''' class TestPass3(object): def test_parse(self): # te...
Motaku/ansible
refs/heads/devel
lib/ansible/plugins/connections/chroot.py
50
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Maykel Moya <mmoya@speedyrails.com> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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 ...
mccheung/kbengine
refs/heads/master
kbe/src/lib/python/Lib/xmlrpc/client.py
69
# # XML-RPC CLIENT LIBRARY # $Id$ # # an XML-RPC client interface for Python. # # the marshalling and response parser code can also be used to # implement XML-RPC servers. # # Notes: # this version is designed to work with Python 2.1 or newer. # # History: # 1999-01-14 fl Created # 1999-01-15 fl Changed dateTime to u...
tima/ansible
refs/heads/devel
lib/ansible/modules/windows/win_disk_facts.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Marc Tschapek <marc.tschapek@itelligence.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supp...
kaaustubh/pjsip
refs/heads/master
tests/pjsua/scripts-sendto/140_sdp_with_direction_attr_in_session_1.py
58
# $Id: 140_sdp_with_direction_attr_in_session_1.py 3086 2010-02-03 14:43:25Z nanang $ import inc_sip as sip import inc_sdp as sdp # Offer contains "sendonly" attribute in the session. Answer should # respond with appropriate direction in session or media sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=- c=IN IP4 127.0.0.1 ...
le9i0nx/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/redshift_facts.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # 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', ...
vvv1559/intellij-community
refs/heads/master
python/testData/quickdoc/OptionalParameterType.py
31
def open(encoding: str = None, errors: str = None): pass <the_ref>open()
jonboy11171/support-tools
refs/heads/master
googlecode-issues-exporter/bitbucket_issue_converter_test.py
90
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
tarzan0820/odoo
refs/heads/8.0
addons/website_blog/controllers/main.py
132
# -*- coding: utf-8 -*- import datetime import werkzeug from openerp import tools from openerp.addons.web import http from openerp.addons.web.controllers.main import login_redirect from openerp.addons.web.http import request from openerp.addons.website.models.website import slug from openerp.osv.orm import browse_rec...
tchellomello/home-assistant
refs/heads/dev
tests/components/simulated/test_sensor.py
10
"""The tests for the simulated sensor.""" import unittest from homeassistant.components.simulated.sensor import ( CONF_AMP, CONF_FWHM, CONF_MEAN, CONF_PERIOD, CONF_PHASE, CONF_RELATIVE_TO_EPOCH, CONF_SEED, CONF_UNIT, DEFAULT_AMP, DEFAULT_FWHM, DEFAULT_MEAN, DEFAULT_NAME,...
shapiroisme/datadollar
refs/heads/master-0.8
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
akretion/odoo
refs/heads/12-patch-paging-100-in-o2m
addons/account_check_printing/models/account_payment.py
8
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api, _ from odoo.exceptions import UserError, ValidationError from odoo.tools.misc import formatLang, format_date INV_LINES_PER_STUB = 9 class AccountRegisterPayments(models.TransientMo...
devs1991/test_edx_docmode
refs/heads/master
cms/djangoapps/contentstore/management/commands/clean_cert_name.py
37
""" A single-use management command that provides an interactive way to remove erroneous certificate names. """ from collections import namedtuple from django.core.management.base import BaseCommand from xmodule.modulestore.django import modulestore from xmodule.modulestore import ModuleStoreEnum Result = namedtupl...
mwx1993/TACTIC
refs/heads/master
src/tactic/ui/input/process_group_select_wdg.py
5
########################################################### # # Copyright (c) 2009, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without writte...
janusnic/dj-21v
refs/heads/master
unit_12/mysite/userprofiles/mixins.py
9
from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator class LoginRequiredMixin(object): """Ensures that the user is authenticated in order to access the view. http://djangosnippets.org/snippets/2442/""" @method_decorator(login_required) def dis...
mehdidc/scikit-learn
refs/heads/master
sklearn/decomposition/sparse_pca.py
26
"""Matrix factorization with Sparse PCA""" # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause import numpy as np from ..utils import check_random_state, check_array from ..utils.validation import check_is_fitted from ..linear_model import ridge_regression from ..base import BaseEstimat...
lufeewu/flasky
refs/heads/master
manage.py
76
#!/usr/bin/env python import os COV = None if os.environ.get('FLASK_COVERAGE'): import coverage COV = coverage.coverage(branch=True, include='app/*') COV.start() if os.path.exists('.env'): print('Importing environment from .env...') for line in open('.env'): var = line.strip().split('=') ...
dziadu/gitbrowser
refs/heads/master
tests/__init__.py
803
# -*- coding: utf-8 -*-
barnone/EigenD
refs/heads/2.0
tools/packages/SCons/Tool/f77.py
2
"""engine.SCons.Tool.f77 Tool-specific initialization for the generic Posix f77 Fortran compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2...
FePhyFoFum/PyPHLAWD
refs/heads/master
src/get_ncbi_ids_for_names.py
1
import os import sys import sqlite3 def get_taxid_for_name(cursor, name): cursor.execute("select ncbi_id from taxonomy where name = '"+name+"';") ttax_id = None for j in cursor: ttax_id = str(j[0]) return ttax_id if __name__ == "__main__": if len(sys.argv) != 3: print("python "+sys...