repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Universal-Model-Converter/UMC3.0a
refs/heads/master
data/Python/x86/Lib/site-packages/scipy/weave/examples/vq.py
3
""" """ from __future__ import absolute_import, print_function # C:\home\ej\wrk\scipy\weave\examples>python vq.py # vq with 1000 observation, 10 features and 30 codes fo 100 iterations # speed in python: 0.150119999647 # [25 29] [ 2.49147266 3.83021032] # speed in standard c: 0.00710999965668 # [25 29] [ 2.49147266...
mcanthony/rethinkdb
refs/heads/next
test/rql_test/connections/http_support/werkzeug/http.py
147
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
jeffreylu9/django-cms
refs/heads/wlsite
cms/test_utils/project/emailuserapp/migrations/0001_initial.py
43
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.CreateModel( name='EmailUser', ...
flotre/sickbeard-vfvo
refs/heads/master
lib/jsonrpclib/__init__.py
77
from config import Config config = Config.instance() from history import History history = History.instance() from jsonrpc import Server, MultiCall, Fault from jsonrpc import ProtocolError, loads, dumps
lmanzurv/url_ofbuscate
refs/heads/master
tests/settings.py
1
# -*- coding: utf-8 -*- import sys, os sys.path.append(os.path.dirname(os.path.dirname(__file__))) DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', # Or path to database fi...
gerardroche/Vintageous
refs/heads/master
tests/commands/test__vi_underscore.py
3
from collections import namedtuple from Vintageous.tests import ViewTest from Vintageous.vi.utils import modes test_data = namedtuple('test_data', 'text startRegion mode count expectedRegion msg') NORMAL_CASES = ( test_data(' 2a4', (3, 3), modes.NORMAL, 1, (2, 2), 'Move to first non-space left'), test_data(...
miipl-naveen/optibizz
refs/heads/master
addons/crm/wizard/crm_merge_opportunities.py
333
############################################################################## # # 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 Affero General Public L...
upliftaero/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/doc/howtofind.py
100
""" ================= How to Find Stuff ================= How to find things in NumPy. """
XuezheMax/NeuroNLP2
refs/heads/master
neuronlp2/models/__init__.py
1
__author__ = 'max' from neuronlp2.models.sequence_labeling import * from .parsing import DeepBiAffine, NeuroMST, StackPtrNet
shaobozi/googletest
refs/heads/master
test/gtest_throw_on_failure_test.py
2917
#!/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...
ogenstad/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py
7
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 ANS...
evidation-health/bokeh
refs/heads/master
examples/plotting/server/bollinger.py
42
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot import numpy as np from bokeh.plotting import figure, show, output_server # Define Bollinger Bands. upperband = np.random.random_integers(100, 150, size=100) lowerband = upperband - 100 x_data = np.arange(1, 101) # Bollinger shad...
zxingz/nba
refs/heads/master
script/nbaLoading.py
1
#!./../../tools/python/bin/python import os import sys import json import sqlite3 class nbaLoading: # initialize the telegram bot and logger def __init__(self): # initializing environment sys.path.append('../../common/script') import initEnv print(__file__) self.logge...
jzoldak/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/tests/test_views.py
13
""" Test the views served by third_party_auth. """ import ddt from lxml import etree from onelogin.saml2.errors import OneLogin_Saml2_Error import unittest from django.conf import settings from .testutil import AUTH_FEATURE_ENABLED, SAMLTestCase # Define some XML namespaces: from third_party_auth.tasks import SAML_...
msegado/edx-platform
refs/heads/master
lms/djangoapps/course_structure_api/v0/views.py
23
""" API implementation for course-oriented interactions. """ from collections import namedtuple import json import logging from django.conf import settings from django.http import Http404 from rest_framework.authentication import SessionAuthentication from rest_framework_oauth.authentication import OAuth2Authenticati...
mindbender-studio/setup
refs/heads/master
bin/windows/python36/Lib/site-packages/PyQt5/uic/widget-plugins/qtwebkit.py
12
############################################################################# ## ## Copyright (C) 2014 Riverbank Computing Limited. ## Copyright (C) 2006 Thorsten Marek. ## All right reserved. ## ## This file is part of PyQt. ## ## You may use this file under the terms of the GPL v2 or the revised BSD ## license as fol...
alexthered/kienhoc-platform
refs/heads/master
lms/djangoapps/branding/tests/test_page.py
61
""" Tests for branding page """ import datetime from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.http import HttpResponseRedirect from django.test.utils import override_settings from django.test.client import RequestFactory from pytz import UTC from mock import patch,...
phase-dev/phase
refs/heads/master
libmproxy/encoding.py
2
""" Utility functions for decoding response bodies. """ import cStringIO import gzip, zlib __ALL__ = ["ENCODINGS"] ENCODINGS = set(["identity", "gzip", "deflate"]) def decode(e, content): encoding_map = { "identity": identity, "gzip": decode_gzip, "deflate": decode_deflate, } ...
BeiLuoShiMen/nupic
refs/heads/master
examples/opf/tools/sp_plotter.py
34
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
FrodeSolheim/fs-uae-launcher
refs/heads/master
launcher/components/UpdatesAvailablePanel.py
1
from fswidgets.button import Button from fswidgets.decorators import constructor from fswidgets.flexcontainer import FlexContainer from fswidgets.overrides import overrides from fswidgets.style import Style from fswidgets.text import Text from fswidgets.widget import Widget from launcher.context import useTranslation f...
fxia22/ASM_xf
refs/heads/master
PythonD/lib/python2.4/distutils/dep_util.py
4
"""distutils.dep_util Utility functions for simple, timestamp-based dependency of files and groups of files; also, function based entirely on such timestamp dependency analysis.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: dep_util.py,v 1.7 2004/11/10 22:23:14 loewis Exp $" impor...
joariasl/odoo
refs/heads/8.0
addons/hr_payroll/report/report_payslip_details.py
322
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
joshuajan/odoo
refs/heads/master
addons/report_webkit/company.py
431
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
guillermooo/dart-sublime-bundle-releases
refs/heads/master
sublime_plugin_lib/filter.py
1
# Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details. # All rights reserved. Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file.) from subprocess import Popen from subprocess import PIPE from subprocess import TimeoutExpired import threa...
jk1/intellij-community
refs/heads/master
python/testData/optimizeImports/joinFromImportsIgnoresStarImports.py
35
from module import _hidden2 from module import * from module import _hidden1 print(_hidden1, _hidden2)
evast/XNATImageViewer
refs/heads/master
src/main/scripts/viewer/X/lib/selenium/selenium/webdriver/common/proxy.py
30
class ProxyTypeFactory: @staticmethod def make(ff_value, string): return {'ff_value': ff_value, 'string': string} class ProxyType: DIRECT = ProxyTypeFactory.make(0, 'DIRECT') # Direct connection, no proxy (default on Windows). MANUAL = ProxyTypeFactory.make(1, 'MANUAL') # M...
rosmo/ansible
refs/heads/devel
lib/ansible/modules/network/onyx/onyx_mlag_ipl.py
118
#!/usr/bin/python # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
cloudbase/heat2arm
refs/heads/master
heat2arm/translators/networking/__init__.py
1
# Copyright 2015 Cloudbase Solutions Srl # 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 r...
littlstar/chromium.src
refs/heads/nw
tools/update_reference_build.py
17
#!/usr/bin/env python # # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Updates the Chrome reference builds. To update Chromium (unofficial) reference build, use the -r option and give a Chromium S...
zhjunlang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/utf_8.py
1475
""" Python 'utf-8' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_8_encode def decode(input, errors='strict'): return codecs.utf_8_decode(input, errors, True) class IncrementalEncoder(codecs.In...
ajdawson/numpy
refs/heads/master
numpy/matrixlib/tests/test_regression.py
17
from __future__ import division, absolute_import, print_function from numpy.testing import * import numpy as np rlevel = 1 class TestRegression(TestCase): def test_kron_matrix(self,level=rlevel): """Ticket #71""" x = np.matrix('[1 0; 1 0]') assert_equal(type(np.kron(x, x)), type(x)) ...
samuelmaudo/yepes
refs/heads/master
tests/massupdate/admin.py
1
# -*- coding:utf-8 -*- from __future__ import unicode_literals from yepes import admin from .models import MassUpdateModel class MassUpdateAdmin(admin.ModelAdmin): pass admin.site.register(MassUpdateModel, MassUpdateAdmin)
Arnie97/wiki-bot
refs/heads/master
punctuation.py
1
#!/usr/bin/env python3 from bot import read_config from replace import ReplaceBot class PunctuationBot(ReplaceBot): def _replace(self, page): blacklist = self.blacklist.split('|') original_text = page.text() if page.namespace: # not articles return next(self) elif a...
loco-odoo/localizacion_co
refs/heads/master
openerp/addons-extra/odoo-pruebas/odoo-server/addons/hr_timesheet/__openerp__.py
52
# -*- 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...
Baz2013/blog_demo
refs/heads/master
leetcode/easy/intersection_of_two_arrays.py
1
# -*-coding:utf-8 -*- # Given two arrays, write a function to compute their intersection. # # Example: # Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. # # Note: # Each element in the result must be unique. # The result can be in any order. class Solution(object): def intersection(self, nums1, nums2): ...
NewGlobalStrategy/NetDecisionMaking
refs/heads/master
fts/test_ph2_1registerusr7.py
1
from functional_tests import FunctionalTest, ROOT, USERS import time from selenium.webdriver.support.ui import WebDriverWait class TestRegisterPage (FunctionalTest): def setUp(self): # John opens his browser and goes to the home-page of the tukker app self.url = ROOT + '/default/user/regist...
FlaPer87/django-nonrel
refs/heads/master
tests/regressiontests/views/tests/generic/date_based.py
99
# coding: utf-8 from django.test import TestCase from datetime import datetime, date from datetime import timedelta from regressiontests.views.models import Article, Author, DateArticle class ObjectDetailTest(TestCase): fixtures = ['testdata.json'] def setUp(self): # Correct the date for the current ar...
yencarnacion/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.2/django/contrib/flatpages/tests/urls.py
300
from django.conf.urls.defaults import * # special urls for flatpage test cases urlpatterns = patterns('', (r'^flatpage_root', include('django.contrib.flatpages.urls')), (r'^accounts/', include('django.contrib.auth.urls')), )
jillesme/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py
127
# 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...
kyuridenamida/atcoder-tools
refs/heads/master
atcodertools/fmtprediction/models/format_prediction_result.py
2
from typing import Dict, Optional from atcodertools.fmtprediction.models.format import Format from atcodertools.fmtprediction.models.type import Type from atcodertools.fmtprediction.models.variable import Variable, SimpleVariable class FormatPredictionResult: def __init__(self, format_: Optional[Format[Variable...
Maspear/odoo
refs/heads/8.0
addons/survey/wizard/survey_email_compose_message.py
214
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
gentoo/grss
refs/heads/master
grs/Netboot.py
1
#!/usr/bin/env python # # Netboot.py: this file is part of the GRS suite # Copyright (C) 2017 Anthony G. Basile # # 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...
jasonwzhy/django
refs/heads/master
tests/urlpatterns_reverse/urls_without_full_import.py
452
# A URLs file that doesn't use the default # from django.conf.urls import * # import pattern. from django.conf.urls import url from .views import bad_view, empty_view urlpatterns = [ url(r'^test_view/$', empty_view, name="test_view"), url(r'^bad_view/$', bad_view, name="bad_view"), ]
joopert/home-assistant
refs/heads/dev
tests/components/homekit/test_type_locks.py
7
"""Test different accessory types: Locks.""" import pytest from homeassistant.components.homekit.const import ATTR_VALUE from homeassistant.components.homekit.type_locks import Lock from homeassistant.components.lock import DOMAIN from homeassistant.const import ( ATTR_CODE, ATTR_ENTITY_ID, STATE_LOCKED, ...
Geeglee/scrapy
refs/heads/master
extras/qpsclient.py
135
""" A spider that generate light requests to meassure QPS troughput usage: scrapy runspider qpsclient.py --loglevel=INFO --set RANDOMIZE_DOWNLOAD_DELAY=0 --set CONCURRENT_REQUESTS=50 -a qps=10 -a latency=0.3 """ from scrapy.spiders import Spider from scrapy.http import Request class QPSSpider(Spider): na...
pulkitpagare/Nosql-Exploitation-Framework
refs/heads/master
nosqlframework.py
2
#!/usr/bin/python #NoSQL Exploitation FrameWork Copyright 2015 Francis Alexander #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 ver...
abhishek-ch/hue
refs/heads/master
desktop/core/ext-py/South-1.0.2/south/management/commands/migrationcheck.py
129
from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command, CommandError from django.core.management.base import BaseCommand from django.conf import settings from django.db.models import loading from django.test import simple from south.migration import Migrations from sout...
guyou/viking
refs/heads/master
tools/gctrackbyarc.py
12
#!/usr/bin/env python # WARNING: I haven't thought much about the best way of doing # this. it may get lots of extra caches, or take a long # time if your path goes thru a city. # there's probably a better algorithm. # in meters. maxdist = 2500.0 # get geocaches, circles of "radius", then go ahead advance_dist...
pyblish/pyblish-endpoint
refs/heads/master
pyblish_endpoint/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
2359
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re __version__ = '3.4.0.2' class CertificateError(ValueError): pass def _dnsname_match(dn, host...
pitch-sands/i-MPI
refs/heads/master
flask/Lib/site-packages/sqlalchemy/dialects/oracle/__init__.py
20
# oracle/__init__.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from sqlalchemy.dialects.oracle import base, cx_oracle, zxjdbc base.dialect = cx_o...
avih/treeherder
refs/heads/master
treeherder/perfalert/setup.py
17
from setuptools import setup version = '0.1' setup(name='perfalert', version=version, description="Automated regression detection for performance data", classifiers=[ 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: Mozilla Public...
Gamebasis/3DGamebasisServer
refs/heads/master
GameData/blender-2.71-windows64/2.71/scripts/presets/cloth/silk.py
8
import bpy bpy.context.cloth.settings.quality = 5 bpy.context.cloth.settings.mass = 0.150 bpy.context.cloth.settings.structural_stiffness = 5 bpy.context.cloth.settings.bending_stiffness = 0.05 bpy.context.cloth.settings.spring_damping = 0 bpy.context.cloth.settings.air_damping = 1
mdanielwork/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/simple.after.py
166
def foo(): a = 1<caret> print "fooo"
ligregni/coursera
refs/heads/master
designalgo2/week3/knapsack_top_down.py
1
# Desing and analysis of algorithms - Part 2 # Week 3 import sys class Item: def __init__(self, v, w): self.value = v self.weight = w def solve(n, w, m, items): if n <= 0 or w <= 0: return 0 if (n,w) not in m: m[(n,w)] = max(solve(n-1,w,m,items), (solve(n-1,w-items[n-1].we...
vinchoi/fishplay
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
octavioturra/aritial
refs/heads/master
google_appengine/lib/webob/webob/util/dictmixin.py
35
""" A backport of UserDict.DictMixin for pre-python-2.4 """ __all__ = ['DictMixin'] try: from UserDict import DictMixin except ImportError: class DictMixin: # Mixin defining all dictionary methods for classes that already have # a minimum dictionary interface including getitem, setitem, delitem...
ch1huizong/dj
refs/heads/master
educasite/educa/courses/api/views.py
1
from django.shortcuts import get_object_or_404 from rest_framework import generics from rest_framework import viewsets from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.authentication import BasicAuthentication from rest_framework.permissions import IsAuthenticat...
arista-eosplus/ansible-eos-vxlan
refs/heads/master
filter_plugins/config_block.py
8
# Copyright (c) 2017, Arista Networks, 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 conditio...
nash-x/hws
refs/heads/master
neutron/plugins/ml2/drivers/brocade/mechanism_brocade.py
1
# Copyright 2014 Brocade Communications System, 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 # #...
xuxiao19910803/edx-platform
refs/heads/master
lms/djangoapps/courseware/tests/test_favicon.py
125
from django.conf import settings from django.core.urlresolvers import clear_url_caches, resolve from django.test import TestCase from django.test.utils import override_settings from mock import patch from nose.plugins.attrib import attr import sys @attr('shard_1') class FaviconTestCase(TestCase): def setUp(se...
SportySpice/Collections
refs/heads/master
src/paths/play_collection.py
1
from src.collection import Collection from src.li.ItemPlayList import ItemPlaylist def play(collectionFile): collection = Collection.fromFile(collectionFile) collection.updateDatedSources() playlist = ItemPlaylist() for video in collection.videos: playlist.addVideo(video, collect...
moreati/django
refs/heads/master
tests/test_discovery_sample/doctests.py
471
""" Doctest example from the official Python documentation. https://docs.python.org/3/library/doctest.html """ def factorial(n): """Return the factorial of n, an exact integer >= 0. >>> [factorial(n) for n in range(6)] [1, 1, 2, 6, 24, 120] >>> factorial(30) # doctest: +ELLIPSIS 2652528598121910...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/django-1.3/django/utils/simplejson/tool.py
409
r"""Using simplejson from the shell to validate and pretty-print:: $ echo '{"json":"obj"}' | python -msimplejson.tool { "json": "obj" } $ echo '{ 1.2:3.4}' | python -msimplejson.tool Expecting property name: line 1 column 2 (char 2) """ from django.utils import simplejson def main(): i...
nihilifer/Fedora-Dockerfiles
refs/heads/master
flask/flask-example.py
33
from flask import Flask app = Flask(__name__) @app.route('/') def hello_fedora(): return 'Hello from Fedora!' if __name__ == '__main__': app.run("0.0.0.0")
KitKatXperience/platform_external_chromium_org
refs/heads/kk
chrome/common/extensions/docs/server2/host_file_system_creator.py
23
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from caching_file_system import CachingFileSystem from local_file_system import LocalFileSystem from offline_file_system import OfflineFileSystem from subver...
AnimationMentor/pikatopic
refs/heads/master
examples/recv.py
1
#!/usr/bin/env python import sys, os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../')) from pikatopic import PikaTopic import pikatopic # # this demonstrates setting the default host, which would be kind of an odd case # # pikatopic.DEFAULT_HOST = '172.17.0.2' def handler(routing_key, message, mes...
msingh172/pylearn2
refs/heads/master
pylearn2/datasets/tests/test_ocr.py
43
"""module for testing datasets.ocr""" import unittest import numpy as np from pylearn2.datasets.ocr import OCR from pylearn2.space import Conv2DSpace from pylearn2.testing.skip import skip_if_no_data class TestOCR(unittest.TestCase): """ Unit test of OCR dataset Parameters ---------- None """...
sencha/chromium-spacewalk
refs/heads/master
tools/perf/benchmarks/thread_times.py
6
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from benchmarks import silk_flags from measurements import thread_times import page_sets from telemetry import benchmark class ThreadTimesKeySilkCases(benc...
ruymanengithub/vison
refs/heads/master
vison/scripts/vis_dnl_extract.py
1
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Exploring the histograms of counts in images. Do we have "missing codes" due to larger-than-expected DNL? DNL: Differential Non Linearity This issue was brought to attention of VIS IDT by Ralf Kohley on Jan 10th 2019. :History: Created on Tue Feb 5 09:35:25 2019 ...
paylogic/HTTPretty
refs/heads/master
tests/functional/test_bypass.py
8
# #!/usr/bin/env python # -*- coding: utf-8 -*- # <httpretty - HTTP client mock for Python> # Copyright (C) <2011-2013> Gabriel Falcão <gabriel@nacaolivre.org> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to ...
AlexStarov/Shop
refs/heads/master
applications/discount/migrations/0004_auto_20160505_2146.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import datetime class Migration(migrations.Migration): dependencies = [ ('discount', '0003_auto_20160505_2144'), ] operations = [ migrations.AlterField( model_name='actio...
shft117/SteckerApp
refs/heads/master
erpnext/setup/doctype/brand/test_brand.py
121
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe test_records = frappe.get_test_records('Brand')
GREO/GNU-Radio
refs/heads/master
gr-wxgui/src/python/termsink.py
91
# # Copyright 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
blackzw/openwrt_sdk_dev1
refs/heads/master
staging_dir/host/lib/python2.7/lib2to3/fixes/fix_idioms.py
327
"""Adjust some old Python 2 idioms to their modern counterparts. * Change some type comparisons to isinstance() calls: type(x) == T -> isinstance(x, T) type(x) is T -> isinstance(x, T) type(x) != T -> not isinstance(x, T) type(x) is not T -> not isinstance(x, T) * Change "while 1:" into "while True:"....
cbrune/onie
refs/heads/master
contrib/git-stats/gitdm/reports.py
3
# # A new home for the reporting code. # # This code is part of the LWN git data miner. # # Copyright 2007-13 Eklektix, Inc. # Copyright 2007-13 Jonathan Corbet <corbet@lwn.net> # # This file may be distributed under the terms of the GNU General # Public License, version 2. # import sys Outfile = sys.stdout HTMLfile ...
mxOBS/deb-pkg_trusty_chromium-browser
refs/heads/master
tools/gyp/test/generator-output/gyptest-top-all.py
216
#!/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. """ Verifies building a project hierarchy created when the --generator-output= option is used to put the build configuration files in a sepa...
kumarshivam675/Mobile10X-Hack
refs/heads/master
build/lib.linux-x86_64-2.7/yowsup/layers/axolotl/store/sqlite/litesignedprekeystore.py
39
from axolotl.state.signedprekeystore import SignedPreKeyStore from axolotl.state.signedprekeyrecord import SignedPreKeyRecord from axolotl.invalidkeyidexception import InvalidKeyIdException class LiteSignedPreKeyStore(SignedPreKeyStore): def __init__(self, dbConn): """ :type dbConn: Connection ...
stelligent/ansible-modules-core
refs/heads/devel
cloud/openstack/os_nova_flavor.py
21
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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 late...
google-code/android-scripting
refs/heads/master
python/src/Demo/tkinter/guido/AttrDialog.py
47
# The options of a widget are described by the following attributes # of the Pack and Widget dialogs: # # Dialog.current: {name: value} # -- changes during Widget's lifetime # # Dialog.options: {name: (default, klass)} # -- depends on widget class only # # Dialog.classes: {klass: (v0, v1, v2, ...) | 'boolean' | 'other...
iut-ibk/DynaMind-UrbanSim
refs/heads/master
3rdparty/opus/src/opus_gui/general_manager/models/__init__.py
538
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE
abhiQmar/servo
refs/heads/master
tests/wpt/web-platform-tests/fetch/api/resources/cache.py
106
ETAG = '"123abc"' CONTENT_TYPE = "text/plain" CONTENT = "lorem ipsum dolor sit amet" def main(request, response): # let caching kick in if possible (conditional GET) etag = request.headers.get("If-None-Match", None) if etag == ETAG: response.headers.set("X-HTTP-STATUS", 304) response.statu...
TwoD/ansible
refs/heads/devel
v2/ansible/utils/debug.py
16
import os import time import sys from multiprocessing import Lock from ansible import constants as C global_debug_lock = Lock() def debug(msg): if C.DEFAULT_DEBUG: global_debug_lock.acquire() print("%6d %0.5f: %s" % (os.getpid(), time.time(), msg)) sys.stdout.flush() global_debug_...
vladmm/intellij-community
refs/heads/master
python/testData/refactoring/introduceField/inConstructor.py
83
class B(): def __init__(self): print("some <caret>string")
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/djcelery/tests/test_schedulers.py
4
from __future__ import absolute_import, unicode_literals from datetime import datetime, timedelta from itertools import count from celery.five import monotonic from celery.schedules import schedule, crontab from djcelery import schedulers from djcelery import celery from djcelery.app import app from djcelery.models ...
vv1133/home_web
refs/heads/master
build/lib.linux-armv6l-2.7/django/utils/unittest/util.py
751
"""Various utility functions.""" __unittest = True _MAX_LENGTH = 80 def safe_repr(obj, short=False): try: result = repr(obj) except Exception: result = object.__repr__(obj) if not short or len(result) < _MAX_LENGTH: return result return result[:_MAX_LENGTH] + ' [truncated]...'...
sutartmelson/girder
refs/heads/master
plugins/oauth/plugin_tests/oauth_test.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2014 Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a cop...
geosolutions-it/geonode
refs/heads/master
geonode/people/migrations/0026_auto_20171120_0730.py
6
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('people', '0025_auto_20170924_0932'), ] operations = [ migrations.AddField( model_name='profile', name='language', field=models....
Tinkerforge/brickv
refs/heads/master
src/brickv/plugin_system/plugins/industrial_digital_in_4_v2/__init__.py
1
# -*- coding: utf-8 -*- """ brickv (Brick Viewer) Copyright (C) 2012 Olaf Lüke <olaf@tinkerforge.com> __init__.py: package initialization 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...
darmaa/odoo
refs/heads/master
addons/account_voucher/report/__init__.py
378
# -*- 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...
pjdelport/pip
refs/heads/develop
pip/_vendor/html5lib/treewalkers/etree.py
310
from __future__ import absolute_import, division, unicode_literals try: from collections import OrderedDict except ImportError: try: from ordereddict import OrderedDict except ImportError: OrderedDict = dict import gettext _ = gettext.gettext import re from pip._vendor.six import text_typ...
ftomassetti/intellij-community
refs/heads/master
python/testData/intentions/beforeNegateComparison2.py
83
if b < 3 or a > <caret> b: pass
MER-GROUP/intellij-community
refs/heads/master
python/testData/mover/continueBreak_afterUp.py
83
test() continue for item in range(10): pass test1()
mnahm5/django-estore
refs/heads/master
Lib/site-packages/django/contrib/gis/sitemaps/views.py
82
from __future__ import unicode_literals from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.shortcuts import render_to_kml, render_to_kmz from django.core.exceptions import FieldDoesNotExist from django.db import DEFAULT_DB_ALIAS, connections from django.h...
jbradberry/dxr
refs/heads/master
tests/test_plugins.py
9
"""Tests for the plugin architecture itself""" from nose.tools import ok_ from dxr.plugins import all_plugins import dxr.plugins.urllink as urllink def test_registration(): """Make sure plugins registered via entry points are detected.""" ok_('urllink' in all_plugins().keys()) def test_construction(): ...
tfarina/pdns
refs/heads/master
regression-tests.dnsdist/test_Routing.py
4
#!/usr/bin/env python import threading import time import dns from dnsdisttests import DNSDistTest class TestRoutingPoolRouting(DNSDistTest): _config_template = """ newServer{address="127.0.0.1:%s", pool="real"} addPoolRule("pool.routing.tests.powerdns.com", "real") addAction(makeRule("poolaction.rout...
thomwiggers/httpserver
refs/heads/master
tests/test_selenium.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_selenium ---------------------------------- Tests the http server with a real browser. """ import os import unittest import multiprocessing import time from httpserver import _start_server from selenium import webdriver _host = 'localhost' _ip = '127.0.0.1' _p...
Akylas/CouchPotatoServer
refs/heads/master
libs/subliminal/tasks.py
170
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of...
charybdeBE/Cytomine-core
refs/heads/master
web-app/lib/OpenLayers-2.13.1/tests/selenium/remotecontrol/selenium.py
254
""" Copyright 2006 ThoughtWorks, 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, sof...
rjshade/grpc
refs/heads/master
tools/run_tests/run_stress_tests.py
10
#!/usr/bin/env python2.7 # Copyright 2015, 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 lis...
TheJacksonLaboratory/CloudNeo
refs/heads/master
docs/conf.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # CloudNeo documentation build configuration file, created by # sphinx-quickstart on Mon Mar 13 17:53:38 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...