repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
fangxingli/hue | refs/heads/master | desktop/core/ext-py/guppy-0.1.10/guppy/heapy/pbhelp.py | 37 | # AUTOMATICALLY GENERATED BY GENGUPPY
about="(iguppy.gsl.Text\nRecordingInter\np1\n(dp2\nS'tag_configs'\np3\n(dp4\nI0\n((S'spacing1'\np5\nI11\ntp6\n(S'font'\np7\n(S'times'\np8\nI24\nS'bold'\ntttp9\nsI1\n(g6\n(S'tabs'\np10\n(F23.5\nS'center'\np11\nF57\nS'left'\np12\nttp13\n(g7\n(g8\nI12\nS'bold'\ntp14\ntp15\ntp16\nsI2\... |
Codefans-fan/odoo | refs/heads/8.0 | addons/account/wizard/account_move_line_reconcile_select.py | 385 | # -*- 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... |
SpectreJan/gnuradio | refs/heads/master | gr-audio/examples/python/dial_tone.py | 58 | #!/usr/bin/env python
#
# Copyright 2004,2005,2007,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at ... |
indera/bubbles | refs/heads/master | tests/test_core.py | 4 | import unittest
from bubbles import *
# import bubbles.iterator
# FIXME: clean this up
import inspect
def default(ctx, left):
pass
def unary(ctx, left):
pass
def binary(ctx, left, right):
pass
class DummyDataObject(DataObject):
def __init__(self, reps=None, data=None):
"""Creates a dummy da... |
jwlawson/tensorflow | refs/heads/master | tensorflow/tools/docs/generate_1_0.py | 55 | # 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... |
wskplho/sl4a | refs/heads/master | python/src/Tools/pynche/ColorDB.py | 94 | """Color Database.
This file contains one class, called ColorDB, and several utility functions.
The class must be instantiated by the get_colordb() function in this file,
passing it a filename to read a database out of.
The get_colordb() function will try to examine the file to figure out what the
format of the file ... |
MSeifert04/astropy | refs/heads/master | astropy/visualization/wcsaxes/tests/test_transforms.py | 185 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
|
rosmo/ansible-modules-core | refs/heads/devel | cloud/openstack/os_ironic.py | 128 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2014, 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 optio... |
ric2b/Vivaldi-browser | refs/heads/master | chromium/tools/clang/scripts/extract_edits.py | 11 | #!/usr/bin/env python
# Copyright (c) 2016 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.
"""Script to extract edits from clang tool output.
If a clang tool emits edits, then the edits should look like this:
...
=... |
VivianePons/multipolynomial-bases | refs/heads/master | docs/source/conf.py | 1 | # -*- coding: utf-8 -*-
#
# sample documentation build configuration file,
# inspried by slabbe configuration file created sphinx-quickstart
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... |
jonfoster/pyxb2 | refs/heads/master | pyxb/bundles/opengis/examples/testgml.py | 4 | # PYTHONPATH=../..:. PYXB_ARCHIVE_PATH=opengis/iso19139:+ ../../scripts/pyxbgen -u gmlapp.xsd -m gmlapp
import pyxb.bundles.opengis.gml_3_2 as gml
import gmlapp
import pyxb.utils.domutils
limits = gml.GridLimitsType(gml.GridEnvelopeType([0, 0], [4, 4]))
origin = gml.PointPropertyType(gml.Point(gml.pos([-93.25, 43.5]... |
robertwb/incubator-beam | refs/heads/master | sdks/python/apache_beam/runners/interactive/recording_manager.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... |
insomnia-lab/calibre | refs/heads/master | src/calibre/utils/pyconsole/formatter.py | 9 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from PyQt4.Qt import QTextCharFormat, QFont, QBrush, QColor
from pygments.formatter import Formatter as PF
from pygments.t... |
astropuffin/kubernetes | refs/heads/master | third_party/htpasswd/htpasswd.py | 897 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2013 Edgewall Software
# Copyright (C) 2008 Eli Carter
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edge... |
devigned/autorest | refs/heads/master | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/models/__init__.py | 510 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
blazek/QGIS | refs/heads/master | python/plugins/processing/tests/GdalAlgorithmsGeneralTest.py | 4 | # -*- coding: utf-8 -*-
"""
***************************************************************************
GdalAlgorithmTests.py
---------------------
Date : January 2016
Copyright : (C) 2016 by Matthias Kuhn
Email : matthias@opengis.ch
***********************... |
fkolacek/FIT-VUT | refs/heads/master | bp-revok/python/lib/python2.7/modulefinder.py | 215 | """Find modules used by a script, using introspection."""
# This module should be kept compatible with Python 2.2, see PEP 291.
from __future__ import generators
import dis
import imp
import marshal
import os
import sys
import types
import struct
if hasattr(sys.__stdout__, "newlines"):
READ_MODE = "U" # universa... |
veeti/manuale | refs/heads/master | manuale/acme.py | 1 | """
ACME API client.
"""
import copy
from collections import namedtuple
from urllib.parse import urljoin, urlparse
import requests
from . import __version__
from .crypto import generate_header, sign_request
from .errors import *
DEFAULT_HEADERS = {
'User-Agent': "manuale {} (https://github.com/veeti/manuale)".f... |
nimeshkumar11/Implementation-of-Adaptive-CoDel-in-ns-3 | refs/heads/master | src/point-to-point-layout/bindings/callbacks_list.py | 772 | callback_classes = [
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empt... |
iABC2XYZ/abc | refs/heads/master | PIC4/BetaGammaC.py | 4 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 31 14:19:35 2017
Author: Peiyong Jiang : jiangpeiyong@impcas.ac.cn
Function:
BetaC & GammaC:
_______________________________________________________
Energy -> Gamma
Energy -> Beta
Energy->Beta*Gamma
Energy->Beta, Gamma
... |
eayunstack/fuel-ostf | refs/heads/master | fuel_plugin/ostf_adapter/nose_plugin/nose_storage_plugin.py | 1 | # Copyright 2013 Mirantis, 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 ... |
arthurdarcet/tornado | refs/heads/master | tornado/test/curl_httpclient_test.py | 5 | # coding: utf-8
from __future__ import absolute_import, division, print_function, with_statement
from hashlib import md5
from tornado.escape import utf8
from tornado.httpclient import HTTPRequest
from tornado.stack_context import ExceptionStackContext
from tornado.testing import AsyncHTTPTestCase
from tornado.test im... |
yuanagain/seniorthesis | refs/heads/master | venv/lib/python3.5/site-packages/wheel/test/headers.dist/setup.py | 565 | from setuptools import setup
try:
unicode
def u8(s):
return s.decode('unicode-escape').encode('utf-8')
except NameError:
def u8(s):
return s.encode('utf-8')
setup(name='headers.dist',
version='0.1',
description=u8('A distribution with headers'),
headers=['header.h']
... |
landism/pants | refs/heads/master | tests/python/pants_test/backend/jvm/tasks/test_ivy_resolve.py | 4 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from conte... |
lundjordan/services | refs/heads/master | src/codecoverage/backend/tests/test_coverage.py | 1 | # -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
import pytest
def test_coverage_supported_extensions_api(client):
# List supp... |
ryanbackman/zulip | refs/heads/master | analytics/management/commands/client_activity.py | 6 | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from argparse import ArgumentParser
from django.core.management.base import BaseCommand
from django.db.models import Count, QuerySet
from django.utils.timezone import now as timezone_now
from zerver.models import User... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/sub_resource_py3.py | 5 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
vladmm/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/conf/locale/lt/formats.py | 332 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y \m. F j \d.'
TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT =
# YEAR_MONTH_F... |
jackyxhb/linux | refs/heads/master | scripts/gdb/linux/dmesg.py | 630 | #
# gdb helper commands and functions for Linux kernel debugging
#
# kernel log buffer dump
#
# Copyright (c) Siemens AG, 2011, 2012
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import utils
class LxDmesg(gdb.Command... |
nimengyu2/dm3730-android-gingerbread-2.3-dk2.1-kernel | refs/heads/dm3730-android-gingerbread-2.3-dk2.1-first | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 52 | # Util.py - Python extension for perf trace, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0
... |
andreytsariuk/testApp | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/common.py | 1292 | # 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.
from __future__ import with_statement
import collections
import errno
import filecmp
import os.path
import re
import tempfile
import sys
# A minimal memoizing d... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/271_test_textwrap.py | 3 | #
# Test suite for the textwrap module.
#
# Original tests written by Greg Ward <gward@python.net>.
# Converted to PyUnit by Peter Hansen <peter@engcorp.com>.
# Currently maintained by Greg Ward.
#
# $Id: test_textwrap.py 86637 2010-11-21 13:34:58Z ezio.melotti $
#
import unittest
from test import test_support
from t... |
EC-software/EC_stuff | refs/heads/master | ecpw/ecpw_demo.py | 1 | """
This small file demonstrates the typical everyday use of ecpw
Line 10: import the ecpw module
Line 11: create the ecpw object - this will automatically read your data from file
Line 13: get the 3 values, that we need for this program
Line 15: print the values, so we can verify that it worked. Almost too easy...
""... |
cronuspaas/cronusagent | refs/heads/master | agent/agent/lib/agent_thread/module_create.py | 1 | #pylint: disable=W0703,R0915,R0912,R0904,E0102,E1101,E0202,R0914,W0105
""" Thread to perform creation of a service """
import logging
import os
import traceback
from agent.controllers.service import ServiceController
from agent.lib import utils, manifestutil, configutil
from agent.lib.agent_thread.download_helper imp... |
robertwb/incubator-beam | refs/heads/master | sdks/python/apache_beam/runners/worker/statesampler_slow.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... |
AlexHill/django | refs/heads/master | tests/utils_tests/test_baseconv.py | 57 | from unittest import TestCase
from django.utils.baseconv import base2, base16, base36, base56, base62, base64, BaseConverter
from django.utils.six.moves import xrange
class TestBaseConv(TestCase):
def test_baseconv(self):
nums = [-10 ** 10, 10 ** 10] + list(xrange(-100, 100))
for converter in [b... |
zerebubuth/mapnik | refs/heads/master | scons/scons-local-2.5.0/SCons/Variables/__init__.py | 3 | """engine.SCons.Variables
This file defines the Variables class that is used to add user-friendly
customizable variables to an SCons build.
"""
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated document... |
Edraak/edx-platform | refs/heads/master | lms/djangoapps/courseware/tests/test_navigation.py | 36 | """
This test file will run through some LMS test scenarios regarding access and navigation of the LMS
"""
import time
from mock import patch
from nose.plugins.attrib import attr
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from coursewa... |
alexus37/AugmentedRealityChess | refs/heads/master | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/texture_stencil8.py | 9 | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import ctypes
_... |
proxysh/Safejumper-for-Mac | refs/heads/master | buildlinux/env64/lib/python2.7/site-packages/zope/interface/verify.py | 53 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... |
Changaco/oh-mainline | refs/heads/master | vendor/packages/Django/django/contrib/auth/admin.py | 62 | from django.db import transaction
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.forms import (UserCreationForm, UserChangeForm,
AdminPasswordChangeForm)
from django.contrib.auth.models import User, Group
from django.contrib import messages
from django.core.exceptions imp... |
jorik041/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/botinfo_unittest.py | 121 | # Copyright (c) 2011 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 of conditions and the ... |
simonwydooghe/ansible | refs/heads/devel | test/units/modules/network/fortios/test_fortios_log_fortiguard_setting.py | 21 | # Copyright 2019 Fortinet, Inc.
#
# 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 program is distributed in the... |
rahulunair/nova | refs/heads/master | nova/tests/unit/virt/hyperv/test_snapshotops.py | 4 | # Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
markcheno/trading-with-python | refs/heads/master | cookbook/workingWithDatesAndTime.py | 77 | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 16 17:45:02 2011
@author: jev
"""
import time
import datetime as dt
from pandas import *
from pandas.core import datetools
# basic functions
print 'Epoch start: %s' % time.asctime(time.gmtime(0))
print 'Seconds from epoch: %.2f' % time.time()
t... |
ryfx/gyp | refs/heads/master | test/actions-subdir/gyptest-action.py | 501 | #!/usr/bin/env python
# Copyright (c) 2009 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.
"""
Test actions that output to PRODUCT_DIR.
"""
import TestGyp
# TODO fix this for xcode: http://code.google.com/p/gyp/issues/detail?id=8... |
magic0704/python-keystoneclient | refs/heads/master | keystoneclient/tests/unit/v2_0/test_access.py | 5 | # 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... |
Architektor/PySnip | refs/heads/master | venv/lib/python2.7/site-packages/setuptools/command/upload_docs.py | 20 | # -*- coding: utf-8 -*-
"""upload_docs
Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
"""
from base64 import standard_b64encode
from distutils import log
from distutils.errors import DistutilsOptionError
import os
import socket
import zipfile
import tempfile
import ... |
caesar2164/edx-platform | refs/heads/master | lms/djangoapps/shoppingcart/processors/tests/test_CyberSource2.py | 164 | # -*- coding: utf-8 -*-
"""
Tests for the newer CyberSource API implementation.
"""
from mock import patch
from django.test import TestCase
from django.conf import settings
import ddt
from student.tests.factories import UserFactory
from shoppingcart.models import Order, OrderItem
from shoppingcart.processors.CyberSour... |
ikargis/horizon_fod | refs/heads/master | openstack_dashboard/dashboards/project/containers/views.py | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... |
Herna1994/android_kernel_bq_vegetalte | refs/heads/android-5.0 | Documentation/target/tcm_mod_builder.py | 2358 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... |
ii0/pybrain | refs/heads/master | pybrain/rl/environments/functions/multiobjective.py | 27 | """ Some multi-objective benchmark functions.
Implemented according to the classical reference paper of Deb et al. (Evolutionary Computation 2002) """
from scipy import array, exp, sqrt, sin, cos, power, pi, arctan, ndarray
from pybrain.rl.environments.functions.function import FunctionEnvironment
from pybrain.structu... |
nikolas/lettuce | refs/heads/master | tests/integration/lib/Django-1.3/django/contrib/databrowse/datastructures.py | 312 | """
These classes are light wrappers around Django's database API that provide
convenience functionality and permalink functions for the databrowse app.
"""
from django.db import models
from django.utils import formats
from django.utils.text import capfirst
from django.utils.encoding import smart_unicode, smart_str, i... |
JanDintel/ansible | refs/heads/devel | lib/ansible/plugins/lookup/consul_kv.py | 89 | # (c) 2015, Steve Gargan <steve.gargan@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 your option) any later v... |
listamilton/supermilton.repository | refs/heads/supermilton.repository | plugin.video.SportsDevil/lib/dialogs/dialogBrowser.py | 25 | # -*- coding: utf-8 -*-
import xbmcgui
class DialogBrowser:
def __init__(self):
self.dlg = xbmcgui.Dialog()
def browseFolders(self, head):
return self.dlg.browse(0, head,'files', '', False, False)
def close(self):
self.dlg.close() |
askeing/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/py/testing/log/test_warning.py | 55 | import sys
from distutils.version import LooseVersion
import pytest
import py
mypath = py.path.local(__file__).new(ext=".py")
win = sys.platform.startswith('win')
pytestmark = pytest.mark.skipif(win and LooseVersion(pytest.__version__) >= LooseVersion('3.1'),
reason='apiwarn is not ... |
zarafagroupware/zarafa-zsm | refs/heads/master | webservice/apiapp/authentication.py | 1 | # Copyright 2012 - 2013 Zarafa B.V.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3,
# as published by the Free Software Foundation with the following additional
# term according to sec. 7:
#
# According to sec. 7 of the ... |
crasker/scrapy | refs/heads/master | scrapy/extensions/throttle.py | 142 | import logging
from scrapy.exceptions import NotConfigured
from scrapy import signals
logger = logging.getLogger(__name__)
class AutoThrottle(object):
def __init__(self, crawler):
self.crawler = crawler
if not crawler.settings.getbool('AUTOTHROTTLE_ENABLED'):
raise NotConfigured
... |
zturchan/CMPUT410-Lab6 | refs/heads/master | v1/lib/python2.7/site-packages/django/contrib/gis/apps.py | 91 | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class GISConfig(AppConfig):
name = 'django.contrib.gis'
verbose_name = _("GIS")
|
jazcollins/models | refs/heads/master | object_detection/builders/matcher_builder.py | 21 | # 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... |
shownomercy/django | refs/heads/master | tests/generic_relations_regress/tests.py | 300 | from django.db.models import Q, Sum
from django.db.models.deletion import ProtectedError
from django.db.utils import IntegrityError
from django.forms.models import modelform_factory
from django.test import TestCase, skipIfDBFeature
from .models import (
A, B, C, D, Address, Board, CharLink, Company, Contact, Conte... |
40223105/w17test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/xml/dom/pulldom.py | 850 | import xml.sax
import xml.sax.handler
START_ELEMENT = "START_ELEMENT"
END_ELEMENT = "END_ELEMENT"
COMMENT = "COMMENT"
START_DOCUMENT = "START_DOCUMENT"
END_DOCUMENT = "END_DOCUMENT"
PROCESSING_INSTRUCTION = "PROCESSING_INSTRUCTION"
IGNORABLE_WHITESPACE = "IGNORABLE_WHITESPACE"
CHARACTERS = "CHARACTERS"
class PullDOM(... |
HazyTeam/platform_external_wpa_supplicant_8 | refs/heads/hazy-mallow | wpa_supplicant/examples/p2p-nfc.py | 16 | #!/usr/bin/python
#
# Example nfcpy to wpa_supplicant wrapper for P2P NFC operations
# Copyright (c) 2012-2013, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import os
import sys
import time
import random
import threading
import argparse... |
mahabuber/erpnext | refs/heads/develop | erpnext/accounts/doctype/sales_invoice/pos.py | 11 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
@frappe.whitelist()
def get_items(price_list, sales_or_purchase, item=None):
condition = ""
order_by = ""
args = {"price_list": price_... |
harmy/kbengine | refs/heads/master | kbe/src/lib/python/Lib/lib2to3/fixes/fix_filter.py | 164 | # 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... |
techsd/namebench | refs/heads/master | nb_third_party/dns/rdtypes/nsbase.py | 248 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... |
yjxtogo/horizon | refs/heads/master | openstack_dashboard/dashboards/project/volumes/panel.py | 47 | # Copyright 2012 Nebula, 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 agree... |
Emilgardis/falloutsnip | refs/heads/develop | Vendor/IronPython/Lib/xml/dom/NodeFilter.py | 455 | # 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... |
blueyed/pip | refs/heads/develop | tests/lib/venv.py | 1 | from __future__ import absolute_import
import os
import sys
import subprocess
import virtualenv as _virtualenv
from .path import Path
# On Python < 3.3 we don't have subprocess.DEVNULL
try:
DEVNULL = subprocess.DEVNULL
except AttributeError:
DEVNULL = open(os.devnull, "wb")
class VirtualEnvironment(objec... |
mortonjt/scipy | refs/heads/master | scipy/spatial/tests/test_qhull.py | 8 | from __future__ import division, print_function, absolute_import
import os
import copy
import numpy as np
from numpy.testing import (assert_equal, assert_almost_equal, run_module_suite,
assert_, dec, assert_allclose, assert_array_equal,
assert_raises)
from scipy._... |
leedm777/ansible | refs/heads/devel | v1/ansible/inventory/expand_hosts.py | 148 | # (c) 2012, Zettar Inc.
# Written by Chin Fang <fangchin@zettar.com>
#
# This file is part of Ansible
#
# 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 y... |
brain-tec/sale-workflow | refs/heads/8.0 | sale_automatic_workflow/sale_workflow_process.py | 9 | # -*- encoding: utf-8 -*-
###############################################################################
#
# sale_automatic_workflow for OpenERP
# Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Author: Guewen Baconnier
# Copyright 2014 Camptocamp SA
#
# This program is free s... |
Pexego/account-financial-tools | refs/heads/8.0 | account_move_line_payable_receivable_filter/__init__.py | 14224 | # -*- coding: utf-8 -*-
|
CVL-dev/cvl-fabric-launcher | refs/heads/master | pyinstaller-2.1/tests/eggs4testing/setup-unzipped.py | 7 | #-----------------------------------------------------------------------------
# Copyright (c) 2013, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this softwa... |
hackfestca/cnb | refs/heads/master | cnb/modAvailable/CNBMMFacts.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
CNB Matrix Module
'''
import random
from cnb.cnbConfig import CNBConfig
from cnb.cnbMatrixModule import CNBMatrixModule
class CNBMMFacts(CNBMatrixModule):
"""
"""
name = 'fact'
usage = 'fact [LANG]'
desc = 'This cmd simply is the truth!'
aliases... |
boompieman/iim_project | refs/heads/master | project_python2/lib/python2.7/site-packages/nbformat/v4/tests/formattest.py | 20 | # -*- coding: utf8 -*-
import io
import os
import shutil
import tempfile
pjoin = os.path.join
from .nbexamples import nb0
def open_utf8(fname, mode):
return io.open(fname, mode=mode, encoding='utf-8')
class NBFormatTest:
"""Mixin for writing notebook format tests"""
# override with appropriate values ... |
tyb0807/angr | refs/heads/master | angr/procedures/stubs/UnresolvableTarget.py | 5 | import angr
######################################
# Unresolvable Target
######################################
class UnresolvableTarget(angr.SimProcedure):
NO_RET = True
def run(self):
return
|
vaginessa/pyload | refs/heads/stable | module/plugins/hoster/SharingmatrixCom.py | 15 | # -*- coding: utf-8 -*-
from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SharingmatrixCom(DeadHoster):
__name__ = "SharingmatrixCom"
__type__ = "hoster"
__version__ = "0.02"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?sharingmatrix\.com/file/\w+'... |
christophersu/strive-api | refs/heads/master | __init__.py | 1 | from api_blueprint import api_blueprint |
meabsence/python-for-android | refs/heads/master | python-modules/twisted/twisted/lore/test/__init__.py | 117 | "lore tests"
|
SlimRemix/android_external_chromium_org | refs/heads/lp5.1 | build/toolchain/mac/setup_toolchain.py | 146 | # Copyright (c) 2013 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 stat
import sys
def CopyTool(source_path):
"""Copies the given tool to the current directory, including a warning not
to edit it.""... |
fqul/scrapy | refs/heads/master | scrapy/commands/bench.py | 151 | import sys
import time
import subprocess
from six.moves.urllib.parse import urlencode
import scrapy
from scrapy.commands import ScrapyCommand
from scrapy.linkextractors import LinkExtractor
class Command(ScrapyCommand):
default_settings = {
'LOG_LEVEL': 'INFO',
'LOGSTATS_INTERVAL': 1,
'... |
mister11/bioinf_project | refs/heads/master | data/parse.py | 1 | from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir("raw/") if isfile(join('raw/', f))]
for filename in onlyfiles:
file = open("raw/" + filename, mode='r', encoding='utf-8')
lines = file.readlines()
string = ""
for line in lines[1:]:
string += line.strip()
... |
xaviercobain88/framework-python | refs/heads/master | openerp/addons/purchase/company.py | 51 | # -*- 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... |
sk413025/thug | refs/heads/master | src/Analysis/peepdf/jsbeautifier/unpackers/evalbased.py | 221 | #
# Unpacker for eval() based packers, a part of javascript beautifier
# by Einar Lielmanis <einar@jsbeautifier.org>
#
# written by Stefano Sanfilippo <a.little.coder@gmail.com>
#
# usage:
#
# if detect(some_string):
# unpacked = unpack(some_string)
#
"""Unpacker for eval() based packers: runs JS code and retu... |
foodszhang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/nntplib.py | 63 | """An NNTP client class based on:
- RFC 977: Network News Transfer Protocol
- RFC 2980: Common NNTP Extensions
- RFC 3977: Network News Transfer Protocol (version 2)
Example:
>>> from nntplib import NNTP
>>> s = NNTP('news')
>>> resp, count, first, last, name = s.group('comp.lang.python')
>>> print('Group', name, 'ha... |
Anonymouslemming/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_vpc_net.py | 72 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
ezcall-net-tw/EZCall | refs/heads/master | jni/pjsip/sources/pjsip-apps/src/python/samples/registration.py | 60 | # $Id: registration.py 2171 2008-07-24 09:01:33Z bennylp $
#
# SIP account and registration sample. In this sample, the program
# will block to wait until registration is complete
#
# Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
#
# This program is free software; you can redistribute it and/or modify
# it ... |
gauribhoite/personfinder | refs/heads/master | app/pytz/tests/test_docs.py | 6 | # -*- coding: ascii -*-
import unittest, os, os.path, sys
from doctest import DocTestSuite
# We test the documentation this way instead of using DocFileSuite so
# we can run the tests under Python 2.3
def test_README():
pass
this_dir = os.path.dirname(__file__)
locs = [
os.path.join(this_dir, os.pardir, 'REA... |
anentropic/django-cas-cache | refs/heads/master | setup.py | 1 | from distutils.core import setup
setup(
name='django-cas-cache',
version='0.1.13',
packages=[
'cascache',
'cascache.backends',
],
license='MIT',
long_description=open('pypi.rst').read(),
author="Anentropic",
author_email="ego@anentropic.com",
url="https://github.com/... |
rbl00/pen-testing-tools | refs/heads/master | tcp-server-multi-threaded.py | 1 | import socket
import threading
bind_ip = "0.0.0.0"
bind_port = 9999
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((bind_ip, bind_port))
server.listen(5)
print "[*] Listening on %s:%d" % (bind_ip, bind_port)
# this is the client handling thread
def handle_client(client_socket):
# prin... |
lnielsen/invenio | refs/heads/pu | invenio/modules/access/testsuite/test_jsonext_acl.py | 3 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014 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) a... |
skyling/shadowsocks | refs/heads/master | shadowsocks/asyncdns.py | 655 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
cogniteev/docido-python-sdk | refs/heads/master | tests/test_local_kv.py | 1 | from contextlib import contextmanager
import copy
import os.path as osp
import shutil
import tempfile
import unittest
from docido_sdk.env import Environment
from docido_sdk.index import (
IndexAPIConfigurationProvider,
IndexAPIError,
IndexPipelineConfig,
)
from docido_sdk.index.pipeline import IndexPipelin... |
tellapart/Diamond | refs/heads/master | src/collectors/netapp/test/testnetapp.py | 6 | #!/usr/bin/python
# coding=utf-8
###############################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from test import run_only
from mock import Mock
from mock import patch
from diamond.collector import Colle... |
sejros/FuzzyCalcPy | refs/heads/master | fuzzycalc/subset.py | 1 | # -*- coding: UTF-8 -*-
'''
Модуль реализует набор базовых типов, представляющих разные виды нечетких
подмножеств.
'''
from .common import ACCURACY
from .domain import RationalRange, IntegerRange
##from .algebra import SubsetAlgebra, NumbersAlgebra
import pylab as p
import math
class Subset(object)... |
alphacsc/alphacsc | refs/heads/master | alphacsc/utils/arma.py | 1 | ##########################################################################
# This code is taken from the pactools package available at
# https://github.com/pactools/pactools
#
import numpy as np
from scipy import signal, linalg, fftpack, fft
class Arma(object):
"""Estimator of ARMA model:
y(t) + a(1)y(t-... |
david415/foolscap | refs/heads/master | src/foolscap/slicers/vocab.py | 2 | # -*- test-case-name: foolscap.test.test_banana -*-
from twisted.internet.defer import Deferred
from foolscap.constraint import Any, ByteStringConstraint
from foolscap.tokens import Violation, BananaError, INT, STRING
from foolscap.slicer import BaseSlicer, BaseUnslicer, LeafUnslicer
from foolscap.slicer import Banana... |
wolfe-pack/moro | refs/heads/master | public/javascripts/brat/server/src/ssplit.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
'''
Primitive sentence splitting using Sampo Pyysalo's GeniaSS sentence split
refiner. Also a primitive Japanese sentence splitter without refinement.
Author: Pontus Stenetorp <pontus stenetorp se>
Version: 2011-05-09
'''
fro... |
CXQERP/ODOOERP | refs/heads/master | addons/crm_partner_assign/__init__.py | 364 | # -*- 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.