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 |
|---|---|---|---|---|---|---|---|---|---|---|
Johnzero/OE7 | openerp/addons/base/ir/ir_values.py | 23 | 25172 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 | -7,476,036,974,791,099,000 | 51.551148 | 137 | 0.550612 | false |
khwon/iTerm2 | tools/ply/ply-3.4/example/unicalc/calc.py | 165 | 2502 | # -----------------------------------------------------------------------------
# calc.py
#
# A simple calculator with variables. This is from O'Reilly's
# "Lex and Yacc", p. 63.
#
# This example uses unicode strings for tokens, docstrings, and input.
# ----------------------------------------------------------------... | gpl-2.0 | 1,892,919,883,991,255,800 | 20.384615 | 79 | 0.511191 | false |
admetricks/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py | 118 | 37734 | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | -4,745,505,746,082,505,000 | 52.371994 | 180 | 0.653867 | false |
adelina-t/nova | nova/tests/functional/v3/test_flavor_extraspecs.py | 31 | 3237 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | -412,982,516,194,883,800 | 38.962963 | 78 | 0.624035 | false |
tsokalo/ghn-plc | plc/examples/plc-arq-mac-example.py | 1 | 3889 | # -*- Mode:Python; -*-
# /*
# * Copyright (c) 2010 INRIA
# *
# * This program is free software; you can redistribute it and/or modify
# * it under the terms of the GNU General Public License version 2 as
# * published by the Free Software Foundation;
# *
# * This program is distributed in the hope that it will b... | gpl-3.0 | 5,648,823,268,331,121,000 | 29.865079 | 117 | 0.696066 | false |
kejbaly2/invoke | invoke/vendor/yaml3/serializer.py | 293 | 4165 |
__all__ = ['Serializer', 'SerializerError']
from .error import YAMLError
from .events import *
from .nodes import *
class SerializerError(YAMLError):
pass
class Serializer:
ANCHOR_TEMPLATE = 'id%03d'
def __init__(self, encoding=None,
explicit_start=None, explicit_end=None, version=None, ta... | bsd-2-clause | -2,638,352,298,251,250,000 | 36.522523 | 82 | 0.565906 | false |
richardtran415/pymatgen | pymatgen/io/tests/test_cif.py | 5 | 44369 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import warnings
import numpy as np
from pymatgen.core.composition import Composition
from pymatgen.core.periodic_table import DummySpecies, Element, Species
from pymatgen.core.lattice import ... | mit | -1,715,384,417,551,349,800 | 34.241461 | 113 | 0.608082 | false |
hsuchie4/TACTIC | src/tactic/protocol/rest_test.py | 6 | 5688 | #!/usr/bin/python
###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way wi... | epl-1.0 | -591,305,541,451,706,500 | 21.393701 | 70 | 0.525316 | false |
x2Ident/x2Ident_test | mitmproxy/mitmproxy/models/connections.py | 2 | 7079 | from __future__ import absolute_import, print_function, division
import time
import copy
import os
import six
from mitmproxy import stateobject
from netlib import certutils
from netlib import tcp
class ClientConnection(tcp.BaseHandler, stateobject.StateObject):
"""
A client connection
... | gpl-3.0 | -7,952,691,436,323,149,000 | 28.778261 | 112 | 0.577341 | false |
ttakamura/chainer | examples/ptb/train_ptb.py | 2 | 5101 | #!/usr/bin/env python
"""Sample script of recurrent neural network language model.
This code is ported from following implementation written in Torch.
https://github.com/tomsercu/lstm
"""
import argparse
import math
import sys
import time
import numpy as np
from chainer import cuda, Variable, FunctionSet, optimizers
... | mit | -6,022,210,529,911,439,000 | 33.466216 | 78 | 0.595569 | false |
laic/gensim | gensim/topic_coherence/indirect_confirmation_measure.py | 17 | 6611 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
This module contains functions to compute confirmation on a pair of words or word subsets. The advantage of indirect
confirmation me... | lgpl-2.1 | -8,049,894,137,588,336,000 | 46.164286 | 141 | 0.619415 | false |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib2to3/pygram.py | 320 | 1118 | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Export the Python grammar and symbols."""
# Python imports
import os
# Local imports
from .pgen2 import token
from .pgen2 import driver
from . import pytree
# The grammar file
_GRAMMAR_FILE = os.path.join(os.path.... | bsd-2-clause | 8,566,961,793,047,755,000 | 26.95 | 70 | 0.686941 | false |
minhphung171093/GreenERP_V8 | openerp/sql_db.py | 168 | 23783 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 | 1,595,097,336,200,878,000 | 36.219092 | 123 | 0.592566 | false |
idea4bsd/idea4bsd | python/lib/Lib/site-packages/django/forms/forms.py | 73 | 21332 | """
Form classes
"""
from django.core.exceptions import ValidationError
from django.utils.copycompat import deepcopy
from django.utils.datastructures import SortedDict
from django.utils.html import conditional_escape
from django.utils.encoding import StrAndUnicode, smart_unicode, force_unicode
from django.utils.safest... | apache-2.0 | 7,885,585,402,822,467,000 | 39.709924 | 130 | 0.583021 | false |
frederica07/Dragon_Programming_Process | PyOpenGL-3.0.2/OpenGL/GL/ATI/element_array.py | 4 | 1223 | '''OpenGL extension ATI.element_array
This module customises the behaviour of the
OpenGL.raw.GL.ATI.element_array to provide a more
Python-friendly API
Overview (from the spec)
This extension provides a mechanism for an application to create
an array of index data for use in specifying geometric primitives.
... | bsd-2-clause | -136,786,074,725,679,840 | 38.483871 | 67 | 0.804579 | false |
pgmillon/ansible | lib/ansible/modules/network/edgeos/edgeos_config.py | 28 | 10823 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2018 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -7,020,511,385,553,532,000 | 32.50774 | 99 | 0.647695 | false |
bashrc/zeronet-debian | src/plugins/disabled-Bootstrapper/Test/TestBootstrapper.py | 5 | 7777 | import hashlib
import os
import pytest
from Bootstrapper import BootstrapperPlugin
from Bootstrapper.BootstrapperDb import BootstrapperDb
from Peer import Peer
from Crypt import CryptRsa
from util import helper
@pytest.fixture()
def bootstrapper_db(request):
BootstrapperPlugin.db.close()
BootstrapperPlugin.... | gpl-2.0 | -1,075,198,367,763,359,000 | 42.446927 | 132 | 0.592902 | false |
MeerkatLabs/gnucash-reporting | gnucash_reports/reports/base.py | 1 | 1888 | """
Definition of a report.
"""
_reports = dict()
def register_plugin(report, report_type=None):
"""
Register the plugin class definition into the module.
:param report: report definition class. Must have a class variable of report_type.
:param report_type: the type of report being identified, if non... | mit | -8,311,370,865,664,983,000 | 27.179104 | 102 | 0.643008 | false |
hanlind/nova | nova/virt/vmwareapi/images.py | 1 | 18920 | # Copyright (c) 2012 VMware, Inc.
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 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://w... | apache-2.0 | 3,372,986,669,293,438,000 | 38.831579 | 79 | 0.599683 | false |
petebachant/pyqtgraph | pyqtgraph/GraphicsScene/exportDialog.py | 31 | 5317 | from ..Qt import QtCore, QtGui, USE_PYSIDE, USE_PYQT5
from .. import exporters as exporters
from .. import functions as fn
from ..graphicsItems.ViewBox import ViewBox
from ..graphicsItems.PlotItem import PlotItem
if USE_PYSIDE:
from . import exportDialogTemplate_pyside as exportDialogTemplate
elif USE_PYQT5:
f... | mit | -8,869,932,559,936,999,000 | 35.923611 | 114 | 0.608238 | false |
etalab/udata | udata/tests/forms/test_model_list_field.py | 2 | 3571 | from werkzeug.datastructures import MultiDict
from udata.forms import ModelForm, fields
from udata.models import db
from udata.tests import TestCase
from udata.utils import faker
class Nested(db.Document):
name = db.StringField()
class Fake(db.Document):
name = db.StringField()
nested = db.ListField(db... | agpl-3.0 | -6,093,283,181,605,139,000 | 28.512397 | 78 | 0.626435 | false |
reqshark/duktape | src/genhashsizes.py | 16 | 3054 | #!/usr/bin/python
#
# Find a sequence of duk_hobject hash sizes which have a desired 'ratio'
# and are primes. Prime hash sizes ensure that all probe sequence values
# (less than hash size) are relatively prime to hash size, i.e. cover the
# entire hash. Prime data is packed into about 1 byte/prime using a
# pre... | mit | -1,839,734,154,711,192,600 | 23.432 | 76 | 0.672561 | false |
samuto/pysolar | pysolar/util.py | 3 | 23740 | # -*- coding: utf-8 -*-
# Copyright Brandon Stafford
#
# This file is part of Pysolar.
#
# Pysolar 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 yo... | gpl-3.0 | 4,580,865,496,225,776,600 | 36.035881 | 130 | 0.634709 | false |
aimas/TuniErp-8.0 | openerp/addons/base/res/res_users.py | 1 | 45483 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 | 1,703,504,492,242,789,600 | 44.483 | 204 | 0.579645 | false |
with-git/tensorflow | tensorflow/contrib/training/python/training/sgdr_learning_rate_decay.py | 24 | 8088 | # 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 | 393,841,189,399,424,600 | 42.251337 | 80 | 0.65727 | false |
kennedyshead/home-assistant | homeassistant/components/wunderground/sensor.py | 2 | 40590 | """Support for WUnderground weather service."""
from __future__ import annotations
import asyncio
from datetime import timedelta
import logging
import re
from typing import Any, Callable
import aiohttp
import async_timeout
import voluptuous as vol
from homeassistant.components import sensor
from homeassistant.compon... | apache-2.0 | 5,340,583,653,843,535,000 | 30.661466 | 92 | 0.580044 | false |
codrut3/tensorflow | tensorflow/contrib/kfac/python/ops/layer_collection_lib.py | 17 | 1628 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -1,290,475,788,217,033,200 | 38.707317 | 80 | 0.729115 | false |
chenweihua/jumpserver | jumpserver/urls.py | 1 | 1085 | import xadmin
xadmin.autodiscover()
from django.conf.urls import include, url
from views import index,skin_config,Login,Logout,upload,exec_cmd,setting,web_terminal,download
from xadmin.plugins import xversion
xversion.register_models()
urlpatterns = [
url(r'^$', index, name='index'),
url(r'^skin_conf... | gpl-2.0 | -4,927,879,013,282,540,000 | 41.4 | 94 | 0.63318 | false |
z0by/django | django/db/models/fields/files.py | 129 | 19629 | import datetime
import os
import warnings
from django import forms
from django.core import checks
from django.core.files.base import File
from django.core.files.images import ImageFile
from django.core.files.storage import default_storage
from django.db.models import signals
from django.db.models.fields import Field
f... | bsd-3-clause | -3,315,487,399,681,621,500 | 38.49497 | 104 | 0.62428 | false |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/tools/scripts/git_submodule.py | 1 | 12677 | #############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the QtWebEngine module of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
## Commercial License Usage
## Licensees holding va... | gpl-3.0 | -5,725,570,458,970,581,000 | 39.501597 | 137 | 0.588625 | false |
calmjs/nunja.stock | examples/fsnavtree.py | 1 | 1511 | #!/usr/bin/env python
from os import getcwd
from os.path import basename
from os import environ
import json
from nunja.core import engine
from nunja.stock.model import fsnav
from nunja.stock.model.base import Definition
nav = fsnav.Base(
Definition(
'baseid',
basename(__file__) + '?{+path}',
... | gpl-2.0 | -222,620,100,386,253,100 | 21.220588 | 63 | 0.551952 | false |
wlanslovenija/cmsplugin-filer | cmsplugin_filer_image/cms_plugins.py | 4 | 5245 | from __future__ import unicode_literals
import os
from cms.plugin_pool import plugin_pool
from cms.plugin_base import CMSPluginBase
from django.template.loader import select_template
from django.utils.translation import ugettext_lazy as _
from . import models
from .conf import settings
from filer.settings import FILER... | bsd-3-clause | 8,328,375,758,208,227,000 | 39.346154 | 112 | 0.579409 | false |
tedder/ansible | lib/ansible/modules/cloud/ovirt/ovirt_nic.py | 49 | 9548 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCU... | gpl-3.0 | -5,802,876,840,008,032,000 | 32.152778 | 138 | 0.597822 | false |
celiasmith/syde556 | pendulum.py | 1 | 4959 | import nengo
import numpy as np
class Pendulum(object):
def __init__(self, mass=1.0, length=1.0, dt=0.001, g=10.0, seed=None,
max_torque=2, max_speed=8, limit=2.0):
self.mass = mass
self.length = length
self.dt = dt
self.g = g
self.max_torque = max_torque
... | gpl-2.0 | 6,869,833,162,312,761,000 | 34.934783 | 106 | 0.521274 | false |
nhuntwalker/astroML | book_figures/chapter8/fig_total_least_squares.py | 3 | 4653 | """
Total Least Squares Figure
--------------------------
Figure 8.6
A linear fit to data with correlated errors in x and y. In the literature, this
is often referred to as total least squares or errors-in-variables fitting. The
left panel shows the lines of best fit; the right panel shows the likelihood
contours in s... | bsd-2-clause | -5,544,931,150,131,401,000 | 31.767606 | 79 | 0.562648 | false |
trdean/grEME | volk/gen/volk_tmpl_utils.py | 40 | 2390 | #!/usr/bin/env python
#
# Copyright 2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# ... | gpl-3.0 | -8,749,632,359,637,682,000 | 31.297297 | 94 | 0.637657 | false |
hudsondossantos/only_some_numerical_methods | linear-sys_methods/gauss_seidel.py | 1 | 2080 | # -*- coding: utf-8 -*-
"""
This module is an implementation of the Gauss Seidel method
"""
def norm(vector_x):
"""
Module calculates the norm of a vector
Args:
vector_x (list): Vector
Returns:
Norm of a vector
"""
norm_v = sum([x ** 2 for x in vector_x]... | mit | -7,571,399,580,226,847,000 | 25.653846 | 68 | 0.516595 | false |
0x535431/textaapp | lib/markupsafe/__init__.py | 701 | 10338 | # -*- coding: utf-8 -*-
"""
markupsafe
~~~~~~~~~~
Implements a Markup string.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import re
import string
from collections import Mapping
from markupsafe._compat import text_type, string_types, int_types, \
u... | bsd-3-clause | -8,207,836,703,158,656,000 | 33.691275 | 82 | 0.568969 | false |
bq/horus | src/horus/gui/workbench/control/main.py | 2 | 3260 | # -*- coding: utf-8 -*-
# This file is part of the Horus Project
__author__ = 'Jesús Arroyo Torrens <jesus.arroyo@bq.com>'
__copyright__ = 'Copyright (C) 2014-2016 Mundo Reader S.L.'
__license__ = 'GNU General Public License v2 http://www.gnu.org/licenses/gpl2.html'
from horus.util import profile
from horus.gui.engi... | gpl-2.0 | -3,637,080,503,465,908,000 | 44.263889 | 89 | 0.689168 | false |
rlkelly/spotipy | examples/artist_discography.py | 7 | 1630 | import sys
import spotipy
''' shows the albums and tracks for a given artist.
'''
def get_artist(name):
results = sp.search(q='artist:' + name, type='artist')
items = results['artists']['items']
if len(items) > 0:
return items[0]
else:
return None
def show_album_tracks(album):
tra... | mit | -7,360,554,365,487,188,000 | 26.627119 | 64 | 0.568098 | false |
SergioChan/Stream-Framework | stream_framework/tests/storage/base.py | 6 | 10937 | from stream_framework.activity import Activity
from stream_framework.storage.base import BaseActivityStorage, BaseTimelineStorage
from stream_framework.verbs.base import Love as PinVerb
from stream_framework.tests.utils import FakeActivity, Pin
from mock import patch
import datetime
import unittest
def implementation... | bsd-3-clause | -4,715,619,630,545,980,000 | 37.921708 | 117 | 0.633995 | false |
flavour/iscram | models/impact.py | 3 | 5502 | # -*- coding: utf-8 -*-
"""
Impact
Impact resources used by the old Assessment module
"""
if deployment_settings.has_module("assess"):
# Impact as component of incident reports
s3mgr.model.add_component("impact_impact", irs_ireport="ireport_id")
def impact_tables():
""" Load the Impact... | mit | -2,922,144,172,515,901,400 | 41.651163 | 118 | 0.4502 | false |
ofirr/dojango | dojango/util/media.py | 1 | 4383 | from django.conf import settings
from dojango.conf import settings as dojango_settings
from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured
from django.utils._os import safe_join
from django.utils.encoding import force_str
from django.views.static import serve
from os import path, li... | bsd-3-clause | 1,596,047,319,654,455,800 | 43.72449 | 150 | 0.613507 | false |
djpine/pyman | Book/chap8/Problems/test.py | 3 | 2735 | import numpy as np
import matplotlib.pyplot as plt
def LineFitWt(x, y, sig):
"""
Returns slope and y-intercept of weighted linear fit to
(x,y) data set.
Inputs: x and y data array and uncertainty array (unc)
for y data set.
Outputs: slope and y-intercept of best fit to data and
... | cc0-1.0 | 7,105,812,155,636,929,000 | 35.972973 | 79 | 0.603291 | false |
abonaca/gary | gary/dynamics/nonlinear.py | 1 | 8350 | # coding: utf-8
""" Utilities for nonlinear dynamics """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import logging
# Third-party
import numpy as np
# Project
from ..util import gram_schmidt
__all__ = ['lyapunov_spectrum', 'fast_lyapunov_max', ... | mit | 8,669,217,853,107,318,000 | 30.273408 | 83 | 0.574491 | false |
bookus/VideoClassification | VideoClassification/Experiments/ResNet_Temporal_EX.py | 1 | 6385 | import torch
import torch.nn as nn
from torch.autograd import Variable
try:
from cv2 import cv2
except:
import cv2
import VideoClassification.Config.Config as Config
from VideoClassification.model.resnet_twostream.resnet_twostream import resnet152_TemporalNet,resnet101_TemporalNet
from VideoClassification.uti... | gpl-3.0 | 9,184,646,487,002,495,000 | 33.513514 | 120 | 0.622083 | false |
Joble/CumulusCI | setup.py | 1 | 2305 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
from pkgutil import walk_packages
import cumulusci
def find_packages(path='.', prefix=""):
yield prefix
prefix = prefix + "."
for _, name, ispkg in walk_packages(path, prefix):
if ispkg:
yield name
with open('... | bsd-3-clause | -284,914,633,165,639,870 | 26.117647 | 75 | 0.587419 | false |
ap1/PixeeBel | code/bbb_visualize/pb_visualize.py | 1 | 1911 | #!/usr/bin/env python
import socket
import struct
import time
import select
import screen
import signal
import sys
NR_CHANNELS = 4
visibleMs = 200
selectMs = 60
# Each queue element is tuple with ( time-to-vanish, channel-id, bin-id )
queue = []
bind_port = ( '127.0.0.1', 3000 )
interrupted = False
# Control+C ... | mit | 4,867,150,032,136,732,000 | 18.30303 | 73 | 0.600733 | false |
TomBaxter/osf.io | osf_tests/test_include_queryset.py | 23 | 2339 | """Tests for osf.utils.manager.IncludeQueryset"""
import pytest
from framework.auth import Auth
from osf.models import Node
from osf_tests.factories import ProjectFactory, NodeFactory, UserFactory
pytestmark = pytest.mark.django_db
@pytest.fixture()
def create_n_nodes():
def _create_n_nodes(n, roots=True):
... | apache-2.0 | -8,187,061,261,385,840,000 | 35.546875 | 93 | 0.631039 | false |
amenonsen/ansible-modules-core | windows/win_feature.py | 96 | 2770 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Paul Durivage <paul.durivage@rackspace.com>, Trond Hindenes <trond@hindenes.com> and others
#
# 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
#... | gpl-3.0 | -4,656,399,475,728,199,000 | 26.979798 | 136 | 0.688087 | false |
chenokay/ripozo | ripozo/manager_base.py | 2 | 10635 | """
Contains the BaseManager which must be
implemented fully in regards to the persistence
mechanism you are using.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from abc import ABCMeta, abstractmethod
from ripo... | gpl-2.0 | -2,296,083,543,844,883,500 | 35.546392 | 95 | 0.632534 | false |
openaid-IATI/OIPA | OIPA/solr/dataset/indexing.py | 1 | 1948 |
from rest_framework.renderers import JSONRenderer
from api.publisher.serializers import PublisherSerializer
from solr.indexing import BaseIndexing
from solr.utils import get_child_attr, value_string
class DatasetIndexing(BaseIndexing):
def dataset_publisher(self):
publisher = get_child_attr(self.record... | agpl-3.0 | -6,430,056,524,311,222,000 | 29.920635 | 76 | 0.533368 | false |
Zhongqilong/kbengine | kbe/src/lib/python/Lib/idlelib/idle_test/test_text.py | 75 | 6760 | # Test mock_tk.Text class against tkinter.Text class by running same tests with both.
import unittest
from test.support import requires
from _tkinter import TclError
import tkinter as tk
class TextTest(object):
hw = 'hello\nworld' # usual initial insert after initialization
hwn = hw+'\n' # \n present at in... | lgpl-3.0 | 6,123,295,613,393,398,000 | 28.649123 | 85 | 0.503698 | false |
Azure/azure-sdk-for-python | sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/aio/operations/_shares_operations.py | 1 | 26471 | # 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 may ... | mit | 1,072,133,156,030,095,400 | 47.041742 | 212 | 0.634959 | false |
MichaelNedzelsky/intellij-community | plugins/hg4idea/testData/bin/hgext/interhg.py | 93 | 2836 | # interhg.py - interhg
#
# Copyright 2007 OHASHI Hideya <ohachige@gmail.com>
#
# Contributor(s):
# Edward Lee <edward.lee@engineering.uiuc.edu>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''expand expressions into changelog... | apache-2.0 | -7,005,827,410,863,089,000 | 33.168675 | 79 | 0.605783 | false |
oeeagle/quantum | neutron/extensions/servicetype.py | 18 | 3041 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | apache-2.0 | -7,219,815,197,055,205,000 | 31.698925 | 79 | 0.636962 | false |
unnikrishnankgs/va | venv/lib/python3.5/site-packages/tensorflow/contrib/hooks/python/training/profiler_hook.py | 78 | 4153 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | bsd-2-clause | -6,901,684,439,185,509,000 | 38.932692 | 80 | 0.684325 | false |
statik/grr | lib/config_lib.py | 2 | 49103 | #!/usr/bin/env python
"""This is the GRR config management code.
This handles opening and parsing of config files.
"""
import collections
import ConfigParser
import errno
import os
import pickle
import platform
import re
import StringIO
import sys
import urlparse
import zipfile
import yaml
import logging
from grr.... | apache-2.0 | 3,798,357,812,023,547,000 | 31.604914 | 80 | 0.658045 | false |
drxaero/calibre | src/calibre/ebooks/oeb/display/webview.py | 13 | 2192 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import re
fr... | gpl-3.0 | 167,147,378,665,565,300 | 33.793651 | 94 | 0.591241 | false |
palerdot/calibre | src/calibre/gui2/complete2.py | 2 | 15940 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import weakref... | gpl-3.0 | 6,680,517,433,718,439,000 | 33.570499 | 89 | 0.578716 | false |
CyanogenMod/android_external_chromium_org | tools/telemetry/telemetry/value/scalar.py | 36 | 2166 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import numbers
from telemetry import value as value_module
from telemetry.value import list_of_scalar_values
class ScalarValue(value_module.Value):
def _... | bsd-3-clause | -159,325,141,862,500,060 | 29.942857 | 77 | 0.66759 | false |
Mj258/weiboapi | srapyDemo/envs/Lib/site-packages/win32com/test/testvbscript_regexp.py | 40 | 1108 | import unittest
from win32com.client.gencache import EnsureDispatch
from win32com.client.dynamic import DumbDispatch
import win32com.test.util
class RegexTest(win32com.test.util.TestCase):
def _CheckMatches(self, match, expected):
found = []
for imatch in match:
found.append(imatch.Firs... | mit | -7,658,856,699,892,573,000 | 28.945946 | 54 | 0.638087 | false |
mikewiebe-ansible/ansible | lib/ansible/modules/network/fortios/fortios_router_ripng.py | 13 | 23978 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | gpl-3.0 | 5,498,347,300,380,204,000 | 36.465625 | 123 | 0.445742 | false |
GoUbiq/pyexchange | pyexchange/base/soap.py | 1 | 5464 | """
(c) 2013 LinkedIn 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 by applicable law or agreed to in writing... | apache-2.0 | 7,862,173,447,674,791,000 | 36.424658 | 245 | 0.67478 | false |
sysadminmatmoz/pmis | project_time_schedule/__init__.py | 3 | 1030 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
# Jordi Ballester Alomar <jordi.ballester@eficent.com>
#
# This program is free software: you can redistribute it and/or modify
# it und... | agpl-3.0 | 95,385,908,656,379,400 | 43.782609 | 78 | 0.601942 | false |
rohit21122012/DCASE2013 | runs/2016/dnn2016med_traps/traps36/src/features.py | 40 | 11159 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import librosa
import numpy
import scipy
def feature_extraction_lfcc(audio_filename_with_path, statistics=True):
print audio_filename_with_path
with open(audio_filename_with_path,'r') as f:
feature_matrix = numpy.loadtxt(f)
#f.close()
# Collect into data... | mit | 7,460,290,269,177,092,000 | 31.066092 | 113 | 0.544493 | false |
pv/scikit-learn | sklearn/tests/test_cross_validation.py | 70 | 41943 | """Test the cross_validation module"""
from __future__ import division
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from scipy import stats
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import assert_equal
from sklearn... | bsd-3-clause | 3,865,330,613,359,180,000 | 37.026292 | 79 | 0.616861 | false |
alexmandujano/django | django/conf/locale/nb/formats.py | 118 | 1763 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... | bsd-3-clause | -7,459,243,572,011,503,000 | 40.97619 | 81 | 0.525808 | false |
barbour-em/osf.io | scripts/log_analytics.py | 40 | 3817 | from __future__ import print_function, absolute_import
import time
import sys
import argparse
from faker import Faker
import itertools
from random import choice
from modularodm import Q
from framework.auth import Auth
from website.app import init_app
from website import models, security
from tests.factories import N... | apache-2.0 | -9,168,834,163,395,846,000 | 31.623932 | 169 | 0.640555 | false |
romankagan/DDBWorkbench | python/helpers/docutils/parsers/rst/__init__.py | 42 | 14143 | # $Id: __init__.py 6314 2010-04-26 10:04:17Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`,
the reStructuredText parser.
Usage
=====
1. Create a parser::
pa... | apache-2.0 | 5,651,680,125,993,455,000 | 36.91689 | 82 | 0.657923 | false |
quinot/ansible | test/units/module_utils/test_database.py | 178 | 4377 | import pytest
from ansible.module_utils.database import (
pg_quote_identifier,
SQLParseError,
)
# These are all valid strings
# The results are based on interpreting the identifier as a table name
VALID = {
# User quoted
'"public.table"': '"public.table"',
'"public"."table"': '"public"."table"',
... | gpl-3.0 | 1,791,613,900,498,836,700 | 42.77 | 120 | 0.630569 | false |
dimid/ansible-modules-extras | cloud/amazon/ec2_vpc_igw.py | 15 | 4625 | #!/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 | -2,129,451,769,415,334,400 | 28.272152 | 112 | 0.646919 | false |
martinbuc/missionplanner | Lib/site-packages/numpy/testing/nosetester.py | 53 | 13444 | """
Nose test running.
This module implements ``test()`` and ``bench()`` functions for NumPy modules.
"""
import os
import sys
def get_package_name(filepath):
"""
Given a path where a package is installed, determine its name.
Parameters
----------
filepath : str
Path to a file. If the de... | gpl-3.0 | -7,803,675,522,214,986,000 | 30.192575 | 82 | 0.555564 | false |
Aaron1992/v2ex | html5lib/tests/test_tokenizer.py | 72 | 6826 | import sys
import os
import unittest
import cStringIO
import warnings
import re
try:
import json
except ImportError:
import simplejson as json
from support import html5lib_test_files
from html5lib.tokenizer import HTMLTokenizer
from html5lib import constants
class TokenizerTestParser(object):
def __init_... | bsd-3-clause | -1,806,889,714,090,770,000 | 34.367876 | 89 | 0.593613 | false |
RAtechntukan/Sick-Beard | lib/imdb/__init__.py | 50 | 41019 | """
imdb package.
This package can be used to retrieve information about a movie or
a person from the IMDb database.
It can fetch data through different media (e.g.: the IMDb web pages,
a SQL database, etc.)
Copyright 2004-2012 Davide Alberani <da@erlug.linux.it>
This program is free software; you can redistribute i... | gpl-3.0 | -8,561,471,145,113,473,000 | 41.77268 | 81 | 0.601989 | false |
commtrack/commtrack-core | reportlab/lib/codecharts.py | 15 | 13039 | #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/lib/codecharts.py
#$Header $
__version__=''' $Id '''
__doc__="""Routines to print code page (character set) drawings. Predates unicode.
To be sure we ... | bsd-3-clause | 8,698,530,159,891,189,000 | 34.723288 | 130 | 0.561163 | false |
arnarb/greenhousedb | plants/xsettings.py | 1 | 2042 | """
Django settings for plants project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | gpl-3.0 | -7,673,196,621,039,691,000 | 23.60241 | 71 | 0.727718 | false |
open-synergy/account-closing | account_multicurrency_revaluation_report/__init__.py | 7 | 1046 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Vaucher
# Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | -7,452,746,374,153,115,000 | 40.84 | 78 | 0.616635 | false |
divio/django | django/contrib/admin/options.py | 15 | 81145 | import copy
import operator
from collections import OrderedDict
from functools import partial, reduce, update_wrapper
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers, widgets
from django.contrib.admin.checks import (
BaseModelAd... | bsd-3-clause | 6,906,082,961,912,938,000 | 41.373368 | 119 | 0.591583 | false |
dpetzold/django-extensions | tests/test_uuid_field.py | 24 | 2355 | import re
import uuid
import six
from django.test import TestCase
from django_extensions.db.fields import PostgreSQLUUIDField
from .testapp.models import (
UUIDTestAgregateModel, UUIDTestManyToManyModel, UUIDTestModel_field,
UUIDTestModel_pk,
)
class UUIDFieldTest(TestCase):
def test_UUID_field_create(... | mit | 2,659,017,971,540,815,400 | 45.176471 | 111 | 0.673885 | false |
jack198345/volatility | contrib/plugins/example.py | 58 | 2769 | # Volatility
#
# Authors:
# Mike Auty <mike.auty@gmail.com>
#
# This file is part of Volatility.
#
# Volatility 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 op... | gpl-2.0 | -6,132,530,543,458,165,000 | 40.328358 | 110 | 0.682918 | false |
pklaus/silhouette | src/utils.py | 1 | 2069 | import math
import re
# units
from pint import UnitRegistry
units = UnitRegistry()
# my guess as to why 508 is the magic number is the motor steps and the belt TPI
# i am guessing the belt is 2.54 TPI, and the motor can provide 200 steps
# 2.54 * 200 = 508
units.define('steps = inch / 508.0 = step')
# For SVG files,... | mit | 4,691,703,477,387,095,000 | 30.348485 | 95 | 0.59739 | false |
ingokegel/intellij-community | python/helpers/pycharm/appcfg_fetcher.py | 45 | 1634 | import sys
import optparse
from django_manage_commands_provider import _xml
class Option:
def __init__(self):
self.long = []
self.short = []
self.arg = None
self.help = None
def dump(self, dumper):
dumper.add_command_option(self.long, self.short, self.help, self.arg)
... | apache-2.0 | -927,061,333,168,136,700 | 25.354839 | 77 | 0.614443 | false |
kenwang76/readthedocs.org | readthedocs/rtd_tests/tests/test_redirects_utils.py | 24 | 1731 | from django.test import TestCase
from django.test.utils import override_settings
from readthedocs.projects.models import Project
from django.core.urlresolvers import reverse
from readthedocs.redirects.utils import redirect_filename
class RedirectFilenameTests(TestCase):
fixtures = ["eric", "test_data"]
def ... | mit | -1,402,488,364,213,453,800 | 29.368421 | 62 | 0.595609 | false |
ykaneko/quantum | quantum/openstack/common/periodic_task.py | 2 | 6922 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 applicab... | apache-2.0 | -8,540,072,303,586,666,000 | 36.016043 | 79 | 0.590147 | false |
maximeolivier/pyCAF | pycaf/architecture/devices/network_features/switchport.py | 1 | 2088 | #| This file is part of pyCAF. |
#| |
#| pyCAF is free software: you can redistribute it and/or modify |
#| it under the terms of the GNU General Public License as published by |
#| t... | gpl-3.0 | 2,731,600,384,262,212,000 | 40.76 | 174 | 0.493295 | false |
pixelipo/stormjar | test.py | 1 | 1189 | import time
import json
class DarkSkyTest:
def __init__(self):
with open('config.json', 'r') as f:
self.config = json.load(f)
self.pixel = {}
def lightningStrobe(self, red, green, blue):
# Wipe white across display a pixel at a time very quickly
list = [5, 20, 3,... | gpl-3.0 | 6,840,285,888,415,952,000 | 29.487179 | 106 | 0.534062 | false |
yelongyu/chihu | venv/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/pymysql.py | 44 | 1504 | # mysql/pymysql.py
# Copyright (C) 2005-2016 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
"""
.. dialect:: mysql+pymysql
:name: PyMySQL
:dbapi: pymysql
:connect... | gpl-3.0 | -5,548,079,836,669,974,000 | 25.385965 | 78 | 0.683511 | false |
OSGeoLabBp/tutorials | hungarian/python/code/shp_demo.py | 1 | 1753 | #! /usr/bin/python
# -*- coding: UTF-8 -*-
""" sample code for demonstrating shapely functionality """
import shapely
import shapely.wkt
import os
import sys
from osgeo import ogr
if len(sys.argv) < 2:
print "Usage: {} <shp_file> [buffer_distance]".format(sys.argv[0])
exit(1)
shapename = sys.argv[1]
shapefil... | cc0-1.0 | -7,395,189,305,644,737,000 | 32.711538 | 70 | 0.660011 | false |
cloudera/hue | desktop/core/ext-py/pysaml2-4.9.0/src/saml2/extension/mdui.py | 36 | 13834 | #!/usr/bin/env python
#
# Generated Mon May 2 14:23:33 2011 by parse_xsd.py version 0.4.
#
import saml2
from saml2 import SamlBase
from saml2 import md
NAMESPACE = 'urn:oasis:names:tc:SAML:metadata:ui'
class DisplayName(md.LocalizedNameType_):
"""The urn:oasis:names:tc:SAML:metadata:ui:DisplayName element ""... | apache-2.0 | 5,466,564,842,497,826,000 | 33.758794 | 78 | 0.655053 | false |
Leila20/django | tests/auth_tests/test_tokens.py | 42 | 2516 | import unittest
from datetime import date, timedelta
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.test import TestCase
from django.utils.six import PY3
class TokenGeneratorTest(TestCase):
def test_make... | bsd-3-clause | 4,245,699,840,706,282,000 | 36.552239 | 88 | 0.643879 | false |
pku9104038/edx-platform | common/djangoapps/course_groups/models.py | 38 | 1447 | import logging
from django.contrib.auth.models import User
from django.db import models
log = logging.getLogger(__name__)
class CourseUserGroup(models.Model):
"""
This model represents groups of users in a course. Groups may have different types,
which may be treated specially. For example, a user can... | agpl-3.0 | -298,855,855,604,666,600 | 42.848485 | 90 | 0.63718 | false |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.5.9/Python-3.5.9/Lib/test/test_property.py | 5 | 8541 | # Test case for property
# more tests are in test_descr
import sys
import unittest
class PropertyBase(Exception):
pass
class PropertyGet(PropertyBase):
pass
class PropertySet(PropertyBase):
pass
class PropertyDel(PropertyBase):
pass
class BaseClass(object):
def __init__(self):
self._sp... | apache-2.0 | -5,231,801,788,436,271,000 | 30.400735 | 79 | 0.562932 | false |
ardekantur/pyglet | tests/text/PLAIN.py | 33 | 4927 | #!/usr/bin/env python
'''Test an unformatted document is editable.
Examine and type over the text in the window that appears. The window
contents can be scrolled with the mouse wheel.
Press ESC to exit the test.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: STYLE.py 1754 2008-02-10 13:26:52Z Alex.Holk... | bsd-3-clause | 6,726,314,181,968,526,000 | 57.654762 | 974 | 0.733103 | false |
kenshay/ImageScripter | Script_Runner/PYTHON/Lib/site-packages/cryptography/hazmat/backends/openssl/rsa.py | 2 | 17999 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import math
from cryptography import utils
from cryptography.exceptions ... | gpl-3.0 | 4,819,437,341,935,194,000 | 36.813025 | 79 | 0.616034 | false |
praekelt/familyconnect-registration | changes/views.py | 1 | 1910 | import django_filters
from .models import Source, Change
from rest_framework import viewsets, mixins, generics, filters
from rest_framework.permissions import IsAuthenticated
from .serializers import ChangeSerializer
class ChangePost(mixins.CreateModelMixin, generics.GenericAPIView):
permission_classes = (IsAuthe... | bsd-3-clause | -4,405,220,745,411,133,000 | 37.979592 | 76 | 0.655497 | false |
has2k1/numpy | numpy/core/tests/test_memmap.py | 64 | 4296 | from __future__ import division, absolute_import, print_function
import sys
import os
import shutil
from tempfile import NamedTemporaryFile, TemporaryFile, mktemp, mkdtemp
from numpy import memmap
from numpy import arange, allclose, asarray
from numpy.testing import (
TestCase, run_module_suite, assert_, assert_e... | bsd-3-clause | -5,175,251,455,994,289,000 | 32.046154 | 85 | 0.569367 | false |
jabesq/home-assistant | homeassistant/components/raspihats/binary_sensor.py | 7 | 3835 | """Support for raspihats board binary sensors."""
import logging
import voluptuous as vol
from homeassistant.components.binary_sensor import (
PLATFORM_SCHEMA, BinarySensorDevice)
from homeassistant.const import (
CONF_ADDRESS, CONF_DEVICE_CLASS, CONF_NAME, DEVICE_DEFAULT_NAME)
import homeassistant.helpers.co... | apache-2.0 | 5,390,152,594,516,238,000 | 32.938053 | 78 | 0.628422 | false |
foer/linuxmuster-client-unity | tests/autopilot/unity/emulators/__init__.py | 2 | 1738 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# Copyright 2012 Canonical
# Author: Thomi Richards
#
# 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.
#
"""... | gpl-3.0 | -5,314,082,527,276,146,000 | 31.792453 | 96 | 0.713464 | false |
squidsoup/snapcraft | snapcraft/internal/cache/_cache.py | 5 | 1337 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 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 the h... | gpl-3.0 | 1,532,520,284,196,763,600 | 30.093023 | 75 | 0.695587 | 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.