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 |
|---|---|---|---|---|---|---|---|---|---|---|
sqlalchemy/sqlalchemy | test/orm/test_rel_fn.py | 3 | 45031 | from sqlalchemy import and_
from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import exc
from sqlalchemy import ForeignKey
from sqlalchemy import ForeignKeyConstraint
from sqlalchemy import func
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import select
from ... | mit | -7,629,121,777,916,075,000 | 34.653998 | 79 | 0.554907 | false |
igor-rangel7l/novoigorrangel.repository | plugin.video.SportsDevil/service/asn1crypto/keys.py | 13 | 35048 | # coding: utf-8
"""
ASN.1 type classes for public and private keys. Exports the following items:
- DSAPrivateKey()
- ECPrivateKey()
- EncryptedPrivateKeyInfo()
- PrivateKeyInfo()
- PublicKeyInfo()
- RSAPrivateKey()
- RSAPublicKey()
Other type classes are defined that help compose the types listed above.
"""
... | gpl-2.0 | -8,525,391,529,607,395,000 | 27.151004 | 107 | 0.524738 | false |
bhansa/fireball | pyvenv/Lib/site-packages/pip/vcs/bazaar.py | 514 | 3803 | from __future__ import absolute_import
import logging
import os
import tempfile
# TODO: Get this into six.moves.urllib.parse
try:
from urllib import parse as urllib_parse
except ImportError:
import urlparse as urllib_parse
from pip.utils import rmtree, display_path
from pip.vcs import vcs, VersionControl
fro... | gpl-3.0 | 5,999,897,277,662,634,000 | 31.784483 | 77 | 0.55614 | false |
codingjoe/viewflow | tests/integration/tests/test_flow_func.py | 2 | 2022 | from django.test import TestCase
from viewflow import flow
from viewflow.base import Flow, this
from .. import integration_test
def create_test_flow(activation):
activation.prepare()
activation.done()
return activation
@flow.flow_func(task_loader=lambda flow_task, process: process.get_task(FunctionFlo... | agpl-3.0 | 5,030,956,545,812,475,000 | 29.636364 | 96 | 0.691889 | false |
noroutine/ansible | lib/ansible/playbook/role_include.py | 23 | 5507 |
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope th... | gpl-3.0 | -1,847,802,811,969,058,000 | 36.209459 | 130 | 0.654803 | false |
hnousiainen/pghoard | pghoard/pgutil.py | 2 | 3543 | # Copied from https://github.com/ohmu/ohmu_common_py ohmu_common_py/pgutil.py version 0.0.1-0-unknown-fa54b44
"""
pghoard - postgresql utility functions
Copyright (c) 2015 Ohmu Ltd
See LICENSE for details
"""
try:
from urllib.parse import urlparse, parse_qs # pylint: disable=no-name-in-module, import-error
excep... | apache-2.0 | 4,727,380,614,604,684,000 | 34.43 | 119 | 0.594129 | false |
vgkholla/ambry | ambry-tools/scripts/layout-analyzer.py | 7 | 7025 | #!/usr/bin/python2.7
import argparse
import json
import sys
from collections import defaultdict
class Node(object):
def __init__(self, node, datacenter):
self.node = node
self.datacenter = datacenter
self.partitions = set()
@property
def hostname(self):
return self.node["... | apache-2.0 | -2,986,022,109,325,995,000 | 36.768817 | 119 | 0.560142 | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/topi/python/topi/testing/roi_align_python.py | 2 | 3126 | # 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 u... | apache-2.0 | 9,151,436,490,313,603,000 | 38.56962 | 94 | 0.559181 | false |
zhouxiao-coder/Paddle | demo/introduction/trainer_config.py | 3 | 1344 | # Copyright (c) 2016 PaddlePaddle 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 applic... | apache-2.0 | 7,014,155,936,608,804,000 | 31.780488 | 80 | 0.720238 | false |
caesar2164/edx-platform | common/djangoapps/track/transformers.py | 51 | 16677 | """
EventTransformers are data structures that represents events, and modify those
events to match the format desired for the tracking logs. They are registered
by name (or name prefix) in the EventTransformerRegistry, which is used to
apply them to the appropriate events.
"""
import json
import logging
from opaque_... | agpl-3.0 | -4,993,183,082,950,215,000 | 32.089286 | 118 | 0.611261 | false |
luci/luci-py | appengine/swarming/server/task_request_test.py | 2 | 86434 | #!/usr/bin/env vpython
# Copyright 2014 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import datetime
import logging
import random
import string
import sys
import unittest
import test_env
test_env.setup_test_... | apache-2.0 | -3,309,384,925,261,021,000 | 36.843257 | 80 | 0.60541 | false |
Clemson-DPA/dpa-pipe | dpa/app/session.py | 1 | 9786 |
from abc import ABCMeta, abstractmethod, abstractproperty
import importlib
import os
import shlex
import subprocess
import socket
import time
import rpyc
from dpa.app.entity import EntityRegistry
from dpa.env.vars import DpaVars
from dpa.ptask.area import PTaskArea
from dpa.ptask import PTaskError, PTask
from dpa.si... | mit | 835,993,178,283,954,700 | 30.365385 | 80 | 0.41263 | false |
h2non/paco | paco/wait.py | 1 | 3118 | # -*- coding: utf-8 -*-
import asyncio
from .assertions import isiter
from .concurrent import ConcurrentExecutor
@asyncio.coroutine
def wait(*coros_or_futures, limit=0, timeout=None, loop=None,
return_exceptions=False, return_when='ALL_COMPLETED'):
"""
Wait for the Futures and coroutine objects given... | mit | 1,045,240,907,255,369,900 | 36.119048 | 79 | 0.650096 | false |
BehavioralInsightsTeam/edx-platform | lms/djangoapps/grades/apps.py | 16 | 1502 | """
Grades Application Configuration
Signal handlers are connected here.
"""
from django.apps import AppConfig
from django.conf import settings
from edx_proctoring.runtime import set_runtime_service
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType, PluginURLs, PluginSettings
class Gra... | agpl-3.0 | -5,582,814,633,632,640,000 | 32.377778 | 107 | 0.633156 | false |
akopich/spark | python/pyspark/java_gateway.py | 56 | 5851 | #
# 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,350,691,943,521,753,000 | 45.070866 | 100 | 0.655785 | false |
MatriX-Coder/wsploit | modules/wjoomlacomponents.py | 1 | 8322 | #!/usr/bin/python
# Wsploit Project
'''
this is simple joomla
components scanner
'''
try:
import urllib2, Queue
except:
print 'You need urllib2 and Queue librarys installed.'
try:
from threading import Thread
except:
print 'You need threading library installed.'
try:
from time import sleep
except:
print 'You ... | artistic-2.0 | 5,440,260,959,330,500,000 | 24.685185 | 55 | 0.727469 | false |
anentropic/django-oscar | tests/integration/offer/availability_tests.py | 40 | 1143 | from django.test import TestCase
from oscar.apps.offer import models
from oscar.test.factories import (
create_order, OrderDiscountFactory, UserFactory)
class TestAPerUserConditionalOffer(TestCase):
def setUp(self):
self.offer = models.ConditionalOffer(max_user_applications=1)
self.user = Us... | bsd-3-clause | -853,793,773,920,993,200 | 37.1 | 71 | 0.712161 | false |
uskudnik/ggrc-core | src/ggrc/migrations/versions/20130910232450_53ef72c8a867_remove_old_audit_tab.py | 2 | 13296 | """Remove old audit tables
Revision ID: 53ef72c8a867
Revises: 526117e15ce4
Create Date: 2013-09-10 23:24:50.751098
"""
# revision identifiers, used by Alembic.
revision = '53ef72c8a867'
down_revision = '526117e15ce4'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
NOT_NULL_COLS... | apache-2.0 | -4,135,967,233,158,390,000 | 54.865546 | 116 | 0.675842 | false |
ryokochang/Slab-GCS | ExtLibs/Mavlink/pymavlink/generator/lib/genxmlif/xmlifApi.py | 12 | 54395 | #
# genxmlif, Release 0.9.0
# file: xmlifapi.py
#
# API (interface) classes for generic interface package
#
# history:
# 2007-06-29 rl created, classes extracted from xmlifbase.py
#
# Copyright (c) 2005-2008 by Roland Leuthe. All rights reserved.
#
# ------------------------------------------------------------------... | gpl-3.0 | 7,730,973,759,348,299,000 | 41.134005 | 144 | 0.616803 | false |
shaistaansari/django | tests/admin_widgets/tests.py | 55 | 57921 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import gettext
import os
from datetime import datetime, timedelta
from importlib import import_module
from unittest import skipIf
from django import forms
from django.conf import settings
from django.contrib import admin
from django.contrib.admin import ... | bsd-3-clause | -1,057,694,303,072,237,600 | 44.949206 | 406 | 0.623635 | false |
stefelisabeth/dplace | dplace_app/api_views.py | 1 | 21716 | import json
import re
import datetime
from itertools import groupby
import logging
from django.db import connection
from django.db.models import Prefetch, Q, Count
from django.shortcuts import get_object_or_404
from django.http import Http404
from rest_framework import viewsets
from rest_framework.pagination import P... | mit | 6,217,632,777,301,787,000 | 39.819549 | 536 | 0.611945 | false |
vjmac15/Lyilis | lib/youtube_dl/extractor/aparat.py | 15 | 2195 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
mimetype2ext,
)
class AparatIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?aparat\.com/(?:v/|video/video/embed/videohash/)(?P<id>[a-zA-Z0-9]+)'
_TEST = {
'url': ... | gpl-3.0 | -1,589,022,954,366,422,800 | 30.623188 | 106 | 0.499542 | false |
denys-duchier/django | tests/file_uploads/tests.py | 45 | 23742 | import base64
import hashlib
import os
import shutil
import sys
import tempfile as sys_tempfile
import unittest
from io import BytesIO, StringIO
from urllib.parse import quote
from django.core.files import temp as tempfile
from django.core.files.uploadedfile import SimpleUploadedFile
from django.http.multipartparser i... | bsd-3-clause | -218,260,698,169,522,560 | 38.558333 | 115 | 0.554624 | false |
onyxfish/agate | agate/table/bar_chart.py | 3 | 1303 | #!/usr/bin/env python
# pylint: disable=W0212
import leather
from agate import utils
def bar_chart(self, label=0, value=1, path=None, width=None, height=None):
"""
Render a bar chart using :class:`leather.Chart`.
:param label:
The name or index of a column to plot as the labels of the chart.
... | mit | 4,765,904,349,357,894,000 | 29.302326 | 74 | 0.646201 | false |
heiscsy/evolutus_ros_src | evolutus_filter/build/catkin_generated/installspace/_setup_util.py | 4 | 12275 | #!/usr/bin/python
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, 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 mu... | gpl-2.0 | 4,278,920,657,189,255,000 | 41.770035 | 213 | 0.657515 | false |
robhudson/kuma | vendor/packages/translate/storage/wordfast.py | 25 | 16043 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007-2010 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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; e... | mpl-2.0 | -3,540,750,116,507,062,000 | 36.71934 | 93 | 0.598887 | false |
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools | third_party/pylint/checkers/similar.py | 64 | 14174 | # pylint: disable=W0622
# Copyright (c) 2004-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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 ver... | bsd-3-clause | 1,616,317,361,231,289,600 | 37.102151 | 80 | 0.564484 | false |
wnesl/gnuradio-IA | gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py | 18 | 13570 | #!/usr/bin/env python
from gnuradio import gr, gr_unittest
class test_hier_block2(gr_unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_001_make(self):
hblock = gr.hier_block2("test_block",
gr.io_signature(1,1,gr.sizeof_int),
gr.io_signature(1,1,gr.sizeof_int))
... | gpl-3.0 | 8,499,547,956,467,680,000 | 35.775068 | 83 | 0.576197 | false |
chubbymaggie/claripy | claripy/vsa/bool_result.py | 2 | 5012 | from ..backend_object import BackendObject
class BoolResult(BackendObject):
def __init__(self, op=None, args=None):
self._op = op
self._args = args
def value(self):
raise NotImplementedError()
def __len__(self):
return BackendError()
def __eq__(self, other):
r... | bsd-2-clause | 7,863,521,839,149,455,000 | 23.935323 | 83 | 0.582203 | false |
emilyvon/titanium_mobile | support/android/android.py | 33 | 15397 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Appcelerator Titanium Mobile
# Copyright (c) 2011-2013 by Appcelerator, Inc. All Rights Reserved.
# Licensed under the terms of the Apache Public License
# Please see the LICENSE included with this distribution for details.
#
# Android Application Script
#
import os, s... | apache-2.0 | -1,732,317,656,061,341,000 | 39.096354 | 243 | 0.681302 | false |
will4906/PatentCrawler | config/crawler_config.py | 1 | 8899 | # -*- coding: utf-8 -*-
"""
Created on 2018/3/14
@author: will4906
采集的内容、方式定义
"""
from bs4 import BeautifulSoup
from controller.url_config import url_search, url_detail, url_related_info, url_full_text
from crawler.items import DataItem
from entity.crawler_item import BaseItem, ResultItem
class PatentId(BaseItem):... | apache-2.0 | -7,134,658,395,125,342,000 | 30.177122 | 122 | 0.609066 | false |
w1ll1am23/home-assistant | tests/components/minio/common.py | 27 | 1804 | """Minio Test event."""
TEST_EVENT = {
"Records": [
{
"eventVersion": "2.0",
"eventSource": "minio:s3",
"awsRegion": "",
"eventTime": "2019-05-02T11:05:07Z",
"eventName": "s3:ObjectCreated:Put",
"userIdentity": {"principalId": "SO9KNO6Y... | apache-2.0 | -2,185,058,942,565,162,800 | 36.583333 | 80 | 0.413525 | false |
sunlianqiang/kbengine | kbe/src/lib/python/Lib/distutils/tests/test_config.py | 90 | 3148 | """Tests for distutils.pypirc.pypirc."""
import sys
import os
import unittest
import tempfile
from distutils.core import PyPIRCCommand
from distutils.core import Distribution
from distutils.log import set_threshold
from distutils.log import WARN
from distutils.tests import support
from test.support import run_unittes... | lgpl-3.0 | 53,671,800,436,507,030 | 25.233333 | 68 | 0.594981 | false |
moccu/django-cruditor | tests/test_views.py | 1 | 15414 | import pytest
from django.contrib.auth.models import AnonymousUser
from django.contrib.messages import SUCCESS as SUCCESS_LEVEL
from django.contrib.messages import get_messages
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.urls import reverse
from cruditor.views import Cruditor4... | mit | 4,224,671,266,427,966,500 | 35.964029 | 90 | 0.597898 | false |
MoritzS/django | tests/urlpatterns_reverse/included_namespace_urls.py | 72 | 1059 | from django.conf.urls import include, url
from .utils import URLObject
from .views import empty_view, view_class_instance
testobj3 = URLObject('testapp', 'test-ns3')
testobj4 = URLObject('testapp', 'test-ns4')
app_name = 'included_namespace_urls'
urlpatterns = [
url(r'^normal/$', empty_view, name='inc-normal-vie... | bsd-3-clause | 1,291,412,455,333,850,000 | 41.36 | 113 | 0.629839 | false |
iwconfig/svtplay-dl | lib/svtplay_dl/fetcher/rtmp.py | 4 | 1391 | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
from __future__ import absolute_import
import subprocess
import shlex
from svtplay_dl.log import log
from svtplay_dl.utils import is_py2
from svtplay_dl.fetcher import VideoRetriever
from svtplay_dl.output import output
class RT... | mit | -336,394,785,929,697,400 | 26.82 | 71 | 0.562185 | false |
ryfx/modrana | modules/mod_options/mod_options.py | 1 | 66705 | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Handle option menus
#----------------------------------------------------------------------------
# Copyright 2008, Oliver White
#
# This program is free software: you can redistribute it and/or modify
# it under the... | gpl-3.0 | -762,559,210,851,248,400 | 43.559118 | 250 | 0.507908 | false |
wetek-enigma/enigma2 | lib/python/Screens/ChannelSelection.py | 2 | 110011 | # -*- coding: utf-8 -*-
from boxbranding import getMachineBuild, getMachineBrand, getMachineName
import os
from Tools.Profile import profile
from Screen import Screen
import Screens.InfoBar
import Components.ParentalControl
from Components.Button import Button
from Components.ServiceList import ServiceList, refreshSer... | gpl-2.0 | -5,276,986,568,105,051,000 | 35.816934 | 302 | 0.714351 | false |
justinlulejian/fah-gae | lib/requests/packages/chardet/langcyrillicmodel.py | 2762 | 17725 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | mit | 558,245,759,205,829,570 | 52.87538 | 70 | 0.582398 | false |
Johnzero/OE7 | openerp/report/render/rml2pdf/customfonts.py | 57 | 6317 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 P. Christeas, Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2013 OpenERP SA. (http://www.openerp.com)
#
# This program is free so... | agpl-3.0 | -1,474,445,017,707,548,400 | 38.48125 | 102 | 0.634162 | false |
yaqiyang/autorest | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py | 4 | 15472 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -392,949,431,673,902,700 | 39.135065 | 140 | 0.61649 | false |
fedorpatlin/ansible | lib/ansible/modules/windows/win_firewall_rule.py | 41 | 3499 | #!/usr/bin/env python
# (c) 2014, Timothy Vandenbrande <timothy.vandenbrande@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 Lic... | gpl-3.0 | 1,125,677,097,592,265,100 | 26.335938 | 74 | 0.605316 | false |
gannetson/django | django/core/serializers/xml_serializer.py | 16 | 15345 | """
XML serializer.
"""
from __future__ import unicode_literals
from collections import OrderedDict
from xml.dom import pulldom
from xml.sax import handler
from xml.sax.expatreader import ExpatParser as _ExpatParser
from django.apps import apps
from django.conf import settings
from django.core.serializers import bas... | bsd-3-clause | -4,052,712,863,014,442,500 | 38.447301 | 126 | 0.59218 | false |
jgoclawski/django | django/contrib/auth/hashers.py | 211 | 17463 | from __future__ import unicode_literals
import base64
import binascii
import hashlib
import importlib
from collections import OrderedDict
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.signals import setting_changed
from django.dispatch import receiver
from d... | bsd-3-clause | -8,282,980,165,179,837,000 | 32.777563 | 106 | 0.640783 | false |
dandan94/OpenGLTest | finalOpenGL/HelloGLFW/lib/boost_1_59_0/libs/python/test/shared_ptr.py | 46 | 2017 | # Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
'''
>>> from shared_ptr_ext import *
Test that shared_ptr<Derived> can be converted to shared_ptr<Base>
>>> Y.store(YYY(42))
>>> ... | gpl-3.0 | -7,482,129,758,503,748,000 | 14.515385 | 71 | 0.548835 | false |
Rogdham/pelican | pelican/tests/test_urlwrappers.py | 7 | 3417 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pelican.tests.support import unittest
from pelican.urlwrappers import Author, Category, Tag, URLWrapper
class TestURLWrapper(unittest.TestCase):
def test_ordering(self):
# URLWrappers are sorted by name
wrapper_a = URLWrapper(na... | agpl-3.0 | 5,795,915,438,564,902,000 | 37.325843 | 77 | 0.569628 | false |
gklyne/annalist | src/annalist_root/annalist/views/form_utils/fieldchoice.py | 1 | 5788 | """
This module defines a class used to represent a choice for an
enumerated-value field.
"""
from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2015, G. Klyne"
__license__ = "MIT (htt... | mit | -7,639,511,344,817,495,000 | 28.989637 | 101 | 0.575674 | false |
kaczla/PJN | src/Przecinki/scikit.py | 1 | 1048 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
import sys
import matplotlib.pyplot as plt
import numpy as np
from sklearn import datasets
from sklearn.cross_validation import cross_val_predict
from sklearn import linear_model
from sklearn import datasets
X = []
Y = []
for line in sys.stdin:
line = line.rstrip()
X... | gpl-2.0 | 6,433,059,116,830,044,000 | 25.2 | 85 | 0.666031 | false |
maoy/zknova | nova/tests/api/openstack/test_faults.py | 1 | 7383 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack LLC.
# 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/... | apache-2.0 | -6,985,270,577,377,998,000 | 34.495192 | 78 | 0.574563 | false |
hfp/tensorflow-xsmm | tensorflow/python/training/basic_loops.py | 13 | 2348 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -4,477,418,664,260,154,000 | 37.491803 | 80 | 0.682709 | false |
Sylrob434/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/fourtube.py | 19 | 3728 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
compat_urllib_request,
unified_strdate,
str_to_int,
parse_duration,
clean_html,
)
class FourTubeIE(InfoExtractor):
IE_NAME = '4tube'
_VALID_URL = r'https?://(?:www\.)?4tube\.com/vide... | gpl-3.0 | 9,063,025,987,505,879,000 | 38.252632 | 118 | 0.549624 | false |
srluge/SickRage | lib/sqlalchemy/orm/mapper.py | 75 | 108686 | # orm/mapper.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Logic to map Python classes to and from selectables.
Defines the :class:`~sqlalchemy... | gpl-3.0 | -1,884,553,419,290,850,000 | 39.12034 | 86 | 0.577756 | false |
hojel/calibre | src/calibre/library/restore.py | 14 | 11515 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import re, os, traceback, shutil
from threading import Thread
from operator import itemgetter
from calibre.ptempfile impo... | gpl-3.0 | -4,468,883,689,135,527,400 | 39.978648 | 98 | 0.543986 | false |
perlygatekeeper/glowing-robot | Little_Alchemy_2/Scraper_python/env/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.py | 56 | 26248 | from __future__ import absolute_import, division, unicode_literals
import re
from xml.sax.saxutils import escape, unescape
from pip._vendor.six.moves import urllib_parse as urlparse
from . import base
from ..constants import namespaces, prefixes
__all__ = ["Filter"]
allowed_elements = frozenset((
(namespaces[... | artistic-2.0 | -698,549,267,309,599,400 | 28.294643 | 158 | 0.511201 | false |
zasdfgbnm/tensorflow | tensorflow/contrib/kernel_methods/python/losses_test.py | 23 | 11003 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 3,086,953,198,525,964,000 | 46.83913 | 80 | 0.624466 | false |
dhamaniasad/mythbox | resources/lib/twisted/twisted/test/test_logfile.py | 59 | 9810 | # Copyright (c) 2001-2007 Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.trial import unittest
# system imports
import os, time, stat
# twisted imports
from twisted.python import logfile, runtime
class LogFileTestCase(unittest.TestCase):
"""
Test the rotating log file.
"""
de... | gpl-2.0 | 7,716,343,718,608,017,000 | 30.242038 | 80 | 0.57105 | false |
svn2github/django | django/core/management/commands/test.py | 111 | 2965 | import sys
import os
from optparse import make_option, OptionParser
from django.conf import settings
from django.core.management.base import BaseCommand
from django.test.utils import get_runner
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--noinput',
actio... | bsd-3-clause | -3,677,656,493,452,897,300 | 38.533333 | 81 | 0.601012 | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.2/Lib/plat-linux2/DLFCN.py | 2 | 1632 | # Generated by h2py from /usr/include/dlfcn.h
_DLFCN_H = 1
# Included from features.h
_FEATURES_H = 1
__USE_ANSI = 1
__FAVOR_BSD = 1
_ISOC99_SOURCE = 1
_POSIX_SOURCE = 1
_POSIX_C_SOURCE = 199506L
_XOPEN_SOURCE = 600
_XOPEN_SOURCE_EXTENDED = 1
_LARGEFILE64_SOURCE = 1
_BSD_SOURCE = 1
_SVID_SOURCE = 1
_BSD_SOURCE = 1
_SV... | mit | -901,191,265,845,006,600 | 18.662651 | 76 | 0.651348 | false |
hoevenvd/weewx_poller | bin/weedb/sqlite.py | 1 | 4562 | #
# Copyright (c) 2012 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
# $Revision: 829 $
# $Author: tkeffer $
# $Date: 2013-01-19 08:05:49 -0800 (Sat, 19 Jan 2013) $
#
"""Driver for sqlite"""
import os.path
# Import sqlite3. If it does not support the 'with' stateme... | gpl-3.0 | 3,043,879,038,853,410,000 | 37.025 | 105 | 0.623411 | false |
mozilla/make.mozilla.org | vendor-local/lib/python/celery/tests/test_backends/test_redis.py | 14 | 3385 | from __future__ import absolute_import
from __future__ import with_statement
import sys
import socket
from nose import SkipTest
from celery.exceptions import ImproperlyConfigured
from celery import states
from celery.utils import uuid
from celery.backends import redis
from celery.backends.redis import RedisBackend
... | bsd-3-clause | -5,259,620,428,144,572,000 | 28.181034 | 66 | 0.625702 | false |
hryamzik/ansible | lib/ansible/modules/windows/win_package.py | 4 | 9677 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Trond Hindenes <trond@hindenes.com>, and others
# 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
# file of the same name
ANSIBLE_METADATA... | gpl-3.0 | -4,069,391,142,130,802,700 | 36.94902 | 131 | 0.715718 | false |
thaddeusdiamond/Social-Hierarchical-Learning | ext/protobuf/python/google/protobuf/internal/test_util.py | 295 | 27103 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | mit | 2,753,309,851,533,791,700 | 41.68189 | 78 | 0.749253 | false |
chatelak/RMG-Py | rmgpy/solver/__init__.py | 11 | 1557 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the
# RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free ... | mit | -4,041,207,743,184,250,000 | 47.65625 | 80 | 0.671805 | false |
danforthcenter/plantcv | plantcv/plantcv/photosynthesis/analyze_fvfm.py | 2 | 5529 | # Fluorescence Analysis
import os
import cv2
import numpy as np
import pandas as pd
from plotnine import ggplot, geom_label, aes, geom_line
from plantcv.plantcv import print_image
from plantcv.plantcv import plot_image
from plantcv.plantcv import fatal_error
from plantcv.plantcv import params
from plantcv.plantcv impo... | mit | 4,291,254,288,133,156,400 | 45.462185 | 115 | 0.649485 | false |
vicky2135/lucious | oscar/lib/python2.7/site-packages/urllib3/exceptions.py | 223 | 6603 | from __future__ import absolute_import
from .packages.six.moves.http_client import (
IncompleteRead as httplib_IncompleteRead
)
# Base Exceptions
class HTTPError(Exception):
"Base exception used by this module."
pass
class HTTPWarning(Warning):
"Base warning used by this module."
pass
class Po... | bsd-3-clause | 4,375,550,607,050,402,000 | 25.841463 | 84 | 0.700288 | false |
tutengfei/zerorpc-python | tests/zmqbug.py | 94 | 5183 | # -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | mit | -7,863,638,105,190,453,000 | 30.797546 | 89 | 0.59753 | false |
chachan/nodeshot | nodeshot/community/notifications/migrations/0001_initial.py | 5 | 4082 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Notification',
fields=[
... | gpl-3.0 | -4,581,807,779,269,523,000 | 68.186441 | 288 | 0.589417 | false |
waveform80/lars | lars/datatypes/url.py | 1 | 10354 | # vim: set et sw=4 sts=4 fileencoding=utf-8:
#
# Copyright (c) 2013-2017 Dave Jones <dave@waveform.org.uk>
# Copyright (c) 2013 Mime Consulting Ltd. <info@mimeconsulting.co.uk>
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated docum... | mit | -247,906,314,771,236,100 | 29.542773 | 79 | 0.633668 | false |
adobdin/timmy | timmy/analyze_modules/rabbitmq.py | 1 | 7526 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | apache-2.0 | -8,396,333,004,954,782,000 | 35.357488 | 78 | 0.552485 | false |
smcantab/pele | playground/amber/driver_sanitycheck.py | 7 | 1208 | from pele.amber import amberSystem as amb
# create a new amber system and load database to be pruned
sys = amb.AMBERSystem('coords.prmtop', 'coords.inpcrd')
dbcurr = sys.create_database(db="aladipep.db")
print 'Collecting minima to delete .. '
listTODel = []
for minimum in dbcurr.minima():
testOutCome1 = sy... | gpl-3.0 | -3,238,013,312,960,548,400 | 29.2 | 59 | 0.619205 | false |
sorenk/ansible | lib/ansible/utils/module_docs_fragments/ipa.py | 27 | 2627 | # Copyright (c) 2017-18, Ansible Project
# Copyright (c) 2017-18, Abhijeet Kasurde (akasurde@redhat.com)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Parameters for FreeIPA/IPA modules
DOCUMENTATION = '''
options:
ipa_port:
... | gpl-3.0 | -7,878,302,886,946,918,000 | 48.566038 | 122 | 0.71831 | false |
barykaed/Pelican-Test | activate/Lib/rlcompleter.py | 100 | 5763 | """Word completion for GNU readline.
The completer completes keywords, built-ins and globals in a selectable
namespace (which defaults to __main__); when completing NAME.NAME..., it
evaluates (!) the expression up to the last dot and completes its attributes.
It's very cool to do "import sys" type "sys.", hit the com... | mit | -4,020,060,071,220,440,000 | 33.927273 | 80 | 0.616693 | false |
feigames/Odoo | addons/survey/__init__.py | 385 | 1037 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 | 2,154,562,227,659,596,300 | 42.208333 | 78 | 0.614272 | false |
mfortner/MyPythonKoans | python2/koans/about_true_and_false.py | 1 | 1502 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutTrueAndFalse(Koan):
def truth_value(self, condition):
if condition:
return 'true stuff'
else:
return 'false stuff'
def test_true_is_treated_as_true(self):
self.assertEqu... | mit | -6,362,949,896,998,020,000 | 35.634146 | 67 | 0.626498 | false |
llazzaro/analyzerstrategies | tests/test_sma_strategy.py | 1 | 1444 | import random
import unittest
from pyStock.models import (
Exchange,
Stock,
Account,
Owner,
)
from pyStock.models.money import Currency
from analyzer.backtest.constant import (
SELL,
BUY_TO_COVER,
)
from analyzerstrategies.sma_strategy import SMAStrategy
class TestSMAStrategy(unittest.TestCa... | bsd-3-clause | 5,868,838,307,480,386,000 | 37 | 281 | 0.637812 | false |
takeshineshiro/keystone | keystone/common/extension.py | 31 | 1652 | # Copyright 2013 OpenStack Foundation
#
# 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,783,975,581,597,571,600 | 35.711111 | 75 | 0.724576 | false |
bankonmeOS/cjdns | node_build/dependencies/libuv/build/gyp/pylib/gyp/generator/android.py | 15 | 43658 | # 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | gpl-3.0 | -1,663,012,194,707,850,800 | 39.725746 | 80 | 0.642013 | false |
ichuang/sympy | sympy/polys/domains/gmpyrationalfield.py | 3 | 3001 | """Implementaton of :class:`GMPYRationalField` class. """
from sympy.polys.domains.rationalfield import RationalField
from sympy.polys.domains.groundtypes import (
GMPYRationalType, SymPyRationalType,
gmpy_numer, gmpy_denom, gmpy_factorial,
)
from sympy.polys.polyerrors import CoercionFailed
class GMPYRatio... | bsd-3-clause | 6,129,132,649,464,025,000 | 30.260417 | 74 | 0.579474 | false |
cipriancraciun/extremely-simple-cluster-platform | components/py-tools/sources/escp/tools/enforcements.py | 1 | 23625 |
import re
import types
import escp.tools.callables as callables
import escp.tools.outcomes as outcomes
_e_debug = False
class Enforcer (object) :
def __init__ (self) :
return
def __nonzero__ (self) :
return _e_debug
def enforce (self, _condition) :
if _condition is not True :
raise Enforc... | gpl-3.0 | -7,422,290,239,341,858,000 | 29.842037 | 215 | 0.673989 | false |
linearregression/mpld3 | mpld3/__init__.py | 20 | 1109 | """
Interactive D3 rendering of matplotlib images
=============================================
Functions: General Use
----------------------
:func:`fig_to_html`
convert a figure to an html string
:func:`fig_to_dict`
convert a figure to a dictionary representation
:func:`show`
launch a web server to view... | bsd-3-clause | -8,354,839,745,295,577,000 | 24.790698 | 68 | 0.620379 | false |
edgedb/edgedb | edb/edgeql/compiler/inference/multiplicity.py | 1 | 21233 | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2020-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | apache-2.0 | -2,277,188,732,583,119,400 | 29.683526 | 79 | 0.62822 | false |
luzheqi1987/nova-annotation | nova/vnc/__init__.py | 38 | 1810 | #!/usr/bin/env python
# Copyright (c) 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | apache-2.0 | -7,956,805,474,462,706,000 | 37.510638 | 77 | 0.614365 | false |
meh/servo | tests/wpt/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/generate.py | 226 | 2091 | #!/usr/bin/python
import os
import sys
THIS_NAME = "generate.py"
# Note: these lists must be kept in sync with the lists in
# Document-createElement-namespace.html, and this script must be run whenever
# the lists are updated. (We could keep the lists in a shared JSON file, but
# seems like too much effort.)
FILES =... | mpl-2.0 | 3,605,091,391,020,475,400 | 26.155844 | 80 | 0.589192 | false |
sbellem/django | django/contrib/contenttypes/models.py | 273 | 7798 | from __future__ import unicode_literals
import warnings
from django.apps import apps
from django.db import models
from django.db.utils import IntegrityError, OperationalError, ProgrammingError
from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text, python_2_unicode... | bsd-3-clause | -2,790,826,641,743,166,000 | 37.413793 | 105 | 0.590536 | false |
popazerty/dvbapp-gui2 | lib/python/Components/config.py | 6 | 54005 | from enigma import getPrevAsciiCode
from Tools.NumericalTextInput import NumericalTextInput
from Tools.Directories import resolveFilename, SCOPE_CONFIG, fileExists
from Components.Harddisk import harddiskmanager
from copy import copy as copy_copy
from os import path as os_path
from time import localtime, strftime
# Co... | gpl-2.0 | -4,205,983,932,562,745,300 | 25.682312 | 195 | 0.663809 | false |
jianjunz/online-judge-solutions | leetcode/1223-graph-connectivity-with-threshold.py | 2 | 1095 | class Solution:
def areConnected(self, n: int, threshold: int, queries: List[List[int]]) -> List[bool]:
cities=[0]*(n+1)
group={}
nextGroupId=1
def union(source, to):
if source==to:
return
for c in group[source]:
... | mit | 5,391,455,218,779,802,000 | 32.28125 | 91 | 0.46758 | false |
nagnath006/Soccer-Analytics | Soccer-Analytics/Lib/encodings/utf_16_be.py | 860 | 1037 | """ Python 'utf-16-be' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
encode = codecs.utf_16_be_encode
def decode(input, errors='strict'):
return codecs.utf_16_be_decode(input, errors, True)
class IncrementalEncod... | mpl-2.0 | 6,223,694,101,009,345,000 | 23.690476 | 61 | 0.712633 | false |
fucxy/ESPython | SDK/ESP8266_NONOS_SDK/tools/make_cert.py | 6 | 1411 | import os
class Cert(object):
def __init__(self, name, buff):
self.name = name
self.len = len(buff)
self.buff = buff
pass
def __str__(self):
out_str = ['\0']*32
for i in range(len(self.name)):
out_str[i] = self.name[i]
out_str = "".join(... | mit | -1,542,461,129,570,458,000 | 25.622642 | 56 | 0.477675 | false |
mskrzypkows/servo | tests/wpt/web-platform-tests/webdriver/user_input/sendkeys_test.py | 141 | 3188 | import os
import sys
import random
import unittest
sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../..")))
import base_test
repo_root = os.path.abspath(os.path.join(__file__, "../../.."))
sys.path.insert(1, os.path.join(repo_root, "tools", "webdriver"))
from webdriver import exceptions
class SendKeysTe... | mpl-2.0 | 5,445,272,607,829,949,000 | 32.208333 | 140 | 0.617315 | false |
ktosiek/spacewalk | proxy/proxy/rhnConstants.py | 3 | 1463 | #!/usr/bin/python
#
# Copyright (c) 2008--2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should... | gpl-2.0 | -4,732,060,325,747,034,000 | 30.804348 | 78 | 0.672591 | false |
makermade/arm_android-21_arm-linux-androideabi-4.8 | lib/python2.7/nntplib.py | 157 | 21135 | """An NNTP client class based on RFC 977: Network News Transfer Protocol.
Example:
>>> from nntplib import NNTP
>>> s = NNTP('news')
>>> resp, count, first, last, name = s.group('comp.lang.python')
>>> print 'Group', name, 'has', count, 'articles, range', first, 'to', last
Group comp.lang.python has 51 articles, rang... | gpl-2.0 | 2,184,284,403,858,647,300 | 32.708134 | 80 | 0.553395 | false |
datalogics/scons | bin/memoicmp.py | 2 | 2183 | #!/usr/bin/env python
#
# A script to compare the --debug=memoizer output found int
# two different files.
import sys,string
def memoize_output(fname):
mout = {}
lines=filter(lambda words:
len(words) == 5 and
words[1] == 'hits' and words[3] == 'misses',
... | mit | 344,834,245,684,390,850 | 28.90411 | 73 | 0.391663 | false |
louietsai/python-for-android | python3-alpha/extra_modules/gdata/apps/emailsettings/client.py | 48 | 23375 | #!/usr/bin/python2.4
#
# Copyright 2010 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 ... | apache-2.0 | 8,020,760,382,267,732,000 | 36.4 | 81 | 0.673925 | false |
diegoguimaraes/django | django/core/mail/backends/filebased.py | 35 | 2765 | """Email backend that writes messages to a file."""
import datetime
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail.backends.console import EmailBackend as ConsoleEmailBackend
from django.utils import six
class EmailBackend(ConsoleEmailBackend... | bsd-3-clause | -4,122,964,187,453,269,500 | 39.072464 | 107 | 0.599638 | false |
repotvsupertuga/tvsupertuga.repository | script.module.universalscrapers/lib/universalscrapers/common.py | 2 | 16257 | import HTMLParser
import json
import random
import re
import urllib2
import urlparse
import requests,os,time
import xbmc,xbmcaddon
USERDATA_PATH = xbmc.translatePath('special://home/userdata/addon_data')
ADDON_DATA = os.path.join(USERDATA_PATH,'script.module.universalscrapers')
full_file = ADDON_DATA + '/Log.txt'
def ... | gpl-2.0 | -7,718,691,009,701,874,000 | 40.261421 | 315 | 0.512395 | false |
Benrflanders/Pytris | pyglet/gl/lib_wgl.py | 41 | 5761 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | mit | -7,252,160,383,359,486,000 | 36.409091 | 79 | 0.618122 | false |
HarmJ0y/sparta | app/settings.py | 1 | 25730 | #!/usr/bin/env python
'''
SPARTA - Network Infrastructure Penetration Testing Tool (http://sparta.secforce.com)
Copyright (c) 2014 SECFORCE (Antonio Quina and Leonidas Stavliotis)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published... | gpl-3.0 | 5,327,895,277,197,737,000 | 59.399061 | 540 | 0.723086 | false |
svn2github/chromium-depot-tools | third_party/gsutil/gslib/bucket_listing_ref.py | 51 | 6349 | # Copyright 2012 Google Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge,... | bsd-3-clause | -964,310,703,412,498,300 | 35.28 | 80 | 0.693338 | false |
alheinecke/tensorflow-xsmm | tensorflow/contrib/session_bundle/exporter.py | 49 | 12341 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -8,954,033,795,216,479,000 | 37.565625 | 80 | 0.690058 | false |
F0rth/seafile-obsd-wip | web/main.py | 1 | 35100 | #!/usr/bin/env python2
# encoding: utf-8
import gettext
import locale
import os
import simplejson as json
import sys
import platform
import urllib
import web
from web.contrib.template import render_mako
import settings
from seaserv import CCNET_CONF_PATH
from seaserv import ccnet_rpc, seafile_rpc, applet_rpc
from se... | gpl-3.0 | -8,629,200,800,224,864,000 | 36.420043 | 121 | 0.493276 | 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.