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 |
|---|---|---|---|---|---|---|---|---|---|---|
nuncjo/odoo | addons/auth_signup/__init__.py | 446 | 1039 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 2,409,536,188,513,523,000 | 42.291667 | 78 | 0.615977 | false |
ctb/cvxpy | doc/sphinxext/docscrape.py | 68 | 15425 | """Extract reference documentation from the NumPy source tree.
"""
import inspect
import textwrap
import re
import pydoc
from StringIO import StringIO
from warnings import warn
class Reader(object):
"""A line-based string reader.
"""
def __init__(self, data):
"""
Parameters
-----... | gpl-3.0 | -2,520,109,012,333,131,300 | 29.544554 | 80 | 0.475656 | false |
kidaa30/spacewalk | backend/server/rhnSQL/sql_row.py | 4 | 4930 | #
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 | -162,553,287,438,461,340 | 35.791045 | 87 | 0.596957 | false |
alexcuellar/odoo | addons/account_budget/account_budget.py | 194 | 9368 | # -*- 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 | 2,316,561,570,903,656,000 | 42.775701 | 210 | 0.579846 | false |
yogo1212/RIOT | tests/bench_runtime_coreapis/tests/01-run.py | 14 | 1439 | #!/usr/bin/env python3
# Copyright (C) 2018 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
from testrunner import run
# The default timeout is not enough for... | lgpl-2.1 | -8,241,191,474,528,647,000 | 41.294118 | 95 | 0.718359 | false |
topic2k/EventGhost | plugins/FS20PCS/__init__.py | 4 | 21740 | """<rst>
Allows to send commands to FS20 receivers.
|
|fS20Image|_
`Direct shop link <http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=27743>`__
.. |fS20Image| image:: picture.jpg
.. _fS20Image: http://www.elv.de/
"""
import time
eg.RegisterPlugin(
name = "ELV FS20 PCS",
author = "Bartman"... | gpl-2.0 | -4,539,095,718,050,212,000 | 43.917355 | 364 | 0.657498 | false |
neilLasrado/erpnext | erpnext/crm/doctype/investor/investor.py | 1 | 2929 | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
from frappe.contacts.address_and_contact import load_address_and_contact
from erpnext.accounts.party import validate_pa... | gpl-3.0 | -8,412,990,094,023,700,000 | 36.551282 | 110 | 0.71014 | false |
ThinkingBridge/platform_external_chromium_org | media/tools/constrained_network_server/cns.py | 168 | 17314 | #!/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.
"""Constrained Network Server. Serves files with supplied network constraints.
The CNS exposes a web based API allowing network co... | bsd-3-clause | 1,863,596,965,475,157,500 | 36.969298 | 80 | 0.662065 | false |
doismellburning/django | tests/signals/tests.py | 311 | 10273 | from __future__ import unicode_literals
from django.db import models
from django.db.models import signals
from django.dispatch import receiver
from django.test import TestCase
from django.utils import six
from .models import Author, Book, Car, Person
class BaseSignalTest(TestCase):
def setUp(self):
# Sa... | bsd-3-clause | -610,495,658,226,570,600 | 33.016556 | 86 | 0.53957 | false |
a-doumoulakis/tensorflow | tensorflow/contrib/opt/python/training/moving_average_optimizer.py | 84 | 5839 | # 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,233,560,233,608,460,000 | 38.721088 | 80 | 0.679911 | false |
nlu90/heron | heron/instance/tests/python/utils/topology_context_impl_unittest.py | 5 | 2275 | #!/usr/bin/env python
# -*- encoding: 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... | apache-2.0 | -8,836,224,120,763,604,000 | 34.546875 | 73 | 0.734066 | false |
nzavagli/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/reportlab-3.2.0/tests/test_platypus_wrapping.py | 14 | 3840 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
"""Tests for context-dependent indentation
"""
__version__='''$Id: test_platypus_indents.py 3660 2010-02-08 18:17:33Z damian $'''
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation
setOutDir(__name_... | mit | -4,638,309,570,354,209,000 | 36.647059 | 308 | 0.719792 | false |
ivanlmj/PyCaptive | app/modules/checksys.py | 1 | 2085 |
import socket
import subprocess as sp
import sys
from app import app
class Components():
def __init__(self):
self._binaries = (app.config['CHECKSYS_DICT']["IPTABLES"], app.config['CHECKSYS_DICT']["CONNTRACK"])
self._services = None
if app.config['TEST_MODE']:
self._services =... | gpl-3.0 | 8,282,093,403,946,885,000 | 35.578947 | 119 | 0.430695 | false |
emersonsoftware/ansiblefork | lib/ansible/utils/module_docs_fragments/openstack.py | 26 | 4023 | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | gpl-3.0 | 9,215,688,418,562,492,000 | 34.919643 | 80 | 0.705195 | false |
grupozeety/CDerpnext | erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py | 7 | 1698 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, ... | agpl-3.0 | 7,337,644,426,609,977,000 | 31.653846 | 101 | 0.716726 | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/LegacyWindowsExploits/Exploits/EAFU 2.2.0/EAFU_SSL.py | 1 | 1272 | import re, socket, string, sys
if __name__ == "__main__":
if len(sys.argv) < 3:
sys.exit(2)
target_address = (sys.argv[1])
target_port = int(sys.argv[2])
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target_address, target_port))
ssl_sock = socket.ssl(s)
# print the cert info
#pr... | unlicense | 2,908,487,244,535,040,500 | 28.604651 | 99 | 0.639937 | false |
rd37/horizon | horizon/conf/__init__.py | 77 | 2063 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -6,889,847,102,809,219,000 | 42.893617 | 81 | 0.688318 | false |
hassanabidpk/django | tests/gis_tests/test_geoip.py | 73 | 5275 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import unittest
import warnings
from unittest import skipUnless
from django.conf import settings
from django.contrib.gis.geoip import HAS_GEOIP
from django.contrib.gis.geos import HAS_GEOS, GEOSGeometry
from django.test import ignore_warnings
f... | bsd-3-clause | 7,794,955,658,760,493,000 | 39.561538 | 113 | 0.616158 | false |
amnet04/ALECMAPREADER1 | funcionesCV_recurrentes.py | 1 | 4438 | import numpy as np
import pandas
import cv2
def cargar_imagen(archivo):
'''
Carga en variables dos matrices de la imágen, una gris y otra a color,
devuelve un diccionario con las dos versiones.
'''
imagen = {}
imagen['gris'] = cv2.imread(archivo,0)
imagen['color'] = cv2.imread(archivo)
... | mit | -509,802,030,842,585,000 | 34.206349 | 98 | 0.591073 | false |
takluyver/readthedocs.org | readthedocs/restapi/views/footer_views.py | 6 | 4195 | from django.shortcuts import get_object_or_404
from django.template import Context, loader as template_loader
from django.conf import settings
from django.core.context_processors import csrf
from rest_framework import decorators, permissions
from rest_framework.renderers import JSONPRenderer, JSONRenderer, BrowsableAP... | mit | 5,000,815,453,148,028,000 | 38.205607 | 124 | 0.651728 | false |
pizzapanther/HoverMom | hovermom/django/db/transaction.py | 77 | 20601 | """
This module implements a transaction manager that can be used to define
transaction handling in a request or view function. It is used by transaction
control middleware and decorators.
The transaction manager can be in managed or in auto state. Auto state means the
system is using a commit-on-save strategy (actual... | mit | -1,195,857,419,622,866,700 | 37.079482 | 80 | 0.625649 | false |
oberlin/django | tests/migrations/test_base.py | 292 | 4620 | import os
import shutil
import tempfile
from contextlib import contextmanager
from importlib import import_module
from django.apps import apps
from django.db import connection
from django.db.migrations.recorder import MigrationRecorder
from django.test import TransactionTestCase
from django.test.utils import extend_sy... | bsd-3-clause | 1,587,216,098,701,959,400 | 37.5 | 110 | 0.641126 | false |
zerc/django | django/contrib/gis/gdal/raster/const.py | 238 | 1537 | """
GDAL - Constant definitions
"""
from ctypes import (
c_byte, c_double, c_float, c_int16, c_int32, c_uint16, c_uint32,
)
# See http://www.gdal.org/gdal_8h.html#a22e22ce0a55036a96f652765793fb7a4
GDAL_PIXEL_TYPES = {
0: 'GDT_Unknown', # Unknown or unspecified type
1: 'GDT_Byte', # Eight bit unsigned int... | bsd-3-clause | -349,536,835,688,983,040 | 33.155556 | 72 | 0.666233 | false |
tashigaofei/BlogSpider | scrapy/tests/test_downloadermiddleware_redirect.py | 15 | 9245 | import unittest
from scrapy.contrib.downloadermiddleware.redirect import RedirectMiddleware, MetaRefreshMiddleware
from scrapy.spider import Spider
from scrapy.exceptions import IgnoreRequest
from scrapy.http import Request, Response, HtmlResponse
from scrapy.utils.test import get_crawler
class RedirectMiddlewareTes... | mit | 185,456,331,411,753,120 | 44.318627 | 121 | 0.640671 | false |
writefaruq/lionface-app | django/contrib/gis/tests/test_spatialrefsys.py | 12 | 6799 | from django.db import connection
from django.contrib.gis.tests.utils import mysql, no_mysql, oracle, postgis, spatialite
from django.utils import unittest
test_srs = ({'srid' : 4326,
'auth_name' : ('EPSG', True),
'auth_srid' : 4326,
'srtext' : 'GEOGCS["WGS 84",DATUM["WGS... | bsd-3-clause | -7,731,432,972,394,027,000 | 58.168142 | 737 | 0.605236 | false |
valorekhov/AvrBee | src/AvrBee/HexFileFormat.py | 1 | 2846 | from abc import ABCMeta, abstractmethod
import struct
import binascii, os, sys
class HexFileFormat(object):
"""Parses out Hex File format into a byte stream"""
def __init__(self, path=None, file=None):
self.path = path
self.file = file
pass
def get_bytes(self):
with open(se... | unlicense | -8,157,248,079,459,672,000 | 32.093023 | 117 | 0.515109 | false |
NaturalSolutions/NsPortal | Back/ns_portal/resources/root/security/oauth2/v1/login/login_resource.py | 1 | 2467 | from ns_portal.core.resources import (
MetaEndPointResource
)
from marshmallow import (
Schema,
fields,
EXCLUDE,
ValidationError
)
from ns_portal.database.main_db import (
TUsers
)
from sqlalchemy import (
and_
)
from sqlalchemy.orm.exc import (
MultipleResultsFound
)
from pyramid.securi... | mit | -6,602,315,053,987,175,000 | 22.721154 | 64 | 0.495338 | false |
AustereCuriosity/astropy | astropy/wcs/tests/extension/test_extension.py | 1 | 2869 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import subprocess
import sys
import pytest
def test_wcsapi_extension(tmpdir):
# Test that we can build a simple C extension with the astropy.wcs C API
... | bsd-3-clause | 1,447,445,754,207,952,400 | 37.253333 | 82 | 0.646567 | false |
mlcommons/training | object_detection/pytorch/maskrcnn_benchmark/config/paths_catalog.py | 1 | 8463 | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 | -6,520,493,047,081,515,000 | 39.884058 | 121 | 0.583481 | false |
schreiberx/sweet | benchmarks_plane/nonlinear_interaction/pp_plot_errors_single.py | 2 | 2935 | #! /usr/bin/env python3
import sys
import matplotlib
matplotlib.use('Agg')
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from matplotlib.lines import Line2D
from mule.postprocessing.JobsData import *
from mule.postprocessing.JobsDataConsolidate import *
if len(sys.argv) > ... | mit | 1,448,827,930,040,319,200 | 17.814103 | 112 | 0.61908 | false |
SatoshiNXSimudrone/sl4a-damon-clone | python/src/Tools/pybench/With.py | 43 | 4137 | from __future__ import with_statement
from pybench import Test
class WithFinally(Test):
version = 2.0
operations = 20
rounds = 80000
class ContextManager(object):
def __enter__(self):
pass
def __exit__(self, exc, val, tb):
pass
def test(self):
cm ... | apache-2.0 | 2,657,609,480,484,924,000 | 20.773684 | 70 | 0.433164 | false |
francisco-dlp/hyperspy | hyperspy/samfire_utils/weights/red_chisq.py | 6 | 1212 | # -*- coding: utf-8 -*-
# Copyright 2007-2011 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | gpl-3.0 | 8,327,508,954,012,630,000 | 33.628571 | 70 | 0.698845 | false |
johnnykv/heralding | heralding/tests/test_pop3.py | 1 | 2904 | # Copyright (C) 2017 Johnny Vestergaard <jkv@unixcluster.dk>
#
# 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 p... | gpl-3.0 | 2,187,093,946,063,458,000 | 32 | 73 | 0.653926 | false |
unicri/edx-platform | lms/djangoapps/ccx/tests/test_utils.py | 6 | 22042 | """
test utils
"""
from nose.plugins.attrib import attr
from ccx.models import ( # pylint: disable=import-error
CcxMembership,
CcxFutureMembership,
)
from ccx.tests.factories import ( # pylint: disable=import-error
CcxFactory,
CcxMembershipFactory,
CcxFutureMembershipFactory,
)
from student.roles... | agpl-3.0 | -8,797,822,406,330,226,000 | 37.20104 | 95 | 0.630569 | false |
guewen/OpenUpgrade | addons/account/wizard/account_chart.py | 39 | 5159 | # -*- 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 | -9,189,987,383,739,027,000 | 46.293578 | 110 | 0.540834 | false |
PetrDlouhy/django | django/utils/module_loading.py | 30 | 6416 | import copy
import os
import sys
from importlib import import_module
from django.utils import six
def import_string(dotted_path):
"""
Import a dotted module path and return the attribute/class designated by the
last name in the path. Raise ImportError if the import failed.
"""
try:
module... | bsd-3-clause | 7,156,874,583,038,490,000 | 37.190476 | 82 | 0.539589 | false |
couchand/petard | vendor/cxxtest-4.3/test/test_doc.py | 54 | 1097 | #-------------------------------------------------------------------------
# CxxTest: A lightweight C++ unit testing library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the LGPL License v3
# For more information, see the COPYING file in the top CxxTest directory.
# Under the terms of ... | mit | -2,477,275,262,920,126,500 | 30.342857 | 88 | 0.626253 | false |
pdellaert/ansible | test/units/modules/network/fortios/test_fortios_application_name.py | 21 | 11085 | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 | 2,285,379,125,501,775,600 | 34.873786 | 142 | 0.57465 | false |
100star/h2o | py/testdir_release/sh2junit.py | 31 | 16028 | import sys, psutil, os, stat, tempfile, argparse, time, datetime
sys.path.extend(['.','..','../..','py'])
import h2o_sandbox
# Stripped down, similar to h2o.py has for these functions
# Possible to do this in bash, but the code becomes cryptic.
# You can execute this as sh2junit.py <bash command string>
# sh2junit ru... | apache-2.0 | 4,169,509,417,171,697,700 | 45.457971 | 196 | 0.594522 | false |
soumyanishan/azure-linux-extensions | OSPatching/azure/storage/storageclient.py | 51 | 5800 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apac... | apache-2.0 | 5,136,530,396,367,353,000 | 37.157895 | 78 | 0.604483 | false |
yatinkumbhare/openstack-nova | nova/tests/functional/v3/api_paste_fixture.py | 25 | 1543 | # Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -3,270,179,196,829,480,000 | 36.634146 | 75 | 0.645496 | false |
rbprogrammer/advanced_python_topics | course-material/py2/solutions/07 XML Processing/Ex7.1.py | 1 | 1036 | #!/usr/local/bin/python2
# Ex7.1.py Python 2 version
# Script to parse an XML file and enumerate tags
import sys
from xml.parsers import expat
# Allow user to provide a filename, or default to books.xml
filename = sys.argv[1] if sys.argv[1:] else 'books.xml'
Tags = 0
tags = {}
class ExpatError(Exception):
pass... | apache-2.0 | -2,609,655,144,962,733,600 | 21.521739 | 73 | 0.639961 | false |
marcellfischbach/CobaltSKY | Scripts/Blender/valkyrie/geometry.py | 1 | 1365 |
import valkyrie
import struct
class GeometryWriter:
GT_GeometryMesh = 0
GT_GeometryCollection = 1
GT_GeometryLOD = 2
DM_Internal = 0
DM_Exteral = 1
def __init__(self):
self.stream = []
self.material_map = {}
def write(self, multi_mesh):
self.stream += struct.pack('<I', GeometryWriter.GT_Geometry... | gpl-2.0 | -89,460,289,486,703,550 | 23.392857 | 83 | 0.649084 | false |
LIKAIMO/MissionPlanner | LogAnalyzer/tests/TestIMUMatch.py | 61 | 3781 | from LogAnalyzer import Test,TestResult
import DataflashLog
from math import sqrt
class TestIMUMatch(Test):
'''test for empty or near-empty logs'''
def __init__(self):
Test.__init__(self)
self.name = "IMU Mismatch"
def run(self, logdata, verbose):
#tuning parameters:
war... | gpl-3.0 | -4,354,047,947,307,644,000 | 35.009524 | 180 | 0.565988 | false |
lwahlmeier/python-threadly | threadly/Futures.py | 2 | 4445 | """
Futures tools for threadly
"""
import threading
import time
class ListenableFuture(object):
"""
This class i used to make a Future that can have listeners and callbacks
added to it. Once setter(object) is called all listeners/callbacks are
also called. Callbacks will be given the set object, an... | unlicense | 4,335,050,251,291,903,000 | 34.56 | 79 | 0.589876 | false |
ftrader-bitcoinabc/bitcoin-abc | test/functional/abc-finalize-block.py | 1 | 13578 | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the finalizeblock RPC calls."""
import time
from test_framework.test_framework import BitcoinTestFramework... | mit | -5,691,586,649,551,708,000 | 40.145455 | 105 | 0.523494 | false |
jcoady9/python-for-android | python-modules/twisted/twisted/words/protocols/jabber/jid.py | 54 | 7167 | # -*- test-case-name: twisted.words.test.test_jabberjid -*-
#
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Jabber Identifier support.
This module provides an object to represent Jabber Identifiers (JIDs) and
parse string representations into them with proper checking for illeg... | apache-2.0 | 569,233,239,388,996,000 | 27.783133 | 116 | 0.572345 | false |
HyperBaton/ansible | lib/ansible/plugins/doc_fragments/nxos.py | 44 | 5396 | # -*- coding: utf-8 -*-
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
options:
provider:
descriptio... | gpl-3.0 | -7,850,867,660,753,214,000 | 44.344538 | 154 | 0.645849 | false |
evensonbryan/yocto-autobuilder | lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/status/progress.py | 4 | 11969 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | -3,542,692,039,136,569,000 | 35.941358 | 79 | 0.601053 | false |
dxj19831029/keras | tests/manual/check_constraints.py | 86 | 2841 | from __future__ import absolute_import
from __future__ import print_function
import keras
from keras.datasets import mnist
import keras.models
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.regularizers import l2, l1
from keras.constraints import maxnorm, nonneg
... | mit | 2,906,159,712,180,073,500 | 27.42 | 100 | 0.734952 | false |
archesproject/arches | arches/app/models/migrations/0001_initial.py | 1 | 36390 | # -*- coding: utf-8 -*-
import os
import uuid
import codecs
import django.contrib.gis.db.models.fields
from django.core import management
from django.contrib.postgres.fields import JSONField
from django.db import migrations, models
from arches.db.migration_operations.extras import CreateExtension, CreateAutoPopulateU... | agpl-3.0 | 134,465,421,707,686,270 | 47.649733 | 182 | 0.553394 | false |
stuart-c/pgu | data/themes/default/generate.py | 28 | 3502 | import pygame
from pygame.locals import *
pygame.display.init()
pygame.display.set_mode((80,80),32)
def prep(name):
fname = name+".png"
img = pygame.image.load(fname)
w,h = img.get_width()/2,img.get_height()/2
out = pygame.Surface((w*3,h*3),SWSURFACE|SRCALPHA,32)
out.fill((0,0,0,0))
out.bl... | lgpl-2.1 | -5,766,512,715,269,177,000 | 34.734694 | 65 | 0.573101 | false |
eparis/contrib | hack/verify-flags-underscore.py | 34 | 8924 | #!/usr/bin/env python
# Copyright 2015 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 | 294,579,953,526,699,600 | 35.57377 | 184 | 0.589758 | false |
noelbk/neutron-juniper | neutron/agent/securitygroups_rpc.py | 8 | 8254 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012, Nachi Ueno, NTT MCL, 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://ww... | apache-2.0 | -6,769,385,185,486,068,000 | 37.570093 | 78 | 0.612673 | false |
linked67/p2pool-exclusivecoin | p2pool/bitcoin/height_tracker.py | 227 | 4678 | from twisted.internet import defer
from twisted.python import log
import p2pool
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral, forest, jsonrpc, variable
class HeaderWrapper(object):
__slots__ = 'hash previous_hash'.split(' ')
@classmethod
def from_header(cls, header... | gpl-3.0 | 6,235,291,453,202,136,000 | 40.39823 | 156 | 0.614793 | false |
benschulz/servo | tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_stash.py | 299 | 1231 | import os
import unittest
import urllib2
import json
import uuid
import wptserve
from wptserve.router import any_method
from base import TestUsingServer, doc_root
class TestResponseSetCookie(TestUsingServer):
def test_put_take(self):
@wptserve.handlers.handler
def handler(request, response):
... | mpl-2.0 | 3,471,317,136,863,814,700 | 30.564103 | 94 | 0.593014 | false |
Juniper/neutron | neutron/common/test_lib.py | 13 | 2136 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... | apache-2.0 | 2,423,776,612,022,261,000 | 47.545455 | 77 | 0.746255 | false |
cmbiwer/pycbc | pycbc/distributions/power_law.py | 6 | 9306 | # Copyright (C) 2016 Christopher M. Biwer
# 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 distribute... | gpl-3.0 | 169,296,715,332,956,930 | 34.792308 | 130 | 0.562433 | false |
iabdalkader/openmv | scripts/examples/16-Codes/find_barcodes.py | 3 | 2316 | # Barcode Example
#
# This example shows off how easy it is to detect bar codes using the
# OpenMV Cam M7. Barcode detection does not work on the M4 Camera.
import sensor, image, time, math
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.VGA) # High Res!
sensor.set_windowing((640, 80... | mit | -7,142,224,181,834,798,000 | 34.630769 | 121 | 0.631261 | false |
ramsateesh/designate | designate/objects/blacklist.py | 6 | 1438 | # Copyright (c) 2014 Rackspace Hosting
# 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 req... | apache-2.0 | 3,806,849,839,191,204,400 | 30.955556 | 78 | 0.59388 | false |
Distrotech/qemu | scripts/tracetool/transform.py | 78 | 4238 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Type-transformation rules.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnocz... | gpl-2.0 | -1,201,690,106,573,326,800 | 24.518072 | 106 | 0.54627 | false |
miqui/python-hpOneView | hpOneView/security.py | 2 | 5456 | # -*- coding: utf-8 -*-
"""
security.py
~~~~~~~~~~~~
This module implements Settings HP OneView REST API
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install... | mit | -6,956,537,522,747,369,000 | 33.314465 | 79 | 0.586327 | false |
duncanhawthorne/robot-robot | libs/future/backports/urllib/error.py | 81 | 2715 | """Exception classes raised by urllib.
The base exception class is URLError, which inherits from IOError. It
doesn't define any behavior of its own, but is the base class for all
exceptions defined in this package.
HTTPError is an exception class that is also a valid HTTP response
instance. It behaves this way beca... | mit | 2,623,764,460,675,288,000 | 35.2 | 76 | 0.682873 | false |
TiVoMaker/boto | boto/file/bucket.py | 153 | 4085 | # Copyright 2010 Google Inc.
# Copyright (c) 2011, Nexenta Systems Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use... | mit | 5,406,911,787,228,197,000 | 35.473214 | 81 | 0.640147 | false |
nickromano/django-slow-tests | _examples/django18/mysite/settings.py | 2 | 2798 | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths... | mit | -1,660,231,314,956,478,000 | 25.149533 | 71 | 0.694782 | false |
qgis/QGIS-Django | qgis-app/plugins/tests/HelloWorld/1.8-author-slashes-error/HelloWorld/HelloWorld.py | 20 | 1094 | # -*- coding: utf-8 -*-
# Import the PyQt and QGIS libraries
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
class HelloWorld:
def __init__(self, iface):
# Save reference to the QGIS interface
self.iface = iface
self.canvas = iface.mapCanvas()
def initGui... | gpl-2.0 | -8,981,936,775,292,599,000 | 26.35 | 168 | 0.652651 | false |
mxm/incubator-beam | sdks/python/apache_beam/runners/direct/direct_metrics_test.py | 7 | 9689 | #
# 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 us... | apache-2.0 | 2,083,599,663,281,380,000 | 44.488263 | 79 | 0.548457 | false |
ScoutAlarm/node-sodium-linux | node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py | 778 | 65880 | #!/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.
"""Unit tests for the MSVSSettings.py file."""
import StringIO
import unittest
import gyp.MSVSSettings as MSVSSettings
class TestSequence... | mit | -5,675,824,001,713,000,000 | 43.453441 | 81 | 0.555935 | false |
ppanczyk/ansible | lib/ansible/module_utils/avi.py | 20 | 3790 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 | 2,332,240,151,232,863,000 | 45.219512 | 103 | 0.727441 | false |
hesam-setareh/nest-simulator | pynest/nest/tests/test_connect_pairwise_bernoulli.py | 4 | 3399 | # -*- coding: utf-8 -*-
#
# test_connect_pairwise_bernoulli.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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-2.0 | 5,665,089,324,312,129,000 | 32.653465 | 79 | 0.61165 | false |
clubcapra/ngv_dev | CALIBRATION_0/camera_calibration/gui_cam_calibration.py | 1 | 6603 | from PySide.QtGui import *
import timeit
#import camera
import cv2
import os
import sys
import numpy as np
def generate_crop_indexes_3d(width, height, crop_width, crop_height):
idxs = []
for row in xrange(0, height, crop_height):
for col in xrange(0, width / crop_width):
indexes = []
... | gpl-3.0 | -6,782,487,259,623,150,000 | 29.013636 | 100 | 0.54551 | false |
jsxc/xmpp-cloud-auth | xclib/tests/30_isuser_stub_test.py | 1 | 2149 | # Checks whether the isuser() function works as it should
# Stubs the cloud_request() functions for these tests
from xclib.sigcloud import sigcloud
from xclib import xcauth
from xclib.check import assertEqual
def setup_module():
global xc, sc
xc = xcauth(domain_db={
b'xdomain': b'99999\thttps://rem... | mit | 8,073,058,404,470,537,000 | 28.438356 | 64 | 0.631922 | false |
agdsn/sipa | sipa.py | 2 | 1632 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
sipa.py
~~~~~~~~~~~~~~
This file shall be used to start the Flask app. Specific things are handled
in the `sipa` package.
"""
import argparse
import logging
from sipa import create_app
from sipa.utils import support_hotline_available
logger = loggi... | mit | -3,576,380,963,574,401,500 | 29.222222 | 79 | 0.626225 | false |
EliotBerriot/django | tests/postgres_tests/test_array.py | 89 | 19906 | import decimal
import json
import unittest
import uuid
from django import forms
from django.core import exceptions, serializers, validators
from django.core.management import call_command
from django.db import IntegrityError, connection, models
from django.test import TransactionTestCase, override_settings
from django... | bsd-3-clause | -3,580,162,065,559,395,300 | 36.91619 | 115 | 0.631719 | false |
MatthieuBizien/scikit-learn | sklearn/model_selection/__init__.py | 53 | 1587 | from ._split import BaseCrossValidator
from ._split import KFold
from ._split import LabelKFold
from ._split import StratifiedKFold
from ._split import LeaveOneLabelOut
from ._split import LeaveOneOut
from ._split import LeavePLabelOut
from ._split import LeavePOut
from ._split import ShuffleSplit
from ._split import L... | bsd-3-clause | -3,220,648,532,765,314,000 | 30.117647 | 47 | 0.666037 | false |
Ichag/odoo | openerp/tools/amount_to_text.py | 393 | 7719 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | 2,217,535,880,384,793,600 | 37.014778 | 121 | 0.52637 | false |
jonathanslenders/pyvim | pyvim/welcome_message.py | 1 | 1246 | """
The welcome message. This is displayed when the editor opens without any files.
"""
from __future__ import unicode_literals
from prompt_toolkit.formatted_text.utils import fragment_list_len
import prompt_toolkit
import pyvim
import platform
import sys
version = sys.version_info
pyvim_version = pyvim.__version__
_... | bsd-3-clause | 5,135,563,662,758,781,000 | 27.318182 | 86 | 0.58427 | false |
channing/gyp | test/ninja/action_dependencies/gyptest-action-dependencies.py | 246 | 1850 | #!/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... | bsd-3-clause | 4,075,630,267,932,572,700 | 33.90566 | 80 | 0.711351 | false |
kumar303/olympia | src/olympia/devhub/tests/test_forms.py | 2 | 35137 | # -*- coding: utf-8 -*-
import os
import shutil
import tempfile
from datetime import timedelta
from django.conf import settings
from django.core.files.storage import default_storage as storage
from django.utils import translation
import pytest
import six
from freezegun import freeze_time
from unittest import mock
fr... | bsd-3-clause | 7,490,874,804,458,575,000 | 41.531477 | 79 | 0.591016 | false |
Intel-tensorflow/tensorflow | tensorflow/python/tools/saved_model_utils_test.py | 6 | 5038 | # 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 | 7,437,827,679,493,981,000 | 42.059829 | 80 | 0.689956 | false |
infobloxopen/neutron | neutron/tests/unit/api/test_extensions.py | 11 | 33104 | # Copyright (c) 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | 3,567,949,105,156,518,400 | 40.122981 | 79 | 0.620892 | false |
ravibhure/ansible | lib/ansible/utils/module_docs_fragments/dellos9.py | 75 | 2591 | #
# (c) 2015, Peter Sprygada <psprygada@ansible.com>
#
# Copyright (c) 2016 Dell Inc.
#
# 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 Licens... | gpl-3.0 | -7,546,888,424,774,245,000 | 37.671642 | 132 | 0.678503 | false |
adedayo/intellij-community | python/lib/Lib/site-packages/django/contrib/messages/storage/cookie.py | 89 | 5873 | from django.conf import settings
from django.contrib.messages import constants
from django.contrib.messages.storage.base import BaseStorage, Message
from django.http import CompatCookie
from django.utils import simplejson as json
from django.utils.crypto import salted_hmac, constant_time_compare
class MessageEncoder(... | apache-2.0 | 5,716,911,495,833,867,000 | 38.153333 | 86 | 0.606164 | false |
rahul67/hue | desktop/core/ext-py/requests-2.6.0/requests/packages/urllib3/connection.py | 371 | 8967 | import datetime
import sys
import socket
from socket import timeout as SocketTimeout
import warnings
from .packages import six
try: # Python 3
from http.client import HTTPConnection as _HTTPConnection, HTTPException
except ImportError:
from httplib import HTTPConnection as _HTTPConnection, HTTPException
cla... | apache-2.0 | -2,531,924,569,686,760,400 | 33.225191 | 109 | 0.615256 | false |
ansible/ansible | lib/ansible/module_utils/facts/hardware/hpux.py | 159 | 8351 | # 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 in the hope that ... | gpl-3.0 | -1,512,912,057,212,967,700 | 49.612121 | 147 | 0.569632 | false |
carlosdiazsuarez/movierecommender | MovieRecommender/connectors/imdb/imdb_connector.py | 1 | 2413 | '''
Google Movie Showtimes parser class for Python.
This script provides a Python class that can be used to parse Google Movie
Showtimes (www.google.com/movies) pages into dictionary objects.
@author Vaidik Kapoor
@version 0.1
'''
import httplib, urllib, BeautifulSoup, re
from copy import deepcopy
from BeautifulSoup... | gpl-2.0 | 5,144,483,261,318,524,000 | 27.4 | 75 | 0.566515 | false |
guewen/OpenUpgrade | addons/crm_project_issue/project_issue.py | 380 | 2373 |
from openerp.osv import osv, fields
class crm_lead_to_project_issue_wizard(osv.TransientModel):
""" wizard to convert a Lead into a Project Issue and move the Mail Thread """
_name = "crm.lead2projectissue.wizard"
_inherit = 'crm.partner.binding'
_columns = {
"lead_id": fields.many2one("crm.... | agpl-3.0 | -7,116,647,927,106,207,000 | 39.220339 | 138 | 0.550358 | false |
gingerswede/ITSecCardGame | src/View/Game.py | 1 | 2031 | '''
IDE: Eclipse (PyDev)
Python version: 2.7
Operating system: Windows 8.1
@author: Emil Carlsson
@copyright: 2015 Emil Carlsson
@license: This program is distributed under the terms of the GNU General Public License
'''
from View import GlobalFunc
from View.Board import Board
class GameView(object):
__root ... | gpl-3.0 | 7,349,038,575,419,678,000 | 31.253968 | 102 | 0.64451 | false |
jimarnold/gomatic | gomatic/go_cd_configurator.py | 1 | 10148 | #!/usr/bin/env python
import json
import time
import xml.etree.ElementTree as ET
import argparse
import sys
import subprocess
import requests
from decimal import Decimal
from gomatic.gocd.pipelines import Pipeline, PipelineGroup
from gomatic.gocd.agents import Agent
from gomatic.xml_operations import Ensurance, Possi... | mit | 6,057,670,478,306,261,000 | 37.732824 | 161 | 0.640323 | false |
hynnet/hiwifi-openwrt-HC5661-HC5761 | staging_dir/host/lib/python2.7/test/test_base64.py | 113 | 8195 | import unittest
from test import test_support
import base64
class LegacyBase64TestCase(unittest.TestCase):
def test_encodestring(self):
eq = self.assertEqual
eq(base64.encodestring("www.python.org"), "d3d3LnB5dGhvbi5vcmc=\n")
eq(base64.encodestring("a"), "YQ==\n")
eq(base64.encod... | gpl-2.0 | 7,345,585,698,987,152,000 | 41.46114 | 79 | 0.582184 | false |
uzh/msregistry | app/main/views.py | 1 | 1040 | # Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software Foundation, or a... | agpl-3.0 | -3,505,700,021,584,941,600 | 33.666667 | 71 | 0.736538 | false |
suyashphadtare/sajil-final-erp | erpnext/erpnext/projects/utils.py | 37 | 1205 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
@frappe.whitelist()
def get_time_log_list(doctype, txt, searchfield, start, page_le... | agpl-3.0 | -611,594,828,541,197,200 | 36.6875 | 85 | 0.687137 | false |
romain-li/edx-platform | lms/envs/test_static_optimized.py | 26 | 2169 | """
Settings used when generating static assets for use in tests.
For example, Bok Choy uses two different settings files:
1. test_static_optimized is used when invoking collectstatic
2. bok_choy is used when running CMS and LMS
Note: it isn't possible to have a single settings file, because Django doesn't
support bo... | agpl-3.0 | 7,274,013,550,475,303,000 | 35.15 | 102 | 0.705394 | false |
thaumos/ansible | lib/ansible/modules/cloud/azure/azure_rm_hdinsightcluster.py | 12 | 20099 | #!/usr/bin/python
#
# Copyright (c) 2019 Zim Kalinowski, (@zikalino)
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -3,524,846,650,251,953,700 | 35.214414 | 143 | 0.524603 | false |
edxzw/edx-platform | cms/djangoapps/contentstore/views/tests/test_programs.py | 19 | 6364 | """Tests covering the Programs listing on the Studio home."""
import json
from django.conf import settings
from django.core.urlresolvers import reverse
import httpretty
import mock
from oauth2_provider.tests.factories import ClientFactory
from provider.constants import CONFIDENTIAL
from openedx.core.djangoapps.progra... | agpl-3.0 | -4,329,714,381,491,999,000 | 38.042945 | 103 | 0.684161 | false |
2mny/mylar | lib/js2py/prototypes/jsarray.py | 27 | 14886 | import six
if six.PY3:
xrange = range
import functools
def to_arr(this):
"""Returns Python array from Js array"""
return [this.get(str(e)) for e in xrange(len(this))]
ARR_STACK = set({})
class ArrayPrototype:
def toString():
# this function is wrong but I will leave it here fore debuggi... | gpl-3.0 | 1,386,306,743,819,528,400 | 31.502183 | 116 | 0.492275 | false |
JackWoot/E2E-Messenger | Server/passlib/apache.py | 21 | 39058 | """passlib.apache - apache password support"""
# XXX: relocate this to passlib.ext.apache?
#=============================================================================
# imports
#=============================================================================
from __future__ import with_statement
# core
from hashlib imp... | gpl-2.0 | -4,691,034,082,114,196,000 | 36.664417 | 97 | 0.547237 | false |
guorendong/iridium-browser-ubuntu | tools/json_schema_compiler/js_externs_generator.py | 12 | 11188 | # Copyright 2015 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.
"""
Generator that produces an externs file for the Closure Compiler.
Note: This is a work in progress, and generated externs may require tweaking.
See https... | bsd-3-clause | -8,642,730,527,378,819,000 | 32.800604 | 80 | 0.622631 | false |
qk4l/Flexget | flexget/tests/test_input_sites.py | 5 | 1359 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import pytest
@pytest.mark.online
class TestInputSites(object):
config = ("""
templates:
global:
headers:
User-Agent: "Moz... | mit | -6,331,254,158,386,032,000 | 34.763158 | 87 | 0.626932 | false |
ChanChiChoi/scikit-learn | sklearn/cluster/tests/test_birch.py | 342 | 5603 | """
Tests for the birch clustering algorithm.
"""
from scipy import sparse
import numpy as np
from sklearn.cluster.tests.common import generate_clustered_data
from sklearn.cluster.birch import Birch
from sklearn.cluster.hierarchical import AgglomerativeClustering
from sklearn.datasets import make_blobs
from sklearn.l... | bsd-3-clause | 8,295,389,328,305,418,000 | 34.01875 | 78 | 0.693914 | 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.