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
eroicaleo/LearningPython
interview/leet/218_The_Skyline_Problem_v4.py
1
2103
#!/usr/bin/env python # ---- ---------- # | | | | # | --- |----- | # | | | | | # | | | | | # --------------------------- from heapq import heapify, heappush, heappop import math class Solution: def getSkyline(self, buildings): ...
mit
8,386,122,393,007,316,000
33.47541
73
0.42368
false
bdfoster/blumate
tests/components/light/test_mqtt.py
1
12976
"""The tests for the MQTT light platform. Configuration for RGB Version with brightness: light: platform: mqtt name: "Office Light RGB" state_topic: "office/rgb1/light/status" command_topic: "office/rgb1/light/switch" brightness_state_topic: "office/rgb1/brightness/status" brightness_command_topic: "offic...
mit
-2,650,773,153,442,891,000
37.164706
79
0.590937
false
timlinux/inasafe
safe_extras/pydispatch/robust.py
20
1833
"""Module implementing error-catching version of send (sendRobust)""" from pydispatch.dispatcher import Any, Anonymous, liveReceivers, getAllReceivers from pydispatch.robustapply import robustApply def sendRobust( signal=Any, sender=Anonymous, *arguments, **named ): """Send signal from sender to all connected re...
gpl-3.0
3,423,928,458,381,347,000
31.157895
80
0.750682
false
runt18/nupic
src/nupic/frameworks/opf/expdescriptionhelpers.py
1
14471
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
-2,371,314,931,028,376,000
36.684896
86
0.673623
false
elventear/ansible
lib/ansible/modules/cloud/amazon/cloudtrail.py
16
8672
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
-5,214,764,208,236,645,000
33.967742
180
0.642643
false
lod/zookeepr
zk/model/social_network.py
3
1833
"""The application's model objects""" import sqlalchemy as sa from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.orm.collections import attribute_mapped_collection from meta import Base from pylons.controllers.util import abort from meta import Session from person_social_network_map import P...
gpl-2.0
-2,802,395,318,070,454,000
34.941176
78
0.683579
false
faywong/FFPlayer
project/jni/python/src/Demo/classes/Range.py
47
3126
"""Example of a generator: re-implement the built-in range function without actually constructing the list of values. OldStyleRange is coded in the way required to work in a 'for' loop before iterators were introduced into the language; using __getitem__ and __len__ . """ def handleargs(arglist): """Take list of ...
lgpl-2.1
-3,141,469,490,576,995,300
32.612903
81
0.591171
false
1d20/INT20H
myapp/views.py
1
2188
from django.shortcuts import render from django.http import HttpResponse from json import dumps as to_json from json import loads as from_json from models import * from neo import * def type_all(request): types = Type.objects.filter(is_approved=True) json = to_json([t.to_json() for t in types]) return Htt...
mit
1,386,330,978,446,644,200
30.710145
92
0.64808
false
tdyas/pants
tests/python/pants_test/backend/jvm/tasks/test_jar_task.py
1
13121
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import re from contextlib import contextmanager from textwrap import dedent from pants.backend.jvm.targets.java_agent import JavaAgent from pants.backend.jvm.targets.jvm_binary ...
apache-2.0
8,000,311,525,315,593,000
38.167164
99
0.549882
false
sgraham/nope
build/android/buildbot/bb_device_status_check.py
3
15555
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A class to keep track of devices across builds and report state.""" import json import logging import optparse import os import ps...
bsd-3-clause
601,549,340,300,601,200
37.502475
80
0.631373
false
laserson/luigi
luigi/contrib/esindex.py
13
14139
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-700,547,595,472,733,000
29.661605
115
0.579767
false
ladybug-analysis-tools/honeybee
honeybee/radiance/command/getinfo.py
1
1803
# coding=utf-8 """getinfo - get header information from a RADIANCE file""" from _commandbase import RadianceCommand from ..datatype import RadiancePath, RadianceBoolFlag import os class Getinfo(RadianceCommand): get_dimensions = RadianceBoolFlag('d', 'get_dimensions') output_file = RadiancePath('output', 'ge...
gpl-3.0
4,125,954,341,738,068,500
33.018868
81
0.605103
false
fkorotkov/pants
contrib/android/tests/python/pants_test/contrib/android/tasks/test_aapt_builder.py
14
2438
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pant...
apache-2.0
4,006,644,818,150,146,000
41.77193
99
0.680066
false
infinitewarp/poketrainer
library/api/pgoapi/__init__.py
5
2311
""" pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> 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...
mit
-6,915,630,182,820,110,000
34.569231
78
0.773691
false
chinghanyu/Cognet-RPi-linux
tools/perf/util/setup.py
242
1531
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
640,191,624,279,237,600
30.895833
82
0.664272
false
sjwilks/mavlink
pymavlink/examples/apmsetrate.py
11
2047
#!/usr/bin/env python ''' set stream rate on an APM ''' import sys, struct, time, os from optparse import OptionParser parser = OptionParser("apmsetrate.py [options]") parser.add_option("--baudrate", dest="baudrate", type='int', help="master port baud rate", default=115200) parser.add_option("--d...
lgpl-3.0
6,299,740,517,179,266,000
34.293103
93
0.639961
false
savoirfairelinux/OpenUpgrade
addons/product_visible_discount/product_visible_discount.py
41
3950
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
3,710,904,993,776,518,000
41.934783
126
0.583544
false
hynnet/openwrt-mt7620
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/lib2to3/tests/test_pytree.py
131
17346
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for pytree.py. NOTE: Please *don't* add doc strings to individual test methods! In verbose mode, printing of the module, class and method name is much more helpful than printing of (the first line of) the...
gpl-2.0
2,651,770,363,179,318,300
34.11336
80
0.552231
false
cpc26/python-oauth2
example/client.py
375
6700
""" The MIT License Copyright (c) 2007 Leah Culver 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, publis...
mit
-1,067,003,191,480,750,700
39.612121
151
0.71
false
SujaySKumar/django
tests/invalid_models_tests/test_models.py
144
24524
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import unittest from django.conf import settings from django.core.checks import Error from django.db import connections, models from django.test.utils import override_settings from .base import IsolatedModelsTestCase def get_max_column_name_length()...
bsd-3-clause
-3,655,613,874,796,013,600
30.766839
115
0.525363
false
olemb/mido
mido/backends/portmidi_init.py
1
4274
""" Low-level wrapper for PortMidi library Copied straight from Grant Yoshida's portmidizero, with slight modifications. """ import sys from ctypes import (CDLL, CFUNCTYPE, POINTER, Structure, c_char_p, c_int, c_long, c_uint, c_void_p, cast, create_string_buffer) import ctypes.u...
mit
8,474,149,212,892,872,000
24.289941
71
0.667525
false
godiard/wikipedia-activity
tools2/make_selection.py
1
12925
#!/usr/bin/env python # -*- coding: utf-8 -*- # take a list of pages # select a level default = 1 # prepare a list of links in the pages from the original list # create a file with the titles of all the selected pages # create a file with the content of all the selected pages import codecs import re from xml.sax impo...
gpl-2.0
5,894,688,917,631,787,000
36.572674
97
0.54793
false
DLu/rosbridge_suite
rosbridge_library/test/internal/test_ros_loader.py
12
11569
#!/usr/bin/env python import sys import rospy import rostest import unittest from rosbridge_library.internal import ros_loader class TestROSLoader(unittest.TestCase): def setUp(self): rospy.init_node("test_ros_loader") def test_bad_msgnames(self): bad = ["", "/", "//", "///", "////", "/////...
bsd-3-clause
9,088,392,612,900,043,000
51.586364
82
0.615006
false
Bysmyyr/chromium-crosswalk
tools/perf/page_sets/intl_es_fr_pt-BR.py
13
1640
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class IntlEsFrPtBrPage(page_module.P...
bsd-3-clause
161,500,964,574,826,340
33.893617
118
0.67622
false
weolar/miniblink49
third_party/skia/tools/builder_name_schema.py
26
6247
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for dealing with builder names. This module obtains its attributes dynamically from builder_name_schema.json. """ import json import os # ...
apache-2.0
7,641,152,122,278,875,000
31.201031
80
0.68817
false
derekjchow/models
research/street/python/nn_ops.py
20
9175
# 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
-3,689,272,701,093,490,700
35.264822
80
0.608065
false
egabancho/invenio
invenio/modules/archiver/api.py
2
3234
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your opt...
gpl-2.0
3,733,676,779,815,416,300
33.774194
78
0.680272
false
brschneidE3/LegalNetworks
python_code/download_data_batch.py
1
5208
__author__ = 'brendan' import helper_functions import os import tarfile proj_cwd = os.path.dirname(os.getcwd()) data_dir = proj_cwd + r'/data' def download_url(url, destination_path, curl_path=r'C:/Users/brendan/Downloads/curl-7.38.0-win64/bin/curl'): """ This is a quick and easy function that simulates cli...
mit
-3,995,542,414,378,783,000
41.688525
119
0.640169
false
chainer/chainer
chainermn/links/n_step_rnn.py
6
3181
import chainer import chainer.links.rnn as rnn import chainermn.functions class _MultiNodeNStepRNN(chainer.Chain): def __init__(self, link, communicator, rank_in, rank_out): super(_MultiNodeNStepRNN, self).__init__(actual_rnn=link) self.communicator = communicator self.rank_in = rank_in ...
mit
-2,164,457,909,456,215,800
36.423529
78
0.634392
false
Codlydodly/python-client
venv/lib/python2.7/site-packages/pyglet/text/formats/attributed.py
9
5145
# ---------------------------------------------------------------------------- # 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: # # * Redistributi...
mit
7,953,146,089,928,615,000
36.282609
78
0.552964
false
runjmc/maraschino
lib/werkzeug/testsuite/wsgi.py
11
8402
# -*- coding: utf-8 -*- """ werkzeug.testsuite.wsgi ~~~~~~~~~~~~~~~~~~~~~~~ Tests the WSGI utilities. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from os import path from cStringIO import StringIO ...
mit
5,599,006,033,254,312,000
36.370536
99
0.565643
false
messense/wechatpy
tests/test_create_reply.py
1
4694
# -*- coding: utf-8 -*- import unittest from wechatpy.replies import TextReply, create_reply class CreateReplyTestCase(unittest.TestCase): def test_create_reply_with_text_not_render(self): text = 'test' reply = create_reply(text, render=False) self.assertEqual('text', reply.type) ...
mit
-5,803,999,202,129,367,000
30.931973
65
0.43758
false
sachintyagi22/spark
python/pyspark/sql/session.py
7
25220
# # 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
-5,800,192,295,776,562,000
37.979907
100
0.591356
false
JamesGuthrie/libcloud
libcloud/dns/drivers/route53.py
14
20413
# 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 use ...
apache-2.0
-939,439,715,064,041,700
36.455046
79
0.569735
false
huguesv/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/urllib3/util/ssl_.py
4
13257
from __future__ import absolute_import import errno import warnings import hmac import socket from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning from ..packages import six SSLContext = None HAS_SNI = False IS_PY...
apache-2.0
804,440,595,712,682,500
33.523438
93
0.642302
false
broferek/ansible
lib/ansible/modules/network/fortios/fortios_ips_settings.py
14
9349
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
7,118,117,056,606,137,000
29.255663
129
0.613969
false
chen0031/nupic
nupic/regions/PictureSensorExplorers/rotate.py
17
3479
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
-195,297,292,799,522,200
36.815217
90
0.653061
false
axinging/chromium-crosswalk
tools/perf/metrics/speedindex_unittest.py
21
4002
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # These tests access private methods in the speedindex module. # pylint: disable=protected-access import unittest from telemetry.util import color_histogra...
bsd-3-clause
3,512,964,097,815,429,600
31.016
79
0.641929
false
partofthething/home-assistant
script/hassfest/coverage.py
9
3811
"""Validate coverage files.""" from pathlib import Path from typing import Dict from .model import Config, Integration DONT_IGNORE = ( "config_flow.py", "device_action.py", "device_condition.py", "device_trigger.py", "group.py", "intent.py", "logbook.py", "media_source.py", "scene....
mit
-7,010,698,535,935,970,000
26.817518
85
0.5164
false
NEricN/RobotCSimulator
Python/App/Lib/test/test_mimetypes.py
44
6242
# -*- coding: utf-8 -*- import mimetypes import StringIO import unittest import sys from test import test_support # Tell it we don't know about external files: mimetypes.knownfiles = [] mimetypes.inited = False mimetypes._default_mime_types() class MimeTypesTestCase(unittest.TestCase): def setUp(self): ...
apache-2.0
1,709,790,342,923,117,000
35.362573
86
0.585236
false
idea4bsd/idea4bsd
python/lib/Lib/distutils/filelist.py
85
12810
"""distutils.filelist Provides the FileList class, used for poking about the filesystem and building lists of files. """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id: filelist.py 37828 2004-11-10 22:23:15Z loewis $" import os, string, re import fnmatch from types import * from glob i...
apache-2.0
-6,080,485,227,272,971,000
35.084507
79
0.561749
false
mstriemer/zamboni
mkt/stats/views.py
9
13102
from django import http import commonware import requests from rest_framework.exceptions import ParseError from rest_framework.generics import ListAPIView from rest_framework.permissions import AllowAny, BasePermission from rest_framework.response import Response from rest_framework.views import APIView import mkt fr...
bsd-3-clause
2,864,376,717,138,780,000
31.673317
79
0.566249
false
joopert/home-assistant
tests/components/group/test_reproduce_state.py
3
1559
"""The tests for reproduction of state.""" from asyncio import Future from unittest.mock import patch from homeassistant.components.group.reproduce_state import async_reproduce_states from homeassistant.core import Context, State async def test_reproduce_group(hass): """Test reproduce_state with group.""" co...
apache-2.0
-5,295,043,101,421,875,000
30.18
81
0.579217
false
ralphiee22/kolibri
kolibri/auth/filters.py
7
10962
from django.db import models from django.db.models.query import F from six import string_types from .constants import collection_kinds from .errors import InvalidHierarchyRelationsArgument class HierarchyRelationsFilter(object): """ Helper class for efficiently making queries based on relations between model...
mit
7,984,069,654,964,302,000
52.473171
139
0.625342
false
kgblll/libresoft-gymkhana
apps/explohyperfiction/models.py
1
2903
from django.db import models from datetime import datetime from django.contrib.gis.db import models from social.core.models import * from social.core.models import Social_node # Create your models here. class Group(models.Model): manager=models.ManyToManyField("Player",null=True) name=models.TextField(null=Fal...
gpl-2.0
-8,858,816,338,199,912,000
36.217949
64
0.75887
false
amenonsen/ansible
lib/ansible/modules/network/f5/bigip_apm_policy_import.py
23
11958
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
6,482,326,725,342,476,000
28.453202
120
0.609801
false
gauravbose/digital-menu
digimenu2/tests/admin_utils/models.py
107
1712
from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Site(models.Model): domain = models.CharField(max_length=100) def __str__(self): return self.domain class Article(models.Model): """ A s...
bsd-3-clause
-8,037,351,886,805,518,000
22.777778
109
0.699182
false
EricMuller/mywebmarks-backend
requirements/twisted/Twisted-17.1.0/build/lib.linux-x86_64-3.5/twisted/names/common.py
55
7726
# -*- test-case-name: twisted.names.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Base functionality useful to various parts of Twisted Names. """ from __future__ import division, absolute_import import socket from zope.interface import implementer from twisted.names import d...
mit
4,741,390,029,247,265,000
29.904
78
0.63927
false
marmarek/livecd-tools
imgcreate/errors.py
7
2188
# # errors.py : exception definitions # # Copyright 2007, Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope th...
gpl-2.0
-1,955,898,998,349,832,700
36.724138
80
0.694698
false
itakouna/lymph
lymph/core/monitoring/pusher.py
4
1319
import logging import time import gevent import msgpack import zmq.green as zmq from lymph.core.components import Component logger = logging.getLogger(__name__) DEFAULT_MONITOR_ENDPOINT = 'tcp://127.0.0.1:44044' class MonitorPusher(Component): def __init__(self, container, aggregator, endpoint=None, interva...
apache-2.0
8,609,635,520,397,101,000
27.06383
73
0.614102
false
klemensavli/django-localflavor-si
django_localflavor_si/forms.py
101
4678
""" Slovenian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
bsd-3-clause
2,649,914,287,344,084,500
27.351515
86
0.587003
false
sand8080/pnp_test
sketch/config.py
1
1453
# Server Specific Configurations server = { 'port': '8080', 'host': '0.0.0.0' } # Pecan Application Configurations app = { 'root': 'sketch.controllers.root.RootController', 'modules': ['sketch'], 'static_root': '%(confdir)s/public', 'template_path': '%(confdir)s/sketch/templates', 'debug': ...
mit
-5,628,938,095,011,561,000
25.907407
76
0.492774
false
DNFcode/edx-platform
common/djangoapps/util/testing.py
25
1894
import sys from django.conf import settings from django.core.urlresolvers import clear_url_caches, resolve class UrlResetMixin(object): """Mixin to reset urls.py before and after a test Django memoizes the function that reads the urls module (whatever module urlconf names). The module itself is also sto...
agpl-3.0
5,724,269,736,872,347,000
32.22807
85
0.647835
false
StyXman/ayrton
ayrton/parser/astcompiler/misc.py
1
3583
def parse_future(tree, feature_flags): from ayrton.parser.astcompiler import ast future_lineno = 0 future_column = 0 flags = 0 have_docstring = False body = None if isinstance(tree, ast.Module): body = tree.body elif isinstance(tree, ast.Interactive): body = tree.body ...
gpl-3.0
-7,253,010,554,983,132,000
27.436508
79
0.585543
false
rocky4570/moto
moto/logs/models.py
2
11939
from moto.core import BaseBackend import boto.logs from moto.core.utils import unix_time_millis from .exceptions import ( ResourceNotFoundException, ResourceAlreadyExistsException ) class LogEvent: _event_id = 0 def __init__(self, ingestion_time, log_event): self.ingestionTime = ingestion_tim...
apache-2.0
-9,028,157,239,176,596,000
39.886986
150
0.634475
false
athena-voice/athena-voice-client
athena/modules/active/voice_browse.py
1
2096
""" Wraps the Spotify Web Player to play music Usage Examples: - "Open facebook.com" - "Search Neil Degrasse Tyson" - "Maximize the browser" """ from athena.classes.module import Module from athena.classes.task import ActiveTask from athena.apis import api_lib VB_PATTERNS...
gpl-3.0
-6,277,618,522,004,320,000
32.360656
74
0.491889
false
alheinecke/tensorflow-xsmm
tensorflow/contrib/learn/python/learn/preprocessing/__init__.py
138
1071
# 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
-7,430,505,261,230,684,000
41.84
80
0.718954
false
kingvuplus/boom2
lib/python/Components/ScrollLabel.py
2
7349
# Embedded file name: /usr/lib/enigma2/python/Components/ScrollLabel.py import skin from HTMLComponent import HTMLComponent from GUIComponent import GUIComponent from enigma import eLabel, eWidget, eSlider, fontRenderClass, ePoint, eSize class ScrollLabel(HTMLComponent, GUIComponent): def __init__(self, t...
gpl-2.0
4,185,923,584,004,829,000
36.89418
172
0.534358
false
lexus42/w17
static/Brython3.1.1-20150328-091302/Lib/_abcoll.py
688
5155
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. DON'T USE THIS MODULE DIRECTLY! The classes here should be imported via collections; they are defined here only to alleviate certain bootstrappin...
gpl-3.0
2,499,723,934,301,062,000
23.665072
75
0.563725
false
bheesham/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/stream.py
673
2748
# Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mpl-2.0
-871,016,413,975,281,400
47.210526
78
0.804585
false
resmo/ansible
lib/ansible/modules/network/aci/aci_aaa_user_certificate.py
27
7876
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_ver...
gpl-3.0
4,861,483,063,693,013,000
26.252595
141
0.606145
false
ChrisCuts/fnode
src/FunctionSelectionNode.py
1
6818
# -*- coding: utf-8 -*- ''' Created on 17.09.2015 @author: derChris ''' from pydispatch import dispatcher import PlugIns.NodeTemplates import PlugIns.MATLAB.MATLAB import Pipe class FunctionSelectionNode(PlugIns.NodeTemplates.NodeTemplate): _UPDATE_FUNCTION_SELECTION_WIDGET = 'UPDATE_FUNCTION_SELECTION_WID...
gpl-2.0
1,593,223,260,072,087,000
35.66129
126
0.499707
false
mongodb/mongo-python-driver
pymongo/collection.py
2
132067
# Copyright 2009-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
apache-2.0
9,188,986,281,974,027,000
42.759775
116
0.571415
false
ehenneken/loris
loris/parameters.py
3
15597
# parameters.py # -*- coding: utf-8 -*- ''' IIIF Image API parameters as objects. The attributes of this class should make it possible to work with most imaging libraries without any further need to process the IIIF syntax. ''' import re from decimal import Decimal from math import floor from logging import getLog...
bsd-2-clause
7,685,043,639,331,124,000
37.134474
97
0.553312
false
sonaht/ansible
lib/ansible/modules/network/nxos/nxos_aaa_server_host.py
59
11475
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
-4,792,929,404,926,453,000
30.26703
79
0.583529
false
diamondman/proteusisc
proteusisc/frame.py
1
7853
import collections from .primitive import DeviceTarget, Primitive class Frame(collections.MutableSequence): def __init__(self, chain, *prims, fill=False): self._chain = chain self._prims = [None for i in range(len(chain._devices))] self._valid_prim = None #self._prim_type = None ...
lgpl-2.1
-3,667,365,504,278,677,500
32.695279
73
0.480066
false
mitsuhiko/pip
docs/conf.py
1
6800
# -*- coding: utf-8 -*- # # pip documentation build configuration file, created by # sphinx-quickstart on Tue Apr 22 22:08:49 2008 # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All conf...
mit
2,897,341,174,492,702,000
31.535885
80
0.705294
false
inodb/cbioportal
core/src/main/scripts/importer/validateData.py
2
172331
#!/usr/bin/env python2.7 # # Copyright (c) 2016 The Hyve B.V. # This code is licensed under the GNU Affero General Public License (AGPL), # version 3, or (at your option) any later version. # # # This file is part of cBioPortal. # # cBioPortal is free software: you can redistribute it and/or modify # it under the ter...
agpl-3.0
5,582,291,890,178,179,000
44.857105
156
0.544046
false
timpalpant/calibre
src/calibre/ebooks/metadata/rb.py
24
1669
__license__ = 'GPL v3' __copyright__ = '2008, Ashish Kulkarni <kulkarni.ashish@gmail.com>' '''Read meta information from RB files''' import sys, struct from calibre.ebooks.metadata import MetaInformation, string_to_authors MAGIC = '\xb0\x0c\xb0\x0c\x02\x00NUVO\x00\x00\x00\x00' def get_metadata(stream): """ Re...
gpl-3.0
-4,144,429,115,363,393,000
31.096154
91
0.541043
false
timj/scons
test/option--W.py
5
1590
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, publish, ...
mit
-409,319,568,051,208,200
32.829787
73
0.736478
false
jordanemedlock/psychtruths
temboo/Library/Google/Drive/Permissions/List.py
5
4627
# -*- coding: utf-8 -*- ############################################################################### # # List # Lists a file's permissions. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in comp...
apache-2.0
8,732,584,930,568,727,000
40.3125
255
0.667387
false
kaichogami/sympy
sympy/polys/tests/test_ring_series.py
29
23563
from sympy.polys.domains import QQ, EX, RR from sympy.polys.rings import ring from sympy.polys.ring_series import (_invert_monoms, rs_integrate, rs_trunc, rs_mul, rs_square, rs_pow, _has_constant_term, rs_hadamard_exp, rs_series_from_list, rs_exp, rs_log, rs_newton, rs_series_inversion, rs_compose_add, rs_a...
bsd-3-clause
8,651,874,916,737,550,000
37.004839
92
0.430251
false
DreamSourceLab/DSView
libsigrokdecode4DSL/decoders/ds243x/pd.py
3
11365
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2017 Kevin Redon <kingkevin@cuvoodoo.info> ## Copyright (C) 2017 Soeren Apel <soeren@apelpie.net> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by...
gpl-3.0
5,443,975,682,662,442,000
41.092593
81
0.438363
false
andmos/ansible
lib/ansible/modules/packaging/os/installp.py
42
9242
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Kairo Araujo <kairo@kairo.eti.br> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version':...
gpl-3.0
-4,581,829,095,603,359,000
30.222973
158
0.604306
false
tectronics/arsenalsuite
cpp/lib/PyQt4/examples/draganddrop/draggableicons/draggableicons.py
15
5726
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
7,787,967,769,547,310,000
34.7875
113
0.643032
false
britcey/ansible
lib/ansible/modules/identity/ipa/ipa_sudorule.py
49
16253
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
gpl-3.0
-2,528,288,068,448,752,000
39.130864
129
0.626038
false
aveshagarwal/openshift-ansible
roles/openshift_health_checker/test/zz_failure_summary_test.py
53
2115
from zz_failure_summary import deduplicate_failures import pytest @pytest.mark.parametrize('failures,deduplicated', [ ( [ { 'host': 'master1', 'msg': 'One or more checks failed', }, ], [ { 'host': ('master...
apache-2.0
-7,992,552,304,606,194,000
23.882353
75
0.346572
false
minglong-cse2016/stupidlang
stupidlang/skeleton.py
1
3647
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following line in the entry_points section in setup.cfg: console_scripts = fibonacci = stupidlang.skeleton:run Then run `python setup.py i...
mit
6,845,850,376,260,438,000
26.628788
77
0.618316
false
happy56/kivy
examples/demo/kivycatalog/main.py
3
5747
import kivy kivy.require('1.4.2') import os import sys from kivy.app import App from kivy.factory import Factory from kivy.lang import Builder, Parser, ParserException from kivy.properties import ObjectProperty from kivy.config import Config from kivy.uix.boxlayout import BoxLayout from kivy.uix.popup import Popup fro...
lgpl-3.0
2,386,594,815,287,404,500
34.475309
78
0.643292
false
fabiobatalha/doaj_client
doaj/applications.py
1
1316
# coding: utf-8 from doaj.client import Client, PAGESIZE, must_have_token class Applications(Client): endpoint = "application/" search_endpoint = "search/applications/" @must_have_token def search(self, query, sort=None, pagesize=PAGESIZE): """ query must be a valid lucene query ...
bsd-2-clause
-3,800,295,405,720,333,300
26.4375
77
0.572948
false
dvliman/jaikuengine
.google_appengine/google/appengine/tools/devappserver2/python/request_state_test.py
18
3331
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-409,503,600,863,074,560
31.656863
76
0.710898
false
decaf-emu/huehuetenango
static/node_modules/node-forge/tests/policyserver.py
171
3551
#!/usr/bin/env python """ Flash Socket Policy Server. - Starts Flash socket policy file server. - Defaults to port 843. - NOTE: Most operating systems require administrative privileges to use ports under 1024. $ ./policyserver.py [options] """ """ Also consider Adobe's solutions: http://www.adobe.com/devnet/fla...
apache-2.0
2,276,423,641,320,792,300
30.705357
85
0.64686
false
google/eclipse2017
profile/app/app/backend/app_module.py
1
2118
# # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
-1,058,337,688,704,101,800
31.584615
80
0.655807
false
gmoberg/rqt_launch_editor
lib/rqt_launchtree-master/src/rqt_launchtree/launchtree_plugin.py
2
2796
#!/usr/bin/env python import rospy from rqt_gui_py.plugin import Plugin from python_qt_binding.QtCore import Qt from python_qt_binding.QtGui import QInputDialog from rqt_launchtree.launchtree_widget import LaunchtreeWidget class LaunchtreePlugin(Plugin): _SETTING_LASTPKG = 'last_pkg' _SETTING_LASTLAUNCHFIL...
bsd-3-clause
-6,556,412,464,548,056,000
44.112903
119
0.658083
false
msabramo/PyHamcrest
tests/hamcrest_unit_test/string_description_test.py
2
2266
import six from hamcrest.core.string_description import * from hamcrest.core.selfdescribing import SelfDescribing import re import pytest try: import unittest2 as unittest except ImportError: import unittest __author__ = "Jon Reid" __copyright__ = "Copyright 2011 hamcrest.org" __license__ = "BSD, see License....
bsd-3-clause
1,965,617,262,400,924,000
33.861538
108
0.721094
false
tscohen/chainer
tests/chainer_tests/functions_tests/loss_tests/test_softmax_cross_entropy.py
13
4589
import math import unittest import numpy import six import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition class TestSoftmaxCrossEntropy(unittest.TestCase): def s...
mit
1,043,332,168,896,206,800
32.742647
77
0.609719
false
nextgenusfs/amptk
amptk/remove_samples.py
2
4077
#!/usr/bin/env python from __future__ import print_function import sys import argparse import os import pyfastx from amptk import amptklib class MyFormatter(argparse.ArgumentDefaultsHelpFormatter): def __init__(self,prog): super(MyFormatter,self).__init__(prog,max_help_position=50) def countBarcodes(fi...
bsd-2-clause
1,514,956,249,837,809,700
35.72973
126
0.577876
false
zyq001/ryu
ryu/log.py
36
3413
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://...
apache-2.0
-6,016,076,500,592,351,000
29.747748
78
0.656021
false
Apstra/aeon-venos
tests/test_opx.py
1
2524
import mock import pytest from pylib.aeon.opx import device from pylib.aeon.cumulus import connector g_facts = { 'hw_version': None, 'hw_part_number': None, 'hostname': 'opx221_vm', 'serial_number': '525400A5EC36', 'fqdn': 'opx221_vm', 'os_version': '2.2.1', 'virtual': True, 'hw_model'...
apache-2.0
7,499,508,265,810,249,000
29.409639
114
0.614105
false
bbbenja/SickRage
lib/unrar2/unix.py
13
11433
# Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov # # 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...
gpl-3.0
6,620,298,041,687,600,000
36.983389
127
0.535992
false
JizhouZhang/SDR
gr-analog/python/analog/qa_rail_ff.py
47
2030
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your optio...
gpl-3.0
-1,978,262,179,160,308,000
25.025641
74
0.609852
false
xq262144/hue
desktop/core/ext-py/rsa-3.4.2/rsa/varblock.py
82
5406
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
apache-2.0
-611,034,849,705,584,000
29.195531
91
0.646438
false
simbha/mAngE-Gin
lib/Django 1.7/django/conf/locale/eo/formats.py
115
2335
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j\-\a \d\e F Y' # '26-a ...
mit
2,201,304,377,232,046,300
43.903846
80
0.421842
false
thodoris/djangoPharma
djangoPharma/env/Lib/site-packages/django/contrib/gis/gdal/geomtype.py
100
3310
from django.contrib.gis.gdal.error import GDALException from django.utils import six class OGRGeomType(object): "Encapsulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0: 'Unknown', 1: 'Point', ...
apache-2.0
5,628,996,102,712,967,000
32.77551
80
0.544109
false
zstackorg/zstack-woodpecker
integrationtest/vm/multizones/suite_setup.py
2
2233
''' @author: Frank ''' import os.path import zstacklib.utils.linux as linux import zstacklib.utils.http as http import zstacktestagent.plugins.host as host_plugin import zstacktestagent.testagent as testagent import zstackwoodpecker.operations.deploy_operations as deploy_operations import zstackwoodpecker...
apache-2.0
-1,136,194,164,313,000,400
45.510638
221
0.722794
false
theguardian/vanilla2tender
cherrypy/lib/static.py
40
14510
try: from io import UnsupportedOperation except ImportError: UnsupportedOperation = object() import logging import mimetypes mimetypes.init() mimetypes.types_map['.dwg']='image/x-dwg' mimetypes.types_map['.ico']='image/x-icon' mimetypes.types_map['.bz2']='application/x-bzip2' mimetypes.types_map['.gz']='applica...
gpl-2.0
1,768,209,474,428,761,600
38.972452
90
0.603653
false
eteq/bokeh
sphinx/source/docs/tutorials/exercises/les_mis.py
23
2382
import numpy as np from bokeh.plotting import figure, output_file, show from bokeh.models import HoverTool, ColumnDataSource from bokeh.sampledata.les_mis import data # EXERCISE: try out different sort orders for the names nodes = data['nodes'] names = [node['name'] for node in sorted(data['nodes'], key=lambda x: x['...
bsd-3-clause
6,592,919,460,758,528,000
34.044118
84
0.670025
false
OshynSong/scikit-learn
sklearn/utils/sparsetools/tests/test_traversal.py
315
2001
from __future__ import division, print_function, absolute_import from nose import SkipTest import numpy as np from numpy.testing import assert_array_almost_equal try: from scipy.sparse.csgraph import breadth_first_tree, depth_first_tree,\ csgraph_to_dense, csgraph_from_dense except ImportError: # Oldi...
bsd-3-clause
-1,207,416,334,845,699,000
34.732143
75
0.472264
false
dstroppa/openstack-smartos-nova-grizzly
nova/api/openstack/compute/contrib/hosts.py
2
14323
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
6,662,887,744,074,733,000
39.690341
79
0.566711
false
pschmitt/home-assistant
homeassistant/components/homematicip_cloud/cover.py
5
5751
"""Support for HomematicIP Cloud cover devices.""" import logging from typing import Optional from homematicip.aio.device import ( AsyncFullFlushBlind, AsyncFullFlushShutter, AsyncGarageDoorModuleTormatic, AsyncHoermannDrivesModule, ) from homematicip.aio.group import AsyncExtendedLinkedShutterGroup fr...
apache-2.0
-8,359,374,809,933,447,000
34.5
88
0.666493
false