repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
VisTrails/VisTrails
refs/heads/v2.2
vistrails/db/services/abstraction.py
2
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
roadmapper/ansible
refs/heads/devel
test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py
13
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.modules.cloud.amazon import redshift_cross_region_snapshots as rcrs mock_status_enabled = { 'SnapshotCopyGrantName': 'snapshot-us-east-1-to-us-west-2', 'DestinationRegion': 'us-w...
caphrim007/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_waf_condition.py
31
#!/usr/bin/python # Copyright (c) 2017 Will Thames # Copyright (c) 2015 Mike Mochan # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DO...
bolshedvorsky/swift-corelibs-foundation
refs/heads/master
lib/config.py
14
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for the list of ...
nrempel/rucksack-api
refs/heads/master
app/__init__.py
1
# -*- coding: utf-8 -*- # Init app and db for global reference from flask import Flask from flask.ext.restful import Api from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) api = Api(app) db = SQLAlchemy(app) # Add view controllers here from app import views as _ from app.tags import views as _ from ...
sheepeatingtaz/xwingoverlayer
refs/heads/master
xwing_data/migrations/0010_auto_20170313_2140.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-13 21:40 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): dependencies = [ ('xwin...
easyfmxu/zulip
refs/heads/master
zerver/migrations/0003_custom_indexes.py
167
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0002_django_1_8'), ] operations = [ migrations.RunSQL("CREATE INDEX upper_subject_idx ON zerver_message ((upper(su...
MaryanMorel/faker
refs/heads/master
faker/providers/lorem/ru_RU/__init__.py
19
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .. import Provider as LoremProvider class Provider(LoremProvider): word_list = ( 'алььтыра', 'дэлььынётё', 'вэртырэм', 'вэрыар', 'ты', 'рэгяонэ', 'црял', 'квюальизквюэ', 'квюоджё', 'зюаз', 'конгуы', 'антеопам', 'прё', 'эт...
vthorsteinsson/tensor2tensor
refs/heads/master
tensor2tensor/data_generators/lm1b.py
7
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
rlong011/trading-with-python
refs/heads/master
cookbook/cython/testSpeed.py
77
# -*- coding: utf-8 -*- """ Created on Wed Jan 25 20:43:49 2012 @author: jev """ import numpy as np import mean_py import mean_c import time a = np.random.rand(128,100000).astype(np.float32) start = time.clock() #m1 = a.sum(axis=1) #m1 = m1/a.shape[0] m1 = a.mean(axis=0) print 'Done in %.3f s' %...
SistemasAgiles/pyafipws
refs/heads/master
wscdc.py
3
#!/usr/bin/python # -*- coding: latin-1 -*- # 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, or (at your option) any later # version. # # This program is distributed in the hope...
nguyenhongson03/scrapy
refs/heads/master
scrapy/xlib/tx/_newclient.py
159
# -*- test-case-name: twisted.web.test.test_newclient -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client. The way to use the functionality provided by this module is to: - Connect a L{HTTP11ClientProtocol} to an HT...
arborh/tensorflow
refs/heads/master
tensorflow/python/ops/sort_ops_test.py
30
# 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...
jay-tyler/ansible
refs/heads/devel
lib/ansible/plugins/action/assemble.py
67
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # Stephen Fromm <sfromm@gmail.com> # Brian Coca <briancoca+dev@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
dtschan/weblate
refs/heads/master
weblate/trans/tests/test_specialchars.py
3
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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, eith...
ashwinpote/Ext_JS_POC
refs/heads/master
ext-4.2.2.1144/examples/grid/amf-grid.py
138
# coding=utf-8 # This script generates records in AMF0 and AMF3 format for the amf-grid example # and saves the data as amf0-pangrams.amf and amf-3-pangrams.amf from pyamf import remoting from pyamf.remoting import Envelope from pyamf.remoting import Response records = [{ "language": "Danish", "text": "Quizdel...
Polarcraft/KbveBot
refs/heads/master
helpers/modutils.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # 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 Softwa...
CryptoRepairCrew/p2pool
refs/heads/master
SOAPpy/SOAPBuilder.py
289
""" ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
rtrwalker/geotecha
refs/heads/master
geotecha/consolidation/nogamiandli2003_interactive.py
1
# geotecha - A software suite for geotechncial engineering # Copyright (C) 2018 Rohan T. Walker (rtrwalker@gmail.com) # # 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 L...
p0cisk/Quantum-GIS
refs/heads/master
python/plugins/processing/algs/lidar/lastools/lasduplicate.py
5
# -*- coding: utf-8 -*- """ *************************************************************************** lasduplicate.py --------------------- Date : September 2013 Copyright : (C) 2013 by Martin Isenburg Email : martin near rapidlasso point com ************...
NiklasMM/coala
refs/heads/master
coalib/results/result_actions/OpenEditorAction.py
9
import logging import shlex import subprocess from os.path import exists from os import environ from coalib.results.Diff import Diff from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction from coala_utils.decorators import enforce_signature """ Data about all tex...
stanta/darfchain
refs/heads/master
darfchain_docker_vagrant/tests/web/test_blocks.py
3
import pytest from bigchaindb.models import Transaction BLOCKS_ENDPOINT = '/api/v1/blocks/' @pytest.mark.bdb @pytest.mark.usefixtures('inputs') def test_get_block_endpoint(b, client): tx = Transaction.create([b.me], [([b.me], 1)]) tx = tx.sign([b.me_private]) block = b.create_block([tx]) b.write_bl...
Garrett-R/scikit-learn
refs/heads/master
examples/cluster/plot_agglomerative_clustering_metrics.py
20
""" Agglomerative clustering with different metrics =============================================== Demonstrates the effect of different metrics on the hierarchical clustering. The example is engineered to show the effect of the choice of different metrics. It is applied to waveforms, which can be seen as high-dimens...
VielSoft/odoo
refs/heads/8.0
addons/survey/controllers/__init__.py
770
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
yangdyi/hbase_api
refs/heads/master
HBase_python/thrift/transport/TTransport.py
51
# # 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...
GeorgiaTechDHLab/TOME
refs/heads/master
topics/migrations/0026_auto_20180516_1354.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2018-05-16 13:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('topics', '0025_auto_20180515_1323'), ] operations = [ migrations.AddIndex( ...
Danielhiversen/home-assistant
refs/heads/master
homeassistant/components/websocket_api/http.py
2
"""View to accept incoming websocket connection.""" import asyncio from contextlib import suppress from functools import partial import json import logging from aiohttp import web, WSMsgType import async_timeout from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.core import callback from home...
zorroz/microblog
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py
1182
######################## 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...
binhqnguyen/lena
refs/heads/master
.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Tools/xlcxx.py
330
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_xlcxx(conf): cxx=conf.find_program(['xlc++_r','xlc++'],var='CXX') cxx=conf.cmd_to_list(cx...
wasiqmukhtar/tcp-eval.wasiq
refs/heads/master
src/fd-net-device/bindings/callbacks_list.py
40
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
diegoguimaraes/django
refs/heads/master
tests/admin_filters/models.py
13
from __future__ import unicode_literals from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Book(models.Model): title = models.CharField(max_length=50) year = models.PositiveIntegerField(null...
MattRijk/django-ecomsite
refs/heads/master
lib/python2.7/site-packages/django/views/decorators/clickjacking.py
550
from functools import wraps from django.utils.decorators import available_attrs def xframe_options_deny(view_func): """ Modifies a view function so its response has the X-Frame-Options HTTP header set to 'DENY' as long as the response doesn't already have that header set. e.g. @xframe_optio...
hasanalom/ggrc-core
refs/heads/develop
src/ggrc/migrations/versions/20131206183337_a3afeab3302_add_requestor_to_req.py
5
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com """Add requestor to Requests Revision ID: a3afeab3302 Revises: 22917277cc68 Cr...
AEW2015/PYNQ_PR_Overlay
refs/heads/master
python/pynq/iop/pmod_adc.py
1
# Copyright (c) 2016, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
justathoughtor2/atomicApe
refs/heads/encaged
cygwin/bin/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
1366
# 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. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
tomasz-wiszkowski/XfCon
refs/heads/master
src/constants/__init__.py
1
# # Copyright 2012 Tomasz Wiszkowski # # 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 w...
wkfwkf/statsmodels
refs/heads/master
statsmodels/sandbox/tests/test_predict_functional.py
29
from statsmodels.sandbox.predict_functional import predict_functional import numpy as np import pandas as pd import statsmodels.api as sm from numpy.testing import dec # If true, the output is written to a multi-page pdf file. pdf_output = False try: import matplotlib.pyplot as plt import matplotlib have_...
amadhusudan/dpccairscraper
refs/heads/master
lib/lxml/cssselect.py
57
"""CSS Selectors based on XPath. This module supports selecting XML/HTML tags based on CSS selectors. See the `CSSSelector` class for details. This is a thin wrapper around cssselect 0.7 or later. """ from __future__ import absolute_import from . import etree try: import cssselect as external_cssselect except I...
jmankoff/data
refs/heads/master
Assignments/jmankoff-rss/lib/flask/testsuite/test_apps/flask_newext_simple.py
628
ext_id = 'newext_simple'
hitrust/namebench
refs/heads/master
nb_third_party/dns/update.py
215
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
CarlFK/veyepar
refs/heads/master
dj/main/urls.py
2
# dj/main/urls.py from django.conf.urls import url # from django.views.generic import list_detail from .views import * # client_list={"queryset": Client.objects.all(), } # "template_object_name": "client_list" } urlpatterns = [ url(r'^$', main, name='main'), url(r'start/$', start_here, name='start_here'...
iuliat/nova
refs/heads/master
nova/tests/unit/scheduler/test_ironic_host_manager.py
36
# Copyright (c) 2014 OpenStack Foundation # Copyright (c) 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.apac...
alvin1991/ardupilot
refs/heads/master
Tools/scripts/runplanetest.py
23
#!/usr/bin/env python import pexpect, time, sys from pymavlink import mavutil def wait_heartbeat(mav, timeout=10): '''wait for a heartbeat''' start_time = time.time() while time.time() < start_time+timeout: if mav.recv_match(type='HEARTBEAT', blocking=True, timeout=0.5) is not None: re...
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/djcelery/management/base.py
2
from __future__ import absolute_import, unicode_literals import celery import djcelery import sys from django.core.management.base import BaseCommand from djcelery.compat import setenv DB_SHARED_THREAD = """\ DatabaseWrapper objects created in a thread can only \ be used in that same thread. The object with alias ...
cchurch/ansible
refs/heads/devel
lib/ansible/module_utils/remote_management/dellemc/dellemc_idrac.py
37
# -*- coding: utf-8 -*- # # Dell EMC OpenManage Ansible Modules # Version 1.0 # Copyright (C) 2018 Dell Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. # Other trad...
ycl2045/nova-master
refs/heads/master
nova/scheduler/filters/disk_filter.py
12
# Copyright (c) 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 ...
google/contentbox
refs/heads/master
help/urls.py
4
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
su20yu1919/cwa-portal
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py
2479
#!/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. """ Unit tests for the xcode.py file. """ import gyp.generator.xcode as xcode import unittest import sys class TestEscapeXcodeDefine(unit...
alvaroaleman/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_elb_lb.py
12
#!/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 distributed...
akhilari7/pa-dude
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.py
505
from __future__ import absolute_import, division, unicode_literals from xml.dom import Node from . import _base class TreeWalker(_base.NonRecursiveTreeWalker): def getNodeDetails(self, node): if node.nodeType == Node.DOCUMENT_TYPE_NODE: return _base.DOCTYPE, node.name, node.publicId, node.sy...
chriswmackey/UWG_Python
refs/heads/master
setup.py
1
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open('requirements.txt') as f: requirements = f.read().splitlines() setuptools.setup( name="uwg", use_scm_version=True, setup_requires=['setuptools_scm'], author="Ladybug Tools", author_email="info@lady...
lizardsystem/lizard-layout
refs/heads/master
lizard_layout/tests.py
12
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from django.test import TestCase class ExampleTest(TestCase): def test_something(self): self.assertEquals(1, 1)
bohlian/erpnext
refs/heads/develop
erpnext/patches/v4_0/fix_contact_address.py
121
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("website", "doctype", "contact_us_settings") address = frappe.db.get_value("Contact Us Settings", None, "address") if address: address = frappe.get_doc("Address", address) contact = frappe.get_doc("Contact Us Settings", "Cont...
gnychis/grforwarder
refs/heads/txsync
gr-uhd/apps/uhd_siggen.py
2
#!/usr/bin/env python # # Copyright 2008,2009,2011,2012 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 (a...
lucach/spellcorrect
refs/heads/master
appengine/lib/redis/exceptions.py
82
"Core exceptions raised by the Redis client" from redis._compat import unicode class RedisError(Exception): pass # python 2.5 doesn't implement Exception.__unicode__. Add it here to all # our exception types if not hasattr(RedisError, '__unicode__'): def __unicode__(self): if isinstance(self.args[0]...
yesudeep/mils-secure
refs/heads/master
app/console/app/pygments/formatters/bbcode.py
24
# -*- coding: utf-8 -*- """ pygments.formatters.bbcode ~~~~~~~~~~~~~~~~~~~~~~~~~~ BBcode formatter. :copyright: 2006-2007 by Lukas Meuser. :license: BSD, see LICENSE for more details. """ from pygments.formatter import Formatter from pygments.util import get_bool_opt __all__ = ['BBCodeFormatter...
coreynicholson/youtube-dl
refs/heads/master
youtube_dl/extractor/cbssports.py
48
from __future__ import unicode_literals from .cbs import CBSBaseIE class CBSSportsIE(CBSBaseIE): _VALID_URL = r'https?://(?:www\.)?cbssports\.com/video/player/[^/]+/(?P<id>\d+)' _TESTS = [{ 'url': 'http://www.cbssports.com/video/player/videos/708337219968/0/ben-simmons-the-next-lebron?-not-so-fast',...
eonpatapon/contrail-controller
refs/heads/master
src/config/schema-transformer/test/test_bgpvpn.py
3
# # Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. # from gevent import sleep from gevent import monkey monkey.patch_all() from vnc_api.vnc_api import Bgpvpn from vnc_api.vnc_api import RouteTargetList from test_case import STTestCase from test_route_target import VerifyRouteTarget class TestBgpvpn...
vikas1885/test1
refs/heads/master
lms/djangoapps/shoppingcart/processors/exceptions.py
196
from shoppingcart.exceptions import PaymentException class CCProcessorException(PaymentException): pass class CCProcessorSignatureException(CCProcessorException): pass class CCProcessorDataException(CCProcessorException): pass class CCProcessorWrongAmountException(CCProcessorException): pass c...
marcwebbie/youtube-dl
refs/heads/master
youtube_dl/extractor/wistia.py
36
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, float_or_none, ) class WistiaIE(InfoExtractor): _VALID_URL = r'(?:wistia:|https?://(?:fast\.)?wistia\.net/embed/iframe/)(?P<id>[a-z0-9]+)' _API_URL = 'http://fast.wistia.co...
darkleons/lama
refs/heads/master
addons/hr_recruitment/report/__init__.py
442
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
akozumpl/anaconda
refs/heads/master
old_tests/pyanaconda_test/packaging_test.py
8
#!/usr/bin/python import mock class PackagingTest(mock.TestCase): def setUp(self): self.setupModules(["_isys", "logging"]) import pyanaconda pyanaconda.anaconda_log = mock.Mock() from pykickstart.version import makeVersion from pyanaconda.flags import flags ...
o5k/openerp-oemedical-v0.1
refs/heads/master
openerp/addons/account/wizard/account_report_aged_partner_balance.py
48
# -*- 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...
andriibekker/biddingsbase
refs/heads/master
django/views/csrf.py
289
from django.http import HttpResponseForbidden from django.template import Context, Template from django.conf import settings # We include the template inline since we need to be able to reliably display # this error message, especially for the sake of developers, and there isn't any # other way of making it available ...
erickt/hue
refs/heads/master
desktop/core/ext-py/pytz-2014.10/pytz/__init__.py
61
''' datetime.tzinfo timezone definitions generated from the Olson timezone database: ftp://elsie.nci.nih.gov/pub/tz*.tar.gz See the datetime section of the Python Library Reference for information on how to use these modules. ''' # The Olson database is updated several times a year. OLSON_VERSION = '2014j' VERSI...
defance/edx-platform
refs/heads/master
openedx/core/djangoapps/ccxcon/models.py
64
""" Models for the ccxcon """ from django.db import models class CCXCon(models.Model): """ The definition of the CCXCon model. This will store the url and the oauth key to access the REST APIs on the CCX Connector. """ url = models.URLField(unique=True, db_index=True) oauth_client_id = mo...
dancingdan/tensorflow
refs/heads/master
tensorflow/python/distribute/distribute_config.py
46
# Copyright 2018 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...
OpenTrons/opentrons_sdk
refs/heads/master
api/src/opentrons/protocol_api/module_geometry.py
1
""" opentrons.protocol_api.module_geometry: classes and functions for modules as deck objects This module provides things like :py:class:`ModuleGeometry` and :py:func:`load_module` to create and manipulate module objects as geometric objects on the deck (as opposed to calling commands on them, which is handled by :py:...
jlegendary/orange
refs/heads/master
Orange/testing/unit/tests/test_rules.py
6
from Orange.testing import testing from Orange.classification import rules try: import unittest2 as unittest except: import unittest @testing.test_on_data def test_learner_on(self, dataset): testing.LearnerTestCase.test_learner_on(self, dataset) for r in self.classifier.rules: str = rules.rule...
robdennis/sideboard
refs/heads/master
tests/plugins/different_versions/rdflib3_0_0/env/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/setuptools/command/bdist_rpm.py
470
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs, and # finally, a kludge to track .rpm files for uploading when run on Python <2.5. from distutils.comma...
balajikris/autorest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/models/float_wrapper.py
16
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
bdaroz/the-blue-alliance
refs/heads/master
controllers/event_controller.py
4
import logging from collections import defaultdict import datetime import json import os import tba_config import logging from google.appengine.api import memcache from google.appengine.ext import ndb from google.appengine.ext.webapp import template from base_controller import CacheableHandler from consts.district_ty...
mttr/django
refs/heads/master
tests/distinct_on_fields/models.py
282
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Tag(models.Model): name = models.CharField(max_length=10) parent = models.ForeignKey( 'self', models.SET_NULL, blank=Tr...
graehl/yaml-cpp
refs/heads/master
test/gmock-1.7.0/gtest/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...
suncycheng/intellij-community
refs/heads/master
python/testData/refactoring/move/subModuleUsage/before/src/p1/m1.py
249
def g(): pass
enthought/etsproxy
refs/heads/master
enthought/developer/tools/file_browser.py
1
# proxy module from __future__ import absolute_import from etsdevtools.developer.tools.file_browser import *
mahak/nova
refs/heads/master
nova/scheduler/host_manager.py
2
# Copyright (c) 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 ...
pyblish/pyblish-endpoint
refs/heads/master
pyblish_endpoint/vendor/requests/packages/chardet/langcyrillicmodel.py
2761
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
unsiloai/syntaxnet-ops-hack
refs/heads/master
tensorflow/python/estimator/canned/dnn_testing_utils.py
11
# 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...
batpad/mezzanine
refs/heads/master
mezzanine/blog/management/commands/import_rss.py
8
from __future__ import unicode_literals from datetime import timedelta from optparse import make_option from time import timezone try: from urllib.request import urlopen from urllib.parse import urljoin except ImportError: from urllib import urlopen from urlparse import urljoin from django.core.manage...
Distrotech/pygtk
refs/heads/distrotech-pygtk
tests/runtests-windows.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import glob import unittest import common SKIP_FILES = ['runtests', 'common'] # 'test_glade'] # python crash if __name__ == '__main__': dir = os.path.split(os.path.abspath(__file__))[0] os...
nupic-community/nupic.ca
refs/heads/master
nupicca/model_params/rule_193_model_params.py
2
MODEL_PARAMS = \ { 'aggregationInfo': { 'days': 0, 'fields': [], 'hours': 0, 'microseconds': 0, 'milliseconds': 0, 'minutes': 0, 'months': 0, 'seconds': 0, ...
tigerhawkvok/WebifyDir
refs/heads/master
getch.py
5
## Taken from http://code.activestate.com/recipes/134892/ ## Brought to Github for better versioning / editing / updating ## Returns a string (as input() or raw_input() ) ## Use: # import getch # c = getch.getch() # # https://gist.github.com/tigerhawkvok/9542594 class _Getch: """Gets a single character from standa...
dulems/hue
refs/heads/master
desktop/core/ext-py/Mako-0.8.1/test/test_block.py
43
from mako.template import Template from mako.lookup import TemplateLookup from mako import exceptions from test import TemplateTest, assert_raises, assert_raises_message from test.util import flatten_result, result_lines class BlockTest(TemplateTest): def test_anonymous_block_namespace_raises(self): asse...
brianlsharp/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/oldnumeric/fix_default_axis.py
101
""" This module adds the default axis argument to code which did not specify it for the functions where the default was changed in NumPy. The functions changed are add -1 ( all second argument) ====== nansum nanmax nanmin nanargmax nanargmin argmax argmin compress 3 add 0 ====== take 3 repeat 3 sum #...
40223137/w1717
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/multiprocessing/pool.py
694
# # Module providing the `Pool` class for managing a process pool # # multiprocessing/pool.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = ['Pool'] # # Imports # import threading import queue import itertools import collections import time from multiprocessing ...
josuemontano/api-starter
refs/heads/master
src/canopus/__init__.py
3
from .config import configure def main(global_config, **settings): application = configure(settings).make_wsgi_app() return application
CEG-FYP-OpenStack/scheduler
refs/heads/master
nova/tests/unit/virt/hyperv/test_imagecache.py
9
# Copyright 2014 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...
Denisolt/IEEE-NYIT-MA
refs/heads/master
local/lib/python2.7/site-packages/future/moves/tkinter/dialog.py
118
from __future__ import absolute_import from future.utils import PY3 if PY3: from tkinter.dialog import * else: try: from Dialog import * except ImportError: raise ImportError('The Dialog module is missing. Does your Py2 ' 'installation include tkinter?')
romain-dartigues/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gauravbose/digital-menu
refs/heads/master
tests/distinct_on_fields/models.py
166
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Tag(models.Model): name = models.CharField(max_length=10) parent = models.ForeignKey('self', blank=True, null=True, related_name='c...
maxandersen/jenkins-job-builder
refs/heads/master
tests/reporters/test_reporters.py
20
#!/usr/bin/env python # # Copyright 2015 Thanh Ha # # 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 agree...
chenc10/Spark-PAF
refs/heads/master
ec2/lib/boto-2.34.0/boto/sqs/connection.py
15
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
yrizk/django-blog
refs/heads/master
blogvenv/lib/python3.4/site-packages/django/contrib/gis/geoip/libgeoip.py
106
import os from ctypes import CDLL from ctypes.util import find_library from django.conf import settings # Creating the settings dictionary with any settings, if needed. GEOIP_SETTINGS = {key: getattr(settings, key) for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY') ...
tttthemanCorp/CardmeleonAppEngine
refs/heads/master
django/db/backends/postgresql/introspection.py
308
from django.db.backends import BaseDatabaseIntrospection class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type codes to Django Field types. data_types_reverse = { 16: 'BooleanField', 20: 'BigIntegerField', 21: 'SmallIntegerField', 23: 'IntegerField', 25: 'T...
eroticsoup/imagefap
refs/heads/master
if_scraper/if_scraper/spiders/link_spider.py
1
import scrapy from bs4 import BeautifulSoup import utils class LinkSpider(scrapy.Spider): name = 'link_spider' start_urls = [] def __init__(self, url=None, urls=None): # add start_url to our seed list if url: self.start_urls.append(url) else: self.start_url...
LiveZenLK/CeygateERP
refs/heads/master
addons/l10n_at/account_wizard.py
47
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) conexus.at from openerp import tools from openerp.osv import osv from openerp import addons class AccountWizard_cd(osv.osv_memory): _inherit='wizard.multi.charts.accounts' _defaults = { 'code_di...
pwmarcz/django
refs/heads/master
django/core/servers/basehttp.py
9
""" HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21). Based on wsgiref.simple_server which is part of the standard library since 2.5. This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE! """ from __f...
pilotopirx/pirxconnect
refs/heads/master
python-twitter-master/twitter/list.py
9
#!/usr/bin/env python from twitter import simplejson, TwitterError, User class List(object): '''A class representing the List structure used by the twitter API. The List structure exposes the following properties: list.id list.name list.slug list.description list.full_name list.mode ...
RTsWorld/deepdive
refs/heads/master
examples/spouse_example/postgres/ddlog/udf/ext_has_spouse_features.py
15
#! /usr/bin/env python import sys import ddlib # DeepDive python utility ARR_DELIM = '~^~' # For each input tuple for row in sys.stdin: parts = row.strip().split('\t') if len(parts) != 6: print >>sys.stderr, 'Failed to parse row:', row continue # Get all fields from a row words = parts[0].split(...