repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
zadgroup/edx-platform
refs/heads/master
openedx/core/djangoapps/user_api/urls.py
81
""" Defines the URL routes for this app. """ from .accounts.views import AccountView from .preferences.views import PreferencesView, PreferencesDetailView from django.conf.urls import patterns, url USERNAME_PATTERN = r'(?P<username>[\w.+-]+)' urlpatterns = patterns( '', url( r'^v1/accounts/' + USERN...
Reality9/spiderfoot
refs/heads/master
ext/dns/rdtypes/IN/A.py
100
# Copyright (C) 2003-2007, 2009-2011 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 "...
openstack/blazar
refs/heads/master
blazar/db/migration/alembic_migrations/versions/75a74e4539cb_update_lease_status.py
3
# Copyright 2018 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
gengwg/leetcode
refs/heads/master
006_zigzag_conversion.py
1
""" 6. ZigZag Conversion The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSIIGYIR" Write the code that will take a stri...
jotes/moto
refs/heads/master
moto/s3bucket_path/urls.py
6
from __future__ import unicode_literals from .responses import S3BucketPathResponseInstance as ro url_bases = [ "https?://s3.amazonaws.com" ] def bucket_response2(*args): return ro.bucket_response(*args) def bucket_response3(*args): return ro.bucket_response(*args) url_paths = { '{0}/$': bucket_re...
Elettronik/SickRage
refs/heads/master
lib/hachoir_metadata/image.py
73
from hachoir_metadata.metadata import (registerExtractor, Metadata, RootMetadata, MultipleMetadata) from hachoir_parser.image import ( BmpFile, IcoFile, PcxFile, GifFile, PngFile, TiffFile, XcfFile, TargaFile, WMF_File, PsdFile) from hachoir_parser.image.png import getBitsPerPixel as pngBitsPerPixel from ha...
dontnod/weblate
refs/heads/master
weblate/checks/format.py
1
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2019 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...
kmatzen/ansible
refs/heads/devel
contrib/inventory/apache-libcloud.py
151
#!/usr/bin/env python # (c) 2013, Sebastien Goasguen <runseb@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 published by # the Free Software Foundation, either version 3 of the License, or # (at ...
lz1988/company-site
refs/heads/master
tests/regressiontests/select_related_onetoone/models.py
45
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class User(models.Model): username = models.CharField(max_length=100) email = models.EmailField() def __str__(self): return self.username @python_2_unicode_compatible class Us...
noisemaster/AdamTestBot
refs/heads/master
unidecode/x004.py
249
data = ( 'Ie', # 0x00 'Io', # 0x01 'Dj', # 0x02 'Gj', # 0x03 'Ie', # 0x04 'Dz', # 0x05 'I', # 0x06 'Yi', # 0x07 'J', # 0x08 'Lj', # 0x09 'Nj', # 0x0a 'Tsh', # 0x0b 'Kj', # 0x0c 'I', # 0x0d 'U', # 0x0e 'Dzh', # 0x0f 'A', # 0x10 'B', # 0x11 'V', # 0x12 'G', # 0x...
selste/micropython
refs/heads/master
tests/pyb/timer_callback.py
14
# check callback feature of the timer class import pyb from pyb import Timer # callback function that disables the callback when called def cb1(t): print("cb1") t.callback(None) # callback function that disables the timer when called def cb2(t): print("cb2") t.deinit() # callback where cb4 closes ...
noba3/KoTos
refs/heads/master
addons/plugin.video.mega/resources/lib/requests/packages/charade/latin1prober.py
950
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
openstack/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/networks/subnets/tables.py
1
# Copyright 2012 NEC Corporation # # 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 ag...
partofthething/home-assistant
refs/heads/dev
homeassistant/components/co2signal/sensor.py
13
"""Support for the CO2signal platform.""" import logging import CO2Signal import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_LATITUDE, CONF_LONGITUDE, CONF_TOKEN, ENERGY_KILO_WATT_HOUR, ) import homeassistan...
jirikuncar/invenio-search
refs/heads/master
invenio_search/searchext/units/fulltext.py
9
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 option) any...
sbt9uc/osf.io
refs/heads/develop
website/settings/__init__.py
24
# -*- coding: utf-8 -*- '''Consolidates settings from defaults.py and local.py. :: >>> from website import settings >>> settings.MAIL_SERVER 'smtp.sendgrid.net' ''' from .defaults import * try: from .local import * except ImportError as error: raise ImportError("No local.py settings file found. Di...
SummerLW/Perf-Insight-Report
refs/heads/test
dashboard/dashboard/task_runner.py
1
# 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. """A tool to run long running tasks. This allows a task to run in Task Queue which gives about 10 minutes execution time. Usage: In https://chromeperf.app...
InsightSoftwareConsortium/ITKExamples
refs/heads/master
src/Core/Common/CreateGaussianKernel/Code.py
1
#!/usr/bin/env python # Copyright NumFOCUS # # 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.txt # # Unless required by applicable law or ...
FedeMPouzols/Savu
refs/heads/master
savu/test/travis/plugin_tests/filter_tests/quantisation_filter_test.py
2
# -*- coding: utf-8 -*- # Copyright 2016 Diamond Light Source 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 ap...
alex-jerez/gfysound
refs/heads/master
gfysound/gfysound/wsgi.py
2
""" WSGI config for gfysound project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
heeraj123/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/pagination/tests.py
41
from __future__ import absolute_import, unicode_literals from datetime import datetime from django.core.paginator import (Paginator, EmptyPage, InvalidPage, PageNotAnInteger) from django.test import TestCase from django.utils import six from django.utils import unittest from .models import Article class Pagina...
aurofable/medhack-server
refs/heads/master
venv/lib/python2.7/encodings/iso8859_8.py
593
""" Python Character Mapping Codec iso8859_8 generated from 'MAPPINGS/ISO8859/8859-8.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
1013553207/django
refs/heads/master
django/templatetags/l10n.py
337
from django.template import Library, Node, TemplateSyntaxError from django.utils import formats from django.utils.encoding import force_text register = Library() @register.filter(is_safe=False) def localize(value): """ Forces a value to be rendered as a localized value, regardless of the value of ``setti...
lmregus/Portfolio
refs/heads/master
python/design_patterns/env/lib/python3.7/site-packages/pip/_vendor/requests/exceptions.py
48
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from pip._vendor.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request. ...
Ztiany/CodeRepository
refs/heads/master
Python/Python3-Base/10_File/files.py
2
# 演示文件操作 # 用with方式打开文件不需要关闭,运行时会自动关闭 with open('a.txt', 'r', encoding='utf8') as file_a: for line in file_a: print(line.rstrip()) # 一般的方式 file_a = open('a.txt', 'r', encoding='utf8') for line in file_a: print(line.rstrip()) file_a.close() # 写文件 file_a = open('a.txt', 'a+', encoding='utf8') file_a.wri...
rgom/Pydev
refs/heads/development
plugins/org.python.pydev.refactoring/tests/python/rewriter/testIf5.py
8
if random(): if random(): if random(): if random(): pass print "foo" else: print "foo" print "foo" else: print "foo" ##r if random(): if random(): if random(): if random(): pass print "foo...
raphaelmerx/django-rest-framework
refs/heads/master
tests/test_bound_fields.py
75
from rest_framework import serializers class TestSimpleBoundField: def test_empty_bound_field(self): class ExampleSerializer(serializers.Serializer): text = serializers.CharField(max_length=100) amount = serializers.IntegerField() serializer = ExampleSerializer() ...
drunknbass/plexpy
refs/heads/master
lib/enum/__init__.py
196
"""Python Enumerations""" import sys as _sys __all__ = ['Enum', 'IntEnum', 'unique'] version = 1, 0, 4 pyver = float('%s.%s' % _sys.version_info[:2]) try: any except NameError: def any(iterable): for element in iterable: if element: return True return False try:...
barnsnake351/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/284_placeholder.py
830
# 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...
xushiwei/nova
refs/heads/master
nova/tests/notifier/test_list_notifier.py
4
# Copyright 2011 OpenStack LLC. # 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 b...
Eric-Xie/ECS
refs/heads/master
energy_saving/client_wrapper.py
1
from novaclient import client as nova_client from ironicclient import client as ironic_client class IronicClientWrapper(object): def get_client(self, config): version = int(config.get('ironic', 'api_version')) kwargs = {'os_username': config.get('ironic', 'admin_username'), 'os_p...
annayqho/TheCannon
refs/heads/master
code/apokasc_lamost/kepler.py
1
def load_labels(filename="example_apokasc/apokasc_all_ages.txt", apogee_ids): print("Loading reference labels from file %s" %filename) searchIn = np.loadtxt(filename, usecols=(0,), dtype=str) labels = np.loadtxt( "example_apokasc/apokasc_all_ages.txt", dtype='float', usecols=(1,2,3,...
minhphung171093/GreenERP_V9
refs/heads/master
openerp/addons/l10n_ae/__openerp__.py
29
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>) { 'name': 'U.A.E. - Accounting', 'version': '1.0', 'author': 'Tech Receptives', 'website': 'http://www.techreceptives.com', 'categ...
poiati/django-outbox
refs/heads/master
django_outbox/views.py
1
from django.views.generic import TemplateView from .outbox import Outbox class OutboxTemplateView(TemplateView): template_name = 'django_outbox/outbox.html' def get_context_data(self, **kwargs): context = super(OutboxTemplateView, self).get_context_data(**kwargs) context['mails'] = Outbox()....
ksmaheshkumar/gitfs
refs/heads/master
gitfs/views/__init__.py
3
# Copyright 2014 PressLabs SRL # # 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,...
sandeepgupta2k4/tensorflow
refs/heads/master
tensorflow/python/framework/versions_test.py
164
# 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...
neurodata/ndstore
refs/heads/master
ndproj/cassprojdb.py
2
# Copyright 2014 NeuroData (http://neurodata.io) # # 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 ag...
Servir-Mekong/SurfaceWaterTool
refs/heads/master
lib/pyasn1/type/char.py
11
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # import sys from pyasn1 import error from pyasn1.type import tag from pyasn1.type import univ __all__ = ['NumericString', 'PrintableString', 'TeletexString', 'T61...
uhuramedia/django-experiments
refs/heads/master
experiments/migrations/0001_initial.py
4
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() class Migration(SchemaMigration): def forwa...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/dressed_padawan_wke_02.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/ship/crafted/weapon/max_damage_intensifier_mk5.py
85615
import sys def setup(core, object): return
fjxhkj/PTVS
refs/heads/master
Python/Tests/TestData/Grammar/DecoratorsIllegal.py
18
@fob fob = 1
owers19856/django-cms
refs/heads/develop
cms/test_utils/project/emailuserapp/migrations/0002_auto_20150419_1745.py
49
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('emailuserapp', '0001_initial'), ] operations = [ migrations.AlterField( model_name='emailuser', name...
Sbalbp/DIRAC
refs/heads/integration
Core/scripts/dirac-install-service.py
7
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-install-service # Author : Ricardo Graciani ######################################################################## """ Do the initial installation and configuration of a DIRAC service """ __RC...
javier-ruiz-b/docker-rasppi-images
refs/heads/master
raspberry-google-home/env/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/x448.py
4
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography import utils from cryptography.hazmat.backends.openssl....
bright-pan/smartlock2
refs/heads/master
bsp/lm3s8962/rtconfig.py
36
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL = 'keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') #device options PART_TYPE = 'PART_LM3S8962' if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' elif CROSS_TOOL == 'kei...
vlachoudis/sl4a
refs/heads/master
python-build/python-libs/gdata/samples/oauth/oauth_on_appengine/appengine_utilities/paginator.py
129
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
rickerc/nova_audit
refs/heads/cis-havana-staging
nova/scheduler/weights/ram.py
25
# 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 ...
bodi000/odoo
refs/heads/master
addons/product/_common.py
111
# -*- 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...
tomfotherby/ansible-modules-core
refs/heads/devel
cloud/openstack/_quantum_subnet.py
129
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
datenbetrieb/odoo
refs/heads/8.0
addons/website/models/ir_actions.py
363
# -*- coding: utf-8 -*- import urlparse from openerp.http import request from openerp.osv import fields, osv class actions_server(osv.Model): """ Add website option in server actions. """ _name = 'ir.actions.server' _inherit = ['ir.actions.server'] def _compute_website_url(self, cr, uid, id, websit...
kua-hosi-GRUp/Flask-Bones
refs/heads/master
manage.py
1
from app import create_app, config from app.data import db, populate_db from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.script import ( Server, Shell, Manager, prompt_bool, ) def _make_context(): return dict( app=create_app(config.dev_config), db=db, po...
FusionSP/android_external_chromium_org
refs/heads/lp5.1
chrome/common/extensions/docs/server2/jsc_view.py
25
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from copy import copy import logging import posixpath from api_models import GetNodeCategories from api_schema_graph import APINodeCursor from docs_server_u...
abaditsegay/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32com/test/testExplorer.py
17
# testExplorer - import string import sys import os import win32com.client.dynamic import win32api import glob import pythoncom import time from util import CheckClean bVisibleEventFired = 0 class ExplorerEvents: def OnVisible(self, visible): global bVisibleEventFired bVisibleEventFired = 1 def ...
shashi/JuliaBox
refs/heads/master
engine/src/juliabox/db/__init__.py
5
__author__ = 'tan' from db_base import JBoxDB, JBPluginDB, JBoxDBItemNotFound from user_v2 import JBoxUserV2 from container import JBoxSessionProps from dynconfig import JBoxDynConfig from api_spec import JBoxAPISpec from juliabox.cloud import Compute from juliabox.jbox_util import JBoxCfg def configure(): JBoxDB...
IDEALLab/domain_expansion_jmd_2017
refs/heads/master
exp_novelty.py
1
""" Active Domain Expansion for the novelty discovery examples Author(s): Wei Chen (wchen459@umd.edu) """ import math import numpy as np from sklearn.neighbors import KernelDensity from sklearn.metrics.pairwise import pairwise_distances from sklearn.gaussian_process.kernels import RBF from scipy.stats import norm im...
filipr/hermes
refs/heads/master-3.1
doc/exts/sourcecode.py
4
""" The Pygments reStructuredText directive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This fragment is a Docutils_ 0.4 directive that renders source code (to HTML only, currently) via Pygments. To use it, adjust the options below and copy the code into a module that you import on initialization....
Iolaum/MrSmith
refs/heads/master
AdX/src/main/cpp/reserve-price-payground/protobuf-2.5.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...
hkupty/python-mode
refs/heads/develop
pymode/rope.py
8
""" Rope support in pymode. """ from __future__ import absolute_import, print_function import multiprocessing import os.path import re import site import sys from rope.base import project, libutils, exceptions, change, worder # noqa from rope.base.fscommands import FileSystemCommands # noqa from rope.base.taskhandle ...
Grirrane/odoo
refs/heads/master
addons/marketing_campaign/__openerp__.py
7
# -*- 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...
GDGLima/contentbox
refs/heads/master
third_party/django/core/management/commands/shell.py
116
import os from django.core.management.base import NoArgsCommand from optparse import make_option class Command(NoArgsCommand): shells = ['ipython', 'bpython'] option_list = NoArgsCommand.option_list + ( make_option('--plain', action='store_true', dest='plain', help='Tells Django to use pl...
WoodResourcesGroup/EPIC_AllPowerLabs
refs/heads/master
sandbox/PW_ex.py
2
# !/usr/bin/env python # -*- coding: utf-8 -*- # Deployment model for distributed gasifiers # Jose Daniel Lara from __future__ import division from pyomo.environ import * import googlemaps import matplotlib.pyplot as plt size = [1, 2, 3, 5, 10] cost = [5000, 6500, 7500, 9300, 13000] model = ConcreteModel() def sl...
be-cloud-be/horizon-addons
refs/heads/9.0
web/setup/web_widget_x2many_2d_matrix/odoo_addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
thaim/ansible
refs/heads/fix-broken-link
lib/ansible/modules/network/icx/icx_banner.py
19
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
thousandsofthem/FrameworkBenchmarks
refs/heads/master
toolset/test/test-run-tests.py
56
#!/usr/bin/env python import argparse import ConfigParser import sys import os import multiprocessing import itertools import copy import subprocess from pprint import pprint from benchmark.benchmarker import Benchmarker from setup.linux.unbuffered import Unbuffered from setup.linux import setup_util from run-tests ...
vvc/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/tools/gyp/test/ios/app-bundle/TestApp/check_no_signature.py
241
#!/usr/bin/python import os import subprocess import sys p = os.path.join(os.environ['BUILT_PRODUCTS_DIR'],os.environ['EXECUTABLE_PATH']) proc = subprocess.Popen(['codesign', '-v', p], stderr=subprocess.STDOUT, stdout=subprocess.PIPE) o = proc.communicate()[0].strip() if "code object is not si...
CLARIAH-SDH/iribaker
refs/heads/master
setup.py
1
from setuptools import setup setup(name='iribaker', version='0.1.3', description='Safely convert IRI-like string to IRI.\nReplaces invalid charactes with an underscore (i.e. does not support roundtripping).\nFalls back to standard URL percent encoding.', url='http://github.com/clariah-sdh/iribaker', ...
40223208/CDB-Final-
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/xml/dom/NodeFilter.py
926
# This is the Python mapping for interface NodeFilter from # DOM2-Traversal-Range. It contains only constants. class NodeFilter: """ This is the DOM2 NodeFilter interface. It contains only constants. """ FILTER_ACCEPT = 1 FILTER_REJECT = 2 FILTER_SKIP = 3 SHOW_ALL = 0x...
fumen/gae-fumen
refs/heads/master
lib/pyasn1_modules/rfc1902.py
127
# # SNMPv2c message syntax # # ASN.1 source from: # http://www.ietf.org/rfc/rfc1902.txt # from pyasn1.type import univ, namedtype, namedval, tag, constraint class Integer(univ.Integer): subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( -2147483648, 2147483647 ) class Integer3...
samuelhavron/heroku-buildpack-python
refs/heads/master
Python-3.4.3/Lib/lib2to3/tests/data/crlf.py
284
print "hi" print "Like bad Windows newlines?"
axbaretto/beam
refs/heads/master
sdks/python/apache_beam/io/gcp/big_query_query_to_table_pipeline.py
5
# # 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 us...
iivic/BoiseStateX
refs/heads/master
lms/djangoapps/instructor/hint_manager.py
110
""" Views for hint management. Get to these views through courseurl/hint_manager. For example: https://courses.edx.org/courses/MITx/2.01x/2013_Spring/hint_manager These views will only be visible if FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True """ import json import re from django.http import HttpResponse, Http...
michaelgallacher/intellij-community
refs/heads/master
python/lib/Lib/Cookie.py
91
#!/usr/bin/env python # #### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in ...
dfang/odoo
refs/heads/10.0
addons/website/models/web_planner.py
34
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from odoo import api, models class WebsitePlanner(models.Model): _inherit = 'web.planner' @api.model def _get_planner_application(self): planner = super(WebsitePlanner, self)._get_plan...
EPDCenterSpain/kernel_rikomagic_mk808
refs/heads/master
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
CTSRD-SOAAP/chromium-42.0.2311.135
refs/heads/master
native_client/tests/gdb/invalid_memory.py
12
# -*- python -*- # Copyright (c) 2013 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import gdb_test class InvalidMemoryTest(gdb_test.GdbTest): def test_invalid_memory(self): self.gdb.ExpectToFailCommand('x ...
Gamebasis/3DGamebasisServer
refs/heads/master
GameData/blender-2.71-windows64/2.71/python/lib/encodings/rot_13.py
7
#!/usr/bin/env python """ Python Character Mapping Codec for ROT13. This codec de/encodes from str to str and is therefore usable with str.transform() and str.untransform(). Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self, input, erro...
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v22/tests/mutually_referential/tests.py
581
from django.test import TestCase from .models import Parent class MutuallyReferentialTests(TestCase): def test_mutually_referential(self): # Create a Parent q = Parent(name='Elizabeth') q.save() # Create some children c = q.child_set.create(name='Charles') q.chil...
lrr-tum/mmbwmon
refs/heads/master
vendor/fast-lib/vendor/mosquitto-1.4.12/misc/currentcost/gnome-panel/CurrentCostMQTT.py
10
#!/usr/bin/env python import gnomeapplet import gtk import mosquitto import sys class CurrentCostMQTT(gnomeapplet.Applet): def on_message(self, mosq, obj, msg): # Message format is "power" self.label.set_text(msg.payload+"W") def set_label(self, val): self.label.set_text(val) def...
ar45/django-classy-settings
refs/heads/master
tests/test_apply.py
2
import unittest import cbs class AttrSettings(): PROJECT_NAME = 'fancy_project' class MethodSettings(): def PROJECT_NAME(self): return 'fancy_project' class TestApply(unittest.TestCase): def test_apply_settings_attr(self): g = {} cbs.apply(AttrSettings, g) self.assert...
sebrandon1/nova
refs/heads/master
nova/policies/scheduler_hints.py
6
# Copyright 2016 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...
meliora000/eb_django_app
refs/heads/master
django_eb/comment/admin.py
13848
from django.contrib import admin # Register your models here.
PLyczkowski/Sticky-Keymap
refs/heads/master
2.74/python/lib/site-packages/requests/packages/chardet/euckrprober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
TangHao1987/intellij-community
refs/heads/master
python/testData/resolve/multiFile/modulePrivateName/ModulePrivateName.py
160
from ImportedFile import * _private_name # <ref>
aasoliz/Bitcoin-Statistics
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py
152
from __future__ import absolute_import from contextlib import contextmanager import zlib import io from socket import timeout as SocketTimeout from socket import error as SocketError from ._collections import HTTPHeaderDict from .exceptions import ( ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked ...
yuezhou/telephony
refs/heads/master
telephony/Classes/pjproject-2.2.1/tests/pjsua/scripts-sendto/300_srtp_duplicated_crypto_tag.py
59
# $Id: 300_srtp_duplicated_crypto_tag.py 2036 2008-06-20 17:43:55Z nanang $ import inc_sip as sip import inc_sdp as sdp sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=tester c=IN IP4 127.0.0.1 t=0 0 m=audio 4000 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=sendrecv a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=crypto:1 AES_...
dcorbacho/libcloud
refs/heads/trunk
libcloud/test/compute/test_digitalocean_v2.py
20
# 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 ...
carlitolucasg/carlitolucasg.github.io
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
1825
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
HuygensING/bioport-site
refs/heads/master
bioport/comments.py
2
########################################################################## # Copyright (C) 2009 - 2014 Huygens ING & Gerbrandy S.R.L. # # This file is part of bioport. # # bioport 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 ...
mshafiq9/django
refs/heads/master
tests/admin_views/models.py
110
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import tempfile from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.e...
geopython/OWSLib
refs/heads/master
owslib/coverage/wcs110.py
3
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2004, 2006 Sean C. Gillies # Copyright (c) 2007 STFC <http://www.stfc.ac.uk> # # Authors : # Dominic Lowe <d.lowe@rl.ac.uk> # # Contact email: d.lowe@rl.ac.uk # ========================...
alessandrolandim/liblightbase
refs/heads/master
liblightbase/lbbase/lbstruct/properties.py
4
# -*- coding: utf-8 -*- from liblightbase.lbtypes import standard class Index(object): """ The index property is the classification of a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes and the use of more storage space to maint...
mwytock/cvxpy
refs/heads/master
cvxpy/constraints/soc_axis.py
1
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
jamesyli/solum
refs/heads/master
solum/tests/api/handlers/test_component.py
3
# -*- coding: utf-8 -*- # # 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, soft...
opensourcechipspark/platform_external_chromium_org
refs/heads/master
third_party/protobuf/python/google/protobuf/__init__.py
20578
CodEnFisH/palantir
refs/heads/master
hadoop/contrib/hod/hodlib/ServiceRegistry/serviceRegistry.py
182
#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 thi...
datenbetrieb/odoo
refs/heads/8.0
addons/account_budget/__init__.py
444
# -*- 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...
wdv4758h/ZipPy
refs/heads/master
lib-python/3/importlib/test/builtin/test_finder.py
51
from importlib import machinery from .. import abc from .. import util from . import util as builtin_util import sys import unittest class FinderTests(abc.FinderTests): """Test find_module() for built-in modules.""" def test_module(self): # Common case. with util.uncache(builtin_util.NAME): ...
40123248/2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/unittest/util.py
794
"""Various utility functions.""" from collections import namedtuple, OrderedDict __unittest = True _MAX_LENGTH = 80 def safe_repr(obj, short=False): try: result = repr(obj) except Exception: result = object.__repr__(obj) if not short or len(result) < _MAX_LENGTH: return result ...
jjenki11/blaze-chem-rendering
refs/heads/master
build_utils/scons-2.3.0/build/lib.linux-i686-2.7/SCons/Tool/mingw.py
11
"""SCons.Tool.gcc Tool-specific initialization for MinGW (http://www.mingw.org/) There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ...