repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
BarcampBangalore/Barcamp-Bangalore-Android-App
refs/heads/master
gcm_flask/werkzeug/testsuite/wsgi.py
54
# -*- coding: utf-8 -*- """ werkzeug.testsuite.wsgi ~~~~~~~~~~~~~~~~~~~~~~~ Tests the WSGI utilities. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from os import path from cStringIO import StringIO ...
showa-yojyo/bin
refs/heads/master
async/async10gather.py
1
#!/usr/bin/env python """async10gather.py: Use gather Usage: async10gather.py """ import asyncio async def factorial(name, number): f = 1 for i in range(2, number + 1): print(f"Task {name}: Compute factorial({i})...") await asyncio.sleep(1) f *= i print(f"Task {name}: factorial({...
yencarnacion/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.2/tests/modeltests/properties/tests.py
92
from django.test import TestCase from models import Person class PropertyTests(TestCase): def setUp(self): self.a = Person(first_name='John', last_name='Lennon') self.a.save() def test_getter(self): self.assertEqual(self.a.full_name, 'John Lennon') def test_setter(self): ...
dewitt/appengine-markdown
refs/heads/master
markdown/inlinepatterns.py
5
""" INLINE PATTERNS ============================================================================= Inline patterns such as *emphasis* are handled by means of auxiliary objects, one per pattern. Pattern objects must be instances of classes that extend markdown.Pattern. Each pattern object uses a single regular express...
googleapis/googleapis-gen
refs/heads/master
google/appengine/v1/google-cloud-appengine-v1-py/google/cloud/appengine_admin_v1/types/version.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
idpaterson/parsedatetime
refs/heads/master
tests/TestLocaleBase.py
1
# -*- coding: utf-8 -*- """ Test parsing of simple date and times using the French locale Note: requires PyICU """ from __future__ import unicode_literals import sys import time import datetime import pytest import parsedatetime as pdt from parsedatetime.pdt_locales import get_icu from . import utils if sys.version_i...
qbert65536/squall
refs/heads/master
src/test/python/SquallBean.py
2
class SquallBean(): def __init__(self): self.id = 0; self.isDirty = false; def isDirty(self): return self.isDirty;
killbug2004/peinjector
refs/heads/master
pe-injector-interceptor/peinjector_interceptor.py
17
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ Interceptor - reference implementation of a Interceptor based on libmproxy with a connection to a peinjector-server """ __author__ = 'W.L.' from threading import Thread from libmproxy import controller, proxy from libmproxy.proxy.server import ProxyServer from ...
Voluntarynet/BitmessageKit
refs/heads/master
BitmessageKit/Vendor/pybitmessage/class_outgoingSynSender.py
10
import threading import time import random import shared import socks import socket import sys import tr from class_sendDataThread import * from class_receiveDataThread import * # For each stream to which we connect, several outgoingSynSender threads # will exist and will collectively create 8 connections with peers....
adamcharnock/swiftwind
refs/heads/master
swiftwind/costs/migrations/0009_check_disabled_xor_billing_cycle.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-09 12:14 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('costs', '0008_check_cannot_create_recurred_cost_for_disabled_cost'), ] operations = [ ...
ChinaMassClouds/copenstack-server
refs/heads/master
openstack/src/nova-2014.2/nova/api/openstack/compute/contrib/extended_networks.py
95
# Copyright 2014 Nebula, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
danielvdende/incubator-airflow
refs/heads/master
tests/hooks/test_pig_hook.py
14
# -*- coding: utf-8 -*- # # 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 #...
luosch/vinda
refs/heads/master
vinda/__init__.py
1
#!/usr/bin/python # -*- coding:utf-8 -*- __title__ = 'vinda' __version__ = '0.1.0' __author__ = 'Sicheng Luo' __license__ = 'MIT' __copyright__ = 'Copyright 2016 Sicheng Luo' from .vinda import look
aberon10/training
refs/heads/master
training/ticketing_system/apps.py
1
from django.apps import AppConfig class TicketingSystemConfig(AppConfig): name = 'ticketing_system'
lathama/Adynaton
refs/heads/master
adynaton/unittests/test_DomainNameSystemClient.py
1
""" 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 use this ...
jamespacileo/django-france
refs/heads/master
tests/modeltests/one_to_one/tests.py
92
from django.test import TestCase from django.db import transaction, IntegrityError from models import Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel, MultiModel class OneToOneTests(TestCase): def setUp(self): self.p1 = Place(name='Demon Dogs', address='944 W. Fullerton') self.p1.save() ...
sfepy/sfepy
refs/heads/master
tests/test_dg_terms_calls.py
4
# -*- coding: utf-8 -*- """ Test all terms in terms_dg. Performs numerical test on simple mesh. """ import functools import inspect import numpy as nm import numpy.testing as nmts import scipy.sparse as sp from sfepy.base.base import Struct from sfepy.base.testing import TestCommon from sfepy.discrete import DGFieldV...
sklnet/openhdf-enigma2
refs/heads/master
lib/python/Components/Renderer/valioOledInfo.py
2
# -*- coding: utf-8 -*- # # OLED-Info Renderer for Dreambox/Enigma-2 # Version: 1.0 # Coded by Vali (c)2011 # ####################################################################### from enigma import eLabel from Renderer import Renderer from os import popen from time import localtime, strftime fr...
Galexrt/zulip
refs/heads/master
zerver/tests/test_auth_backends.py
2
# -*- coding: utf-8 -*- from django.conf import settings from django.core import mail from django.http import HttpResponse from django.test import override_settings from django_auth_ldap.backend import _LDAPUser from django.contrib.auth import authenticate from django.test.client import RequestFactory from typing impor...
leprikon-cz/leprikon
refs/heads/master
leprikon/views/billing_info.py
1
from django.utils.translation import ugettext_lazy as _ from ..forms.billing_info import BillingInfoForm from ..models.roles import BillingInfo from ..utils import reverse_with_back from .generic import CreateView, DeleteView, ListView, UpdateView class GetQerysetMixin: def get_queryset(self): return sel...
grpc/grpc
refs/heads/master
src/python/grpcio/grpc/framework/foundation/future.py
48
# Copyright 2015 gRPC authors. # # 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...
drawks/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_firewall_rule.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
paplorinc/intellij-community
refs/heads/master
python/testData/inspections/ConvertSingleQuotedDocstring.py
83
def foo(): <weak_warning descr="Triple double-quoted strings should be used for docstrings."><caret>'''</weak_warning>foo first line docstring second line of docstring<weak_warning descr="Triple double-quoted strings should be used for docstrings.">'''</weak_warning> pass
ahuarte47/QGIS
refs/heads/master
python/plugins/db_manager/db_plugins/vlayers/connector.py
19
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Virtual layers plugin for DB Manager Date : December 2015 copyright : (C) 2015 by Hugo Mercier email : hugo dot mercier at oslandia dot com *******...
dturner-tw/pants
refs/heads/master
tests/python/pants_test/backend/python/test_python_chroot.py
2
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sub...
moylop260/odoo-dev
refs/heads/master
addons/website_event/__init__.py
1577
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
godiard/sugar-toolkit-gtk3
refs/heads/master
src/sugar3/presence/activity.py
6
# Copyright (C) 2007, Red Hat, Inc. # Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, ...
gmaxwell/bitcoin
refs/heads/master
test/functional/p2p-compactblocks.py
7
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test compact blocks (BIP 152). Version 1 compact blocks are pre-segwit (txids) Version 2 compact blocks are...
yasoob/youtube-dl-GUI
refs/heads/master
youtube_dl/extractor/cda.py
3
# coding: utf-8 from __future__ import unicode_literals import codecs import re from .common import InfoExtractor from ..compat import ( compat_chr, compat_ord, compat_urllib_parse_unquote, ) from ..utils import ( ExtractorError, float_or_none, int_or_none, merge_dicts, multipart_encod...
cainiaocome/scikit-learn
refs/heads/master
examples/model_selection/plot_validation_curve.py
229
""" ========================== Plotting Validation Curves ========================== In this plot you can see the training scores and validation scores of an SVM for different values of the kernel parameter gamma. For very low values of gamma, you can see that both the training score and the validation score are low. ...
iron-ox/segway_v3
refs/heads/iron-master
segway_ros/src/segway/utils.py
1
"""-------------------------------------------------------------------- COPYRIGHT 2014 Stanley Innovation Inc. Software License Agreement: The software supplied herewith by Stanley Innovation Inc. (the "Company") for its licensed Segway RMP Robotic Platforms is intended and supplied to you, the Company's customer, ...
vveliev/selenium
refs/heads/master
py/test/__init__.py
2454
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
wbsavage/shinken
refs/heads/branch-1.4
shinken/modules/pnp_ui.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can redis...
tmxdyf/CouchPotatoServer
refs/heads/master
libs/sqlalchemy/connectors/mysqldb.py
18
"""Define behaviors common to MySQLdb dialects. Currently includes MySQL and Drizzle. """ from sqlalchemy.connectors import Connector from sqlalchemy.engine import base as engine_base, default from sqlalchemy.sql import operators as sql_operators from sqlalchemy import exc, log, schema, sql, types as sqltypes, util ...
zouyapeng/horizon
refs/heads/stable/juno
openstack_dashboard/dashboards/project/stacks/sro.py
92
# 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, software # distributed under t...
Designist/audacity
refs/heads/master
lib-src/lv2/sord/waflib/Tools/fc_scan.py
183
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import re from waflib import Utils,Task,TaskGen,Logs from waflib.TaskGen import feature,before_method,after_method,extension from waflib.Configure import conf INC_REGEX="""(?:...
DinoCow/airflow
refs/heads/master
airflow/api/common/experimental/delete_dag.py
8
# # 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...
livioc/selenium
refs/heads/master
py/selenium/webdriver/common/touch_actions.py
43
""" The Touch Actions implementation """ from selenium.webdriver.remote.command import Command class TouchActions(object): """ Generate touch actions. Works like ActionChains; actions are stored in the TouchActions object and are fired with perform(). """ def __init__(self, driver): """ ...
mitya57/debian-buildbot
refs/heads/master
buildbot/test/unit/test_util_ansicodes.py
3
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
kaifabian/lana-dashboard
refs/heads/master
lana_dashboard/urls.py
1
"""lana_dashboard URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
ContinuumIO/quepy
refs/heads/master
tests/testapp/dsl.py
9
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2012, Machinalis S.R.L. # This file is part of quepy and is distributed under the Modified BSD License. # You should have received a copy of license in the LICENSE file. # # Authors: Rafael Carrascosa <[email protected]> # Gonzalo Garcia Berrotara...
fullfanta/mxnet
refs/heads/master
tests/python/unittest/test_symbol.py
2
# 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...
CMUSV-VisTrails/WorkflowRecommendation
refs/heads/master
vistrails/core/query/version.py
1
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: [email protected] ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
DenysGurin/projt1
refs/heads/master
projt1/urls.py
1
"""projt1 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
xchenum/quantum
refs/heads/master
quantum/tests/unit/_test_api.py
3
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 ???? # 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/licen...
duhzecca/cinder
refs/heads/master
cinder/tests/unit/fake_vmem_client.py
23
# Copyright 2014 Violin Memory, 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...
double12gzh/nova
refs/heads/master
nova/cells/opts.py
6
# Copyright (c) 2012 Rackspace Hosting # # 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...
orchidinfosys/odoo
refs/heads/master
addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py
47
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import time from openerp.osv import osv from openerp.report import report_sxw class report_hr_salary_employee_bymonth(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(r...
sebschre/cryptoAssetManager
refs/heads/master
fillKrakenDB.py
1
#!/usr/bin/env python3 import sys from QueryPublic import QueryPublicKraken from Trade import Trade, TradeList from DBConnections import KrakenDBConnection from datetime import datetime, timedelta query = QueryPublicKraken() with KrakenDBConnection() as dbconn: try: cursor = dbconn.cursor() curs...
expobrain/python-unotifier
refs/heads/master
unotifier/notifiers/notifysend.py
1
from __future__ import unicode_literals import os from .. import VENDOR_PATH from .abstract import AbstractNotifier class NotifySendNotifier(AbstractNotifier): notifier_cmd = os.path.join(VENDOR_PATH, 'notify-send') def get_cmd_options(self, options): options = self._map_app_icon(options) ...
mikemow/youtube-dl
refs/heads/master
youtube_dl/extractor/sztvhu.py
148
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor class SztvHuIE(InfoExtractor): _VALID_URL = r'http://(?:(?:www\.)?sztv\.hu|www\.tvszombathely\.hu)/(?:[^/]+)/.+-(?P<id>[0-9]+)' _TEST = { 'url': 'http://sztv.hu/hirek/cserkeszek-nepszerusitettek-a-kornye...
home-assistant/home-assistant
refs/heads/dev
homeassistant/components/volvooncall/__init__.py
5
"""Support for Volvo On Call.""" from datetime import timedelta import logging import voluptuous as vol from volvooncall import Connection from homeassistant.const import ( CONF_NAME, CONF_PASSWORD, CONF_REGION, CONF_RESOURCES, CONF_SCAN_INTERVAL, CONF_USERNAME, ) from homeassistant.helpers im...
marksweiss/organize-m
refs/heads/master
test/organizem_test.py
1
import unittest import sys sys.path.insert(0, '..') from lib.item import Item, Elem from lib.organizem import Organizem, Conf from lib.orgm_controller_base import ActionArg TEST_DATA_FILE = "orgm_test.dat" TEST_BAK_FILE = "orgm_test_bak.dat" IS_UNIT_TESTING = True Organizem(TEST_DATA_FILE, IS_UNIT_TESTING).setconf(C...
hujiajie/chromium-crosswalk
refs/heads/master
third_party/closure_linter/closure_linter/checker.py
109
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
sivel/ansible
refs/heads/devel
test/lib/ansible_test/_internal/ci/azp.py
14
"""Support code for working with Azure Pipelines.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import tempfile import uuid from .. import types as t from ..encoding import ( to_bytes, ) from ..config import ( CommonConfig, TestConfig, ) from ..git...
ShaolongHu/Nitrate
refs/heads/develop
tcms/testcases/sqls.py
1
REMOVE_COMPONENT = ''' DELETE FROM test_case_components WHERE case_id = %s AND component_id = %s ''' REMOVE_PLAN = ''' DELETE FROM test_case_plans WHERE plan_id = %s AND case_id = %s ''' REMOVE_TAG = ''' DELETE FROM test_case_tags WHERE case_id = %s AND tag_id = %s ''' REMOVE_BUG = ''' DELETE FROM test_case_bugs WHERE ...
furbrain/Coherence
refs/heads/maintain/0.6.x
coherence/upnp/core/soap_service.py
2
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2007 - Frank Scholz <[email protected]> from twisted.web import server, resource from twisted.python import failure from twisted.internet import defer from coherence import log, SERVER_ID from coherence.extern.et impor...
clumsy/intellij-community
refs/heads/master
python/testData/joinLines/BinaryOp.py
83
a = <caret>1 +\ 2
jamesrobertlloyd/gpss-research
refs/heads/master
experiments/2013-12-16-extrap-GPSS-full.py
4
Experiment(description='Trying latest code on extrapolation task', data_dir='../data/tsdlr_9010/', max_depth=10, random_order=False, k=1, debug=False, local_computation=False, n_rand=9, sd=2, jitter_sd=0.1, ...
s3nk4s/flaskTutorials
refs/heads/master
FlaskApp/FlaskApp/venv/lib/python2.7/encodings/hex_codec.py
528
""" Python 'hex_codec' Codec - 2-digit hex content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg ([email protected]). """ import codecs, binascii ### Codec APIs def hex_encode(...
marioaugustorama/yowsup
refs/heads/master
yowsup/layers/axolotl/protocolentities/notification_encrypt.py
18
from yowsup.common import YowConstants from yowsup.layers.protocol_notifications.protocolentities import NotificationProtocolEntity from yowsup.structs import ProtocolTreeNode class EncryptNotification(NotificationProtocolEntity): """ <notification t="1419824928" id="2451228097" from="s.whatsapp.net" type="encr...
dbo/selenium
refs/heads/master
py/test/selenium/webdriver/common/appcache_tests.py
5
#!/usr/bin/python # # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
wainersm/buildbot
refs/heads/master
master/buildbot/worker/hyper.py
9
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even...
minhphung171093/GreenERP_V9
refs/heads/master
openerp/addons/hw_escpos/escpos/printer.py
101
#!/usr/bin/python import usb.core import usb.util import serial import socket from escpos import * from constants import * from exceptions import * from time import sleep class Usb(Escpos): """ Define USB printer """ def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01): """ ...
tipsqueal/PuPPyREST
refs/heads/master
puppy/__init__.py
1
import puppy.puppy_schema import puppy.core_routes import puppy.post_routes import puppy.user_routes
hddn/studentsdb
refs/heads/master
students/views/exams.py
1
# -*- coding: utf-8 -*- from django.views.generic import ListView from students.models import Exam from students.util import get_current_group EXAMS_NUM = 3 # number of exams for pagination class ExamsListView(ListView): template_name = 'students/exams.html' model = Exam paginate_by = EXAMS_NUM co...
UrQA/URQA-Server
refs/heads/master
external/google-breakpad/src/tools/gyp/test/mac/gyptest-missing-cfbundlesignature.py
298
#!/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 an Info.plist with CFBundleSignature works. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp...
ycliuhw/kman
refs/heads/master
kman/api/urls.py
1
from django.conf.urls import url from django.views.decorators.clickjacking import xframe_options_exempt from django.views.decorators.csrf import csrf_exempt from . import views urlpatterns = [ url( r'^die/(?P<k>\+?[0-9]*)/?', csrf_exempt( xframe_options_exempt(views.DieView.as_view())...
odubno/microblog
refs/heads/master
venv/lib/python2.7/site-packages/decorator.py
112
########################## LICENCE ############################### # Copyright (c) 2005-2012, Michele Simionato # 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 so...
tiy1807/PythonUtils
refs/heads/master
PythonUtils/list_input.py
1
# ------------------------------------------------------------------------------ # Class ListInput # # Allows the same Input object to be requested multiple times, either a # predefined number of times or until the user enters the 'finished' sequence. # ------------------------------------------------------------------...
foursquare/pants
refs/heads/master
src/python/pants/backend/jvm/tasks/jar_task.py
1
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import shutil import tempfile from abc import abstractmethod from builtins impo...
espadrine/opera
refs/heads/master
chromium/src/third_party/pywebsocket/src/test/test_stream.py
496
#!/usr/bin/env python # # Copyright 2011, 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...
tersmitten/ansible-modules-core
refs/heads/devel
inventory/group_by.py
161
# -*- mode: 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 distr...
oskar-skog/skogpasswdman
refs/heads/master
skogpasswdmanapi.py
1
# -*- coding: utf-8 -*- copywrong = """ Copyright (c) 2013-2016, Oskar Skog <[email protected]> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain ...
radosuav/QGIS
refs/heads/master
python/plugins/processing/algs/gdal/pct2rgb.py
15
# -*- coding: utf-8 -*- """ *************************************************************************** pct2rgb.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************************...
openstack/networking-sfc
refs/heads/master
networking_sfc/tests/unit/db/test_sfc_db.py
1
# Copyright 2017 Futurewei. 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 appl...
bgxavier/neutron
refs/heads/master
neutron/tests/api/clients.py
35
# 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...
e-gob/plataforma-kioscos-autoatencion
refs/heads/master
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/remote_management/oneview/oneview_fcoe_network.py
147
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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', ...
loic/django
refs/heads/master
django/db/backends/mysql/compiler.py
691
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def as_subquery_condition(self, alias, columns, compiler): qn = compiler.quote_name_unless_alias qn2 = self.connection.ops.quote_name sql, params = self.as_sql() return '(%s) IN (%s)' % (', '.join('%...
sysadminmatmoz/odoo-clearcorp
refs/heads/8.0
purchase_delivery_invoice/wizard/stock_invoice_onshipping.py
1
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
thisisshi/cloud-custodian
refs/heads/master
tests/data/__init__.py
37
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0
odooindia/odoo
refs/heads/master
addons/account/wizard/account_report_central_journal.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...
ageron/tensorflow
refs/heads/master
tensorflow/contrib/gan/python/estimator/python/tpu_gan_estimator_test.py
7
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
kohnle-lernmodule/exe201based
refs/heads/master
twisted/spread/pb.py
14
# -*- test-case-name: twisted.test.test_pb -*- # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Perspective Broker \"This isn\'t a professional opinion, but it's probably got enough internet to kill you.\" --glyph Stability: semi-stable Future Plans: The connection APIs will ...
rlutes/volttron-applications
refs/heads/master
kisensum/openadr/openadr/features/steps/report.py
2
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2017, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistri...
cricketclubucd/davisdragons
refs/heads/master
platform-tools/systrace/catapult/devil/devil/utils/lazy/__init__.py
28
# Copyright 2015 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 devil.utils.lazy.weak_constant import WeakConstant
alexdglover/shill-isms
refs/heads/master
venv/lib/python2.7/site-packages/flask/templating.py
172
# -*- coding: utf-8 -*- """ flask.templating ~~~~~~~~~~~~~~~~ Implements the bridge to Jinja2. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from jinja2 import BaseLoader, Environment as BaseEnvironment, \ TemplateNotFound from .globals import _requ...
hrashk/sympy
refs/heads/master
sympy/matrices/expressions/trace.py
26
from __future__ import print_function, division from sympy import Basic, Expr from .matexpr import ShapeError class Trace(Expr): """Matrix Trace Represents the trace of a matrix expression. >>> from sympy import MatrixSymbol, Trace, eye >>> A = MatrixSymbol('A', 3, 3) >>> Trace(A) Trace(A) ...
zmike/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/docs/conf.py
467
# -*- coding: utf-8 -*- # # wptserve documentation build configuration file, created by # sphinx-quickstart on Wed Aug 14 17:23:24 2013. # # 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 # autogenerated file. # # Al...
fidodaj/project2
refs/heads/master
server/lib/werkzeug/contrib/jsrouting.py
318
# -*- coding: utf-8 -*- """ werkzeug.contrib.jsrouting ~~~~~~~~~~~~~~~~~~~~~~~~~~ Addon module that allows to create a JavaScript function from a map that generates rules. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ ...
peheje/baselines
refs/heads/master
baselines/ddpg/training.py
4
import os import time from collections import deque import pickle from baselines.ddpg.ddpg import DDPG from baselines.ddpg.util import mpi_mean, mpi_std, mpi_max, mpi_sum import baselines.common.tf_util as U from baselines import logger import numpy as np import tensorflow as tf from mpi4py import MPI def train(env...
nichit93/Implementation-of-TRED-in-ns-3
refs/heads/master
src/internet-apps/bindings/callbacks_list.py
240
callback_classes = [ ['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empt...
XiaosongWei/chromium-crosswalk
refs/heads/master
third_party/Python-Markdown/markdown/extensions/smart_strong.py
123
''' Smart_Strong Extension for Python-Markdown ========================================== This extention adds smarter handling of double underscores within words. See <https://pythonhosted.org/Markdown/extensions/smart_strong.html> for documentation. Original code Copyright 2011 [Waylan Limberg](http://achinghead.co...
chbfiv/fabric-engine-old
refs/heads/ver-1.1.0-alpha
Native/ThirdParty/Private/Python/closure_linter/common/tokenizer.py
157
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
grouan/udata
refs/heads/master
udata/tests/forms/test_current_user_field.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from bson import ObjectId from werkzeug.datastructures import MultiDict from udata.auth import login_user from udata.forms import ModelForm, fields from udata.models import db, User from udata.tests import TestCase from udata.tests.factories import User...
narogon/linuxcnc
refs/heads/add-hal-ethercat
src/hal/utils/halgui/app.py
38
# 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 distributed in the hope that it will be u...
frigg/frigg-test-discovery
refs/heads/master
setup.py
1
# -*- encoding: utf8 -*- import sys from setuptools import setup import frigg_test_discovery def _read_long_description(): try: import pypandoc return pypandoc.convert('README.md', 'rst', format='markdown') except Exception: return None version = frigg_test_discovery.__version__ try...
apigee/edx-platform
refs/heads/master
lms/djangoapps/django_comment_client/migrations/0001_initial.py
188
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Role' db.create_table('django_comment_client_role', ( ('id', self.gf('django.db....
feer56/Kitsune2
refs/heads/master
kitsune/customercare/tests/test_models.py
17
from nose.tools import eq_, raises from kitsune.customercare.models import Tweet from kitsune.customercare.tests import tweet from kitsune.sumo.tests import TestCase class TweetTests(TestCase): """Tests for the Tweet model""" def test_latest(self): """Test the latest() class method when there is a l...
sahiljain/catapult
refs/heads/master
telemetry/telemetry/internal/results/progress_reporter.py
52
# 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. class ProgressReporter(object): """A class that reports progress of a benchmark. The reporter produces output whenever a significant event happens du...