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 |
|---|---|---|---|---|---|---|---|---|---|---|
adlius/osf.io | tests/test_subjects.py | 12 | 8026 | # -*- coding: utf-8 -*-
from django.core.exceptions import ValidationError
from nose.tools import * # noqa: F403 (PEP8 asserts)
from osf.exceptions import ValidationValueError
from tests.base import OsfTestCase
from osf_tests.factories import SubjectFactory, PreprintFactory, PreprintProviderFactory
from osf.models.v... | apache-2.0 | 6,312,204,414,709,555,000 | 44.344633 | 149 | 0.691627 | false |
rhatdan/selinux | policycoreutils/sepolicy/sepolicy/templates/var_cache.py | 5 | 4152 | # Copyright (C) 2007-2012 Red Hat
# see file 'COPYING' for use and warranty information
#
# policygentool is a tool for the initial generation of SELinux policy
#
# 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 ... | gpl-2.0 | -325,960,602,323,879,000 | 25.44586 | 85 | 0.624759 | false |
idoru9/serverpi | serverpi/users/migrations/0001_initial.py | 25 | 2693 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | bsd-3-clause | -6,739,789,617,033,230,000 | 66.35 | 289 | 0.639436 | false |
rdeheele/odoo | addons/point_of_sale/wizard/pos_discount.py | 382 | 2266 | # -*- 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... | agpl-3.0 | 844,949,705,245,135,100 | 38.754386 | 115 | 0.596646 | false |
dfalt974/SickRage | lib/sqlalchemy/dialects/mysql/types.py | 8 | 25137 | # mysql/types.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import datetime
from ... import exc, util
from ... import types as sqltypes
class _... | gpl-3.0 | 8,255,795,085,233,971,000 | 31.815927 | 78 | 0.612842 | false |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/tests/migrations/test_base.py | 25 | 2508 | import os
from django.db import connection
from django.test import TransactionTestCase
from django.utils._os import upath
class MigrationTestBase(TransactionTestCase):
"""
Contains an extended set of asserts for testing migrations and schema operations.
"""
available_apps = ["migrations"]
test_d... | mit | -4,751,761,350,879,441,000 | 37 | 110 | 0.631978 | false |
keepkey/python-keepkey | tests/test_msg_verifymessage_segwit_native.py | 1 | 4324 | # This file is part of the Trezor project.
#
# Copyright (C) 2012-2018 SatoshiLabs and contributors
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software Foundation.
#
# This library is distrib... | lgpl-3.0 | -2,379,776,992,413,320,700 | 43.122449 | 265 | 0.714154 | false |
Orochimarufan/youtube-dl | youtube_dl/extractor/clipsyndicate.py | 64 | 1812 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
find_xpath_attr,
fix_xml_ampersands
)
class ClipsyndicateIE(InfoExtractor):
_VALID_URL = r'https?://(?:chic|www)\.clipsyndicate\.com/video/play(list/\d+)?/(?P<id>\d+)'
_TESTS = [{
'url': 'http://w... | unlicense | -2,674,311,258,584,377,000 | 32.555556 | 95 | 0.550221 | false |
efabless/openlane | scripts/tksimpledialog.py | 1 | 2996 | #!/ef/efabless/opengalaxy/venv/bin/python3
# Copyright 2020 Efabless Corporation
#
# 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... | apache-2.0 | -9,104,975,064,204,683,000 | 28.96 | 101 | 0.618825 | false |
HalcyonChimera/osf.io | api_tests/registrations/views/test_registration_embeds.py | 2 | 3140 | import pytest
from nose.tools import * # noqa:
import functools
from framework.auth.core import Auth
from api.base.settings.defaults import API_BASE
from tests.base import ApiTestCase
from osf_tests.factories import (
ProjectFactory,
AuthUserFactory,
RegistrationFactory
)
@pytest.mark.enable_quickfiles... | apache-2.0 | 8,212,303,724,701,476,000 | 35.941176 | 76 | 0.623248 | false |
GenePeeks/py-rest-orm | tests/test_fields.py | 1 | 1036 | from datetime import date, datetime
from unittest import TestCase
from pyrestorm.fields import Field, DateField
from pyrestorm import exceptions
class FieldsTestCase(TestCase):
def test_field_clean(self):
field = Field()
self.assertRaises(NotImplementedError, field.clean, 1)
def test_field_r... | mit | -427,012,848,428,209,700 | 28.6 | 79 | 0.645753 | false |
overtherain/scriptfile | software/googleAppEngine/lib/django_1_2/tests/regressiontests/dispatch/tests/test_dispatcher.py | 50 | 3724 | from django.dispatch import Signal
import unittest
import sys
import gc
import django.utils.copycompat as copy
if sys.platform.startswith('java'):
def garbage_collect():
"""Run the garbage collector and wait a bit to let it do his work"""
import time
gc.collect()
time.sleep(0.1)
els... | mit | 1,593,942,696,579,645,200 | 29.276423 | 76 | 0.607411 | false |
fedorpatlin/ansible | lib/ansible/modules/network/junos/junos_command.py | 5 | 10875 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | 3,002,246,873,644,408,000 | 28.713115 | 90 | 0.611402 | false |
AltSchool/django | django/core/cache/backends/base.py | 32 | 9680 | "Base Cache class."
from __future__ import unicode_literals
import time
import warnings
from django.core.exceptions import DjangoRuntimeWarning, ImproperlyConfigured
from django.utils.module_loading import import_string
class InvalidCacheBackendError(ImproperlyConfigured):
pass
class CacheKeyWarning(DjangoRun... | bsd-3-clause | 9,943,099,375,733,756 | 34.98513 | 91 | 0.61219 | false |
pimier15/PyGUI | Kivy/Kivy/Bk_Interractive/sample/Chapter_03_code/02 - Basic widget events - dragging the stickman/comicwidgets.py | 8 | 1605 | # File name: comicwidgets.py
import kivy
kivy.require('1.9.0')
from kivy.uix.relativelayout import RelativeLayout
from kivy.graphics import Line
class DraggableWidget(RelativeLayout):
def __init__(self, **kwargs):
super(DraggableWidget, self).__init__(**kwargs)
self.selected = None
def on_t... | mit | -2,012,479,525,068,146,200 | 28.722222 | 79 | 0.594393 | false |
mas-dse-greina/neon | luna16/LUNA16_CADIMI.py | 1 | 4381 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015-2017 Nervana Systems 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
#... | apache-2.0 | 4,561,903,092,771,270,700 | 34.330645 | 131 | 0.71171 | false |
tukan/poker-utils | filter_hands_by_player.py | 1 | 6755 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2014 Timothy N. Tsvetkov (email: timothy.tsvetkov@gmail.com)
#
# 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 ... | mit | -2,902,567,669,184,759,000 | 34.182292 | 106 | 0.557661 | false |
luxnovalabs/enjigo_door | web_interface/django/utils/ipv6.py | 113 | 7908 | # This code was mostly based on ipaddr-py
# Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/
# Licensed under the Apache License, Version 2.0 (the "License").
from django.core.exceptions import ValidationError
from django.utils.six.moves import xrange
def clean_ipv6_address(ip_str, unpack_ipv4=False,
... | unlicense | 9,115,235,157,365,521,000 | 28.507463 | 75 | 0.584345 | false |
SpheMakh/msutils | MSUtils/ClassESW.py | 1 | 7690 | import matplotlib
matplotlib.use('Agg')
import sys
import os
import numpy
import numpy.ma as ma
import pylab
from scipy.interpolate import interp1d
from scipy import interpolate
from MSUtils import msutils
from pyrap.tables import table
import matplotlib.cm as cm
MEERKAT_SEFD = numpy.array([
[ 856e6, 580.],
[ 900e6... | gpl-2.0 | 2,738,583,469,205,808,600 | 36.696078 | 131 | 0.544473 | false |
whn09/tensorflow | tensorflow/contrib/graph_editor/util.py | 23 | 17095 | # 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 | 7,575,813,314,962,554,000 | 30.025408 | 80 | 0.660135 | false |
robbwagoner/ansible-modules-core | files/replace.py | 22 | 5459 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Evan Kaufman <evan@digitalflophouse.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 t... | gpl-3.0 | 7,932,589,757,478,590,000 | 31.885542 | 146 | 0.646272 | false |
ZellMechanik-Dresden/dclab | dclab/rtdc_dataset/filter.py | 1 | 9287 | """RT-DC dataset core classes and methods"""
import warnings
import numpy as np
from dclab import definitions as dfn
from .. import downsampling
from ..polygon_filter import PolygonFilter
class NanWarning(UserWarning):
pass
class Filter(object):
def __init__(self, rtdc_ds):
"""Boolean filter arr... | gpl-2.0 | -9,167,409,938,114,909,000 | 39.030172 | 79 | 0.521159 | false |
imply/chuu | third_party/closure_linter/closure_linter/common/simplefileflags.py | 285 | 5107 | #!/usr/bin/env python
#
# Copyright 2008 The Closure Linter 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
#... | bsd-3-clause | -6,568,206,587,896,974,000 | 25.878947 | 80 | 0.684355 | false |
Rapptz/discord.py | discord/guild.py | 1 | 94374 | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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, merg... | mit | -4,640,400,522,633,759,000 | 33.773029 | 138 | 0.589114 | false |
pschmitt/home-assistant | homeassistant/components/geizhals/sensor.py | 4 | 2874 | """Parse prices of a device from geizhals."""
from datetime import timedelta
import logging
from geizhals import Device, Geizhals
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from hom... | apache-2.0 | 4,276,315,015,407,253,500 | 28.628866 | 88 | 0.635699 | false |
shobhitmittal/textract | textract/exceptions.py | 1 | 2697 | import os
# traceback from exceptions that inherit from this class are suppressed
class CommandLineError(Exception):
"""The traceback of all CommandLineError's is supressed when the
errors occur on the command line to provide a useful command line
interface.
"""
def render(self, msg):
retu... | mit | -4,551,510,208,872,321,500 | 30.729412 | 79 | 0.613645 | false |
chaluemwut/fbserver | venv/lib/python2.7/site-packages/scipy/sparse/csgraph/tests/test_conversions.py | 12 | 2192 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import assert_array_almost_equal, dec
from scipy.lib._version import NumpyVersion
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import csgraph_from_dense, csgraph_to_dense
def test_csgraph_from_dens... | apache-2.0 | -8,502,528,787,799,632,000 | 29.444444 | 73 | 0.591241 | false |
taigaio/taiga-back | taiga/users/utils.py | 1 | 1620 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-present Taiga Agile LLC
#
# 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 Free Software Foundation, either version 3 of the
# License, or (at your option) any later ver... | agpl-3.0 | -7,137,022,572,044,586,000 | 38.512195 | 84 | 0.687654 | false |
Shanec132006/project | server/lib/werkzeug/script.py | 318 | 11249 | # -*- coding: utf-8 -*-
r'''
werkzeug.script
~~~~~~~~~~~~~~~
.. admonition:: Deprecated Functionality
``werkzeug.script`` is deprecated without replacement functionality.
Python's command line support improved greatly with :mod:`argparse`
and a bunch of alternative modules.
Most ... | apache-2.0 | -7,226,931,876,223,617,000 | 34.598101 | 85 | 0.604765 | false |
crazyhottommy/manta | scratch/util/largeIntrachromFilter.py | 2 | 4381 | #!/usr/bin/env python
#
# Manta - Structural Variant and Indel Caller
# Copyright (c) 2013-2015 Illumina, 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, ... | gpl-3.0 | 5,947,699,162,405,812,000 | 23.338889 | 94 | 0.6147 | false |
riking/youtube-dl | test/test_YoutubeDL.py | 2 | 10850 | #!/usr/bin/env python
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL, assertRegexpMatches
from youtube_dl import YoutubeDL
from youtube_dl.extractor i... | unlicense | 5,493,318,395,042,814,000 | 37.070175 | 106 | 0.535392 | false |
Frankkkkk/arctic | tests/integration/scripts/test_initialize_library.py | 5 | 2561 | from mock import patch
import pytest
from arctic.auth import Credential
from arctic.arctic import Arctic
from arctic.scripts import arctic_init_library as mil
from ...util import run_as_main
def test_init_library(mongo_host):
# Create the user agains the current mongo database
with patch('arctic.scripts.arc... | lgpl-2.1 | 61,408,838,685,459,440 | 46.425926 | 115 | 0.67747 | false |
petercable/mi-instrument | mi/instrument/mclane/ras/d1000/driver.py | 2 | 42602 | """
@package mi.instrument.mclane.ras.ooicore.driver
@file marine-integrations/mi/instrument/mclane/ras/ooicore/driver.py
@author Dan Mergens
@brief Driver for the D1000 (D1421)
Release notes:
initial version
"""
from datetime import datetime
__author__ = 'Dan Mergens'
__license__ = 'Apache 2.0'
import re
import mat... | bsd-2-clause | -7,165,409,036,072,810,000 | 37.870438 | 119 | 0.547697 | false |
pronexo-odoo/odoo-argentina | l10n_ar_wsafip_fe/wizard/query_invoices.py | 1 | 7160 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2012 OpenERP - Team de Localización Argentina.
# https://launchpad.net/~openerp-l10n-ar-localization
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | agpl-3.0 | -5,238,242,293,210,912,000 | 49.415493 | 165 | 0.503003 | false |
mihbor/kafka | tests/kafkatest/tests/core/throttling_test.py | 14 | 8758 | # 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 use ... | apache-2.0 | -1,729,039,186,865,049,300 | 47.932961 | 127 | 0.603791 | false |
susansls/zulip | api/integrations/perforce/zulip_perforce_config.py | 33 | 2514 | # -*- coding: utf-8 -*-
#
# Copyright © 2014 Zulip, Inc.
#
# 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,... | apache-2.0 | -8,534,059,576,419,351,000 | 40.883333 | 79 | 0.724632 | false |
secretdataz/OpenKore-Src | src/scons-local-2.0.1/SCons/Tool/packaging/rpm.py | 61 | 13485 | """SCons.Tool.Packaging.rpm
The rpm packager.
"""
#
# 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 files (the
# "Software"), to deal in the ... | gpl-2.0 | 8,353,916,295,088,589,000 | 35.945205 | 125 | 0.585317 | false |
Maxklos/WeatherProjekt | client/client.py | 1 | 1310 | import time
def installData(s,idpi,n =[]):
#check if all names are valid
c=''
for i in n:
c = c + str(i) + '-'
s.send(c+idpi)
def sendData(s,t, **kwargs):
#print kwargs
#print '--------------------------'
s.send("time:{}\n".format(t))
for i in kwargs:
s.send("{}:{}\n".f... | mit | -7,736,601,788,614,252,000 | 25.2 | 75 | 0.532061 | false |
ulfjack/bazel | src/test/py/bazel/runfiles_test.py | 7 | 13361 | # pylint: disable=g-bad-file-header
# Copyright 2017 The Bazel 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
... | apache-2.0 | -3,648,989,064,990,276,600 | 41.015723 | 80 | 0.563506 | false |
tartavull/google-cloud-python | storage/tests/unit/test_acl.py | 4 | 26727 | # Copyright 2014 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, ... | apache-2.0 | 9,088,209,229,583,067,000 | 31.318017 | 79 | 0.562876 | false |
Intel-tensorflow/tensorflow | tensorflow/python/kernel_tests/softplus_op_test.py | 14 | 5094 | # 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 | 4,310,187,730,497,272,300 | 35.913043 | 80 | 0.585787 | false |
doganaltunbay/odoo | addons/procurement_jit/procurement_jit.py | 130 | 1446 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2013 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 5,240,211,342,594,729,000 | 41.529412 | 94 | 0.630014 | false |
tcmitchell/geni-ch | plugins/chapiv1rpc/plugin.py | 2 | 2848 | #----------------------------------------------------------------------
# Copyright (c) 2011-2016 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | mit | 3,618,552,573,492,127,000 | 40.882353 | 80 | 0.710323 | false |
kubernetes-client/python | kubernetes/client/models/v1beta1_rule_with_operations.py | 1 | 9404 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.18
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | apache-2.0 | 8,851,854,710,817,052,000 | 39.188034 | 513 | 0.633348 | false |
damirda/ansible-modules-core | utilities/logic/include.py | 11 | 1970 | #!/usr/bin/python
# -*- mode: python -*-
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the... | gpl-3.0 | 5,445,401,368,424,702,000 | 32.389831 | 161 | 0.704061 | false |
ParthGanatra/mitmproxy | mitmproxy/cmdline.py | 1 | 25259 | from __future__ import absolute_import
import os
import re
import configargparse
from netlib.tcp import Address, sslversion_choices
import netlib.utils
from . import filt, utils, version
from .proxy import config
APP_HOST = "mitm.it"
APP_PORT = 80
class ParseException(Exception):
pass
def _parse_hook(s):
... | mit | 4,813,504,269,785,337,000 | 31.17707 | 102 | 0.589612 | false |
mohamed--abdel-maksoud/chromium.src | tools/telemetry/telemetry/results/html_output_formatter_unittest.py | 15 | 7922 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import StringIO
import unittest
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import page_set
from ... | bsd-3-clause | -8,393,227,464,096,224,000 | 30.815261 | 79 | 0.521838 | false |
Servir-Mekong/SurfaceWaterTool | lib/pyasn1_modules/rfc5934.py | 14 | 23798 | # This file is being contributed to pyasn1-modules software.
#
# Created by Russ Housley with assistance from asn1ate v.0.6.0.
#
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
# Trust Anchor Format
#
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc5934.txt
from ... | gpl-3.0 | -915,941,024,434,967,200 | 29.277354 | 86 | 0.748676 | false |
incuna/feincms-extensions | feincms_extensions/tests/factories.py | 1 | 1198 | from django.contrib.auth import get_user_model
import factory
from feincms.module.medialibrary.models import MediaFile
from feincms.module.page.models import Page
from . import content, models
User = get_user_model()
class DummyFactory(factory.DjangoModelFactory):
FACTORY_FOR = models.Dummy
@factory.post_... | bsd-2-clause | -5,996,041,724,048,718,000 | 25.043478 | 70 | 0.706177 | false |
KohlsTechnology/ansible | lib/ansible/module_utils/_text.py | 167 | 12489 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 | -575,142,779,628,155,600 | 43.92446 | 97 | 0.658099 | false |
nuclear-wizard/moose | modules/porous_flow/test/tests/thm_rehbinder/thm_rehbinder.py | 12 | 6179 | #!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | lgpl-2.1 | -1,244,388,393,508,425,000 | 43.453237 | 234 | 0.60479 | false |
ville-k/tensorflow | tensorflow/contrib/learn/python/learn/learn_io/numpy_io_test.py | 79 | 9338 | # 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 | 2,341,436,843,344,810,500 | 32.35 | 80 | 0.615871 | false |
hayderimran7/tempest | tempest/api/orchestration/stacks/test_soft_conf.py | 17 | 8007 | # 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... | apache-2.0 | -7,515,856,890,709,044,000 | 44.754286 | 78 | 0.637068 | false |
andrejb/cloudant_bigcouch | couchjs/scons/scons-local-2.0.1/SCons/Platform/irix.py | 61 | 1658 | """SCons.Platform.irix
Platform-specific initialization for SGI IRIX systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2... | apache-2.0 | 8,421,923,218,233,698,000 | 36.681818 | 95 | 0.76538 | false |
fbradyirl/home-assistant | homeassistant/components/nfandroidtv/notify.py | 1 | 9752 | """Notifications for Android TV notification service."""
import base64
import io
import logging
import requests
from requests.auth import HTTPBasicAuth, HTTPDigestAuth
import voluptuous as vol
from homeassistant.const import CONF_TIMEOUT, CONF_HOST
import homeassistant.helpers.config_validation as cv
from homeassist... | apache-2.0 | 3,641,656,608,733,589,000 | 34.98524 | 88 | 0.5766 | false |
toenuff/treadmill | lib/python/treadmill/api/allocation.py | 1 | 8317 | """Implementation of allocation API."""
from __future__ import absolute_import
from .. import admin
from .. import authz
from .. import context
from .. import schema
def _set_auth_resource(cls, resource):
"""Set auth resource name for CRUD methods of the class."""
for method_name in ['get', 'create', 'update... | apache-2.0 | 1,823,325,916,360,004,400 | 38.985577 | 78 | 0.4694 | false |
MartinThoma/algorithms | perceptron/perceptron.py | 1 | 4057 | #!/usr/bin/env python
"""Example implementation for a perceptron."""
import logging
import math
import sys
import numpy as np
from sklearn.metrics import accuracy_score
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
level=logging.DEBUG,
stream=sys.stdout)... | mit | 3,964,360,171,564,592,000 | 26.97931 | 79 | 0.536357 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2015_06_15/operations/__init__.py | 2 | 2470 | # 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 | -2,917,612,006,331,651,600 | 48.4 | 104 | 0.789474 | false |
MattArnold/tuxtrax | penguicontrax/api/users.py | 2 | 4400 | #flask libs
from flask import Flask, request, g
from flask.ext.restful import Resource, Api, reqparse
from sqlalchemy import or_
#global libs
from sys import exit
import sys
import os
## Import Local Libs
from penguicontrax import dump_table
from functions import return_null_if_not_logged_in
from .. import db
##User ... | gpl-3.0 | 5,610,789,149,584,348,000 | 34.483871 | 78 | 0.5175 | false |
kboard/kboard | kboard/functional_test/test_page_view_count.py | 4 | 1598 | from .base import FunctionalTest, login_test_user_with_browser
class CountPageViewTest(FunctionalTest):
@login_test_user_with_browser
def test_count_view_of_post(self):
self.move_to_default_board()
# 혜선이는 'grape'에 대한 게시글을 작성한다
self.add_post('grape', 'purple\nsweet')
# 글 목록을 보... | mit | -711,053,669,305,442,600 | 36.891892 | 105 | 0.626248 | false |
xxd3vin/spp-sdk | opt/Python27/Lib/sqlite3/dbapi2.py | 161 | 2615 | #-*- coding: ISO-8859-1 -*-
# pysqlite2/dbapi2.py: the DB-API 2.0 interface
#
# Copyright (C) 2004-2005 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# aris... | mit | -459,894,781,509,002,200 | 28.715909 | 88 | 0.698662 | false |
edx/edx-platform | openedx/core/djangoapps/schedules/tests/test_content_highlights.py | 3 | 8195 | # lint-amnesty, pylint: disable=missing-module-docstring
import datetime
from unittest.mock import patch
import pytest
from openedx.core.djangoapps.schedules.content_highlights import (
course_has_highlights_from_store,
get_all_course_highlights,
get_next_section_highlights,
get_week_highlights
)
from o... | agpl-3.0 | 2,482,570,613,046,065,000 | 45.282486 | 124 | 0.657837 | false |
amith01994/intellij-community | python/lib/Lib/site-packages/django/db/backends/postgresql/operations.py | 229 | 9420 | import re
from django.db.backends import BaseDatabaseOperations
# This DatabaseOperations class lives in here instead of base.py because it's
# used by both the 'postgresql' and 'postgresql_psycopg2' backends.
class DatabaseOperations(BaseDatabaseOperations):
def __init__(self, connection):
super(Databas... | apache-2.0 | 1,413,085,750,651,887,600 | 44.95122 | 188 | 0.573355 | false |
ovnicraft/openerp-restaurant | product/__openerp__.py | 4 | 2604 | # -*- 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... | agpl-3.0 | -5,126,609,584,494,815,000 | 35.166667 | 138 | 0.599846 | false |
rosjat/python-scsi | tests/test_cdb_inquiry.py | 1 | 2022 | # coding: utf-8
# Copyright (C) 2014 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
# Copyright (C) 2015 by Markus Rosjat <markus.rosjat@gmail.com>
# SPDX-FileCopyrightText: 2014 The python-scsi Authors
#
# SPDX-License-Identifier: LGPL-2.1-or-later
import unittest
from pyscsi.pyscsi.scsi_cdb_inquiry import Inquiry
f... | lgpl-2.1 | -7,029,847,152,656,447,000 | 37.884615 | 75 | 0.619683 | false |
jjscarafia/odoo | addons/board/__openerp__.py | 114 | 1763 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 | -3,170,421,804,459,335,700 | 37.326087 | 115 | 0.585933 | false |
astrofrog/numpy | numpy/core/tests/test_umath.py | 8 | 45076 | import sys
import platform
from numpy.testing import *
import numpy.core.umath as ncu
import numpy as np
def on_powerpc():
""" True if we are running on a Power PC platform."""
return platform.processor() == 'powerpc' or \
platform.machine().startswith('ppc')
class _FilterInvalids(object):
d... | bsd-3-clause | -5,441,982,382,945,806,000 | 34.859984 | 135 | 0.527509 | false |
CristinaCristescu/root | bindings/pyroot/_pythonization.py | 53 | 12056 | """ Pythonization API.
"""
# TODO: externalize this (have PythonizationScope and UserPythonizations as
# globals here and picked up from this module
# TODO: set explicit export list
# TODO: move cast to cppyy.lowlevel or some sort
# TODO: remove all need for accessing _backend
def _set_backend( backend ):
global... | lgpl-2.1 | -8,291,979,518,281,677,000 | 32.960563 | 143 | 0.55433 | false |
jpakkane/meson | mesonbuild/compilers/mixins/intel.py | 2 | 5659 | # Copyright 2019 The meson development team
#
# 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 ... | apache-2.0 | -222,039,941,394,260,200 | 40.306569 | 167 | 0.621665 | false |
pklaus/python-inwx-xmlrpc | example.register-domain.py | 1 | 2448 | #!/usr/bin/env python
# -*- encoding: UTF8 -*-
# author: Philipp Klaus, philipp.klaus →AT→ gmail.com
# This file is part of python-inwx-xmlrpc.
#
# python-inwx-xmlrpc 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 Foun... | gpl-3.0 | 3,842,071,088,762,110,000 | 47.88 | 174 | 0.655892 | false |
ryfeus/lambda-packs | Shapely_numpy/source/numpy/ctypeslib.py | 50 | 14669 | """
============================
``ctypes`` Utility Functions
============================
See Also
---------
load_library : Load a C library.
ndpointer : Array restype/argtype with verification.
as_ctypes : Create a ctypes array from an ndarray.
as_array : Create an ndarray from a ctypes array.
References
----------... | mit | -7,665,176,195,777,183,000 | 31.381898 | 89 | 0.539232 | false |
Zarokka/exaile | plugins/somafm/__init__.py | 1 | 6721 | # Copyright (C) 2012 Rocco Aliberti
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it... | gpl-2.0 | -7,109,144,411,343,203,000 | 29.55 | 80 | 0.577295 | false |
perkinslr/pypyjs | addedLibraries/twisted/internet/test/connectionmixins.py | 39 | 20175 | # -*- test-case-name: twisted.internet.test.test_tcp -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Various helpers for tests for connection-oriented transports.
"""
from __future__ import division, absolute_import
import socket
from gc import collect
from weakref import ref
from z... | mit | 3,908,824,231,175,582,000 | 32.292079 | 79 | 0.651549 | false |
TinyOS-Camp/DDEA-DEV | REFACTORING/data_preprocess.py | 2 | 18914 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 14 01:34:41 2014
@author: deokwoo
"""
from __future__ import division # To forace float point division
import numpy as np
from numpy.linalg import norm
from scipy.interpolate import interp1d
from shared_constants import *
from data_tools import *
from scipy.stats import s... | gpl-2.0 | 9,080,312,998,267,358,000 | 36.1611 | 167 | 0.554457 | false |
metaperl/behave | behave4cmd0/pathutil.py | 12 | 3946 | # -*- coding -*-
"""
Provides some command utility functions.
TODO:
matcher that ignores empty lines and whitespace and has contains comparison
"""
from __future__ import absolute_import, print_function, unicode_literals
import os.path
import codecs
# --------------------------------------------------------------... | bsd-2-clause | 6,510,783,033,879,640,000 | 33.017241 | 79 | 0.623923 | false |
mattseymour/django | tests/messages_tests/test_session.py | 7 | 1761 | from django.contrib.messages import constants
from django.contrib.messages.storage.base import Message
from django.contrib.messages.storage.session import SessionStorage
from django.test import TestCase
from django.utils.safestring import SafeData, mark_safe
from .base import BaseTests
def set_session_data(storage, ... | bsd-3-clause | 3,726,576,253,409,584,000 | 33.529412 | 93 | 0.697331 | false |
CamelBackNotation/CarnotKE | jyhton/lib-python/2.7/distutils/tests/setuptools_extension.py | 149 | 1592 | from distutils.core import Extension as _Extension
from distutils.core import Distribution as _Distribution
def _get_unpatched(cls):
"""Protect against re-patching the distutils if reloaded
Also ensures that no other distutils extension monkeypatched the distutils
first.
"""
while cls.__module__.s... | apache-2.0 | 3,674,236,564,680,050,700 | 30.215686 | 78 | 0.642588 | false |
akohlmey/lammps | lib/plumed/Install.py | 7 | 5784 | #!/usr/bin/env python
"""
Install.py tool to download, unpack, build, and link to the plumed2 library
used to automate the steps described in the README file in this dir
"""
from __future__ import print_function
import sys, os, platform, subprocess, shutil
from argparse import ArgumentParser
sys.path.append('..')
fr... | gpl-2.0 | -3,828,307,744,121,040,400 | 37.304636 | 159 | 0.669087 | false |
PistonDevelopers/freetype-sys | freetype2/builds/meson/extract_freetype_version.py | 12 | 2634 | #!/usr/bin/env python
"""Extract the FreeType version numbers from `<freetype/freetype.h>`.
This script parses the header to extract the version number defined there.
By default, the full dotted version number is printed, but `--major`,
`--minor` or `--patch` can be used to only print one of these values
instead.
"""
... | mit | 1,015,284,646,353,905,800 | 23.616822 | 88 | 0.585421 | false |
tinloaf/home-assistant | homeassistant/components/cloud/auth_api.py | 1 | 4703 | """Package to communicate with the authentication API."""
class CloudError(Exception):
"""Base class for cloud related errors."""
class Unauthenticated(CloudError):
"""Raised when authentication failed."""
class UserNotFound(CloudError):
"""Raised when a user is not found."""
class UserNotConfirmed(... | apache-2.0 | 7,771,203,372,679,210,000 | 26.184971 | 72 | 0.671699 | false |
2013Commons/HUE-SHARK | build/env/lib/python2.7/site-packages/Django-1.2.3-py2.7.egg/django/core/management/commands/testserver.py | 73 | 1408 | from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--addrport', action='store', dest='addrport',
type='string', default='',
help='port number or ipaddr:port to run t... | apache-2.0 | 2,497,487,459,036,866,000 | 41.666667 | 144 | 0.669744 | false |
DavidAndreev/indico | indico/util/mimetypes.py | 2 | 3313 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 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; either version 3 of the
# License, or (a... | gpl-3.0 | 72,692,389,453,319,260 | 33.873684 | 106 | 0.669484 | false |
MackZxh/OCA-Choice | knowledge/document_page_approval/document_page_approval.py | 11 | 9143 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it und... | lgpl-3.0 | -8,438,210,878,288,545,000 | 32.368613 | 79 | 0.50618 | false |
rljacobson/FoxySheep | python_target/FoxySheep/Errors/ErrorHandler.py | 1 | 2893 | """
This module defines the mechanism by which errors are handled in FoxySheep.
"""
import sys
from antlr4.ParserRuleContext import ParserRuleContext
from AST import ASTNode
def _print_err(*args, flush=False):
sys.stderr.write(' '.join(map(str, args)) + '\n')
if flush:
sys.stderr.flush()
class Err... | bsd-2-clause | 497,005,514,960,589,100 | 27.087379 | 111 | 0.587971 | false |
houzhenggang/hiwifi-openwrt-HC5661-HC5761 | staging_dir/host/lib/python2.7/idlelib/configHelpSourceEdit.py | 149 | 6680 | "Dialog to specify or edit the parameters for a user configured help source."
import os
import sys
from Tkinter import *
import tkMessageBox
import tkFileDialog
class GetHelpSourceDialog(Toplevel):
def __init__(self, parent, title, menuItem='', filePath=''):
"""Get menu entry and url/ local file location... | gpl-2.0 | -6,246,996,112,101,064,000 | 38.526627 | 80 | 0.518563 | false |
kaedroho/django | tests/template_tests/test_context.py | 40 | 7972 | from unittest import mock
from django.http import HttpRequest
from django.template import (
Context, Engine, RequestContext, Template, Variable, VariableDoesNotExist,
)
from django.template.context import RenderContext
from django.test import RequestFactory, SimpleTestCase
class ContextTests(SimpleTestCase):
... | bsd-3-clause | 7,962,830,734,304,788,000 | 29.427481 | 94 | 0.517687 | false |
apache/incubator-trafodion | install/python-installer/scripts/traf_sqconfig.py | 2 | 2762 | #!/usr/bin/env python
# @@@ START COPYRIGHT @@@
#
# 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 Li... | apache-2.0 | -4,307,591,165,476,233,700 | 31.880952 | 143 | 0.654236 | false |
theo-l/django | tests/check_framework/test_templates.py | 29 | 3577 | from copy import copy, deepcopy
from django.core.checks.templates import (
E001, E002, check_setting_app_dirs_loaders,
check_string_if_invalid_is_string,
)
from django.test import SimpleTestCase
from django.test.utils import override_settings
class CheckTemplateSettingsAppDirsTest(SimpleTestCase):
TEMPLA... | bsd-3-clause | 2,231,401,155,415,805,000 | 39.191011 | 101 | 0.642158 | false |
entropy1337/infernal-twin | Modules/build/reportlab/src/reportlab/graphics/charts/areas.py | 30 | 4432 | #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/charts/areas.py
__version__=''' $Id$ '''
__doc__='''This module defines a Area mixin classes'''
from reportlab.lib.validators import isNumbe... | gpl-3.0 | 5,356,541,920,012,279,000 | 46.148936 | 117 | 0.536327 | false |
DavidLP/home-assistant | tests/components/qwikswitch/test_init.py | 7 | 3667 | """Test qwikswitch sensors."""
import logging
import pytest
from homeassistant.const import EVENT_HOMEASSISTANT_START
from homeassistant.components.qwikswitch import DOMAIN as QWIKSWITCH
from homeassistant.bootstrap import async_setup_component
from tests.test_util.aiohttp import mock_aiohttp_client
from aiohttp.clie... | apache-2.0 | -6,506,892,414,808,428,000 | 29.558333 | 77 | 0.589855 | false |
dyyi/moneybook | venv/Lib/site-packages/wheel/archive.py | 233 | 2286 | """
Archive tools for wheel.
"""
import os
import time
import logging
import os.path
import zipfile
log = logging.getLogger("wheel")
def archive_wheelfile(base_name, base_dir):
'''Archive all files under `base_dir` in a whl file and name it like
`base_name`.
'''
olddir = os.path.abspath(os.curdir)
... | apache-2.0 | 5,118,281,388,085,307,000 | 27.575 | 76 | 0.598863 | false |
elenaoat/AutobahnPython | examples/websocket/echo_tls/client.py | 32 | 1863 | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## 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-2.0 | 8,211,512,687,679,356,000 | 30.05 | 111 | 0.648417 | false |
ar7z1/ansible | lib/ansible/plugins/cache/memory.py | 159 | 1272 | # (c) 2014, Brian Coca, Josh Drake, et al
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
cache: memory
short_description: RAM ba... | gpl-3.0 | -6,695,270,525,566,894,000 | 23 | 92 | 0.621069 | false |
RussTedrake/director | src/python/ddapp/vtkNumpy.py | 10 | 2294 | import vtkAll as vtk
from shallowCopy import shallowCopy
import numpy as np
try:
from vtk.util import numpy_support
except ImportError:
from paraview import numpy_support
def numpyToPolyData(pts, pointData=None, createVertexCells=False):
pd = vtk.vtkPolyData()
pd.SetPoints(vtk.vtkPoints())
# Makes... | bsd-3-clause | -9,021,113,346,189,995,000 | 26.638554 | 66 | 0.699651 | false |
nicktimko/multiworm | tapeworm/tests/test_bad_datasets.py | 1 | 1467 | from __future__ import (
absolute_import, division, print_function, unicode_literals)
import six
from six.moves import (zip, filter, map, reduce, input, range)
import unittest
import numpy as np
import tapeworm.scoring
from tapeworm.core import OneGoodBlobException
class TestBadDatasets(unittest.TestCase):
... | mit | 2,617,798,918,657,157,000 | 31.6 | 83 | 0.585549 | false |
researchstudio-sat/wonpreprocessing | python-processing/tools/bm25.py | 1 | 2555 | __author__ = 'hfriedrich'
import numpy as np
from tools.tensor_utils import SparseTensor
from math import log10
from scipy.sparse import csr_matrix
# see http://en.wikipedia.org/wiki/Okapi_BM25
# parameters:
# tensor: SparseTensor object
# indices: indices pointing to (need, need) combinations to compute the connecti... | apache-2.0 | -8,738,371,858,494,878,000 | 40.209677 | 115 | 0.658317 | false |
thelabnyc/django-activity-stream | actstream/tests/base.py | 1 | 5135 | from json import loads
from datetime import datetime
from inspect import getargspec
from django.apps import apps
from django.test import TestCase
from django.template import Template, Context
from django.utils.timesince import timesince
from django.contrib.sites.models import Site
from django.contrib.auth import get_u... | bsd-3-clause | -9,038,611,907,881,431,000 | 36.210145 | 98 | 0.635248 | false |
openstack/nova | nova/tests/unit/virt/vmwareapi/test_vif.py | 4 | 12542 | # Copyright 2013 Canonical Corp.
# 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 | -8,916,944,245,923,741,000 | 46.150376 | 78 | 0.499043 | false |
alexthered/kienhoc-platform | lms/djangoapps/courseware/management/commands/clean_history.py | 84 | 7312 | """A command to clean the StudentModuleHistory table.
When we added XBlock storage, each field modification wrote a new history row
to the db. Now that we have bulk saves to avoid that database hammering, we
need to clean out the unnecessary rows from the database.
This command that does that.
"""
import datetime
... | agpl-3.0 | 2,783,817,424,923,025,000 | 31.070175 | 92 | 0.581647 | false |
veger/ansible | lib/ansible/utils/ssh_functions.py | 148 | 1600 | # (c) 2016, James Tanner
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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
# (... | gpl-3.0 | -2,169,157,187,920,182,500 | 31.653061 | 116 | 0.70375 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.