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 |
|---|---|---|---|---|---|---|---|---|---|---|
abhikumar22/MYBLOG | blg/Lib/site-packages/social_core/backends/base.py | 1 | 10025 | import time
from requests import request, ConnectionError
from ..utils import SSLHttpAdapter, module_member, parse_qs, user_agent
from ..exceptions import AuthFailed
class BaseAuth(object):
"""A authentication backend that authenticates the user based on
the provider response"""
name = '' # provider na... | gpl-3.0 | -677,159,543,657,564,700 | 39.587045 | 89 | 0.587731 | false |
Reflexe/doc_to_pdf | Windows/program/python-core-3.5.0/lib/crypt.py | 104 | 1879 | """Wrapper to the POSIX crypt library call and associated functionality."""
import _crypt
import string as _string
from random import SystemRandom as _SystemRandom
from collections import namedtuple as _namedtuple
_saltchars = _string.ascii_letters + _string.digits + './'
_sr = _SystemRandom()
class _Method(_named... | mpl-2.0 | -7,258,003,073,911,361,000 | 29.306452 | 79 | 0.666844 | false |
brisad/grec | setup.py | 1 | 2031 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
from setuptools.command.test import test as TestCommand
class Tox(TestCommand):
user_options = [('tox-args=', 'a', 'Arguments to pass to tox')]
def initial... | gpl-3.0 | 6,247,863,193,786,951,000 | 25.723684 | 75 | 0.606598 | false |
resmo/ansible | test/units/module_utils/common/parameters/test_list_no_log_values.py | 22 | 1187 | # -*- coding: utf-8 -*-
# Copyright (c) 2019 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 pytest
from ansible.module_utils.common.parameters import list_no_log_... | gpl-3.0 | -5,025,738,247,655,301,000 | 27.95122 | 92 | 0.601516 | false |
Exa-Networks/exaproxy | lib/exaproxy/icap/parser.py | 1 | 5875 | #!/usr/bin/env python
# encoding: utf-8
from .request import ICAPRequestFactory
from .response import ICAPResponseFactory
from .header import ICAPResponseHeaderFactory
class ICAPParser (object):
ICAPResponseHeaderFactory = ICAPResponseHeaderFactory
ICAPRequestFactory = ICAPRequestFactory
ICAPResponseFactory = ICAPR... | bsd-2-clause | -1,654,896,000,895,622,000 | 30.417112 | 148 | 0.69566 | false |
alvaroaleman/ansible | lib/ansible/modules/network/nxos/nxos_ntp_auth.py | 12 | 17744 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | -4,630,164,256,637,387,000 | 30.020979 | 88 | 0.585606 | false |
hi2srihari/crab | scikits/crab/metrics/sampling.py | 10 | 3357 | """Utilities for sampling techniques"""
# Author: Marcel Caraciolo <marcel@muricoca.com>
# License: BSD Style.
import numpy as np
from ..utils import check_random_state
from math import ceil
class SplitSampling(object):
""" Random Split Sampling the dataset into two sets.
Parameters
----------
n : ... | bsd-3-clause | -5,166,204,451,373,372,000 | 34.712766 | 78 | 0.60709 | false |
valmynd/MediaFetcher | src/plugins/youtube_dl/youtube_dl/extractor/twitter.py | 1 | 18792 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_urlparse
from ..utils import (
determine_ext,
dict_get,
ExtractorError,
float_or_none,
int_or_none,
remove_end,
try_get,
xpath_text,
)
from .periscope import PeriscopeIE
class Twi... | gpl-3.0 | 4,302,065,616,401,205,000 | 32.205725 | 207 | 0.635061 | false |
Lujeni/ansible | lib/ansible/modules/cloud/cloudstack/cs_network_acl_rule.py | 13 | 14343 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, René Moser <mail@renemoser.net>
# 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': '... | gpl-3.0 | -5,489,008,725,255,440,000 | 30.10846 | 118 | 0.616136 | false |
ApuliaSoftware/odoo | addons/account/wizard/account_move_line_unreconcile_select.py | 385 | 1864 | # -*- 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,393,558,162,073,278,000 | 42.348837 | 124 | 0.582082 | false |
Fusion-Rom/android_external_chromium_org | tools/telemetry/telemetry/core/backends/chrome/inspector_console.py | 27 | 1896 | # 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.
class InspectorConsole(object):
def __init__(self, inspector_backend):
self._inspector_backend = inspector_backend
self._inspector_backend.Registe... | bsd-3-clause | 5,397,747,633,040,719,000 | 31.135593 | 72 | 0.640823 | false |
vabs22/zulip | zerver/migrations/0053_emailchangestatus.py | 19 | 1109 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-23 05:37
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('zerver', '0052_auto_fix_re... | apache-2.0 | -2,320,656,404,644,722,700 | 37.241379 | 126 | 0.61587 | false |
junmin-zhu/chromium-rivertrail | chrome/test/pyautolib/chromeos/suid_actions.py | 70 | 5373 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Helper script to perform actions as a super-user on ChromeOS.
Needs to be run with superuser privileges, typically using the
su... | bsd-3-clause | 9,137,824,891,599,362,000 | 34.117647 | 79 | 0.65643 | false |
liangxia/origin | vendor/k8s.io/kubernetes/hack/boilerplate/boilerplate_test.py | 629 | 1362 | #!/usr/bin/env python
# Copyright 2016 The Kubernetes Authors.
#
# 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 | 8,347,876,149,462,143,000 | 25.192308 | 74 | 0.685022 | false |
pascalchevrel/bedrock | bedrock/pocketfeed/api.py | 4 | 1683 | import datetime
import re
import requests
from sentry_sdk import capture_exception
from django.conf import settings
from django.utils.timezone import make_aware, utc
def get_articles_data(count=8):
payload = {
'consumer_key': settings.POCKET_CONSUMER_KEY,
'access_token': settings.POCKET_ACCESS_T... | mpl-2.0 | -536,857,982,937,449,200 | 28.526316 | 110 | 0.633393 | false |
philanthropy-u/edx-platform | openedx/core/djangoapps/embargo/test_utils.py | 13 | 2864 | """Utilities for writing unit tests that involve course embargos. """
import contextlib
import mock
from django.core.cache import cache
from django.urls import reverse
import pygeoip
from .models import Country, CountryAccessRule, RestrictedCourse
@contextlib.contextmanager
def restrict_course(course_key, access_p... | agpl-3.0 | 3,371,867,869,505,580,000 | 33.095238 | 93 | 0.656425 | false |
jswope00/GAI | lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py | 53 | 6710 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'SoftwareSecurePhotoVerification.window'
db.add_column('verify_student_softwaresecurephotover... | agpl-3.0 | 6,167,705,835,153,198,000 | 75.261364 | 194 | 0.572429 | false |
musically-ut/statsmodels | statsmodels/graphics/tests/test_regressionplots.py | 20 | 9978 | import numpy as np
import statsmodels.api as sm
from numpy.testing import dec
from statsmodels.graphics.regressionplots import (plot_fit, plot_ccpr,
plot_partregress, plot_regress_exog, abline_plot,
plot_partregress_grid, plot_ccpr_grid, add_lowess,
plot_added_vari... | bsd-3-clause | -1,023,910,245,204,352,100 | 32.149502 | 86 | 0.511826 | false |
HyperBaton/ansible | lib/ansible/modules/network/onyx/onyx_ospf.py | 21 | 8189 | #!/usr/bin/python
#
# Copyright: 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',
'status': ['preview'],
... | gpl-3.0 | 1,230,194,085,279,071,000 | 33.407563 | 92 | 0.587007 | false |
vladikoff/fxa-mochitest | tests/mozbase/mozdevice/sut_tests/dmunit.py | 5 | 1720 | # 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/.
import types
import unittest
import mozlog
from mozdevice import devicemanager
from mozdevice import devicemanagerSUT
... | mpl-2.0 | -657,658,439,314,412,700 | 30.272727 | 71 | 0.640116 | false |
glyph/E-Max | epywrap.py | 1 | 13586 | # Copyright (C) 2012
# See LICENSE.txt for details.
"""
Epytext (and general Python docstring) wrapper
==============================================
Utility for wrapping docstrings in Python; specifically, docstrings in U{Epytext
<http://epydoc.sourceforge.net/manual-epytext.html>} format, or those that are
close en... | mit | 243,352,205,550,284,770 | 31.347619 | 85 | 0.568085 | false |
owlabs/incubator-airflow | tests/contrib/operators/test_dataflow_operator.py | 1 | 10028 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | -2,379,878,648,778,868,700 | 37.718147 | 89 | 0.64988 | false |
kasioumis/invenio | invenio/legacy/bibcirculation/utils.py | 13 | 30901 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License,... | gpl-2.0 | -7,628,996,201,829,646,000 | 31.424974 | 127 | 0.507686 | false |
pchavanne/yatt | tests/test_ticker.py | 1 | 5056 | import datetime
from yatt import BASE_CURRENCY
from yatt.ticker import aapl, agg, amzn, goog, msft, spy, eurusd, eurgbp, eurchf
from yatt.ticker import Ticker, Stock, Index, Future, Fx
from yatt.ticker import Tickers
timestamp = datetime.datetime(2000, 0o1, 0o1)
def test_ticker():
ticker = Ticker(symbol='AAPL',... | mit | -4,341,416,197,623,288,300 | 35.374101 | 136 | 0.664755 | false |
nightpool/CORE-Scouting-Server | views/commit.py | 2 | 2391 | from werkzeug import exceptions as ex
import simplejson as json
import flask
import wtforms_me
import wtforms.fields
import model.commit
import config
"""api used for submitting commits"""
blueprint = flask.Blueprint("commits", __name__, url_prefix="/commit")
MatchForm = wtforms_me.model_form(model.commit.MatchComm... | gpl-3.0 | 6,203,396,403,978,926,000 | 37.564516 | 103 | 0.651192 | false |
giavac/tadhack_paris_2015 | send_email.py | 1 | 4640 | #!/usr/bin/env python
import speech_recognition as sr
import sys
import smtplib
from os.path import basename
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
import subprocess
import s... | mit | 3,338,549,925,515,630,000 | 28.18239 | 116 | 0.649353 | false |
kuiwei/kuiwei | lms/djangoapps/instructor/tests/test_ecommerce.py | 12 | 15076 | """
Unit tests for Ecommerce feature flag in new instructor dashboard.
"""
from django.test.utils import override_settings
from django.core.urlresolvers import reverse
from courseware.tests.tests import TEST_DATA_MONGO_MODULESTORE
from student.tests.factories import AdminFactory
from xmodule.modulestore.tests.django_... | agpl-3.0 | -3,937,674,436,112,374,300 | 48.429508 | 153 | 0.658132 | false |
rail/treeherder | treeherder/autoclassify/management/commands/autoclassify.py | 2 | 2433 | import logging
from collections import defaultdict
from django.core.management.base import BaseCommand, CommandError
from treeherder.autoclassify import matchers
from treeherder.model.models import FailureLine, Matcher, FailureMatch
logger = logging.getLogger(__name__)
# The minimum goodness of match we need to mar... | mpl-2.0 | 8,161,660,184,938,220,000 | 31.44 | 85 | 0.660501 | false |
SummerLW/Perf-Insight-Report | telemetry/telemetry/internal/util/file_handle.py | 35 | 1976 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
_next_file_id = 0
class FileHandle(object):
def __init__(self, temp_file=None, absolute_path=None):
"""Constructs a FileHandle object.
... | bsd-3-clause | -6,093,322,646,984,613,000 | 26.068493 | 80 | 0.686235 | false |
amurzeau/streamlink-debian | src/streamlink/session.py | 2 | 19160 | import logging
import pkgutil
from collections import OrderedDict
from functools import lru_cache
from socket import AF_INET, AF_INET6
import requests
import requests.packages.urllib3.util.connection as urllib3_connection
from requests.packages.urllib3.util.connection import allowed_gai_family
from streamlink import ... | bsd-2-clause | 1,286,060,438,278,671,000 | 38.586777 | 104 | 0.516388 | false |
lvmgeo/GISPython | GISPython/PublisherHealper.py | 1 | 20261 | # -*- coding: utf-8 -*-
"""
Deployment publishing operations module
"""
import codecs
import os
import shutil
import hashlib
import datetime
import ZipHelper
import xmlParamsHealper
import JsonParamsHelper
class PublisherHealperConfig:
"""Class for setting up publisher Healper"""
moduleName = "" # name o... | gpl-3.0 | -2,723,904,783,419,873,000 | 42.292735 | 138 | 0.577958 | false |
Exgibichi/statusquo | test/functional/getblocktemplate_longpoll.py | 1 | 3120 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test longpolling with getblocktemplate."""
from test_framework.test_framework import StatusquoTestFram... | mit | 5,559,137,650,237,787,000 | 41.739726 | 112 | 0.664103 | false |
BirkbeckCTP/janeway | src/core/homepage_elements/carousel/plugin_settings.py | 1 | 2057 | from django.db.utils import OperationalError
from django.contrib.contenttypes.models import ContentType
PLUGIN_NAME = 'Carousel'
DESCRIPTION = 'This is a homepage element that renders a carousel.'
AUTHOR = 'Martin Paul Eve'
def install():
import core.models as core_models
import journal.models as journal_mod... | agpl-3.0 | -8,702,155,116,632,089,000 | 33.283333 | 86 | 0.633447 | false |
NeuralEnsemble/elephant | elephant/asset/asset.py | 2 | 102992 | # -*- coding: utf-8 -*-
"""
ASSET is a statistical method :cite:`asset-Torre16_e1004939` for the detection
of repeating sequences of synchronous spiking events in parallel spike trains.
ASSET analysis class object of finding patterns
-----------------------------------------------
.. autosummary::
:toctree: _toc... | bsd-3-clause | 1,215,215,558,205,362,000 | 38.949573 | 79 | 0.58162 | false |
3nids/QGIS | tests/src/python/test_qgsdelimitedtextprovider_wanted.py | 12 | 73024 | # -*- coding: utf-8 -*-
"""
***************************************************************************
test_qgsdelimitedtextprovider_wanted.py
---------------------
Date : May 2013
Copyright : (C) 2013 by Chris Crook
Email : ccrook at linz dot govt dot nz
... | gpl-2.0 | 6,256,318,146,744,454,000 | 27.205485 | 139 | 0.376342 | false |
kennedyshead/home-assistant | homeassistant/components/websocket_api/http.py | 2 | 8634 | """View to accept incoming websocket connection."""
from __future__ import annotations
import asyncio
from collections.abc import Callable
from contextlib import suppress
import datetime as dt
import logging
from typing import Any, Final
from aiohttp import WSMsgType, web
import async_timeout
from homeassistant.comp... | apache-2.0 | -8,793,060,592,120,405,000 | 32.858824 | 92 | 0.587098 | false |
prathik/thrift | lib/py/src/TSCons.py | 237 | 1267 | #
# 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,181,457,289,920,411,000 | 35.2 | 64 | 0.724546 | false |
ShakedY/ai-project | py2.5/lib/python2.5/curses/wrapper.py | 19 | 1650 | """curses.wrapper
Contains one function, wrapper(), which runs another function which
should be the rest of your curses-based application. If the
application raises an exception, wrapper() will restore the terminal
to a sane state so you can read the resulting traceback.
"""
import sys, curses
def wrapper(func, *a... | gpl-3.0 | -798,320,571,777,117,700 | 32 | 75 | 0.653333 | false |
pbenner/adaptive-sampling | adaptive_sampling/policy.py | 1 | 7380 | #! /usr/bin/env python
# Copyright (C) 2012 Philipp Benner
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
# This program is distrib... | gpl-2.0 | -8,745,588,336,565,216,000 | 35.35468 | 114 | 0.564228 | false |
mglukhikh/intellij-community | python/lib/Lib/distutils/bcppcompiler.py | 85 | 15086 | """distutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""
# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.
# XXX looks like there's a L... | apache-2.0 | 6,596,594,083,285,174,000 | 36.904523 | 80 | 0.529962 | false |
nttks/edx-platform | lms/djangoapps/course_wiki/tests/test_tab.py | 158 | 2454 | """
Tests for wiki views.
"""
from django.conf import settings
from django.test.client import RequestFactory
from courseware.tabs import get_course_tab_list
from student.tests.factories import AdminFactory, UserFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tes... | agpl-3.0 | -8,002,586,178,862,367,000 | 36.753846 | 77 | 0.664629 | false |
salguarnieri/intellij-community | plugins/hg4idea/testData/bin/mercurial/keepalive.py | 91 | 25918 | # 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 library is distributed in the hope that it w... | apache-2.0 | -7,124,741,989,817,662,000 | 33.057819 | 80 | 0.57134 | false |
sincerefly/getEastmoneyReport | guping_new/statistics/sta-3.py | 1 | 2384 | #!/bin/env python
#encoding:utf-8
from pymongo import MongoClient
import datetime
# Settings
mongopath = "localhost" # 数据库地址
startDate = "20150104" # 检索数据开始日期
endDate = "20150529" # 检索数据结束日期
#endDate = "20150227" # 检索数据结束日期(三个月预留)
nowDate = datetime.datetime.now().strftime("%Y%m%d") # 当前日期
# Functions
def isN... | mit | -637,123,934,862,235,800 | 19.178571 | 77 | 0.537168 | false |
AutomatedTester/selenium | py/test/selenium/test_prompts.py | 65 | 2425 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -3,046,586,584,835,951,600 | 37.492063 | 116 | 0.669278 | false |
sbalde/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/factories.py | 16 | 21208 | """
Factories for use in tests of XBlocks.
"""
import functools
import inspect
import pprint
import pymongo.message
import threading
import traceback
from collections import defaultdict
from decorator import contextmanager
from uuid import uuid4
from factory import Factory, Sequence, lazy_attribute_sequence, lazy_att... | agpl-3.0 | -6,414,569,919,637,659,000 | 35.755633 | 115 | 0.619436 | false |
XiaodunServerGroup/medicalmooc | common/lib/capa/capa/tests/__init__.py | 8 | 1737 | """Tools for helping with testing capa."""
import gettext
import os
import os.path
import fs.osfs
from capa.capa_problem import LoncapaProblem, LoncapaSystem
from mock import Mock, MagicMock
import xml.sax.saxutils as saxutils
TEST_DIR = os.path.dirname(os.path.realpath(__file__))
def tst_render_template(templat... | agpl-3.0 | -1,424,710,685,869,028,600 | 29.473684 | 135 | 0.678181 | false |
zsulocal/pycoin | pycoin/tx/script/check_signature.py | 1 | 11210 | # -*- coding: utf-8 -*-
"""
Parse, stream, create, sign and verify Bitcoin transactions as Tx structures.
The MIT License (MIT)
Copyright (c) 2015 by Richard Kiss
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... | mit | 461,443,307,147,393,300 | 39.469314 | 107 | 0.656467 | false |
mattilyra/scikit-learn | sklearn/cluster/affinity_propagation_.py | 60 | 10688 | """Affinity Propagation clustering algorithm."""
# Author: Alexandre Gramfort alexandre.gramfort@inria.fr
# Gael Varoquaux gael.varoquaux@normalesup.org
# License: BSD 3 clause
import numpy as np
from ..base import BaseEstimator, ClusterMixin
from ..utils import as_float_array, check_array
from ..utils.valid... | bsd-3-clause | -3,684,058,154,956,254,700 | 31.987654 | 79 | 0.597773 | false |
badp/ganeti | test/py/cmdlib/testsupport/__init__.py | 2 | 1758 | #
#
# Copyright (C) 2013 Google 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | gpl-2.0 | 7,558,838,990,091,404,000 | 34.16 | 72 | 0.731513 | false |
OlexandrI/pyside | paste/lint.py | 1 | 15002 | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php
# Licensed to PSF under a Contributor Agreement
"""
Middlew... | lgpl-3.0 | 2,726,638,972,741,654,500 | 33.408257 | 125 | 0.618184 | false |
sadaf2605/django | tests/middleware/tests.py | 2 | 36708 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import gzip
import random
import re
from io import BytesIO
from unittest import skipIf
from django.conf import settings
from django.core import mail
from django.core.exceptions import PermissionDenied
from django.http import (
FileResponse, HttpReque... | bsd-3-clause | 3,331,574,900,177,422,000 | 43.982843 | 112 | 0.662208 | false |
4eek/edx-platform | lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py | 114 | 13795 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Invoice.is_valid'
db.add_column('shoppingcart_invoice', 'is_valid',
se... | agpl-3.0 | 4,610,229,696,991,596,500 | 78.739884 | 182 | 0.555636 | false |
abegong/textbadger | textbadger/tb_app/models.py | 1 | 17389 | #from django.db.models import Model, TextField
#from djangotoolbox.fields import ListField, EmbeddedModelField, DictField
from django.contrib.auth.models import User
from django.db import connections
from bson.objectid import ObjectId
from pymongo.errors import InvalidId
import csv, re, json, datetime, random
from col... | mit | 5,115,544,193,139,701,000 | 34.200405 | 171 | 0.56346 | false |
bitmazk/django-multilingual-survey | runtests.py | 1 | 1047 | #!/usr/bin/env python
"""
This script is used to run tests, create a coverage report and output the
statistics at the end of the tox run.
To run this script just execute ``tox``
"""
import re
from fabric.api import local, warn
from fabric.colors import green, red
if __name__ == '__main__':
local('flake8 --ignore... | mit | 4,390,687,281,653,750,000 | 39.269231 | 75 | 0.640879 | false |
alfa-addon/addon | plugin.video.alfa/channels/blogdepelis.py | 1 | 6801 | # -*- coding: utf-8 -*-
# -*- Channel Blog de Pelis -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
from builtins import range
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
import re
from channelselector import get_thumb
f... | gpl-3.0 | 1,226,805,095,926,423,000 | 27.301724 | 118 | 0.590174 | false |
amb/blender-texture-tools | __init__.py | 1 | 55839 | # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-2.0 | 4,774,572,535,130,893,000 | 31.500582 | 100 | 0.534852 | false |
MacGyverNL/alot | setup.py | 1 | 1650 | #!/usr/bin/env python3
from setuptools import setup, find_packages
import alot
setup(
name='alot',
version=alot.__version__,
description=alot.__description__,
author=alot.__author__,
author_email=alot.__author_email__,
url=alot.__url__,
license=alot.__copyright__,
classifiers=[
... | gpl-3.0 | -1,418,785,842,951,232,000 | 27.448276 | 66 | 0.527273 | false |
plowman/python-mcparseface | models/syntaxnet/tensorflow/tensorflow/contrib/ffmpeg/encode_audio_op_test.py | 6 | 1742 | # Copyright 2016 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 a... | apache-2.0 | 1,357,190,431,181,552,600 | 33.84 | 79 | 0.679104 | false |
jalanb/dotjab | src/python/y.py | 2 | 1435 | """y not?"""
import os
import argv
argv.add_options([
('delete', 'delete python compiled files as well', False),
('wipe', 'remove known garbage', False),
('stat', 'run svn stat', False),
('tags', 'refresh the tags file', True),
('verbose', 'run ptags verbosely', False),
])
from ls import ly
fr... | mit | -3,757,691,127,534,682,000 | 21.421875 | 76 | 0.544948 | false |
ArnossArnossi/django | tests/template_tests/test_context.py | 166 | 5389 | # -*- coding: utf-8 -*-
from django.http import HttpRequest
from django.template import (
Context, Engine, RequestContext, Template, Variable, VariableDoesNotExist,
)
from django.template.context import RenderContext
from django.test import RequestFactory, SimpleTestCase
class ContextTests(SimpleTestCase):
... | bsd-3-clause | 4,328,593,847,120,427,000 | 29.446328 | 94 | 0.547597 | false |
waseem18/oh-mainline | mysite/project/tasks/__init__.py | 15 | 1736 | # This file is part of OpenHatch.
# Copyright (C) 2010 Parker Phinney
# Copyright (C) 2010 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Licens... | agpl-3.0 | -756,724,364,706,574,200 | 47.222222 | 109 | 0.706221 | false |
kei-yamazaki/jenkins-job-builder | jenkins_jobs/modules/wrappers.py | 1 | 54570 | # 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 | 8,760,421,605,870,689,000 | 37.241065 | 109 | 0.617464 | false |
xubenben/scikit-learn | sklearn/linear_model/ridge.py | 25 | 39394 | """
Ridge regression
"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com>
# Fabian Pedregosa <fabian@fseoane.net>
# Michael Eickenberg <michael.eickenberg@nsup.org>
# License: BSD 3 clause
from abc import ABCMeta, abstractmethod
impor... | bsd-3-clause | 9,062,958,117,623,075,000 | 35.108158 | 80 | 0.587805 | false |
clobrano/personfinder | app/unidecode/x070.py | 252 | 4693 | data = (
'You ', # 0x00
'Yang ', # 0x01
'Lu ', # 0x02
'Si ', # 0x03
'Jie ', # 0x04
'Ying ', # 0x05
'Du ', # 0x06
'Wang ', # 0x07
'Hui ', # 0x08
'Xie ', # 0x09
'Pan ', # 0x0a
'Shen ', # 0x0b
'Biao ', # 0x0c
'Chan ', # 0x0d
'Mo ', # 0x0e
'Liu ', # 0x0f
'Jian ', # 0x10
'P... | apache-2.0 | -2,989,366,622,680,537,600 | 17.189922 | 20 | 0.393352 | false |
Elbagoury/odoo | addons/event/event.py | 56 | 19486 | # -*- 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 | -7,462,281,954,116,029,000 | 46.296117 | 260 | 0.629785 | false |
sternshus/Arelle | setup.py | 1 | 17326 | """
Created on Jan 30, 2011
@author: Mark V Systems Limited
(c) Copyright 2011 Mark V Systems Limited, All rights reserved.
"""
import sys
import os
import datetime
from distutils.command.build_py import build_py as _build_py
def get_version():
"""
Utility function to return the current version of the librar... | apache-2.0 | 1,700,768,734,461,344,300 | 37.760626 | 185 | 0.592289 | false |
jordanemedlock/psychtruths | temboo/core/Library/SendGrid/NewsletterAPI/Newsletter/EditNewsletter.py | 5 | 5093 | # -*- coding: utf-8 -*-
###############################################################################
#
# EditNewsletter
# Edit an existing newsletter.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exc... | apache-2.0 | -3,864,190,180,864,355,000 | 40.406504 | 179 | 0.666405 | false |
xiaotdl/ansible | lib/ansible/template/template.py | 267 | 1397 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 | 8,045,062,527,080,849,000 | 36.756757 | 104 | 0.739442 | false |
maelnor/nova | nova/api/openstack/compute/plugins/v3/floating_ip_pools.py | 5 | 2145 | # Copyright (c) 2011 X.commerce, a business unit of eBay 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 req... | apache-2.0 | 1,603,399,602,010,664,400 | 30.544118 | 78 | 0.655478 | false |
Maple1401/awesome-python-webapp | www/markdown2.py | 27 | 92765 | #!/usr/bin/env python
# Copyright (c) 2012 Trent Mick.
# Copyright (c) 2007-2008 ActiveState Corp.
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
from __future__ import generators
r"""A fast and complete Python implementation of Markdown.
[from http://daringfireball.net/projects/markdown/]
> Mar... | gpl-2.0 | 8,272,548,722,294,440,000 | 39.036685 | 121 | 0.501525 | false |
BrianGladman/pthreads | build.vs/build_tests/_msvccompiler.py | 1 | 22500 | """
----------------------------------------------------------------------------
Copyright © 2001-2020 Python Software Foundation; All Rights Reserved
This file is distributed under the terms of this license:
https://docs.python.org/3/license.html
-----------------------------------------------------------------... | apache-2.0 | -3,225,636,429,154,730,000 | 36.373754 | 155 | 0.557491 | false |
koobonil/Boss2D | Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_tensor_test.py | 54 | 9345 | # 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... | mit | 644,858,043,063,645,400 | 38.100418 | 82 | 0.661209 | false |
Tokyo-Buffalo/tokyosouth | env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py | 713 | 9596 | from __future__ import absolute_import
# The default socket timeout, used by httplib to indicate that no timeout was
# specified by the user
from socket import _GLOBAL_DEFAULT_TIMEOUT
import time
from ..exceptions import TimeoutStateError
# A sentinel value to indicate that no timeout was specified by the user in
# u... | mit | 532,520,070,062,713,150 | 38.652893 | 82 | 0.63516 | false |
duhzecca/cinder | cinder/volume/drivers/vmware/volumeops.py | 7 | 68492 | # Copyright (c) 2013 VMware, 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... | apache-2.0 | 7,172,195,736,493,397,000 | 42.653282 | 79 | 0.567891 | false |
dirn/Simon | tests/test_query.py | 1 | 14495 | try:
import unittest2 as unittest
except ImportError:
import unittest
import collections
try:
from unittest import mock
except ImportError:
import mock
from pymongo.cursor import Cursor
from simon import connection, query
from simon._compat import range
from .utils import AN_OBJECT_ID, ModelFactory... | bsd-3-clause | -364,584,956,808,677,700 | 29.197917 | 79 | 0.556192 | false |
sharad/calibre | src/calibre/utils/config_base.py | 1 | 19477 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os, re, cPickle, traceback
from functools import partial
from collections import defaultdict
from copy import deepco... | gpl-3.0 | -2,838,697,234,434,908,700 | 37.72167 | 121 | 0.573497 | false |
Lawrence-Liu/scikit-learn | examples/cluster/plot_segmentation_toy.py | 258 | 3336 | """
===========================================
Spectral clustering for image segmentation
===========================================
In this example, an image with connected circles is generated and
spectral clustering is used to separate the circles.
In these settings, the :ref:`spectral_clustering` approach solve... | bsd-3-clause | 2,322,426,478,103,312,400 | 33.040816 | 79 | 0.653777 | false |
vlachoudis/sl4a | python/src/Lib/bsddb/db.py | 194 | 2730 | #----------------------------------------------------------------------
# Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA
# and Andrew Kuchling. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following c... | apache-2.0 | 9,187,898,677,825,794,000 | 44.5 | 77 | 0.677656 | false |
agentxan/nzbToMedia | libs/beets/plugins.py | 4 | 15698 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation t... | gpl-3.0 | -2,953,152,942,254,646,000 | 31.102249 | 79 | 0.612052 | false |
mulkieran/pyblk | tests/test_traversal.py | 1 | 4103 | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in th... | gpl-2.0 | -3,320,666,480,792,319,500 | 32.909091 | 79 | 0.63807 | false |
zaina/nova | nova/tests/unit/api/ec2/test_ec2utils.py | 84 | 2549 | # Copyright 2014 - 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 ag... | apache-2.0 | -389,551,313,306,299,900 | 40.786885 | 78 | 0.651628 | false |
thedemz/M101P | chapter2/hw2-2.py | 1 | 1698 | import sys
import os
file_path = os.path.abspath(__file__)
dir_path = os.path.dirname(file_path)
lib_path = os.path.join(dir_path, "lib")
sys.path.insert(0, lib_path)
import pymongo
# connnecto to the db on standard port
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.students ... | apache-2.0 | -5,790,267,279,438,200,000 | 19.962963 | 107 | 0.590106 | false |
chiffa/numpy | numpy/distutils/conv_template.py | 38 | 9684 | #!/usr/bin/python
"""
takes templated file .xxx.src and produces .xxx file where .xxx is
.i or .c or .h, using the following template rules
/**begin repeat -- on a line by itself marks the start of a repeated code
segment
/**end repeat**/ -- on a line by itself marks it's end
After the /**begin ... | bsd-3-clause | -2,417,040,942,528,632,000 | 27.735905 | 84 | 0.545539 | false |
spisneha25/django | tests/sitemaps_tests/test_https.py | 205 | 3608 | from __future__ import unicode_literals
from datetime import date
from django.test import ignore_warnings, override_settings
from django.utils.deprecation import RemovedInDjango110Warning
from .base import SitemapTestsBase
@override_settings(ROOT_URLCONF='sitemaps_tests.urls.https')
class HTTPSSitemapTests(Sitemap... | bsd-3-clause | 6,530,611,526,291,074,000 | 49.111111 | 109 | 0.703714 | false |
catapult-project/catapult | third_party/gsutil/third_party/pyu2f/pyu2f/tests/hardware_test.py | 7 | 7337 | # Copyright 2016 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 ag... | bsd-3-clause | 3,535,769,689,450,709,500 | 36.055556 | 79 | 0.702194 | false |
ASlave2Audio/Restaurant-App | mingw/bin/lib/xdrlib.py | 197 | 5563 | """Implements (a subset of) Sun XDR -- eXternal Data Representation.
See: RFC 1014
"""
import struct
try:
from cStringIO import StringIO as _StringIO
except ImportError:
from StringIO import StringIO as _StringIO
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
# exceptions
class Error(Exceptio... | mit | 4,179,870,690,447,247,000 | 23.082251 | 71 | 0.53712 | false |
dhhjx880713/GPy | GPy/likelihoods/mixed_noise.py | 7 | 3266 | # Copyright (c) 2012-2014 The GPy authors (see AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from scipy import stats, special
from . import link_functions
from .likelihood import Likelihood
from .gaussian import Gaussian
from ..core.parameterization import Param
from param... | bsd-3-clause | 8,159,442,841,256,426,000 | 38.829268 | 143 | 0.630435 | false |
sdgathman/cjdns | node_build/dependencies/libuv/build/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py | 54 | 1972 | #!/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.
"""
Verify that building an object file correctly depends on running actions in
dependent targets, but not the targets themselves.
"""
impo... | gpl-3.0 | -7,519,894,939,436,061,000 | 34.214286 | 80 | 0.712982 | false |
Distrotech/bzr | bzrlib/tests/test_reconcile.py | 2 | 2802 | # Copyright (C) 2006, 2008-2011 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is dist... | gpl-2.0 | 5,502,516,384,254,209,000 | 39.028571 | 78 | 0.717345 | false |
ryfx/modrana | modules/mod_cron.py | 1 | 13149 | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# A timing and scheduling module for modRana.
#----------------------------------------------------------------------------
# Copyright 2007, Oliver White
#
# This program is free software: you can redistribute it and/... | gpl-3.0 | -5,857,624,237,907,751,000 | 39.334356 | 120 | 0.605673 | false |
samueldotj/TeeRISC-Simulator | util/o3-pipeview.py | 58 | 15788 | #! /usr/bin/env python
# Copyright (c) 2011 ARM Limited
# All rights reserved
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementatio... | bsd-3-clause | 5,734,665,356,773,524,000 | 40.877984 | 109 | 0.585381 | false |
drewp/tahoe-lafs | setuptools-0.6c16dev3.egg/setuptools/command/develop.py | 7 | 5478 | from setuptools.command.easy_install import easy_install
from distutils.util import convert_path
from pkg_resources import Distribution, PathMetadata, normalize_path
from distutils import log
from distutils.errors import *
import sys, os, setuptools, glob
class develop(easy_install):
"""Set up package for developm... | gpl-2.0 | 6,660,655,729,136,031,000 | 32.2 | 83 | 0.599489 | false |
odoousers2014/LibrERP | account_financial_report_webkit/wizard/general_ledger_wizard.py | 2 | 6208 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier
# Copyright Camptocamp SA 2011
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 | 2,558,250,226,260,745,000 | 46.030303 | 131 | 0.534311 | false |
john-wang-metro/metro-openerp | metro_mrp/__openerp__.py | 2 | 2231 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can red... | agpl-3.0 | 7,604,554,904,541,281,000 | 34.412698 | 134 | 0.566114 | false |
thispc/download-manager | module/plugins/crypter/CryptCat.py | 8 | 1949 | # -*- coding: utf-8 -*-
import re
from ..internal.SimpleCrypter import SimpleCrypter
class CryptCat(SimpleCrypter):
__name__ = "CryptCat"
__type__ = "crypter"
__version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?crypt\.cat/\w+'
__config__ = [("activated", "bool", "... | gpl-3.0 | 6,248,309,538,033,200,000 | 30.95082 | 95 | 0.541303 | false |
simonmonk/squid | build/lib.linux-armv6l-2.7/squid.py | 1 | 1424 | #squid.py Library
import RPi.GPIO as GPIO
import time
WHITE = (30, 30, 30)
OFF = (0, 0, 0)
RED = (100, 0, 0)
GREEN = (0, 100, 0)
BLUE = (0, 0, 100)
YELLOW = (50, 50, 0)
PURPLE = (50, 0, 50)
CYAN = (0, 50, 50)
class Squid:
RED_PIN = 0
GREEN_PIN = 0
BLUE_PIN = 0
red_pwm = 0
green_pwm = 0
blu... | mit | 5,289,138,572,080,418,000 | 24.428571 | 82 | 0.571629 | false |
hyowon/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_mock.py | 496 | 5168 | #!/usr/bin/env python
#
# Copyright 2011, 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... | mpl-2.0 | 1,818,418,664,186,237,200 | 34.641379 | 77 | 0.642995 | false |
hlieberman/debian-ansible | docsite/build-site.py | 35 | 3249 | #!/usr/bin/env python
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of the Ansible Documentation
#
# 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 th... | gpl-3.0 | 3,547,201,197,303,134,000 | 30.543689 | 86 | 0.569406 | false |
Maximilian-Reuter/SickRage-1 | lib/twilio/rest/resources/pricing/voice.py | 35 | 4195 | from .. import NextGenInstanceResource, NextGenListResource
class Voice(object):
"""Holds references to the Voice pricing resources."""
name = "Voice"
key = "voice"
def __init__(self, base_uri, auth, timeout):
self.uri = "%s/Voice" % base_uri
self.countries = VoiceCountries(self.uri,... | gpl-3.0 | -8,683,439,944,656,884,000 | 31.022901 | 79 | 0.64267 | false |
taedori81/django-oscar | src/oscar/apps/address/migrations/0001_initial.py | 58 | 4480 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import oscar.models.fields
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = ... | bsd-3-clause | -5,734,636,698,089,433,000 | 62.098592 | 188 | 0.599554 | 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.