repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
badock/nova
nova/tests/virt/disk/test_inject.py
15
11213
# Copyright (C) 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
8,965,672,884,755,068,000
38.482394
79
0.467493
false
yetilinux/yetiweb
packages/models.py
1
10119
from collections import namedtuple from django.db import models from django.db.models.signals import pre_save from django.contrib.auth.models import User from main.models import Arch, Repo from main.utils import set_created_field class PackageRelation(models.Model): ''' Represents maintainership (or interest...
gpl-2.0
-8,005,705,995,715,838,000
36.757463
80
0.658168
false
tszym/ansible
lib/ansible/modules/cloud/cloudstack/cs_staticnat.py
18
7667
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, 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...
gpl-3.0
6,338,433,817,819,910,000
26.974453
86
0.628441
false
m-kuhn/QGIS
python/plugins/processing/tests/CheckValidityAlgorithm.py
5
4895
# -*- coding: utf-8 -*- """QGIS Unit tests for Processing CheckValidity algorithm. .. note:: 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 l...
gpl-2.0
4,734,164,311,963,336,000
35.259259
94
0.661491
false
cpausmit/Kraken
filefi/032/data-2011.py
1
2250
# $Id: data.py,v 1.1 2013/07/10 02:25:44 paus Exp $ import FWCore.ParameterSet.Config as cms process = cms.Process('FILEFI') # import of standard configurations process.load('Configuration/StandardSequences/Services_cff') process.load('FWCore/MessageService/MessageLogger_cfi') process.load('Configuration.StandardSeq...
mit
-1,871,129,496,790,556,400
39.909091
153
0.741778
false
dart-lang/sdk
runtime/third_party/binary_size/src/run_binary_size_analysis.py
2
27960
#!/usr/bin/env python3 # 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. """Generate a spatial analysis against an arbitrary library. To use, build the 'binary_size_tool' target. Then run this tool, passing ...
bsd-3-clause
-733,285,659,571,370,100
38.380282
89
0.591059
false
wandec/grr
parsers/windows_persistence_test.py
2
2225
#!/usr/bin/env python """Tests for grr.parsers.windows_persistence.""" from grr.lib import rdfvalue from grr.lib import test_lib from grr.parsers import windows_persistence class WindowsPersistenceMechanismsParserTest(test_lib.FlowTestsBaseclass): def testParse(self): parser = windows_persistence.WindowsPersi...
apache-2.0
-4,484,500,478,396,379,000
44.408163
79
0.588764
false
rousseab/pymatgen
pymatgen/phasediagram/tests/test_plotter.py
4
2182
# coding: utf-8 from __future__ import unicode_literals import unittest import os import numpy as np from pymatgen.phasediagram.entries import PDEntryIO from pymatgen.phasediagram.pdmaker import PhaseDiagram from pymatgen.phasediagram.plotter import PDPlotter, uniquelines, \ triangular_coord, tet_coord module...
mit
6,364,578,058,460,229,000
38.672727
143
0.582493
false
sorki/faf
src/pyfaf/retrace.py
1
8983
import re import threading from pyfaf.common import FafError, log from pyfaf.queries import get_debug_files from pyfaf.rpm import unpack_rpm_to_tmp from pyfaf.utils.proc import safe_popen # Instance of 'RootLogger' has no 'getChildLogger' member # Invalid name "log" for type constant # pylint: disable-msg=C0103,E1103 ...
gpl-3.0
2,829,182,509,164,802,600
30.630282
79
0.578203
false
MacHu-GWU/angora-project
angora/dataIO/pk.py
1
16257
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Module description ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is re-pack of some pickle utility functions. - :func:`load_pk`: Load Python Object from Pickle file. - :func:`dump_pk`: Dump Picklable Python Object to fil...
mit
2,355,966,866,833,144,300
29.934461
92
0.581642
false
marcelocure/django
tests/shortcuts/urls.py
252
1416
from django.conf.urls import url from . import views urlpatterns = [ url(r'^render_to_response/$', views.render_to_response_view), url(r'^render_to_response/multiple_templates/$', views.render_to_response_view_with_multiple_templates), url(r'^render_to_response/request_context/$', views.render_to_response...
bsd-3-clause
-967,136,272,685,468,200
60.565217
113
0.713277
false
bobcyw/py2app
examples/PyObjC/ICSharingWatcher/TableModelAppDelegate.py
3
1155
import os from Cocoa import * import objc import leases FILENAME = '/var/db/dhcpd_leases' def getLeases(fn): if os.path.exists(fn): lines = file(fn, 'U') else: lines = leases.EXAMPLE.splitlines() return list(leases.leases(lines)) class TableModelAppDelegate (NSObject): mainWindow = ob...
mit
-6,950,683,248,997,290,000
27.170732
129
0.624242
false
rew4332/tensorflow
tensorflow/contrib/tensor_forest/python/kernel_tests/best_splits_op_test.py
28
4361
# 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...
apache-2.0
1,563,403,258,097,981,200
38.288288
80
0.515249
false
saurabh6790/medapp
hr/doctype/leave_control_panel/leave_control_panel.py
30
2230
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint, cstr, flt, nowdate from webnotes.model.doc import Document from webnotes.model.code import get_obj ...
agpl-3.0
8,559,191,655,244,858,000
31.794118
180
0.575336
false
un4get/xbmctorent
resources/site-packages/xbmctorrent/tvdb.py
5
7208
BASE_URL = "http://www.thetvdb.com" HEADERS = { "Referer": BASE_URL, } API_URL = "%s/api" % BASE_URL API_KEY = "1D62F2F90030C444" LANG = "en" def dom2dict(node): ret = {} for child in node: if len(child): ret.setdefault(child.tag.lower(), []).append(dom2dict(child)) else: ...
gpl-3.0
-3,627,898,346,008,013,000
32.525581
142
0.540511
false
ryanlovett/datahub
scripts/rsync-active-users.py
2
5300
""" rsync home directories of active users only. When rsyncing home directories of users across disks, it is extremely helpful to only do so for users who have been recently active. The hub API allows us to see who those users are, and we can rsync just their home directories. An environment variable 'JUPYTERHUB_ADMI...
bsd-3-clause
-1,362,487,946,016,881,400
32.333333
146
0.65283
false
ONSdigital/ras-frontstage
tests/integration/test_secure_message.py
1
11415
import unittest from unittest.mock import patch import requests_mock from frontstage import app from frontstage.exceptions.exceptions import IncorrectAccountAccessError from tests.integration.mocked_services import ( conversation_list_json, encoded_jwt_token, message_json, url_banner_api, url_get_...
mit
793,932,978,754,018,600
41.593284
215
0.65449
false
ychfan/tensorflow
tensorflow/python/keras/_impl/keras/engine/topology_test.py
17
26480
# 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...
apache-2.0
-337,300,705,947,942,140
37.432511
80
0.611594
false
qizenguf/MLC-STT
src/arch/mips/MipsISA.py
61
2521
# Copyright (c) 2012 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 implementation of the functionality ...
bsd-3-clause
1,555,250,659,223,355,100
49.42
75
0.780643
false
xamfoo/thumbor-docker
setup/thumbor/vows/meta_vows.py
3
3362
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com from os.path import abspath, join, dirname from pyvows import Vows,...
mit
-4,059,758,745,170,191,400
31.326923
88
0.623141
false
eduNEXT/edunext-platform
openedx/core/lib/api/tests/test_exceptions.py
4
1463
""" Test Custom Exceptions """ import ddt from django.test import TestCase from rest_framework import exceptions as drf_exceptions import six @ddt.ddt class TestDictExceptionsAllowDictDetails(TestCase): """ Test that standard DRF exceptions can return dictionaries in error details. """ def test_drf_...
agpl-3.0
-7,806,308,937,755,542,000
35.575
105
0.691046
false
tanmaythakur/django
django/db/backends/postgresql_psycopg2/introspection.py
326
10060
from __future__ import unicode_literals from collections import namedtuple from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) from django.utils.encoding import force_text FieldInfo = namedtuple('FieldInfo', FieldInfo._fields + ('default',)) class DatabaseIntr...
bsd-3-clause
3,345,881,714,522,548,700
42.930131
112
0.55507
false
marcel-dancak/QGIS
python/plugins/processing/gui/RangePanel.py
12
3088
# -*- coding: utf-8 -*- """ *************************************************************************** RangePanel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
gpl-2.0
-5,706,988,284,498,135,000
31.505263
75
0.525259
false
coffenbacher/askbot-devel
askbot/views/readers.py
4
30365
# encoding:utf-8 """ :synopsis: views "read-only" for main textual content By main textual content is meant - text of Questions, Answers and Comments. The "read-only" requirement here is not 100% strict, as for example "question" view does allow adding new comments via Ajax form post. """ import datetime import loggin...
gpl-3.0
-5,795,686,867,317,356,000
37.829923
119
0.609452
false
vainotuisk/icecreamratings
ENV/lib/python2.7/site-packages/pip/req/req_file.py
11
8550
""" 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 ...
bsd-3-clause
8,812,797,271,803,317,000
32.661417
79
0.635205
false
eammx/proyectosWeb
cursoPython/lib/python3.6/site-packages/setuptools/command/install_egg_info.py
13
3195
from distutils import log, dir_util import os, sys from setuptools import Command from setuptools import namespaces from setuptools.archive_util import unpack_archive import pkg_resources class install_egg_info(namespaces.Installer, Command): """Install an .egg-info directory for the package""" description ...
mit
-6,324,595,921,621,437,000
37.963415
104
0.597496
false
WiReD-/metagoofil
hachoir_parser/audio/midi.py
84
9168
""" Musical Instrument Digital Interface (MIDI) audio file parser. Documentation: - Standard MIDI File Format, Dustin Caldwell (downloaded on wotsit.org) Author: Victor Stinner Creation: 27 december 2006 """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, Bits, ParserError, String, U...
gpl-2.0
7,460,473,040,335,336,000
36.268293
103
0.600131
false
pyjs/pyjs
pyjswidgets/pyjamas/chart/Annotation.py
7
6234
""" * Copyright 2007,2008,2009 John C. Gunther * Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> * * 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/lic...
apache-2.0
-1,788,834,202,238,988,000
26.104348
72
0.636028
false
themurph/openshift-tools
ansible/roles/lib_git/build/ansible/git_clone.py
13
1587
# pylint: skip-file def main(): ''' ansible git module for cloning ''' module = AnsibleModule( argument_spec=dict( state=dict(default='present', type='str', choices=['present']), dest=dict(default=None, required=True, type='str'), repo=dict(default=None, requ...
apache-2.0
-5,347,942,628,805,708,000
33.5
94
0.570258
false
minorua/QGIS
python/core/additions/qgsfunction.py
17
6610
# -*- coding: utf-8 -*- """ *************************************************************************** qgsfunction.py --------------------- Date : May 2018 Copyright : (C) 2018 by Denis Rouzaud Email : denis@opengis.ch *************************************...
gpl-2.0
-7,932,673,028,444,632,000
37.430233
166
0.583056
false
barma1309/Kalista
.virtualenvs/Kalista/lib/python3.4/site-packages/django/utils/deconstruct.py
502
2047
from importlib import import_module from django.utils.version import get_docs_version def deconstructible(*args, **kwargs): """ Class decorator that allow the decorated class to be serialized by the migrations subsystem. Accepts an optional kwarg `path` to specify the import path. """ path =...
gpl-3.0
4,790,837,979,067,158,000
34.912281
96
0.53786
false
joshuairl/ccpd-platform
lms/_scripts/fckeditor/_samples/py/sampleposteddata.py
22
1984
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
mit
-2,648,058,103,746,925,000
20.545455
71
0.619456
false
fajoy/nova
nova/scheduler/driver.py
1
12001
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 OpenStack, LLC. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
apache-2.0
5,186,491,834,906,452,000
39.407407
79
0.64328
false
westinedu/newertrends
zinnia/tests/sitemaps.py
3
3381
"""Test cases for Zinnia's sitemaps""" from django.test import TestCase from django.contrib.auth.models import User from django.contrib.sites.models import Site from tagging.models import Tag from zinnia.models import Entry from zinnia.models import Author from zinnia.models import Category from zinnia.managers impor...
bsd-3-clause
2,436,221,791,373,137,400
40.740741
76
0.639456
false
undefinedv/Jingubang
sqlmap/thirdparty/beautifulsoup/__init__.py
30
1672
#!/usr/bin/env python # # Copyright (c) 2004-2010, Leonard Richardson # # 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...
gpl-3.0
8,798,760,726,431,250,000
44.189189
79
0.763756
false
crr0004/taiga-back
taiga/projects/tasks/admin.py
13
2415
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
-503,204,784,226,243,840
46.313725
79
0.6523
false
fzheng/codejam
lib/python2.7/site-packages/IPython/lib/demo.py
21
20690
"""Module for interactive demos using IPython. This module implements a few classes for running Python scripts interactively in IPython for demonstrations. With very simple markup (a few tags in comments), you can control points where the script stops executing and returns control to IPython. Provided classes -----...
mit
7,052,561,037,337,475,000
34.488851
105
0.623006
false
JioCloud/nova_test_latest
nova/paths.py
72
2182
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
apache-2.0
-5,964,911,712,461,989,000
31.567164
78
0.658112
false
juddc/Dipper
dip/tests/test_compiler.py
1
1176
import sys sys.path.insert(0, "../") import unittest from dip.typesystem import DNull, DBool, DInteger, DString, DList from dip.parser import DipperParser from dip.compiler import FrameCompiler from dip.interpreter import VirtualMachine from dip.namespace import Namespace class TestCompiler(unittest.TestC...
mit
-8,745,352,119,864,283,000
30.722222
74
0.613946
false
hex108/docker-registry
docker_registry/toolkit.py
10
11245
# -*- coding: utf-8 -*- import base64 import functools import hashlib import logging import os import random import re import string import time import urllib import flask from M2Crypto import RSA import requests from docker_registry.core import compat json = compat.json from . import storage from .lib import confi...
apache-2.0
-6,375,440,789,605,737,000
30.765537
79
0.593419
false
plamut/ggrc-core
src/ggrc_workflows/migrations/versions/20140903222805_4dd3191323da_add_response_options_to_task_group_tasks.py
7
1959
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Add response options to task group tasks Revision ID: 4dd3191323da Revises: 4c6ce142b434 Create Date: 2014-09-03 22:28:05.079477 """ # revision identifiers, used by Alembic. revision = '4dd3191323da' ...
apache-2.0
-9,460,959,995,010,408
28.681818
80
0.679939
false
siorai/AutoUploaderGoogleDrive
AutoUploaderGoogleDrive/CommandLine.py
1
15287
import os import httplib2 import base64 import logging import argparse import re import time from sys import argv from apiclient import discovery from apiclient.http import MediaFileUpload from AutoUploaderGoogleDrive.auth import Authorize from AutoUploaderGoogleDrive.settings import * from AutoUploaderGoogleDrive.t...
gpl-3.0
-5,298,298,371,890,943,000
38.399485
106
0.577942
false
marissazhou/django
tests/forms_tests/widget_tests/test_dateinput.py
247
1557
from datetime import date from django.forms import DateInput from django.test import override_settings from django.utils import translation from .base import WidgetTest class DateInputTest(WidgetTest): widget = DateInput() def test_render_none(self): self.check_html(self.widget, 'date', None, html=...
bsd-3-clause
-6,596,966,968,456,028,000
32.12766
108
0.581888
false
VOLTTRON/volttron-applications
kisensum/Simulation/SimulationClockAgent/tests/test_simulation_clock.py
2
8609
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2017, SLAC National Laboratory / Kisensum 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: # ...
bsd-3-clause
3,481,068,846,095,869,000
46.563536
116
0.694622
false
pipitone/qbatch
setup.py
1
1418
#!/usr/bin/env python from setuptools import setup from io import open # read the contents of your README file from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='qbatch', ...
unlicense
-7,858,904,049,069,494,000
30.511111
73
0.620592
false
jorge-marques/shoop
shoop/admin/forms/fields.py
6
1234
# This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from decimal import Decimal from numbers import Number from django.forms import DecimalField clas...
agpl-3.0
3,772,121,932,914,370,000
34.257143
77
0.665316
false
CloudBotIRC/CloudBot
plugins/admin_bot.py
24
11016
import asyncio import re from cloudbot import hook @asyncio.coroutine @hook.command("groups", "listgroups", "permgroups", permissions=["permissions_users"], autohelp=False) def get_permission_groups(conn): """- lists all valid groups :type conn: cloudbot.client.Client """ return "Valid groups: {}".fo...
gpl-3.0
-2,034,424,361,577,244,400
30.118644
114
0.622912
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/twisted/web/util.py
19
9865
# -*- test-case-name: twisted.web.test.test_web -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from cStringIO import StringIO from twisted.python import failure import html import resource import linecache import string, re import types def redirectTo(URL, request): r...
bsd-3-clause
-2,031,791,350,739,574,000
24.294872
156
0.546984
false
pyparallel/numpy
numpy/lib/user_array.py
111
7764
""" Standard container-class for easy multiple-inheritance. Try to inherit from the ndarray instead of using this class as this is not complete. """ from __future__ import division, absolute_import, print_function from numpy.core import ( array, asarray, absolute, add, subtract, multiply, divide, remainder, p...
bsd-3-clause
-4,980,400,154,515,416,000
27.028881
76
0.567233
false
codepope/transporter
vendor/gopkg.in/gorethink/gorethink.v3/internal/gen_tests/process_polyglot.py
8
15087
'''Finds and reads polyglot yaml tests (preferring the python tests), normalizing their quirks into something that can be translated in a sane way. The idea is that this file contains nothing Go specific, so could potentially be used to convert the tests for use with other drivers. ''' import os import sys import os....
bsd-3-clause
-289,750,413,603,957,060
33.914352
78
0.596632
false
achoy/cwapi
backend/py-server/flask/lib/python3.6/site-packages/flask/testing.py
121
5630
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import werkzeug from contextlib im...
bsd-3-clause
7,202,934,817,304,158,000
38.370629
78
0.614565
false
yeming233/horizon
openstack_dashboard/dashboards/admin/flavors/views.py
3
3633
# 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 # not use this file except in compliance with the...
apache-2.0
6,861,955,876,343,665,000
33.932692
78
0.630884
false
isyippee/nova
nova/api/openstack/compute/schemas/floating_ip_dns.py
84
1806
# Copyright 2014 IBM 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 ...
apache-2.0
3,834,140,357,413,052,400
29.1
78
0.528239
false
thaumos/ansible
test/units/modules/storage/netapp/test_na_ontap_lun_map.py
38
7000
''' unit tests ONTAP Ansible module: na_ontap_lun_map ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch from ansible.module_utils import basic from ansible.module_utils._text import to_bytes import ansible.module_utils.netapp as n...
gpl-3.0
-5,032,886,362,154,976,000
35.649215
113
0.608714
false
Zord13appdesa/python-for-android
python3-alpha/python3-src/Tools/scripts/h2py.py
46
5419
#! /usr/bin/env python3 # Read #define's and translate to Python code. # Handle #include statements. # Handle #define macros with one argument. # Anything that isn't recognized or doesn't translate into valid # Python is ignored. # Without filename arguments, acts as a filter. # If one or more filenames are given, ou...
apache-2.0
-5,840,001,403,446,590,000
31.449102
77
0.495479
false
maloL/nao-fsm
camstream.py
1
6230
# camera streaming algorithm showing state of FSM import time import cv2 as opencv import numpy as np from naoqi import ALProxy, ALBroker, ALModule from vision_definitions import kVGA, kBGRColorSpace import ConfigParser, argparse # function for getting video stream from nao camera def nao_image_getter(alvideoproxy, ...
lgpl-3.0
8,810,061,853,163,179,000
44.808824
134
0.532584
false
ejucovy/reportlab
docs/userguide/ch5_paragraphs.py
5
17668
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/docs/userguide/ch5_paragraphs.py from tools.docco.rl_doc_utils import * #begin chapter oon paragraphs heading1("Paragraphs") disc(""" The $reportlab.p...
bsd-3-clause
5,610,861,885,449,113,000
45.010417
230
0.693231
false
10clouds/django-federated-login
federated_login/patches.py
1
6210
# Patches openid's Consumer to function with Google Apps. # # Google Apps returns claimed_id values according to a working draft, but these # are not part of the current 2.0 specification. # # See also: # https://github.com/openid/python-openid/pull/39 # https://sites.google.com/site/oauthgoog/fedlogininterp/openiddisc...
mit
-3,155,738,321,875,004,000
40.959459
116
0.678744
false
VitalPet/partner-contact
passport/tests/test_passport.py
34
6735
# -*- 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 modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
-8,608,647,608,794,296,000
36.837079
79
0.552042
false
Sult/Mercenaries
mail/models.py
1
2537
from django.db import models from characters.models import Character from collections import namedtuple class MailFolder(models.Model): """ folders to hold and sort messages Inbox, sent and thrash """ character = models.ForeignKey(Character) name = models.CharField(max_length=31) locked = models.Boolean...
gpl-2.0
-4,276,130,722,567,812,000
21.254386
122
0.678754
false
liorvh/infernal-twin
build/pillow/build/scripts-2.7/pilconvert.py
9
2357
#!/usr/bin/python # # The Python Imaging Library. # $Id$ # # convert image files # # History: # 0.1 96-04-20 fl Created # 0.2 96-10-04 fl Use draft mode when converting images # 0.3 96-12-30 fl Optimize output (PNG, JPEG) # 0.4 97-01-18 fl Made optimize an option (PNG, JPEG) # 0.5 98-12-30 fl ...
gpl-3.0
6,084,049,042,721,296,000
22.808081
77
0.546033
false
rcarmo/fabric-templates
postgres-solr-redis-cluster/fabfile/config.py
1
2325
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Configuration This file contains shared constants/dictionaries for the fabfile Created by: Rui Carmo """ # copy our configuration files to a specific location and set permissions # (this is a sample for an old Postgres deployment) skel = { 'postgres': [{ ...
mit
2,096,616,773,941,704,700
28.0625
118
0.567312
false
alexryndin/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.0/services/HIVE/package/scripts/params.py
1
18188
#!/usr/bin/env python """ 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");...
apache-2.0
-8,707,039,539,837,039,000
42.511962
171
0.741643
false
Kate-Willett/HadISDH_Build
F10_MissingAdjUnc_AdjPlots.py
1
30317
# PYTHON 3 # >module load scitools/default-current # # Author: Kate Willett # Created: 1 February 2013 (IDL) # Last update: 1 December 2020 (Python 3 from 1st Dec 2020) # Location: /home/h04/hadkw/HadISDH_Code/HADISDH_BUILD/ # GitHub: https://github.com/Kate-Willett/HadISDH_Build # ----------------------- # CODE ...
cc0-1.0
9,144,514,163,303,122,000
38.733945
173
0.625524
false
ngouzy/smartchangelog
tests/unit/test_commit.py
2
2073
from smartchangelog import datetools from smartchangelog.commit import Commit from smartchangelog.commitmsg import CommitType from tests.unit import data_file_path class TestCommit: def test_parse(self): # GIVEN with open(data_file_path('one.gitlog'), encoding='utf-8') as log_file: log...
mit
6,617,460,165,103,496,000
35.385965
89
0.584178
false
victorbriz/omim
3party/protobuf/python/google/protobuf/service.py
243
9144
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
apache-2.0
-4,383,823,371,239,794,000
39.460177
79
0.744204
false
Ictp/indico
indico/MaKaC/badge.py
1
21768
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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...
gpl-3.0
-2,834,259,508,036,128,000
37.940966
139
0.626975
false
rogerthat-platform/rogerthat-ios-client
3rdParty/Code/3rdParty/zxing/cpp/scons/scons-local-2.0.0.final.0/SCons/Scanner/__init__.py
34
14714
"""SCons.Scanner The Scanner package for the SCons software construction utility. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation file...
apache-2.0
-1,894,932,919,973,653,200
34.627119
125
0.627226
false
rjschwei/azure-sdk-for-python
azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py
1
4782
# 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 ...
mit
-6,100,251,755,230,751,000
44.542857
268
0.639063
false
Rudloff/youtube-dl
youtube_dl/extractor/drtv.py
18
4209
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, parse_iso8601, ) class DRTVIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dr\.dk/tv/se/(?:[^/]+/)*(?P<id>[\da-z-]+)(?:[/#?]|$)' _TEST = { 'url': 'https://www....
unlicense
-2,345,398,820,534,564,400
35.573913
104
0.469805
false
darkleons/BE
addons/product/partner.py
385
1696
# -*- 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...
agpl-3.0
5,341,021,193,405,511,000
39.380952
117
0.60908
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/application_gateway_probe_py3.py
1
4647
# 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 ...
mit
5,212,412,092,524,782,000
48.967742
342
0.650958
false
AlCutter/certificate-transparency
python/ct/client/db/cert_db.py
35
2480
import abc import hashlib class CertDB(object): """Database interface for storing X509 certificate information.""" __metaclass__ = abc.ABCMeta @staticmethod def sha256_hash(der_cert): return hashlib.sha256(der_cert).digest() @abc.abstractmethod def store_cert_desc(self, cert_desc, in...
apache-2.0
4,443,424,005,656,956,000
36.575758
80
0.565726
false
EduPepperPD/pepper2013
common/lib/xmodule/xmodule/tests/test_content.py
33
1946
import unittest from xmodule.contentstore.content import StaticContent from xmodule.contentstore.content import ContentStore from xmodule.modulestore import Location class Content: def __init__(self, location, content_type): self.location = location self.content_type = content_type class Content...
agpl-3.0
-8,093,784,517,477,684,000
50.210526
123
0.697842
false
kawamon/hue
desktop/core/ext-py/docutils-0.14/test/test_transforms/test_docinfo.py
2
11693
#! /usr/bin/env python # -*- coding: utf-8 -*- # $Id: test_docinfo.py 8117 2017-06-18 23:38:18Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for docutils.transforms.frontmatter.DocInfo. """ from __init__ import DocutilsTestSupport from ...
apache-2.0
-1,274,342,687,691,455,200
26.278689
263
0.498884
false
mlperf/training_results_v0.7
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/example/fcn-xs/image_segmentaion.py
9
4504
# 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 u...
apache-2.0
-5,357,493,852,253,240,000
35.322581
97
0.619449
false
fhasovic/LG-G2-D802-Kernel
android-toolchain/share/gdb/python/gdb/types.py
137
5421
# Type utilities. # Copyright (C) 2010-2013 Free Software Foundation, 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 versi...
gpl-2.0
-2,722,652,232,342,177,000
29.801136
77
0.645084
false
dennisfrancis/PacketManipulator
umit/pm/gui/core/app.py
2
5811
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008, 2009 Adriano Monteiro Marques # # Author: Francesco Piccinno <stack.box@gmail.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 Found...
gpl-2.0
9,181,021,874,593,898,000
32.982456
86
0.540527
false
MathYourLife/forall
src/forall/maths.py
1
3364
import numpy as np import sympy as sp def make(obj, exp): for arg in range(obj.args): print(arg.random()) class Addition(object): def __init__(self): self.args = [None] * 2 self.solution = None def __getitem__(self, key): return self.args[key] def __setitem__(self...
mit
-5,056,882,506,316,952,000
22.524476
105
0.520809
false
didrocks/snapcraft
integration_tests/test_zip_source.py
9
1601
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in...
gpl-3.0
-6,181,420,923,795,638,000
30.392157
71
0.644597
false
Letractively/timeside
tests/test_analyzer_level.py
2
1278
#! /usr/bin/env python from unit_timeside import * from timeside.decoder import * from timeside.analyzer.level import Level class TestAnalyzerLevel(unittest.TestCase): def setUp(self): self.analyzer = Level() def testOnSweep(self): "runs on sweep" self.source = os.path.join (os.path....
gpl-2.0
5,268,052,033,848,918,000
28.72093
88
0.614241
false
jaedb/Iris
mopidy_iris/core.py
1
37373
import random import string import logging import json import pykka import urllib import os import sys import tornado.web import tornado.ioloop import time import pickle from pkg_resources import parse_version from tornado.escape import json_encode from tornado.httpclient import AsyncHTTPClient, HTTPReque...
apache-2.0
362,191,387,456,242,900
29.833901
87
0.495251
false
hdm-dt-fb/rvt_model_services
commands/sync_benchmark/rps_sync_benchmark.py
1
3827
import clr clr.AddReference("RevitAPI") from Autodesk.Revit.DB import OpenOptions, SynchronizeWithCentralOptions, DetachFromCentralOption, RelinquishOptions from Autodesk.Revit.DB import TransactWithCentralOptions from Autodesk.Revit.DB import FilePath from Autodesk.Revit.DB import WorksetConfiguration, WorksetConfigur...
mit
562,693,659,163,057,300
30.113821
116
0.678338
false
artefactual/archivematica-history
src/archivematicaCommon/lib/externals/pyes/rivers.py
2
3822
# -*- coding: utf-8 -*- from __future__ import absolute_import try: # For Python < 2.6 or people using a newer version of simplejson import simplejson json = simplejson except ImportError: # For Python >= 2.6 import json from .es import ES class River(object): def __init__(self, index_name=N...
agpl-3.0
-5,305,644,057,537,457,000
27.102941
91
0.520931
false
bouncestorage/swift
test/unit/account/test_backend.py
3
63378
# Copyright (c) 2010-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 required by applicable law or agree...
apache-2.0
5,449,160,361,420,435,000
41.592742
79
0.563729
false
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Tools/lldb/lldb_webkit.py
61
11453
# Copyright (C) 2012 Apple. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the follo...
gpl-3.0
-6,972,824,006,797,065,000
36.55082
126
0.674321
false
kapilt/ansible
lib/ansible/plugins/action/async.py
3
3337
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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) an...
gpl-3.0
-418,775,252,209,481,100
39.695122
151
0.670662
false
allancarlos123/Solfege
interface/main-menu/main-menu.py
2
2314
#!/usr/bin/env python #coding: utf-8 from gi.repository import Gtk, Gdk class Programa(Gtk.Window): def eventCompInte(self, widget): arquivo = open("desc_exercicios/ComparacaoDeIntervalos", "r") self.texto = arquivo.read() # Altera o texto do widget "descrição" self.descExerc...
gpl-3.0
-2,789,643,393,222,134,000
32.449275
93
0.587955
false
heke123/crosswalk
build/android/generate_xwalk_core_library.py
3
12509
#!/usr/bin/env python # # Copyright (c) 2013 Intel Corporation. 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=F0401 import distutils.dir_util import optparse import os import shutil import sys import zipfile from common_func...
bsd-3-clause
1,418,481,766,125,107,000
35.469388
82
0.663682
false
toshywoshy/ansible
test/units/plugins/lookup/test_conjur_variable.py
52
4748
# -*- coding: utf-8 -*- # (c) 2018, Jason Vanderhoof <jason.vanderhoof@cyberark.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...
gpl-3.0
1,714,026,966,807,093,500
42.163636
115
0.656066
false
cchurch/ansible-modules-extras
cloud/amazon/s3_logging.py
65
5644
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
gpl-3.0
3,204,887,745,292,244,500
30.530726
134
0.669029
false
murfz/Sick-Beard
lib/requests/packages/chardet2/sbcharsetprober.py
52
4582
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
-3,597,159,843,471,720,000
41.82243
168
0.615452
false
Vixionar/django
tests/annotations/models.py
238
2901
# coding: utf-8 from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) age = models.IntegerField() friends = models.ManyToManyField('self', blank=True) def __str__(self...
bsd-3-clause
7,226,204,831,550,031,000
29.536842
88
0.689417
false
suiyuan2009/tensorflow
tensorflow/python/layers/base_test.py
10
14518
# 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...
apache-2.0
2,784,164,230,840,372,000
35.024814
80
0.646852
false
synctree/synctree-awsebcli
ebcli/objects/tier.py
5
2564
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
apache-2.0
274,124,282,302,052,500
30.666667
73
0.551482
false
Comcast/neutron
neutron/plugins/linuxbridge/common/constants.py
9
1525
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Cisco Systems, 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...
apache-2.0
3,767,101,020,017,408,500
32.888889
78
0.714098
false
whiskey/Machine-Learning
de/staticline/classification/dummys.py
1
1718
''' Created on Apr 29, 2011 @author: Carsten Witzke ''' from de.staticline.tools.libsvmtools import LibsvmFileImporter import math class Always1Predictor(object): ''' A dummy predictor assuming always "1" for each instance. ''' def __init__(self): pass def buildClassifier(self, train...
mit
2,076,554,704,052,331,300
29.140351
85
0.607683
false
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/widgets/syncmlwarning.py
1
2136
''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
gpl-3.0
1,324,527,854,914,792,400
38.555556
96
0.634363
false
mattstock/binutils-bexkat1
gdb/python/lib/gdb/prompt.py
5
4209
# Extended prompt utilities. # Copyright (C) 2011-2020 Free Software Foundation, 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 ...
gpl-2.0
7,417,754,421,137,990,000
27.439189
75
0.577809
false
computersalat/ansible
lib/ansible/module_utils/facts/packages.py
51
2601
# (c) 2018, Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type from abc import ABCMeta, abstractmethod from ansible.module_utils.six import with_metaclass from...
gpl-3.0
-2,470,876,122,359,283,000
29.244186
134
0.640138
false