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 |
|---|---|---|---|---|---|---|---|---|---|---|
jocelynmass/nrf51 | toolchain/deprecated/arm_cm0_4.9/arm-none-eabi/share/gdb/python/gdb/printing.py | 12 | 10681 | # Pretty-printer utilities.
# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any l... | gpl-2.0 | -6,953,577,840,301,249,000 | 37.283154 | 87 | 0.642075 | false |
cosurgi/trunk | examples/HydroForceEngine/validations/DEMCoupling/Maurinetal2015/validMaurin2015.py | 2 | 17210 | from __future__ import print_function
#########################################################################################################################################################################
# Author: Raphael Maurin, raphael.maurin@imft.fr
# 24/11/2017
#
# Reproduce the experimental comparison of Mauri... | gpl-2.0 | -6,398,240,255,926,124,000 | 52.117284 | 462 | 0.713016 | false |
russel1237/scikit-learn | sklearn/decomposition/__init__.py | 147 | 1421 | """
The :mod:`sklearn.decomposition` module includes matrix decomposition
algorithms, including among others PCA, NMF or ICA. Most of the algorithms of
this module can be regarded as dimensionality reduction techniques.
"""
from .nmf import NMF, ProjectedGradientNMF
from .pca import PCA, RandomizedPCA
from .incrementa... | bsd-3-clause | -6,501,102,151,206,991,000 | 34.525 | 79 | 0.651654 | false |
ddurando/my_pox | pox/lib/packet/icmp.py | 39 | 7027 | # Copyright 2011 James McCauley
# Copyright 2008 (C) Nicira, 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 ap... | apache-2.0 | 7,058,090,457,521,800,000 | 29.158798 | 77 | 0.444713 | false |
Ictp/indico | bin/migration/CategoryDate.py | 1 | 2445 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; eith... | gpl-3.0 | 2,642,909,173,305,405,400 | 33.43662 | 117 | 0.683845 | false |
MisterPup/Ceilometer-Juno-Extension | ceilometer/network/services/fwaas.py | 6 | 3146 | #
# Copyright 2014 Cisco Systems,Inc.
#
# Author: Pradeep Kilambi <pkilambi@cisco.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | apache-2.0 | -5,411,800,624,238,291,000 | 31.102041 | 75 | 0.567069 | false |
raycarnes/account-financial-tools | account_credit_control/invoice.py | 24 | 2923 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Vincent Renaville
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# p... | agpl-3.0 | -4,911,581,636,510,372,000 | 40.757143 | 78 | 0.566541 | false |
leedm777/ansible | lib/ansible/executor/task_executor.py | 10 | 22095 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | -8,140,746,665,021,616,000 | 41.572254 | 163 | 0.591853 | false |
camellhf/three.js | utils/exporters/blender/addons/io_three/exporter/_json.py | 296 | 6976 | import json
from .. import constants
ROUND = constants.DEFAULT_PRECISION
## THREE override function
def _json_floatstr(o):
if ROUND is not None:
o = round(o, ROUND)
return '%g' % o
def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
_key_separator, _item_separator,... | mit | -4,054,689,315,372,641,000 | 32.538462 | 77 | 0.505877 | false |
Venturi/cms | env/lib/python2.7/site-packages/app_data/forms.py | 2 | 9733 | try:
from operator import methodcaller
except ImportError:
methodcaller = lambda name: lambda o: getattr(o, name)()
from django.forms.forms import NON_FIELD_ERRORS, Form
from django.forms.formsets import formset_factory
from django.forms.models import modelform_factory, _get_foreign_key, BaseInlineFormSet, Bas... | gpl-2.0 | 6,381,441,405,183,886,000 | 34.915129 | 131 | 0.590671 | false |
rahul67/hue | desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/SelfTest/PublicKey/test_ElGamal.py | 112 | 8507 | # -*- coding: utf-8 -*-
#
# SelfTest/PublicKey/test_ElGamal.py: Self-test for the ElGamal primitive
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone ... | apache-2.0 | -9,013,858,361,202,461,000 | 39.509524 | 146 | 0.645468 | false |
B-MOOC/edx-platform | lms/djangoapps/course_wiki/middleware.py | 84 | 4980 | """Middleware for course_wiki"""
from urlparse import urlparse
from django.conf import settings
from django.http import Http404
from django.shortcuts import redirect
from django.core.exceptions import PermissionDenied
from wiki.models import reverse
from courseware.courses import get_course_with_access
from courseware... | agpl-3.0 | -8,232,451,281,124,001,000 | 47.823529 | 134 | 0.63755 | false |
matuu/pyafipws | formatos/formato_json.py | 16 | 1324 | #!/usr/bin/python
# -*- coding: latin-1 -*-
# 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, or (at your option) any later
# version.
#
# This program is distributed in the hope... | gpl-3.0 | 5,492,723,259,457,120,000 | 29.090909 | 87 | 0.69713 | false |
wbchen99/bitcoin-hnote0 | qa/rpc-tests/test_framework/bignum.py | 123 | 1929 | #!/usr/bin/env python3
#
# bignum.py
#
# This file is copied from python-bitcoinlib.
#
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
"""Bignum routines"""
import struct
# generic big endian MPI format
def bn_bytes(v, have... | mit | -3,723,150,927,238,734,000 | 18.09901 | 69 | 0.515811 | false |
Innovahn/cybex | addons/crm/base_partner_merge.py | 75 | 30912 | #!/usr/bin/env python
from __future__ import absolute_import
from email.utils import parseaddr
import functools
import htmlentitydefs
import itertools
import logging
import operator
import psycopg2
import re
from ast import literal_eval
from openerp.tools import mute_logger
# Validation Library https://pypi.python.org... | agpl-3.0 | 6,615,387,716,639,058,000 | 38.228426 | 221 | 0.526171 | false |
dagwieers/ansible | test/integration/targets/module_utils/library/test.py | 172 | 2948 | #!/usr/bin/python
# Most of these names are only available via PluginLoader so pylint doesn't
# know they exist
# pylint: disable=no-name-in-module
results = {}
# Test import with no from
import ansible.module_utils.foo0
results['foo0'] = ansible.module_utils.foo0.data
# Test depthful import with no from
import ansib... | gpl-3.0 | -5,801,573,523,051,588,000 | 33.682353 | 94 | 0.764247 | false |
anirudhjayaraman/scikit-learn | sklearn/semi_supervised/tests/test_label_propagation.py | 307 | 1974 | """ test the label propagation module """
import nose
import numpy as np
from sklearn.semi_supervised import label_propagation
from numpy.testing import assert_array_almost_equal
from numpy.testing import assert_array_equal
ESTIMATORS = [
(label_propagation.LabelPropagation, {'kernel': 'rbf'}),
(label_propa... | bsd-3-clause | -5,975,825,155,947,355,000 | 34.890909 | 78 | 0.575481 | false |
B-MOOC/edx-platform | lms/envs/static.py | 100 | 2249 | """
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 intentionally define lot... | agpl-3.0 | -5,361,306,783,152,093,000 | 33.6 | 95 | 0.645176 | false |
tvalacarta/tvalacarta | python/main-classic/core/jsontools.py | 3 | 10591 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# tvalacarta 4
# Copyright 2015 tvalacarta@gmail.com
# http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
# --------... | gpl-3.0 | 2,433,836,792,735,627,000 | 35.647059 | 108 | 0.578942 | false |
ccomb/OpenUpgrade | openerp/report/render/html2html/html2html.py | 443 | 4238 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | 4,259,063,433,999,096,000 | 43.610526 | 139 | 0.510854 | false |
Danielhiversen/home-assistant | homeassistant/components/sensor/nut.py | 6 | 12534 | """
Provides a sensor to track various status aspects of a UPS.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.nut/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_S... | mit | 7,988,404,267,614,180,000 | 38.790476 | 78 | 0.613212 | false |
mmauroy/SickRage | tornado/test/simple_httpclient_test.py | 20 | 22936 | from __future__ import absolute_import, division, print_function, with_statement
import collections
from contextlib import closing
import errno
import gzip
import logging
import os
import re
import socket
import sys
from tornado import gen
from tornado.httpclient import AsyncHTTPClient
from tornado.httputil import HT... | gpl-3.0 | 7,290,728,775,208,591,000 | 38.341338 | 91 | 0.619245 | false |
nlloyd/SubliminalCollaborator | libs/twisted/scripts/test/test_scripts.py | 6 | 5896 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for the command-line scripts in the top-level I{bin/} directory.
Tests for actual functionality belong elsewhere, written in a way that doesn't
involve launching child processes.
"""
from os import devnull, getcwd, chdir
from sys impor... | apache-2.0 | -346,508,912,140,995,700 | 32.123596 | 80 | 0.62924 | false |
mlizhenbin/zookeeper | src/contrib/zkpython/src/test/clientid_test.py | 164 | 1739 | #!/usr/bin/python
#
# 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
# "Lic... | apache-2.0 | -3,678,927,291,749,196,000 | 35.229167 | 95 | 0.682001 | false |
russss/Diamond | src/diamond/utils/scheduler.py | 15 | 3642 | # coding=utf-8
import time
import math
import multiprocessing
import os
import random
import sys
import signal
try:
from setproctitle import getproctitle, setproctitle
except ImportError:
setproctitle = None
from diamond.utils.signals import signal_to_exception
from diamond.utils.signals import SIGALRMExcept... | mit | -7,666,579,179,759,621,000 | 30.396552 | 79 | 0.628501 | false |
felix-d/fabric | tests/test_project.py | 3 | 5218 | import unittest
import os
import fudge
from fudge.inspector import arg
from fabric.contrib import project
class UploadProjectTestCase(unittest.TestCase):
"""Test case for :func: `fabric.contrib.project.upload_project`."""
fake_tmp = "testtempfolder"
def setUp(self):
fudge.clear_expectations()... | bsd-2-clause | -1,959,539,721,697,529,000 | 31.409938 | 80 | 0.556152 | false |
delete/estofadora | estofadora/statement/tests/test_views.py | 1 | 17443 | # conding: utf-8
import datetime
from datetime import timedelta
from django.core.urlresolvers import reverse
from . import TestBase, CashForm, Cash, make_validated_form, create_cash
class HomeViewTest(TestBase):
def setUp(self):
self.login()
self.url = reverse('statement:home')
self.res... | mit | 2,709,139,437,443,760,000 | 29.707746 | 79 | 0.618679 | false |
dantebarba/docker-media-server | plex/Subliminal.bundle/Contents/Libraries/Shared/guessit/options.py | 39 | 4547 | from argparse import ArgumentParser
def build_opts(transformers=None):
opts = ArgumentParser()
opts.add_argument(dest='filename', help='Filename or release name to guess', nargs='*')
naming_opts = opts.add_argument_group("Naming")
naming_opts.add_argument('-t', '--type', dest='type', default=None,
... | gpl-3.0 | 5,032,554,559,747,992,000 | 64.898551 | 132 | 0.621289 | false |
mavit/ansible-modules-extras | source_control/gitlab_user.py | 14 | 12435 | #!/usr/bin/python
# (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl)
#
# 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... | gpl-3.0 | 6,830,851,823,897,154,000 | 34.732759 | 150 | 0.605227 | false |
scalyr/scalyr-agent-2 | scalyr_agent/third_party/pysnmp/smi/error.py | 2 | 1778 | from pyasn1.error import PyAsn1Error
from pysnmp.error import PySnmpError
class SmiError(PySnmpError, PyAsn1Error): pass
class MibLoadError(SmiError): pass
class MibNotFoundError(MibLoadError): pass
class MibOperationError(SmiError):
def __init__(self, **kwargs): self.__outArgs = kwargs
def __str__(self): ret... | apache-2.0 | -1,774,098,527,546,852,600 | 40.348837 | 75 | 0.791901 | false |
ononeor12/python-social-auth | examples/django_me_example/example/wsgi.py | 114 | 1131 | """
WSGI config for dj 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`` setti... | bsd-3-clause | 1,349,461,657,298,928,600 | 39.392857 | 79 | 0.799293 | false |
stormi/tsunami | src/secondaires/navigation/equipage/ordres/feu.py | 1 | 2632 | # -*-coding:Utf-8 -*
# Copyright (c) 2013 LE GOFF Vincent
# 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
# lis... | bsd-3-clause | 2,615,711,224,934,458,400 | 37.602941 | 79 | 0.709714 | false |
mrjacobagilbert/gnuradio | gr-blocks/python/blocks/qa_tag_share.py | 5 | 1801 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import gr, gr_unittest
from gnuradio import blocks
import pmt
class qa_tag_share(gr_unittest.TestCase):
def setUp(sel... | gpl-3.0 | -1,267,808,093,579,282,700 | 27.140625 | 75 | 0.590783 | false |
n0trax/ansible | contrib/inventory/gce.py | 47 | 18346 | #!/usr/bin/env python
# Copyright 2013 Google Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ... | gpl-3.0 | -4,439,272,736,873,250,000 | 35.114173 | 100 | 0.585305 | false |
mozilla/stoneridge | python/src/Lib/plat-mac/Carbon/Appearance.py | 81 | 27268 | # Generated from 'Appearance.h'
def FOUR_CHAR_CODE(x): return x
kAppearanceEventClass = FOUR_CHAR_CODE('appr')
kAEAppearanceChanged = FOUR_CHAR_CODE('thme')
kAESystemFontChanged = FOUR_CHAR_CODE('sysf')
kAESmallSystemFontChanged = FOUR_CHAR_CODE('ssfn')
kAEViewsFontChanged = FOUR_CHAR_CODE('vfnt')
kThemeDataFileType =... | mpl-2.0 | 5,484,531,764,314,832,000 | 41.080247 | 95 | 0.859946 | false |
kingmotley/SickRage | lib/tornado/test/curl_httpclient_test.py | 107 | 4477 | from __future__ import absolute_import, division, print_function, with_statement
from hashlib import md5
from tornado.escape import utf8
from tornado.httpclient import HTTPRequest
from tornado.stack_context import ExceptionStackContext
from tornado.testing import AsyncHTTPTestCase
from tornado.test import httpclient_... | gpl-3.0 | -4,886,232,153,120,685,000 | 35.398374 | 80 | 0.592138 | false |
Arcanemagus/plexpy | lib/chardet/escprober.py | 289 | 3950 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | gpl-3.0 | -1,089,452,967,423,741,600 | 38.108911 | 81 | 0.629367 | false |
hobarrera/django | tests/m2m_recursive/models.py | 410 | 1120 | """
Many-to-many relationships between the same two tables
In this example, a ``Person`` can have many friends, who are also ``Person``
objects. Friendship is a symmetrical relationship - if I am your friend, you
are my friend. Here, ``friends`` is an example of a symmetrical
``ManyToManyField``.
A ``Person`` can als... | bsd-3-clause | 6,159,638,305,870,584,000 | 36.333333 | 86 | 0.747321 | false |
thresholdsoftware/asylum | openerp/addons/account_anglo_saxon/product.py | 51 | 3427 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | agpl-3.0 | 2,153,605,303,603,323,400 | 39.317647 | 111 | 0.59965 | false |
ping/youtube-dl | youtube_dl/extractor/cbssports.py | 22 | 1486 | from __future__ import unicode_literals
from .cbs import CBSBaseIE
class CBSSportsIE(CBSBaseIE):
_VALID_URL = r'https?://(?:www\.)?cbssports\.com/[^/]+/(?:video|news)/(?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://www.cbssports.com/nba/video/donovan-mitchell-flashes-star-potential-in-game-2-victory-o... | unlicense | -2,314,361,434,866,137,600 | 38.105263 | 139 | 0.574697 | false |
wadadaaa/marta | config/settings/local.py | 1 | 1961 | # -*- coding: utf-8 -*-
'''
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
'''
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bool('DJANGO_DEBUG', default... | bsd-3-clause | 5,888,651,476,352,859,000 | 30.629032 | 110 | 0.487506 | false |
pshchelo/heat | contrib/heat_keystone/heat_keystone/resources/service.py | 2 | 3670 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | 2,303,221,453,439,481,600 | 30.101695 | 78 | 0.569755 | false |
kingland/go-v8 | v8-3.28/build/gyp/test/intermediate_dir/gyptest-intermediate-dir.py | 243 | 1398 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that targets have independent INTERMEDIATE_DIRs.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('test.gyp', chdir=... | mit | 6,475,676,815,266,629,000 | 32.285714 | 80 | 0.753934 | false |
gautamMalu/rootfs_xen_arndale | usr/lib/python2.7/io.py | 53 | 3321 | """The io module provides the Python interfaces to stream handling. The
builtin open function is defined in this module.
At the top of the I/O hierarchy is the abstract base class IOBase. It
defines the basic interface to a stream. Note, however, that there is no
separation between reading and writing to streams; impl... | gpl-2.0 | 6,764,215,280,711,806,000 | 35.9 | 76 | 0.714845 | false |
SaschaMester/delicium | sync/tools/testserver/sync_testserver.py | 24 | 20023 | #!/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.
"""This is a python sync server used for testing Chrome Sync.
By default, it listens on an ephemeral port and xmpp_port and sends the ... | bsd-3-clause | 4,218,069,610,775,367,700 | 34.564831 | 80 | 0.666683 | false |
jasondunsmore/heat | heat/tests/openstack/neutron/lbaas/test_health_monitor.py | 2 | 7098 | #
# Copyright 2015 IBM Corp.
#
# 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 agr... | apache-2.0 | 8,709,513,169,079,037,000 | 40.267442 | 78 | 0.650042 | false |
bergzand/RIOT-graphs | riot-graph.py | 1 | 2915 | #!/usr/bin/env python3
import logging
from logging import StreamHandler
from docopt import docopt
from riot_graphs.rg import RiotGraph
from riot_graphs import server
def fetch(args, graphs):
days = None
if args['--days']:
try:
days = int(args['--days'])
except:
raise ... | gpl-3.0 | -8,641,002,735,455,443,000 | 30.684783 | 77 | 0.558834 | false |
PhilSk/zulip | contrib_bots/bots/encrypt/tests.py | 15 | 1168 | import encrypt_bot
def test():
for cmd, expected_response in sample_conversation():
message = {'content': cmd, 'subject': 'foo',
'display_recipient': 'bar'}
class ClientDummy(object):
def __init__(self):
self.output = ''
def send_message(... | apache-2.0 | -9,003,066,710,505,654,000 | 34.393939 | 91 | 0.543664 | false |
alrusdi/lettuce | tests/integration/lib/Django-1.3/tests/modeltests/update/tests.py | 89 | 4252 | from django.test import TestCase
from models import A, B, C, D, DataPoint, RelatedPoint
class SimpleTest(TestCase):
def setUp(self):
self.a1 = A.objects.create()
self.a2 = A.objects.create()
for x in range(20):
B.objects.create(a=self.a1)
D.objects.create(a=self.a1... | gpl-3.0 | 6,542,792,371,768,366,000 | 35.655172 | 81 | 0.614064 | false |
subodhchhabra/airflow | airflow/utils/operator_resources.py | 9 | 3778 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 2,053,703,733,452,437,800 | 29.967213 | 88 | 0.640815 | false |
nicproulx/mne-python | mne/preprocessing/tests/test_xdawn.py | 3 | 7741 | # Authors: Alexandre Barachant <alexandre.barachant@gmail.com>
# Jean-Remi King <jeanremi.king@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
import os.path as op
from nose.tools import assert_equal, assert_raises, assert_true
from numpy.testing import assert_array_equal, assert_array_almost_equal
... | bsd-3-clause | 8,307,803,297,096,489,000 | 34.347032 | 76 | 0.63829 | false |
MiLk/ansible | lib/ansible/modules/network/cloudengine/ce_vrf_af.py | 47 | 30552 | #!/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 | -7,425,126,275,113,080,000 | 34.901293 | 120 | 0.52769 | false |
wkritzinger/asuswrt-merlin | release/src/router/wget/testenv/conf/expected_files.py | 17 | 1873 | from difflib import unified_diff
import os
import sys
from conf import hook
from exc.test_failed import TestFailed
""" Post-Test Hook: ExpectedFiles
This is a Post-Test hook that checks the test directory for the files it
contains. A dictionary object is passed to it, which contains a mapping of
filenames and contents... | gpl-2.0 | -3,847,775,787,411,924,000 | 35.72549 | 79 | 0.557928 | false |
kyle-long/pyshelf | tests/functional_test_base.py | 2 | 10117 | from boto.s3.key import Key
from mock import Mock
from moto import mock_s3
from pyproctor import MonkeyPatcher
from shelf.app import app
from shelf.error_code import ErrorCode
from shelf.metadata.initializer import Initializer
from shelf.resource_identity import ResourceIdentity
from shelf.search.container import Conta... | mit | 7,328,168,868,679,299,000 | 35.261649 | 111 | 0.607987 | false |
marguslaak/django-xadmin | demo_app/demo/settings.py | 1 | 5983 | # Django settings for wictrl project.
import sys
import os.path
reload(sys)
sys.setdefaultencoding('utf-8')
gettext = lambda s: s
PROJECT_ROOT = os.path.join(
os.path.realpath(os.path.dirname(__file__)), os.pardir)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
... | bsd-3-clause | 6,661,683,895,117,217,000 | 31.166667 | 121 | 0.665385 | false |
Aqkotz/Picture | ggame/pygamedeps.py | 228 | 12266 | def module_exists(module_name):
try:
__import__(module_name)
except ImportError:
return False
else:
return True
# PYTHON 3 and PYGAME DEPENDENCIES
if module_exists('pygame'):
import pygame
class _body(object):
def __init__(self):
self.events = {}
def appe... | mit | -2,271,290,478,853,929,200 | 22.863813 | 161 | 0.535382 | false |
pschmitt/home-assistant | homeassistant/components/twilio_call/notify.py | 25 | 1882 | """Twilio Call platform for notify component."""
import logging
import urllib
from twilio.base.exceptions import TwilioRestException
import voluptuous as vol
from homeassistant.components.notify import (
ATTR_TARGET,
PLATFORM_SCHEMA,
BaseNotificationService,
)
from homeassistant.components.twilio import D... | apache-2.0 | 1,123,556,845,485,437,000 | 27.953846 | 73 | 0.6339 | false |
hajgato/easybuild-easyblocks | easybuild/easyblocks/q/qt.py | 1 | 3295 | ##
# Copyright 2013 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://w... | gpl-2.0 | 4,876,349,679,193,361,000 | 37.764706 | 122 | 0.647951 | false |
matiasherranz/keyczar | cpp/src/tools/swtoolkit/test/component_targets_xml_test.py | 18 | 3997 | #!/usr/bin/python2.4
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | apache-2.0 | 7,961,805,652,640,711,000 | 30.722222 | 72 | 0.695021 | false |
codekaki/odoo | addons/auth_ldap/users_ldap.py | 19 | 10782 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | agpl-3.0 | 467,200,407,016,139,260 | 36.964789 | 99 | 0.5665 | false |
lukas-hetzenecker/home-assistant | homeassistant/components/sensor/darksky.py | 1 | 11778 | """
Support for Dark Sky weather service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.darksky/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from requests.exceptions import ConnectionError as ConnectError, \
HT... | mit | -4,618,141,984,625,826,000 | 37.218241 | 79 | 0.567033 | false |
ppietrasa/grpc | tools/run_tests/run_tests.py | 1 | 54046 | #!/usr/bin/env python2.7
# Copyright 2015, 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 lis... | bsd-3-clause | 6,382,005,632,886,984,000 | 34.44 | 148 | 0.599619 | false |
dorbarker/cgmlst_autocreate | json2csv.py | 1 | 2163 | import argparse
import csv
import os
import json
def arguments():
parser = argparse.ArgumentParser()
parser.add_argument('-j', '--jsons', help = 'Path to JSON directory')
parser.add_argument('-o', '--out', help = 'CSV output file path.')
parser.add_argument('-t', '--test', help = 'Name of the MIST t... | gpl-3.0 | 3,330,007,905,797,742,600 | 21.298969 | 76 | 0.563107 | false |
tedunderwood/GenreProject | python/workshop/bagofwords.py | 2 | 6896 | # bagofwords.py
#
# The BagOfWords class implements individual volumes as ordered
# lists of features.
#
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
def all_nonalphanumeric(astring):
nonalphanum = True
for character in astring:
if character.isalpha() or character.isdigi... | mit | -1,069,651,461,762,286,700 | 28.587983 | 82 | 0.725558 | false |
brucetsao/arduino-ameba | arduino-core/src/processing/app/i18n/python/requests/cookies.py | 209 | 14024 | # -*- coding: utf-8 -*-
"""
Compatibility code to be able to use `cookielib.CookieJar` with requests.
requests.utils imports from here, so be careful with imports.
"""
import collections
from .compat import cookielib, urlparse, Morsel
try:
import threading
# grr, pyflakes: this fixes "redefinition of unused... | lgpl-2.1 | 8,969,604,771,697,677,000 | 35.425974 | 111 | 0.631346 | false |
Jaiz909/youtube-dl | youtube_dl/extractor/npo.py | 9 | 12703 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
fix_xml_ampersands,
parse_duration,
qualities,
strip_jsonp,
unified_strdate,
url_basename,
)
class NPOBaseIE(InfoExtractor):
def _get_token(self, video_id):
token_page = self._download_... | unlicense | 3,196,632,285,564,340,000 | 33.613079 | 111 | 0.470046 | false |
YISION/yision.github.io | randomforest-决策树与随机森林/f.py | 1 | 2724 | #encoding=utf8
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#导入数据集与设定因变量及响应变量#
data=pd.read_csv('data.csv')
#data=pd.read_csv('data_p.csv')
df=pd.DataFrame(data)
df=df.dropna()#去除缺失值#
y=df.BAD
x=pd.concat([df.LOAN,df.MORTDUE,df.VALUE,df.YOJ... | mit | -5,018,663,071,512,267,000 | 30.164557 | 211 | 0.748985 | false |
Markus-Goetz/CDS-Invenio-Authorlist | modules/websearch/lib/websearch_external_collections_templates.py | 6 | 7128 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License,... | gpl-2.0 | -9,087,790,176,465,925,000 | 35.367347 | 123 | 0.588945 | false |
llhe/tensorflow | tensorflow/contrib/keras/python/keras/datasets/cifar.py | 86 | 1542 | # 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,472,946,156,435,337,000 | 28.09434 | 80 | 0.649157 | false |
Wopple/fimbulvetr | src/client/fx.py | 1 | 3637 | import os
import sys
import pygame
from common.constants import *
from client.constants import *
from common import boundint
from common.util.rect import Rect
class FX(object):
def __init__(self, inPos, inFacing, inType):
self.preciseLoc = inPos
self.facingRight = inFacing
self.frames = ... | bsd-3-clause | 4,996,637,866,912,933,000 | 25.940741 | 72 | 0.375584 | false |
troya2/pjsip | pjsip-apps/src/pygui/application.py | 24 | 15342 | # $Id: application.py 4798 2014-03-19 21:20:17Z bennylp $
#
# pjsua Python GUI Demo
#
# Copyright (C)2013 Teluu Inc. (http://www.teluu.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; eith... | gpl-2.0 | -8,267,910,289,050,162,000 | 28.056818 | 125 | 0.689089 | false |
rockyzhang/zhangyanhit-python-for-android-mips | python-modules/twisted/twisted/words/xish/xmlstream.py | 54 | 8534 | # -*- test-case-name: twisted.words.test.test_xmlstream -*-
#
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
XML Stream processing.
An XML Stream is defined as a connection over which two XML documents are
exchanged during the lifetime of the connection, one for each direction. ... | apache-2.0 | 5,994,862,541,366,651,000 | 31.697318 | 79 | 0.638739 | false |
YuriGural/erpnext | erpnext/schools/doctype/student_applicant/student_applicant.py | 22 | 1107 | # -*- coding: utf-8 -*-777777yyy
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
class StudentApplicant(Document):
def autoname(self):
f... | gpl-3.0 | 1,911,846,965,969,197,800 | 33.59375 | 131 | 0.732611 | false |
mbareta/edx-platform-ft | cms/djangoapps/contentstore/management/commands/migrate_to_split.py | 185 | 2174 | """
Django management command to migrate a course from the old Mongo modulestore
to the new split-Mongo modulestore.
"""
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.split_migrato... | agpl-3.0 | -1,281,146,817,944,499,000 | 34.639344 | 135 | 0.648574 | false |
sowe9385/qiime | tests/test_plot_semivariogram.py | 15 | 12517 | #!/usr/bin/env python
__author__ = "Antonio Gonzalez Pena"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Antonio Gonzalez Pena"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Antonio Gonzalez Pena"
__email__ = "antgonza@gmail.com"
from qiime.plot_semivariogram import hist_bins... | gpl-2.0 | -2,241,906,667,338,049,000 | 25.688699 | 80 | 0.308141 | false |
deniszh/graphite-web | webapp/graphite/node.py | 4 | 1061 |
class Node(object):
__slots__ = ('name', 'path', 'local', 'is_leaf')
def __init__(self, path):
self.path = path
self.name = path.split('.')[-1]
self.local = True
self.is_leaf = False
def __repr__(self):
return '<%s[%x]: %s>' % (self.__class__.__name__, id(self), s... | apache-2.0 | 7,042,119,951,759,054,000 | 24.261905 | 79 | 0.552309 | false |
joshuaspence/ThesisCode | MATLAB/Lib/matlab_bgl-4.0.1/libmbgl/boost1.36/libs/python/pyste/src/Pyste/pyste.py | 54 | 14022 | # Copyright Bruno da Silva de Oliveira 2003. Use, modification and
# distribution is subject to 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)
"""
Pyste version %s
Usage:
pyste [options] interface-files
where options are:
... | gpl-3.0 | 3,080,913,705,522,950,700 | 32.070755 | 128 | 0.601983 | false |
partofthething/home-assistant | homeassistant/components/progettihwsw/config_flow.py | 11 | 3383 | """Config flow for ProgettiHWSW Automation integration."""
from ProgettiHWSW.ProgettiHWSWAPI import ProgettiHWSWAPI
import voluptuous as vol
from homeassistant import config_entries, core, exceptions
from .const import DOMAIN
DATA_SCHEMA = vol.Schema(
{vol.Required("host"): str, vol.Required("port", default=80)... | mit | 5,011,149,168,544,974,000 | 29.205357 | 86 | 0.592669 | false |
2014c2g2/2015cdag2_test | static/Brython3.1.1-20150328-091302/Lib/random.py | 518 | 26080 | """Random variable generators.
integers
--------
uniform within range
sequences
---------
pick random element
pick random sample
generate random permutation
distributions on the real line:
------------------------------
uniform
... | gpl-3.0 | 7,828,770,807,423,567,000 | 33.634794 | 96 | 0.555023 | false |
PYPIT/PYPIT | pypeit/scripts/lowrdx_pixflat.py | 1 | 1101 | #!/usr/bin/env python
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
"""
This script converts a LowRedux pixel flat into a PYPIT ready one
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_... | gpl-3.0 | 3,009,781,193,368,382,500 | 24.604651 | 92 | 0.678474 | false |
StackStorm/mistral | mistral/engine/utils.py | 1 | 3037 | # Copyright 2014 - Mirantis, Inc.
# Copyright 2015 - Huawei Technologies Co. Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | apache-2.0 | 6,775,538,827,356,791,000 | 31.308511 | 77 | 0.648666 | false |
nik3daz/chrome-app-samples | push-guestbook/guestbook-srv/third_party/oauth2client/appengine.py | 26 | 22703 | # Copyright (C) 2010 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 or agreed to in writ... | apache-2.0 | 6,617,729,617,162,986,000 | 31.572453 | 80 | 0.677796 | false |
tv42/camlistore | lib/python/fusepy/fuse.py | 23 | 22799 | # Copyright (c) 2008 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE... | apache-2.0 | -9,119,414,295,258,874,000 | 34.075385 | 87 | 0.556735 | false |
icaoberg/cellorganizer-galaxy-tools | datatypes/dataproviders/base.py | 1 | 12481 | """
Base class(es) for all DataProviders.
"""
# there's a blurry line between functionality here and functionality in datatypes module
# attempting to keep parsing to a minimum here and focus on chopping/pagination/reformat(/filtering-maybe?)
# and using as much pre-computed info/metadata from the datatypes module as... | gpl-3.0 | -753,689,397,524,348,900 | 38.875399 | 114 | 0.622787 | false |
mcalhoun/ansible | lib/ansible/compat/__init__.py | 332 | 1088 | # (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | gpl-3.0 | -6,648,039,038,724,141,000 | 39.296296 | 86 | 0.759191 | false |
rockyzhang/zhangyanhit-python-for-android-mips | python3-alpha/python3-src/Lib/test/test_math.py | 55 | 46049 | # Python test set -- math module
# XXXX Should not do tests around zero only
from test.support import run_unittest, verbose, requires_IEEE_754
import unittest
import math
import os
import sys
import random
import struct
import sysconfig
eps = 1E-05
NAN = float('nan')
INF = float('inf')
NINF = float('-inf')
# detect ... | apache-2.0 | -2,410,648,749,815,266,300 | 41.59852 | 98 | 0.566006 | false |
carvalhomb/tsmells | fetch/scripts/postprocessing/aggregateVersionMetricData.py | 1 | 8766 | # !/usr/bin/python
# This file is part of snavtofamix (Source Navigator to FAMIX).
#
# snavtofamix 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 ... | gpl-2.0 | 8,273,033,812,794,781,000 | 30.303571 | 91 | 0.691878 | false |
chainer/chainer | chainer/functions/activation/softmax.py | 8 | 3591 | import chainer
from chainer import backend
from chainer.backends import cuda
from chainer import function_node
import chainer.functions
from chainer.utils import type_check
if cuda.cudnn_enabled:
cudnn = cuda.cudnn
_algorithm = cuda.libcudnn.CUDNN_SOFTMAX_ACCURATE
class Softmax(function_node.FunctionNode):
... | mit | -8,806,160,914,569,687,000 | 30.226087 | 77 | 0.557783 | false |
clemux/debsources | debsources/plugins/hook_hello.py | 6 | 1244 | # Copyright (C) 2013-2014 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redi... | agpl-3.0 | 6,253,295,222,778,327,000 | 36.69697 | 81 | 0.731511 | false |
biddisco/VTK | Filters/General/Testing/Python/spatialRepAll.py | 21 | 3220 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.... | bsd-3-clause | -4,420,823,272,608,291,300 | 31.857143 | 119 | 0.61118 | false |
openstates/openstates.org | graphapi/middleware.py | 1 | 1898 | import logging
from graphql.language.ast import FragmentSpread, Variable
class QueryCostException(Exception):
pass
log = logging.getLogger("graphapi")
def _get_counts(info, fragments, variable_values):
multiplier = 1
inner_multiplier = 0
if isinstance(info, FragmentSpread):
for selection ... | mit | -6,148,584,040,846,906,000 | 32.892857 | 91 | 0.609062 | false |
dbckz/ansible | lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py | 33 | 34892 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 | 44,692,405,334,464,600 | 30.86484 | 125 | 0.542932 | false |
kevinmel2000/EmeraldBox | emerald/model_generator.py | 2 | 5245 | import os.path
import sys
from config import BASEDIR
from config import WHITE_SPACE
from config import SQLALCHEMY_MIGRATE_REPO
from database_operations import db_create, db_migrate
from controller_generator import generate_controller
from template_generator import generate_index_template
from template_generator impor... | mit | 8,298,103,035,652,207,000 | 39.666667 | 158 | 0.616587 | false |
openvapour/ryu | ryu/lib/packet/packet.py | 9 | 4718 | # 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 | -7,611,248,855,476,014,000 | 30.66443 | 79 | 0.614031 | false |
valintinr/opennode-knot | opennode/knot/model/machines.py | 2 | 2123 | from __future__ import absolute_import
from grokcore.component import context
from zope import schema
from zope.component import provideSubscriptionAdapter
from zope.interface import Interface, implements
from opennode.knot.model.compute import Compute
from opennode.knot.model.hangar import Hangar
from opennode.oms.m... | gpl-3.0 | -7,227,941,305,933,178,000 | 27.306667 | 98 | 0.746114 | false |
466152112/scikit-learn | sklearn/utils/tests/test_sparsefuncs.py | 57 | 13752 | import numpy as np
import scipy.sparse as sp
from scipy import linalg
from numpy.testing import assert_array_almost_equal, assert_array_equal
from sklearn.datasets import make_classification
from sklearn.utils.sparsefuncs import (mean_variance_axis,
inplace_column_scale,
... | bsd-3-clause | -8,617,645,493,785,974,000 | 33.903553 | 77 | 0.567699 | false |
vsoch/myconnectome | myconnectome/rsfmri/mk_parcellation_boundaries.py | 2 | 1478 | """
make file showing boundaries from parcellation
"""
import numpy,nibabel
import nibabel.gifti.giftiio
import os
from myconnectome.utils import set_structure
basedir=os.environ['MYCONNECTOME_DIR']
def mk_parcellation_boundaries():
lh=os.path.join(basedir,'parcellation/all_selected_L_new_parcel_renumbered.func... | mit | 211,401,253,846,473,950 | 40.083333 | 141 | 0.749662 | false |
snnn/tensorflow | tensorflow/python/framework/device_test.py | 71 | 6791 | # 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 | 5,148,506,769,599,245,000 | 40.662577 | 80 | 0.656015 | false |
albertshift/omim | 3party/protobuf/python/google/protobuf/internal/text_encoding_test.py | 74 | 2858 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
... | apache-2.0 | -6,926,462,079,489,541,000 | 41.029412 | 73 | 0.703639 | false |
robwebset/script.tvtunes | plugin.py | 1 | 17633 | # -*- coding: utf-8 -*-
import sys
import os
import re
import urllib
import urlparse
import xbmc
import xbmcgui
import xbmcplugin
import xbmcaddon
import xbmcvfs
if sys.version_info < (2, 7):
import simplejson
else:
import json as simplejson
# Import the common settings
from resources.lib.settings import Sett... | gpl-2.0 | -6,048,027,945,152,893,000 | 42.863184 | 307 | 0.60296 | 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.