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 |
|---|---|---|---|---|---|---|---|---|---|---|
fivejjs/PTVS | Python/Product/TestAdapter/visualstudio_py_testlauncher.py | 5 | 2802 | # ############################################################################
#
# Copyright (c) Microsoft Corporation.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of this distribution... | apache-2.0 | -1,491,763,242,186,590,500 | 44.666667 | 143 | 0.603929 | false |
nhejazi/scikit-learn | sklearn/utils/validation.py | 3 | 27241 | """Utilities for input validation"""
# Authors: Olivier Grisel
# Gael Varoquaux
# Andreas Mueller
# Lars Buitinck
# Alexandre Gramfort
# Nicolas Tresegnie
# License: BSD 3 clause
import warnings
import numbers
import numpy as np
import scipy.sparse as sp
from ..externals... | bsd-3-clause | 4,317,929,874,835,043,000 | 35.128647 | 79 | 0.613707 | false |
sumonchai/tough | toughradius/common/log_trace.py | 2 | 2017 | #!/usr/bin/env python
# coding=utf-8
from toughlib import utils
from toughlib import logger
import logging
try:
import redis
except:
pass
class LogTrace(object):
radius_key = "toughradius.syslog.trace.radius.{0}".format
trace_key = "toughradius.syslog.trace.{0}".format
def __init__(self, cache_... | agpl-3.0 | -4,572,585,696,098,580,500 | 27.408451 | 85 | 0.614279 | false |
miracle2k/protobuf | python/google/protobuf/internal/wire_format.py | 9 | 7933 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-3-clause | 2,863,817,791,858,546,700 | 31.117409 | 77 | 0.733896 | false |
kosz85/django | tests/shell/tests.py | 56 | 2372 | import sys
import unittest
from unittest import mock
from django import __version__
from django.core.management import CommandError, call_command
from django.test import SimpleTestCase
from django.test.utils import captured_stdin, captured_stdout, patch_logger
class ShellCommandTestCase(SimpleTestCase):
def tes... | bsd-3-clause | -2,864,054,510,463,143,400 | 43.754717 | 99 | 0.650506 | false |
pravishsainath/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers | Chapter4_TheGreatestTheoremNeverTold/top_pic_comments.py | 95 | 1161 | import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if sys.argv[1] else 1
i = 0
while i < n_pic:
top_submission = top_su... | mit | 2,343,640,133,848,589,300 | 17.428571 | 60 | 0.60379 | false |
DailyActie/Surrogate-Model | 01-codes/scipy-master/scipy/stats/_distr_params.py | 1 | 4481 | """
Sane parameters for stats.distributions.
"""
distcont = [
['alpha', (3.5704770516650459,)],
['anglit', ()],
['arcsine', ()],
['beta', (2.3098496451481823, 0.62687954300963677)],
['betaprime', (5, 6)],
['bradford', (0.29891359763170633,)],
['burr', (10.5, 4.3)],
['burr12', (10, 4)],
... | mit | -2,949,041,106,377,310,700 | 34.563492 | 79 | 0.542513 | false |
jn7163/django | tests/model_validation/models.py | 260 | 1346 | from django.db import models
class ThingItem(object):
def __init__(self, value, display):
self.value = value
self.display = display
def __iter__(self):
return (x for x in [self.value, self.display])
def __len__(self):
return 2
class Things(object):
def __iter__(se... | bsd-3-clause | -3,402,313,008,160,633,000 | 26.469388 | 90 | 0.673848 | false |
ArvinPan/opencog | opencog/python/learning/incremental_learner/IncrementaLearner_Mcs.py | 34 | 3242 | __author__ = 'raminbarati'
import incremental_learner as incLer
import networkx as nx
class IncrementalLearnerMcsMinimal(incLer.IncrementalLearnerBase):
def triangulate(self, graph):
def check(start,goal):
# return True
def is_goal(node):
return node == goal
... | agpl-3.0 | 3,996,595,849,413,988,400 | 28.481818 | 111 | 0.458976 | false |
dulems/hue | desktop/core/ext-py/cx_Oracle-5.1.2/test/IntervalVar.py | 33 | 5198 | """Module for testing interval variables."""
import datetime
class TestIntervalVar(BaseTestCase):
def setUp(self):
BaseTestCase.setUp(self)
self.rawData = []
self.dataByKey = {}
for i in range(1, 11):
delta = datetime.timedelta(days = i, hours = i, minutes = i * 2,
... | apache-2.0 | 2,238,602,581,060,113,400 | 41.958678 | 79 | 0.569835 | false |
ales-erjavec/orange | Orange/OrangeWidgets/Prototypes/OWRScript.py | 6 | 15765 | """<name>R Script</name>
<description>Run R scripts</description>
<icon>icons/RScript.png</icon>
"""
from OWWidget import *
from OWPythonScript import OWPythonScript, Script, ScriptItemDelegate, PythonConsole
from OWItemModels import PyListModel, ModelActionsWidget
import Orange.utils.r as r
globalenv = r.globalen... | gpl-3.0 | 6,725,790,456,994,336,000 | 40.269634 | 159 | 0.602347 | false |
TheWardoctor/Wardoctors-repo | script.module.fantastic/lib/resources/lib/sources/en/to_be_fixed/needsfixing/moviego.py | 1 | 3064 | # -*- coding: utf-8 -*-
'''
fantastic Add-on
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 pro... | apache-2.0 | -7,763,428,365,429,114,000 | 36.82716 | 143 | 0.547324 | false |
mattkretz/root | tutorials/pyroot/tree.py | 7 | 7341 | ## \file
## \ingroup tutorial_pyroot
## This macro displays the Tree data structures
##
## \macro_image
## \macro_code
##
## \author Wim Lavrijsen
from ROOT import TCanvas, TPaveLabel, TPaveText, TPavesText, TText
from ROOT import TArrow, TLine
from ROOT import gROOT, gBenchmark
#gROOT.Reset()
c1 = TCanvas('c1','Tre... | lgpl-2.1 | 906,829,986,308,904,800 | 31.056769 | 66 | 0.73287 | false |
JohnnyKing94/pootle | pootle/urls.py | 5 | 1794 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from django.conf import settings
from django... | gpl-3.0 | 4,493,484,624,495,273,500 | 29.931034 | 77 | 0.685619 | false |
enriquepablo/nlproject | src/nl/nl/examples/cms2.py | 1 | 9133 | # -*- coding: utf-8 -*-
# Copyright (c) 2007-2008 by Enrique Pérez Arnaud <enriquepablo@gmail.com>
#
# This file is part of ln.
#
# ln is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of... | gpl-3.0 | 4,985,219,674,578,462,000 | 35.524 | 132 | 0.637718 | false |
shusenl/scikit-learn | examples/ensemble/plot_adaboost_twoclass.py | 347 | 3268 | """
==================
Two-class AdaBoost
==================
This example fits an AdaBoosted decision stump on a non-linearly separable
classification dataset composed of two "Gaussian quantiles" clusters
(see :func:`sklearn.datasets.make_gaussian_quantiles`) and plots the decision
boundary and decision scores. The di... | bsd-3-clause | 4,155,939,086,883,565,600 | 31.356436 | 78 | 0.645043 | false |
HackLinux/goblin-core | riscv/llvm/3.5/cfe-3.5.0.src/bindings/python/tests/cindex/test_tokens.py | 74 | 1384 | from clang.cindex import CursorKind
from clang.cindex import Index
from clang.cindex import SourceLocation
from clang.cindex import SourceRange
from clang.cindex import TokenKind
from nose.tools import eq_
from nose.tools import ok_
from .util import get_tu
def test_token_to_cursor():
"""Ensure we can obtain a Cu... | bsd-3-clause | -4,366,510,676,940,013,000 | 25.615385 | 62 | 0.640173 | false |
rockyzhang/zhangyanhit-python-for-android-mips | python3-alpha/python3-src/Lib/heapq.py | 45 | 17068 | """Heap queue algorithm (a.k.a. priority queue).
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for
all k, counting elements from 0. For the sake of comparison,
non-existing elements are considered to be infinite. The interesting
property of a heap is that a[0] is always its smallest element.
Usag... | apache-2.0 | 167,780,784,438,344,740 | 38.324885 | 81 | 0.650612 | false |
sander76/home-assistant | tests/components/monoprice/test_media_player.py | 3 | 16861 | """The tests for Monoprice Media player platform."""
from collections import defaultdict
from unittest.mock import patch
from serial import SerialException
from homeassistant.components.media_player.const import (
ATTR_INPUT_SOURCE,
ATTR_INPUT_SOURCE_LIST,
ATTR_MEDIA_VOLUME_LEVEL,
DOMAIN as MEDIA_PLAY... | apache-2.0 | 2,954,539,526,220,847,600 | 30.39851 | 87 | 0.660222 | false |
hassanabidpk/django | tests/utils_tests/test_datastructures.py | 262 | 4154 | """
Tests for stuff in django.utils.datastructures.
"""
import copy
from django.test import SimpleTestCase
from django.utils import six
from django.utils.datastructures import (
DictWrapper, ImmutableList, MultiValueDict, MultiValueDictKeyError,
OrderedSet,
)
class OrderedSetTests(SimpleTestCase):
def ... | bsd-3-clause | 5,812,994,208,458,983,000 | 30 | 76 | 0.551757 | false |
LearnEra/LearnEraPlaftform | cms/djangoapps/contentstore/views/component.py | 1 | 15245 | from __future__ import absolute_import
import json
import logging
from django.http import HttpResponseBadRequest, Http404
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_GET
from django.core.exceptions import PermissionDenied
from django.conf import settings
... | agpl-3.0 | -4,816,177,075,511,746,000 | 38.597403 | 120 | 0.636602 | false |
Jandersoft/jander777-ghost | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/scripts/check_sources.py | 117 | 7467 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Checker for file headers
~~~~~~~~~~~~~~~~~~~~~~~~
Make sure each Python file has a correct file header
including copyright and license information.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE fo... | mit | 241,774,442,046,863,940 | 29.855372 | 77 | 0.492969 | false |
inorton/NULLTeamPlugin | server/web/webopenid.py | 124 | 3707 | """openid.py: an openid library for web.py
Notes:
- This will create a file called .openid_secret_key in the
current directory with your secret key in it. If someone
has access to this file they can log in as any user. And
if the app can't find this file for any reason (e.g. you
moved the app somewhe... | bsd-2-clause | 8,751,907,174,957,371,000 | 31.234783 | 130 | 0.60696 | false |
darjus-amzn/boto | tests/integration/iam/test_connection.py | 100 | 1746 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# 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 right... | mit | 8,093,256,645,097,710,000 | 36.148936 | 74 | 0.718213 | false |
boldprogressives/django-opendebates | opendebates/opendebates/settings.py | 1 | 5134 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.utils.translation import ugettext_lazy as _
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
FIXTURE_DIRS = [os.path.join(BASE_DIR, 'fixtures')]
SECRET_KEY = 'dg0pdghh4andk^v=rw^l-i81yz-h2co%mlj4)+p(cqz... | apache-2.0 | 3,124,739,552,220,002,300 | 24.542289 | 84 | 0.628944 | false |
youprofit/django-cms | cms/forms/fields.py | 35 | 3619 | # -*- coding: utf-8 -*-
import six
from django import forms
from django.contrib.admin.widgets import RelatedFieldWidgetWrapper
from django.forms.fields import EMPTY_VALUES
from django.utils.translation import ugettext_lazy as _
from cms.forms.utils import get_site_choices, get_page_choices
from cms.forms.widgets impo... | bsd-3-clause | -8,255,338,194,872,208,000 | 39.211111 | 118 | 0.639956 | false |
eva-oss/linux | tools/testing/selftests/tc-testing/tdc_helper.py | 49 | 2070 | """
tdc_helper.py - tdc helper functions
Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com>
"""
def get_categorized_testlist(alltests, ucat):
""" Sort the master test list into categories. """
testcases = dict()
for category in ucat:
testcases[category] = list(filter(lambda x: category in x['ca... | gpl-2.0 | -5,483,909,018,155,899,000 | 26.6 | 94 | 0.591304 | false |
DavidjohnBlodgett/RackHD | test/stream-monitor/test/test_amqp_mon.py | 1 | 8198 | """
Copyright (c) 2017 Dell Inc. or its subsidiaries. All Rights Reserved.
Self-test of the matcher infrastructure. This is less about individual matchers,
and more about if the various sequences and groups work (and fail!) as expected.
"""
from __future__ import print_function
import unittest
import plugin_test_helpe... | apache-2.0 | 378,217,655,936,806,400 | 41.476684 | 98 | 0.588924 | false |
sernst/cauldron | cauldron/docgen/params.py | 1 | 4295 | import typing
import inspect
from cauldron.docgen import conversions
def get_args_index(target) -> int:
"""
Returns the index of the "*args" parameter if such a parameter exists in
the function arguments or -1 otherwise.
:param target:
The target function for which the args index should be de... | mit | 1,843,807,270,678,343,700 | 25.677019 | 79 | 0.624447 | false |
raags/ansible-modules-core | system/sysctl.py | 18 | 12858 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, David "DaviXX" CHANIAL <david.chanial@gmail.com>
# (c) 2014, James Tanner <tanner.jc@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 ... | gpl-3.0 | -3,719,170,432,438,790,700 | 34.421488 | 110 | 0.531965 | false |
dkarakats/edx-platform | common/lib/xmodule/xmodule/assetstore/assetmgr.py | 59 | 2002 | """
Asset Manager
Interface allowing course asset saving/retrieving.
Handles:
- saving asset in the BlobStore -and- saving asset metadata in course modulestore.
- retrieving asset metadata from course modulestore -and- returning URL to asset -or- asset bytes.
Phase 1: Checks to see if an asset's metadata can be f... | agpl-3.0 | 3,668,460,525,677,462,000 | 31.290323 | 106 | 0.706294 | false |
MissionCriticalCloud/marvin | marvin/cloudstackAPI/listPhysicalNetworks.py | 1 | 2112 | """Lists physical networks"""
from baseCmd import *
from baseResponse import *
class listPhysicalNetworksCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "false"
"""list physical network by id"""
self.id = None
self.typeInfo['id'] = 'uuid'
"""List by key... | apache-2.0 | 6,227,523,362,642,608,000 | 31 | 60 | 0.5625 | false |
PRIMEDesigner15/PRIMEDesigner15 | Test_files/dependencies/Lib/unittest/__init__.py | 900 | 2718 | """
Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
Smalltalk testing framework.
This module contains the core framework classes that form the basis of
specific test cases and suites (TestCase, TestSuite etc.), and also a
text-based utility class for running the tests and reporting the resu... | bsd-3-clause | -3,127,846,638,001,029,000 | 38.391304 | 80 | 0.732892 | false |
Averroes/raft | thirdparty/pdfminer/pdfminer/pdffont.py | 11 | 26454 | #!/usr/bin/env python2
import sys
import struct
try:
from io import StringIO
except ImportError:
from io import StringIO
from .cmapdb import CMapDB, CMapParser, FileUnicodeMap, CMap
from .encodingdb import EncodingDB, name2unicode
from .psparser import PSStackParser
from .psparser import PSSyntaxError, PSEOF
fr... | gpl-3.0 | -1,066,411,535,871,164,700 | 36.683761 | 98 | 0.539654 | false |
nvoron23/hue | desktop/core/ext-py/Django-1.6.10/django/views/decorators/http.py | 228 | 7105 | """
Decorators for views based on HTTP headers.
"""
import logging
from calendar import timegm
from functools import wraps
from django.utils.decorators import decorator_from_middleware, available_attrs
from django.utils.http import http_date, parse_http_date_safe, parse_etags, quote_etag
from django.middleware.http i... | apache-2.0 | 4,833,713,456,986,047,000 | 41.801205 | 97 | 0.578607 | false |
alqfahad/odoo | addons/account/tests/test_reconciliation.py | 179 | 14166 | from openerp.tests.common import TransactionCase
import time
class TestReconciliation(TransactionCase):
"""Tests for reconciliation (account.tax)
Test used to check that when doing a sale or purchase invoice in a different currency,
the result will be balanced.
"""
def setUp(self):
super(... | agpl-3.0 | -6,306,549,653,469,609,000 | 51.273063 | 215 | 0.589863 | false |
GenaSG/ET | src/scons_utils.py | 9 | 3121 | # -*- mode: python -*-
import sys, os, string, time, commands, re, pickle, StringIO, popen2, commands, pdb, zipfile
import SCons
# need an Environment and a matching buffered_spawn API .. encapsulate
class idBuffering:
def buffered_spawn( self, sh, escape, cmd, args, env ):
stderr = StringIO.StringIO()
stdout = ... | gpl-3.0 | 9,117,642,220,465,711,000 | 25.905172 | 92 | 0.631849 | false |
masterkeywikz/seq2graph | src/build_vocab_from_glove.py | 1 | 1482 | import sys
import time
import os
if __name__ == '__main__':
if len(sys.argv) < 3:
print "Usage: {0} <word_vec_fn> <vocab_fn>".format(sys.argv[0])
sys.exit()
word_vec_fn = sys.argv[1]
vocab_fn = sys.argv[2]
save_fn = os.path.splitext(vocab_fn)[0] + '_glove.txt'
fea_save_fn = o... | mit | 8,588,216,809,008,668,000 | 26.962264 | 74 | 0.509447 | false |
2014cdag5/2014cdag5 | wsgi/programs/cdag3/remsub6.py | 7 | 18749 | import cherrypy
# 這是 MAN 類別的定義
'''
# 在 application 中導入子模組
import programs.cdag3.remsub6 as cdag3_remsub6
# 加入 cdag3 模組下的 remsub6.py 且以子模組 remsub6 對應其 remsub6() 類別
root.cdag3.remsub6 = cdag3_remsub6.remsub6()
# 完成設定後, 可以利用
/cdag3/remsub6
# 呼叫 man.py 中 MAN 類別的 assembly 方法
'''
class remsub6(object):
# 各組利用 index 引... | gpl-2.0 | 5,636,417,385,352,421,000 | 36.425339 | 197 | 0.655946 | false |
dyoung418/tensorflow | tensorflow/contrib/learn/python/learn/ops/__init__.py | 124 | 1104 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,361,511,899,613,623,300 | 41.461538 | 80 | 0.717391 | false |
NullSoldier/django | django/utils/decorators.py | 126 | 6875 | "Functions that help with dynamically creating decorators for views."
try:
from contextlib import ContextDecorator
except ImportError:
ContextDecorator = None
from functools import WRAPPER_ASSIGNMENTS, update_wrapper, wraps
from django.utils import six
class classonlymethod(classmethod):
def __get__(se... | bsd-3-clause | -6,944,600,973,053,405,000 | 36.568306 | 98 | 0.579927 | false |
naveenvhegde/python-telegram-bot | telegram/location.py | 11 | 1552 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015 Leandro Toledo de Souza <leandrotoeldodesouza@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the ... | gpl-3.0 | -536,685,382,008,076,100 | 27.218182 | 77 | 0.655928 | false |
abenzbiria/clients_odoo | addons/l10n_be/wizard/l10n_be_partner_vat_listing.py | 302 | 14738 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# Corrections & modifications by Noviat nv/sa, (http://www.noviat.be):
# - VAT listing based upon year... | agpl-3.0 | 3,045,540,158,328,886,300 | 41.843023 | 199 | 0.556792 | false |
emonty/deb-vhd-util | tools/xm-test/lib/XmTestReport/ResultReport.py | 42 | 3981 | #!/usr/bin/python
"""
ResultReport.py - Handles the gathering and xml-formatting of xm-test
results
Copyright (C) International Business Machines Corp., 2005
Author: Dan Smith <danms@us.ibm.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU... | gpl-2.0 | 4,485,217,335,137,422,000 | 24.356688 | 98 | 0.538558 | false |
passiweinberger/NuMozart | data/midi/MidiOutFile.py | 17 | 10907 | # -*- coding: ISO-8859-1 -*-
from MidiOutStream import MidiOutStream
from RawOutstreamFile import RawOutstreamFile
from constants import *
from DataTypeConverters import fromBytes, writeVar
class MidiOutFile(MidiOutStream):
"""
MidiOutFile is an eventhandler that subclasses MidiOutStream.
... | gpl-2.0 | 6,706,102,771,947,778,000 | 22.350446 | 91 | 0.51554 | false |
google-code/android-scripting | python/src/Mac/Modules/app/appsupport.py | 39 | 5252 | # This script generates a Python interface for an Apple Macintosh Manager.
# It uses the "bgen" package to generate C code.
# The function specifications are generated by scanning the mamager's header file,
# using the "scantools" package (customized for this particular manager).
import string
# Declarations that cha... | apache-2.0 | -4,365,528,923,198,452,000 | 38.488722 | 97 | 0.71211 | false |
blacklin/kbengine | kbe/res/scripts/common/Lib/bz2.py | 83 | 18839 | """Interface to the libbzip2 compression library.
This module provides a file interface, classes for incremental
(de)compression, and functions for one-shot (de)compression.
"""
__all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor",
"open", "compress", "decompress"]
__author__ = "Nadeem Vawda <nadeem.v... | lgpl-3.0 | 2,974,907,038,242,189,300 | 35.159309 | 88 | 0.561973 | false |
alkadis/vcv | src/adhocracy/controllers/shibboleth.py | 4 | 9257 | from urllib import urlencode
import formencode
from pylons import request
from pylons import response
from pylons import session
from pylons.controllers.util import redirect
from pylons.i18n import _
from adhocracy import config
from adhocracy import forms
from adhocracy.lib import helpers as h
from adhocracy.lib.auth ... | agpl-3.0 | -8,519,153,643,470,033,000 | 38.559829 | 79 | 0.611969 | false |
aron-bordin/Tyrant-Sql | SQL_Map/plugins/dbms/maxdb/__init__.py | 8 | 1033 | #!/usr/bin/env python
"""
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.enums import DBMS
from lib.core.settings import MAXDB_SYSTEM_DBS
from lib.core.unescaper import unescaper
from plugins.dbms.maxdb.enumeration import Enumeration
... | gpl-3.0 | -149,446,978,735,546,270 | 30.30303 | 86 | 0.724105 | false |
suncycheng/intellij-community | python/testData/codeInsight/classMRO/TangledInheritance.py | 79 | 6841 |
class Class001(object):
unique_attr = 1
class Class002(Class001):
unique_attr = 2
class Class003(Class002, Class001):
unique_attr = 3
class Class004(Class003, Class002, Class001):
unique_attr = 4
class Class005(Class004, Class003, Class002):
unique_attr = 5
class Class006(Class005, Class... | apache-2.0 | 955,692,292,888,568,800 | 16.05985 | 45 | 0.708961 | false |
Metaswitch/calico-nova | nova/tests/unit/virt/disk/test_inject.py | 7 | 11218 | # Copyright (C) 2012 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 ... | apache-2.0 | -3,806,289,439,141,096,400 | 38.5 | 79 | 0.467641 | false |
figment/tesvsnip | scripts/lib/markup.py | 4 | 18521 | # This code is in the public domain, it comes
# with absolutely no warranty and you can do
# absolutely whatever you want with it.
# Figment: Edits add element_closer to elements
# to enhance expressiveness
__date__ = '1 October 2012'
__version__ = '1.9'
__doc__ = """
This is markup.py - a Python module that... | gpl-3.0 | 871,186,727,792,879,400 | 31.607394 | 126 | 0.652341 | false |
rrampage/rethinkdb | test/rql_test/connections/http_support/httpbin/filters.py | 49 | 1788 | # -*- coding: utf-8 -*-
"""
httpbin.filters
~~~~~~~~~~~~~~~
This module provides response filter decorators.
"""
import gzip as gzip2
import zlib
from decimal import Decimal
from time import time as now
from io import BytesIO
from decorator import decorator
from flask import Flask, Response
app = Flask(__name__)... | agpl-3.0 | -2,383,015,602,427,060,000 | 18.866667 | 67 | 0.613535 | false |
dmilith/SublimeText3-dmilith | Packages/pyyaml/st2/yaml/scanner.py | 5 | 52027 |
# Scanner produces tokens of the following types:
# STREAM-START
# STREAM-END
# DIRECTIVE(name, value)
# DOCUMENT-START
# DOCUMENT-END
# BLOCK-SEQUENCE-START
# BLOCK-MAPPING-START
# BLOCK-END
# FLOW-SEQUENCE-START
# FLOW-MAPPING-START
# FLOW-SEQUENCE-END
# FLOW-MAPPING-END
# BLOCK-ENTRY
# FLOW-ENTRY
# KEY
# VALUE
# AL... | mit | -283,803,834,483,292,350 | 35.029778 | 103 | 0.528706 | false |
cbeloni/pychronesapp | backend/venv/lib/python2.7/site-packages/pip/vcs/subversion.py | 473 | 10640 | import os
import re
from pip.backwardcompat import urlparse
from pip.index import Link
from pip.util import rmtree, display_path, call_subprocess
from pip.log import logger
from pip.vcs import vcs, VersionControl
_svn_xml_url_re = re.compile('url="([^"]+)"')
_svn_rev_re = re.compile('committed-rev="(\d+)"')
_svn_url_r... | mit | -1,282,337,550,603,847,200 | 37.974359 | 101 | 0.533741 | false |
NewPresident1/kitsune | kitsune/sumo/migrations/0002_initial_data.py | 13 | 2154 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def create_ratelimit_bypass_perm(apps, schema_editor):
# First we get or create the content type.
ContentType = apps.get_model('contenttypes', 'ContentType')
global_permission_ct, created = ContentTyp... | bsd-3-clause | 3,903,811,758,920,717,000 | 32.138462 | 89 | 0.678737 | false |
jjuanda/mechanize | release.py | 21 | 45151 | """%prog RELEASE_AREA [action ...]
Perform needed actions to release mechanize, doing the work in directory
RELEASE_AREA.
If no actions are given, print the tree of actions and do nothing.
This is only intended to work on Unix (unlike mechanize itself). Some of it
only works on Ubuntu 10.04 (lucid).
Warning:
* M... | bsd-3-clause | 7,531,600,333,447,366,000 | 38.992028 | 132 | 0.575535 | false |
SEL-Columbia/formhub | odk_logger/management/commands/update_xform_uuids.py | 7 | 1885 | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 coding=utf-8
import os
import glob
import csv
from django.core.management.base import BaseCommand, CommandError
from django.utils.translation import ugettext_lazy
from odk_logger.models.xform import XForm, DuplicateUUIDError
from optparse import make_option
from utils... | bsd-2-clause | 8,306,974,613,897,929,000 | 36.7 | 89 | 0.530504 | false |
martiert/bitbake | lib/bb/fetch2/gitsm.py | 2 | 2811 | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
"""
BitBake 'Fetch' git submodules implementation
"""
# Copyright (C) 2013 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as... | gpl-2.0 | -7,432,712,664,633,324,000 | 35.038462 | 103 | 0.624333 | false |
lihui7115/ChromiumGStreamerBackend | chrome/common/extensions/docs/server2/api_models_test.py | 44 | 6678 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import unittest
from api_models import APIModels
from compiled_file_system import CompiledFileSystem
from extensions_paths... | bsd-3-clause | -225,392,393,054,921,900 | 40.7375 | 79 | 0.60587 | false |
nikhila05/micro-blog | micro_blog/posts/templatetags/blog_tags.py | 1 | 1176 | import datetime
from django import template
from micro_blog.microblog.models import Post, Tags, UserRole
from micro_blog.microblog.views import get_user_role
register = template.Library()
@register.assignment_tag(takes_context=True)
def get_archives(context):
archives = []
dates = []
for each_object in P... | mit | -4,635,466,646,313,014,000 | 25.133333 | 133 | 0.668367 | false |
qsnake/numpy | numpy/add_newdocs.py | 1 | 179093 | # This is only meant to add docs to objects defined in C-extension modules.
# The purpose is to allow easier editing of the docstrings without
# requiring a re-compile.
# NOTE: Many of the methods of ndarray have corresponding functions.
# If you update these docstrings, please keep also the ones in
# core... | bsd-3-clause | -7,334,262,699,602,627,000 | 26.388439 | 88 | 0.578258 | false |
cmin764/xhosts | xhosts/editor.py | 1 | 4285 | #
# editor: module used for loading and editing the hosts file
# Copyright (C) 2012 cmiN
#
# 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 optio... | gpl-3.0 | -7,412,759,639,760,329,000 | 33.556452 | 71 | 0.593932 | false |
cbrucks/keystone_ldap | keystone/contrib/ec2/backends/kvs.py | 2 | 1772 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# 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 requ... | apache-2.0 | -5,329,416,669,296,702,000 | 38.377778 | 75 | 0.68623 | false |
xuther/nyc-taxi-data | code/clustering/heirarchical-clusters.py | 1 | 4247 | import csv
import sys
if len(sys.argv) != 3:
print ("Usage: python heirarchical-cluster.py [in file] [out file]")
exit(-1)
in_file = sys.argv[1]
out_file = sys.argv[2]
sortedDistances = [] #Tuples to be sorted by distances.
clusterDistances = {}
clusters = {} # Clusters is a list of tracts in a cluster - num... | mit | 936,152,782,618,718,800 | 35.299145 | 179 | 0.642807 | false |
dustinlarimer/collab-pad | src/node_modules/npm/node_modules/node-gyp/gyp/test/defines/gyptest-defines-env.py | 501 | 1874 | #!/usr/bin/env python
# Copyright (c) 2009 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.
"""
Verifies build of an executable with C++ define specified by a gyp define.
"""
import os
import TestGyp
test = TestGyp.TestGyp()
# Wi... | apache-2.0 | 965,026,938,502,596,100 | 21.047059 | 74 | 0.705443 | false |
serpilliere/miasm | example/symbol_exec/depgraph.py | 2 | 4568 | from __future__ import print_function
from builtins import range
from argparse import ArgumentParser
from pdb import pm
import json
from future.utils import viewitems
from miasm.analysis.machine import Machine
from miasm.analysis.binary import Container
from miasm.analysis.depgraph import DependencyGraph
from miasm.e... | gpl-2.0 | -6,228,525,320,681,516,000 | 33.870229 | 94 | 0.627846 | false |
anbangleo/NlsdeWeb | Python-3.6.0/Lib/lib2to3/fixes/fix_has_key.py | 39 | 3196 | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer for has_key().
Calls to .has_key() methods are expressed in terms of the 'in'
operator:
d.has_key(k) -> k in d
CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
fixer will chan... | mit | 6,139,631,752,387,306,000 | 28.321101 | 78 | 0.521277 | false |
akvo/djangoembed | oembed/resources.py | 1 | 1275 | from django import VERSION
if VERSION < (1, 5):
from django.utils import simplejson
else:
import json as simplejson
from oembed.exceptions import OEmbedException
class OEmbedResource(object):
"""
OEmbed resource, as well as a factory for creating resource instances
from response json
"""
_... | mit | 788,381,761,828,248,700 | 25.5625 | 80 | 0.598431 | false |
hongyunnchen/gr-lte | python/qa_pbch_demux_vcvc.py | 2 | 4239 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013 Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT)
#
# This 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... | gpl-3.0 | -3,674,332,796,472,537,000 | 34.923729 | 109 | 0.59967 | false |
SNAPPETITE/backend | flask/lib/python2.7/site-packages/flask/testsuite/signals.py | 554 | 4807 | # -*- coding: utf-8 -*-
"""
flask.testsuite.signals
~~~~~~~~~~~~~~~~~~~~~~~
Signalling.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from flask.testsuite import FlaskTestCase
class SignalsTestCase(FlaskTestCase):
def ... | mit | 4,112,763,345,847,382,000 | 30.418301 | 76 | 0.563761 | false |
kyroskoh/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/message_pool.py | 129 | 12235 | # Copyright (C) 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 of conditions and the ... | bsd-3-clause | -2,341,892,858,194,366,500 | 36.762346 | 212 | 0.618635 | false |
zachomedia/xml-parsing-testing | libs-src/libxml2-2.9.1/python/tests/tstLastError.py | 32 | 2902 | #!/usr/bin/python -u
import sys, unittest
import libxml2
class TestCase(unittest.TestCase):
def runTest(self):
self.test1()
self.test2()
def setUp(self):
libxml2.debugMemory(1)
def tearDown(self):
libxml2.cleanupParser()
if libxml2.debugMemory(1) != 0:
... | mit | 5,569,783,025,771,183,000 | 34.390244 | 80 | 0.509649 | false |
Lekensteyn/buildbot | master/buildbot/test/unit/test_www_hooks_github.py | 4 | 30383 | # coding: utf-8
# 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 WARRA... | gpl-2.0 | 5,520,111,583,160,411,000 | 36.138142 | 107 | 0.619244 | false |
fernandog/Sick-Beard | lib/requests/packages/urllib3/util.py | 65 | 6914 | # urllib3/util.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from base64 import b64encode
from collections import namedtuple
from socket import error as Socke... | gpl-3.0 | -6,587,104,677,713,978,000 | 26.436508 | 105 | 0.591987 | false |
axbaretto/beam | sdks/python/apache_beam/examples/snippets/transforms/elementwise/map_test.py | 5 | 2481 | # 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 "License");... | apache-2.0 | 8,067,646,782,448,116,000 | 28.53012 | 74 | 0.719298 | false |
vaquer/FastReadingPy | FastReading/settings.py | 1 | 2293 | """
Django settings for FastReading project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...... | gpl-2.0 | 2,256,412,463,075,895,000 | 23.923913 | 71 | 0.719581 | false |
xinjiguaike/edx-platform | cms/envs/test.py | 15 | 9245 | # -*- coding: utf-8 -*-
"""
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it'll write the database file
/edx-platform # The location of this repo
/log # Where we're going to write log files
"""
# We ... | agpl-3.0 | -4,587,409,357,395,452,400 | 31.438596 | 144 | 0.676149 | false |
resmo/ansible | lib/ansible/modules/network/cloudengine/ce_reboot.py | 12 | 4188 | #!/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 | 1,840,862,639,578,619,000 | 24.693252 | 97 | 0.632521 | false |
WhireCrow/openwrt-mt7620 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_weakref.py | 35 | 42138 | import gc
import sys
import unittest
import UserList
import weakref
import operator
from test import test_support
# Used in ReferencesTestCase.test_ref_created_during_del() .
ref_from_del = None
class C:
def method(self):
pass
class Callable:
bar = None
def __call__(self, x):
self.bar ... | gpl-2.0 | -4,317,073,859,646,321,700 | 32.549363 | 79 | 0.563434 | false |
WhireCrow/openwrt-mt7620 | staging_dir/host/lib/python2.7/xmllib.py | 227 | 34865 | """A parser for XML, using the derived class as static DTD."""
# Author: Sjoerd Mullender.
import re
import string
import warnings
warnings.warn("The xmllib module is obsolete. Use xml.sax instead.",
DeprecationWarning, 2)
del warnings
version = '0.3'
class Error(RuntimeError):
pass
# Regular e... | gpl-2.0 | -2,560,520,752,235,552,300 | 36.489247 | 109 | 0.483895 | false |
excid3/python-apt | apt/cache.py | 2 | 12982 | # cache.py - apt cache abstraction
#
# Copyright (c) 2005 Canonical
#
# Author: Michael Vogt <michael.vogt@ubuntu.com>
#
# 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 versio... | gpl-2.0 | -2,604,986,758,902,664,700 | 32.033079 | 86 | 0.592282 | false |
SlimRemix/android_external_chromium_org | tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py | 25 | 5761 | # 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 unittest
from telemetry.core.platform.power_monitor import sysfs_power_monitor
class SysfsPowerMonitorMonitorTest(unittest.TestCase):
initial_fre... | bsd-3-clause | 7,912,038,632,324,961,000 | 28.54359 | 79 | 0.632703 | false |
isandlaTech/cohorte-demos | led/dump/led-demo-yun/cohorte/dist/cohorte-1.0.0-20141216.234517-57-python-distribution/repo/requests/structures.py | 1160 | 2977 | # -*- coding: utf-8 -*-
"""
requests.structures
~~~~~~~~~~~~~~~~~~~
Data structures that power Requests.
"""
import collections
class CaseInsensitiveDict(collections.MutableMapping):
"""
A case-insensitive ``dict``-like object.
Implements all methods and operations of
``collections.MutableMapping... | apache-2.0 | 7,132,205,676,564,460,000 | 27.625 | 75 | 0.593215 | false |
rdmorganiser/rdmo | rdmo/questions/migrations/0013_permissions.py | 2 | 1665 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-02-28 12:34
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('questions', '0012_meta'),
]
operations = [
migrations.AlterModelOptions(
n... | apache-2.0 | 4,594,012,926,823,291,400 | 46.571429 | 284 | 0.607207 | false |
shadyueh/pyranking | env/lib/python2.7/site-packages/django/conf/__init__.py | 135 | 7622 | """
Settings and configuration for Django.
Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment
variable, and then from django.conf.global_settings; see the global settings file for
a list of all possible variables.
"""
import importlib
import os
import time
import warnings
from dj... | mit | 1,131,219,994,928,015,100 | 37.494949 | 113 | 0.622802 | false |
reox/androguard | androguard/decompiler/dad/writer.py | 2 | 26467 | # This file is part of Androguard.
#
# Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# 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://... | apache-2.0 | 8,706,587,787,011,879,000 | 35.455923 | 119 | 0.511429 | false |
Bulochkin/tensorflow_pack | tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_variables_test.py | 80 | 6132 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,527,139,508,675,968,500 | 35.5 | 80 | 0.671722 | false |
devendermishrajio/nova | nova/api/openstack/compute/schemas/evacuate.py | 83 | 1175 | # Copyright 2014 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 ... | apache-2.0 | 8,812,791,702,503,982,000 | 33.558824 | 78 | 0.633191 | false |
tiagocoutinho/bliss | tests/test_counters.py | 1 | 2255 | # -*- coding: utf-8 -*-
#
# This file is part of the bliss project
#
# Copyright (c) 2016 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.
import pytest
import numpy
from bliss.common.measurement import SamplingCounter, IntegratingCounter
class Diode(SamplingCounter):
de... | lgpl-3.0 | -5,351,905,881,869,370,000 | 25.529412 | 84 | 0.623947 | false |
kustodian/ansible | lib/ansible/modules/packaging/os/redhat_subscription.py | 7 | 34577 | #!/usr/bin/python
# James Laska (jlaska@redhat.com)
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['prev... | gpl-3.0 | -7,748,536,110,963,843,000 | 36.259698 | 144 | 0.590074 | false |
jnobre/lxmls-toolkit-2017 | lxmls/pos_tagging/all_train_pos_tag.py | 2 | 3145 | import sys
import codecs
from sequences.sequence import *
from sequences.sequence_list import *
import readers.pos_corpus as pcc
import readers.brown_pos_corpus as bpc
import sequences.extended_feature as exfc
import sequences.structured_perceptron as spc
import sequences.confusion_matrix as bcm
MAX_SENT_SIZE = 1000
... | mit | 8,150,647,110,531,734,000 | 30.767677 | 74 | 0.673132 | false |
henaras/sahara | sahara/plugins/vanilla/utils.py | 10 | 1562 | # Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | -309,108,580,697,142,800 | 24.193548 | 69 | 0.743918 | false |
sephii/django-cms | cms/signals/plugins.py | 11 | 2026 | # -*- coding: utf-8 -*-
from cms.constants import PUBLISHER_STATE_DIRTY
from cms.models import CMSPlugin, Title, Page, StaticPlaceholder, Placeholder
def get_placeholder(plugin):
if plugin.placeholder_id:
try:
return plugin.placeholder
except Placeholder.DoesNotExist:
retur... | bsd-3-clause | -1,608,843,502,672,057,000 | 27.138889 | 120 | 0.629812 | false |
hefen1/chromium | tools/telemetry/telemetry/core/web_contents.py | 2 | 6605 | # Copyright 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.
import os
from telemetry.core import util
DEFAULT_WEB_CONTENTS_TIMEOUT = 90
# TODO(achuith, dtu, nduca): Add unit tests specifically for WebContents,
# in... | bsd-3-clause | 7,969,608,769,544,305,000 | 36.316384 | 80 | 0.675397 | false |
Designist/sympy | sympy/polys/specialpolys.py | 87 | 9787 | """Functions for generating interesting polynomials, e.g. for benchmarking. """
from __future__ import print_function, division
from sympy.core import Add, Mul, Symbol, sympify, Dummy, symbols
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.core.singleton import S
from sympy.polys.polytools impo... | bsd-3-clause | 6,000,035,031,253,535,000 | 30.570968 | 653 | 0.479207 | false |
e-gob/plataforma-kioscos-autoatencion | scripts/ansible-play/.venv/lib/python2.7/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py | 3 | 4150 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.hazmat.primitives.cipher... | bsd-3-clause | -8,091,060,879,927,228,000 | 24.151515 | 79 | 0.640723 | false |
aYukiSekiguchi/ACCESS-Chromium | third_party/mesa/MesaLib/src/mapi/glapi/gen/glX_proto_size.py | 33 | 18969 | #!/usr/bin/env python
# (C) Copyright IBM Corporation 2004, 2005
# All Rights Reserved.
#
# 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
# ... | bsd-3-clause | -978,189,585,207,080,700 | 25.944602 | 118 | 0.622542 | false |
Jericho/deep-learning | image-classification/problem_unittests.py | 91 | 7319 | import os
import numpy as np
import tensorflow as tf
import random
from unittest.mock import MagicMock
def _print_success_message():
print('Tests Passed')
def test_folder_path(cifar10_dataset_folder_path):
assert cifar10_dataset_folder_path is not None,\
'Cifar-10 data folder not set.'
assert ci... | mit | 8,138,426,527,649,477,000 | 34.1875 | 159 | 0.640388 | false |
hoangminhitvn/flask | flask/lib/python2.7/site-packages/pip/_vendor/distlib/resources.py | 210 | 9664 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import bisect
import io
import logging
import os
import pkgutil
import shutil
import sys
import types... | bsd-3-clause | -6,069,584,550,550,388,000 | 28.919505 | 79 | 0.593129 | 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.