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 |
|---|---|---|---|---|---|---|---|---|---|---|
cogniteev/flask-oauthlib | tests/oauth1/server.py | 16 | 7152 | # coding: utf-8
from flask import g, render_template, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_oauthlib.provider import OAuth1Provider
db = SQLAlchemy()
def enable_log(name='flask_oauthlib'):
import logging
logger = logging.getLogger(name)
logger.addHandler(logging.StreamHandl... | bsd-3-clause | 6,417,247,780,079,501,000 | 25.294118 | 77 | 0.598294 | false |
marineam/nagcat | python/nagcat/query.py | 1 | 9568 | # Copyright 2008-2009 ITA Software, 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 ... | apache-2.0 | -4,428,318,874,016,784,400 | 33.049822 | 78 | 0.587166 | false |
ZhouJiaLinmumu/Grasp-and-lift-EEG-challenge | lvl2/genEns.py | 4 | 3742 | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 15 14:12:12 2015
@author: rc, alex
"""
import os
import sys
if __name__ == '__main__' and __package__ is None:
filePath = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(filePath)
import numpy as np
import yaml
from copy import deepcop... | bsd-3-clause | 8,103,680,308,271,452,000 | 26.514706 | 91 | 0.650989 | false |
koushikcgit/xen-api | ocaml/idl/binding_sanity_checks/metrics.py | 34 | 5011 | #!/usr/bin/env python
import XenAPI
import sanitychecklib
from pprint import pprint, pformat
#Generally, we wish to announce the name of this file.
#When running in the interpreter, however, this doesn't exist, and we
#probably shouldn't log out either
try:
this_test_name = __file__
logout_after_test = True
e... | lgpl-2.1 | -5,148,676,997,603,214,000 | 38.456693 | 149 | 0.679306 | false |
SaschaMester/delicium | chrome/common/extensions/docs/server2/cache_chain_object_store.py | 53 | 3339 | # 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.
from future import All, Future
from object_store import ObjectStore
class CacheChainObjectStore(ObjectStore):
'''Maintains an in-memory cache along with ... | bsd-3-clause | 3,412,615,485,014,063,600 | 40.222222 | 80 | 0.662174 | false |
telwertowski/QGIS | tests/src/python/test_authmanager_ogr_postgres.py | 15 | 8858 | # -*- coding: utf-8 -*-
"""
Tests for auth manager Basic Auth access to postgres.
This is an integration test for QGIS Desktop Auth Manager postgres provider that
checks if QGIS can use a stored auth manager auth configuration to access
a username/password protected postgres.
Configuration from the environment:
... | gpl-2.0 | -5,069,443,510,012,741,000 | 35.286885 | 234 | 0.617913 | false |
mojwang/selenium | py/selenium/webdriver/common/keys.py | 53 | 2347 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 3,361,152,008,327,706,000 | 23.447917 | 62 | 0.597358 | false |
samba-team/samba | third_party/waf/waflib/Tools/ccroot.py | 40 | 26260 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2018 (ita)
"""
Classes and methods shared by tools providing support for C-like language such
as C/C++/D/Assembly/Go (this support module is almost never used alone).
"""
import os, re
from waflib import Task, Utils, Node, Errors, Logs
from waflib.TaskGen im... | gpl-3.0 | -6,749,384,229,315,582,000 | 32.193426 | 394 | 0.675655 | false |
shawnlinq/SlqBlog2 | accounts/permissions.py | 1 | 1727 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import current_app
from flask_principal import Permission, RoleNeed, UserNeed, identity_loaded
from flask_login import current_user
# admin_need = RoleNeed('admin')
# editor_need = RoleNeed('editor')
# writer_need = RoleNeed('writer')
# reader_need = ... | gpl-2.0 | -3,039,445,841,340,321,300 | 37.295455 | 75 | 0.71106 | false |
bmanojlovic/ansible | lib/ansible/modules/network/basics/uri.py | 7 | 17956 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Romeo Theriault <romeot () hawaii.edu>
#
# 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 th... | gpl-3.0 | 5,933,652,193,546,694,000 | 35.421907 | 154 | 0.634551 | false |
avaitla/Haskell-to-C---Bridge | pygccxml-1.0.0/unittests/copy_constructor_tester.py | 1 | 1665 | # Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import os
import unittest
import autoconfig
import parser_test_case
from pygccxml import utils
from pygccxml import... | bsd-3-clause | -5,823,910,956,560,152,000 | 34.195652 | 96 | 0.624024 | false |
tgroh/incubator-beam | sdks/python/apache_beam/utils/proto_utils.py | 9 | 1963 | #
# 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 | 4,020,722,610,374,731,000 | 26.263889 | 96 | 0.726949 | false |
atlashealth/ansible-modules-extras | monitoring/nagios.py | 2 | 30634 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is largely copied from the Nagios module included in the
# Func project. Original copyright follows:
#
# func-nagios - Schedule downtime and enables/disable notifications
# Copyright 2011, Red Hat, Inc.
# Tim Bielawa <tbielawa@redhat.com>
#
# This software may be ... | gpl-3.0 | -5,530,817,445,760,642,000 | 33.343049 | 441 | 0.60472 | false |
mandeepdhami/nova | nova/tests/unit/network/test_neutronv2.py | 9 | 172164 | # Copyright 2012 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 requi... | apache-2.0 | -6,244,187,912,866,414,000 | 45.392886 | 79 | 0.54203 | false |
YannThorimbert/PyWorld2D | rendering/tilers/beachtiler.py | 1 | 4188 | from thorpy._utils.images import load_image
from thorpy._utils.interpolation import get_y
from pygame import surfarray
import math, pygame
from PyWorld2D.rendering.tilers.roundtiler import RoundTiler
class BeachTiler(RoundTiler):
def get_round(self, radius, background):
w,h = self.c.get_size()
s... | mit | 8,047,260,886,891,620,000 | 38.140187 | 77 | 0.497851 | false |
agjohnson/readthedocs.org | readthedocs/projects/models.py | 2 | 33611 | import fnmatch
import logging
import os
from urlparse import urlparse
from distlib.version import UnsupportedVersionError
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models
from django.template.defaultfilters import slu... | mit | -5,425,542,423,346,613,000 | 37.72235 | 232 | 0.585701 | false |
unreal666/outwiker | plugins/thumbgallery/thumbgallery/thumbtablegenerator.py | 3 | 3320 | # -*- coding: utf-8 -*-
from outwiker.core.attachment import Attachment
from outwiker.core.defines import PAGE_ATTACH_DIR
from .basethumbgenerator import BaseThumbGenerator
class ThumbTableGenerator (BaseThumbGenerator):
"""
Создание списка превьюшек в виде таблицы
"""
def __init__(self, items, thum... | gpl-3.0 | 478,784,962,868,047,550 | 30.311828 | 214 | 0.616071 | false |
Hazelsuko07/17WarmingUp | py3.6/lib/python3.6/site-packages/click/decorators.py | 204 | 10941 | import sys
import inspect
from functools import update_wrapper
from ._compat import iteritems
from ._unicodefun import _check_for_unicode_literals
from .utils import echo
from .globals import get_current_context
def pass_context(f):
"""Marks a callback as wanting to receive the current context
object as fir... | mit | 6,127,256,563,453,193,000 | 34.990132 | 83 | 0.603875 | false |
tiagofrepereira2012/tensorflow | tensorflow/python/ops/candidate_sampling_ops.py | 55 | 17656 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,976,051,578,467,488,000 | 46.978261 | 80 | 0.699479 | false |
Manojkumar91/odoo_inresto | addons/base_action_rule/__openerp__.py | 7 | 1830 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 3,761,615,691,833,158,700 | 37.93617 | 85 | 0.598361 | false |
vigneras/sequencer | tests/commons.py | 2 | 2223 | # -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) Bull S.A.S (2010, 2011)
# Contributor: Pierre Vignéras <pierre.vigneras@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | gpl-3.0 | -8,575,351,818,712,408,000 | 33.71875 | 96 | 0.642664 | false |
firmlyjin/brython | www/tests/test_storage.py | 17 | 1710 | from browser.local_storage import storage # legacy import
from browser.session_storage import storage as sess_storage # legacy import
from browser.object_storage import ObjectStorage
assert(storage.storage_type == "local_storage")
assert(sess_storage.storage_type == "session_storage")
storage.clear()
sess_storage.c... | bsd-3-clause | -8,325,349,067,438,928,000 | 31.264151 | 81 | 0.683041 | false |
cs-au-dk/Artemis | WebKit/Tools/Scripts/webkitpy/common/memoized_unittest.py | 84 | 2595 | # Copyright (c) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | gpl-3.0 | -8,268,055,736,980,651,000 | 38.923077 | 72 | 0.718304 | false |
psci2195/espresso-ffans | testsuite/python/linear_momentum.py | 5 | 1406 | # Copyright (C) 2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | gpl-3.0 | -7,204,717,658,719,693,000 | 30.244444 | 77 | 0.70128 | false |
jn7163/django | tests/template_tests/syntax_tests/test_exceptions.py | 513 | 2099 | from django.template import TemplateDoesNotExist, TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
from .test_extends import inheritance_templates
class ExceptionsTests(SimpleTestCase):
@setup({'exception01': "{% extends 'nonexistent' %}"})
def test_exception01(self):
... | bsd-3-clause | -3,969,742,796,873,464,300 | 34.576271 | 106 | 0.614578 | false |
fccagou/pynotif | blink1/blink1_pyusb.py | 1 | 4544 | """
blink1_pyusb.py -- blink(1) Python library using PyUSB
Uses "PyUSB 1.0" to do direct USB HID commands
See: https://github.com/walac/pyusb
Linux (Ubuntu/Debian):
% sudo apt-get install pip
% sudo pip install pyusb
Note: will give "not claimed" error or similar. Try blink1.py instead
Mac OS X:
do "brew inst... | gpl-2.0 | 8,607,583,495,215,031,000 | 27.578616 | 134 | 0.548195 | false |
lowitty/server | libsLinux/zope/interface/verify.py | 53 | 4727 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | mit | -3,144,269,730,413,990,400 | 38.391667 | 78 | 0.635075 | false |
Pytwitcher/pytwitcherapi | src/pytwitcherapi/session.py | 1 | 22538 | """API for communicating with twitch"""
from __future__ import absolute_import
import functools
import logging
import os
import threading
import m3u8
import oauthlib.oauth2
import requests
import requests.utils
import requests_oauthlib
from pytwitcherapi.chat import client
from . import constants, exceptions, model... | bsd-3-clause | 8,644,238,967,886,432,000 | 34.717908 | 94 | 0.579643 | false |
kevingu1003/python-pptx | tests/unitutil/file.py | 5 | 1816 | # encoding: utf-8
"""
Utility functions for loading files for unit testing
"""
import os
import sys
from lxml import etree
from pptx.oxml import oxml_parser
_thisdir = os.path.split(__file__)[0]
test_file_dir = os.path.abspath(os.path.join(_thisdir, '..', 'test_files'))
def abspath(relpath):
thisdir = os.pa... | mit | -3,208,002,696,807,196,000 | 23.876712 | 77 | 0.646476 | false |
miguelfervi/SSBW-Restaurantes | restaurantes/lib/python2.7/site-packages/django/contrib/gis/gdal/raster/source.py | 297 | 13274 | import json
import os
from ctypes import addressof, byref, c_double, c_void_p
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.driver import Driver
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.prototypes import raster as capi
from django.contrib.gis... | gpl-3.0 | 1,013,045,836,567,002,400 | 33.21134 | 112 | 0.586937 | false |
sorenk/ansible | lib/ansible/modules/utilities/logic/assert.py | 67 | 1396 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 Dag Wieers <dag@wieers.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',
... | gpl-3.0 | 7,602,586,531,032,118,000 | 25.339623 | 92 | 0.639685 | false |
mavenlin/tensorflow | tensorflow/tools/docs/doc_generator_visitor_test.py | 118 | 4695 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 1,343,566,119,946,677,800 | 42.073394 | 80 | 0.684132 | false |
drexly/tonginBlobStore | lib/django/conf/global_settings.py | 56 | 22768 | # Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
#################... | bsd-3-clause | -7,543,365,572,907,872,000 | 33.973886 | 95 | 0.688686 | false |
guerrerocarlos/odoo | addons/hw_scale/__openerp__.py | 82 | 1646 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 3,161,064,009,058,521,600 | 34.782609 | 98 | 0.605711 | false |
xpansa/stock-logistics-workflow | stock_dropshipping_dual_invoice/wizard/stock_invoice_onshipping.py | 15 | 5807 | # Author: Leonardo Pistone
# Copyright 2015 Camptocamp SA
# Contributor: Pedro M. Baeza
# Copyright 2015 Serv. Tecnol. Avanzados
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software... | agpl-3.0 | 8,017,116,162,977,435,000 | 43.669231 | 79 | 0.576029 | false |
rajalokan/nova | nova/cmd/api.py | 1 | 2267 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a ... | apache-2.0 | -1,020,192,546,242,864,400 | 30.929577 | 77 | 0.681959 | false |
tizianasellitto/servo | tests/wpt/web-platform-tests/tools/pytest/_pytest/pdb.py | 176 | 3491 | """ interactive debugging with PDB, the Python Debugger. """
from __future__ import absolute_import
import pdb
import sys
import pytest
def pytest_addoption(parser):
group = parser.getgroup("general")
group._addoption('--pdb',
action="store_true", dest="usepdb", default=False,
h... | mpl-2.0 | 1,659,689,094,209,355,800 | 31.027523 | 74 | 0.630765 | false |
jwhitlock/web-platform-compat | webplatformcompat/v1/routers.py | 2 | 2122 | # -*- coding: utf-8 -*-
"""URL router for v1 API endpoints."""
from ..routers import GroupedRouter
from .viewsets import (
BrowserViewSet, FeatureViewSet, MaturityViewSet, ReferenceViewSet,
SectionViewSet, SpecificationViewSet, SupportViewSet, VersionViewSet,
HistoricalBrowserViewSet, HistoricalFeatureView... | mpl-2.0 | -213,457,877,990,772,580 | 42.306122 | 75 | 0.791706 | false |
lthall/Leonard_ardupilot | Tools/autotest/param_metadata/xmlemit_mp.py | 10 | 3219 | #!/usr/bin/env python
from xml.sax.saxutils import escape, quoteattr
from emit import Emit
from param import known_param_fields, known_units
from lxml import etree
# Emit ArduPilot documentation in an machine readable XML format for Mission Planner
class XmlEmitMP(Emit):
def __init__(self, *args, **kwargs):
... | gpl-3.0 | 7,220,734,582,377,151,000 | 33.612903 | 111 | 0.541783 | false |
gautam1858/tensorflow | tensorflow/contrib/quantize/python/fold_batch_norms_test.py | 17 | 34203 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -1,430,079,023,461,799,700 | 40.660171 | 80 | 0.621349 | false |
xujun10110/weevely3 | modules/file/cp.py | 16 | 1559 | from core.vectors import PhpCode, ShellCmd, ModuleExec, Os
from core.module import Module
from core import modules
class Cp(Module):
"""Copy single file."""
aliases = [ 'cp', 'copy' ]
def init(self):
self.register_info(
{
'author': [
'Emilio Pinna... | gpl-3.0 | 7,677,617,783,785,371,000 | 26.350877 | 105 | 0.450289 | false |
user-none/calibre | src/calibre/library/__init__.py | 14 | 2490 | __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
''' Code to manage ebook library'''
def db(path=None, read_only=False):
from calibre.db.legacy import LibraryDatabase
from calibre.utils.config import prefs
from calibre.utils.filenames import expanduser
return Libra... | gpl-3.0 | -2,783,064,187,998,156,300 | 30.125 | 79 | 0.627711 | false |
Abhinav117/pymtl | pisa/pisa_inst_slt_test.py | 4 | 5401 | #=========================================================================
# pisa_slt_test.py
#=========================================================================
import pytest
import random
import pisa_encoding
from pymtl import Bits
from PisaSim import PisaSim
from pisa_inst_test_utils import *
#---------... | bsd-3-clause | -8,422,273,537,778,110,000 | 29.342697 | 88 | 0.409924 | false |
Redsift/offlineimap | test/OLItest/TestRunner.py | 10 | 10132 | # Copyright (C) 2012- Sebastian Spaeth & contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# ... | gpl-2.0 | 6,069,789,190,655,798,000 | 38.578125 | 106 | 0.575207 | false |
amunategui/phraug | unshuffle.py | 5 | 1774 | """
Unshuffle previously shuffled file
unshuffle.py input_file.csv output_file.csv <max. lines in memory> <random seed>
"""
import sys
import random
input_file = sys.argv[1]
output_file = sys.argv[2]
try:
lines_in_memory = int( sys.argv[3] )
except IndexError:
lines_in_memory = 100000
print "caching %s lines at... | bsd-2-clause | 4,984,214,858,327,452,000 | 18.293478 | 82 | 0.657835 | false |
bkolowitz/IADSS | ml/receive_logs_direct.py | 2 | 1050 | __author__ = 'parallels'
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.CRITICAL)
import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
channel.exchange_declare(exchange='direct_logs',
... | apache-2.0 | -7,729,519,507,138,006,000 | 25.948718 | 79 | 0.625714 | false |
uwcirg/true_nth_usa_portal | portal/models/qbd.py | 1 | 2760 | """QBD (Questionnaire Bank Details) Module"""
from ..date_tools import FHIR_datetime
class QBD(object):
"""Details needed to define a QB"""
def __init__(
self, relative_start, iteration, recur=None, recur_id=None,
questionnaire_bank=None, qb_id=None):
"""Hold details needed to... | bsd-3-clause | -3,123,563,303,063,146,000 | 39 | 79 | 0.638043 | false |
piquadrat/mygit2 | pygit2/_build.py | 2 | 2071 | # -*- coding: utf-8 -*-
#
# Copyright 2010-2015 The pygit2 contributors
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2,
# as published by the Free Software Foundation.
#
# In addition to the permissions in the GNU General Public Li... | gpl-2.0 | -5,705,474,129,780,079,000 | 31.359375 | 76 | 0.721873 | false |
jaruba/chromium.src | build/android/pylib/utils/json_results_generator_unittest.py | 87 | 7184 | # 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.
#
# Most of this file was ported over from Blink's
# webkitpy/layout_tests/layout_package/json_results_generator_unittest.py
#
import unittest
import json
... | bsd-3-clause | -1,887,563,266,938,508,500 | 32.7277 | 75 | 0.624443 | false |
Aurous/Magic-Discord-Bot | discord/ext/commands/converter.py | 1 | 5485 | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2016 Rapptz
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 u... | gpl-3.0 | 5,802,647,967,647,651,000 | 32.650307 | 86 | 0.632634 | false |
gregmuellegger/django-superform | setup.py | 1 | 1935 | # -*- coding: utf-8 -*-
import codecs
import re
from os import path
from distutils.core import setup
from setuptools import find_packages
def read(*parts):
return codecs.open(path.join(path.dirname(__file__), *parts),
encoding='utf-8').read()
def find_version(*file_paths):
version_fil... | bsd-3-clause | 8,076,160,261,015,798,000 | 32.344828 | 68 | 0.583247 | false |
xgcm/xgcm | xgcm/duck_array_ops.py | 1 | 5381 | """Compatibility module defining operations on duck numpy-arrays.
Shamelessly copied from xarray."""
import numpy as np
try:
import dask.array as dsa
has_dask = True
except ImportError:
has_dask = False
def _dask_or_eager_func(name, eager_module=np, list_of_args=False, n_array_args=1):
"""Create a... | mit | 1,603,314,324,483,543,800 | 32.42236 | 83 | 0.616242 | false |
weisongchen/flaskapp | venv/lib/python2.7/site-packages/mako/ast.py | 61 | 6635 | # mako/ast.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""utilities for analyzing expressions and blocks of Python
code, as well as generating Python from AS... | mit | -4,481,602,628,415,553,000 | 33.73822 | 79 | 0.571515 | false |
Linktime/Aike | Aike/wsgi.py | 1 | 1158 | """
WSGI config for Aike project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION... | apache-2.0 | 6,793,441,147,594,866,000 | 39.357143 | 79 | 0.779793 | false |
agconti/njode | env/lib/python2.7/site-packages/docutils/parsers/rst/languages/ru.py | 128 | 3306 | # -*- coding: utf-8 -*-
# $Id: ru.py 7123 2011-09-12 08:28:31Z milde $
# Author: Roman Suzi <rnd@onego.ru>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be... | bsd-3-clause | -1,019,600,597,342,276,100 | 30.146067 | 78 | 0.689755 | false |
netgroup/dreamer-ryu | ryu/app/rest_quantum.py | 22 | 4625 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp>
#
# 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
#
# h... | apache-2.0 | -531,560,925,888,475,200 | 33.007353 | 74 | 0.635676 | false |
aikramer2/spaCy | spacy/tests/test_underscore.py | 2 | 3265 | # coding: utf-8
from __future__ import unicode_literals
import pytest
from mock import Mock
from ..vocab import Vocab
from ..tokens import Doc, Span, Token
from ..tokens.underscore import Underscore
def test_create_doc_underscore():
doc = Mock()
doc.doc = doc
uscore = Underscore(Underscore.doc_extension... | mit | 8,808,285,871,330,730,000 | 31.979798 | 79 | 0.61562 | false |
BT-csanchez/account-financial-reporting | account_export_csv/wizard/account_export_csv.py | 29 | 16458 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume and Vincent Renaville Copyright 2013
# Camptocamp SA
# CSV data formating inspired from
# http://docs.python.org/2.7/library/csv.html?highlight=csv#examples
#
# This program... | agpl-3.0 | -5,750,514,550,810,660,000 | 38.373206 | 79 | 0.522907 | false |
ybenitezf/miner | core/pydal/adapters/mysql.py | 11 | 5041 | # -*- coding: utf-8 -*-
import re
from .._globals import IDENTITY
from ..helpers.methods import varquote_aux
from .base import BaseAdapter
class MySQLAdapter(BaseAdapter):
drivers = ('MySQLdb','pymysql', 'mysqlconnector')
commit_on_alter_table = True
support_distributed_transaction = True
types = {
... | gpl-2.0 | -4,667,130,244,396,793,000 | 36.066176 | 181 | 0.55485 | false |
ondra-novak/chromium.src | tools/memory_inspector/memory_inspector/data/file_storage.py | 54 | 6131 | # 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.
"""This module handles file-backed storage of the core classes.
The storage is logically organized as follows:
Storage -> N Archives -> 1 Symbol index
... | bsd-3-clause | -2,119,103,366,902,594,600 | 35.5 | 80 | 0.672973 | false |
Adamtaranto/Corset-tools | crossClustCount.py | 1 | 6705 | #!/usr/bin/env python
#python 2.7.5 requires biopython
#crossClustCount.py
#Version 1. Adam Taranto, April 2015
#Contact, Adam Taranto, adam.taranto@anu.edu.au
#Take two transcriptomes and a Corset cluster map.
#Determine number of member transcripts in each cluster that belong to each of the input transcriptomes.
im... | gpl-2.0 | 437,372,407,714,292,500 | 33.56701 | 214 | 0.733781 | false |
tudorvio/tempest | tempest/api_schema/response/compute/v2_1/flavors_access.py | 38 | 1305 | # 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 | -1,881,543,375,747,570,700 | 35.25 | 78 | 0.540996 | false |
pbrod/scipy | benchmarks/benchmarks/go_benchmark_functions/go_benchmark.py | 36 | 6173 | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy import (abs, arctan2, asarray, cos, exp, floor, log, log10,
arange, pi, prod, roll, seterr, sign, sin, sqrt, sum, where,
zeros, tan, tanh, dot)
try:
from sci... | bsd-3-clause | 8,261,286,317,872,168,000 | 28.255924 | 79 | 0.563421 | false |
gtko/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/ninegag.py | 2 | 2542 | from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..utils import str_to_int
class NineGagIE(InfoExtractor):
IE_NAME = '9gag'
_VALID_URL = r'''(?x)^https?://(?:www\.)?9gag\.tv/
(?:
v/(?P<numid>[0-9]+)|
p/(?P<id>[a-zA-Z0-9]+)/(... | gpl-3.0 | 9,066,321,582,136,004,000 | 36.382353 | 257 | 0.556648 | false |
Puppet-Finland/trac | files/xmlrpcplugin/trunk/tracrpc/tests/api.py | 1 | 5895 | # -*- coding: utf-8 -*-
"""
License: BSD
(c) 2009 ::: www.CodeResort.com - BV Network AS (simon-code@bvnetwork.no)
"""
import os
import unittest
import urllib2
from tracrpc.tests import rpc_testenv, TracRpcTestCase
from tracrpc.api import IRPCProtocol
from trac.core import *
from trac.test import Mock
class ... | bsd-2-clause | 7,490,916,042,364,843,000 | 41.717391 | 90 | 0.538931 | false |
Timmenem/micropython | tests/basics/gen_yield_from_ducktype.py | 107 | 1034 | class MyGen:
def __init__(self):
self.v = 0
def __iter__(self):
return self
def __next__(self):
self.v += 1
if self.v > 5:
raise StopIteration
return self.v
def gen():
yield from MyGen()
def gen2():
yield from gen()
print(list(gen()))
print(l... | mit | 8,706,224,144,842,120,000 | 14.666667 | 59 | 0.566731 | false |
chemelnucfin/tensorflow | tensorflow/python/util/decorator_utils.py | 32 | 4132 | # 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 | -8,831,922,577,886,993,000 | 27.496552 | 80 | 0.664811 | false |
scenarios/tensorflow | tensorflow/python/debug/examples/debug_tflearn_iris.py | 23 | 6482 | # 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 | 4,839,842,609,463,682,000 | 33.115789 | 146 | 0.639617 | false |
JakeBrand/CMPUT410-E6 | v1/lib/python2.7/site-packages/django/forms/formsets.py | 49 | 17531 | from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.forms import Form
from django.forms.fields import IntegerField, BooleanField
from django.forms.utils import ErrorList
from django.forms.widgets import HiddenInput
from django.utils.encoding import python_2_unicode_co... | apache-2.0 | 2,191,304,331,088,283,000 | 38.843182 | 116 | 0.594946 | false |
bgxavier/nova | nova/tests/unit/test_matchers.py | 66 | 14015 | # Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | 6,526,949,245,525,276,000 | 29.010707 | 79 | 0.557403 | false |
urisimchoni/samba | python/samba/netcmd/nettime.py | 51 | 2007 | # time
#
# Copyright Jelmer Vernooij 2010 <jelmer@samba.org>
#
# 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 ... | gpl-3.0 | 548,217,110,974,235,200 | 33.016949 | 265 | 0.717489 | false |
Kazade/NeHe-Website | google_appengine/lib/django_1_2/tests/modeltests/m2m_intermediary/models.py | 92 | 1086 | """
9. Many-to-many relationships via an intermediary table
For many-to-many relationships that need extra fields on the intermediary
table, use an intermediary model.
In this example, an ``Article`` can have multiple ``Reporter`` objects, and
each ``Article``-``Reporter`` combination (a ``Writer``) has a ``position`... | bsd-3-clause | -8,243,670,528,941,470,000 | 29.166667 | 75 | 0.692449 | false |
zyq001/ryu | ryu/tests/unit/ofproto/test_inet.py | 63 | 1254 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 1,323,886,490,157,597,700 | 28.162791 | 69 | 0.677033 | false |
sorenk/ansible | lib/ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip.py | 23 | 9251 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Patrick F. Marques <patrickfmarques@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versi... | gpl-3.0 | -6,925,307,800,210,395,000 | 28.182965 | 113 | 0.587288 | false |
vmp32k/litecoin | test/functional/p2p_feefilter.py | 23 | 3614 | #!/usr/bin/env python3
# Copyright (c) 2016-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test processing of feefilter messages."""
from decimal import Decimal
import time
from test_framework... | mit | 4,938,556,353,541,742,000 | 37.042105 | 81 | 0.655506 | false |
orekyuu/intellij-community | python/testData/types/NumpyArrayType/numpy/core/multiarray.py | 79 | 7955 | def array(p_object, dtype=None, copy=True, order=None, subok=False, ndmin=0): # real signature unknown; restored from __doc__
"""
array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0)
Create an array.
Parameters
----------
object : array_like
An arr... | apache-2.0 | 5,882,760,818,275,558,000 | 36.528302 | 125 | 0.55726 | false |
alx-eu/django | django/utils/unittest/loader.py | 109 | 13441 | """Loading unittests."""
import os
import re
import sys
import traceback
import types
import unittest
from fnmatch import fnmatch
from django.utils.unittest import case, suite
try:
from os.path import relpath
except ImportError:
from django.utils.unittest.compatibility import relpath
__unittest = True
de... | bsd-3-clause | 7,199,852,182,510,886,000 | 40.742236 | 123 | 0.595119 | false |
prathapsridharan/health_project | health_project/questions/forms.py | 1 | 2744 | """Contains form class defintions for form for the questions app.
Classes: [
SurveyQuestionForm
]
"""
from django import forms
from django.core.urlresolvers import reverse
from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout
fro... | bsd-3-clause | 8,239,022,131,864,577,000 | 32.876543 | 95 | 0.601676 | false |
christofferpettersson/Aftermath | Code/External/googletest/test/gtest_test_utils.py | 674 | 10826 | #!/usr/bin/env python
#
# Copyright 2006, 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... | mit | 5,319,041,821,276,526,000 | 32.83125 | 79 | 0.673933 | false |
Edraak/edraak-platform | lms/djangoapps/courseware/tests/test_video_mongo.py | 8 | 91387 | # -*- coding: utf-8 -*-
"""
Video xmodule tests in mongo.
"""
import json
from collections import OrderedDict
from uuid import uuid4
from tempfile import mkdtemp
import shutil
import ddt
from django.conf import settings
from django.core.files import File
from django.core.files.base import ContentFile
from django.test... | agpl-3.0 | 1,689,065,152,911,043,600 | 39.96052 | 139 | 0.562699 | false |
gis4dis/poster | apps/processing/pmo/tasks.py | 1 | 3380 | from __future__ import absolute_import, unicode_literals
import os
from datetime import timedelta, datetime
from celery.task import task, group
from celery.utils.log import get_task_logger
from django.conf import settings
from django.core.files.storage import default_storage
from django.core.management import call_co... | bsd-3-clause | -5,991,688,230,447,386,000 | 31.190476 | 89 | 0.654438 | false |
Teagan42/home-assistant | homeassistant/components/vera/scene.py | 7 | 1421 | """Support for Vera scenes."""
import logging
from homeassistant.components.scene import Scene
from homeassistant.util import slugify
from . import VERA_CONTROLLER, VERA_ID_FORMAT, VERA_SCENES
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up t... | apache-2.0 | -3,332,714,053,336,130,000 | 25.811321 | 68 | 0.617171 | false |
Johnetordoff/osf.io | addons/gitlab/tests/test_views.py | 6 | 24875 | # -*- coding: utf-8 -*-
from rest_framework import status as http_status
import mock
import datetime
import pytest
import unittest
from json import dumps
from nose.tools import * # noqa (PEP8 asserts)
from tests.base import OsfTestCase, get_default_metaschema
from osf_tests.factories import ProjectFactory, UserFacto... | apache-2.0 | 5,601,016,832,235,433,000 | 41.161017 | 139 | 0.600482 | false |
mjharriso/ConDistAreas | ConDistAreas.py | 1 | 4102 | #Coded by Matthew Harrison, July, 2015.
#Read ESRI shapefiles and calculate district areas
#Using Albers Equal Area Projection for North America
#Including Alaska and Hawaii
from mpl_toolkits.basemap import Basemap
from pyproj import Proj
from shapely.geometry import LineString, Point, shape
import fiona
from fiona im... | gpl-2.0 | 2,235,025,141,369,193,000 | 34.669565 | 111 | 0.520722 | false |
kuba1/qtcreator | tests/system/suite_editors/tst_basic_cpp_support/test.py | 6 | 6126 | #############################################################################
##
## Copyright (C) 2015 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing
##
## This file is part of Qt Creator.
##
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance wit... | lgpl-2.1 | 1,493,325,976,641,472,000 | 48.403226 | 125 | 0.696703 | false |
MumbleFysh/vinty | packages/pki/util.py | 3 | 6819 | #!/usr/bin/python
## Revision history ############################################################
__author__ = 'Wouter Eerdekens <info@fks.be>'
__date__ = '2011-08-12'
__version__ = 0.1
__history__ = """
2011-08-12 - Prepare for initial release <jeroen.hooyberghs@fks.be>
2006-07-26 - initial version.
"""
########... | gpl-2.0 | 1,796,298,826,575,722,200 | 32.426471 | 80 | 0.466784 | false |
clintecker/django-google-analytics | google_analytics/templatetags/analytics.py | 3 | 2204 | from django import template
from django.conf import settings
from django.db import models
from django.contrib.sites.models import Site
from django.template import Context, loader
register = template.Library()
Analytics = models.get_model('googleanalytics', 'analytics')
def do_get_analytics(parser, token):
conte... | mit | -5,618,479,040,791,165,000 | 32.393939 | 103 | 0.567151 | false |
DevOps4Networks/iox-utils | fog-director-utils/src/iox_fog_dir_rest/functions.py | 1 | 2610 | #! /usr/bin/env python
# encoding: utf-8
"""
Copyright 2016 Nathan John Sowatskey
These are sample functions for the Cisco Fog Director REST API.
See:
http://www.cisco.com/c/en/us/td/docs/routers/access/800/software/guides/iox/fog-director/reference-guide/1-0/fog_director_ref_guide.html
Licensed under the Apache L... | apache-2.0 | -2,387,345,474,645,847,600 | 27.692308 | 136 | 0.648276 | false |
simonkuang/grpc | src/python/grpcio_tests/tests/interop/_intraop_test_case.py | 27 | 1865 | # Copyright 2015 gRPC 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 applicable law or agreed to in writing... | apache-2.0 | -6,934,174,468,114,294,000 | 35.568627 | 80 | 0.737802 | false |
akamajoris/webshell | php/php-sh/client.py | 26 | 1279 | #!/usr/bin/python
# Client for the backdoor which
# uses HTTP CODE header for inserting code
# Got the idea after seeing this sort of payload
# dropped by a phpmyadmin exploit on rdot :)
# Is also good to learn how to use urllib
# and not be lazy arse with requests all of time!
# Insecurety Research (2013) - insecurety... | gpl-3.0 | -7,590,533,127,446,418,000 | 30.195122 | 70 | 0.566067 | false |
vismantic-ohtuprojekti/qualipy | qualipy/filters/svm_filter.py | 2 | 2714 | import os.path
import numpy
from filter import Filter
from ..utils.svm import SVM
class SVMFilter(Filter):
"""An abstract class representing a filter that uses SVM"""
def __init__(self, threshold, invert_threshold, svm_file):
super(SVMFilter, self).__init__(threshold, invert_threshold)
if... | mit | 55,742,542,234,857,710 | 30.929412 | 76 | 0.585114 | false |
Contraz/demosys-py | demosys/loaders/scene/gltf.py | 1 | 24715 | # Spec: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#asset
import base64
import io
import json
import os
import struct
from collections import namedtuple
import numpy
from PIL import Image
from pyrr import Matrix44, matrix44, quaternion
import moderngl
from demosys import context
from ... | isc | 6,834,276,084,791,598,000 | 33.278779 | 113 | 0.577665 | false |
tanglei528/nova | nova/api/openstack/compute/plugins/v3/hosts.py | 13 | 13924 | # 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 | -985,041,413,627,025,200 | 42.108359 | 79 | 0.541798 | false |
ringo-framework/ringo | ringo/views/home.py | 3 | 1347 | import pkg_resources
from pyramid.view import view_config
from ringo.lib.helpers import (
get_ringo_version,
get_app_version,
get_app_name,
get_app_title
)
from ringo.lib.renderer import (
DTListRenderer
)
@view_config(route_name='home', renderer='/index.mako')
def index_view(request):
value... | gpl-2.0 | -4,365,988,424,881,281,000 | 25.94 | 60 | 0.68003 | false |
sagangwee/sagangwee.github.io | build/pygments/build/lib.linux-i686-2.7/pygments/lexers/python.py | 43 | 36222 | # -*- coding: utf-8 -*-
"""
pygments.lexers.python
~~~~~~~~~~~~~~~~~~~~~~
Lexers for Python and related languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, include, bygro... | mit | -7,774,714,492,993,996,000 | 42.431655 | 95 | 0.471316 | false |
mahabuber/erpnext | erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py | 13 | 3362 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from frappe.utils import flt, today
from erpnext.accounts.utils import get_fiscal_year
from erpnext.accounts.doctype.jour... | agpl-3.0 | 4,199,513,508,491,927,000 | 38.552941 | 99 | 0.703748 | false |
ComputationalPhysics/atomify-lammps | libs/lammps/tools/moltemplate/moltemplate/ttree_matrix_stack.py | 8 | 36977 | # Author: Andrew Jewett (jewett.aij@gmail.com)
# http://www.chem.ucsb.edu/~sheagroup
# License: 3-clause BSD License (See LICENSE.TXT)
# Copyright (c) 2012, Regents of the University of California
# All rights reserved.
import random, math
from collections import deque
from array import array
try:
from .... | gpl-3.0 | 9,162,707,313,660,048,000 | 42.967895 | 125 | 0.458718 | false |
ehashman/oh-mainline | vendor/packages/gdata/src/gdata/apps/emailsettings/service.py | 95 | 8939 | #!/usr/bin/python
#
# Copyright (C) 2008 Google, 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... | agpl-3.0 | 3,687,528,131,869,379,600 | 32.859848 | 86 | 0.675691 | false |
HKUST-SING/tensorflow | tensorflow/examples/learn/mnist.py | 45 | 3999 | # 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 appl... | apache-2.0 | 9,169,153,697,826,781,000 | 35.027027 | 101 | 0.68092 | false |
shiblon/pytour | static/js/pypyjs/pypy-nojit.js-0.3.1/lib/modules/tabnanny.py | 394 | 11336 | #! /usr/bin/env python
"""The Tab Nanny despises ambiguous indentation. She knows no mercy.
tabnanny -- Detection of ambiguous indentation
For the time being this module is intended to be called as a script.
However it is possible to import it into an IDE and use the function
check() described below.
Warning: The ... | apache-2.0 | -2,839,696,845,102,013,000 | 33.455927 | 81 | 0.554781 | 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.