repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
liu602348184/django | refs/heads/master | django/views/decorators/gzip.py | 720 | from django.middleware.gzip import GZipMiddleware
from django.utils.decorators import decorator_from_middleware
gzip_page = decorator_from_middleware(GZipMiddleware)
gzip_page.__doc__ = "Decorator for views that gzips pages if the client supports it."
|
glpatcern/rpyc | refs/heads/master | tests/test_teleportation.py | 9 | from __future__ import with_statement
import subprocess
import sys
import os
import rpyc
import unittest
from rpyc.utils.teleportation import export_function, import_function
from rpyc.utils.classic import teleport_function
def b(st):
if sys.version_info[0] >= 3:
return bytes(st, "latin-1")
else:
... |
adviti/melange | refs/heads/master | app/gdata/__init__.py | 158 | #!/usr/bin/python
#
# Copyright (C) 2006 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 ... |
pyblish/pyblish-win | refs/heads/master | lib/Python27/Lib/logging/__init__.py | 26 | # Copyright 2001-2014 by Vinay Sajip. 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 all copies and that
# both that copyright notice and this permissio... |
tweemeterjop/thug | refs/heads/master | thug/ActiveX/modules/CGAgent.py | 1 | # Chinagames iGame CGAgent ActiveX Control Buffer Overflow
# CVE-2009-1800
import logging
log = logging.getLogger("Thug")
def CreateChinagames(self, arg0):
if len(arg0) > 428:
log.ThugLogging.log_exploit_event(self._window.url,
"CGAgent ActiveX",
... |
pacoqueen/ginn | refs/heads/master | extra/install/ipython2/ipython-5.10.0/IPython/core/magics/display.py | 8 | """Simple magics for display formats"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#----... |
hunering/demo-code | refs/heads/master | python/language/4-control-flow-for.py | 1 | words = ['cat', 'window', 'defenestrate']
for word in words:
print(word, " length is ", len(word))
# the follwoing code cause infinite loop
# for word in words:
# if len(word) > 6:
# words.insert(0, "asfdsafd")
for word in words[:]:
if len(word) > 6:
words.insert(0, "asfdsafd")
for i, v in enu... |
Kagee/youtube-dl | refs/heads/master | youtube_dl/extractor/hearthisat.py | 108 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_request,
compat_urlparse,
)
from ..utils import (
HEADRequest,
str_to_int,
urlencode_postdata,
urlhandle_detect_ext,
)
class HearThisAtIE(InfoExtractor):
... |
larsoner/mne-python | refs/heads/master | mne/io/nihon/__init__.py | 12 | """Nihon Kohden module for conversion to FIF."""
# Author: Fede Raimondo <federaimondo@gmail.com>
#
# License: BSD (3-clause)
from .nihon import read_raw_nihon
|
youfoh/TizenProject | refs/heads/tizen | tools/perf/tests/attr.py | 3174 | #! /usr/bin/python
import os
import sys
import glob
import optparse
import tempfile
import logging
import shutil
import ConfigParser
class Fail(Exception):
def __init__(self, test, msg):
self.msg = msg
self.test = test
def getMsg(self):
return '\'%s\' - %s' % (self.test.path, self.msg)... |
uethackathon05/uethackathon05.github.io | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py | 1446 | #!/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.
"""Unit tests for the MSVSSettings.py file."""
import StringIO
import unittest
import gyp.MSVSSettings as MSVSSettings
class TestSequence... |
mrquim/repository.mrquim | refs/heads/master | repo/script.module.youtube.dl/lib/youtube_dl/extractor/dhm.py | 64 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import parse_duration
class DHMIE(InfoExtractor):
IE_DESC = 'Filmarchiv - Deutsches Historisches Museum'
_VALID_URL = r'https?://(?:www\.)?dhm\.de/filmarchiv/(?:[^/]+/)+(?P<id>[^/]+)'
_TESTS = [{
'url': 'http:... |
seg/2016-ml-contest | refs/heads/master | rkappius/facies_w_tf_submit.py | 1 | ################################################################################
#
# Facies Classification using ML in (Google) TensorFlow
#
# Russell A. Kappius
# Kappius Consulting LLC
# Supported by Sterling Seismic Services
#
# January 18, 2017
#
###############################... |
sivakuna-aap/superdesk-content-api | refs/heads/master | content_api/publish/service.py | 2 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import loggi... |
TheTypoMaster/my-vim-set-mac | refs/heads/master | .vim/bundle/YouCompleteMe/third_party/ycmd/third_party/jedi/test/static_analysis/descriptors.py | 28 | # classmethod
class TarFile():
@classmethod
def open(cls, name, **kwargs):
return cls.taropen(name, **kwargs)
@classmethod
def taropen(cls, name, **kwargs):
return name
# should just work
TarFile.open('hallo')
|
alhashash/yowsup | refs/heads/master | yowsup/layers/protocol_groups/protocolentities/iq_groups_leave_success.py | 39 | from yowsup.structs import ProtocolTreeNode
from yowsup.layers.protocol_iq.protocolentities import ResultIqProtocolEntity
class SuccessLeaveGroupsIqProtocolEntity(ResultIqProtocolEntity):
'''
<iq type="result" from="g.us" id="{{ID}}">
<leave>
<group id="{{GROUP_JID}}"></group>
</le... |
noslenfa/tdjangorest | refs/heads/master | uw/lib/python2.7/site-packages/IPython/kernel/blocking/__init__.py | 28 | from .client import BlockingKernelClient |
r8o8s1e0/ChromeWebLab | refs/heads/master | Orchestra/sw/hub/orchestra/messenger/format.py | 7 | #
# format.py: encode/decode messages from Node.js server's
# byte-compressed format
#
# See MessageEncoder.js in server source for message formats.
#
# Copyright 2013 Google Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the... |
adamtornhill/maat-scripts | refs/heads/master | miner/complexity_calculations.py | 1 | import re
######################################################################
## Complexity calculations
######################################################################
leading_tabs_expr = re.compile(r'^(\t+)')
leading_spaces_expr = re.compile(r'^( +)')
empty_line_expr = re.compile(r'^\s*$')
def n_log_tabs... |
achang97/YouTunes | refs/heads/master | lib/python2.7/_abcoll.py | 62 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
DON'T USE THIS MODULE DIRECTLY! The classes here should be imported
via collections; they are defined here only to alleviate certain
bootstrappin... |
omni5cience/django-inlineformfield | refs/heads/master | .tox/py27/lib/python2.7/site-packages/django/contrib/gis/geos/tests/test_geos.py | 52 | from __future__ import unicode_literals
import ctypes
import json
import random
import unittest
from unittest import skipUnless
from binascii import a2b_hex, b2a_hex
from io import BytesIO
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis import memoryview
from django.contrib.gis.geometry.test_dat... |
eayunstack/neutron | refs/heads/master | neutron/tests/fullstack/resources/config.py | 1 | # Copyright 2015 Red Hat, 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 agre... |
avsm/xen-unstable | refs/heads/master | tools/python/xen/xend/XendDomainInfo.py | 1 | #===========================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope tha... |
david-zwicker/convert-formula | refs/heads/master | src/parser_line.py | 1 | """ Defines classes for parsing mathematical formulas according to various
language definitions.
This parser was build based on the code `fourFn.py` given in the example section
of the pyparsing webpage. The code was written by `Paul McGuire`.
"""
import copy
from pyparsing import Optional, ZeroOrMore, Forward, downc... |
renatopp/batma | refs/heads/master | batma/maths/__init__.py | 12133432 | |
hryamzik/ansible | refs/heads/devel | lib/ansible/modules/cloud/profitbricks/__init__.py | 12133432 | |
hanlind/nova | refs/heads/master | nova/virt/xenapi/image/__init__.py | 12133432 | |
joebos/django-allauth | refs/heads/master | allauth/account/auth_backends.py | 6 | from django.contrib.auth.backends import ModelBackend
from django.db.models import Q
from ..utils import get_user_model
from .app_settings import AuthenticationMethod
from . import app_settings
User = get_user_model()
class AuthenticationBackend(ModelBackend):
def authenticate(self, **credentials):
re... |
jenskutilek/jkRFoTools | refs/heads/master | Lib/jkRFoTools/FontChooserDraggable.py | 1 | from Cocoa import NSStringPboardType, NSDragOperationMove, NSArray
import vanilla
from defconAppKit.windows.baseWindow import BaseWindowController
from defconAppKit.windows.progressWindow import ProgressWindow
from lib.scripting.codeEditor import CodeEditor
from robofab.world import AllFonts
class ProcessFonts(BaseWin... |
chouseknecht/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/aws_batch_job_queue.py | 5 | #!/usr/bin/python
# Copyright (c) 2017 Jon Meran <jonathan.meran@sonos.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTAT... |
ShineFan/odoo | refs/heads/8.0 | addons/auth_openid/controllers/main.py | 382 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
ss300/p2pool | refs/heads/master | wstools/Utility.py | 292 | # Copyright (c) 2003, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of
# any required approvals from the U.S. Dept. of Energy). All rights
# reserved.
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is ... |
numerigraphe/odoo | refs/heads/8.0 | addons/purchase_analytic_plans/__init__.py | 441 | # -*- 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... |
faywong/FFPlayer | refs/heads/trunk | project/jni/python/src/Lib/distutils/unixccompiler.py | 33 | """distutils.unixccompiler
Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
* macros defined with -Dname[=value]
* macros undefined with -Uname
* include search directories specified with -Idir
* libraries specified with -lllib
* library... |
ow2-compatibleone/accords-platform | refs/heads/master | testsuite/basic/accords.py | 3 | # vim: set et sw=4 ts=4 ai:
import unittest
import utils
from testbin import TestBin
class TestBinAccords(TestBin, unittest.TestCase):
def setUp(self):
self.bin = 'accords'
self.return_value = 1
def tearDown(self):
pass
|
withtone/depot_tools | refs/heads/master | git_retry.py | 31 | #!/usr/bin/env python
# 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.
import logging
import optparse
import subprocess
import sys
import threading
import time
from git_common import GIT_EXE, GIT_TRANSIENT... |
boooka/GeoPowerOff | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/admin/migrations/__init__.py | 12133432 | |
pdelsante/thug | refs/heads/master | thug/DOM/W3C/Style/__init__.py | 12133432 | |
carlosperate/mu | refs/heads/master | mu/contrib/__init__.py | 12133432 | |
starqiu/PythonLearn | refs/heads/master | Django-1.6.5/tests/admin_views/__init__.py | 12133432 | |
neo/django-allauth | refs/heads/master | allauth/socialaccount/providers/orcid/__init__.py | 12133432 | |
gangadhar-kadam/smrterpfrappe | refs/heads/develop | frappe/core/doctype/user/__init__.py | 12133432 | |
TheJJ100100/bedrock | refs/heads/master | bedrock/events/tests/__init__.py | 12133432 | |
halfak/yamlconf | refs/heads/master | yamlconf/tests/__init__.py | 12133432 | |
sauliusl/scipy | refs/heads/master | scipy/linalg/tests/test_solvers.py | 95 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.linalg import inv
from numpy.testing import TestCase, rand, run_module_suite, assert_raises, \
assert_equal, assert_almost_equal, assert_array_almost_equal, assert_, \
assert_allclose
from scipy.linalg import solve... |
40223139/2015cdaa5-12 | refs/heads/master | static/Brython3.1.0-20150301-090019/Lib/unittest/test/testmock/testwith.py | 739 | import unittest
from warnings import catch_warnings
from unittest.test.testmock.support import is_instance
from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call
something = sentinel.Something
something_else = sentinel.SomethingElse
class WithTest(unittest.TestCase):
def test_with_sta... |
Tesora-Release/tesora-python-troveclient | refs/heads/master | troveclient/v1/accounts.py | 3 | # Copyright 2011 OpenStack Foundation
# Copyright 2013 Rackspace Hosting
# 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/lice... |
TobbeTripitaka/src | refs/heads/master | user/karl/contour_cmap_plot.py | 8 | """
Renders some contoured and colormapped images of a scalar value field.
- Left-drag pans the plot.
- Mousewheel up and down zooms the plot in and out.
- Pressing "z" brings up the Zoom Box, and you can click-drag a rectangular
region to zoom. If you use a sequence of zoom boxes, pressing alt-left-arrow and ... |
TRESCLOUD/odoo | refs/heads/Integracion&ControlDeCalidad | addons/base_import/tests/__init__.py | 179 | from . import test_cases
checks = [test_cases]
|
al1221/ghost-openshift | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/scripts/check_sources.py | 117 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Checker for file headers
~~~~~~~~~~~~~~~~~~~~~~~~
Make sure each Python file has a correct file header
including copyright and license information.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE fo... |
LeeRisk/zulip | refs/heads/master | confirmation/settings.py | 121 | # -*- coding: utf-8 -*-
# Copyright: (c) 2008, Jarek Zgoda <jarek.zgoda@gmail.com>
__revision__ = '$Id: settings.py 12 2008-11-23 19:38:52Z jarek.zgoda $'
STATUS_ACTIVE = 1
STATUS_FIELDS = {
}
|
cisco-openstack/tempest | refs/heads/proposed | tempest/lib/services/volume/v2/quotas_client.py | 3 | # Copyright 2014 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
endlessm/chromium-browser | refs/heads/master | ui/resources/PRESUBMIT.py | 6 | # Copyright (c) 2012 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.
"""Presubmit script for Chromium UI resources.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the pr... |
brandond/ansible | refs/heads/devel | lib/ansible/modules/network/avi/avi_vsvip.py | 31 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.2
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... |
jctanner/ansible | refs/heads/devel | docs/docsite/rst/conf.py | 14 | # -*- coding: utf-8 -*-
#
# documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... |
JohnPek/PHP_PythonParser | refs/heads/master | classes/__init__.py | 12133432 | |
Juniper/ceilometer | refs/heads/master | ceilometer/agent/__init__.py | 12133432 | |
WALR/taiga-back | refs/heads/master | taiga/feedback/migrations/0001_initial.py | 29 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='FeedbackEntry',
fields=[
('id', models.AutoFiel... |
ThomasMiconi/nupic.research | refs/heads/master | projects/sdr_paper/compute_optimal_threshold.py | 11 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
ImageEngine/gaffer | refs/heads/master | python/GafferTest/ParallelAlgoTest.py | 7 | ##########################################################################
#
# Copyright (c) 2018, Image Engine Design 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:
#
# * Redistrib... |
sg0/Elemental | refs/heads/master | examples/interface/BPDN.py | 1 | #
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
import El, time
m = 2000
n = 4000
numLambdas = 7
startL... |
TheKnarf/apprtc | refs/heads/master | src/third_party/oauth2client/tools.py | 171 | # Copyright (C) 2013 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 or agreed to in writ... |
rob356/SickRage | refs/heads/master | lib/hachoir_core/event_handler.py | 188 | class EventHandler(object):
"""
Class to connect events to event handlers.
"""
def __init__(self):
self.handlers = {}
def connect(self, event_name, handler):
"""
Connect an event handler to an event. Append it to handlers list.
"""
try:
self.hand... |
tmuelle2/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/outputtee.py | 192 | # Copyright (c) 2009, Google Inc. All rights reserved.
# Copyright (c) 2009 Apple 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 abov... |
ahmedaljazzar/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/split_mongo/split.py | 15 | """
Provides full versioning CRUD and representation for collections of xblocks (e.g., courses, modules, etc).
Representation:
* course_index: a dictionary:
** '_id': a unique id which cannot change,
** 'org': the org's id. Only used for searching not identity,
** 'course': the course's catalog number
... |
edx/course-discovery | refs/heads/master | course_discovery/apps/course_metadata/migrations/0136_drupalpublishuuidconfig.py | 1 | # Generated by Django 1.11.15 on 2018-12-05 21:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('course_metadata', '0135_remove_personwork'),
]
operations = [
migrations.CreateModel(
name='DrupalPublishUuidConfig',
... |
FenceAtMHacks/flaskbackend | refs/heads/master | fence-api/flask/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py | 203 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import logging
__version__ = '0.2.0'
class DistlibException(Exception):
pass
try:
from logging import NullHandler
except Impor... |
QUSpilPrgm/glad | refs/heads/master | glad/lang/nim/loader/gl.py | 3 | from glad.lang.common.loader import BaseLoader
from glad.lang.nim.loader import LOAD_OPENGL_DLL
_OPENGL_LOADER = \
LOAD_OPENGL_DLL % {'pre':'private', 'init':'open_gl',
'proc':'get_proc', 'terminate':'close_gl'} + '''
bool gladLoadGL()
bool status = false
if(open_gl())
stat... |
glovebx/odoo | refs/heads/8.0 | addons/website_project/controllers/__init__.py | 7372 | import main
|
vitor-alves/pixel-canvas-bot | refs/heads/master | packages/urllib3/util/__init__.py | 204 | from __future__ import absolute_import
# For backwards compatibility, provide imports that used to be here.
from .connection import is_connection_dropped
from .request import make_headers
from .response import is_fp_closed
from .ssl_ import (
SSLContext,
HAS_SNI,
IS_PYOPENSSL,
IS_SECURETRANSPORT,
as... |
cloudera/hue | refs/heads/master | desktop/core/ext-py/kazoo-2.8.0/kazoo/recipe/lease.py | 3 | """Zookeeper lease implementations
:Maintainer: Lars Albertsson <lars.albertsson@gmail.com>
:Maintainer: Jyrki Pulliainen <jyrki@spotify.com>
:Status: Beta
"""
import datetime
import json
import socket
from kazoo.exceptions import CancelledError
class NonBlockingLease(object):
"""Exclusive lease that does not ... |
FRC-Team-3140/north-american-happiness | refs/heads/master | lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/big5prober.py | 206 | ######################## 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 Ri... |
salv-orlando/MyRepo | refs/heads/bp/xenapi-security-groups | nova/tests/api/openstack/test_common.py | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 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/... |
sestrella/ansible | refs/heads/devel | lib/ansible/modules/cloud/google/gcp_kms_crypto_key.py | 13 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... |
vilorious/pyload | refs/heads/stable | module/plugins/hoster/ShragleCom.py | 15 | # -*- coding: utf-8 -*-
from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class ShragleCom(DeadHoster):
__name__ = "ShragleCom"
__type__ = "hoster"
__version__ = "0.23"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P<ID>.... |
SnabbCo/neutron | refs/heads/master | neutron/plugins/vmware/vshield/edge_appliance_driver.py | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 VMware, 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
#
# ... |
mariosky/evo-drawings | refs/heads/master | venv/lib/python2.7/site-packages/numpy/lib/tests/test_arrayterator.py | 223 | from __future__ import division, absolute_import, print_function
from operator import mul
from functools import reduce
import numpy as np
from numpy.random import randint
from numpy.lib import Arrayterator
from numpy.testing import assert_
def test():
np.random.seed(np.arange(10))
# Create a random array
... |
guke001/QMarkdowner | refs/heads/master | dpkt/stun.py | 15 | # $Id: stun.py 47 2008-05-27 02:10:00Z jon.oberheide $
"""Simple Traversal of UDP through NAT."""
import struct
import dpkt
# STUN - RFC 3489
# http://tools.ietf.org/html/rfc3489
# Each packet has a 20 byte header followed by 0 or more attribute TLVs.
# Message Types
BINDING_REQUEST = 0x0001
BINDING_RESPONSE = 0... |
kordano/samba-ldb-mdb | refs/heads/master | examples/scripts/shares/python/modify_samba_config.py | 90 | #!/usr/bin/env python
######################################################################
##
## Simple add/delete/change share command script for Samba
##
## Copyright (C) Gerald Carter 2004.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Gener... |
mainakibui/kobocat | refs/heads/master | onadata/apps/logger/management/commands/import_instances.py | 13 | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 coding=utf-8
import os
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from django.utils.translation import ugettext as _, ugettext_lazy
from onadata.libs.logger.import_tools import import_instances_from_z... |
akosel/incubator-airflow | refs/heads/master | tests/contrib/operators/test_s3_copy_object_operator.py | 11 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... |
aleksandra-tarkowska/django | refs/heads/master | tests/migrations/migrations_test_apps/migrated_app/migrations/__init__.py | 12133432 | |
azurestandard/django | refs/heads/master | tests/regressiontests/i18n/other/__init__.py | 12133432 | |
vivekgarhewal/med | refs/heads/master | demo-django/demo/__init__.py | 12133432 | |
catacgc/ansible-modules-core | refs/heads/devel | system/__init__.py | 12133432 | |
weiting-chen/manila | refs/heads/master | manila/tests/api/contrib/__init__.py | 12133432 | |
davidzchen/tensorflow | refs/heads/master | tensorflow/python/training/monitored_session_test.py | 7 | # pylint: disable=g-bad-file-header
# 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/LICENS... |
HalCanary/skia-hc | refs/heads/master | infra/bots/recipes/perf_canvaskit.py | 3 | # Copyright 2018 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.
# Recipe which runs the Canvaskit tests using docker
DEPS = [
'checkout',
'docker',
'env',
'infra',
'recipe_engine/file',
'recipe_engine/path',
... |
ray-zhong/github_trend_spider | refs/heads/master | ENV/Lib/site-packages/setuptools/dep_util.py | 316 | from distutils.dep_util import newer_group
# yes, this is was almost entirely copy-pasted from
# 'newer_pairwise()', this is just another convenience
# function.
def newer_pairwise_group(sources_groups, targets):
"""Walk both arguments in parallel, testing if each source group is newer
than its corresponding t... |
geekboxzone/lollipop_external_chromium_org | refs/heads/geekbox | chrome/common/extensions/docs/server2/fake_url_fetcher.py | 85 | # Copyright (c) 2012 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.
import os
import posixpath
from future import Future
from path_util import AssertIsDirectory, IsDirectory
class _Response(object):
def __init__(self... |
ShySec/scrimmage-scoreboard | refs/heads/master | web2py/applications/scoreboard/languages/default.py | 180 | # coding: utf8
{
'!langcode!': 'en-us',
'!langname!': 'English (US)',
'%s %%(shop)': '%s %%(shop)',
'%s %%(shop[0])': '%s %%(shop[0])',
'%s %%{quark[0]}': '%s %%{quark[0]}',
'%s %%{shop[0]}': '%s %%{shop[0]}',
'%s %%{shop}': '%s %%{shop}',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'@markmin\x01*... |
pmav99/praktoras | refs/heads/conmon-13 | dogstatsd.py | 1 | #!/opt/conmon-agent/embedded/bin/python
# (C) Fractal Industries, Inc. 2016
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
"""
A Python Statsd implementation with some conmon special sauce.
"""
# set up logging before importing any other components
from conf... |
lilfolr/CITS4406-Assignment2 | refs/heads/master | template.py | 1 | """Provide a base HTML template variable for population with appropriate
statistics in the report.py module.
"""
base_template = \
"""
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="h... |
horance-liu/tensorflow | refs/heads/master | tensorflow/contrib/eager/python/examples/rnn_ptb/rnn_ptb_test.py | 61 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
dgjustice/ansible | refs/heads/devel | lib/ansible/modules/cloud/misc/serverless.py | 18 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Ryan Scott Brown <ryansb@redhat.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 ... |
bowang/tensorflow | refs/heads/master | tensorflow/contrib/opt/__init__.py | 22 | # 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 applica... |
leafclick/intellij-community | refs/heads/master | python/testData/postfix/isNone/complexExpression_after.py | 39 | def f(a, b, c):
if (a + b) * c is None:
<caret> |
roehm/espresso | refs/heads/lbgpu | testsuite/configs/check_myconfig_complete.py | 3 | # Copyright (C) 2012 Olaf Lenz
#
# 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 3 of the License, or
# (at your option) any later version.
#
# ESPR... |
devendermishrajio/nova_test_latest | refs/heads/master | nova/tests/unit/test_nova_manage.py | 30 | # Copyright 2011 OpenStack Foundation
# Copyright 2011 Ilya Alekseyev
#
# 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
#
#... |
sunze/py_flask | refs/heads/master | venv/lib/python3.4/site-packages/billiard/_ext.py | 9 | from __future__ import absolute_import
import sys
supports_exec = True
from .compat import _winapi as win32 # noqa
if sys.platform.startswith("java"):
_billiard = None
else:
try:
import _billiard # noqa
except ImportError:
import _multiprocessing as _billi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.