repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
aricchen/openHR | refs/heads/master | openerp/addons/project/project.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
will-hart/twitter_sentiment | refs/heads/master | classifier/run_test_classifier.py | 1 | from tweet_classifier import TweetClassifier as TC
def run_test(val, expected):
print "{0} (exp {1}) >> {2}".format(t.classify(val), expected, val)
# create the classifier
t = TC()
# Start by gathering some data.
print "Gathering data..."
t.fetch_data()
# train the classifier
print "Training the classifier..."... |
jumpstarter-io/nova | refs/heads/master | nova/db/sqlalchemy/migrate_repo/manage.py | 131 | #!/usr/bin/env python
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
jackie6chang/aits | refs/heads/master | bs2grproxy/bs2grpadmin.py | 1 | # BS2 GAE Reverse Proxy
# Russell <yufeiwu@gmail.com>
# Please use wisely
from bs2grpfile import *
from bs2grpconfig import *
from google.appengine.api import users
import webapp2
from google.appengine.api import memcache
import datetime
def redirect(response, url):
response.set_status(307)
resp... |
YUPlayGodDev/platform_external_skia | refs/heads/android-6.0.0 | tools/skp/page_sets/skia_css3gradients_desktop.py | 33 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... |
marcoitur/Freecad_test | refs/heads/master | src/Mod/TemplatePyMod/PythonQt.py | 56 | """
Examples for customizing the FreeCAD application with PySide facilities.
(c) 2007 Werner Mayer LGPL
"""
__author__ = "Werner Mayer <werner.wm.mayer@gmx.de>"
from PySide import QtCore,QtGui
import FreeCAD,FreeCADGui, __main__
class MainWindow:
def __init__(self):
self.app = QtGui.qApp
self.mw = FreeCADGui.ge... |
timothsp/where2ate | refs/heads/master | venv/lib/python3.3/site-packages/pip/req/req_file.py | 239 | """
Requirements file parsing
"""
from __future__ import absolute_import
import os
import re
import shlex
import optparse
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves import filterfalse
import pip
from pip.download import get_file_content
from pip.req.req_install import ... |
mitchellrj/touchdown | refs/heads/master | touchdown/tests/__init__.py | 2 | # Copyright 2014 Isotoma Limited
#
# 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... |
acsone/account-financial-tools | refs/heads/8.0 | account_move_line_search_extension/models/res_partner.py | 4 | # -*- coding: utf-8 -*-
# Copyright 2009-2016 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models
class ResPartner(models.Model):
_inherit = 'res.partner'
def search(self, cr, uid, args,
offset=0, limit=None, order=None, context=None, count=False)... |
rubyinhell/brython | refs/heads/master | www/src/Lib/test/test_timeit.py | 107 | import timeit
import unittest
import sys
import io
import time
from textwrap import dedent
from test.support import run_unittest
from test.support import captured_stdout
from test.support import captured_stderr
# timeit's default number of iterations.
DEFAULT_NUMBER = 1000000
# timeit's default number of repetitions... |
ubgarbage/gae-blog | refs/heads/master | openid/test/test_accept.py | 75 | import unittest
import os.path
from openid.yadis import accept
def getTestData():
"""Read the test data off of disk
() -> [(int, str)]
"""
filename = os.path.join(os.path.dirname(__file__), 'data', 'accept.txt')
i = 1
lines = []
for line in file(filename):
lines.append((i, line))
... |
SUSE/azure-sdk-for-python | refs/heads/master | azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py | 2 | # 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 ... |
notwin/WeRoBot | refs/heads/develop | docs/conf.py | 13 | # -*- coding: utf-8 -*-
#
# WeRoBot documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 4 16:51:10 2013.
#
# 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.
#
# All... |
MarcoForte/PyDAQmx_Helper | refs/heads/master | pydaqmx_helper/examples/AtoD_MultiChannelSample.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
""" Example program to show how to read multiple
samples from multiple AtoD channels at a given sample rate
"""
from pydaqmx_helper.atod import AtoD
myAtoD = AtoD()
myAtoD.addChannels([0, 1, 2])
sample = myAtoD.sampleVoltages(10, 10, [2,... |
hosaka/micropython | refs/heads/master | tests/basics/bytearray_slice_assign.py | 18 | try:
bytearray()[:] = bytearray()
except TypeError:
print("SKIP")
import sys
sys.exit()
# test slices; only 2 argument version supported by Micro Python at the moment
x = bytearray(range(10))
# Assignment
l = bytearray(x)
l[1:3] = bytearray([10, 20])
print(l)
l = bytearray(x)
l[1:3] = bytearray([10])
... |
maxfischer2781/chainlet | refs/heads/master | chainlet/primitives/chain.py | 1 | from .. import signals
from ..chainsend import lazy_send
from .link import ChainLink
from .compound import CompoundLink
class Chain(CompoundLink):
"""
A group of chainlets that sequentially process each :term:`data chunk`
:param elements: the chainlets making up this chain
:type elements: iterable[:p... |
daphnei/nn_chatbot | refs/heads/master | seq2seq/seq2seq/global_vars.py | 6 | # Copyright 2017 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 writing,... |
omnirom/android_kernel_htc_flounder | refs/heads/android-7.1 | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
eayunstack/fuel-web | refs/heads/master | nailgun/nailgun/api/v1/validators/json_schema/assignment.py | 6 | # -*- coding: utf-8 -*-
# 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 requi... |
totemtang/hadoop-RHJoin | refs/heads/master | src/examples/python/WordCount.py | 123 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
krzysztof-magosa/ansible-modules-extras | refs/heads/devel | cloud/cloudstack/cs_zone_facts.py | 42 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# 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 Lice... |
jt6562/XX-Net | refs/heads/master | python27/1.0/lib/encodings/latin_1.py | 853 | """ Python 'latin-1' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is intended.
... |
sasukeh/neutron | refs/heads/master | neutron/plugins/common/constants.py | 19 | # Copyright 2012 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 req... |
prasannav7/ggrc-core | refs/heads/develop | src/ggrc/models/clause.py | 3 | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: dan@reciprocitylabs.com
# Maintained By: urban@reciprocitylabs.com
from ggrc import db
from ggrc.models.mixins import CustomAttributable
from ggrc... |
dirn/ansible | refs/heads/devel | lib/ansible/plugins/connections/funcd.py | 140 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... |
renegelinas/mi-instrument | refs/heads/master | mi/core/versioning.py | 8 | from functools import wraps
def version(version_number):
"""Wrapper to add version name to parser.
Placing the version number on the parse function seems to make
more sense than adding __version__ to the code and relying on that.
"""
def put_version(to_wrap):
@wraps(to_wrap)
def inne... |
atruberg/django-custom | refs/heads/master | django/contrib/contenttypes/views.py | 115 | from __future__ import unicode_literals
from django import http
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site, get_current_site
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
def shortcut(request, conte... |
gnuhub/intellij-community | refs/heads/master | python/testData/inspections/PyProtectedMemberInspection/truePositive.py | 75 | __author__ = 'ktisha'
class A:
def __init__(self):
self._a = 1
def foo(self):
self.b= 1
print <weak_warning descr="Access to a protected member _a of a class">A()._a</weak_warning> |
blueboxgroup/cinder | refs/heads/master | cinder/tests/targets/test_base_iscsi_driver.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
# d... |
willthames/ansible | refs/heads/devel | lib/ansible/modules/cloud/ovirt/ovirt_quotas.py | 45 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# 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
#... |
frc1418/2015-robot | refs/heads/master | practice_robot/robot.py | 1 | #!/usr/bin/env python3
import wpilib
import distance
class MyRobot(wpilib.SampleRobot):
def robotInit(self):
self.servo= wpilib.Servo(6)
##INITIALIZE JOYSTICKS##
self.joystick1 = wpilib.Joystick(0)
self.joystick2 = wpilib.Joystick(1)
##INITIALIZE MOTORS##
... |
pombredanne/django-markupwiki | refs/heads/master | example/settings.py | 1 | DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'example',
}
}
ADMIN_MEDIA_PREFIX = '/media/'
SECRET_KEY = 'h%+o+&fe3r4j0z=9ghk=!divcta%zh%&=k8d^r08$cgr@3k3-&'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',... |
javiplx/cobbler-2.x | refs/heads/master | cobbler/action_status.py | 15 | """
Reports on kickstart activity by examining the logs in
/var/log/cobbler.
Copyright 2007-2009, Red Hat, Inc
Michael DeHaan <mdehaan@redhat.com>
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; eit... |
luster/oldnyc | refs/heads/master | viewer/simplejson/tests/test_speedups.py | 129 | from unittest import TestCase
from simplejson import encoder, scanner
def has_speedups():
return encoder.c_make_encoder is not None
class TestDecode(TestCase):
def test_make_scanner(self):
if not has_speedups():
return
self.assertRaises(AttributeError, scanner.c_make_scanner, 1)
... |
JeroenZegers/Nabu-MSSS | refs/heads/master | nabu/postprocessing/speaker_verification_handlers/__init__.py | 1 | """@package speaker_verification_handlers"""
from . import speaker_verification_handler, speaker_verification_handler_factory, averager
|
Nexenta/cinder | refs/heads/master | cinder/tests/unit/volume/drivers/netapp/eseries/test_host_mapper.py | 8 | # Copyright (c) 2015 Alex Meade. All rights reserved.
# 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
... |
binoculars/osf.io | refs/heads/develop | api_tests/base/test_utils.py | 6 | # -*- coding: utf-8 -*-
from nose.tools import * # flake8: noqa
import mock # noqa
import unittest
from rest_framework import fields
from rest_framework.exceptions import ValidationError
from api.base import utils as api_utils
from framework.status import push_status_message
class TestTruthyFalsy:
"""Check th... |
qtile/qtile | refs/heads/master | libqtile/scripts/run_cmd.py | 2 | # Copyright (c) 2014, Roger Duran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the \"Software\"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dist... |
nickvandewiele/RMG-Py | refs/heads/master | rmgpy/cantherm/pdep.py | 5 | #!/usr/bin/env python
# encoding: utf-8
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the
# RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of cha... |
texastribune/tx_salaries | refs/heads/master | tx_salaries/utils/transformers/university_of_north_texas_system.py | 1 | from . import base
from . import mixins
from datetime import date
from .. import cleaver
class TransformedRecord(
mixins.GenericCompensationMixin, mixins.GenericDepartmentMixin,
mixins.GenericIdentifierMixin, mixins.GenericJobTitleMixin,
mixins.GenericPersonMixin, mixins.MembershipMixin,
... |
arbn/pysaml2 | refs/heads/master | tests/test_63_ecp.py | 3 | from saml2.authn_context import INTERNETPROTOCOLPASSWORD
from saml2.httpbase import set_list2dict
from saml2.profile.ecp import RelayState
from saml2.profile.paos import Request
from saml2.server import Server
from saml2.samlp import Response
from saml2.samlp import STATUS_SUCCESS
from saml2.samlp import AuthnRequest
f... |
vanhonit/xmario_center | refs/heads/master | softwarecenter/ui/gtk3/panes/installedpane.py | 3 | # -*- coding: utf-8 -*-
# Copyright (C) 2009-2011 Canonical
#
# Authors:
# Michael Vogt
# Didier Roche
#
# 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; version 3.
#
# This program is distribu... |
dsprenkels/servo | refs/heads/master | tests/wpt/harness/wptrunner/tests/__init__.py | 621 | # 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/.
|
dnozay/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/django/utils/hashcompat.py | 319 | """
The md5 and sha modules are deprecated since Python 2.5, replaced by the
hashlib module containing both hash algorithms. Here, we provide a common
interface to the md5 and sha constructors, depending on system version.
"""
import sys
if sys.version_info >= (2, 5):
import hashlib
md5_constructor = hashlib.m... |
AndreyPopovNew/asuswrt-merlin-rt-n | refs/heads/master | release/src/router/libxml2/python/tests/xpathns.py | 59 | #!/usr/bin/python -u
#
import libxml2
expect=' xmlns:a="urn:whatevar"'
# Memory debug specific
libxml2.debugMemory(1)
d = libxml2.parseDoc("<a:a xmlns:a='urn:whatevar'/>")
res=""
for n in d.xpathEval("//namespace::*"):
res = res + n.serialize()
d.freeDoc()
if res != expect:
print "test5 failed: unexpected o... |
m0gliE/fastcoin-8.7.4rc1 | refs/heads/fastcoin-8.7.4rc1 | contrib/wallettools/walletunlock.py | 782 | from jsonrpc import ServiceProxy
access = ServiceProxy("http://127.0.0.1:9332")
pwd = raw_input("Enter wallet passphrase: ")
access.walletpassphrase(pwd, 60)
|
pyg3t/pyg3t | refs/heads/master | pyg3t/gtcheckargs.py | 1 | from __future__ import print_function, unicode_literals
import sys
from optparse import OptionParser
from pyg3t.gtparse import parse
from pyg3t.util import NullDevice, pyg3tmain, get_encoded_output, regex
description = """Check translations of command-line options in po-files."""
def build_parser():
p = Option... |
tonysyu/mpltools | refs/heads/master | mpltools/widgets/slider.py | 2 | import matplotlib.widgets as mwidgets
class Slider(mwidgets.Slider):
"""Slider widget to select a value from a floating point range.
Parameters
----------
ax : :class:`~matplotlib.axes.Axes` instance
The parent axes for the widget
value_range : (float, float)
(min, max) value allo... |
atul-bhouraskar/django | refs/heads/master | django/conf/locale/mk/formats.py | 504 | # -*- 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 = 'd F Y'
TIME_FORMAT = 'H:i'
DATETI... |
googleads/google-ads-python | refs/heads/master | google/ads/googleads/v6/services/services/user_data_service/transports/__init__.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
1tush/sentry | refs/heads/master | src/sentry/migrations/0091_auto__add_alert.py | 36 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Alert'
db.create_table('sentry_alert', (
('id', self.gf('sentry.db.models.fields... |
QijunPan/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/netapp_e_host.py | 45 | #!/usr/bin/python
# (c) 2016, NetApp, Inc
#
# 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.... |
guildenstern70/pyfab | refs/heads/master | src/reportlab/graphics/widgets/table.py | 32 | #!/usr/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgets/grids.py
__version__=''' $Id$ '''
from reportlab.graphics.widgetbase import Widget
from reportlab.graphics.char... |
USGCRP/gcis-py-client | refs/heads/master | bin/states.py | 1 | from collections import OrderedDict
sync_metadata_tree = {
'noaa-led-state-summaries-2017': OrderedDict([
# ('alabama', [
# ('/metadata/figures/3819', 'al-observed-and-projected-temperature-change', '1'),
# ('/metadata/figures/3817', 'al-observed-number-of-very-hot-days', '2a'),
... |
kenshay/ImageScript | refs/heads/master | ProgramData/SystemFiles/Python/Lib/site-packages/gitdb/test/test_example.py | 6 | # Copyright (C) 2010, 2011 Sebastian Thiel (byronimo@gmail.com) and contributors
#
# This module is part of GitDB and is released under
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
"""Module with examples from the tutorial section of the docs"""
import os
from gitdb.test.lib import TestBase... |
wenhuizhang/neutron | refs/heads/master | neutron/extensions/securitygroup.py | 4 | # Copyright (c) 2012 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... |
ikaee/bfr-attendant | refs/heads/master | facerecognitionlibrary/jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/classifier.py | 4 | # 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... |
40223134/w16b_test | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/ui/__init__.py | 606 | from browser import html, document
from .dialog import *
from .progressbar import *
from .slider import *
def add_stylesheet():
_link=html.LINK(Href='/src/Lib/ui/css/smoothness/jquery-ui-1.10.3.custom.min.css')
_link.rel='stylesheet'
document <= _link
|
gptech/ansible | refs/heads/devel | lib/ansible/modules/network/aos/aos_logical_device_map.py | 78 | #!/usr/bin/python
#
# (c) 2017 Apstra Inc, <community@apstra.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 opt... |
etherkit/OpenBeacon2 | refs/heads/master | client/linux-arm/venv/lib/python3.5/site-packages/PyInstaller/hooks/hook-PyQt5.QtSql.py | 66 | #-----------------------------------------------------------------------------
# Copyright (c) 2013-2019, 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 s... |
dylan-reeves/Simple-Plant-MS | refs/heads/master | sites/views.py | 1 | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import user_passes_test
from django.... |
andrewcmyers/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/datasets/base.py | 125 | # 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... |
da1z/intellij-community | refs/heads/master | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_0/_pkg0_0_0_0_1/_mod0_0_0_0_1_4.py | 30 | name0_0_0_0_1_4_0 = None
name0_0_0_0_1_4_1 = None
name0_0_0_0_1_4_2 = None
name0_0_0_0_1_4_3 = None
name0_0_0_0_1_4_4 = None |
olivernina/idropout | refs/heads/master | layer.py | 1 | # Copyright (c) 2011, Alex Krizhevsky (akrizhevsky@gmail.com)
# 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 ... |
azide0x37/modocDB | refs/heads/master | venv/lib/python2.7/site-packages/setuptools/command/upload_docs.py | 332 | # -*- coding: utf-8 -*-
"""upload_docs
Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
"""
import os
import socket
import zipfile
import tempfile
import sys
import shutil
from base64 import standard_b64encode
from pkg_resources import iter_entry_points
from distuti... |
bnrubin/ubuntu-bots | refs/heads/master | Webcal/icalendar/prop.py | 1 | # -*- coding: latin-1 -*-
"""
This module contains the parser/generators (or coders/encoders if you prefer)
for the classes/datatypes that are used in Icalendar:
###########################################################################
# This module defines these property value data types and property parameters
... |
schrockntemp/graphscaletemp | refs/heads/master | graphscale/kvetch/kvetch.py | 1 | from uuid import UUID, uuid4
from graphscale.utils import param_check, async_array, print_error
class KvetchShard:
def check_insert_object_vars(self, new_id, type_id, data):
param_check(new_id, UUID, 'new_id')
param_check(type_id, int, 'type_id')
param_check(data, dict, 'data')
if '... |
TaskEvolution/Task-Coach-Evolution | refs/heads/master | taskcoach/taskcoachlib/thirdparty/filters/optionaltags.py | 1727 | from __future__ import absolute_import, division, unicode_literals
from . import _base
class Filter(_base.Filter):
def slider(self):
previous1 = previous2 = None
for token in self.source:
if previous1 is not None:
yield previous2, previous1, token
previous2... |
freedesktop-unofficial-mirror/gstreamer__cerbero | refs/heads/master | cerbero/commands/__init__.py | 27 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... |
tms/node-gyp | refs/heads/master | gyp/pylib/gyp/MSVSUserFile.py | 2710 | # 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.
"""Visual Studio user preferences file writer."""
import os
import re
import socket # for gethostname
import gyp.common
import gyp.easy_xml as easy_xml
#------... |
devinbalkind/eden | refs/heads/master | private/templates/EVASS/maintenance.py | 15 | # -*- coding: utf-8 -*-
import datetime
import os
import time
from gluon import current
# =============================================================================
class Daily():
""" Daily Maintenance Tasks """
def __call__(self):
db = current.db
s3db = current.s3db
request = cu... |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | refs/heads/master | esstoolkit/external/networkx/generators/atlas.py | 1 | """
Generators for the small graph atlas.
"""
import gzip
from itertools import islice
import os
import os.path
import networkx as nx
__all__ = ["graph_atlas", "graph_atlas_g"]
#: The total number of graphs in the atlas.
#:
#: The graphs are labeled starting from 0 and extending to (but not
#: including) this number... |
mortenm12/P7-CBR-for-Timed-I-O | refs/heads/master | python_dbm/test.py | 2 | import udbm
import unittest
import pdb
class UDBMTest(unittest.TestCase):
def setUp(self):
self.c = udbm.Context(["x", "y", "z"], name = "c")
def test_int_valuation(self):
c = self.c
v = udbm.IntValuation(c)
self.assertRaises(KeyError, lambda :(v["not_in_federation"]))... |
flyfei/python-for-android | refs/heads/master | python3-alpha/python3-src/Tools/msi/uisample.py | 89 |
import msilib,os;dirname=os.path.dirname(__file__)
AdminExecuteSequence = [
(u'InstallValidate', None, 1400),
(u'InstallInitialize', None, 1500),
(u'InstallFinalize', None, 6600),
(u'InstallFiles', None, 4000),
(u'InstallAdminPackage', None, 3900),
(u'FileCost', None, 900),
(u'CostInitialize', None, 800),
(u'CostFinal... |
onceuponatimeforever/oh-mainline | refs/heads/master | vendor/packages/twisted/doc/web/howto/listings/render_1.py | 19 | from twisted.web.template import flattenString
from element_1 import ExampleElement
def renderDone(output):
print output
flattenString(None, ExampleElement()).addCallback(renderDone)
|
shineyear/catawampus | refs/heads/master | tr/cwmpdate_test.py | 6 | #!/usr/bin/python
# Copyright 2011 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 appli... |
tlakshman26/cinder-new-branch | refs/heads/master | cinder/tests/unit/objects/test_volume_type.py | 9 | # Copyright 2015 SimpliVity Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
AkA84/edx-platform | refs/heads/master | cms/djangoapps/contentstore/views/xblock.py | 70 | """
Views dedicated to rendering xblocks.
"""
from __future__ import absolute_import
import logging
import mimetypes
from xblock.core import XBlock
from django.conf import settings
from django.http import Http404, HttpResponse
log = logging.getLogger(__name__)
def xblock_resource(request, block_type, uri): # py... |
Milli4272/MoneyCoin | refs/heads/master | share/qt/clean_mac_info_plist.py | 229 | #!/usr/bin/env python
# Jonas Schnelli, 2013
# make sure the Litecoin-Qt.app contains the right plist (including the right version)
# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)
from string import Template
from datetime import date
bitcoinDir = "./";
in... |
jbenden/ansible | refs/heads/devel | lib/ansible/plugins/terminal/__init__.py | 71 | #
# (c) 2016 Red Hat Inc.
#
# 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 d... |
quanvm009/codev7 | 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... |
arvinsingla/CouchPotatoServer | refs/heads/master | libs/suds/xsd/doctor.py | 205 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 hope that it will ... |
thedrow/cython | refs/heads/master | Cython/Compiler/Tests/__init__.py | 1472 | # empty file
|
shannonjlove/namebench | refs/heads/master | tools/ordered-uniq.py | 175 | #!/usr/bin/env python
# Copyright 2009 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... |
deepakiam/bot | refs/heads/master | bot/server/ctrl_server.py | 1 | #!/usr/bin/env python
"""Server that accepts and executes control-type commands on the bot."""
import sys
import os
from inspect import getmembers, ismethod
from simplejson.decoder import JSONDecodeError
import zmq
import signal
# This is required to make imports work
sys.path = [os.getcwd()] + sys.path
import bot.l... |
eviljeff/olympia | refs/heads/master | src/olympia/scanners/migrations/0010_auto_20191023_0908.py | 6 | # Generated by Django 2.2.6 on 2019-10-23 09:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [('scanners', '0009_auto_20191023_0906')]
# Nothing to do...
operations = []
|
JeyZeta/Dangerous | refs/heads/master | Dangerous/Golismero/tools/sqlmap/plugins/dbms/firebird/__init__.py | 8 | #!/usr/bin/env python
"""
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.enums import DBMS
from lib.core.settings import FIREBIRD_SYSTEM_DBS
from lib.core.unescaper import unescaper
from plugins.dbms.firebird.enumeration import Enumer... |
OpenRCE/sulley | refs/heads/master | sulley/pedrpc.py | 15 | import sys
import struct
import time
import socket
import cPickle
########################################################################################################################
class client:
def __init__ (self, host, port):
self.__host = host
self.__port = port
... |
andela-earinde/bellatrix-py | refs/heads/master | app/js/lib/lib/modules/distutils/command/check.py | 98 | """distutils.command.check
Implements the Distutils 'check' command.
"""
__revision__ = "$Id$"
from distutils.core import Command
from distutils.dist import PKG_INFO_ENCODING
from distutils.errors import DistutilsSetupError
try:
# docutils is installed
from docutils.utils import Reporter
from docutils.pa... |
brijeshkesariya/odoo | refs/heads/8.0 | addons/hr_timesheet/__openerp__.py | 257 | # -*- 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... |
cntnboys/410Lab6 | refs/heads/master | build/django/build/lib.linux-x86_64-2.7/django/contrib/sites/__init__.py | 808 | default_app_config = 'django.contrib.sites.apps.SitesConfig'
|
ChameleonCloud/horizon | refs/heads/chameleoncloud/train | openstack_auth/exceptions.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 the... |
7ing/kubernetes | refs/heads/master | examples/cluster-dns/images/backend/server.py | 504 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
watspidererik/testenv | refs/heads/master | flask/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.py | 523 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32
# from wincon.h
class WinColor(object):
BLACK = 0
BLUE = 1
GREEN = 2
CYAN = 3
RED = 4
MAGENTA = 5
YELLOW = 6
GREY = 7
# from wincon.h
class WinStyle(object):
NORMAL = 0... |
jicruz/heroku-bot | refs/heads/master | lib/urllib3/packages/ssl_match_hostname/_implementation.py | 285 | """The match_hostname() function from Python 3.3.3, essential when using SSL."""
# Note: This file is under the PSF license as the code comes from the python
# stdlib. http://docs.python.org/3/license.html
import re
import sys
# ipaddress has been backported to 2.6+ in pypi. If it is installed on the
# system, us... |
AlexRobson/scikit-learn | refs/heads/master | sklearn/externals/joblib/parallel.py | 86 | """
Helpers for embarrassingly parallel code.
"""
# Author: Gael Varoquaux < gael dot varoquaux at normalesup dot org >
# Copyright: 2010, Gael Varoquaux
# License: BSD 3 clause
from __future__ import division
import os
import sys
import gc
import warnings
from math import sqrt
import functools
import time
import thr... |
JuBra/GEMEditor | refs/heads/master | GEMEditor/solution/base.py | 1 | from cobra.core import LegacySolution, Solution
def set_status_to_label(label, status):
""" Set the status to label
Parameters
----------
label: QLabel
status: str
Returns
-------
"""
if status == "optimal":
label.setStyleSheet("color: ForestGreen; font-weight: bold;")
... |
deKupini/erp | refs/heads/master | addons/hr_holidays/hr_holidays.py | 3 | # -*- coding: utf-8 -*-
##################################################################################
#
# Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com)
# and 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# $Id: hr.py 4656 2006-11-24 09:58:42Z Cyp $
#
# This program is free software: you can redistri... |
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/scipy/io/harwell_boeing/setup.py | 128 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('harwell_boeing',parent_package,top_path)
config.add_data_dir('tests')
return config
i... |
adelina-t/nova | refs/heads/master | nova/api/openstack/compute/schemas/v3/agents.py | 104 | # Copyright 2013 NEC Corporation. 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.