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 |
|---|---|---|---|---|---|---|---|---|---|---|
h42i/trafficlight | main.py | 1 | 2880 | import network
import time
from umqtt.simple import MQTTClient
from lights import *
from traffic import *
# Config
wifi_ssid = "HaSi-Kein-Internet-Legacy"
wifi_psk = "bugsbunny"
mqtt_server = "mqtt.hasi"
mqtt_client_name = "traffic_light"
mqtt_topic = "hasi/lights/traffic_light"
# State
lights_on = True
mqtt_client =... | mit | -4,674,519,363,441,773,000 | 22.225806 | 59 | 0.577083 | false |
pombreda/tipfy | tests/ext_mako_test.py | 4 | 2712 | # -*- coding: utf-8 -*-
"""
Tests for tipfyext.mako
"""
import os
import sys
import unittest
from tipfy import RequestHandler, Request, Response, Tipfy
from tipfy.app import local
from tipfyext.mako import Mako, MakoMixin
import test_utils
current_dir = os.path.abspath(os.path.dirname(__file__))
templates_dir = ... | bsd-3-clause | -6,111,036,947,619,762,000 | 33.769231 | 83 | 0.623156 | false |
arcticshores/kivy | examples/canvas/tesselate.py | 30 | 4477 | '''
Tesselate Demonstration
=======================
This demonstrates the experimental library for tesselating polygons. You
should see a hollow square with some buttons below it. You can click and
drag to create additional shapes, watching the number of vertexes and elements
at the top of the screen. The 'debug' butt... | mit | 1,390,921,637,605,942,800 | 29.455782 | 79 | 0.532723 | false |
badloop/SickRage | lib/tmdb_api/tmdb_api.py | 57 | 29696 | """
tmdbsimple.py is a wrapper for The Movie Database API.
Refer to the official API documentation for more information.
http://docs.themoviedb.apiary.io/
Created by Celia Oakley on 2013-10-31.
"""
import json
import requests
class TMDB:
def __init__(self, api_key, version=3):
TMDB.api_key = str(api_key)... | gpl-3.0 | -1,081,361,070,385,383,800 | 34.864734 | 80 | 0.531789 | false |
gregsymons/jenkins-job-builder | jenkins_jobs/modules/properties.py | 8 | 22619 | # Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -1,632,062,555,807,171,800 | 34.846276 | 79 | 0.632963 | false |
Gitlab11/theHarvester | discovery/baidusearch.py | 21 | 1298 | import httplib
import myparser
import time
import sys
class search_baidu:
def __init__(self, word, limit):
self.word = word
self.total_results = ""
self.server = "www.baidu.com"
self.hostname = "www.baidu.com"
self.userAgent = "(Mozilla/5.0 (Windows; U; Windows NT 6.0;en-U... | gpl-2.0 | -7,481,455,280,330,083,000 | 28.5 | 111 | 0.580894 | false |
makinacorpus/Geotrek | geotrek/feedback/tests/test_commands.py | 2 | 1330 | from io import StringIO
from django.core.management import call_command
from django.test import TestCase
from django.utils import timezone
from geotrek.feedback.models import Report
from geotrek.feedback.factories import ReportFactory
class TestRemoveEmailsOlders(TestCase):
"""Test command erase_emails, if olde... | bsd-2-clause | -6,453,200,598,585,074,000 | 35.944444 | 71 | 0.681203 | false |
nurmd2/nurmd | addons/sale/wizard/sale_make_invoice_advance.py | 11 | 7094 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from openerp import api, fields, models, _
import openerp.addons.decimal_precision as dp
from openerp.exceptions import UserError
class SaleAdvancePaymentInv(models.TransientModel):
_name = "sale.advance.payment.inv"
_desc... | gpl-3.0 | -2,929,604,050,546,919,400 | 47.258503 | 218 | 0.57753 | false |
armab/st2 | st2common/tests/unit/test_hash.py | 9 | 1458 | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | apache-2.0 | -5,100,252,472,247,252,000 | 41.882353 | 75 | 0.729767 | false |
SaranyaKarthikeyan/boto | tests/unit/ec2/elb/test_attribute.py | 114 | 8314 | from tests.unit import unittest
from tests.compat import mock
from boto.ec2.elb import ELBConnection
from boto.ec2.elb import LoadBalancer
from boto.ec2.elb.attributes import LbAttributes
ATTRIBUTE_GET_TRUE_CZL_RESPONSE = b"""<?xml version="1.0" encoding="UTF-8"?>
<DescribeLoadBalancerAttributesResponse xmlns="http:... | mit | 7,813,805,710,472,212,000 | 39.556098 | 107 | 0.674044 | false |
JoaoVasques/aws-devtool | eb/linux/python3/lib/aws/requests/packages/chardet2/sjisprober.py | 25 | 3654 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
... | apache-2.0 | -1,907,864,027,942,934,500 | 40.488372 | 108 | 0.6185 | false |
umitproject/site-status | django/contrib/auth/decorators.py | 230 | 2388 | import urlparse
try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs
def user_passes_test(test_func, login... | agpl-3.0 | 1,264,680,284,700,843,300 | 39.474576 | 91 | 0.659966 | false |
sivaramakrishnansr/ryu | ryu/services/protocols/vrrp/rpc_manager.py | 8 | 7329 | # Copyright (C) 2014 Nippon Telegraph and Telephone 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 required by appli... | apache-2.0 | -5,496,576,028,631,513,000 | 36.203046 | 79 | 0.554782 | false |
AsimmHirani/ISpyPi | tensorflow/contrib/tensorflow-master/tensorflow/contrib/slim/python/slim/nets/vgg.py | 164 | 11241 | # 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 | 6,909,247,108,454,218,000 | 40.633333 | 80 | 0.660173 | false |
vijayendrabvs/ssl-neutron | neutron/tests/unit/brocade/test_brocade_vlan.py | 24 | 2176 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2013 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | -8,077,094,272,679,514,000 | 28.808219 | 69 | 0.652114 | false |
cortesi/mitmproxy | mitmproxy/tools/console/commands.py | 3 | 4544 | import urwid
import blinker
import textwrap
from mitmproxy.tools.console import layoutwidget
from mitmproxy.tools.console import signals
HELP_HEIGHT = 5
command_focus_change = blinker.Signal()
class CommandItem(urwid.WidgetWrap):
def __init__(self, walker, cmd, focused):
self.walker, self.cmd, self.focu... | mit | 2,161,612,153,924,099,000 | 27.578616 | 77 | 0.555458 | false |
Senseg/Py4A | python3-alpha/python3-src/Lib/encodings/uu_codec.py | 55 | 2763 | """Python 'uu_codec' Codec - UU content transfer encoding.
This codec de/encodes from bytes to bytes and is therefore usable with
bytes.transform() and bytes.untransform().
Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were
adapted from uu.py which was written by Lance Ellinghouse and
modified by Jack... | apache-2.0 | -2,360,078,879,743,168,000 | 26.909091 | 71 | 0.635903 | false |
clearlinux/clearstack | clearstack/common/swupd.py | 1 | 1587 | #
# Copyright (c) 2015 Intel Corporation
#
# Author: Alberto Murillo <alberto.murillo.silva@intel.com>
# Author: Victor Morales <victor.morales@intel.com>
#
# 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... | apache-2.0 | 5,339,539,151,818,158,000 | 35.906977 | 78 | 0.616257 | false |
KAsante95/osf.io | website/addons/dropbox/views.py | 8 | 2917 | """Views fo the node settings page."""
# -*- coding: utf-8 -*-
import logging
import httplib as http
from dropbox.rest import ErrorResponse
from dropbox.client import DropboxClient
from urllib3.exceptions import MaxRetryError
from framework.exceptions import HTTPError
from website.addons.dropbox.serializer import Dro... | apache-2.0 | 280,468,792,283,226,340 | 26.009259 | 96 | 0.582448 | false |
pchaigno/grr | lib/hunts/standard.py | 6 | 31511 | #!/usr/bin/env python
"""Some multiclient flows aka hunts."""
import threading
import logging
from grr.lib import aff4
from grr.lib import config_lib
from grr.lib import data_store
from grr.lib import flow
from grr.lib import rdfvalue
from grr.lib import registry
from grr.lib import stats
from grr.lib import utils... | apache-2.0 | -7,350,669,727,933,541,000 | 34.525366 | 80 | 0.665387 | false |
lunafeng/django | tests/user_commands/management/commands/hal.py | 372 | 1024 | from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = "Useless command."
def add_arguments(self, parser):
parser.add_argument('args', metavar='app_label', nargs='*',
help='Specify the app label(s) to works on.')
parser.add_argument('-... | bsd-3-clause | 2,441,594,566,972,760,600 | 35.571429 | 88 | 0.603516 | false |
luogangyi/Ceilometer-oVirt | ceilometer/collector.py | 2 | 5792 | #
# Copyright 2012-2013 eNovance <licensing@enovance.com>
#
# Author: Julien Danjou <julien@danjou.info>
#
# 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/license... | apache-2.0 | 5,145,560,581,836,806,000 | 38.401361 | 79 | 0.627072 | false |
duyet-website/api.duyet.net | lib/faker/providers/address/ko_KR/__init__.py | 3 | 12654 | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as AddressProvider
class Provider(AddressProvider):
"""
Korean Address Provider
=======================
Korea has two address and postal code system.
Address
-------
- Address based on land parcel numbers
... | mit | 4,714,824,424,627,431,000 | 24 | 82 | 0.4443 | false |
umass-bib/bibcpp | scripts/cppProjectScripts/createTestDir.py | 8 | 4212 | #!/usr/bin/env python3
import shutil, os, argparse, sys, stat,errno
import CppHeaderParser
from string import replace
from argparse import Action
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)), "pyUtils"))
from color_text import ColorText as CT
from headInGraph import *
testerBodyTemplate = "... | gpl-3.0 | -8,568,865,406,698,309,000 | 34.394958 | 219 | 0.597104 | false |
Andrey-Pavlov/phantomjs | src/qt/qtwebkit/Tools/QueueStatusServer/handlers/showresults.py | 146 | 1943 | # Copyright (C) 2009 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 | 865,226,500,363,103,200 | 46.390244 | 75 | 0.758106 | false |
sauloal/pycluster | pypy-1.9_64/lib-python/2.7/tempfile.py | 89 | 17875 | """Temporary files.
This module provides generic, low- and high-level interfaces for
creating temporary files and directories. The interfaces listed
as "safe" just below can be used without fear of race conditions.
Those listed as "unsafe" cannot, and are provided for backward
compatibility only.
This module also pr... | mit | 5,129,308,061,956,836,000 | 28.4967 | 78 | 0.604811 | false |
dud225/incubator-airflow | tests/executor/test_executor.py | 24 | 1058 | # -*- coding: utf-8 -*-
#
# 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, softw... | apache-2.0 | 9,130,052,295,304,526,000 | 31.060606 | 80 | 0.701323 | false |
ClusterHQ/benchmark-server | setup.py | 1 | 1061 | from setuptools import setup
def read(path):
"""
Read the contents of a file.
"""
with open(path) as f:
return f.read()
setup(
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independen... | apache-2.0 | 8,309,638,426,987,140,000 | 28.472222 | 70 | 0.622997 | false |
CenturylinkTechnology/ansible-modules-extras | cloud/misc/proxmox.py | 13 | 18979 | #!/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 distributed... | gpl-3.0 | 1,330,630,017,851,535,400 | 38.622129 | 262 | 0.652405 | false |
vegitron/ansible | test/units/module_utils/basic/test__log_invocation.py | 2 | 3323 | # -*- coding: utf-8 -*-
# (c) 2016, James Cammarata <jimi@sngx.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | gpl-3.0 | 6,557,380,873,828,735,000 | 39.036145 | 162 | 0.575083 | false |
MiLk/ansible | lib/ansible/module_utils/connection.py | 17 | 5354 | #
# 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 ... | gpl-3.0 | 6,928,592,801,811,243,000 | 35.421769 | 111 | 0.652409 | false |
clumsy/intellij-community | python/lib/Lib/site-packages/django/contrib/gis/db/models/sql/compiler.py | 222 | 12579 | from itertools import izip
from django.db.backends.util import truncate_name
from django.db.models.sql import compiler
from django.db.models.sql.constants import TABLE_NAME
from django.db.models.sql.query import get_proxied_model
SQLCompiler = compiler.SQLCompiler
class GeoSQLCompiler(compiler.SQLCompiler):
def ... | apache-2.0 | 4,729,257,248,252,652,000 | 44.248201 | 106 | 0.576039 | false |
danielvdende/incubator-airflow | airflow/contrib/executors/kubernetes_executor.py | 1 | 27629 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 4,848,278,429,930,745,000 | 43.135783 | 90 | 0.612038 | false |
inares/edx-platform | common/djangoapps/external_auth/tests/test_helper.py | 165 | 1259 | """
Tests for utility functions in external_auth module
"""
from django.test import TestCase
from external_auth.views import _safe_postlogin_redirect
class ExternalAuthHelperFnTest(TestCase):
"""
Unit tests for the external_auth.views helper function
"""
def test__safe_postlogin_redirect(self):
... | agpl-3.0 | 1,707,188,468,440,051,200 | 42.413793 | 88 | 0.625894 | false |
wiltonlazary/arangodb | 3rdParty/V8/V8-5.0.71.39/tools/swarming_client/third_party/requests/auth.py | 46 | 5665 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import logging
from base64 import b64encode
from .compat import urlparse, str
from .utils import parse_dict_header
log = logging.getLogger(__nam... | apache-2.0 | -430,005,920,434,810,500 | 30.472222 | 107 | 0.551986 | false |
embeddedarm/android_external_chromium_org | tools/update_reference_build.py | 24 | 11532 | #!/usr/bin/env python
#
# Copyright (c) 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.
"""Updates the Chrome reference builds.
Use -r option to update a Chromium reference build, or -b option for Chrome
official bui... | bsd-3-clause | 3,790,540,132,868,489,000 | 33.423881 | 80 | 0.618713 | false |
mbrukman/libcloud | libcloud/test/storage/test_atmos.py | 46 | 32319 | # 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 | 8,275,009,515,743,829,000 | 40.86399 | 83 | 0.571521 | false |
crmccreary/openerp_server | openerp/addons/project_scrum/report/sprint_burndown.py | 9 | 3896 | # -*- 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 | 3,012,207,194,704,729,600 | 41.813187 | 152 | 0.581622 | false |
rvalyi/geraldo | site/newsite/site-geraldo/django/contrib/sitemaps/views.py | 55 | 1891 | from django.http import HttpResponse, Http404
from django.template import loader
from django.contrib.sites.models import Site
from django.core import urlresolvers
from django.utils.encoding import smart_str
from django.core.paginator import EmptyPage, PageNotAnInteger
def index(request, sitemaps):
current_site = S... | lgpl-3.0 | 2,423,700,060,255,357,400 | 41.022222 | 112 | 0.632998 | false |
techhat/libcloud | libcloud/compute/drivers/ktucloud.py | 56 | 3606 | # 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 | -3,439,065,382,832,532,000 | 34.009709 | 74 | 0.56822 | false |
rabipanda/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/mixture_test.py | 21 | 38286 | # 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 | -8,101,211,815,006,896,000 | 40.079399 | 121 | 0.617119 | false |
denys-duchier/django | tests/generic_inline_admin/models.py | 133 | 1617 | from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Episode(models.Model):
name = models.CharField(max_length=100)
length = models.CharField(max_length=100, blank=True)
auth... | bsd-3-clause | 1,803,755,216,072,587,300 | 27.875 | 84 | 0.721707 | false |
MostAwesomeDude/construct | construct/formats/graphics/bmp.py | 1 | 3315 | """
Windows/OS2 Bitmap (BMP)
this could have been a perfect show-case file format, but they had to make
it ugly (all sorts of alignment or
"""
from construct import *
#===============================================================================
# pixels: uncompressed
#==============================================... | mit | 229,378,889,500,822,500 | 28.336283 | 80 | 0.477828 | false |
bluemini/kuma | kuma/search/tests/test_types.py | 26 | 1836 | from nose.tools import ok_, eq_
from elasticsearch_dsl import query
from kuma.wiki.models import Document
from kuma.wiki.search import WikiDocumentType
from . import ElasticTestCase
class WikiDocumentTypeTests(ElasticTestCase):
fixtures = ElasticTestCase.fixtures + ['wiki/documents.json']
def test_get_exc... | mpl-2.0 | 5,297,336,234,579,117,000 | 36.469388 | 76 | 0.579521 | false |
sander76/home-assistant | tests/components/homekit_controller/test_climate.py | 6 | 26995 | """Basic checks for HomeKitclimate."""
from aiohomekit.model.characteristics import (
ActivationStateValues,
CharacteristicsTypes,
CurrentHeaterCoolerStateValues,
SwingModeValues,
TargetHeaterCoolerStateValues,
)
from aiohomekit.model.services import ServicesTypes
from homeassistant.components.clim... | apache-2.0 | 2,546,394,150,109,690,400 | 35.137885 | 106 | 0.690646 | false |
fweik/espresso | testsuite/scripts/tutorials/test_lattice_boltzmann_part3.py | 3 | 2511 | # Copyright (C) 2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 versio... | gpl-3.0 | 69,408,827,197,338,910 | 39.5 | 80 | 0.67503 | false |
arskom/spyne | spyne/const/xml.py | 2 | 8841 |
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This libra... | lgpl-2.1 | 6,557,195,304,275,386,000 | 46.278075 | 82 | 0.613166 | false |
darren-rogan/CouchPotatoServer | libs/subliminal/__init__.py | 109 | 1366 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | gpl-3.0 | 3,836,800,118,359,259,600 | 39.176471 | 81 | 0.737921 | false |
mmauroy/SickRage | lib/guessit/transfo/guess_episodes_rexps.py | 28 | 12285 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | gpl-3.0 | 8,841,654,723,830,994,000 | 79.822368 | 466 | 0.635246 | false |
billy-inn/scikit-learn | sklearn/tests/test_cross_validation.py | 27 | 41664 | """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 | 5,005,253,573,337,369,000 | 37.014599 | 79 | 0.616167 | false |
mdj2/django | tests/custom_columns/models.py | 114 | 1396 | """
17. Custom column/table names
If your database column name is different than your model attribute, use the
``db_column`` parameter. Note that you'll use the field's name, not its column
name, in API usage.
If your database table name is different than your model name, use the
``db_table`` Meta attribute. This has... | bsd-3-clause | 4,446,985,019,977,573,000 | 29.347826 | 78 | 0.709885 | false |
sgh/vtk | Graphics/Testing/Python/tubeComb.py | 1 | 2098 | #!/usr/bin/env python
import sys
for i in range(0, len(sys.argv)):
if sys.argv[i] == '-A' and i < len(sys.argv)-1:
sys.path = sys.path + [sys.argv[i+1]]
import vtk
from vtk.util.misc import vtkRegressionTestImage, vtkGetDataRoot
# create planes
# Create the RenderWindow, Renderer
#
ren = vtk.vtkRenderer... | bsd-3-clause | 662,207,963,961,710,700 | 23.97619 | 64 | 0.762154 | false |
DanteOnline/free-art | venv/lib/python3.4/site-packages/django/test/runner.py | 60 | 26988 | import collections
import ctypes
import itertools
import logging
import multiprocessing
import os
import pickle
import textwrap
import unittest
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import DEFAULT_DB_ALIAS, connection... | gpl-3.0 | -3,430,558,947,913,266,700 | 35.032043 | 115 | 0.622906 | false |
caphrim007/ansible-modules-core | database/mysql/mysql_user.py | 12 | 19403 | #!/usr/bin/python
# (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
# Sponsored by Four Kitchens http://fourkitchens.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... | gpl-3.0 | 858,414,614,843,297,800 | 36.241843 | 173 | 0.63181 | false |
celebdor/python-midonetclient | src/midonetclient/topology/hosts.py | 2 | 1390 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2015 Midokura Europe SARL, All Rights Reserved.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://w... | apache-2.0 | -8,745,817,356,936,835,000 | 32.902439 | 77 | 0.718705 | false |
chillbu/cblib | thirdparty/protobuf-2.5.0/python/google/protobuf/service_reflection.py | 601 | 11010 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | apache-2.0 | 7,057,471,257,566,681,000 | 37.767606 | 80 | 0.728338 | false |
zhoulingjun/django | tests/gis_tests/geoapp/test_serializers.py | 245 | 3731 | from __future__ import unicode_literals
import json
from django.contrib.gis.geos import LinearRing, Point, Polygon
from django.core import serializers
from django.test import TestCase, mock, skipUnlessDBFeature
from django.utils import six
from .models import City, MultiFields, PennsylvaniaCity
@skipUnlessDBFeatur... | bsd-3-clause | -6,421,221,582,438,756,000 | 41.885057 | 110 | 0.650496 | false |
LittlePeng/redis-monitor | src/api/util/RDP.py | 14 | 1160 | """
The Ramer-Douglas-Peucker algorithm roughly ported from the pseudo-code provided
by http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
"""
from math import sqrt
def distance(a, b):
return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
def point_line_distance(point, start, end):
if (start == en... | mit | -4,134,659,211,215,624,700 | 28.769231 | 101 | 0.54569 | false |
SKIRT/PTS | modeling/maps/selector.py | 1 | 26666 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 | 7,801,000,764,385,974,000 | 31.087846 | 282 | 0.549222 | false |
virtualopensystems/nova | nova/openstack/common/report/views/text/header.py | 79 | 1534 | # Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | 6,972,193,832,368,031,000 | 29.078431 | 78 | 0.664276 | false |
cherrydocker/minos | supervisor/superlance/crashmailbatch.py | 5 | 4173 | #!/usr/bin/env python -u
##############################################################################
#
# Copyright (c) 2007 Agendaless Consulting and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the BSD-like license at
# http://www.repoze.org/LICENSE.txt. A copy of the lice... | apache-2.0 | -2,480,958,329,848,017,000 | 33.775 | 90 | 0.651809 | false |
kei-yamazaki/cf-php-build-pack | lib/build_pack_utils/process.py | 3 | 8083 | from __future__ import print_function
import signal
import subprocess
import sys
import logging
from datetime import datetime
from threading import Thread
from Queue import Queue, Empty
#
# This code comes from Honcho. Didn't need the whole Honcho
# setup, so I just swiped this part which is what the build
# pa... | apache-2.0 | -5,100,613,258,620,318,000 | 31.461847 | 78 | 0.573673 | false |
NaPs/Kolekto | kolekto/commands/flags.py | 1 | 2010 | from kolekto.commands import Command
from kolekto.printer import printer
from kolekto.helpers import get_hash
class FlagCommand(Command):
flags = [] # Flags to set when this flag is set
unset_flags = [] # Flags to unset when this flag is set
unflag_unset_flags = [] # Flags to unset when this flag is u... | mit | 6,671,457,880,069,678,000 | 26.534247 | 74 | 0.534328 | false |
helldorado/ansible | lib/ansible/modules/system/debconf.py | 44 | 5675 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Brian Coca <briancoca+ansible@gmail.com>
# 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_ve... | gpl-3.0 | 3,966,693,301,964,100,600 | 28.252577 | 147 | 0.615154 | false |
pixlra/HARP-fork | PythonLib/Encoder/Base_Encoder.py | 1 | 9022 | #!/usr/bin/env python
# coding: utf8
# (c) 2014 Dominic Springer
# File licensed under GNU GPL (see HARP_License.txt)
from Imports_Basic import *
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
class Base_Encoder(object):
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#Name ... | gpl-3.0 | 7,153,530,699,859,731,000 | 36.127572 | 121 | 0.450676 | false |
ouijan/rabbit | tests/test_app.py | 1 | 3766 | import unittest
from mock import *
from rabbit import settings
from rabbit.app import App
from rabbit.config import Config
from rabbit.command import Command
from rabbit.group import Group
class TestApp(unittest.TestCase):
def test_it_creates_CONFIG_FILE_global(self):
self.assertNotEqual(settings.CONFIG_FILE, Non... | mit | 317,713,165,816,101,760 | 27.748092 | 94 | 0.731811 | false |
museumsvictoria/nodel-recipes | (retired)/udp/script.py | 2 | 1996 | # Copyright (c) 2014 Museum Victoria
# This software is released under the MIT license (see license.txt for details)
'''This node demonstrates a simple udp controller.'''
import socket
# Functions used by this node
def send_udp_string(msg):
#open socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
t... | mit | -5,355,721,115,812,132,000 | 35.962963 | 163 | 0.671844 | false |
tlodge/homehub.nox | src/nox/coreapps/examples/countdown.py | 10 | 1618 | # Copyright 2008 (C) Nicira, Inc.
#
# This file is part of NOX.
#
# NOX 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.
#
# NOX is d... | gpl-3.0 | 4,352,990,112,396,146,700 | 29.528302 | 70 | 0.666255 | false |
igraph/python-igraph | src/igraph/statistics.py | 1 | 22508 | # vim:ts=4:sw=4:sts=4:et
# -*- coding: utf-8 -*-
"""
Statistics related stuff in igraph
"""
import math
__all__ = (
"FittedPowerLaw",
"Histogram",
"RunningMean",
"mean",
"median",
"percentile",
"quantile",
"power_law_fit",
)
class FittedPowerLaw(object):
"""Result of fitting a po... | gpl-2.0 | 3,597,468,541,788,197,000 | 32.19764 | 88 | 0.565666 | false |
ldirer/scikit-learn | sklearn/manifold/locally_linear.py | 14 | 26498 | """Locally Linear Embedding"""
# Author: Fabian Pedregosa -- <fabian.pedregosa@inria.fr>
# Jake Vanderplas -- <vanderplas@astro.washington.edu>
# License: BSD 3 clause (C) INRIA 2011
import numpy as np
from scipy.linalg import eigh, svd, qr, solve
from scipy.sparse import eye, csr_matrix
from scipy.sparse.li... | bsd-3-clause | 1,027,902,349,585,020,400 | 36.639205 | 79 | 0.566307 | false |
doganov/edx-platform | common/djangoapps/track/tests/test_tracker.py | 35 | 3443 | from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings
import track.tracker as tracker
from track.backends import BaseBackend
SIMPLE_SETTINGS = {
'default': {
'ENGINE': 'track.tests.test_tracker.DummyBackend',
'OPTIONS': {
'fl... | agpl-3.0 | 3,330,511,893,637,107,700 | 28.42735 | 79 | 0.65379 | false |
keerts/home-assistant | tests/helpers/test_customize.py | 3 | 4270 | """Test the customize helper."""
import homeassistant.helpers.customize as customize
from voluptuous import MultipleInvalid
import pytest
class MockHass(object):
"""Mock object for HassAssistant."""
data = {}
class TestHelpersCustomize(object):
"""Test homeassistant.helpers.customize module."""
de... | apache-2.0 | 6,856,846,066,572,548,000 | 34.882353 | 78 | 0.532084 | false |
aviabrams/django-pagination | pagination/tests.py | 16 | 3645 | """
>>> from django.core.paginator import Paginator
>>> from pagination.templatetags.pagination_tags import paginate
>>> from django.template import Template, Context
>>> p = Paginator(range(15), 2)
>>> paginate({'paginator': p, 'page_obj': p.page(1)})['pages']
[1, 2, 3, 4, 5, 6, 7, 8]
>>> p = Paginator(range(17), 2)... | bsd-3-clause | 1,666,424,523,192,657,400 | 27.046154 | 108 | 0.620576 | false |
chongtianfeiyu/kbengine | kbe/res/scripts/common/Lib/distutils/fancy_getopt.py | 207 | 17784 | """distutils.fancy_getopt
Wrapper around the standard getopt module that provides the following
additional features:
* short and long options are tied together
* options have help strings, so fancy_getopt could potentially
create a complete usage summary
* options set attributes of a passed-in object
"""
im... | lgpl-3.0 | -8,709,474,470,864,944,000 | 37.914661 | 79 | 0.549651 | false |
ionelmc/virtualenv | virtualenv/_utils.py | 1 | 1837 | from __future__ import absolute_import, division, print_function
import os
import re
import shutil
import stat
def ensure_directory(directory, *args, **kwargs):
# Fail if the destination exists and it's not a directory
if not os.path.isdir(directory):
os.makedirs(directory, *args, **kwargs)
def cop... | mit | -1,442,255,240,079,679,200 | 33.660377 | 92 | 0.626565 | false |
MicroTrustRepos/microkernel | src/l4/pkg/python/contrib/Demo/tkinter/guido/brownian2.py | 42 | 1379 | # Brownian motion -- an example of a NON multi-threaded Tkinter program ;)
# By Michele Simoniato, inspired by brownian.py
from Tkinter import *
import random
import sys
WIDTH = 400
HEIGHT = 300
SIGMA = 10
BUZZ = 2
RADIUS = 2
LAMBDA = 10
FILL = 'red'
stop = 0 # Set when main loop exits... | gpl-2.0 | 6,497,966,437,834,898,000 | 24.072727 | 76 | 0.55765 | false |
tobegit3hub/deep_cnn | java_predict_client/src/main/proto/tensorflow/python/ops/resource_variable_ops.py | 2 | 7588 | # 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 | -5,983,940,182,806,885,000 | 38.727749 | 80 | 0.668424 | false |
noironetworks/nova | nova/context.py | 12 | 10174 | # Copyright 2011 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | apache-2.0 | -3,871,836,072,351,851,000 | 36.681481 | 78 | 0.613132 | false |
wan-qy/shadowsocks | shadowsocks/manager.py | 925 | 9692 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -1,314,065,050,526,549,000 | 32.888112 | 79 | 0.532088 | false |
edlabh/SickRage | lib/dateutil/rrule.py | 17 | 58639 | # -*- coding: utf-8 -*-
"""
The rrule module offers a small, complete, and very fast, implementation of
the recurrence rules documented in the
`iCalendar RFC <http://www.ietf.org/rfc/rfc2445.txt>`_,
including support for caching of results.
"""
import itertools
import datetime
import calendar
import sys
try:
from ... | gpl-3.0 | 4,610,671,432,035,318,300 | 37.30111 | 80 | 0.48362 | false |
thinkle/gourmet | gourmet/recipeIdentifier.py | 1 | 9681 | """recipeIdentifier.py
This module contains code for creating hashes to identify recipes
based on title & instructions (recipe hash) or based on ingredients (ingredient hash).
The hash_recipe function is a convenience function that provide both a
recipe hash and an ingredient hash.
For individual hashes, use the get... | gpl-2.0 | 4,834,649,529,056,380,000 | 31.816949 | 88 | 0.542299 | false |
axinging/chromium-crosswalk | native_client_sdk/src/build_tools/tests/sdktools_config_test.py | 160 | 1609 | #!/usr/bin/env python
# Copyright (c) 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 sys
import os
import unittest
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
BUILD_TOOLS_DIR = os.path.dirname(SCRI... | bsd-3-clause | 3,615,259,146,828,795,400 | 29.358491 | 72 | 0.663766 | false |
wwj718/edx-platform | lms/djangoapps/rss_proxy/tests/test_views.py | 42 | 2777 | """
Tests for the rss_proxy views
"""
from django.test import TestCase
from django.core.urlresolvers import reverse
from mock import patch, Mock
from rss_proxy.models import WhitelistedRssUrl
class RssProxyViewTests(TestCase):
""" Tests for the rss_proxy views """
def setUp(self):
super(RssProxyViewT... | agpl-3.0 | 8,892,047,593,040,685,000 | 39.246377 | 100 | 0.591286 | false |
timabell/gpodder | src/gpodder/gtkui/frmntl/preferences.py | 1 | 9136 | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2010 Thomas Perl and the gPodder Team
#
# gPodder 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... | gpl-3.0 | 5,288,416,856,510,866,000 | 42.504762 | 105 | 0.652474 | false |
so0k/zulip | zerver/lib/bugdown/codehilite.py | 116 | 8441 | """
CodeHilite Extension for Python-Markdown
========================================
Adds code/syntax highlighting to standard Python-Markdown code blocks.
Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/).
Project website: <http://packages.python.org/Markdown/extensions/code_hilite.html>
Contact: markdo... | apache-2.0 | -6,059,354,472,642,462,000 | 36.515556 | 109 | 0.543301 | false |
Innovahn/odoo.old | addons/product_email_template/models/invoice.py | 321 | 1969 | # -*- coding: utf-8 -*-
from openerp.osv import osv
class account_invoice(osv.Model):
_inherit = 'account.invoice'
def invoice_validate_send_email(self, cr, uid, ids, context=None):
Composer = self.pool['mail.compose.message']
for invoice in self.browse(cr, uid, ids, context=context):
... | agpl-3.0 | -5,797,006,831,867,698,000 | 50.815789 | 124 | 0.574911 | false |
chirilo/remo | vendor-local/lib/python/unidecode/x09f.py | 252 | 4509 | data = (
'Cu ', # 0x00
'Qu ', # 0x01
'Chao ', # 0x02
'Wa ', # 0x03
'Zhu ', # 0x04
'Zhi ', # 0x05
'Mang ', # 0x06
'Ao ', # 0x07
'Bie ', # 0x08
'Tuo ', # 0x09
'Bi ', # 0x0a
'Yuan ', # 0x0b
'Chao ', # 0x0c
'Tuo ', # 0x0d
'Ding ', # 0x0e
'Mi ', # 0x0f
'Nai ', # 0x10
'Ding ... | bsd-3-clause | -4,325,587,720,433,184,000 | 16.544747 | 19 | 0.336882 | false |
mahak/ansible | lib/ansible/cli/galaxy.py | 14 | 80269 | # Copyright: (c) 2013, James Cammarata <jcammarata@ansible.com>
# Copyright: (c) 2018-2021, 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
import json
import os.path
im... | gpl-3.0 | -5,180,386,658,006,772,000 | 47.20961 | 159 | 0.570855 | false |
Godiyos/python-for-android | python-modules/twisted/twisted/protocols/finger.py | 81 | 1246 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""The Finger User Information Protocol (RFC 1288)"""
from twisted.protocols import basic
import string
class Finger(basic.LineReceiver):
def lineReceived(self, line):
parts = string.split(line)
if not parts:
... | apache-2.0 | -8,023,578,760,089,667,000 | 27.976744 | 63 | 0.589085 | false |
jackwluo/py-quantmod | quantmod/datetools.py | 1 | 1489 | """Date and time functions
Refactored from Cufflinks' 'date_tools.py' module.
Credits to @jorgesantos.
"""
import datetime as dt
def get_date_from_today(delta, strfmt='%Y%m%d'):
""" Returns a string that represents a date n numbers of days from today.
Parameters
----------
delta : int
... | mit | -1,619,314,460,330,183,400 | 20.897059 | 77 | 0.580255 | false |
nvmd/bitcoin | qa/rpc-tests/getchaintips.py | 140 | 2130 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, and joi... | mit | 3,252,332,489,388,432,400 | 35.101695 | 70 | 0.626291 | false |
theflofly/tensorflow | tensorflow/contrib/gan/python/losses/__init__.py | 56 | 1385 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 | -7,753,639,152,960,867,000 | 38.571429 | 80 | 0.73213 | false |
jsteemann/arangodb | 3rdParty/V8-4.3.61/build/gyp/test/sibling/gyptest-relocate.py | 137 | 1170 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('build/all.gyp', chdir='src')
test.relocate('src', 'relocate/src')
test.bu... | apache-2.0 | 721,318,303,049,715,800 | 27.536585 | 76 | 0.651282 | false |
justinpotts/mozillians | vendor-local/lib/python/tablib/formats/_yaml.py | 6 | 1252 | # -*- coding: utf-8 -*-
""" Tablib - YAML Support.
"""
import sys
try:
import yaml
except ImportError:
if sys.version_info[0] > 2:
import tablib.packages.yaml3 as yaml
else:
import tablib.packages.yaml as yaml
import tablib
title = 'yaml'
extentions = ('yaml', 'yml')
def export_se... | bsd-3-clause | -2,351,321,212,631,741,000 | 18.578125 | 53 | 0.616613 | false |
fitoria/askbot-devel | askbot/deps/django_authopenid/mimeparse.py | 23 | 7745 | """MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of
the HTTP specification [RFC 2616] for a complete explaination.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
Contents:
- par... | gpl-3.0 | 8,828,464,640,240,794,000 | 47.4125 | 130 | 0.612912 | false |
sajadkk/odoo-addons | portal_procurement/portal_procurement.py | 1 | 3701 | # -*- coding: utf-8 -*-
from openerp import SUPERUSER_ID
from openerp.osv import osv, fields
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
class ProcurementOrder(osv.Model):
_inherit = "procurement.order"
def create(self, cr, user, vals, context=None):
if contex... | agpl-3.0 | -899,563,443,435,445,500 | 49.013514 | 215 | 0.592272 | false |
Ghostkeeper/Luna | luna/stream.py | 1 | 2727 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | cc0-1.0 | -7,000,462,801,048,054,000 | 33.974359 | 227 | 0.722772 | false |
wangyum/tensorflow | tensorflow/contrib/session_bundle/gc.py | 47 | 6397 | # 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,593,996,059,534,440,400 | 29.317536 | 80 | 0.663436 | false |
cfossace/test | crits/samples/handlers.py | 1 | 60996 | import copy
import json
import logging
import os
import pprint
import subprocess
import tempfile, shutil
import time
from bson.objectid import ObjectId
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.shortcuts import render_to_respons... | mit | -5,334,741,137,088,089,000 | 37.826225 | 178 | 0.56466 | false |
JurassicWordExcel/core | wizards/com/sun/star/wizards/fax/CallWizard.py | 4 | 3060 | #
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license noti... | mpl-2.0 | 5,443,305,422,838,540,000 | 39.8 | 85 | 0.65915 | 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.