repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
McNetic/couchpotato-ger
refs/heads/master
library/git/commit.py
11
# Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com> # 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 li...
numerigraphe/odoomrp-wip
refs/heads/8.0
mrp_operations_extension/wizard/mrp_product_produce.py
2
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
erkanay/django
refs/heads/master
tests/unmanaged_models/__init__.py
12133432
potray/SSBW_Django
refs/heads/master
practica/__init__.py
12133432
davidsminor/cortex
refs/heads/master
test/IECore/TypeIdTest.py
12
########################################################################## # # Copyright (c) 2008, 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: # # * Redistribu...
LifeDJIK/S.H.I.V.A.
refs/heads/master
containers/shiva/hazelcast/protocol/codec/lock_is_locked_by_current_thread_codec.py
2
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.lock_message_type import * REQUEST_TYPE = LOCK_ISLOCKEDBYCURRENTTHREAD RESPONSE_TYPE = 101 ...
internap/fake-switches
refs/heads/master
tests/dell10g/test_enabled_with_commit_delay.py
4
# Copyright 2016 Internap. # # 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, so...
Khan/git-bigfile
refs/heads/master
vendor/boto/swf/layer2.py
130
"""Object-oriented interface to SWF wrapping boto.swf.layer1.Layer1""" import time from functools import wraps from boto.swf.layer1 import Layer1 from boto.swf.layer1_decisions import Layer1Decisions DEFAULT_CREDENTIALS = { 'aws_access_key_id': None, 'aws_secret_access_key': None } def set_default_credential...
rbalda/neural_ocr
refs/heads/master
env/lib/python2.7/site-packages/numpy/lib/index_tricks.py
57
from __future__ import division, absolute_import, print_function import sys import math import numpy.core.numeric as _nx from numpy.core.numeric import ( asarray, ScalarType, array, alltrue, cumprod, arange ) from numpy.core.numerictypes import find_common_type, issubdtype from . import function_base import ...
xyq946692052/microblog
refs/heads/master
db_repository/versions/002_migration.py
134
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() post = Table('post', post_meta, Column('id', Integer, primary_key=True, nullable=False), Column('body', String(length=140)), Column('timestamp', DateTime), Column('user_id',...
bartosh/zipline
refs/heads/master
zipline/utils/simfactory.py
6
import zipline.utils.factory as factory from zipline.testing.core import create_data_portal_from_trade_history from zipline.test_algorithms import TestAlgorithm from zipline.utils.calendars import get_calendar def create_test_zipline(**config): """ :param config: A configuration object that is a dict with...
sujaymansingh/random_cricket_profiles
refs/heads/develop
random_cricket_profiles/api.py
1
"""A flask API for generating (and retrieving) player details! Usage: api.py run [--no-debug] [--port=<p>] [--host=<h>] api.py (-h | --help) Options: -h --help Show this screen --no-debug Don't add debug=True when running --port=<p> The port to use [default: 5000] --ho...
Samnsparky/py_common_subseq
refs/heads/master
py_common_subseq/__init__.py
1
"""Micro-library implementating logic to find all common subsequences. Implementation of the calACS-DP (all common subsequences - dynamic programming) algorithm as presented in Hui Wang's "All common subsequences." IJCAI 2007:635-640 (ACM). This Micro-library also introduces a variation which can produce a list all of...
spektom/incubator-airflow
refs/heads/master
airflow/providers/apache/pinot/hooks/pinot.py
4
# # 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...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/gdata/tests/gdata_tests/apps/migration/service_test.py
38
#!/usr/bin/python2.4 # # Copyright 2008 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 require...
el-lumbergato/namebench
refs/heads/master
nb_third_party/httplib2/iri2uri.py
885
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
Vladimir37/Sanelotto
refs/heads/master
routes/help.py
1
def help(): print() print('\033[1mSanelotto\033[0m - application for auto-deploying. Sanelotto works in conjunction with Continuous-Integration systems.') print() print('\033[1mSYNOPSIS\033[0m') print() print('sanelotto generate') print('- Start question-answer mode to generate a new project...
trenton3983/Artificial_Intelligence_for_Humans
refs/heads/master
vol3/vol3-python-examples/lib/aifh/boltzmann.py
2
#!/usr/bin/env python """ Artificial Intelligence for Humans Volume 3: Deep Learning and Neural Networks Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2015 by Jeff Heaton Licensed under the Apache License, V...
maxalbert/tohu
refs/heads/master
tests/v7/test_field_selector.py
1
import pytest from tohu.v7.field_selector import FieldSelector from tohu.v7.custom_generator.tohu_items_class import make_tohu_items_class def test_field_selector(): Quux = make_tohu_items_class("Quux", field_names=["cc", "aa", "bb"]) input_items = [Quux(aa=104, bb="672EF2", cc="Johnny"), Quux(aa=114, bb="250...
Daihiro/ldjam37
refs/heads/master
ld37/common/utils/assetManager.py
1
import json import pygame class AssetManager: 'Use this to get all of the resources' asset_dictionary = {} json_dict = {} def __init__(self): if len(AssetManager.json_dict) == 0: asset_file = open("assets/asset_map.json") file_text = asset_file.read() AssetM...
p2/ZBar
refs/heads/master
examples/upcrpc.py
29
#!/usr/bin/env python from xmlrpclib import ServerProxy import sys, re server = ServerProxy("http://www.upcdatabase.com/rpc") ean_re = re.compile(r'^(UPC-A:|EAN-13:)?(\d{11,13})$', re.M) def lookup(decode): match = ean_re.search(decode) if match is None: print decode, return ean = match.gr...
mwytock/cvxpy
refs/heads/master
cvxpy/tests/test_tree_mat.py
12
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
TRESCLOUD/odoo
refs/heads/Integracion&ControlDeCalidad
openerp/workflow/wkf_logs.py
61
# -*- 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...
mortada/tensorflow
refs/heads/master
tensorflow/python/training/rmsprop.py
52
# 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...
keras-team/keras-contrib
refs/heads/master
keras_contrib/activations/__init__.py
2
from __future__ import absolute_import from .squash import squash
hcrlab/access_teleop
refs/heads/master
ezgripper_driver/nodes/ezgripperGUI.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import rospy import sys from ezgripper_libs.ezgripper_interface import EZGripper from PyQt4 import QtGui, QtCore rospy.init_node('hello_ezgripper') gripper = EZGripper('ezgripper/main') class GripperGUI(QtGui.QMainWindow): def __init__(self): super(GripperGUI, self...
fabada/pootle
refs/heads/master
pootle/core/models.py
7
#!/usr/bin/env python # -*- 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. from .cache import ge...
40223232/2015cd_midterm2
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/urllib/__init__.py
12133432
andela-angene/coursebuilder-core
refs/heads/develop-frontend
coursebuilder/modules/oauth2/__init__.py
12133432
graphql-python/graphql-epoxy
refs/heads/master
epoxy/metaclasses/__init__.py
12133432
amaork/libi2c
refs/heads/master
tests/test_pylibi2c.py
1
import random import unittest import pylibi2c class Pylibi2cTest(unittest.TestCase): def setUp(self): self.i2c_size = 256 # 24C04 E2PROM test self.i2c = pylibi2c.I2CDevice(bus="/dev/i2c-1", addr=0x56, page_bytes=16) def test_init(self): with self.assertRaises(TypeError): ...
mambocab/python-driver
refs/heads/master
tests/unit/cython/test_types.py
3
# Copyright DataStax, 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 writing, softwa...
marcosmodesto/django-testapp
refs/heads/master
django/contrib/auth/tokens.py
96
from datetime import date from django.conf import settings from django.utils.http import int_to_base36, base36_to_int from django.utils.crypto import constant_time_compare, salted_hmac class PasswordResetTokenGenerator(object): """ Strategy object used to generate and check tokens for the password reset me...
DarthMaulware/EquationGroupLeaks
refs/heads/master
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/encodings/hp_roman8.py
1
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: hp_roman8.py """ Python Character Mapping Codec generated from 'hp_roman8.txt' with gencodec.py. Based on data from ftp://dkuug.dk/i18n/charmaps...
vijaylbais/boto
refs/heads/develop
boto/manage/propget.py
153
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
robjohnson189/home-assistant
refs/heads/dev
tests/components/automation/test_time.py
7
"""The tests for the time automation.""" from datetime import timedelta import unittest from unittest.mock import patch from homeassistant.core import callback from homeassistant.bootstrap import setup_component import homeassistant.util.dt as dt_util import homeassistant.components.automation as automation from test...
DonLakeFlyer/ardupilot
refs/heads/master
Tools/ardupilotwaf/build_summary.py
17
#!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2016 Intel Corporation. All rights reserved. # # This file 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 yo...
michael-dev2rights/ansible
refs/heads/ansible-d2r
lib/ansible/modules/network/netvisor/pn_ospfarea.py
29
#!/usr/bin/python """ PN-CLI vrouter-ospf-add/remove """ # # 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...
oglops/Maya-PyQt-Scripts
refs/heads/master
tests/pyqt-test.py
2
import sip import maya.OpenMayaUI as mui from PyQt4.QtCore import * from PyQt4.QtGui import * def getMayaWindow(): ptr =mui.MQtUtil.mainWindow () return sip.wrapinstance (long(ptr), QObject) class Form(QDialog): def __init__ (self, parent=None): super (Form, self).__init__ (parent) self.s...
chemelnucfin/tensorflow
refs/heads/master
tensorflow/contrib/tpu/python/profiler/__init__.py
8
# Copyright 2019 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 ...
lukemerrett/SteamProgress
refs/heads/master
clients/installed_games.py
1
import os import settings __installed_games = os.listdir(settings.steam_user_folder) def is_game_in_installed_games_list(game): return str(game['appid']) in __installed_games
albertjan/pypyjs-presentation
refs/heads/gh-pages
assets/js/pypy.js-0.3.1/lib/modules/unittest/test/test_skipping.py
71
import unittest from .support import LoggingResult class Test_TestSkipping(unittest.TestCase): def test_skipping(self): class Foo(unittest.TestCase): def test_skip_me(self): self.skipTest("skip") events = [] result = LoggingResult(events) test = Foo("t...
GLPJJ/PL
refs/heads/master
py/ztest/quant_stock.py
1
#python 3.6 #pip install pandas #pip install lxml #根据提示语 安装缺少的模块 #pip install requests #pip install bs4 #pip install tushare #交易部分 #pip install tesseract #搜tesseract 单独下载,并且需要放到path目录 #TESSDATA_PREFIX 标记到环境变量中 训练数据位置 C:\Program Files (x86)\Tesseract-OCR\tessdata import tushare import numpy as np import matplotlib...
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/platform/google_appengine/lib/grizzled/grizzled/text/__init__.py
19
# $Id: 55b6d7323887ac09f6bfba365205e952533b847b $ """ The ``grizzled.text`` package contains text-related classes and modules. """ __docformat__ = "restructuredtext en" # --------------------------------------------------------------------------- # Imports # ----------------------------------------------------------...
cognitoedtech/assy
refs/heads/master
3rd_party/fuelux-master/fuelux-master/node_modules/testem/node_modules/js-yaml/support/pyyaml-src/emitter.py
189
# Emitter expects events obeying the following grammar: # stream ::= STREAM-START document* STREAM-END # document ::= DOCUMENT-START node DOCUMENT-END # node ::= SCALAR | sequence | mapping # sequence ::= SEQUENCE-START node* SEQUENCE-END # mapping ::= MAPPING-START (node node)* MAPPING-END __all__ = ['Emitter', 'Emi...
kawamon/hue
refs/heads/master
desktop/core/src/desktop/lib/raz/ranger/__init__.py
6
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
rytaft/h-store
refs/heads/master
third_party/python/boto/route53/__init__.py
20
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # w...
opensemanticsearch/open-semantic-search-apps
refs/heads/master
src/morphology/tests.py
24123
from django.test import TestCase # Create your tests here.
Tooskich/python_core
refs/heads/master
widgets/tests.py
24123
from django.test import TestCase # Create your tests here.
ThiagoGarciaAlves/intellij-community
refs/heads/master
python/testData/resolve/AttributeAssignedNearby.py
83
def foo(bar): bar.xyzzy = 1 print bar.xyzzy # <ref>
yasir1brahim/OLiMS
refs/heads/master
models/suppliercontact.py
2
"""The contact person at a reference supplier organisation. """ from openerp import fields, models, api from fields.string_field import StringField from base_olims_model import BaseOLiMSModel from fields.widget.widget import StringWidget from openerp.tools.translate import _ schema = ( StringField('Salutation', ...
tayfun/django
refs/heads/master
tests/forms_tests/tests/test_error_messages.py
169
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import ( BooleanField, CharField, ChoiceField, DateField, DateTimeField, DecimalField, EmailField, FileField, FloatField, Form, GenericIPAddressField, IntegerField...
sinkpoint/dipy
refs/heads/master
dipy/fixes/argparse.py
19
# emacs: -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # Copyright 2006-2009 Steven J. Bethard <steven.bethard@gmail.com>. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
archen/django
refs/heads/master
django/contrib/auth/models.py
15
from __future__ import unicode_literals from django.core.mail import send_mail from django.core import validators from django.db import models from django.db.models.manager import EmptyManager from django.utils.crypto import get_random_string from django.utils import six from django.utils.translation import ugettext_l...
postlund/home-assistant
refs/heads/dev
homeassistant/components/input_text/__init__.py
2
"""Support to enter a value into a text box.""" import logging import typing import voluptuous as vol from homeassistant.const import ( ATTR_EDITABLE, ATTR_MODE, CONF_ICON, CONF_ID, CONF_MODE, CONF_NAME, CONF_UNIT_OF_MEASUREMENT, SERVICE_RELOAD, ) from homeassistant.core import callbac...
gurneyalex/odoo
refs/heads/13.0-improve_sale_coupon_perf
addons/point_of_sale/tests/test_pos_multiple_sale_accounts.py
7
import odoo from odoo.addons.point_of_sale.tests.common import TestPoSCommon @odoo.tests.tagged('post_install', '-at_install') class TestPoSMultipleSaleAccounts(TestPoSCommon): """ Test to orders containing products with different sale accounts keywords/phrases: Different Income Accounts In this test, tw...
jack8daniels2/yabgp
refs/heads/master
yabgp/tests/unit/core/test_protocol.py
4
# Copyright 2015 Cisco Systems, 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 requi...
crimsonthunder/kernel_samsung_trlte_5.1.1
refs/heads/COI3
scripts/rt-tester/rt-tester.py
11005
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
rentongzhang/servo
refs/heads/master
python/mozlog/mozlog/structured/commandline.py
39
# 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/. import sys import os import optparse from collections import defaultdict from structuredlog import StructuredLogger, se...
jolevq/odoopub
refs/heads/master
addons/website_blog/wizard/__init__.py
373
# -*- 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...
sbtlaarzc/vispy
refs/heads/master
examples/basics/plotting/plot.py
13
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Plot data with different styles """ import numpy as np from vispy import plot as vp fig = vp.Fig(size=(600, 500), show=False) # Plot the target square wave shape x = n...
thanhacun/odoo
refs/heads/8.0
addons/resource/resource.py
174
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
YuriyLisovskiy/messenger
refs/heads/master
test/unittest/__init__.py
12133432
yaroslavprogrammer/django
refs/heads/master
tests/modeladmin/__init__.py
12133432
donce/django-cms
refs/heads/develop
cms/admin/dialog/__init__.py
12133432
SnippyHolloW/contextual_word_segmentation
refs/heads/master
src/plot_topics_distribs.py
2
import sys import pylab as pl LDAMODEL = 'provi_reseg_lemmatized_tfidf.ldamodel' usage = """python src/plot_topics_distrib.py < all_1min_doc_topics_reseg_lemmatized.txt""" topics_distrib = {} for line in sys.stdin: tuples = line.split('[')[1].split(')') tuples = tuples[:-1] for t in tuples: tmp =...
tarzan0820/odoo
refs/heads/8.0
addons/payment_buckaroo/models/buckaroo.py
209
# -*- coding: utf-'8' "-*-" from hashlib import sha1 import logging import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment_buckaroo.controllers.main import BuckarooController from openerp.osv import osv, fields from openerp.tools.float_utils import float_...
NeCTAR-RC/neutron
refs/heads/master
neutron/tests/tempest/test.py
17
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
cliffano/swaggy-jenkins
refs/heads/master
clients/python-flask/generated/openapi_server/models/multibranch_pipeline.py
1
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from openapi_server.models.base_model_ import Model from openapi_server import util class MultibranchPipeline(Model): """NOTE: This class is auto generated by Ope...
jagguli/intellij-community
refs/heads/master
python/testData/inspections/PyUnboundLocalVariableInspection/SysExit.py
83
def f(): import sys sys.exit(1) #pass
yongshengwang/hue
refs/heads/master
build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/locale/sl/__init__.py
12133432
sczzq/symmetrical-spoon
refs/heads/master
base-usage/shell/find/new.py
12133432
tangentlabs/wagtail
refs/heads/master
wagtail/wagtailforms/migrations/__init__.py
12133432
alrusdi/python-social-auth
refs/heads/master
social/tests/backends/test_strava.py
87
import json from social.tests.backends.oauth import OAuth2Test class StravaOAuthTest(OAuth2Test): backend_path = 'social.backends.strava.StravaOAuth' user_data_url = 'https://www.strava.com/api/v3/athlete' expected_username = '227615' access_token_body = json.dumps({ "access_token": "83ebeabdec...
jmartu/testing
refs/heads/master
venv/lib/python3.6/site-packages/setuptools/py27compat.py
189
""" Compatibility Support for Python 2.7 and earlier """ import platform from setuptools.extern import six def get_all_headers(message, key): """ Given an HTTPMessage, return all headers matching a given key. """ return message.get_all(key) if six.PY2: def get_all_headers(message, key): ...
ccnmtl/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/included_urls.py
109
from django.conf.urls.defaults import * from views import empty_view urlpatterns = patterns('', url(r'^$', empty_view, name="inner-nothing"), url(r'^extra/(?P<extra>\w+)/$', empty_view, name="inner-extra"), url(r'^(?P<one>\d+)|(?P<two>\d+)/$', empty_view, name="inner-disjunction"), )
gogobook/wagtail
refs/heads/master
wagtail/wagtailredirects/migrations/0005_capitalizeverbose.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailredirects', '0004_set_unique_on_path_and_site'), ] operations = [ migrations.AlterModelOptions( name='red...
liangazhou/django-rdp
refs/heads/master
packages/Django-1.8.6/tests/urlpatterns_reverse/urls_error_handlers_callables.py
513
# Used by the ErrorHandlerResolutionTests test case. from .views import empty_view urlpatterns = [] handler400 = empty_view handler404 = empty_view handler500 = empty_view
MrJohz/wfething-backend
refs/heads/master
test/__init__.py
12133432
googlearchive/bigquery-samples-python
refs/heads/master
python/samples/__init__.py
12133432
superdesk/Live-Blog
refs/heads/master
plugins/embed/gui-themes/themes/satakansa/desktop/__init__.py
12133432
badock/nova
refs/heads/master
nova/tests/keymgr/__init__.py
12133432
django-school-management/ssms
refs/heads/master
ssms/common/common/__init__.py
12133432
daltemen/example-oracle-django
refs/heads/master
hometech/estructuras/__init__.py
12133432
gangadharkadam/sterp
refs/heads/develop
erpnext/stock/doctype/material_request/test_material_request.py
13
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt from __future__ import unicode_literals import frappe, unittest from frappe.utils import fl...
cirosantilli/sulley
refs/heads/master
unit_tests/legos.py
6
from sulley import * def run (): tag() ndr_string() ber() # clear out the requests. blocks.REQUESTS = {} blocks.CURRENT = None ######################################################################################################################## def tag (): s_initialize("UNIT TEST TAG...
auto-mat/klub
refs/heads/diakonie
apps/aklub/tests/test_mailing.py
1
# -*- coding: utf-8 -*- # Author: Petr Dlouhý <petr.dlouhy@auto-mat.cz> # # Copyright (C) 2017 o.s. Auto*Mat # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, o...
shakamunyi/neutron-dvr
refs/heads/master
neutron/db/migration/alembic_migrations/versions/5a875d0e5c_ryu.py
8
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
manashmndl/dfvfs
refs/heads/master
tests/file_io/vhdi_file_io.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the file-like object implementation using pyvhdi.""" import os import unittest from dfvfs.path import os_path_spec from dfvfs.path import vhdi_path_spec from tests.file_io import test_lib class VhdiFileTest(test_lib.ImageFileTestCase): """The unit test for th...
rahul67/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/conf/locale/nl/__init__.py
12133432
daoluan/decode-Django
refs/heads/master
Django-1.5.1/django/contrib/localflavor/tr/__init__.py
12133432
turbio/haveijackedit
refs/heads/master
index/data_uri.py
1
import mimetypes import re import urllib import base64 MIMETYPE_REGEX = r'[\w]+\/[\w\-\+\.]+' _MIMETYPE_RE = re.compile('^{}$'.format(MIMETYPE_REGEX)) CHARSET_REGEX = r'[\w\-\+\.]+' _CHARSET_RE = re.compile('^{}$'.format(CHARSET_REGEX)) DATA_URI_REGEX = ( r'data:' + r'(?P<mimetype>{})?'.format(MIMETYPE_REGE...
datapythonista/pandas
refs/heads/master
pandas/tests/frame/methods/test_matmul.py
4
import operator import numpy as np import pytest from pandas import ( DataFrame, Index, Series, ) import pandas._testing as tm class TestMatMul: def test_matmul(self): # matmul test is for GH#10259 a = DataFrame( np.random.randn(3, 4), index=["a", "b", "c"], columns=["p",...
adversary-org/dodgpg
refs/heads/master
dodgpg/_version.py
1
IN_LONG_VERSION_PY = True # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (build by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter f...
FreeAgent/djangoappengine-starter
refs/heads/master
django/contrib/localflavor/ca/ca_provinces.py
237
""" An alphabetical list of provinces and territories for use as `choices` in a formfield., and a mapping of province misspellings/abbreviations to normalized abbreviations Source: http://www.canada.gc.ca/othergov/prov_e.html This exists in this standalone file so that it's only imported into memory when explici...
nhippenmeyer/django
refs/heads/master
tests/postgres_tests/migrations/0001_setup_extensions.py
310
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations try: from django.contrib.postgres.operations import ( HStoreExtension, UnaccentExtension, ) except ImportError: from django.test import mock HStoreExtension = mock.Mock() UnaccentExtension = mo...
xiandiancloud/edx-platform
refs/heads/master
common/djangoapps/lang_pref/tests/test_middleware.py
54
from django.test import TestCase from django.test.client import RequestFactory from django.contrib.sessions.middleware import SessionMiddleware from lang_pref.middleware import LanguagePreferenceMiddleware from user_api.models import UserPreference from lang_pref import LANGUAGE_KEY from student.tests.factories import...
infinidb/autooam
refs/heads/master
vagrant/makebox.py
1
# Copyright (C) 2014 InfiniDB, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 of # the License. # # This program is distributed in the hope that it will be useful, # but WITHOU...
adieu/allbuttonspressed
refs/heads/master
docutils/writers/manpage.py
6
# -*- coding: utf-8 -*- # $Id: manpage.py 7048 2011-06-04 12:35:19Z grubert $ # Author: Engelbert Gruber <grubert@users.sourceforge.net> # Copyright: This module is put into the public domain. """ Simple man page writer for reStructuredText. Man pages (short for "manual pages") contain system documentation on unix-li...
imranyousuf/project-kappa
refs/heads/master
code/utils/tests/test_pre.py
10
# import numpy as np # import nibabel as nib # import matplotlib.pyplot as plt # import os # import diagnostics as dg