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 |
|---|---|---|---|---|---|---|---|---|---|---|
HDT3213/Duang | Duang/mainWindow.py | 2 | 1686 | from PyQt4 import QtCore, QtGui
import sys
from scene import *
from view import *
class MainWindow(QtGui.QMainWindow):
interval = 40
def __init__(self, *args, **kwargs):
QtGui.QMainWindow.__init__(self, *args, **kwargs)
self.scene = QtGui.QGraphicsScene(self)
self.resize(width + 20, self.scene.height + 20)
... | gpl-3.0 | -3,046,502,774,671,038,000 | 24.179104 | 87 | 0.689798 | false |
superdesk/Live-Blog | documentor/libraries/docutils-0.9.1-py3.2/docutils/languages/ja.py | 52 | 1908 | # -*- coding: utf-8 -*-
# $Id: ja.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: Hisashi Morita <hisashim@kt.rim.or.jp>
# 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>. Tw... | agpl-3.0 | 6,623,350,279,220,952,000 | 27.327869 | 77 | 0.572917 | false |
ekasitk/sahara | sahara/plugins/cdh/client/services.py | 1 | 19488 | # Copyright (c) 2014 Intel 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 applicable law or agreed to in... | apache-2.0 | -1,178,913,815,048,792,600 | 37.743539 | 79 | 0.589799 | false |
akurtakov/Pydev | plugins/org.python.pydev.core/pysrc/_pydev_imps/_pydev_SimpleXMLRPCServer.py | 14 | 21572 | #Just a copy of the version in python 2.5 to be used if it's not available in jython 2.1
"""Simple XML-RPC Server.
This module can be used to create simple XML-RPC servers
by creating a server and either installing functions, a
class instance, or by extending the SimpleXMLRPCServer
class.
It can also be used to hand... | epl-1.0 | -8,805,077,734,653,100,000 | 34.893511 | 157 | 0.60407 | false |
home-assistant/home-assistant | tests/components/philips_js/test_device_trigger.py | 5 | 2191 | """The tests for Philips TV device triggers."""
import pytest
import homeassistant.components.automation as automation
from homeassistant.components.philips_js.const import DOMAIN
from homeassistant.setup import async_setup_component
from tests.common import (
assert_lists_same,
async_get_device_automations,
... | apache-2.0 | 3,693,663,996,154,137,000 | 27.454545 | 85 | 0.5267 | false |
yu-george/MarkFlip | MarkFlip.py | 1 | 2434 | import codecs
import re
mdFileUrl = 'test.md'
outData = []
htmlStart = '''<!DOCTYPE HTML>
<html lang='en'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<link rel='stylesheet' href='markflip.css' type='text/css' />
<title>Generated by MarkFlip</title>
</head>
<body>
'''
htmlEnd = '... | unlicense | 2,244,260,092,063,624,000 | 37.03125 | 102 | 0.582169 | false |
asolntsev/selenium | py/test/selenium/webdriver/marionette/mn_context_tests.py | 39 | 1135 | # 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 | -7,502,201,744,687,131,000 | 41.037037 | 62 | 0.748899 | false |
EventGhost/EventGhost | plugins/WinUsbTest/__init__.py | 2 | 1470 | # -*- coding: utf-8 -*-
#
# This file is a plugin for EventGhost.
# Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost 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 v... | gpl-2.0 | -4,320,596,854,564,040,700 | 24.77193 | 77 | 0.673247 | false |
NPC360/NPC360 | wsgi/yesnoerr.py | 1 | 1946 | yeslist = [
"yes",
"yasss",
"yea",
"yeah",
"yep",
"yeppers",
"sure",
"yizzir",
"sounds good",
"let's do it",
"no problem",
"let's go",
"absolutely",
"hell yea",
"hell yes",
"ok",
"a little",
"good",
"great",
"of course",
"alright",
... | mit | -28,609,381,446,063,520 | 13.20438 | 27 | 0.414183 | false |
mikedchavez1010/XX-Net | python27/1.0/lib/crypto/py3AES.py | 7 | 34062 | #!/usr/bin/python3
#
# aes.py: implements AES - Advanced Encryption Standard
# from the SlowAES project, http://code.google.com/p/slowaes/
#
# Copyright (c) 2008 Josh Davis ( http://www.josh-davis.org ),
# Alex Martelli ( http://www.aleax.it )
#
# Ported from C code written by Laurent Haan
# ( http://www.p... | bsd-2-clause | 8,025,580,343,451,308,000 | 38.515081 | 79 | 0.540338 | false |
calvinchengx/django-haystack | haystack/query.py | 2 | 24043 | import operator
import re
import warnings
from django.conf import settings
from haystack.backends import SQ
from haystack.constants import REPR_OUTPUT_SIZE, ITERATOR_LOAD_PER_QUERY, DEFAULT_OPERATOR
from haystack.exceptions import NotRegistered
class SearchQuerySet(object):
"""
Provides a way to specify searc... | bsd-3-clause | 1,895,751,813,592,310,800 | 34.566568 | 122 | 0.541031 | false |
JohnDenker/brython | www/src/Lib/test/test_importlib/util.py | 34 | 4274 | from contextlib import contextmanager
import imp
import os.path
from test import support
import unittest
import sys
CASE_INSENSITIVE_FS = True
# Windows is the only OS that is *always* case-insensitive
# (OS X *can* be case-sensitive).
if sys.platform not in ('win32', 'cygwin'):
changed_name = __file__.upper()
... | bsd-3-clause | 234,793,262,029,109,340 | 29.528571 | 78 | 0.540243 | false |
larsoner/mne-python | tutorials/preprocessing/plot_40_artifact_correction_ica.py | 3 | 30767 | # -*- coding: utf-8 -*-
"""
.. _tut-artifact-ica:
Repairing artifacts with ICA
============================
This tutorial covers the basics of independent components analysis (ICA) and
shows how ICA can be used for artifact repair; an extended example illustrates
repair of ocular and heartbeat artifacts.
.. contents... | bsd-3-clause | 3,835,656,043,303,992,300 | 48.440514 | 79 | 0.669062 | false |
tophua/spark1.52 | python/pyspark/storagelevel.py | 11 | 2822 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 2,428,506,843,259,962,000 | 46.033333 | 97 | 0.718639 | false |
erjohnso/ansible | test/units/modules/cloud/google/test_gcp_url_map.py | 158 | 6086 | import unittest
from ansible.modules.cloud.google.gcp_url_map import _build_path_matchers, _build_url_map_dict
class TestGCPUrlMap(unittest.TestCase):
"""Unit tests for gcp_url_map module."""
params_dict = {
'url_map_name': 'foo_url_map_name',
'description': 'foo_url_map description',
... | gpl-3.0 | -7,495,278,885,432,438,000 | 36.109756 | 149 | 0.36395 | false |
savoirfairelinux/django | tests/template_tests/syntax_tests/i18n/test_filters.py | 133 | 2071 | from django.test import SimpleTestCase
from django.utils import translation
from ...utils import setup
class I18nFiltersTests(SimpleTestCase):
libraries = {
'custom': 'template_tests.templatetags.custom',
'i18n': 'django.templatetags.i18n',
}
@setup({'i18n32': '{% load i18n %}{{ "hu"|lan... | bsd-3-clause | -3,883,394,842,368,966,000 | 43.021277 | 94 | 0.558241 | false |
phenoxim/cinder | cinder/tests/unit/backup/test_chunkeddriver.py | 2 | 20207 | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | 3,819,528,923,685,225,500 | 40.923237 | 79 | 0.568367 | false |
dcantrell/no | no.py | 1 | 3287 | #!/usr/bin/python
#
# no.py - Forbid installation of certain packages on yum systems
# Copyright (C) 2010 David Cantrell <david.l.cantrell@gmail.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 Found... | gpl-2.0 | -5,436,570,804,827,661,000 | 32.886598 | 104 | 0.612717 | false |
MarcusTan/yncn-grid | venv/lib/python2.7/site-packages/flask/testsuite/views.py | 561 | 5068 | # -*- coding: utf-8 -*-
"""
flask.testsuite.views
~~~~~~~~~~~~~~~~~~~~~
Pluggable views.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import flask.views
import unittest
from flask.testsuite import FlaskTestCase
from werkzeug.http import par... | mit | -1,275,690,536,175,928,000 | 28.988166 | 86 | 0.537096 | false |
richpolis/siveinpy | env/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py | 355 | 6215 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from lxml import etree
from ..treebuilders.etree import tag_regexp
from gettext import gettext
_ = gettext
from . import _base
from .. import ihatexml
def ensure_str(s):
if s is None:
return None
... | mit | 682,939,183,721,705,600 | 28.879808 | 92 | 0.541432 | false |
extremewaysback/django | tests/test_client/tests.py | 29 | 30690 | # -*- coding: utf-8 -*-
"""
Testing using the Test Client
The test client is a class that can act like a simple
browser for testing purposes.
It allows the user to compose GET and POST requests, and
obtain the response that the server gave to those requests.
The server Response objects are annotated with the details
... | bsd-3-clause | 7,129,213,306,939,601,000 | 40.755102 | 117 | 0.649756 | false |
katiecheng/Bombolone | env/lib/python2.7/site-packages/werkzeug/contrib/iterio.py | 89 | 8239 | # -*- coding: utf-8 -*-
r"""
werkzeug.contrib.iterio
~~~~~~~~~~~~~~~~~~~~~~~
This module implements a :class:`IterIO` that converts an iterator into
a stream object and the other way round. Converting streams into
iterators requires the `greenlet`_ module.
To convert an iterator into a stream... | bsd-3-clause | 4,210,966,709,530,175,000 | 28.743682 | 78 | 0.534288 | false |
weiting-chen/manila | manila/compute/__init__.py | 9 | 1150 | # Copyright 2014 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 1,545,216,624,837,670,100 | 32.823529 | 75 | 0.688696 | false |
djoproject/pyshell | pyshell/utils/test/key_test.py | 3 | 5574 | #!/usr/bin/env python -t
# -*- coding: utf-8 -*-
# Copyright (C) 2015 Jonathan Delvaux <pyshell@djoproject.net>
# 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... | gpl-3.0 | -7,462,625,295,952,253,000 | 32.578313 | 71 | 0.618586 | false |
Stanford-Online/edx-analytics-pipeline | edx/analytics/tasks/warehouse/load_internal_reporting_events.py | 1 | 86821 | """EXPERIMENTAL:
Load most events into warehouse for internal reporting purposes. This
combines segment events and tracking log events, and defines a common
(wide) representation for all events to share, sparsely. Requires
definition of a Record enumerating these columns, and also a mapping
from event values to colu... | agpl-3.0 | 4,964,905,737,866,779,000 | 49.921408 | 184 | 0.644717 | false |
jswope00/GAI | common/lib/symmath/symmath/symmath_check.py | 67 | 12559 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# File: symmath_check.py
# Date: 02-May-12 (creation)
#
# Symbolic mathematical expression checker for edX. Uses sympy to check for expression equality.
#
# Takes in math expressions given as Presentation MathML (from ASCIIMathML), converts to Content MathML using Snuggl... | agpl-3.0 | 595,824,566,923,590,900 | 37.762346 | 133 | 0.560952 | false |
rnavarro/vitess | py/vtproto/vttest_pb2.py | 11 | 7546 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vttest.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflec... | apache-2.0 | 144,819,225,216,366,180 | 34.933333 | 630 | 0.698251 | false |
jhawkesworth/ansible-modules-core | utilities/logic/fail.py | 198 | 1458 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 Dag Wieers <dag@wieers.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 Lice... | gpl-3.0 | 1,661,915,626,755,861,200 | 32.136364 | 77 | 0.72428 | false |
fernandozamoraj/py_sandbox | py101/autocorrect.py | 1 | 4097 | import unittest
MIN_SCORE = .7
g_words = []
def print1(line):
pass
#print(line);
def is_possible_replacement(target_word, possible_word):
global MIN_SCORE
score = 0
print1('*'*40)
if(target_word[0] == possible_word[0]):
score += 100
if(target_word... | apache-2.0 | 3,259,942,429,423,995,000 | 25.313333 | 87 | 0.558457 | false |
sublime1809/django | tests/m2m_regress/tests.py | 23 | 3734 | from __future__ import unicode_literals
from django.core.exceptions import FieldError
from django.test import TestCase
from django.utils import six
from .models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild,
SelfReferChildSibling, Worksheet, RegressionModelSplit)
class M2MRegressionTests(TestCase... | bsd-3-clause | -2,731,344,720,497,708,000 | 36.717172 | 97 | 0.641403 | false |
cmdunkers/DeeperMind | PythonEnv/lib/python2.7/site-packages/theano/misc/pycuda_utils.py | 7 | 2472 | import pycuda.gpuarray
from theano.sandbox import cuda
if cuda.cuda_available is False:
raise ImportError('Optional theano package cuda disabled')
def to_gpuarray(x, copyif=False):
""" take a CudaNdarray and return a pycuda.gpuarray.GPUArray
:type x: CudaNdarray
:param x: The array to transform to p... | bsd-3-clause | 6,017,875,268,854,924,000 | 37.030769 | 105 | 0.605178 | false |
ncdesouza/bookworm | env/lib/python2.7/site-packages/werkzeug/testsuite/internal.py | 146 | 2940 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.internal
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Internal tests.
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import unittest
from datetime import datetime
from warnings import filterwarnings, resetwarnings
from werkz... | gpl-3.0 | -713,715,896,549,513,200 | 35.246914 | 83 | 0.635218 | false |
stscieisenhamer/glue | doc/redirect.py | 5 | 2172 | # This Sphinx plugin comes from https://github.com/openstack/nova-specs and was
# originally licensed under a Creative Commons Attribution 3.0 Unported License.
# The full text for this license can be found here:
#
# http://creativecommons.org/licenses/by/3.0/legalcode
# A simple sphinx plugin which creates HTML redi... | bsd-3-clause | -2,363,640,657,940,583,000 | 37.105263 | 80 | 0.642265 | false |
parrondo/arctic | tests/integration/scripts/test_list_libraries.py | 5 | 1033 | from mock import patch, call
import pytest
from arctic.scripts import arctic_list_libraries
from ...util import run_as_main
def test_list_library(mongo_host, library, library_name):
with patch('arctic.scripts.arctic_list_libraries.print') as p:
run_as_main(arctic_list_libraries.main, "--host", mongo_hos... | lgpl-2.1 | 3,918,886,844,306,585,000 | 35.892857 | 104 | 0.690223 | false |
TomKita/ansible-modules-extras | notification/hipchat.py | 9 | 5616 | #!/usr/bin/python
# -*- coding: utf-8 -*-
DOCUMENTATION = '''
---
module: hipchat
version_added: "1.2"
short_description: Send a message to hipchat.
description:
- Send a message to hipchat
options:
token:
description:
- API token.
required: true
room:
description:
- ID or name of the ro... | gpl-3.0 | -4,614,734,453,742,209,000 | 27.653061 | 103 | 0.605057 | false |
Tehsmash/nova | nova/tests/unit/api/openstack/compute/contrib/test_extended_virtual_interfaces_net.py | 34 | 3799 | # Copyright 2013 IBM Corp.
# 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 app... | apache-2.0 | 7,411,961,927,354,595,000 | 36.245098 | 79 | 0.639379 | false |
gauravbose/digital-menu | tests/migrations/test_executor.py | 31 | 21893 | from django.apps.registry import apps as global_apps
from django.db import connection
from django.db.migrations.executor import MigrationExecutor
from django.db.migrations.graph import MigrationGraph
from django.db.utils import DatabaseError
from django.test import TestCase, modify_settings, override_settings
from .te... | bsd-3-clause | 4,212,002,575,237,192,000 | 39.542593 | 117 | 0.59736 | false |
rahulxxarora/Jango | jango/search.py | 1 | 1049 | import re
import wikipedia
import sys
import jangopath
flag = 0
query = ""
f = open(jangopath.HOME_DIR + '/ans.txt','w')
for arg in sys.argv:
if flag==1:
query = query + arg + " "
if arg.lower()=="for" or arg.lower()=="about":
flag = 1
def strip_non_ascii(string):
''' Returns the string without... | mit | -2,991,732,072,405,771,300 | 21.804348 | 58 | 0.582459 | false |
udragon/ldc | ldc/test/test_ldcldap.py | 1 | 1472 | #!/usr/bin/python
import unittest
import uuid
import ldc
class TestLDCLdapInterface(unittest.TestCase):
def test_ldcusers(self):
rand_str = str(uuid.uuid4())
ldc.ldap.users.add(rand_str, rand_str, "password", "12345", "100", "/home/users/" + rand_str, "/bin/bash")
assert ldc.ldap.users.get... | gpl-2.0 | 5,549,753,528,622,316,000 | 37.736842 | 114 | 0.626359 | false |
correl/Transmission-XBMC | resources/lib/basictypes/wx/wxcopyreg.py | 4 | 3196 | """wxcopyreg -- functions for storing/restoring simple wxPython data types to pickle-friendly formats
importing this module installs the functions automatically!
"""
import pickle, zlib
from wxPython.wx import *
##
def bind( classObject, outFunction, inFunction ):
"""Bind get and set state for the classObject"""
... | mit | 4,145,697,621,430,911,000 | 23.40458 | 101 | 0.675532 | false |
cryptojuice/flask-scrypt | flask_scrypt.py | 1 | 3509 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Flask-Scrypt flask extension provides scrypt password hashing and random salt generation.
Hashes and Salts are base64 encoded.
"""
from __future__ import print_function, unicode_literals
import sys
import base64
import hmac
from os import urandom
from werkzeug.security... | mit | -3,545,154,817,326,110,000 | 28 | 91 | 0.638643 | false |
ryfeus/lambda-packs | HDF4_H5_NETCDF/source2.7/numpy/polynomial/hermite_e.py | 17 | 58086 | """
Objects for dealing with Hermite_e series.
This module provides a number of objects (mostly functions) useful for
dealing with Hermite_e series, including a `HermiteE` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in ... | mit | -1,654,853,210,064,400,600 | 30.397838 | 79 | 0.597097 | false |
Lukc/ospace-lukc | client-ai/ai_main.py | 1 | 3091 | #
# Copyright 2001 - 2011 Ludek Smid [http://www.ospace.net/]
#
# This file is part of Outer Space.
#
# Outer Space 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
# (... | gpl-2.0 | -3,588,524,211,772,260,000 | 26.598214 | 77 | 0.717244 | false |
atuljain/odoo | addons/hr/__init__.py | 382 | 1092 | # -*- 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 | -4,028,844,812,147,316,700 | 39.444444 | 78 | 0.619048 | false |
glwu/python-for-android | python-modules/pybluez/bluetooth/btcommon.py | 68 | 13317 | import sys
import struct
import binascii
L2CAP=0
RFCOMM=3
PORT_ANY=0
# Service Class IDs
SDP_SERVER_CLASS = "1000"
BROWSE_GRP_DESC_CLASS = "1001"
PUBLIC_BROWSE_GROUP = "1002"
SERIAL_PORT_CLASS = "1101"
LAN_ACCESS_CLASS = "1102"
DIALUP_NET_CLASS = "1103"
IRMC_SYNC_CLASS = "1104"
OBEX_OBJPUSH_CLASS = "1105"
OBEX_FILET... | apache-2.0 | 4,792,675,552,597,526,000 | 32.459799 | 79 | 0.615454 | false |
benfinkelcbt/CPD200 | CPD200-Lab13-Python/googleapiclient/schema.py | 82 | 9317 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | gpl-3.0 | 610,639,629,088,553,300 | 28.766773 | 83 | 0.636686 | false |
loulich/Couchpotato | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/iprima.py | 32 | 3608 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from random import random
from math import floor
from .common import InfoExtractor
from ..compat import (
compat_urllib_request,
)
from ..utils import (
ExtractorError,
)
class IPrimaIE(InfoExtractor):
_VALID_URL = r'https?://play... | gpl-3.0 | -1,086,853,280,104,679,300 | 32.009174 | 134 | 0.505559 | false |
lakshayg/tensorflow | tensorflow/examples/how_tos/reading_data/fully_connected_preloaded_var.py | 100 | 6359 | # 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 | -4,156,310,045,719,260,700 | 30.795 | 80 | 0.645856 | false |
koson/MissionPlannerKMTI | Lib/xml/etree/ElementTree.py | 40 | 56165 | #
# ElementTree
# $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $
#
# light-weight XML support for Python 2.3 and later.
#
# history (since 1.2.6):
# 2005-11-12 fl added tostringlist/fromstringlist helpers
# 2006-07-05 fl merged in selected changes from the 1.3 sandbox
# 2006-07-05 fl removed support for ... | gpl-3.0 | -1,908,526,585,235,026,700 | 32.916063 | 90 | 0.589887 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/django/core/management/__init__.py | 26 | 14905 | from __future__ import unicode_literals
import os
import pkgutil
import sys
from collections import OrderedDict, defaultdict
from importlib import import_module
import django
from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.manageme... | gpl-3.0 | -2,934,780,105,712,167,400 | 40.060606 | 98 | 0.603355 | false |
JinXinDeep/tensorflow | tensorflow/python/kernel_tests/bias_op_test.py | 8 | 4045 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -8,145,555,189,213,192,000 | 35.772727 | 80 | 0.591595 | false |
jezdez/kuma | vendor/packages/logilab/common/decorators.py | 93 | 8868 | # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | mpl-2.0 | -1,178,774,076,048,650,800 | 30.558719 | 85 | 0.601263 | false |
kif/dahu | plugins/id31/__init__.py | 1 | 6007 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Data Analysis plugin tailored for ID31
* integrate_simple: simple demo of a simple integrator
* integrate: a more advanced options
"""
__authors__ = ["Jérôme Kieffer"]
__contact__ = "Jerome.Kieffer@ESRF.eu"
__license__ = "MIT"
__copyright__ = "European Synchrotron ... | gpl-2.0 | 2,665,457,547,761,508,000 | 33.912791 | 106 | 0.594338 | false |
randomtask1155/gpdb | gpMgmt/bin/gppylib/util/ssh_utils.py | 20 | 10885 | #!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2008. All Rights Reserved.
#
# This file contains ssh Session class and support functions/classes.
import cmd
import os
import sys
import socket
import threading
from gppylib.commands.base import WorkerPool, REMOTE, ExecutionError
from gppylib.commands.unix import ... | apache-2.0 | -5,594,354,335,152,761,000 | 32.909657 | 108 | 0.560864 | false |
rahushen/ansible | lib/ansible/modules/windows/win_regedit.py | 24 | 6538 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Adam Keech <akeech@chathamfinancial.com>, Josh Ludwig <jludwig@chathamfinancial.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
# fi... | gpl-3.0 | -7,458,652,830,434,653,000 | 31.69 | 147 | 0.694708 | false |
mdrumond/tensorflow | tensorflow/examples/adding_an_op/zero_out_op_1.py | 190 | 1053 | # 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 | -3,619,020,724,100,636,700 | 38 | 80 | 0.681861 | false |
kevin-coder/tensorflow-fork | tensorflow/python/ops/ragged/ragged_expand_dims_op_test.py | 13 | 4920 | # Copyright 2018 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,718,793,858,708,036,000 | 37.740157 | 80 | 0.53252 | false |
alcides/rdflib | test/test_sparql/test_sparql_recurse.py | 1 | 2965 | from rdflib.graph import ConjunctiveGraph
from rdflib.term import URIRef, Literal
from rdflib.namespace import RDFS
from rdflib.sparql.Algebra import RenderSPARQLAlgebra
from StringIO import StringIO
import unittest, sys
import nose
testContent = """
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://pu... | bsd-3-clause | 1,090,284,312,531,996,300 | 30.542553 | 69 | 0.624283 | false |
neoareslinux/neutron | neutron/services/service_base.py | 13 | 3183 | # 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 req... | apache-2.0 | -3,347,894,300,237,166,600 | 33.225806 | 78 | 0.626139 | false |
donNewtonAlpha/onos | tools/test/topos/onosnet.py | 4 | 8616 | #!/usr/bin/python
import itertools
import os
import signal
import sys
from argparse import ArgumentParser
from subprocess import call
from threading import Thread
from time import sleep
import gratuitousArp
from mininet.cli import CLI
from mininet.examples.controlnet import MininetFacade
from mininet.link import TCLin... | apache-2.0 | 1,858,607,381,538,557,400 | 31.760456 | 107 | 0.553157 | false |
msegado/edx-platform | common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py | 13 | 15077 | """
Tests for the wrapping layer that provides the XBlock API using XModule/Descriptor
functionality
"""
# For tests, ignore access to protected members
# pylint: disable=protected-access
import webob
import ddt
from factory import (
BUILD_STRATEGY,
Factory,
lazy_attribute,
LazyAttributeSequence,
p... | agpl-3.0 | 4,334,608,707,685,143,600 | 35.155875 | 116 | 0.688864 | false |
pylixm/sae-django-demo | django1.7-sae/site-packages/django/db/backends/postgresql_psycopg2/operations.py | 63 | 9574 | from __future__ import unicode_literals
from django.conf import settings
from django.db.backends import BaseDatabaseOperations
class DatabaseOperations(BaseDatabaseOperations):
def __init__(self, connection):
super(DatabaseOperations, self).__init__(connection)
def date_extract_sql(self, lookup_type... | apache-2.0 | 5,899,468,675,330,619,000 | 41.551111 | 128 | 0.564863 | false |
Arzie/deluge | deluge/ui/gtkui/pluginmanager.py | 2 | 4510 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007, 2008 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
... | gpl-3.0 | 2,535,444,676,319,845,400 | 33.96124 | 98 | 0.655211 | false |
numenta/nupic | tests/integration/nupic/opf/opf_checkpoint_test/experiments/backwards_compatibility/base.py | 20 | 15012 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2012-2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This p... | agpl-3.0 | -3,047,673,795,192,459,300 | 37.005063 | 159 | 0.618372 | false |
waheedahmed/edx-platform | lms/djangoapps/shoppingcart/tests/test_models.py | 11 | 57845 | """
Tests for the Shopping Cart Models
"""
from decimal import Decimal
import datetime
import sys
import json
import copy
import smtplib
from boto.exception import BotoServerError # this is a super-class of SESError and catches connection errors
from mock import patch, MagicMock
from nose.plugins.attrib import attr
... | agpl-3.0 | -8,044,844,615,549,855,000 | 40.886314 | 135 | 0.627712 | false |
wadoon/smvtools | smvtools/smvstutseq.py | 1 | 2968 | #!/usr/bin/python3
# smvtools -- Tools around NuSMV and NuXMV
# Copyright (C) 2014-2016 - Alexander Weigl
#
# 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
#... | gpl-3.0 | 4,902,289,184,490,485,000 | 28.098039 | 124 | 0.604784 | false |
louyihua/edx-platform | common/djangoapps/microsite_configuration/backends/database.py | 41 | 7974 | """
Microsite backend that reads the configuration from the database
"""
from mako.template import Template
from util.cache import cache
from django.conf import settings
from django.dispatch import receiver
from django.db.models.signals import post_save
from util.memcache import fasthash
from util.url import strip_po... | agpl-3.0 | 4,324,045,617,614,559,000 | 36.791469 | 110 | 0.653624 | false |
PaulKinlan/cli-caniuse | site/app/scripts/bower_components/jsrepl-build/extern/python/closured/lib/python2.7/encodings/mac_latin2.py | 647 | 8565 | """ Python Character Mapping Codec generated from 'LATIN2.TXT' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,erro... | apache-2.0 | 4,712,609,590,491,086,000 | 45.803279 | 80 | 0.668301 | false |
nburn42/tensorflow | tensorflow/contrib/specs/python/specs_ops.py | 44 | 6689 | # 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 applicable ... | apache-2.0 | 2,059,861,972,671,813,400 | 28.995516 | 80 | 0.69846 | false |
akshatharaj/django | django/db/models/fields/related_lookups.py | 287 | 6153 | from django.db.models.lookups import (
Exact, GreaterThan, GreaterThanOrEqual, In, LessThan, LessThanOrEqual,
)
class MultiColSource(object):
contains_aggregate = False
def __init__(self, alias, targets, sources, field):
self.targets, self.sources, self.field, self.alias = targets, sources, field... | bsd-3-clause | 1,957,161,583,333,348,400 | 45.263158 | 103 | 0.625549 | false |
rnyberg/pyfibot | pyfibot/modules/available/module_btc.py | 1 | 2168 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals, print_function, division
import logging
log = logging.getLogger("cryptocoin")
def command_ltc(bot, user, channel, args):
"""Display current LRC exchange rates from BTC-E"""
r = bot.get_url("https://btc-e.com/api/2/ltc_usd/ticker")
j = r.j... | bsd-3-clause | 3,863,865,623,236,223,000 | 29.111111 | 139 | 0.593173 | false |
kittiu/sale-workflow | sale_exception_nostock/tests/test_dropshipping_skip_check.py | 35 | 1548 | # Author: Leonardo Pistone
# Copyright 2014 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
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any la... | agpl-3.0 | 89,889,132,680,902,340 | 42 | 77 | 0.710594 | false |
y12uc231/edx-platform | common/lib/xmodule/xmodule/peer_grading_module.py | 7 | 29051 | import json
import logging
from datetime import datetime
from lxml import etree
from pkg_resources import resource_string
from xblock.fields import Dict, String, Scope, Boolean, Float, Reference
from xmodule.capa_module import ComplexEncoder
from xmodule.fields import Date, Timedelta
from xmodule.modulestore.exceptio... | agpl-3.0 | -1,770,132,473,433,585,200 | 39.292649 | 164 | 0.608172 | false |
shahin/deepdive | ddlib/test/with_ddlib.py | 3 | 1693 | #! /usr/bin/env python
# File: udf/ext_has_spouse_features.py
import sys, json
import ddlib
# For each input tuple
# TODO: Sample Data and the input schema.
# sample json
for row in sys.stdin:
# Unpack input into tuples.
#
obj = json.loads(row)
words, lemmas = obj["words"], obj["lemma"]
span1 = ddlib.Span(... | apache-2.0 | 4,784,604,499,524,444,000 | 30.943396 | 85 | 0.687537 | false |
mosquito/docker-compose | compose/service.py | 4 | 27979 | from __future__ import unicode_literals
from __future__ import absolute_import
from collections import namedtuple
import logging
import re
import sys
from operator import attrgetter
import six
from docker.errors import APIError
from docker.utils import create_host_config, LogConfig
from . import __version__
from .con... | apache-2.0 | -7,797,460,302,641,688,000 | 31.571595 | 169 | 0.571393 | false |
eestay/edx-platform | common/lib/xmodule/xmodule/video_module/video_handlers.py | 17 | 12983 | """
Handlers for video module.
StudentViewHandlers are handlers for video module instance.
StudioViewHandlers are handlers for video descriptor instance.
"""
import json
import logging
from webob import Response
from xblock.core import XBlock
from xmodule.exceptions import NotFoundError
from xmodule.fields import R... | agpl-3.0 | -16,952,685,515,588,010 | 37.639881 | 132 | 0.574366 | false |
mattattack7/canvas-contrib | API_Examples/reports/provisioning_report/python/pull_provisioning_report.py | 4 | 4267 | #!/usr/bin/env python
import requests
import time, json, os
import re,pprint
# Change this to match your access token
token="<access_token>"
# This should be your account number. This is the number you see when logged into canvas
# as an admin. i.e. https://schoolname.insructure.com/accounts/SOME_NUMBER_HERE
ACCOUNT... | agpl-3.0 | 1,119,292,643,243,229,800 | 35.784483 | 96 | 0.718538 | false |
gauravbose/digital-menu | digimenu2/django/contrib/sessions/backends/db.py | 37 | 2943 | import logging
from django.contrib.sessions.backends.base import CreateError, SessionBase
from django.core.exceptions import SuspiciousOperation
from django.db import IntegrityError, router, transaction
from django.utils import timezone
from django.utils.encoding import force_text
class SessionStore(SessionBase):
... | bsd-3-clause | -2,819,549,778,572,054,500 | 33.623529 | 77 | 0.590894 | false |
gorjuce/odoo | addons/l10n_in_hr_payroll/__openerp__.py | 374 | 2622 | # -*- encoding: 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 G... | agpl-3.0 | 3,567,181,718,305,210,400 | 36.457143 | 78 | 0.607933 | false |
hjanime/VisTrails | vistrails/packages/controlflow/conditional.py | 1 | 7838 | ###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | bsd-3-clause | 2,021,110,383,676,909,000 | 37.995025 | 81 | 0.548099 | false |
mrkm4ntr/incubator-airflow | airflow/contrib/operators/gcp_compute_operator.py | 7 | 4822 | #
# 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... | apache-2.0 | -5,283,304,626,670,001,000 | 33.942029 | 109 | 0.686437 | false |
jcurbelo/networkx | networkx/linalg/laplacianmatrix.py | 12 | 7749 | """Laplacian matrix of graphs.
"""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
from networkx.utils import not_implemented_for
__author__ = "\n".join(['Aric ... | bsd-3-clause | -5,999,074,894,407,583,000 | 29.628458 | 99 | 0.593238 | false |
dlongman/beegee-squeegee | prototype-parser/AccuChekMobileParser.py | 1 | 3411 | import csv
import time
from Reading import Reading as Reading
### TODO ### Add documentation to classes and methods
class AccuChekMobileParser(object):
# this file has some summary data in row 2 with the headers in row 1
# the result data is then in row 4 with the headers in row 3
def __init_... | mit | -4,501,580,256,897,591,000 | 37.206897 | 112 | 0.54676 | false |
simalytics/askbot-devel | askbot/migrations/0048_set_proper_revision_types.py | 20 | 27517 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
orm.QuestionRevision.objects.update(revision_type=1)
orm.AnswerRevision.objects.update(revision_type=2)
def backw... | gpl-3.0 | -5,061,902,187,616,609,000 | 86.913738 | 221 | 0.557619 | false |
rcarrillocruz/ansible | lib/ansible/utils/module_docs_fragments/tower.py | 44 | 1991 | # (c) 2017, Wayne Witzel III <wayne@riotousliving.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 la... | gpl-3.0 | -2,255,942,681,939,342,000 | 30.109375 | 102 | 0.683576 | false |
dpshelio/scikit-image | skimage/future/graph/graph_cut.py | 19 | 9309 | try:
import networkx as nx
except ImportError:
import warnings
warnings.warn('RAGs require networkx')
import numpy as np
from . import _ncut
from . import _ncut_cy
from scipy.sparse import linalg
def cut_threshold(labels, rag, thresh, in_place=True):
"""Combine regions separated by weight less than th... | bsd-3-clause | -3,658,684,023,697,187,300 | 30.663265 | 77 | 0.615319 | false |
j-windsor/cs3240-f15-team21-v2 | reports/models.py | 1 | 1870 | from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
import os
class Report(models.Model):
title = models.CharField(max_length=30)
description = models.CharField(max_length = 200)
create_date = models.DateTimeField('date created')
public = models.Bo... | mit | 6,422,634,269,950,146,000 | 33 | 83 | 0.647594 | false |
Samuel789/MediPi | MedManagementWeb/env/lib/python3.5/site-packages/django/contrib/postgres/fields/hstore.py | 42 | 3360 | import json
from django.contrib.postgres import forms, lookups
from django.contrib.postgres.fields.array import ArrayField
from django.core import exceptions
from django.db.models import Field, TextField, Transform
from django.utils import six
from django.utils.encoding import force_text
from django.utils.translation ... | apache-2.0 | -7,456,052,878,966,212,000 | 29 | 77 | 0.630655 | false |
hassoon3/odoo | addons/mail/mail_followers.py | 26 | 12994 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 6,783,719,358,138,621,000 | 48.785441 | 203 | 0.622595 | false |
Kenishi/iamacr | libs/markdown/extensions/smart_strong.py | 12 | 1151 | '''
Smart_Strong Extension for Python-Markdown
==========================================
This extention adds smarter handling of double underscores within words.
See <https://pythonhosted.org/Markdown/extensions/smart_strong.html>
for documentation.
Original code Copyright 2011 [Waylan Limberg](http://achinghead.c... | mit | -1,521,428,809,392,020,500 | 31.885714 | 99 | 0.687228 | false |
tareqalayan/ansible | test/units/modules/network/iosxr/test_iosxr_system.py | 49 | 4219 | # (c) 2016 Red Hat 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 version.
#
# Ansible is dis... | gpl-3.0 | 9,168,723,070,996,214,000 | 40.362745 | 110 | 0.680256 | false |
Evzdrop/PynamoDB | pynamodb/constants.py | 3 | 7354 | """
Pynamodb constants
"""
# Operations
BATCH_WRITE_ITEM = 'BatchWriteItem'
DESCRIBE_TABLE = 'DescribeTable'
BATCH_GET_ITEM = 'BatchGetItem'
CREATE_TABLE = 'CreateTable'
UPDATE_TABLE = 'UpdateTable'
DELETE_TABLE = 'DeleteTable'
LIST_TABLES = 'ListTables'
UPDATE_ITEM = 'UpdateItem'
DELETE_ITEM = 'DeleteItem'
GET_ITEM =... | mit | -1,234,316,451,858,087,200 | 29.89916 | 147 | 0.740957 | false |
sileht/aodh | aodh/storage/hbase/inmemory.py | 2 | 9613 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | apache-2.0 | 8,243,358,193,639,480,000 | 32.968198 | 79 | 0.509206 | false |
ISIFoundation/influenzanet-website | apps/journal/tests.py | 4 | 2025 | """
Tests for the journal app
"""
import datetime
from django.test import TestCase
from .models import Entry, published_filter
from .navigation import get_nodes
class EntryTest(TestCase):
def setUp(self):
self.today = datetime.datetime.today()
self.yesterday = self.today - datetime.timedelta(day... | agpl-3.0 | -7,875,622,457,133,806,000 | 30.640625 | 76 | 0.609383 | false |
sametmax/Django--an-app-at-a-time | apps/app6_template_tools/views.py | 1 | 2017 | # coding: utf-8
import datetime
import random
from django.shortcuts import render
def index(request):
return render(request, 'app6_index.html')
def filters(request):
context = {}
# filter: random, pluralize, length_is, join
context['people'] = (
'Mr Black',
'Mr Pink',
'Mr... | mit | 5,882,125,435,083,532,000 | 20.688172 | 80 | 0.600397 | false |
PatrickOReilly/scikit-learn | sklearn/linear_model/theil_sen.py | 39 | 14339 | # -*- coding: utf-8 -*-
"""
A Theil-Sen Estimator for Multiple Linear Regression Model
"""
# Author: Florian Wilhelm <florian.wilhelm@gmail.com>
#
# License: BSD 3 clause
from __future__ import division, print_function, absolute_import
import warnings
from itertools import combinations
import numpy as np
from scipy... | bsd-3-clause | 7,815,133,860,439,132,000 | 35.835476 | 79 | 0.608277 | false |
lifeinoppo/littlefishlet-scode | RES/REF/python_sourcecode/ipython-master/IPython/utils/_signatures.py | 16 | 29681 | """Function signature objects for callables.
Back port of Python 3.3's function signature tools from the inspect module,
modified to be compatible with Python 2.7 and 3.2+.
"""
#-----------------------------------------------------------------------------
# Python 3.3 stdlib inspect.py is public domain
#
# Backpor... | gpl-2.0 | 8,475,775,938,676,355,000 | 35.329253 | 84 | 0.532462 | false |
DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/benchmarks/bench_tree.py | 1 | 3618 | """
To run this, you'll need to have installed.
* scikit-learn
Does two benchmarks
First, we fix a training set, increase the number of
samples to classify and plot number of classified samples as a
function of time.
In the second benchmark, we increase the number of dimensions of the
training set, classify a sam... | mit | -3,422,708,386,555,373,000 | 27.944 | 72 | 0.587617 | false |
ruiaylin/percona-xtrabackup | storage/innobase/xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/galeraInfo_test.py | 24 | 4569 | #! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2011 Patrick Crews
#
#
# 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 Softwar... | gpl-2.0 | 6,400,571,598,789,289,000 | 41.305556 | 99 | 0.59269 | false |
rizotas/waliki | waliki/pdf/views.py | 2 | 1088 | import tempfile
from sh import rst2pdf
from django.shortcuts import get_object_or_404
from waliki.models import Page
from waliki.utils import send_file
from waliki.settings import WALIKI_PDF_INCLUDE_TITLE
from waliki.settings import WALIKI_PDF_RST2PDF_BIN
from waliki.acl import permission_required
@permission_require... | bsd-3-clause | 320,387,471,184,959,040 | 36.517241 | 90 | 0.678309 | 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.