repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
antsmc2/mics
refs/heads/master
celeryconfig.py
1
import sys from django.core.management import setup_environ from mics import settings setup_environ(settings) ## Broker settings. BROKER_URL = "amqp://guest:guest@localhost:5672//" CELERY_RESULT_BACKEND = "amqp" # List of modules to import when celery starts. CELERY_IMPORTS = ("survey.tasks", ) if ('test' in sys.a...
SaganBolliger/nupic
refs/heads/master
external/linux32/lib/python2.6/site-packages/matplotlib/mpl.py
75
from matplotlib import artist from matplotlib import axis from matplotlib import axes from matplotlib import cbook from matplotlib import collections from matplotlib import colors from matplotlib import colorbar from matplotlib import contour from matplotlib import dates from matplotlib import figure from matplotlib im...
OpenGain/OpenGain
refs/heads/master
default_set/tickets/models.py
2
from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ class Ticket(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('Пользователь'), related_name='tickets', null=True, blank=False, default=...
beni55/edx-platform
refs/heads/master
common/djangoapps/cache_toolbox/__init__.py
261
""" :mod:`cache_toolbox` --- Non-magical object caching tools for Django ==================================================================== Introduction ------------ ``cache_toolbox`` is intended to be a lightweight series of independent tools to leverage caching within Django projects. The tools are deliberately ...
chokribr/inveniotest
refs/heads/master
modules/webauthorlist/lib/authorlist_webinterface.py
18
## This file is part of Invenio. ## Copyright (C) 2011, 2012, 2013 CERN. ## ## Invenio 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, or (at your option) any later versio...
thoreg/satchmo
refs/heads/master
satchmo/apps/payment/modules/trustcommerce/views.py
12
from livesettings import config_get_group from payment.views import confirm, payship def pay_ship_info(request): return payship.credit_pay_ship_info(request, config_get_group('PAYMENT_TRUSTCOMMERCE')) def confirm_info(request): return confirm.credit_confirm_info(request, config_get_group('PAYMENT_TRUS...
efoley/deep-learning
refs/heads/master
weight-initialization/helper.py
153
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf def hist_dist(title, distribution_tensor, hist_range=(-4, 4)): """ Display histogram of a TF distribution """ with tf.Session() as sess: values = sess.run(distribution_tensor) plt.title(title) plt.hist(values, ...
ly0/pycrawler
refs/heads/master
full_test.py
1
from crawler.task import BaseTask from tornado import ioloop class TestTask(BaseTask): pass print TestTask._db task = TestTask() task.save({"id": 123, "data": "haha"}) ioloop.IOLoop.instance().start()
Distrotech/bzr
refs/heads/distrotech-bzr
bzrlib/tests/blackbox/test_ignored.py
2
# Copyright (C) 2006, 2009, 2010 Canonical Ltd # # 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, or # (at your option) any later version. # # This program is dis...
mnahm5/django-estore
refs/heads/master
Lib/site-packages/botocore/handlers.py
2
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
ogenstad/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_local_user_manager.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, IBM Corp # Author(s): Andreas Nafpliotis <nafpliot@de.ibm.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...
castaway2000/EthOS-Dashboard
refs/heads/master
main/__init__.py
12133432
marc-sensenich/ansible
refs/heads/devel
lib/ansible/module_utils/network/common/__init__.py
12133432
bd339/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/testing/python/raises.py
171
import pytest class TestRaises: def test_raises(self): source = "int('qwe')" excinfo = pytest.raises(ValueError, source) code = excinfo.traceback[-1].frame.code s = str(code.fullsource) assert s == source def test_raises_exec(self): pytest.raises(ValueError, "a,...
ByteInternet/libcloud
refs/heads/byte
docs/examples/compute/cloudframes/auth_url.py
63
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver CloudFrames = get_driver(Provider.CLOUDFRAMES) driver = CloudFrames(url='http://admin:admin@cloudframes:80/appserver/xmlrpc')
apporc/neutron
refs/heads/master
neutron/tests/unit/db/test_migration.py
3
# Copyright 2012 New Dream Network, LLC (DreamHost) # 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 # # ...
coreos/autotest
refs/heads/master
frontend/shared/common.py
20
import os, sys try: import autotest.client.setup_modules as setup_modules dirname = os.path.dirname(setup_modules.__file__) autotest_dir = os.path.join(dirname, "..") except ImportError: dirname = os.path.dirname(sys.modules[__name__].__file__) autotest_dir = os.path.abspath(os.path.join(dirname, '....
radekstepan/FlaskBudget
refs/heads/master
db/database.py
1
#!/usr/bin/python # -*- coding: utf -*- # orm from sqlalchemy.engine import create_engine from sqlalchemy.orm import scoped_session, create_session from sqlalchemy.ext.declarative import declarative_base engine = None # autoflush=False will not update items in a database before query call # autocommit=False leaves se...
apporc/neutron
refs/heads/master
neutron/db/sqlalchemyutils.py
1
# Copyright 2011 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 req...
scorphus/django
refs/heads/master
django/contrib/staticfiles/utils.py
248
import fnmatch import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured def matches_patterns(path, patterns=None): """ Return True or False depending on whether the ``path`` should be ignored (if it matches any pattern in ``ignore_patterns``). """ if patt...
2mny/mylar
refs/heads/master
Mylar.py
1
#!/usr/bin/env python # This file is part of Mylar. # # Mylar 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. # # Mylar is distri...
nuobit/website
refs/heads/8.0
website_cookie_notice/controllers/main.py
13
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com> # Copyright (C) 2015 Antiun Ingeniería S.L. <http://antiun....
pseudonym117/Riot-Watcher
refs/heads/master
tests/Handlers/test_DictionaryDeserializer.py
1
import json import pytest from riotwatcher.Handlers import DictionaryDeserializer @pytest.mark.unit class TestDictionaryDeserializer: def test_basic_json(self): deserializer = DictionaryDeserializer() expected = { "test": {"object": "type", "int": 1}, "bool": True, ...
kundan92/p2pool-dash
refs/heads/master
wstools/tests/test_t1.py
308
############################################################################ # Joshua R. Boverhof, David W. Robertson, LBNL # See LBNLCopyright for copyright notice! ########################################################################### import unittest import test_wsdl import utils def makeTestSuite(): suite ...
rande/python-element
refs/heads/master
element/plugins/seo/di.py
1
# # Copyright 2014 Thomas Rabaix <thomas.rabaix@gmail.com> # # 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...
cdcarter/CumulusCI
refs/heads/master
cumulusci/tasks/tests/test_salesforce.py
2
import unittest from mock import MagicMock from mock import patch import responses from cumulusci.core.config import BaseGlobalConfig from cumulusci.core.config import BaseProjectConfig from cumulusci.core.config import ConnectedAppOAuthConfig from cumulusci.core.config import OrgConfig from cumulusci.core.config imp...
intuinno/vistalk
refs/heads/master
carson/admin.py
1
from django.contrib import admin from carson.models import Account, Tag, Tweet from carson.utils import lookup_twitter_ids class AccountAdmin(admin.ModelAdmin): list_display = ["twitter_username", "twitter_id"] actions = ['populate_twitter_ids'] def populate_twitter_ids(self, request, queryset): u...
cjaymes/expatriate
refs/heads/master
src/expatriate/model/types.py
1
# Copyright 2016 Casey Jaymes # This file is part of Expatriate. # # Expatriate 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 the License, or # (at your option) any later version....
brijeshkesariya/odoo
refs/heads/8.0
addons/website_twitter/controllers/main.py
355
from openerp.addons.web import http from openerp.addons.web.http import request from openerp.tools.translate import _ import json class Twitter(http.Controller): @http.route(['/twitter_reload'], type='json', auth="user", website=True) def twitter_reload(self): return request.website.fetch_favorite_twe...
gkotton/neutron
refs/heads/master
neutron/services/__init__.py
12133432
sedden/pkg-python-django-rcsfield
refs/heads/ubuntu-jaunty
rcs/__init__.py
12133432
junneyang/taskflow
refs/heads/master
taskflow/types/__init__.py
12133432
kannu1994/sgs2_kernel
refs/heads/master
Documentation/target/tcm_mod_builder.py
3119
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
lingmann/dcos
refs/heads/master
packages/dcos-integration-test/extra/test_ucr.py
3
import uuid def test_if_ucr_app_can_be_deployed_with_image_whiteout(dcos_api_session): """Marathon app deployment integration test using the Mesos Containerizer. This test verifies that a marathon ucr app can execute a docker image with whiteout files. Whiteouts are files with a special meaning for t...
blrm/openshift-tools
refs/heads/stg
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/lib_openshift/src/lib/serviceaccount.py
84
# pylint: skip-file # flake8: noqa class ServiceAccountConfig(object): '''Service account config class This class stores the options and returns a default service account ''' # pylint: disable=too-many-arguments def __init__(self, sname, namespace, kubeconfig, secrets=None, image_pull_secrets=...
theheros/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/ctypes/macholib/dylib.py
8
""" Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) """) def dylib_info(filename): """ A dylib name ...
wlerin/streamlink
refs/heads/master
src/streamlink/plugins/viasat.py
5
import re from streamlink import NoStreamsError from streamlink.exceptions import PluginError from streamlink.plugin import Plugin from streamlink.plugin.api import StreamMapper, validate from streamlink.stream import HDSStream, HLSStream, RTMPStream from streamlink.utils import rtmpparse STREAM_API_URL = "https://pl...
alikins/ansible
refs/heads/devel
lib/ansible/modules/database/misc/__init__.py
12133432
knifenomad/django
refs/heads/master
tests/model_options/models/__init__.py
12133432
PhonologicalCorpusTools/PyAnnotationGraph
refs/heads/master
polyglotdb/acoustics/pitch/helper.py
3
from conch.analysis.pitch import ReaperPitchTrackFunction, PraatSegmentPitchTrackFunction, PitchTrackFunction def generate_pitch_function(algorithm, min_pitch, max_pitch, path=None, kwargs=None): time_step = 0.01 if algorithm == 'reaper': pitch_function = ReaperPitchTrackFunction(reaper_path=path, min...
postla/e2-gui
refs/heads/master
lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py
1
from Screens.Wizard import wizardManager, WizardSummary from Screens.WizardLanguage import WizardLanguage from Screens.Rc import Rc from Screens.MessageBox import MessageBox from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap from Components.Sources.Boolean import Boolean from Components.Network import iNet...
alathers/projecteuler
refs/heads/master
102/102.py
12133432
SEL-Columbia/commcare-hq
refs/heads/master
corehq/apps/hqadmin/system_info/__init__.py
12133432
mmnelemane/neutron
refs/heads/master
neutron/core_extensions/__init__.py
12133432
canvasnetworks/canvas
refs/heads/master
common/boto/mturk/test/__init__.py
12133432
Bismarrck/tensorflow
refs/heads/master
tensorflow/python/training/proximal_gradient_descent_test.py
22
# 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...
ltilve/chromium
refs/heads/igalia-sidebar
tools/code_coverage/croc_test.py
178
#!/usr/bin/env python # Copyright (c) 2011 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. """Unit tests for Crocodile.""" import os import StringIO import unittest import croc class TestCoverageStats(unittest.TestCase)...
clearlinux/autospec
refs/heads/master
autospec/license.py
1
#!/bin/true # # license.py - part of autospec # Copyright (C) 2015 Intel Corporation # # 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 ...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py
1
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class AngularAxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.polar" _path_str = "layout.polar.angularaxis" _valid_props = { "categ...
VitalPet/odoo
refs/heads/7.0
history/migrate/3.3.0-3.4.0/pre.py
52
# -*- 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...
kans/birgo
refs/heads/master
tools/gyp/test/mac/gyptest-copy-dylib.py
349
#!/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 that dylibs can be copied into app bundles. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.Test...
senarvi/theanolm
refs/heads/master
recipes/common/ngramcounts.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # A Python class that stores n-gram counts. import sys class NGramCounts: def __init__(self): self.__counts = dict() def __contains__(self, ngram): return ngram in self.__counts def __getitem__(self, ngram): return self.__counts[ngram] def read(self, in...
j831/zulip
refs/heads/master
zerver/migrations/0037_disallow_null_string_id.py
29
# -*- coding: utf-8 -*- from __future__ import unicode_literals from six.moves import range from django.db.utils import IntegrityError from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db import migrations, models def set_strin...
rrampage/rethinkdb
refs/heads/next
external/gtest_1.6.0/test/gtest_color_test.py
3259
#!/usr/bin/env python # # Copyright 2008, 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...
neoascetic/django-filer
refs/heads/develop
filer/tests/__init__.py
7
#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.fields import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import *
kanagasabapathi/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/test_context.py
81
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # from twisted.trial.unittest import TestCase from twisted.python import context class ContextTest(TestCase): def testBasicContext(self): self.assertEquals(context.get("x"), None) self.assertEquals(context.call({"...
bokjk/nomadgram
refs/heads/master
nomadgram/images/apps.py
3
from django.apps import AppConfig class ImagesConfig(AppConfig): name = 'nomadgram.images'
GrandpaCardigan/LearnPython
refs/heads/master
exl.py
9
print "Hello World!" print "Hello Again" print "I like typing this." print "This is fun." print 'Yay! Printing.' print "I'd much rather you 'not'." print 'I "said" do not touch this.'
haeusser/tensorflow
refs/heads/master
tensorflow/contrib/tensor_forest/python/__init__.py
69
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
havencruise/django-utils
refs/heads/master
templatetags/fieldset_form.py
1
from django import template register = template.Library() @register.filter('get_form_field') def get_form_field(form, field): return form[field] @register.inclusion_tag('form_as_fieldset.html') def form_as_fieldset_fields(form, fieldsets=None): """ Render the form as a fieldset form. Example usage ...
mozman/ezdxf
refs/heads/master
examples/addons/menger_sponge.py
1
# Copyright (c) 2018-2020 Manfred Moitzi # License: MIT License from pathlib import Path from time import perf_counter import ezdxf from ezdxf.addons import MengerSponge DIR = Path('~/Desktop/Outbox').expanduser() def write(filename, sponge, merge=False): doc = ezdxf.new('R2000') doc.set_modelspace_vport(3) ...
timothydmorton/bokeh
refs/heads/master
bokeh/models/axes.py
33
""" Guide renderers for various kinds of axes that can be added to Bokeh plots """ from __future__ import absolute_import from ..properties import Int, Float, String, Enum, Bool, Datetime, Auto, Instance, Tuple, Either, Include from ..mixins import LineProps, TextProps from ..enums import Location from .renderers im...
hayderimran7/tempest
refs/heads/master
tempest/common/utils/file_utils.py
100
# 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...
poojavade/Genomics_Docker
refs/heads/master
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/nose-1.3.0-py2.7.egg/nose/exc.py
108
"""Exceptions for marking tests as skipped or deprecated. This module exists to provide backwards compatibility with previous versions of nose where skipped and deprecated tests were core functionality, rather than being provided by plugins. It may be removed in a future release. """ from nose.plugins.skip import Skip...
apache/airflow
refs/heads/main
airflow/providers/apache/livy/example_dags/__init__.py
4185
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
brandond/ansible
refs/heads/devel
lib/ansible/modules/network/checkpoint/checkpoint_access_rule.py
7
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
nongxiaoming/rt-thread
refs/heads/master
bsp/lm3s9b9x/rtconfig.py
18
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL = 'keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') #device options PART_TYPE = 'PART_LM3S9B96' if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' elif CROSS_TOOL == 'kei...
GeosoftInc/gxapi
refs/heads/master
spec/core/REG.py
1
from .. import Availability, Class, Constant, Define, Method, Parameter, Type gx_class = Class('REG', doc=""" The :class:`REG` class is used for storing and retrieving named variables. Many classes contain :class:`REG` objects for storing information ...
pigmej/uwsgi_no_pp
refs/heads/master
contrib/spoolqueue/tasks.py
21
from tasksconsumer import queueconsumer @queueconsumer('fast', 4) def fast_queue(arguments): print "fast", arguments @queueconsumer('slow') def slow_queue(arguments): print "foobar", arguments
janezkranjc/clowdflows
refs/heads/master
workflows/visualization_views.py
5
import sys from django.shortcuts import render from django.http import Http404, HttpResponse from workflows import module_importer def setattr_local(name, value, package): setattr(sys.modules[__name__], name, value) module_importer.import_all_packages_libs("visualization_views",setattr_local) def odt_to_...
gautamkrishnar/hatter
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py
315
def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ if hasattr(obj, 'fp'): # Object is a container for another file-like object that gets released # on exhaustion (e.g. HTTPResponse) return obj....
noroutine/ansible
refs/heads/devel
test/units/modules/cloud/amazon/test_api_gateway.py
45
# # (c) 2016 Michael De La Rue # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible...
mozilla/pontoon
refs/heads/master
pontoon/homepage/migrations/0002_initial_data.py
2
# Generated by Django 3.1.3 on 2021-02-25 23:53 from django.db import migrations from pathlib import Path def get_homepage_content(): module_dir = Path(__file__).parent.parent file_path = module_dir / "templates/homepage_content.html" return file_path.read_text() def create_homepage_entry(apps, schema_...
ic-hep/DIRAC
refs/heads/rel-v6r15
tests/Workflow/Integration/__init__.py
12133432
UniMOOC/gcb-new-module
refs/heads/master
modules/announcements/__init__.py
12133432
jazkarta/edx-platform-for-isc
refs/heads/backport-auto-certification
lms/djangoapps/psychometrics/__init__.py
12133432
wojciechtanski/robotframework
refs/heads/master
atest/testdata/test_libraries/as_listener/suite_listenerlibrary.py
29
from listenerlibrary import listenerlibrary class suite_listenerlibrary(listenerlibrary): ROBOT_LIBRARY_SCOPE = "TEST SUITE"
Crashfreak/maproulette
refs/heads/master
maproulette/api/__init__.py
1
from maproulette import app from flask.ext.restful import reqparse, fields, marshal, \ marshal_with, Api, Resource, abort from flask.ext.restful.fields import Raw from flask.ext.restful.utils import cors from flask import session, request, url_for from maproulette.helpers import get_random_task,\ get_challenge_...
kenshay/ImageScript
refs/heads/master
Script_Runner/PYTHON/Tools/scripts/nm2def.py
15
#! /usr/bin/env python3 """nm2def.py Helpers to extract symbols from Unix libs and auto-generate Windows definition files from them. Depends on nm(1). Tested on Linux and Solaris only (-p option to nm is for Solaris only). By Marc-Andre Lemburg, Aug 1998. Additional notes: the output of nm is supposed to look like t...
eugene1g/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/releasepatch.py
121
# Copyright (C) 2013 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 the ...
risicle/django
refs/heads/master
tests/template_tests/tests.py
183
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.contrib.auth.models import Group from django.core import urlresolvers from django.template import Context, Engine, TemplateSyntaxError from django.template.base import UNKNOWN_SOURCE from django.test import SimpleTestCase, override...
dmitriy0611/django
refs/heads/master
tests/conditional_processing/tests.py
322
# -*- coding:utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.test import SimpleTestCase, override_settings FULL_RESPONSE = 'Test conditional get response' LAST_MODIFIED = datetime(2007, 10, 21, 23, 21, 47) LAST_MODIFIED_STR = 'Sun, 21 Oct 2007 23:21:47 GMT' LAST_MODIFIED_N...
brian-brazil/client_python
refs/heads/master
tests/test_client.py
1
import unittest from prometheus_client import Gauge, Counter, Summary from prometheus_client import CollectorRegistry, generate_latest class TestCounter(unittest.TestCase): def setUp(self): self.registry = CollectorRegistry() self.counter = Counter('c', 'help', registry=self.registry) def test_increment(...
xuleiboy1234/autoTitle
refs/heads/master
tensorflow/tensorflow/python/debug/lib/debug_utils.py
79
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
madzak/python-json-logger
refs/heads/master
src/pythonjsonlogger/jsonlogger.py
1
''' This library is provided to allow standard python logging to output log data as JSON formatted strings ''' import logging import json import re from datetime import date, datetime, time, timezone import traceback import importlib from inspect import istraceback from collections import OrderedDict # skip natural ...
cmezh/PokemonGo-Bot
refs/heads/dev
pokemongo_bot/cell_workers/sniper.py
1
from __future__ import unicode_literals import time import json import requests import calendar import difflib import hashlib from random import uniform from operator import itemgetter, methodcaller from datetime import datetime from pokemongo_bot import inventory from pokemongo_bot.item_list import Item from pokemon...
voostar/pdfmergeWEB
refs/heads/master
webpage/forms.py
1
#-*- coding:UTF-8 -*- # init forms from django import forms from django.forms import fields, models, formsets, widgets from django.forms.models import modelformset_factory class UploadFileForm(forms.Form): file = forms.FileField(required=True) UploadFileFormset = formsets.formset_factory( UploadFileForm, e...
svn2github/kgyp
refs/heads/master
test/mac/gyptest-deployment-target.py
246
#!/usr/bin/env python # Copyright (c) 2013 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 that MACOSX_DEPLOYMENT_TARGET works. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.TestGyp(for...
marionleborgne/nupic.research
refs/heads/master
projects/sequence_prediction/mackey_glass/generate_line.py
13
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
JingJunYin/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/layers/pooling.py
10
# 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...
blackye/luscan-devel
refs/heads/master
thirdparty_libs/nltk/treetransforms.py
12
# Natural Language Toolkit: Tree Transformations # # Copyright (C) 2005-2007 Oregon Graduate Institute # Author: Nathan Bodenstab <bodenstab@cslu.ogi.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ A collection of methods for tree (grammar) transformations used in parsing natural lang...
rzhxeo/youtube-dl
refs/heads/master
youtube_dl/extractor/exfm.py
165
from __future__ import unicode_literals import re from .common import InfoExtractor class ExfmIE(InfoExtractor): IE_NAME = 'exfm' IE_DESC = 'ex.fm' _VALID_URL = r'http://(?:www\.)?ex\.fm/song/(?P<id>[^/]+)' _SOUNDCLOUD_URL = r'http://(?:www\.)?api\.soundcloud\.com/tracks/([^/]+)/stream' _TESTS =...
savoirfairelinux/OpenUpgrade
refs/heads/master
addons/account_voucher/__openerp__.py
45
# -*- 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...
lombritz/odoo
refs/heads/8.0
addons/email_template/res_partner.py
432
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
williamlaycraft/SneakyMail
refs/heads/master
sneakyMail.py
1
#!/usr/bin/python import argparse import sys import time from msgHandler import * from frameHandler import * def getArgs(): parser = argparse.ArgumentParser(prog="SneakyMail") parser.add_argument("-p", "--port", default="80", type=str, help="sending and receiving, the port to use, must match") parser.add_...
jacknjzhou/neutron
refs/heads/master
doc/source/conf.py
60
# -*- coding: utf-8 -*- # Copyright (c) 2010 OpenStack Foundation. # # 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...
N9dZ/LearnCodeTheHardWay
refs/heads/master
ex8.py
1
import time # One format formatter = "%r %r %r %r" print formatter % (1, 2, 3, 4) # single and double quotation mark both turn into single one print formatter % ('one', "two", "three", "four") print formatter % (True, False, False, True) print formatter % (formatter, formatter, formatter, formatter) # the elements are...
redhat-cip/tempest
refs/heads/master
tempest/api/object_storage/test_container_sync.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...
modocache/pyhoe
refs/heads/develop
pyhoe/sow/templates/package/PROJECT_NAME/__init__.py
1
#!/usr/bin/env python VERSION = (0, 0, 1, 'alpha', 1) def get_version(version=None): """ Derives a PEP386-compliant verison number from VERSION. """ if version is None: version = VERSION assert len(version) == 5 assert version[3] in ("alpha", "beta", "rc", "final") parts = 2 i...
iEngage/python-sdk
refs/heads/master
test/test_ner.py
1
# coding: utf-8 """ Stakeholder engagement API This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers. OpenAPI spec version: 1.0 Generated by: https://github.com/swagger...