repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
epssy/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/admin_widgets/urls.py
150
from __future__ import absolute_import from django.conf.urls import patterns, include from . import widgetadmin urlpatterns = patterns('', (r'^', include(widgetadmin.site.urls)), )
FrankBian/kuma
refs/heads/master
vendor/packages/sqlparse/sqlparse/filters.py
6
# -*- coding: utf-8 -*- import re from sqlparse.engine import grouping from sqlparse import tokens as T from sqlparse import sql class Filter(object): def process(self, *args): raise NotImplementedError class TokenFilter(Filter): def process(self, stack, stream): raise NotImplementedErro...
Jayflux/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/pytest/_pytest/assertion/rewrite.py
14
"""Rewrite assertion AST to produce nice error messages""" from __future__ import absolute_import, division, print_function import ast import _ast import errno import itertools import imp import marshal import os import re import six import struct import sys import types import py from _pytest.assertion import util ...
tmikov/jscomp
refs/heads/develop
runtime/deps/gyp/test/win/gyptest-link-embed-manifest.py
244
#!/usr/bin/env python # Copyright (c) 2013 Yandex LLC. 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 manifests are embedded in binaries properly. Handling of AdditionalManifestFiles is tested too. """ import TestGyp import sy...
sy0302/lammps_qtb
refs/heads/master
tools/moltemplate/src/nbody_alternate_symmetry/gaff_imp.py
19
from nbody_graph_search import Ugraph # This file defines how improper interactions are generated in AMBER (GAFF). # To use it, add "(gaff_imp.py)" to the name of the "Data Impropers By Type" # section, and make sure this file is located in the "common" directory. # For example: # write_once("Data Impropers By Type (g...
lgiordani/punch
refs/heads/master
punch/vcs_use_cases/release.py
1
from __future__ import print_function, absolute_import, division from punch.vcs_use_cases import use_case class VCSReleaseUseCase(use_case.VCSUseCase): pass
mistio/libcloud
refs/heads/trunk
contrib/trigger_rtd_build.py
6
#!/usr/bin/env python3 # 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 "Lice...
p4datasystems/CarnotKE
refs/heads/master
jyhton/Lib/test/test_zlib_jy.py
23
"""Misc zlib tests Made for Jython. """ import unittest import zlib from array import array from test import test_support class ArrayTestCase(unittest.TestCase): def test_array(self): self._test_array(zlib.compress, zlib.decompress) def test_array_compressobj(self): def compress(value): ...
christianurich/VIBe2UrbanSim
refs/heads/master
3rdparty/opus/src/opus_core/hierarchical_linear_utilities.py
2
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from numpy import ones, zeros, where, compress from opus_core.linear_utilities import linear_utilities class hierarchical_linear_utilities(linear_utilities): """ Class for computi...
pydata/xarray
refs/heads/main
xarray/plot/plot.py
1
""" Use this module directly: import xarray.plot as xplt Or use the methods on a DataArray or Dataset: DataArray.plot._____ Dataset.plot._____ """ import functools import numpy as np import pandas as pd from .facetgrid import _easy_facetgrid from .utils import ( _add_colorbar, _assert_valid_xy, ...
geodrinx/gearthview
refs/heads/master
ext-libs/twisted/words/xish/xmlstream.py
49
# -*- test-case-name: twisted.words.test.test_xmlstream -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ XML Stream processing. An XML Stream is defined as a connection over which two XML documents are exchanged during the lifetime of the connection, one for each direction. The unit o...
svisser/cookiecutter
refs/heads/master
cookiecutter/config.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.config ------------------- Global configuration handling """ from __future__ import unicode_literals import copy import os import io import yaml from .exceptions import ConfigDoesNotExistException from .exceptions import InvalidConfiguration DEFAULT_...
fxfitz/ansible
refs/heads/devel
lib/ansible/modules/network/cumulus/_cl_license.py
33
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_versio...
dhxkgozj/DirEngine
refs/heads/master
lib/capstone/bindings/python/capstone/arm64.py
9
# Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> import ctypes from . import copy_ctypes_list from .arm64_const import * # define the API class Arm64OpMem(ctypes.Structure): _fields_ = ( ('base', ctypes.c_uint), ('index', ctypes.c_uint), ('disp', ctypes.c_int32), ) ...
Cinntax/home-assistant
refs/heads/dev
homeassistant/components/recollect_waste/__init__.py
27
"""The recollect_waste component."""
kmonsoor/python-for-android
refs/heads/master
python3-alpha/python3-src/Doc/includes/sqlite3/simple_tableprinter.py
96
import sqlite3 FIELD_MAX_WIDTH = 20 TABLE_NAME = 'people' SELECT = 'select * from %s order by age, name_last' % TABLE_NAME con = sqlite3.connect("mydb") cur = con.cursor() cur.execute(SELECT) # Print a header. for fieldDesc in cur.description: print(fieldDesc[0].ljust(FIELD_MAX_WIDTH), end=' ') print() # Finish...
7kbird/chrome
refs/heads/master
third_party/cython/src/Cython/Compiler/Visitor.py
90
# cython: infer_types=True # # Tree visitor and transform framework # import inspect from Cython.Compiler import TypeSlots from Cython.Compiler import Builtin from Cython.Compiler import Nodes from Cython.Compiler import ExprNodes from Cython.Compiler import Errors from Cython.Compiler import DebugFlags import cyt...
nekulin/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/BaseHTTPServer.py
59
"""HTTP server base class. Note: the class in this module doesn't implement any HTTP request; see SimpleHTTPServer for simple implementations of GET, HEAD and POST (including CGI scripts). It does, however, optionally implement HTTP/1.1 persistent connections, as of version 0.3. Contents: - BaseHTTPRequestHandler: ...
canglade/NLP
refs/heads/master
logging/cloud-client/export_test.py
4
# Copyright 2016 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 law or a...
mozilla/olympia
refs/heads/master
src/olympia/shelves/migrations/0003_auto_20200720_1509.py
6
# Generated by Django 2.2.14 on 2020-07-20 15:09 from django.db import migrations, models import olympia.shelves.models class Migration(migrations.Migration): dependencies = [ ('shelves', '0002_auto_20200716_1254'), ] operations = [ migrations.AlterField( model_name='shelf',...
acsone/odoo
refs/heads/8.0
addons/website_forum/models/forum.py
233
# -*- coding: utf-8 -*- from datetime import datetime import uuid from werkzeug.exceptions import Forbidden import logging import openerp from openerp import api, tools from openerp import SUPERUSER_ID from openerp.addons.website.models.website import slug from openerp.exceptions import Warning from openerp.osv impo...
eamonnmag/invenio-search
refs/heads/master
docs/_ext/ultramock.py
164
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 later...
abadger/ansible-modules-core
refs/heads/devel
cloud/openstack/os_subnets_facts.py
4
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # 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 late...
viki9698/jizhanggroup
refs/heads/master
django/contrib/gis/gdal/tests/test_srs.py
351
from django.contrib.gis.gdal import SpatialReference, CoordTransform, OGRException, SRSException from django.utils import unittest class TestSRS: def __init__(self, wkt, **kwargs): self.wkt = wkt for key, value in kwargs.items(): setattr(self, key, value) # Some Spatial Reference exam...
eahneahn/free
refs/heads/master
lib/python2.7/site-packages/pygments/scanner.py
365
# -*- coding: utf-8 -*- """ pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like ...
Philippe12/external_chromium_org
refs/heads/kitkat
third_party/protobuf/__init__.py
45382
Hikari-no-Tenshi/android_external_skia
refs/heads/10.0
infra/bots/assets/opencl_ocl_icd_linux/download.py
264
#!/usr/bin/env python # # Copyright 2017 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Download the current version of the asset.""" import common if __name__ == '__main__': common.run('download')
jacquev6/LowVoltage
refs/heads/master
LowVoltage/compounds/tests/__init__.py
2
# coding: utf8 # Copyright 2014-2015 Vincent Jacques <vincent@vincent-jacques.net>
HSU-MilitaryLogisticsClub/pysatcatcher
refs/heads/master
antenna.py
2
# -*- coding: utf-8 -*- import unittest import serial import threading import time class RAC805: def __init__(self): #self._ser = serial.serial('/dev/tty',9600) pass def connect(self,port): self._ser = serial.Serial(port, 9600, timeout=0) def moveazel(self,az,el): if(el>=0...
johnbren85/GrowChinook
refs/heads/master
fisheries/TestSens.py
2
#!/usr/bin/python import os import glob import cgi import PrintPages as pt address = cgi.escape(os.environ["REMOTE_ADDR"]) script = "Sensitivity Form" pt.write_log_entry(script, address) pt.print_header('GrowChinook', 'Sens') pt.print_full_form(None, None, 'Sens_in', 'RunModelSens.py') extension = 'csv' os.chdir('upl...
danylaksono/inasafe
refs/heads/master
safe/impact_functions/test_real_impact_functions.py
5
"""Works with real library impact functions rather than test examples """ import unittest from safe.impact_functions.core import get_admissible_plugins from safe.impact_functions.core import requirements_collect class Test_real_plugins(unittest.TestCase): """Tests of Risiko calculations """ def test_fi...
oscar9/statistics_viewer
refs/heads/master
processmanager/processdirectory/stat14BoxAndWhisker.py
1
# encoding: utf-8 import sys import gvsig from gvsig import geom import addons.statistics_viewer.statisticprocess reload(addons.statistics_viewer.statisticprocess) import addons.statistics_viewer.sv reload(addons.statistics_viewer.sv) from addons.statistics_viewer.sv.svScatterPlot import createPanelMouseListener, cre...
Karel-van-de-Plassche/bokeh
refs/heads/master
bokeh/protocol/__init__.py
8
''' Implement and provide message protocols for communication between Bokeh Servers and clients. ''' from __future__ import absolute_import import logging log = logging.getLogger(__name__) from tornado.escape import json_decode from . import messages from . import versions from .exceptions import ProtocolError cla...
zchking/odoo
refs/heads/8.0
addons/account/wizard/__init__.py
362
# -*- 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...
lumig242/Hue-Integration-with-CDAP
refs/heads/pull3
desktop/core/ext-py/Pygments-1.3.1/pygments/lexer.py
58
# -*- coding: utf-8 -*- """ pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.filter import apply_filters, Filter from pygments.filters import get_filter_by_name ...
MarkTseng/django-farmersale
refs/heads/master
farmersale-env/lib/python2.7/site-packages/django/conf/locale/fy/formats.py
852
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # DATE_FORMAT = # TIME_FORMAT = # DATETIME_FORMA...
forging2012/tornado-demo
refs/heads/master
test009.py
1
import tornado.web class BaseHandler(tornado.web.RequestHandler): def get_current_user(self): return self.get_secure_cookie("user") class MainHandler(BaseHandler): @tornado.web.authenticated def get(self): name = tornado.escape.xhtml_escape(self.current_user) self.write("Hello, " +...
naturali/tensorflow
refs/heads/r0.11
tensorflow/python/training/learning_rate_decay.py
6
# 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...
RCOSDP/waterbutler
refs/heads/nii-mergework-201901
tests/providers/bitbucket/test_metadata.py
1
import pytest from waterbutler.providers.bitbucket.path import BitbucketPath from waterbutler.providers.bitbucket.metadata import BitbucketFileMetadata from waterbutler.providers.bitbucket.metadata import BitbucketFolderMetadata from waterbutler.providers.bitbucket.metadata import BitbucketRevisionMetadata from .fixt...
rschiang/shedskin
refs/heads/master
scripts/checker.py
6
from heapq import * class A(object): def __init__(self, a, hash): self.a = a self._hash = hash def __lt__(self, o): print "%s.__lt__(%s)" % (self.a, o.a) return NotImplemented def __le__(self, o): print "%s.__le__(%s)" % (self.a, o.a) return NotImplemented ...
feigames/Odoo
refs/heads/master
addons/web_graph/__init__.py
1350
import controllers
yank555-lu/N3-Sourcedrops
refs/heads/n9005
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
ljwolf/pysal
refs/heads/master
pysal/spreg/diagnostics_tsls.py
10
""" Diagnostics for two stage least squares regression estimations. """ __author__ = "Luc Anselin luc.anselin@asu.edu, Nicholas Malizia nicholas.malizia@asu.edu " from pysal.common import * from scipy.stats import pearsonr __all__ = ["t_stat", "pr2_aspatial", "pr2_spatial"] def t_stat(reg, z_stat=False):...
thinkopensolutions/geraldo
refs/heads/master
site/newsite/django_1_0/django/contrib/auth/management/__init__.py
12
""" Creates permissions for all installed apps that need permissions. """ from django.dispatch import dispatcher from django.db.models import get_models, signals from django.contrib.auth import models as auth_app def _get_permission_codename(action, opts): return u'%s_%s' % (action, opts.object_name.lower()) def...
arnaud-morvan/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/PolygonsToLines.py
2
# -*- coding: utf-8 -*- """ *************************************************************************** PolygonsToLines.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
suneeth51/neutron
refs/heads/master
neutron/tests/unit/db/quota/test_api.py
4
# Copyright (c) 2015 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 ...
cocagne/zpax
refs/heads/master
zpax/network/zmq_node.py
2
''' This module provides a NetworkNode implementation on top of ZeroMQ sockets. ''' from twisted.internet import defer, task, reactor from zpax.network import zed from zpax.network.channel import Channel class SimpleEncoder(object): ''' An in-process "encoder" that is primarily useful for unit testing. ...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/pylint/test/functional/membership_protocol_py3.py
12
# pylint: disable=missing-docstring,too-few-public-methods,no-init,no-self-use,unused-argument,pointless-statement,expression-not-assigned # metaclasses that support membership test protocol class MetaIterable(type): def __iter__(cls): return iter((1, 2, 3)) class MetaOldIterable(type): def __getitem_...
brandonium21/snowflake
refs/heads/master
snowflakeEnv/lib/python2.7/site-packages/gunicorn/workers/__init__.py
15
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import sys # supported gunicorn workers. SUPPORTED_WORKERS={ "sync": "gunicorn.workers.sync.SyncWorker", "eventlet": "gunicorn.workers.geventlet.EventletWorker", "geve...
quake0day/oj
refs/heads/master
bitSwapRequired.py
1
class Solution: """ @param a, b: Two integer return: An integer """ # def bitSwapRequired(self, a, b): # addition = 0 # if ((a < 0 and b > 0) or (a > 0 and b < 0)): # return 31 # # write your code here # bin_a = bin(a).split("b")[1][::-1] # bin_b = bin(b).sp...
Khan/pyobjc-framework-Cocoa
refs/heads/master
Examples/AppKit/CocoaBindings/ToDos/Category.py
3
# # Category.py # ToDos # # Converted by u.fiedler on 09.02.05. # # The original version was written in Objective-C by Malcolm Crawford # at http://homepage.mac.com/mmalc/CocoaExamples/controllers.html from Foundation import * import objc class Category(NSObject): title = objc.ivar('title') priority = o...
xia0pin9/capstone
refs/heads/next
bindings/python/test_detail.py
2
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * X86_CODE16 = b"\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00" X86_CODE32 = b"\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00" X86_CODE64 = b"\x55\x48\x8b\x05\xb8\...
kanarelo/dairy
refs/heads/master
dairy/core/views.py
1
import json import random from tumasms import Tumasms from django.conf import settings from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import JsonResponse, HttpResponse from django.template.response import TemplateResponse from django.views.decorators.csrf i...
Bitl/RBXLegacy-src
refs/heads/stable
Cut/RBXLegacyDiscordBot/lib/youtube_dl/extractor/odnoklassniki.py
24
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_etree_fromstring, compat_parse_qs, compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, unified_strdate, int_or_none, qua...
sk2/autonetkit
refs/heads/master
autonetkit/load/model.py
1
from typing import List, Optional, Dict from pydantic import BaseModel from autonetkit.network_model.types import DeviceType, PortType, LinkId, PortId, NodeId class StructuredPort(BaseModel): id: Optional[PortId] slot: Optional[int] type: PortType label: Optional[str] data: Optional[Dict] = {} ...
ClearCorp/odoo-clearcorp
refs/heads/9.0
TODO-9.0/account_analytic_extended/__openerp__.py
3
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
cosmo-ethz/CosmoHammer
refs/heads/master
cosmoHammer/util/SampleFileUtil.py
1
import pickle import numpy as np import cosmoHammer.Constants as c class SampleFileUtil(object): """ Util for handling sample files :param filePrefix: the prefix to use :param master: True if the sampler instance is the master :param reuseBurnin: True if the burn in data from a previous run should be used ...
hj3938/panda3d
refs/heads/master
direct/src/motiontrail/MotionTrail.py
8
from panda3d.core import * from panda3d.direct import * from direct.task import Task from direct.showbase.DirectObject import DirectObject def remove_task ( ): if (MotionTrail.task_added): total_motion_trails = len (MotionTrail.motion_trail_list) if (total_motion_trails > 0): print ...
fnouama/intellij-community
refs/heads/master
python/testData/highlighting/docStrings.py
83
# bg is always black. # effect is white # doc comment: blue bold def <info descr="null" type="INFORMATION">foo</info>(): <info descr="null" type="INFORMATION" foreground="0x0000ff" background="0x000000" effectcolor="0xffffff" effecttype="BOXED" fonttype="1">"Func doc string"</info> pass class <info descr="null" ty...
fhaoquan/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/ctypes/macholib/dyld.py
152
""" dyld emulation """ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * __all__ = [ 'dyld_find', 'framework_find', 'framework_info', 'dylib_info', ] # These are the defaults as per man dyld(1) # DEFAULT_FRAMEWORK_FALLBACK = [ ...
rolandovillca/python_introduction_basic
refs/heads/master
web/client_get_with_urllib2.py
4
''' urllib2 - Library for opening URLs A library for opening URLs that can be extended by defining custom protocol handlers. The urllib2 module defines functions and classes which help in opening URLs (mostly HTTP) in a complex world - basic and digest authentication, redirections, cookies and more. The urllib2 modu...
mahak/keystone
refs/heads/master
keystone/common/sql/expand_repo/versions/023_expand_add_second_password_column_for_expanded_hash_sizes.py
2
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
hlzz/dotfiles
refs/heads/master
graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/names/error.py
2
# -*- test-case-name: twisted.names.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Exception class definitions for Twisted Names. """ from __future__ import division, absolute_import from twisted.internet.defer import TimeoutError class DomainError(ValueError): ...
mne-tools/mne-tools.github.io
refs/heads/main
dev/_downloads/166d565c496703ca2cd5bf0481983599/20_cluster_1samp_spatiotemporal.py
10
""" ================================================================= Permutation t-test on source data with spatio-temporal clustering ================================================================= This example tests if the evoked response is significantly different between two conditions across subjects. Here jus...
openpeer/webrtc-gyp
refs/heads/master
test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py
269
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure environment files can be suppressed. """ import TestGyp import os import sys if sys.platform == 'win32': test = TestGyp.T...
pankajp/pyface
refs/heads/master
pyface/ui/qt4/widget.py
3
#------------------------------------------------------------------------------ # Copyright (c) 2007, Riverbank Computing Limited # All rights reserved. # # This software is provided without warranty under the terms of the BSD license. # However, when used with the GPL version of PyQt the additional terms described in ...
etovrodeya/hotel_project2
refs/heads/master
booking/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-28 11:12 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ...
limavicente/py-scripts
refs/heads/master
pesquisa.py
1
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Uso: python pesquisa.py -i /pastacomarquivos/ -p palavra1:palavra2 Pesquisa recursivamente a pasta de origem por arquivos que contenham as palavras informadas. Parametros: -i pasta onde estão os arquivos que serão pesquisados. -p uma ou mais ...
bguillot/OpenUpgrade
refs/heads/master
setup/win32/OpenERPServerService.py
105
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
radlws/AWS-ElasticBeanstalk-CLI
refs/heads/master
eb/linux/python2.7/scli/prompt.py
8
#!/usr/bin/env python # ============================================================================== # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with the License. A copy of th...
dyyi/moneybook
refs/heads/master
venv/Lib/site-packages/pip/_vendor/packaging/version.py
1151
# 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 import collections import itertools import re from ._structures import In...
bambuste/qgis-vfk-plugin
refs/heads/master
budovySearchForm.py
2
# -*- coding: utf-8 -*- """ /*************************************************************************** vfkPluginDialog A QGIS plugin Plugin umoznujici praci s daty katastru nemovitosti ------------------- begin : 2015-06-11 ...
HurtowniaPixeli/pixelcms-server
refs/heads/master
cms/accounts/views.py
1
from django.contrib.auth import get_user_model, authenticate from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.core import signing from django.shortcuts import Http404 from rest_framework.decorators import api_view, permission_classes from rest_framework.response impo...
romankagan/DDBWorkbench
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/gdal/geomtype.py
404
from django.contrib.gis.gdal.error import OGRException #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', 1 : 'Point', 2 ...
Inspq/ansible
refs/heads/inspq
lib/ansible/modules/storage/infinidat/infini_fs.py
69
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Gregory Shulov (gregory.shulov@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...
msiebuhr/v8.go
refs/heads/master
v8/build/gyp/test/hello/gyptest-regyp.py
268
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that Makefiles get rebuilt when a source gyp file changes. """ import TestGyp # Regenerating build files when a gyp file chan...
cloudera/hue
refs/heads/master
desktop/core/ext-py/boto-2.46.1/tests/unit/s3/test_bucketlistresultset.py
22
# -*- coding: utf-8 -*- # Copyright (c) 2016 Mitch Garnaat http://garnaat.org/ # 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 # witho...
PythoO/Contest
refs/heads/master
models.py
1
__author__ = 'pythoo' from app import db
lennox/score_linux
refs/heads/master
tools/perf/util/setup.py
4998
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
Nictec/nictec_website2.0
refs/heads/master
nictecsite/page/apps.py
5
from __future__ import unicode_literals from django.apps import AppConfig class PageConfig(AppConfig): name = 'page'
CJ8664/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/wptserve/stash.py
125
import base64 import json import os import uuid from multiprocessing.managers import BaseManager, DictProxy class ServerDictManager(BaseManager): shared_data = {} def _get_shared(): return ServerDictManager.shared_data ServerDictManager.register("get_dict", callable=_get_shared, ...
npo-poms/scripts
refs/heads/master
python/netinnederlandAddNTRLocations.py
1
#!/usr/bin/env python3 """ """ """Script to add a location """ from npoapi import MediaBackend, MediaBackendUtil as MU import requests import pickle import os.path import time api = MediaBackend().command_line_client() api.add_argument('mid', type=str, nargs=1, help='The mid of the object to handle') args = api.par...
facebookexperimental/eden
refs/heads/master
eden/hg-server/tests/revlog-formatv0.py
2
#!/usr/bin/env python # Copyright 2010 Intevation GmbH # Author(s): # Thomas Arendsen Hein <thomas@intevation.de> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """Create a Mercurial repository in revlog format 0 changeset: 0:...
gonboy/sl4a
refs/heads/master
python/src/Lib/lib2to3/fixes/fix_filter.py
53
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that changes filter(F, X) into list(filter(F, X)). We avoid the transformation if the filter() call is directly contained in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:. NOTE: This...
gizeminci/espresso-1
refs/heads/master
samples/python/cellsystem_test.py
13
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013,2014 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
agrif/django-cannen
refs/heads/master
cannen/tests.py
1
# This file is part of Cannen, a collaborative music player. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This ...
Ronak6892/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_sanitizer.py
430
from __future__ import absolute_import, division, unicode_literals try: import json except ImportError: import simplejson as json from html5lib import html5parser, sanitizer, constants, treebuilders def toxmlFactory(): tree = treebuilders.getTreeBuilder("etree") def toxml(element): # encode...
Code4SA/nearby
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nearby.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
christophlsa/odoo
refs/heads/8.0
addons/edi/__openerp__.py
312
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
kvar/ansible
refs/heads/seas_master_2.9.5
lib/ansible/modules/cloud/cloudstack/cs_iso.py
11
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # 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': ['stableinterface'], 'supported_by': 'com...
meowler/sandbox
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
1284
# 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. import collections import copy import hashlib import json import multiprocessing import os.path import re import signal import subprocess import sys import gyp imp...
rcchan/mongo-web-shell
refs/heads/master
standalone_sample/app.py
7
# Copyright 2013 10gen 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 or agreed to...
yize/grunt-tps
refs/heads/master
tasks/lib/python/Lib/python2.7/cProfile.py
169
#! /usr/bin/env python """Python interface for the 'lsprof' profiler. Compatible with the 'profile' module. """ __all__ = ["run", "runctx", "help", "Profile"] import _lsprof # ____________________________________________________________ # Simple interface def run(statement, filename=None, sort=-1): """Run s...
nlaurance/ninepatch
refs/heads/master
ninepatch/__init__.py
2
#!/usr/bin/env python from PIL import Image from collections import namedtuple import os import re __all__ = ['Ninepatch', 'ScaleError'] content_area = namedtuple('content_area', ['left', 'top', 'right', 'bottom']) class ScaleError(Exception): pass class NinepatchError(Exception): pass def is_even(value...
cc13ny/Allin
refs/heads/master
lintcode/000-Trapping-Rain-Water-II/TrappingRainWaterII_001.py
5
import heapq class Solution: # @param heights: a matrix of integers # @return: an integer def trapRainWater(self, heights): # write your code here n = len(heights) if n < 3: return 0 m = len(heights[0]) if m < 3: return 0 hp = sel...
kylelwm/ponus
refs/heads/master
ponus/wsgi.py
2
""" WSGI config for ponus project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ponus.settings") from django.core.wsgi ...
eneldoserrata/marcos_openerp
refs/heads/master
addons/account_report_company/account_report_company.py
8
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013 S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
elelsee/pycfn-elasticsearch
refs/heads/master
pycfn_elasticsearch/vendored/requests/packages/urllib3/poolmanager.py
68
import logging try: # Python 3 from urllib.parse import urljoin except ImportError: from urlparse import urljoin from ._collections import RecentlyUsedContainer from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool from .connectionpool import port_by_scheme from .exceptions import LocationValue...
benhylau/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/mac/gyptest-xctest.py
221
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that xctest targets are correctly configured. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.Te...
imZack/sanji
refs/heads/develop
sanji/model_initiator.py
3
#!/usr/bin/env python # -*- coding: UTF-8 -*- import logging import simplejson as json import os import shutil import subprocess import time from threading import Thread from threading import Event from threading import RLock _logger = logging.getLogger("sanji.sdk.model_initiator") class ModelInitiator(object): ...