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 |
|---|---|---|---|---|---|---|---|---|---|---|
ilo10/scikit-learn | sklearn/externals/joblib/hashing.py | 194 | 7504 | """
Fast cryptographic hash of Python objects, with a special case for fast
hashing of numpy arrays.
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# Copyright (c) 2009 Gael Varoquaux
# License: BSD Style, 3 clauses.
import warnings
import pickle
import hashlib
import sys
import types
import ... | bsd-3-clause | -6,359,991,771,594,605,000 | 34.904306 | 76 | 0.577026 | false |
ilmich/KISS | utils/generate-mobile-phone-regex.py | 8 | 5066 | #!/usr/bin/env python3
"""Generate Mobile Phone Regex
Usage:
generate-mobile-phone-regex.py -d [-i INPUT]
generate-mobile-phone-regex.py [-i INPUT [-o OUTPUT] [-O OUTPUT2]]
Options:
-i --input INPUT Input XML file path with phone information for all regions (from `libphonenumber`)
... | gpl-3.0 | 5,103,320,555,968,139,000 | 33.202703 | 115 | 0.580403 | false |
EmreAtes/spack | var/spack/repos/builtin/packages/pigz/package.py | 1 | 1817 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 6,962,396,112,476,465,000 | 38.5 | 78 | 0.652724 | false |
mbroadst/debian-qpid-python | mllib/__init__.py | 1 | 2433 | #
# 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 | -2,610,461,229,867,907,600 | 27.290698 | 70 | 0.706124 | false |
openstack/glance | glance/db/sqlalchemy/migrate_repo/versions/036_rename_metadef_schema_columns.py | 3 | 1041 | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | apache-2.0 | -3,916,304,198,285,735,000 | 40.64 | 78 | 0.737752 | false |
usakhelo/FreeCAD | src/Mod/Fem/PyGui/_TaskPanelFemMeshRegion.py | 2 | 9258 | # ***************************************************************************
# * *
# * Copyright (c) 2016 - Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... | lgpl-2.1 | 1,027,537,521,399,939,500 | 49.043243 | 157 | 0.569994 | false |
weolar/miniblink49 | v8_6_7/src/inspector/build/check_injected_script_source.py | 18 | 3538 | #!/usr/bin/env python
# Copyright (c) 2014 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list ... | apache-2.0 | 4,761,822,235,668,021,000 | 39.204545 | 166 | 0.67524 | false |
im-infamou5/volatility | volatility/plugins/linux/bash.py | 44 | 7893 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your o... | gpl-2.0 | 795,559,242,402,556,700 | 38.465 | 186 | 0.542759 | false |
mluo613/osf.io | scripts/find_guids_without_referents.py | 63 | 1593 | """Finds Guids that do not have referents or that point to referents that no longer exist.
E.g. a node was created and given a guid but an error caused the node to
get deleted, leaving behind a guid that points to nothing.
"""
import sys
from modularodm import Q
from framework.guid.model import Guid
from website.app ... | apache-2.0 | -8,243,769,414,867,814,000 | 36.046512 | 90 | 0.686755 | false |
banditlev/meangarden | node_modules/node-gyp/gyp/tools/pretty_gyp.py | 2618 | 4756 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Pretty-prints the contents of a GYP file."""
import sys
import re
# Regex to remove comments when we're counting braces.
COMMENT_RE = ... | mit | -4,911,334,906,318,114,000 | 29.683871 | 80 | 0.623633 | false |
ativelkov/murano-api | tools/install_venv.py | 4 | 2585 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2010 OpenStack Foundation
# Copyright 2013 IBM Corp.
# Copyright (c) 2013 Hewlett-Packard Development Co... | apache-2.0 | 1,906,202,496,667,559,200 | 33.013158 | 75 | 0.708704 | false |
domenicosolazzo/practice-django | static_site_generator/venv/lib/python2.7/site-packages/pip/download.py | 328 | 22580 | import cgi
import email.utils
import hashlib
import getpass
import mimetypes
import os
import platform
import re
import shutil
import sys
import tempfile
import pip
from pip.backwardcompat import urllib, urlparse, raw_input
from pip.exceptions import InstallationError, HashMismatch
from pip.util import (splitext, rmt... | mit | -5,037,010,720,661,597,000 | 34.062112 | 114 | 0.587467 | false |
akirk/youtube-dl | test/test_http.py | 115 | 4170 | #!/usr/bin/env python
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from youtube_dl import YoutubeDL
from youtube_dl.compat import compat_http_server, compat_urllib_request
import ss... | unlicense | 8,601,754,227,959,713,000 | 34.042017 | 96 | 0.617266 | false |
bobrock/eden | modules/unit_tests/s3/s3hierarchy.py | 14 | 78245 | # -*- coding: utf-8 -*-
#
# S3Hierarchy Unit Tests
#
# To run this script use:
# python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3hierarchy.py
#
import unittest
from lxml import etree
from s3dal import Field, Query
from s3.s3utils import *
from s3.s3rest import s3_request
from s3 import FS, S3... | mit | -6,888,390,389,572,345,000 | 36.206372 | 103 | 0.489859 | false |
snbueno/anaconda | pyanaconda/timezone.py | 2 | 6647 | #
# Copyright (C) 2012 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will be... | gpl-2.0 | -139,080,197,624,376,320 | 28.411504 | 78 | 0.644652 | false |
marcore/edx-platform | lms/djangoapps/branding/tests/test_page.py | 9 | 12064 | """
Tests for branding page
"""
import datetime
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.http import HttpResponseRedirect
from django.test.utils import override_settings
from django.test.client import RequestFactory
from pytz import UTC
from mock import patch,... | agpl-3.0 | 4,628,399,539,439,474,000 | 40.6 | 118 | 0.664622 | false |
laborautonomo/youtube-dl | youtube_dl/extractor/roxwel.py | 9 | 2026 | import re
import json
from .common import InfoExtractor
from ..utils import unified_strdate, determine_ext
class RoxwelIE(InfoExtractor):
_VALID_URL = r'https?://www\.roxwel\.com/player/(?P<filename>.+?)(\.|\?|$)'
_TEST = {
u'url': u'http://www.roxwel.com/player/passionpittakeawalklive.html',
... | unlicense | -714,727,709,332,298,400 | 40.346939 | 110 | 0.559724 | false |
mohammed-alfatih/servo | tests/wpt/web-platform-tests/webvtt/webvtt-file-format-parsing/webvtt-cue-text-parsing-rules/buildtests.py | 132 | 1947 | #!/usr/bin/python
import os
import urllib
import hashlib
doctmpl = """<!doctype html>
<title>WebVTT cue data parser test %s</title>
<style>video { display:none }</style>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/html/syntax/parsing/template.js><... | mpl-2.0 | 2,889,141,189,890,274,000 | 28.059701 | 117 | 0.526965 | false |
edx/edx-enterprise | integrated_channels/degreed/client.py | 1 | 9678 | # -*- coding: utf-8 -*-
"""
Client for connecting to Degreed.
"""
import datetime
import logging
import time
import requests
from six.moves.urllib.parse import urljoin # pylint: disable=import-error
from django.apps import apps
from integrated_channels.exceptions import ClientError
from integrated_channels.integra... | agpl-3.0 | -6,498,740,016,700,914,000 | 36.223077 | 116 | 0.605704 | false |
JohnWinter/ThinkStats2 | code/survival.py | 65 | 17881 | """This file contains code for use with "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
import numpy as np
import pandas
import nsfg
import thinkstats2
impor... | gpl-3.0 | -100,460,338,806,811,230 | 26.299237 | 86 | 0.598121 | false |
momm3/WelcomeBot | welcomebot/Lib/site-packages/urllib3/util/ssl_.py | 42 | 12073 | from __future__ import absolute_import
import errno
import warnings
import hmac
from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256
from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning
SSLContext = None
HAS_SNI = False
IS_PYOPENSSL = False
IS_SECURETRANSPORT = Fals... | mit | 3,779,740,869,926,180,000 | 34.824926 | 93 | 0.636047 | false |
nipunbatra/bayespy | bayespy/inference/vmp/nodes/categorical.py | 2 | 6193 | ######################################################################
# Copyright (C) 2011,2012,2014 Jaakko Luttinen
#
# This file is licensed under Version 3.0 of the GNU General Public
# License. See LICENSE for a text of the license.
######################################################################
##########... | gpl-3.0 | 9,116,089,082,670,859,000 | 28.631579 | 80 | 0.561925 | false |
jhawkesworth/ansible | test/units/modules/network/eos/test_eos_system.py | 59 | 4643 | # (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 | -721,867,653,523,183,000 | 41.209091 | 91 | 0.660349 | false |
vdrhtc/InLaTeXbot | src/InlineQueryResponseDispatcher.py | 1 | 5981 | from multiprocessing import Process, Lock, Event
from threading import Thread
import re
from telegram import InlineQueryResultArticle, InputTextMessageContent, \
InlineQueryResultCachedPhoto, TelegramError, ParseMode
from src.LoggingServer import LoggingServer
class InlineQueryResponseDispatcher():
logger =... | gpl-3.0 | 2,853,568,264,281,831,000 | 45.726563 | 135 | 0.615449 | false |
UB-info/estructura-datos | RafaelArqueroGimeno_S4/benchmark.py | 1 | 1333 | import ColaInterface
import PColaInterface
import random
from time import time
def benchmark(module):
'''returns a tuple with the cost of add and search in ms in given module'''
parser = module.initparser('LastFM_big.dat')
users = module.emptyType()
start = time()
for i in xrange(10):
... | mit | -2,834,047,702,808,939,500 | 35.027027 | 136 | 0.63841 | false |
entomb/CouchPotatoServer | couchpotato/core/providers/torrent/torrentbytes/__init__.py | 5 | 1737 | from .main import TorrentBytes
def start():
return TorrentBytes()
config = [{
'name': 'torrentbytes',
'groups': [
{
'tab': 'searcher',
'list': 'torrent_providers',
'name': 'TorrentBytes',
'description': 'See <a href="http://torrentbytes.net">Torrent... | gpl-3.0 | 4,332,948,098,727,218,000 | 30.017857 | 99 | 0.336788 | false |
Sapphirine/Yelp_Recommendation | Review_functions.py | 1 | 2119 | __author__ = 'Simons'
from main import*
from nltk.corpus import stopwords
from collections import Counter
from nltk import*
import types
import tfidf
def preProcessReviews(list):
porter = nltk.PorterStemmer()
stop = stopwords.words("english")
temp = []
i = 0;
G = []
for row in lis... | mit | -7,073,627,222,495,404,000 | 22.079545 | 76 | 0.53563 | false |
sebrandon1/nova | nova/tests/unit/api/openstack/compute/test_auth.py | 15 | 3211 | # Copyright 2013 IBM Corp.
# Copyright 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/LIC... | apache-2.0 | 1,031,442,143,523,977,900 | 39.1375 | 78 | 0.649642 | false |
bowang/tensorflow | tensorflow/python/kernel_tests/distributions/identity_bijector_test.py | 72 | 1798 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,777,976,779,264,280,000 | 37.255319 | 80 | 0.689655 | false |
betoesquivel/CIE | flask/lib/python2.7/site-packages/tornado/test/httpclient_test.py | 22 | 20058 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function, with_statement
import base64
import binascii
from contextlib import closing
import functools
import sys
import threading
from tornado.escape import utf8
from tornado.httpclient import HTTPRequest, HTTPResponse, _RequestProxy, HTT... | mit | -671,505,915,472,520,700 | 37.796905 | 94 | 0.612424 | false |
rickerc/cinder_audit | cinder/tests/api/contrib/test_snapshot_actions.py | 3 | 2517 | # Copyright 2013, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -1,584,511,543,110,447,000 | 32.56 | 77 | 0.681764 | false |
dliessi/frescobaldi | frescobaldi_app/historymanager.py | 3 | 3272 | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... | gpl-2.0 | 6,573,143,625,360,111,000 | 37.494118 | 90 | 0.70324 | false |
CUCWD/edx-platform | lms/djangoapps/instructor_task/tasks_base.py | 22 | 4590 | """
Base class for Instructor celery tasks.
"""
import logging
from celery import Task
from celery.states import FAILURE, SUCCESS
from lms.djangoapps.instructor_task.models import InstructorTask
# define different loggers for use within tasks and on client side
TASK_LOG = logging.getLogger('edx.celery.task')
class... | agpl-3.0 | 8,831,874,027,473,592,000 | 46.319588 | 106 | 0.677124 | false |
keithroe/vtkoptix | Imaging/Core/Testing/Python/TestWipe.py | 26 | 3668 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.... | bsd-3-clause | -5,634,612,346,855,539,000 | 32.345455 | 119 | 0.600327 | false |
tchernomax/ansible | test/units/modules/network/nxos/test_nxos_bgp.py | 18 | 5399 | # (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,148,471,536,583,707,000 | 39.291045 | 116 | 0.673828 | false |
guilherme-pg/citationhunt | config_test.py | 2 | 1363 | import config
import re
import unittest
class ConfigTest(unittest.TestCase):
@classmethod
def add_validate_categories_test(cls, cfg):
def test(self):
# Categories must have underscores instead of spaces.
self.assertNotIn(' ', cfg.hidden_category)
self.assertNotIn(' ... | mit | 8,257,072,208,109,540,000 | 35.837838 | 78 | 0.627293 | false |
gpagliuca/pyfas | pyfas/test/test_ppl.py | 2 | 2108 | import os
import pytest
import xlrd
import tempfile
from pyfas import Ppl
TEST_FLD = os.getcwd() + os.sep + "test_files" + os.sep
oscheck = pytest.mark.skipif(os.name == 'posix',
reason='this module works only on win')
def test_not_a_ppl():
with pytest.raises(ValueError) ... | gpl-3.0 | 8,338,642,411,082,946,000 | 30.430769 | 68 | 0.606262 | false |
Integral-Technology-Solutions/ConfigNOW-4.3 | Lib/xml/dom/ext/Printer.py | 3 | 13729 | ########################################################################
#
# File Name: Printer.py
#
# Documentation: http://docs.4suite.com/4DOM/Printer.py.html
#
"""
The printing sub-system.
WWW: http://4suite.com/4DOM e-mail: support@4suite.com
Copyright (c) 2000 Fourthought Inc, USA. Al... | mit | -2,053,807,567,154,942,200 | 34.752604 | 179 | 0.578484 | false |
OniOniOn-/MCEdit-Unified | pymclevel/run_regression_test.py | 13 | 5917 | # !/usr/bin/env python
import tempfile
import sys
import subprocess
import shutil
import os
import hashlib
import contextlib
import gzip
import fnmatch
import tarfile
import zipfile
def generate_file_list(directory):
for dirpath, dirnames, filenames in os.walk(directory):
for filename in filenames:
... | isc | -7,279,864,786,237,074,000 | 28.733668 | 114 | 0.61974 | false |
benoitsteiner/tensorflow | tensorflow/contrib/layers/python/layers/initializers_test.py | 111 | 7640 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 1,857,158,381,061,724,000 | 31.372881 | 80 | 0.606414 | false |
dcroc16/skunk_works | google_appengine/lib/python-gflags/gflags.py | 448 | 104236 | #!/usr/bin/env python
#
# Copyright (c) 2002, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this ... | mit | 8,488,262,851,087,142,000 | 35.420685 | 80 | 0.67399 | false |
aruizramon/alec_erpnext | erpnext/hr/doctype/salary_slip/salary_slip.py | 4 | 7973 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded, date_diff, money_in_words
from frappe.model.naming import ... | agpl-3.0 | -7,150,946,471,325,379,000 | 35.573394 | 104 | 0.692211 | false |
isharacomix/tvtgj | core/game.py | 1 | 2386 | # The Game is where it all starts. A Game is an abstract and thin package in
# which all of the elements of the game are stored. It is responsible for
# creating the world, parsing and writing to save files, and turning on/off
# graphics.
from core import gfx
from core import world
import sys
import traceback
# A G... | gpl-3.0 | 1,685,881,192,111,880,000 | 31.243243 | 81 | 0.482816 | false |
Silmathoron/NNGT | nngt/core/graph.py | 1 | 61996 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
#
# graph.py
#
# This file is part of the NNGT project to generate and analyze
# neuronal networks and their activity.
# Copyright (C) 2015-2019 Tanguy Fardet
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Pub... | gpl-3.0 | -4,304,501,609,651,131,400 | 36.505142 | 80 | 0.549068 | false |
abhiQmar/servo | tests/wpt/web-platform-tests/tools/pytest/testing/test_pytester.py | 203 | 3498 | import pytest
import os
from _pytest.pytester import HookRecorder
from _pytest.config import PytestPluginManager
from _pytest.main import EXIT_OK, EXIT_TESTSFAILED
def test_make_hook_recorder(testdir):
item = testdir.getitem("def test_func(): pass")
recorder = testdir.make_hook_recorder(item.config.pluginmana... | mpl-2.0 | -9,112,922,898,135,434,000 | 27.672131 | 73 | 0.663236 | false |
nkgilley/home-assistant | homeassistant/components/xs1/__init__.py | 8 | 2700 | """Support for the EZcontrol XS1 gateway."""
import asyncio
import logging
import voluptuous as vol
import xs1_api_client
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_SSL,
CONF_USERNAME,
)
from homeassistant.helpers import discovery
import homeassistant.helpers.confi... | apache-2.0 | -9,073,940,821,358,851,000 | 26.55102 | 87 | 0.651481 | false |
vrettasm/VGPA | code/numerics/runge_kutta4.py | 1 | 6322 | import numpy as np
from .ode_solver import OdeSolver
class RungeKutta4(OdeSolver):
"""
Runge-Kutta (4th order) method of integration:
https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods
"""
def __init__(self, dt, single_dim):
"""
Default constructor.
:param dt: di... | gpl-3.0 | 2,434,144,667,441,158,000 | 29.839024 | 89 | 0.483391 | false |
patdaburu/mothergeo-py | tests/test_logging.py | 1 | 1665 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from mothergeo.logging import loggable_class as loggable
class TestLoggable(unittest.TestCase):
"""
These test cases test the :py:func:`loggable_class` decorator method.
"""
def test_loggable_class_without_logger_name(self):
"""
... | gpl-2.0 | 2,841,874,134,267,497,000 | 37.72093 | 120 | 0.637838 | false |
beni55/networkx | networkx/algorithms/bipartite/basic.py | 12 | 6061 | # -*- coding: utf-8 -*-
"""
==========================
Bipartite Graph Algorithms
==========================
"""
# Copyright (C) 2013-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... | bsd-3-clause | 5,018,469,272,391,329,000 | 22.862205 | 78 | 0.53605 | false |
gg7/sentry | src/sentry/search/solr/client.py | 13 | 9036 | # -*- coding: utf-8 -*-
"""
sentry.search.solr.client
~~~~~~~~~~~~~~~~~~~~~~~~~
A majority of the Solr client is heavily inspired by Pysolr:
https://github.com/toastdriven/pysolr
The main differences are we focus on Python 2, and we must remove the
dependency on the ``requests`` library.
:copyright: (c) 2010-2014 by... | bsd-3-clause | -9,154,303,422,778,470,000 | 28.723684 | 86 | 0.547698 | false |
codenote/chromium-test | chrome/tools/process_dumps/process_dumps_linux.py | 53 | 9548 | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A tool to collect crash signatures for Chrome builds on Linux."""
import fnmatch
import optparse
import os
import shutil
import... | bsd-3-clause | 8,871,299,871,088,665,000 | 30.826667 | 80 | 0.630184 | false |
broadinstitute/ebola-predictor | apps/ebolacare/utils.py | 1 | 3618 | """
Utility functions used in the neural network.
@copyright: The Broad Institute of MIT and Harvard 2015
"""
import numpy as np
"""Formats the vector theta containing the neural net coefficients into matrix form
"""
def linear_index(mat_idx, N, L, S, K):
l = mat_idx[0] # layer
n = mat_idx[1] # node
i = ... | bsd-2-clause | -6,584,025,397,353,795,000 | 29.923077 | 83 | 0.510227 | false |
tomcounsell/Cobra | apps/seller/models/photo.py | 2 | 1222 | from django.db import models
from apps.seller.models.product import Product
from settings import CLOUDINARY
class Photo(models.Model): #exclusively product photos.
from settings import MEDIA_URL
product = models.ForeignKey(Product, related_name="photos")
rank = models.SmallIntegerField(null=Tr... | gpl-2.0 | 8,491,049,459,314,739,000 | 33.914286 | 93 | 0.690671 | false |
chrisenuf/fullerite | src/diamond/collectors/flume/test/testflume.py | 34 | 3344 | #!/usr/bin/python
# coding=utf-8
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from mock import patch
from mock import Mock
from diamond.collector import Collector
from flume import FlumeCollector
class TestFlumeCollector(CollectorTestCase):
def setUp(self):
... | apache-2.0 | 8,363,915,780,838,571,000 | 34.574468 | 76 | 0.594797 | false |
geoff-reid/RackHD | test/util/load_sku_packs.py | 13 | 3381 | '''
Copyright 2016, EMC, Inc.
Author(s):
This script load SKU packs from sources specified in install_default.json
'''
import fit_path # NOQA: unused import
import os
import sys
import subprocess
import fit_common
from nose.plugins.attrib import attr
@attr(all=True)
class fit_template(fit_common.unittest.TestCas... | apache-2.0 | -8,156,618,013,611,122,000 | 44.689189 | 115 | 0.554274 | false |
titasakgm/brc-stock | openerp/addons/sale_margin/__openerp__.py | 171 | 1634 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 | -7,927,313,550,403,016,000 | 37.904762 | 78 | 0.601591 | false |
lllucius/climacast | requests/packages/urllib3/util/connection.py | 221 | 4237 | from __future__ import absolute_import
import socket
from .wait import wait_for_read
from .selectors import HAS_SELECT, SelectorError
def is_connection_dropped(conn): # Platform-specific
"""
Returns True if the connection is dropped and should be closed.
:param conn:
:class:`httplib.HTTPConnecti... | agpl-3.0 | -8,882,420,078,959,317,000 | 31.592308 | 82 | 0.64692 | false |
mlperf/training_results_v0.7 | Intel/benchmarks/minigo/8-nodes-32s-cpx-tensorflow/symmetries.py | 1 | 5113 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -300,324,127,789,861,900 | 27.887006 | 75 | 0.598474 | false |
LSSTDESC/ReprocessingTaskForce | config/v14.0/jointcalConfig.py | 4 | 1223 | # Configuration file for jointcal
from lsst.meas.algorithms import LoadIndexedReferenceObjectsTask
# Select external catalogs for Astrometry
config.astrometryRefObjLoader.retarget(LoadIndexedReferenceObjectsTask)
config.astrometryRefObjLoader.ref_dataset_name='pan-starrs'
config.astrometryRefObjLoader.filterMap = {
... | gpl-2.0 | 6,837,226,767,033,756,000 | 28.119048 | 76 | 0.70973 | false |
youdonghai/intellij-community | python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_isinstance.py | 326 | 1609 | # Copyright 2008 Armin Ronacher.
# Licensed to PSF under a Contributor Agreement.
"""Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed. This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.
eg. isinstance(x, (int,... | apache-2.0 | 1,362,088,019,238,984,400 | 29.942308 | 77 | 0.546924 | false |
75651/kbengine_cloud | kbe/src/lib/python/Lib/lib2to3/fixes/fix_unicode.py | 136 | 1256 | r"""Fixer for unicode.
* Changes unicode to str and unichr to chr.
* If "...\u..." is not unicode literal change it into "...\\u...".
* Change u"..." into "...".
"""
from ..pgen2 import token
from .. import fixer_base
_mapping = {"unichr" : "chr", "unicode" : "str"}
class FixUnicode(fixer_base.BaseFix):
BM_c... | lgpl-3.0 | 3,297,189,463,506,174,000 | 28.904762 | 77 | 0.508758 | false |
GitAngel/django | tests/postgres_tests/test_ranges.py | 161 | 24567 | import datetime
import json
import unittest
from django import forms
from django.core import exceptions, serializers
from django.db import connection
from django.db.models import F
from django.test import TestCase, override_settings
from django.utils import timezone
from . import PostgreSQLTestCase
from .models impor... | bsd-3-clause | 3,744,807,052,368,257,500 | 37.933439 | 158 | 0.616518 | false |
mezz64/home-assistant | homeassistant/components/smartthings/config_flow.py | 10 | 9410 | """Config flow to configure SmartThings."""
import logging
from aiohttp import ClientResponseError
from pysmartthings import APIResponseError, AppOAuth, SmartThings
from pysmartthings.installedapp import format_install_url
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const impo... | apache-2.0 | 2,386,915,848,283,937,000 | 37.565574 | 97 | 0.580446 | false |
HybridF5/nova | nova/tests/unit/virt/libvirt/fake_imagebackend.py | 14 | 2649 | # Copyright 2012 Grid Dynamics
# 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... | apache-2.0 | -4,034,846,863,776,876,500 | 31.703704 | 78 | 0.600227 | false |
SingTel-DataCo/incubator-superset | superset/migrations/versions/956a063c52b3_adjusting_key_length.py | 17 | 4649 | """adjusting key length
Revision ID: 956a063c52b3
Revises: f0fbf6129e13
Create Date: 2016-05-11 17:28:32.407340
"""
# revision identifiers, used by Alembic.
revision = '956a063c52b3'
down_revision = 'f0fbf6129e13'
from alembic import op
import sqlalchemy as sa
def upgrade():
with op.batch_alter_table('cluster... | apache-2.0 | 5,642,841,171,418,842,000 | 44.578431 | 72 | 0.502043 | false |
pandeyop/tempest | tempest/api/volume/test_volumes_get.py | 11 | 6285 | # 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 requ... | apache-2.0 | 5,289,394,052,157,866,000 | 42.951049 | 78 | 0.631185 | false |
CruiseDevice/coala | tests/coalaDebugFlagTest.py | 13 | 5032 | import os
import re
import sys
import unittest
from unittest.mock import MagicMock, patch
from coalib import coala
from coala_utils.ContextManagers import prepare_file
from tests.TestUtilities import execute_coala, bear_test_module
# patch gets strangely lost when only defined in method or with context where
# act... | agpl-3.0 | 4,884,129,421,546,954,000 | 37.707692 | 78 | 0.565978 | false |
Yukarumya/Yukarum-Redfoxes | gfx/angle/src/libANGLE/renderer/angle_format.py | 2 | 1279 | #!/usr/bin/python
# Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# angle_format.py:
# Utils for ANGLE formats.
import json
import os
def reject_duplicate_keys(pairs):
found_keys = {}
for ... | mpl-2.0 | 7,054,853,812,837,327,000 | 27.422222 | 97 | 0.659891 | false |
atmark-techno/atmark-dist | user/python/Demo/sockets/udpecho.py | 4 | 1284 | #! /usr/bin/env python
# Client and server for udp (datagram) echo.
#
# Usage: udpecho -s [port] (to start a server)
# or: udpecho -c host [port] <file (client)
import sys
from socket import *
ECHO_PORT = 50000 + 7
BUFSIZE = 1024
def main():
if len(sys.argv) < 2:
usage()
if sys.argv[1] == '-s':
... | gpl-2.0 | -1,929,492,479,712,065,000 | 19.380952 | 57 | 0.612928 | false |
mariano/pyfire | pyfire/message.py | 2 | 5534 | import re
import types
from .entity import CampfireEntity
class Message(CampfireEntity):
""" Campfire message """
_TYPE_ENTER = "EnterMessage"
_TYPE_LEAVE = "LeaveMessage"
_TYPE_KICK = "KickMessage"
_TYPE_PASTE = "PasteMessage"
_TYPE_SOUND = "SoundMessage"
_TYPE_TEXT = "TextMessage"
... | mit | 8,026,012,745,602,700,000 | 29.916201 | 120 | 0.503795 | false |
cleahcim/go9p | lib/codereview/codereview.py | 8 | 106676 | # coding=utf-8
# (The line above is necessary so that I can use 世界 in the
# *comment* below without Python getting all bent out of shape.)
# Copyright 2007-2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may o... | bsd-3-clause | 979,651,635,514,798,600 | 29.043944 | 168 | 0.654075 | false |
lizardsystem/lizard5-apps | lizard_wms/migrations/0017_auto__add_field_wmssource_metadata.py | 2 | 4883 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'WMSSource.metadata'
db.add_column('lizard_wms_wmssource', 'metadata', self.gf('jsonfield.f... | lgpl-3.0 | 7,529,617,565,306,529,000 | 67.774648 | 212 | 0.550481 | false |
mhdella/scikit-learn | sklearn/tests/test_kernel_ridge.py | 342 | 3027 | import numpy as np
import scipy.sparse as sp
from sklearn.datasets import make_regression
from sklearn.linear_model import Ridge
from sklearn.kernel_ridge import KernelRidge
from sklearn.metrics.pairwise import pairwise_kernels
from sklearn.utils.testing import ignore_warnings
from sklearn.utils.testing import assert... | bsd-3-clause | -6,520,391,216,374,704,000 | 34.611765 | 76 | 0.671952 | false |
sanghinitin/golismero | thirdparty_libs/nltk/misc/babelfish.py | 12 | 6597 | # coding: utf8
# babelizer.py - API for simple access to babelfish.altavista.com.
# Requires python 2.0 or better.
# From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/64937
# Author: Jonathan Feinberg <jdf@pobox.com>
# Modified by Steven Bird to work with current babelfish
#
# See it in use a... | gpl-2.0 | -4,861,925,174,190,240,000 | 33.181347 | 124 | 0.582689 | false |
sebrandon1/neutron | neutron/tests/tempest/api/test_subnets.py | 3 | 2636 | # 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
# d... | apache-2.0 | 6,995,228,250,148,712,000 | 37.202899 | 78 | 0.707891 | false |
Captnoord/openpli-enigma2 | lib/python/Components/Keyboard.py | 30 | 1278 | from Components.Console import Console
from os import listdir as os_listdir, path as os_path
from re import compile as re_compile
from enigma import eEnv
class Keyboard:
def __init__(self):
self.keyboardmaps = []
self.readKeyboardMapFiles()
def readKeyboardMapFiles(self):
for keymapfile in os_listdir(eEnv.res... | gpl-2.0 | -615,107,473,190,515,500 | 28.72093 | 71 | 0.661189 | false |
nan86150/ImageFusion | ENV2.7/lib/python2.7/site-packages/setuptools/command/install_lib.py | 396 | 3771 | import os
import imp
from itertools import product, starmap
import distutils.command.install_lib as orig
class install_lib(orig.install_lib):
"""Don't add compiled flags to filenames of non-Python files"""
def run(self):
self.build()
outfiles = self.install()
if outfiles is not None:
... | mit | 5,486,610,486,670,692,000 | 30.957627 | 78 | 0.586582 | false |
hfp/tensorflow-xsmm | tensorflow/examples/adding_an_op/zero_out_3_test.py | 22 | 2003 | # 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 | -8,488,159,694,032,318,000 | 34.140351 | 80 | 0.665502 | false |
xuxiao/zulip | zerver/lib/utils.py | 115 | 2978 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import base64
import hashlib
import os
from time import sleep
from django.conf import settings
def statsd_key(val, clean_periods=False):
if not isinstance(val, str):
val = str(val)
if ':' in val:
val = val.split(':')[0]
val =... | apache-2.0 | 8,039,034,396,707,506,000 | 28.485149 | 82 | 0.589657 | false |
bavardage/statsmodels | statsmodels/sandbox/examples/ex_gam_results.py | 37 | 1660 | # -*- coding: utf-8 -*-
"""Example results for GAM from tests
Created on Mon Nov 07 13:13:15 2011
Author: Josef Perktold
The example is loaded from a test module. The test still fails but the
results look relatively good.
I don't know yet why there is the small difference and why GAM doesn't
converge in this case
"... | bsd-3-clause | 2,451,190,121,117,104,600 | 27.135593 | 70 | 0.694578 | false |
burakgon/E7_Elite_kernel | bionic/libc/kernel/tools/find_headers.py | 10 | 5175 | #!/usr/bin/env python
#
# this program is used to find source code that includes linux kernel headers directly
# (e.g. with #include <linux/...> or #include <asm/...>)
#
# then it lists them on the standard output.
import sys, cpp, glob, os, re, getopt, kernel
from utils import *
from defaults import *
program_dir = ... | gpl-2.0 | 2,143,049,704,981,379,000 | 29.441176 | 134 | 0.634783 | false |
antoinearnoud/openfisca-france-indirect-taxation | openfisca_france_indirect_taxation/__init__.py | 4 | 2591 | # -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute it and/or modify
# it ... | agpl-3.0 | 7,626,505,580,215,931,000 | 33.546667 | 96 | 0.710151 | false |
yoer/hue | desktop/core/ext-py/thrift-0.9.1/setup.py | 42 | 3274 | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... | apache-2.0 | -3,060,760,514,101,139,500 | 30.480769 | 87 | 0.629505 | false |
mapr/hue | desktop/core/ext-py/Django-1.6.10/tests/comment_tests/tests/test_app_api.py | 58 | 2664 | from __future__ import absolute_import
from django.conf import settings
from django.contrib import comments
from django.contrib.comments.models import Comment
from django.contrib.comments.forms import CommentForm
from django.core.exceptions import ImproperlyConfigured
from django.test.utils import override_settings
fr... | apache-2.0 | -4,290,720,529,181,561,300 | 32.3 | 78 | 0.697072 | false |
mlc0202/vitess | test/zkocc_test.py | 3 | 5876 | #!/usr/bin/env python
import datetime
import json
import logging
import os
import re
import tempfile
import time
import unittest
import environment
import tablet
import utils
from zk import zkocc
# We check in this test that we can achieve at least this QPS.
# Sometimes on slow machines this won't work.
# We used to... | bsd-3-clause | -4,100,650,946,342,376,000 | 35.04908 | 176 | 0.632573 | false |
Dhivyap/ansible | test/units/modules/network/check_point/test_cp_mgmt_time.py | 19 | 5179 | # Ansible module to manage CheckPoint Firewall (c) 2019
#
# 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 dist... | gpl-3.0 | -3,322,967,513,254,487,000 | 27.146739 | 109 | 0.579649 | false |
pdehaye/theming-edx-platform | lms/xmodule_namespace.py | 1 | 2164 | """
Namespace that defines fields common to all blocks used in the LMS
"""
from xblock.core import Namespace, Boolean, Scope, String, Float
from xmodule.fields import Date, Timedelta
from datetime import datetime
from pytz import UTC
class LmsNamespace(Namespace):
"""
Namespace that defines fields common to a... | agpl-3.0 | -939,136,195,491,969,900 | 35.677966 | 128 | 0.6622 | false |
eayunstack/neutron | neutron/db/l3_db.py | 1 | 91850 | # Copyright 2012 VMware, 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 a... | apache-2.0 | 4,394,850,409,946,506,000 | 46.22365 | 79 | 0.563255 | false |
40223145c2g18/c2g18 | exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/test/re_tests.py | 879 | 31796 | #!/usr/bin/env python3
# -*- mode: python -*-
# Re test suite and benchmark suite v1.5
# The 3 possible outcomes for each pattern
[SUCCEED, FAIL, SYNTAX_ERROR] = range(3)
# Benchmark suite (needs expansion)
#
# The benchmark suite does not test correctness, just speed. The
# first element of each tuple is the regex... | gpl-2.0 | -6,241,285,223,341,391,000 | 46.456716 | 167 | 0.448893 | false |
ychen820/microblog | y/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/tests/unit/cloudsearch2/test_exceptions.py | 4 | 1399 | import mock
from boto.compat import json
from tests.unit import unittest
from .test_search import HOSTNAME, CloudSearchSearchBaseTest
from boto.cloudsearch2.search import SearchConnection, SearchServiceException
def fake_loads_value_error(content, *args, **kwargs):
"""Callable to generate a fake ValueError"""
... | bsd-3-clause | 1,851,597,647,261,902,800 | 36.810811 | 78 | 0.68263 | false |
dkubiak789/odoo | addons/resource/faces/__init__.py | 448 | 1325 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | -3,861,867,562,380,540,400 | 43.166667 | 79 | 0.642264 | false |
ustramooner/CouchPotato | library/hachoir_core/field/generic_field_set.py | 12 | 19175 | from hachoir_core.field import (MissingField, BasicFieldSet, Field, ParserError,
createRawField, createNullField, createPaddingField, FakeArray)
from hachoir_core.dict import Dict, UniqKeyError
from hachoir_core.error import HACHOIR_ERRORS
from hachoir_core.tools import lowerBound
import hachoir_core.config as conf... | gpl-3.0 | 1,953,961,142,309,860,000 | 35.043233 | 95 | 0.551812 | false |
witgo/spark | python/pyspark/testing/utils.py | 8 | 5372 | #
# 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 | 1,892,599,557,435,379,000 | 30.052023 | 97 | 0.651526 | false |
mettekou/ghc | testsuite/driver/testlib.py | 1 | 68147 | # coding=utf8
#
# (c) Simon Marlow 2002
#
from __future__ import print_function
import io
import shutil
import os
import errno
import string
import re
import traceback
import time
import datetime
import copy
import glob
from math import ceil, trunc
import collections
import subprocess
from testglobals import *
from ... | bsd-3-clause | -7,262,003,100,037,589,000 | 33.328967 | 187 | 0.592797 | false |
mancoast/CPythonPyc_test | fail/340_test_imghdr.py | 87 | 4413 | import imghdr
import io
import os
import unittest
import warnings
from test.support import findfile, TESTFN, unlink
TEST_FILES = (
('python.png', 'png'),
('python.gif', 'gif'),
('python.bmp', 'bmp'),
('python.ppm', 'ppm'),
('python.pgm', 'pgm'),
('python.pbm', 'pbm'),
('python.jpg', 'jpeg')... | gpl-3.0 | 5,721,298,013,937,925,000 | 32.687023 | 74 | 0.568094 | false |
shivam1111/odoo | addons/account/wizard/account_report_general_ledger.py | 267 | 3191 | # -*- 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 | 848,249,944,292,666,000 | 47.348485 | 207 | 0.621435 | false |
mezz64/home-assistant | homeassistant/components/zha/device_tracker.py | 9 | 3321 | """Support for the ZHA platform."""
import functools
import time
from homeassistant.components.device_tracker import DOMAIN, SOURCE_TYPE_ROUTER
from homeassistant.components.device_tracker.config_entry import ScannerEntity
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispa... | apache-2.0 | -6,359,993,427,761,533,000 | 32.545455 | 86 | 0.651611 | false |
ErickMurillo/ciat_plataforma | guias_cacao/admin.py | 2 | 21034 | # -*- coding: utf-8 -*-
from django.contrib import admin
from .forms import *
from .models import *
from import_export.admin import ImportExportModelAdmin
class Foto1Inline(admin.TabularInline):
model = Foto1
extra = 1
max_num = 1
class Punto1Inline(admin.TabularInline):
model = Punto1
extra = 1
... | mit | -5,675,989,179,758,725,000 | 25.063197 | 134 | 0.680787 | false |
0--key/lib | portfolio/Python/scrapy/johnlewis/johnlewis_spider.py | 2 | 4348 | from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse, FormRequest
from scrapy.utils.url import urljoin_rfc
from scrapy.utils.response import get_base_url
from product_spiders.items import Product, ProductLoaderWithNameStrip as ProductLoader
... | apache-2.0 | -7,268,985,930,410,204,000 | 75.280702 | 184 | 0.678473 | false |
masiqi/douquan | pyxn/djangoxn/__init__.py | 1 | 8968 | import logging
import pyxn
from django.http import HttpResponse, HttpResponseRedirect
from django.core.exceptions import ImproperlyConfigured
from django.conf import settings
from member.models import User
try:
from threading import local
except ImportError:
from django.utils._threading_local import local
_... | mit | -6,832,818,545,002,341,000 | 38.681416 | 192 | 0.617417 | 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.