repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
fake-name/ReadableWebProxy
refs/heads/master
WebMirror/management/rss_parser_funcs/feed_parse_extractThrillerparadisetranslationsWordpressCom.py
1
def extractThrillerparadisetranslationsWordpressCom(item): ''' Parser for 'thrillerparadisetranslations.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', ...
elimence/edx-platform
refs/heads/master
lms/djangoapps/courseware/migrations/0009_add_field_default.py
80
# -*- 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): # Changing field 'XModuleContentField.value' db.alter_column('courseware_xmodulecontentfield', 'value', sel...
phalax4/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/contextlib.py
261
"""Utilities for with-statement contexts. See PEP 343.""" import sys from functools import wraps from warnings import warn __all__ = ["contextmanager", "nested", "closing"] class GeneratorContextManager(object): """Helper for @contextmanager decorator.""" def __init__(self, gen): self.gen = gen ...
modelica-3rdparty/netCDF-DataReader
refs/heads/master
NcDataReader2/Resources/examples/GenerateFile.py
1
#!/usr/bin/env python # This does exactly the same as GenerateFile.c . # There are several netCDF interfaces for python available, # this script will try use the one from scipy and fall back to pupynere. # (http://pypi.python.org/pypi/pupynere/). try: from scipy.io import * except: from pupynere import * ...
m1093782566/openstack_org_ceilometer
refs/heads/dev
ceilometer/alarm/storage/models.py
6
# # Copyright 2013 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.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/li...
jylaxp/django
refs/heads/master
django/contrib/gis/geos/coordseq.py
374
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import byref, c_double, c_uint from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.base import...
DavidCain/find-great-books
refs/heads/master
bibliophile/__init__.py
1
# Importing grequests will monkeypatch SSL # Recursion errors occur if this import does not come before module imports import grequests # NoQA
dcroc16/skunk_works
refs/heads/master
google_appengine/google/appengine/api/labs/taskqueue/taskqueue_stub.py
2
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
shownomercy/django
refs/heads/master
tests/gis_tests/test_geoip.py
48
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import unittest from unittest import skipUnless from django.conf import settings from django.contrib.gis.geoip import HAS_GEOIP from django.contrib.gis.geos import HAS_GEOS, GEOSGeometry from django.utils import six if HAS_GEOIP: from djan...
agaffney/ansible
refs/heads/devel
test/units/utils/display/test_display.py
52
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.utils.display import Display def test_display_basic_message(ca...
witwall/gyp
refs/heads/master
test/win/gyptest-link-large-pdb.py
218
#!/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. """ Make sure msvs_large_pdb works correctly. """ import TestGyp import struct import sys CHDIR = 'large-pdb' def CheckImageAndPdb(tes...
IITM-DONLAB/python-dnn
refs/heads/master
src/pythonDnn/run/run_DBN.py
1
#!/usr/bin/env python2.7 # Copyright 2014 G.K SUDHARSHAN <sudharpun90@gmail.comIIT Madras # Copyright 2014 Abil N George<mail@abilng.inIIT Madras # # 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 Li...
alistairlow/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/bcast_ops_test.py
102
# 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...
GNUtn/eventoL
refs/heads/master
eventol/manager/context_processors.py
2
from django.conf import settings from manager.models import EventolSetting def eventol_settings(request): """Add eventol settings""" return { "PRIVATE_ACTIVITIES": settings.PRIVATE_ACTIVITIES, "EVENTOL_SETTINGS": EventolSetting.load() }
unseenlaser/linuxcnc
refs/heads/add-hal-ethercat
src/emc/usr_intf/axis/scripts/teach-in.py
12
#!/usr/bin/python """Usage: python teach.py nmlfile outputfile If outputfile is not specified, writes to standard output. You must ". scripts/rip-environment" before running this script, if you use run-in-place. """ # Copyright 2007 Jeff Epler <jepler@unpythonic.net> # # This program is free software; you ca...
int19h/PTVS
refs/heads/master
Python/Tests/TestData/DebuggerProject/B/module1.py
14
def do_something(): for j in range(200): print(j)
jpshort/odoo
refs/heads/8.0
openerp/addons/test_new_api/__openerp__.py
204
# -*- coding: utf-8 -*- { 'name': 'Test New API', 'version': '1.0', 'category': 'Tests', 'description': """A module to test the new API.""", 'author': 'OpenERP SA', 'maintainer': 'OpenERP SA', 'website': 'http://www.openerp.com', 'depends': ['base'], 'installable': True, 'auto_in...
kivy/kivy
refs/heads/master
examples/shader/rotated.py
9
''' Rotated Shader ============= This shader example is a modified version of plasma.py that shows how to rotate areas of fragment shaders bounded by vertex_instructions. ''' from kivy.app import App from kivy.clock import Clock from kivy.factory import Factory from kivy.graphics import RenderContext from kivy.propert...
DailyActie/Surrogate-Model
refs/heads/master
surrogate/sorting/utils/__init__.py
1
# MIT License # # Copyright (c) 2016 Daily Actie # # 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, modify, merge, ...
hzlf/openbroadcast
refs/heads/master
tools/identify/requests/packages/chardet/langgreekmodel.py
235
######################## 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...
ryansb/boto
refs/heads/master
boto/ec2/instance.py
94
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files ...
mglukhikh/intellij-community
refs/heads/master
python/lib/Lib/asyncore.py
70
# -*- Mode: Python -*- # Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission to use, copy, modify,...
cchurch/ansible
refs/heads/devel
test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py
68
#!/usr/bin/env python # a script to check for illegal filenames on various Operating Systems. The # main rules are derived from restrictions on Windows # https://msdn.microsoft.com/en-us/library/aa365247#naming_conventions from __future__ import (absolute_import, division, print_function) __metaclass__ = type import ...
dladd/pyFormex
refs/heads/master
pyformex/gui/camera.py
1
# $Id$ ## ## This file is part of pyFormex 0.8.9 (Fri Nov 9 10:49:51 CET 2012) ## pyFormex is a tool for generating, manipulating and transforming 3D ## geometrical models by sequences of mathematical operations. ## Home page: http://pyformex.org ## Project page: http://savannah.nongnu.org/projects/pyformex/ ##...
opendxl/opendxl-epo-service-python
refs/heads/master
clean.py
1
from __future__ import absolute_import from __future__ import print_function import os # pylint: disable=no-name-in-module, import-error from distutils.dir_util import remove_tree from shutil import copyfile def clean_dir(src_dir, directory): if os.path.exists(directory): print("Cleaning directory: " + di...
anilmuthineni/tensorflow
refs/heads/master
tensorflow/examples/tutorials/input_fn/boston.py
12
# 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 appl...
gram526/VTK
refs/heads/master
Imaging/Core/Testing/Python/TestAllBlends.py
26
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ========================================================================= Program: Visualization Toolkit Module: TestNamedColorsIntegration.py Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www....
writefaruq/lionface-app
refs/heads/master
django/__init__.py
9
VERSION = (1, 3, 0, 'alpha', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] != 'final': versi...
justinpotts/mozillians
refs/heads/master
vendor-local/lib/python/celery/task/schedules.py
32
# -*- coding: utf-8 -*- from __future__ import absolute_import import warnings from ..schedules import schedule, crontab_parser, crontab # noqa from ..exceptions import CDeprecationWarning warnings.warn(CDeprecationWarning( "celery.task.schedules is deprecated and renamed to celery.schedules"))
takeflight/wagtail
refs/heads/master
wagtail/contrib/frontend_cache/backends.py
7
import logging import uuid from collections import defaultdict from urllib.error import HTTPError, URLError from urllib.parse import urlparse, urlunparse from urllib.request import Request, urlopen import requests from django.core.exceptions import ImproperlyConfigured from wagtail import __version__ logger = loggin...
codecop/diy-lang
refs/heads/try2
site-packages/nose/plugins/capture.py
69
""" This plugin captures stdout during test execution. If the test fails or raises an error, the captured output will be appended to the error or failure output. It is enabled by default but can be disabled with the options ``-s`` or ``--nocapture``. :Options: ``--nocapture`` Don't capture stdout (any stdout out...
papercapp/django-banner-rotator
refs/heads/master
banner_rotator/south_migrations/0004_auto__del_field_banner_impressions.py
2
# encoding: 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): # Deleting field 'Banner.impressions' db.delete_column('banner_rotator_banner', 'impressions') def b...
zdary/intellij-community
refs/heads/master
python/testData/copyPaste/Selection3.after.py
83
if True: a = 1 b = 2 def f(): if True: a = 1 b = 2
alexandrucoman/vbox-nova-driver
refs/heads/master
nova/virt/libvirt/firewall.py
4
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
alexbrasetvik/Piped
refs/heads/develop
setup.py
1
# Copyright (c) 2010-2011, Found IT A/S and Piped Project Contributors. # See LICENSE for details. import os import sys from setuptools import setup, find_packages # add piped to the package path so we can get the version from the source tree here = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, here) ...
morlay/shadowsocks
refs/heads/master
shadowsocks/asyncdns.py
655
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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...
andykimpe/chromium-test-npapi
refs/heads/master
tools/perf/page_sets/browser_control_click.py
9
# 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. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
edx/edx-analytics-data-api-client
refs/heads/master
analyticsclient/course_totals.py
2
from analyticsclient.base import PostableCourseIDsEndpoint from analyticsclient.constants import data_formats class CourseTotals(PostableCourseIDsEndpoint): """Course aggregate data.""" path = 'course_totals/' def course_totals(self, course_ids=None, data_format=data_formats.JSON): """ G...
philoniare/horizon
refs/heads/master
openstack_dashboard/test/test_data/ceilometer_data.py
56
# Copyright 2012 Canonical Ltd. # # 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 writi...
912/M-new
refs/heads/master
virtualenvironment/experimental/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/models.py
3
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GeometryColumns(models.Model): """ The...
jvassev/dd-agent
refs/heads/master
utils/debug.py
14
# stdlib from functools import wraps from pprint import pprint import inspect import os import sys # datadog from config import get_checksd_path, get_confd_path from util import get_os def log_exceptions(logger): """ A decorator that catches any exceptions thrown by the decorated function and logs them a...
psobot/SampleScanner
refs/heads/master
lib/audio_helpers.py
1
import time import numpy from utils import note_name, percent_to_db from record import record from constants import CLIPPING_THRESHOLD, \ CLIPPING_CHECK_NOTE, \ EXIT_ON_CLIPPING, \ SAMPLE_RATE from midi_helpers import all_notes_off, CHANNEL_OFFSET def generate_sample( limit, midiout, note, ...
cinashp/whatsappbot
refs/heads/master
yowsup/layers/stanzaregulator/layer.py
18
from yowsup.layers import YowLayer, YowLayerEvent, EventCallback from yowsup.layers.network import YowNetworkLayer class YowStanzaRegulator(YowLayer): ''' send: bytearray -> bytearray receive: bytearray -> bytearray ''' def __init__(self): super(YowStanzaRegulator, self).__...
andialbrecht/sentry-comments
refs/heads/master
docs/conf.py
1
# -*- coding: utf-8 -*- # # sentry-comments documentation build configuration file, created by # sphinx-quickstart on Sun Nov 25 10:43:59 2012. # # 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....
flipjack/django
refs/heads/master
oscar/apps/dashboard/shipping/config.py
58
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class ShippingDashboardConfig(AppConfig): label = 'shipping_dashboard' name = 'oscar.apps.dashboard.shipping' verbose_name = _('Shipping dashboard')
mt2d2/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/genshistream.py
1730
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
f3r/scikit-learn
refs/heads/master
sklearn/cluster/tests/test_spectral.py
262
"""Testing for Spectral Clustering methods""" from sklearn.externals.six.moves import cPickle dumps, loads = cPickle.dumps, cPickle.loads import numpy as np from scipy import sparse from sklearn.utils import check_random_state from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_a...
tersmitten/ansible
refs/heads/devel
lib/ansible/modules/crypto/acme/acme_challenge_cert_helper.py
17
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018 Felix Fontein <felix@fontein.de> # 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', ...
RPGOne/Skynet
refs/heads/Miho
scikit-learn-c604ac39ad0e5b066d964df3e8f31ba7ebda1e0e/sklearn/datasets/tests/test_svmlight_format.py
5
from bz2 import BZ2File import gzip from io import BytesIO import numpy as np import os import shutil from tempfile import NamedTemporaryFile from sklearn.externals.six import b from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert...
Arcanemagus/SickRage
refs/heads/master
lib/babelfish/converters/alpha2.py
88
# -*- coding: utf-8 -*- # # Copyright (c) 2013 the BabelFish authors. All rights reserved. # Use of this source code is governed by the 3-clause BSD license # that can be found in the LICENSE file. # from __future__ import unicode_literals from . import LanguageEquivalenceConverter from ..language import LANGUAGE_MATRI...
wscullin/spack
refs/heads/qmcpack
var/spack/repos/builtin/packages/intel/package.py
3
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Soya93/Extract-Refactoring
refs/heads/master
python/testData/inspections/ArgumentEqualDefault_after.py
83
def foo(a, b = 345, c = 1): pass #PY-3261 foo(1, c=22)
ArthurGarnier/SickRage
refs/heads/master
lib/tornado/curl_httpclient.py
19
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
JioCloud/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/234_add_expire_reservations_index.py
146
# 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 law or agreed to in...
msebire/intellij-community
refs/heads/master
python/testData/docstrings/simpleGoogleDocString.py
53
def func(x, y, *args, **kwargs): """Summary Parameters: x (int) : first parameter y: second parameter with longer description Raises: Exception: if anything bad happens Returns: None: always """ pass
jbeezley/girder
refs/heads/master
test/test_notification.py
3
# -*- coding: utf-8 -*- import datetime import pytest from pytest_girder.assertions import assertStatus, assertStatusOk from girder.models.notification import Notification OLD_TIME = datetime.datetime.utcnow() - datetime.timedelta(days=3) SINCE = OLD_TIME + datetime.timedelta(days=1) @pytest.fixture def notification...
lacs-ufpa/free-mtrix
refs/heads/master
data_analysis_helpers/variability_analysis.py
1
# -*- coding: utf-8 -*- """ Free-mtrix - Free cultural selection and social behavior experiments. Copyright (C) 2016-2019 Carlos Rafael Fernandes Picanço. Copyright (C) 2016-2019 Thais Maria Monteiro Guimarães. Copyright (C) 2016-2019 Universidade Federal do Pará. The present file is distribu...
RevansChen/online-judge
refs/heads/master
Codewars/8kyu/cis-122-number-1-simple-printing/Python/solution1.py
1
# Python - 2.7.6 # Uncomment the following line to test this code in Python 3.0: #xprint = print # Comment Create Python 2.7 code for all the following Display statements. # Display 'Hello World!' print 'Hello World!' # Declare String course = 'CIS 122' # Declare String name = 'Intro to Software Des...
TiVoMaker/boto
refs/heads/develop
tests/unit/kms/__init__.py
473
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
katajakasa/utuputki2
refs/heads/master
utuputki/webui/handlers/profile.py
1
# -*- coding: utf-8 -*- import logging from passlib.hash import pbkdf2_sha256 from sqlalchemy.orm.exc import NoResultFound from handlerbase import HandlerBase from common.db import db_session, User log = logging.getLogger(__name__) class ProfileHandler(HandlerBase): def handle(self, packet_msg): if not...
crossgovernmentservices/csdigital-prototype
refs/heads/master
application/skills/models.py
1
import datetime import mongoengine as db class Audit(db.Document): owner = db.ReferenceField('User') created_date = db.DateTimeField(default=datetime.datetime.utcnow) commercial = db.IntField() digital = db.IntField() delivery = db.IntField() leadership = db.IntField()
ibelem/crosswalk-test-suite
refs/heads/master
webapi/tct-csp-w3c-tests/csp-py/csp_frame-src_cross-origin_blocked_int-manual.py
30
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "frame-src " + url1 ...
jchevin/MissionPlanner-master
refs/heads/master
Lib/doctest.py
41
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
Tesora/tesora-horizon
refs/heads/master
openstack_dashboard/enabled/_1410_network_panel_group.py
43
from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'network' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Network') # The slug of the dashboard the PANEL_GROUP associated with. Required. PANEL_GROUP_DASH...
ftomassetti/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/dontSuggestBuiltinTypeNames.py
166
"foo <caret>bar"
Hybrid-Cloud/Hybrid-Cloud-Patches-For-Tricircle
refs/heads/master
hybrid-cloud/neutron/agent/l3_agent.py
1
# Copyright 2012 VMware, 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 a...
xliux/chess
refs/heads/master
third_party/gtest-1.7.0/test/gtest_test_utils.py
1100
#!/usr/bin/env python # # Copyright 2006, 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...
hn5092/hadoop-common
refs/heads/HADOOP-3628
src/examples/python/WordCount.py
123
# # 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...
YingHsuan/termite_data_server
refs/heads/master
web2py/applications-original/admin/languages/pt.py
19
# coding: utf8 { '!langcode!': 'pt', '!langname!': 'Português', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novo_valor\'". Não é permitido atualizar ou apagar resultados de um JOIN', '%Y-%m-%d': '%d...
chauhanhardik/populo_2
refs/heads/master
openedx/core/djangoapps/credit/serializers.py
37
""" Credit API Serializers """ from rest_framework import serializers from openedx.core.djangoapps.credit.models import CreditCourse class CreditCourseSerializer(serializers.ModelSerializer): """ CreditCourse Serializer """ class Meta(object): # pylint: disable=missing-docstring model = CreditCour...
aksaxena80/test
refs/heads/master
tensorflow/python/kernel_tests/reshape_op_test.py
5
"""Tests for tensorflow.ops.reshape_op.""" from __future__ import print_function import tensorflow.python.platform import numpy as np import tensorflow as tf from tensorflow.python.kernel_tests import gradient_checker as gc class ReshapeTest(tf.test.TestCase): def _testReshape(self, x, y, use_gpu=False): wit...
ppokrovsky/pyvdp
refs/heads/master
pyvdp/pav/__init__.py
1
from .models import CardValidationModel
elipapa/kubernetes
refs/heads/master
translations/extract.py
23
#!/usr/bin/env python # Copyright 2017 The Kubernetes 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 appli...
bulislaw/mbed-os
refs/heads/master
tools/test/config_test/test02/test_data.py
38
# This is similar to test1, but this time B2 also inherits from B1, which allows it to override its config data. # B2 also overrides base1_2, like D1. # The order of inheritace in F is also reversed ([D1, B2] instead of [B2, D1]) # Since the last override of base1_2 in inheritance order is in B2, base1_2 must now # hav...
jjmachan/activityPointsApp
refs/heads/master
activitypoints/lib/python3.5/site-packages/pip/_vendor/requests/certs.py
516
#!/usr/bin/env python # -*- coding: utf-8 -*- """ requests.certs ~~~~~~~~~~~~~~ This module returns the preferred default CA certificate bundle. If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definition of where() to return a separately packaged CA bundle. ...
AndrewPeelMV/Blender2.78c
refs/heads/master
2.78/scripts/startup/bl_ui/properties_material.py
4
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
ChanChiChoi/scikit-learn
refs/heads/master
sklearn/decomposition/base.py
313
"""Principal Component Analysis Base Classes""" # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <d.engemann@fz-juelich.de> # Kyle Kastner <kastnerkyle@gmail.com> # # Licen...
AzamYahya/shogun
refs/heads/develop
examples/undocumented/python_modular/classifier_svmocas_modular.py
17
#!/usr/bin/env python traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_twoclass.dat' parameter_list = [[traindat,testdat,label_traindat,0.9,1e-5,1],[traindat,testdat,label_traindat,0.8,1e-5,1]] def classifier_svmocas_modular (train_fname=traindat,test_f...
roopali8/tempest
refs/heads/master
tempest/api/compute/security_groups/test_security_group_rules_negative.py
11
# Copyright 2013 Huawei Technologies Co.,LTD. # 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 # # Unl...
nsnam/ns-3-dev-git
refs/heads/master
src/openflow/test/examples-to-run.py
4
#! /usr/bin/env python3 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). # # See test.py for more ...
bevacqua/yowsup
refs/heads/master
src/Yowsup/Common/Http/warequest.py
18
''' Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com> 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, modify, merg...
ajgallegog/gem5_arm
refs/heads/master
ext/ply/example/GardenSnake/GardenSnake.py
166
# GardenSnake - a parser generator demonstration program # # This implements a modified version of a subset of Python: # - only 'def', 'return' and 'if' statements # - 'if' only has 'then' clause (no elif nor else) # - single-quoted strings only, content in raw format # - numbers are decimal.Decimal instances (not ...
rmanzano-sps/is210-week-03-synthesizing
refs/heads/master
task_03.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- """Provides Napoleon's great statement.""" NAPOLEON = "Able was I, ere I saw Elba." REVERSED = NAPOLEON[::-1] REVERSED = REVERSED.lower()
40223112/2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/_weakrefset.py
766
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard: # This context manager registers itself in the current iterators of the # weak container, such ...
freeman-lab/dask
refs/heads/master
dask/distributed/__init__.py
13
from .worker import Worker from .scheduler import Scheduler from .client import Client from .ipython_utils import dask_client_from_ipclient
GunoH/intellij-community
refs/heads/master
python/testData/codeInsight/mlcompletion/prev2calls/sysStdinReadlinesIter.py
10
import sys for line in sys.stdin.<caret>: print(line)
chokribr/invenio
refs/heads/master
invenio/modules/communities/models.py
6
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014, 2015 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 optio...
rackerlabs/instrumented-ceilometer
refs/heads/master
ceilometer/storage/impl_log.py
1
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.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 # # ...
kalahbrown/HueBigSQL
refs/heads/master
desktop/core/ext-py/Django-1.6.10/extras/csrf_migration_helper.py
59
#!/usr/bin/env python # This script aims to help developers locate forms and view code that needs to # use the new CSRF protection in Django 1.2. It tries to find all the code that # may need the steps described in the CSRF documentation. It does not modify # any code directly, it merely attempts to locate it. Deve...
cloudbase/nova-virtualbox
refs/heads/virtualbox_driver
nova/tests/unit/scheduler/filters/test_affinity_filters.py
4
# 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 # d...
ZazieTheBeast/oscar
refs/heads/master
src/oscar/apps/dashboard/pages/config.py
58
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class PagesDashboardConfig(AppConfig): label = 'pages_dashboard' name = 'oscar.apps.dashboard.pages' verbose_name = _('Pages dashboard')
watsonyanghx/CS231n
refs/heads/master
assignment3/cs231n/im2col.py
53
import numpy as np def get_im2col_indices(x_shape, field_height, field_width, padding=1, stride=1): # First figure out what the size of the output should be N, C, H, W = x_shape assert (H + 2 * padding - field_height) % stride == 0 assert (W + 2 * padding - field_height) % stride == 0 out_height = (H + 2 * ...
tijko/Project-Euler
refs/heads/master
py_solutions_61-70/Euler_69.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Euler's Totient Function from __future__ import print_function, division import math import timeit try: range = xrange except NameError: pass def is_prime(x): if x == 2: return True if x % 2 == 0 or x == 1: return False for i in ...
nan86150/ImageFusion
refs/heads/master
lib/python2.7/site-packages/pip/utils/__init__.py
186
from __future__ import absolute_import import contextlib import errno import locale import logging import re import os import posixpath import shutil import stat import subprocess import sys import tarfile import zipfile from pip.exceptions import InstallationError from pip.compat import console_to_str, stdlib_pkgs f...
ecobost/pipeline
refs/heads/master
python/pipeline/legacy/aod_monet.py
6
import datajoint as dj schema = dj.schema('pipeline_aod_monet', locals())
EUDAT-B2SHARE/invenio-old
refs/heads/next
modules/bibexport/lib/bibexport_method_sitemap.py
5
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2008, 2010, 2011 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 yo...
ake-koomsin/mapnik_nvpr
refs/heads/master
scons/scons-local-2.2.0/SCons/Tool/JavaCommon.py
14
"""SCons.Tool.JavaCommon Stuff for processing Java. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software...
pombredanne/invenio-old
refs/heads/master
modules/websession/lib/session.py
3
# -*- coding: utf-8 -*- ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS 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 ...
asedunov/intellij-community
refs/heads/master
python/testData/intentions/numpyDocStub_after.py
53
def f(x, y): """ Parameters ---------- x y Returns ------- """ return 42
RPi-Distro/python-gpiozero
refs/heads/master
docs/examples/multi_room_motion_alert.py
2
from gpiozero import LEDBoard, MotionSensor from gpiozero.pins.pigpio import PiGPIOFactory from gpiozero.tools import zip_values from signal import pause ips = ['192.168.1.3', '192.168.1.4', '192.168.1.5', '192.168.1.6'] remotes = [PiGPIOFactory(host=ip) for ip in ips] leds = LEDBoard(2, 3, 4, 5) # leds on this pi s...