repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
orbitfp7/nova | refs/heads/master | nova/tests/unit/scheduler/filters/test_compute_filters.py | 68 | # 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... |
jlegendary/servo | refs/heads/master | tests/wpt/css-tests/tools/manifest/tree.py | 272 | import os
from cStringIO import StringIO
from fnmatch import fnmatch
import vcs
from log import get_logger
from utils import is_blacklisted, rel_path_to_url
def chunks(data, n):
for i in range(0, len(data) - 1, n):
yield data[i:i+n]
class TestTree(object):
def __init__(self, tests_root, url_base):
... |
Shaffi08/yowsup | refs/heads/master | yowsup/layers/protocol_groups/protocolentities/iq_groups_info.py | 61 | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .iq_groups import GroupsIqProtocolEntity
class InfoGroupsIqProtocolEntity(GroupsIqProtocolEntity):
'''
<iq id="{{id}}"" type="get" to="{{group_jid}}" xmlns="w:g2">
<query request="interactive"></query>
</iq>
'''
def __init__... |
sbrimhall/fuel-plugin-external-zabbix | refs/heads/master | deployment_scripts/puppet/modules/plugin_zabbix/files/scripts/check_rabbit.py | 2 | #!/usr/bin/python
#
# Copyright 2015 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 b... |
cboling/xos | refs/heads/master | xos/services/requestrouter/__init__.py | 12133432 | |
TNosredna/CouchPotatoServer | refs/heads/master | libs/migrate/versioning/templates/repository/pylons/versions/__init__.py | 12133432 | |
mozilla/mwc | refs/heads/master | lib/l10n_utils/models.py | 12133432 | |
msmolens/VTK | refs/heads/slicer-v6.3.0-2015-07-21-426987d | ThirdParty/Twisted/twisted/test/test_adbapi.py | 40 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for twisted.enterprise.adbapi.
"""
from twisted.trial import unittest
import os, stat
import types
from twisted.enterprise.adbapi import ConnectionPool, ConnectionLost
from twisted.enterprise.adbapi import Connection, Transaction
fro... |
orion/swift-config | refs/heads/dynamic-pipeline | swift/common/middleware/tempauth.py | 4 | # Copyright (c) 2011 OpenStack, 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 or agreed to in wr... |
tsunam/dotd_parser | refs/heads/master | models/uuid_generator.py | 2 | import uuid
def uuid_generator():
return str(uuid.uuid1())
|
waseem18/oh-mainline | refs/heads/master | vendor/packages/django-voting/voting/templatetags/voting_tags.py | 32 | from django import template
from django.utils.html import escape
from voting.models import Vote
register = template.Library()
# Tags
class ScoreForObjectNode(template.Node):
def __init__(self, object, context_var):
self.object = object
self.context_var = context_var
def render(self, context... |
pirate/bookmark-archiver | refs/heads/master | archivebox/core/welcome_message.py | 1 | from archivebox.logging_util import log_shell_welcome_msg
if __name__ == '__main__':
log_shell_welcome_msg()
|
cobalys/django | refs/heads/master | django/contrib/localflavor/nl/nl_provinces.py | 528 | from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('DR', _('Drenthe')),
('FL', _('Flevoland')),
('FR', _('Friesland')),
('GL', _('Gelderland')),
('GR', _('Groningen')),
('LB', _('Limburg')),
('NB', _('Noord-Brabant')),
('NH', _('Noord-Holland')),
('OV', _(... |
emkatsom/googletest | refs/heads/master | scripts/gen_gtest_pred_impl.py | 2538 | #!/usr/bin/env python
#
# Copyright 2006, 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... |
ingokegel/intellij-community | refs/heads/master | python/testData/inspections/PyTypeCheckerInspection/OldStyleClasses.py | 83 | def test_old_style_classes():
class C:
pass
def f(x):
"""
:type x: object
"""
pass
f(C()) #pass
|
tommyanthony/tablib | refs/heads/develop | tablib/packages/dbfpy3/dbfnew.py | 10 | #!/usr/bin/python
""".DBF creation helpers.
Note: this is a legacy interface. New code should use Dbf class
for table creation (see examples in dbf.py)
TODO:
- handle Memo fields.
- check length of the fields accoring to the
`http://www.clicketyclick.dk/databases/xbase/format/data_types.html`
"""
"""His... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-iothub/azure/mgmt/iothub/models/resource.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 ... |
jagg81/translate-toolkit | refs/heads/master | build/lib.linux-x86_64-2.6/translate/storage/placeables/test_base.py | 4 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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... |
ReddyLab/1000Genomes | refs/heads/master | pool-subst.py | 1 | #!/usr/bin/env python
#=========================================================================
# This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
# License (GPL) version 3, as described at www.opensource.org.
# Copyright (C)2017 William H. Majoros (martiandna@gmail.com).
#==============================... |
SRabbelier/Melange | refs/heads/master | thirdparty/google_appengine/lib/django_1_2/tests/regressiontests/model_inheritance_select_related/__init__.py | 12133432 | |
WillGuan105/django | refs/heads/master | tests/migrations/migrations_test_apps/__init__.py | 12133432 | |
pkexcellent/luigi | refs/heads/master | test/namespace_test_helper.py | 72 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
mDibyo/datascience | refs/heads/master | datascience/maps.py | 1 | """Draw maps using folium."""
from IPython.core.display import HTML
import json
import folium
import functools
import random
#########################
# Exposed Functionality #
#########################
def draw_map(obj=None, **kwargs):
"""Draw a map with center & zoom containing all points and regions that
... |
obnam-mirror/obnam | refs/heads/master | obnamlib/lockmgr.py | 3 | # Copyright 2012-2015 Lars Wirzenius
#
# 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 ... |
naresh21/synergetics-edx-platform | refs/heads/oxa/master.fic | lms/djangoapps/ccx/api/v0/serializers.py | 33 | """ CCX API v0 Serializers. """
from rest_framework import serializers
from lms.djangoapps.ccx.models import CustomCourseForEdX
from ccx_keys.locator import CCXLocator
class CCXCourseSerializer(serializers.ModelSerializer):
"""
Serializer for CCX courses
"""
ccx_course_id = serializers.SerializerMet... |
KylinUI/android_kernel_lge_msm8974 | refs/heads/kitkat | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
mverrilli/kombu | refs/heads/master | funtests/tests/test_mongodb.py | 28 | from nose import SkipTest
from kombu import Consumer, Producer, Exchange, Queue
from kombu.five import range
from kombu.utils import nested
from funtests import transport
class test_mongodb(transport.TransportCase):
transport = 'mongodb'
prefix = 'mongodb'
event_loop_max = 100
def before_connect(se... |
xsynergy510x/android_external_chromium_org | refs/heads/cm-12.1 | chrome/test/chromedriver/client/command_executor.py | 44 | # Copyright 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 httplib
import json
class _Method(object):
GET = 'GET'
POST = 'POST'
DELETE = 'DELETE'
class Command(object):
NEW_SESSION = (_Method.POST,... |
12yujim/pymtl | refs/heads/master | examples/gcd/__init__.py | 7 | #=========================================================================
# Modular Python Build System __init__ file
#=========================================================================
# List of collection modules
# ...
# List of single-class modules
from GcdUnitBL import GcdUnitBL
from GcdUnitRTL import ... |
krbaker/Diamond | refs/heads/master | src/collectors/openstackswiftrecon/openstackswiftrecon.py | 60 | # coding=utf-8
"""
Openstack Swift Recon collector. Reads any present recon cache files and
reports their current metrics.
#### Dependencies
* Running Swift services must have a recon enabled
"""
import os
try:
import json
except ImportError:
import simplejson as json
import diamond.collector
class Ope... |
chekunkov/scrapy | refs/heads/master | tests/test_item.py | 18 | import unittest
from scrapy.item import Item, Field
import six
class ItemTest(unittest.TestCase):
def assertSortedEqual(self, first, second, msg=None):
return self.assertEqual(sorted(first), sorted(second), msg)
def test_simple(self):
class TestItem(Item):
name = Field()
... |
yqm/sl4a | refs/heads/master | python-build/python-libs/gdata/src/gdata/tlslite/utils/cipherfactory.py | 357 | """Factory functions for symmetric cryptography."""
import os
import Python_AES
import Python_RC4
import cryptomath
tripleDESPresent = False
if cryptomath.m2cryptoLoaded:
import OpenSSL_AES
import OpenSSL_RC4
import OpenSSL_TripleDES
tripleDESPresent = True
if cryptomath.cryptlibpyLoaded:
impo... |
virgree/odoo | refs/heads/8.0 | addons/web_gantt/__openerp__.py | 387 | {
'name': 'Web Gantt',
'category': 'Hidden',
'description': """
OpenERP Web Gantt chart view.
=============================
""",
'version': '2.0',
'depends': ['web'],
'data' : [
'views/web_gantt.xml',
],
'qweb': [
'static/src/xml/*.xml',
],
'auto_install': True
}... |
bbbenja/SickRage | refs/heads/master | lib/bencode/__init__.py | 110 | from bencode import * |
drikinukoda/android_kernel_lge_e8lte | refs/heads/android-5.0.2 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
k5t4j5/kernel_htc_hybrid | refs/heads/5.0 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
havard024/prego | refs/heads/master | crm/lib/python2.7/site-packages/unidecode/x05f.py | 252 | data = (
'Kai ', # 0x00
'Bian ', # 0x01
'Yi ', # 0x02
'Qi ', # 0x03
'Nong ', # 0x04
'Fen ', # 0x05
'Ju ', # 0x06
'Yan ', # 0x07
'Yi ', # 0x08
'Zang ', # 0x09
'Bi ', # 0x0a
'Yi ', # 0x0b
'Yi ', # 0x0c
'Er ', # 0x0d
'San ', # 0x0e
'Shi ', # 0x0f
'Er ', # 0x10
'Shi ', ... |
BitWriters/Zenith_project | refs/heads/master | zango/lib/python3.5/site-packages/django/contrib/gis/management/commands/__init__.py | 12133432 | |
nikdoof/test-auth | refs/heads/master | app/__init__.py | 12133432 | |
Brocade-OpenSource/OpenStack-DNRM-Neutron | refs/heads/master | neutron/plugins/vyatta/__init__.py | 12133432 | |
stav/scrapybox | refs/heads/master | scrapybox/crawler/__init__.py | 12133432 | |
DazWorrall/zulip | refs/heads/master | analytics/management/commands/active_user_stats.py | 116 | from __future__ import absolute_import
from django.core.management.base import BaseCommand
from zerver.models import UserPresence, UserActivity
from zerver.lib.utils import statsd, statsd_key
from datetime import datetime, timedelta
from collections import defaultdict
class Command(BaseCommand):
help = """Sends... |
libresoft/CVSAnaly-ALERT-branch | refs/heads/alert | pycvsanaly2/extensions/Jobs.py | 1 | # Copyright (C) 2009 LibreSoft
#
# 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the ... |
ofayans/freeipa | refs/heads/master | ipaserver/plugins/sudocmd.py | 3 | # Authors:
# Jr Aquino <jr.aquino@citrixonline.com>
#
# Copyright (C) 2010 Red Hat
# see file 'COPYING' for use and warranty information
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eith... |
lpenguin/pandas-qt | refs/heads/master | pandasqt/__init__.py | 4 | # -*- coding: utf-8 -*-
__import__('pkg_resources').declare_namespace(__name__)
__version__ = '0.2.0'
|
wavelets/chainer | refs/heads/master | chainer/functions/cross_covariance.py | 4 | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class CrossCovariance(function.Function):
"""Cross-covariance loss."""
def __init__(self):
self.y_centered = None
self.z_centered = None
self.covariance = None
def check_type... |
wwj718/edx-platform | refs/heads/master | lms/djangoapps/lms_migration/management/commands/manage_course_groups.py | 250 | #!/usr/bin/python
#
# File: manage_course_groups
#
# interactively list and edit membership in course staff and instructor groups
import re
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User, Group
#-----------------------------------------------------------------------... |
18F/idea-box | refs/heads/master | src/idea/tests/model_tests.py | 5 | from django.test import TestCase
from idea import models
from datetime import datetime
from idea.tests.utils import random_user, create_superuser
from core.custom_comments.models import MPTTComment
class VotingTests(TestCase):
fixtures = ['state']
def setUp(self):
create_superuser()
self.stat... |
Peddle/hue | refs/heads/master | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/load.py | 67 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2007-2008 Søren Roug, European Environment Agency
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the L... |
bestvibes/neo4j-social-network | refs/heads/master | mac_env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/escprober.py | 2935 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
jarshwah/django | refs/heads/master | tests/or_lookups/models.py | 410 | """
OR lookups
To perform an OR lookup, or a lookup that combines ANDs and ORs, combine
``QuerySet`` objects using ``&`` and ``|`` operators.
Alternatively, use positional arguments, and pass one or more expressions of
clauses using the variable ``django.db.models.Q`` (or any object with an
``add_to_query`` method).
... |
EdFarrell/MilkMachine | refs/heads/master | src/MilkMachine/simplekml/schema.py | 1 | """
Copyright 2011-2014-2012 Kyle Lancaster
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... |
MechanisM/musicdb | refs/heads/master | musicdb/common/__init__.py | 12133432 | |
leki75/ansible | refs/heads/devel | test/units/executor/__init__.py | 12133432 | |
garnaat/boto | refs/heads/develop | tests/unit/sqs/__init__.py | 12133432 | |
paterson/servo | refs/heads/master | python/mach/mach/__init__.py | 12133432 | |
Vatsinator/VatsinatorDatabase | refs/heads/master | vatsinatordatabase/commits/migrations/__init__.py | 12133432 | |
adammw/python-iview | refs/heads/upstream | iview/__init__.py | 12133432 | |
fredkingham/blog-of-fred | refs/heads/master | django/conf/locale/ja/__init__.py | 12133432 | |
takada-at/rsproxy | refs/heads/master | test/queryfilter_test.py | 1 | # coding: utf-8
import testconfig
import sqlparse
from rsproxy import queryfilter
def test_filter_query_string():
filterobj = queryfilter.QueryFilter(["app='game13'"],
['dau', 'sales_log'])
# 必要な条件がある
sql = "SELECT * from dau WHERE app='game13'"
result0, = filt... |
simonwydooghe/ansible | refs/heads/devel | lib/ansible/module_utils/network/ios/argspec/l2_interfaces/l2_interfaces.py | 18 | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by ... |
wfxiang08/django190 | refs/heads/master | tests/requests/__init__.py | 12133432 | |
praekelt/ndoh-control | refs/heads/develop | subsend/__init__.py | 12133432 | |
hiphoox/experior | refs/heads/master | __init__.py | 12133432 | |
aurelijusb/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_popen2.py | 51 | #! /usr/bin/env python
"""Test script for popen2.py"""
import warnings
warnings.filterwarnings("ignore", ".*popen2 module is deprecated.*",
DeprecationWarning)
warnings.filterwarnings("ignore", "os\.popen. is deprecated.*",
DeprecationWarning)
import os
import sys
impor... |
jalaziz/django-cms-grappelli-old | refs/heads/master | tests/testapp/sampleapp/views.py | 1 | # Create your views here.
from django.http import Http404
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from testapp.sampleapp.models import Category
def sample_view(request, **kw):
context = RequestContext(request, kw)
return render_to_response("sampleapp/h... |
macks22/dblp | refs/heads/master | api/config-example.py | 2 | username = 'theboss'
password = 'superlongfantasticpasswordwhichnoonewillguess'
hostname = 'localhost'
dbname = 'dblp'
|
thaim/ansible | refs/heads/fix-broken-link | test/units/module_utils/facts/base.py | 31 | # base unit test classes for ansible/module_utils/facts/ tests
# -*- coding: utf-8 -*-
#
# 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 lat... |
srio/Orange-XOPPY | refs/heads/master | orangecontrib/xoppy/util/xoppy_undulators.py | 1 | # --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
import numpy
import os
from collections import OrderedDict
from orangecontrib.xoppy.util import srundplug
from orangecontrib.xo... |
dmugtasimov/django-constance | refs/heads/master | tests/test_database.py | 12 | from django.test import TestCase
from constance import settings
from tests.storage import StorageTestsMixin
class TestDatabase(StorageTestsMixin, TestCase):
def setUp(self):
super(TestDatabase, self).setUp()
self.old_backend = settings.BACKEND
settings.BACKEND = 'constance.backends.datab... |
lokeshjindal15/gem5_transform | refs/heads/master | src/dev/virtio/VirtIO9P.py | 48 | # -*- mode:python -*-
# Copyright (c) 2014 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementatio... |
trondhindenes/ansible | refs/heads/devel | lib/ansible/plugins/lookup/template.py | 78 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2012-17 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from _... |
airtrick/zxing | refs/heads/master | cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/hpc++.py | 34 | """SCons.Tool.hpc++
Tool-specific initialization for c++ on HP/UX.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Found... |
tardyp/buildbot_travis | refs/heads/master | buildbot_travis/cmdline.py | 1 | from __future__ import print_function
import argparse
import os
import re
import subprocess
from buildbot_travis import runner
filter_re = re.compile("([A-Z0-9_]+)(!?=)(.*)")
def parse_filter(f):
res = filter_re.match(f)
if not res:
raise ValueError("{} is not a correct filter".format(f))
retur... |
anirudhjayaraman/scikit-learn | refs/heads/master | sklearn/neighbors/classification.py | 132 | """Nearest Neighbor Classification"""
# Authors: Jake Vanderplas <vanderplas@astro.washington.edu>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl>
# Multi-output support by ... |
SinnerSchraderMobileMirrors/django-cms | refs/heads/develop | makemessages.py | 9 | #!/usr/bin/env python
from cms.test_utils.cli import configure
from cms.test_utils.tmpdir import temp_dir
import os
def main():
with temp_dir() as STATIC_ROOT:
with temp_dir() as MEDIA_ROOT:
configure(
'sqlite://localhost/cmstestdb.sqlite',
ROOT_URLCONF='cms.test... |
ronas/PythonGNF | refs/heads/master | Igor/pyqtex04.py | 1 | import sys
import pymysql
from PyQt4 import QtGui
config = {
'host':'localhost',
'port': 3306,
'database':'LojaDB',
'user':'admin',
'password':'admin'
}
class classApp(QtGui.QWidget):
def __init__(self):
super(classApp, self).__init__()
self.initUI... |
kntem/webdeposit | refs/heads/webdeposit-final | modules/websubmit/lib/functions/Finish_Submission.py | 39 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 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 ... |
jzt5132/scikit-learn | refs/heads/master | sklearn/utils/tests/test_graph.py | 334 | # Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
import numpy as np
from scipy import sparse
from sklearn.utils.graph import graph_laplacian
def test_graph_laplacian():
for mat in (np.arange(10) * np.arange(10)[:, np.newaxis],
np.ones((7, 7)),
np.e... |
evamwangi/bc-7-Todo_List | refs/heads/master | venv/Lib/site-packages/mako/util.py | 61 | # mako/util.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import re
import collections
import codecs
import os
from mako import compat
import operator
def up... |
waynenilsen/statsmodels | refs/heads/master | statsmodels/graphics/tukeyplot.py | 33 | from statsmodels.compat.python import range
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
import matplotlib.lines as lines
def tukeyplot(results, dim=None, yticklabels=None):
npairs = len(results)
fig = plt.figure()
fsp = fig.add_subplot(111)
fsp.axis([-50,50,... |
tafaRU/odoo | refs/heads/8.0 | addons/event/report/report_event_registration.py | 310 | # -*- 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... |
benthomasson/ansible | refs/heads/devel | lib/ansible/utils/jsonrpc.py | 49 | #
# (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... |
cschenck/blender_sim | refs/heads/master | fluid_sim_deps/psutil/tests/test_memory_leaks.py | 1 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
A test script which attempts to detect memory leaks by calling C
functions many times and compare process memory usage before an... |
SushiTee/teerace | refs/heads/master | teerace/api/management/commands/__init__.py | 12133432 | |
camilonova/django | refs/heads/master | django/conf/locale/id/__init__.py | 12133432 | |
aaxelb/SHARE | refs/heads/develop | bots/elasticsearch/__init__.py | 12133432 | |
datadvance/pRpc | refs/heads/master | prpc/utils/repr_builder.py | 1 | #
# coding: utf-8
# Copyright (c) 2018 DATADVANCE
#
# 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,... |
mhdella/scikit-learn | refs/heads/master | sklearn/utils/linear_assignment_.py | 214 | """
Solve the unique lowest-cost assignment problem using the
Hungarian algorithm (also known as Munkres algorithm).
"""
# Based on original code by Brain Clapper, adapted to NumPy by Gael Varoquaux.
# Heavily refactored by Lars Buitinck.
# Copyright (c) 2008 Brian M. Clapper <bmc@clapper.org>, Gael Varoquaux
# Autho... |
willard1218/Ted-subtitle-merge | refs/heads/master | ParagraphRefact.py | 1 | import Enum
RF = Enum.enum(ORIGINAL=0, PIECE=1, EN_LINE1=2, EN_LINE2=3)
def refactWithLine(talk, countOfLine):
count = 0
talk.ResetStartOfParagraph(False)
subtitle = talk.subtitles
subtitle[0].startOfParagraph = True
for i in xrange(1,len(subtitle)):
if(subtitle[i].content[-1] == "." or subtitle[i].content[... |
CloudWareChile/OpenChile | refs/heads/master | openerp/addons/product_visible_discount/product_visible_discount.py | 9 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... |
gf712/AbPyTools | refs/heads/master | abpytools/utils/data_loader.py | 1 | import json
from abpytools.home import Home
class DataLoader:
def __init__(self, data=[], data_type='', amino_acid_property=[]):
"""
:param data: list with the information required to access data in json file
:param data_type: str must be one of the following: 'CDR_positions', 'Numberin... |
Kuzenkov/SimpleAnalogueStackOverflow | refs/heads/master | questions/migrations/0001_initial.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Comments',
fields=[
('id', models.AutoField(ver... |
when30/namebench | refs/heads/master | tools/convert_server_list.py | 174 | #!/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... |
chanyoonzhu/eatquik | refs/heads/master | urllib3/packages/six.py | 2715 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# 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 with... |
samzhang111/scikit-learn | refs/heads/master | sklearn/utils/tests/test_linear_assignment.py | 421 | # Author: Brian M. Clapper, G Varoquaux
# License: BSD
import numpy as np
# XXX we should be testing the public API here
from sklearn.utils.linear_assignment_ import _hungarian
def test_hungarian():
matrices = [
# Square
([[400, 150, 400],
[400, 450, 600],
[300, 225, 300]],
... |
valdecdev/odoo | refs/heads/master | openerp/addons/test_documentation_examples/tests/test_delegation.py | 366 | # -*- coding: utf-8 -*-
from openerp.tests import common
class TestDelegation(common.TransactionCase):
def setUp(self):
super(TestDelegation, self).setUp()
env = self.env
record = env['delegation.parent'].create({
'child0_id': env['delegation.child0'].create({'field_0': 0}).id,... |
houssine78/vertical-travel-porting-v8-wip | refs/heads/8.0 | travel_journey/models/travel_journey_class.py | 2 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or m... |
carolineLe/miasm | refs/heads/master | miasm/ir/translators/smt2.py | 3 | from builtins import map
from builtins import range
import logging
from miasm.ir.translators.translator import Translator
from miasm.expression.smt2_helper import *
log = logging.getLogger("translator_smt2")
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter("[%(levelname)-8s]: %... |
40223150/2015cd_midterm | refs/heads/master | gear.py | 18 | #@+leo-ver=5-thin
#@+node:office.20150407074720.1: * @file gear.py
#@@language python
#@@tabwidth -4
#@+<<declarations>>
#@+node:office.20150407074720.2: ** <<declarations>> (application)
#@@language python
import cherrypy
import os
import sys
# 這個程式要計算正齒輪的齒面寬, 資料庫連結希望使用 pybean 與 SQLite
# 導入 pybean 模組與所要使用的 Store 及 S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.