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
dejlek/pulsar
tests/stores/redis.py
1
2100
import asyncio from pulsar import HAS_C_EXTENSIONS from pulsar.apps.test import check_server from pulsar.apps.data import RedisScript from .pulsards import unittest, RedisCommands, create_store from .lock import RedisLockTests OK = check_server('redis') @unittest.skipUnless(OK, 'Requires a running Redis server') ...
bsd-3-clause
-2,365,873,232,518,695,400
32.333333
75
0.640952
false
jblupus/PyLoyaltyProject
old/interactions/format_interactions.py
1
5936
from os import mkdir from os.path import exists import numpy as np import pandas as pd from old.project import CassandraUtils from old.project import get_time RTD_STS_KEY = 'retweetedStatus' MT_STS_KEY = 'userMentionEntities' PATH = '/home/joao/Dev/Data/Twitter/' FRIENDS_PATH = '/home/joao/Dev/Data/Twitter/friendshi...
bsd-2-clause
5,772,484,004,934,030,000
35.417178
116
0.566038
false
pwhelan/djshouts
django/contrib/sites/models.py
387
2867
from django.db import models from django.utils.translation import ugettext_lazy as _ SITE_CACHE = {} class SiteManager(models.Manager): def get_current(self): """ Returns the current ``Site`` based on the SITE_ID in the project's settings. The ``Site`` object is cached the first ...
bsd-3-clause
-1,679,323,123,397,846,800
29.178947
203
0.62016
false
jianghuaw/nova
nova/tests/unit/conductor/tasks/test_base.py
54
1604
# 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
8,221,673,198,678,516,000
29.264151
78
0.653367
false
Yukarumya/Yukarum-Redfoxes
testing/marionette/harness/marionette_harness/tests/unit/test_rendered_element.py
1
1336
#Copyright 2007-2009 WebDriver committers #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 obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required b...
mpl-2.0
7,430,800,408,507,566,000
38.294118
76
0.749251
false
sandeepdsouza93/TensorFlow-15712
tensorflow/tools/dist_test/python/census_widendeep.py
3
11352
# 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,363,691,429,774,034,000
39.688172
93
0.652572
false
yangxiaoze/Unblock-Youku
test/run-all-tests.py
43
3290
#!/usr/bin/env python """ Allow you smoothly surf on many websites blocking non-mainland visitors. Copyright (C) 2012, 2013 Bo Zhu http://zhuzhu.org This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the ...
agpl-3.0
8,629,015,176,296,238,000
27.859649
76
0.605167
false
AlexBoogaard/Sick-Beard-Torrent-Edition
lib/unidecode/x068.py
252
4674
data = ( 'Zhi ', # 0x00 'Liu ', # 0x01 'Mei ', # 0x02 'Hoy ', # 0x03 'Rong ', # 0x04 'Zha ', # 0x05 '[?] ', # 0x06 'Biao ', # 0x07 'Zhan ', # 0x08 'Jie ', # 0x09 'Long ', # 0x0a 'Dong ', # 0x0b 'Lu ', # 0x0c 'Sayng ', # 0x0d 'Li ', # 0x0e 'Lan ', # 0x0f 'Yong ', # 0x10...
gpl-3.0
1,463,020,589,174,493,700
17.116279
21
0.394737
false
MSA-Argentina/ojota
ojota/base.py
2
20415
""" This file is part of Ojota. Ojota is free software: you can redistribute it and/or modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Ojota is distributed in th...
lgpl-3.0
-6,583,260,627,071,240,000
32.632619
79
0.556454
false
CloudWareChile/OpenChile
openerp/addons/web_uservoice/__init__.py
9
1038
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
agpl-3.0
-2,488,135,235,469,382,000
46.181818
79
0.61079
false
abhishekkrthakur/scikit-learn
benchmarks/bench_20newsgroups.py
377
3555
from __future__ import print_function, division from time import time import argparse import numpy as np from sklearn.dummy import DummyClassifier from sklearn.datasets import fetch_20newsgroups_vectorized from sklearn.metrics import accuracy_score from sklearn.utils.validation import check_array from sklearn.ensemb...
bsd-3-clause
4,156,086,192,375,215,000
35.649485
79
0.562025
false
Tesora/tesora-tempest
tempest/lib/api_schema/response/compute/v2_1/security_groups.py
39
3473
# Copyright 2014 NEC Corporation. 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
5,233,262,825,089,575,000
29.734513
78
0.530089
false
EvanK/ansible
lib/ansible/modules/files/assemble.py
12
8528
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Stephen Fromm <sfromm@gmail.com> # Copyright: (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ab...
gpl-3.0
-4,841,225,055,742,347,000
31.8
112
0.640596
false
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/Amazon/SQS/AddPermission.py
4
5495
# -*- coding: utf-8 -*- ############################################################################### # # AddPermission # Adds a permission to a queue for a specific principal user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); #...
apache-2.0
-732,031,863,467,823,600
44.040984
230
0.679345
false
nerzhul/ansible
lib/ansible/utils/module_docs_fragments/junos.py
40
3023
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
1,338,705,183,339,291,000
38.25974
83
0.709229
false
gerrive/horizon
openstack_dashboard/dashboards/project/stacks/tests.py
6
40882
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
apache-2.0
-2,433,564,267,593,068,000
40.801636
80
0.491292
false
andreif/blues
blues/python.py
3
1054
""" Python Blueprint ================ Does not install python itself, only develop and setup tools. Contains pip helper for other blueprints to use. **Fabric environment:** .. code-block:: yaml blueprints: - blues.python """ from fabric.decorators import task from refabric.api import run, info from refa...
mit
1,132,598,305,589,506,800
20.08
99
0.624288
false
Jimdo/ansible-modules-core
cloud/amazon/rds_param_group.py
10
10698
#!/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
1,912,550,408,965,219,300
34.190789
305
0.609647
false
KrzysztofStachanczyk/Sensors-WWW-website
www/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py
2930
11275
######################## 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...
gpl-3.0
4,566,932,265,352,882,700
55.375
73
0.540931
false
opatut/mini
mini/filters.py
1
4898
from mini import app from mini.util import AnonymousUser from mini.models import User, Email from datetime import datetime as dt, date as d, timedelta as td from flask import Markup import time, os, pygments, pygments.lexers, pygments.formatters, git, re from os.path import * from json import dumps # UTILITY to wrap a...
gpl-3.0
-3,074,237,716,313,656,000
26.363128
96
0.621886
false
jangorecki/h2o-3
py2/testdir_single_jvm/test_GBMGrid_basic_many.py
20
3838
import unittest, sys, time sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_cmd, h2o_import as h2i from h2o_test import dump_json, verboseprint, OutputObj import h2o_jobs DO_CLASSIFICATION = True DO_FAIL_CASE = False DO_FROM_TO_STEP = False class Basic(unittest.TestCase): def tearDown(self):...
apache-2.0
616,914,211,153,584,900
32.666667
109
0.544294
false
epfl-cosmo/lammps
tools/moltemplate/moltemplate/nbody_by_type_lib.py
8
22855
#!/usr/bin/env python # Author: Andrew Jewett (jewett.aij at g mail) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. import sys from collections import defaultdict #from collections...
gpl-2.0
596,104,645,854,326,400
47.83547
117
0.572916
false
sigma-random/avmplus
build/buildbot/master/custom/buildbot_ext/steps/shellAddons.py
8
16201
# -*- test-case-name: buildbot.test.test_steps,buildbot.test.test_properties -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from buildbot.steps.shell import Shell...
mpl-2.0
-1,644,274,203,162,559,000
34.922395
97
0.575397
false
SUSE-Cloud/nova
nova/tests/api/openstack/compute/plugins/v3/test_server_diagnostics.py
8
3322
# Copyright 2011 Eldar Nugaev # 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
-7,391,060,641,811,129,000
33.968421
78
0.668573
false
grengojbo/st2
st2client/st2client/utils/terminal.py
10
2030
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
apache-2.0
314,517,585,102,528,500
30.230769
79
0.607389
false
merll/docker-fabric
dockerfabric/socat.py
1
2300
# -*- coding: utf-8 -*- from __future__ import unicode_literals from fabric.state import env from fabric.utils import puts from .base import ConnectionDict, get_local_port from .tunnel import LocalTunnel class SocketTunnels(ConnectionDict): """ Cache for **socat** tunnels to the remote machine. Instant...
mit
-4,617,141,349,413,265,000
34.384615
117
0.642609
false
BartVB/ansible-modules-core
cloud/openstack/_quantum_subnet.py
129
10130
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
gpl-3.0
-4,502,352,674,164,940,000
32.766667
122
0.611945
false
tomchristie/django
tests/shortcuts/tests.py
109
1737
from django.test import SimpleTestCase, override_settings from django.test.utils import require_jinja2 @override_settings(ROOT_URLCONF='shortcuts.urls') class RenderTests(SimpleTestCase): def test_render(self): response = self.client.get('/render/') self.assertEqual(response.status_code, 200) ...
bsd-3-clause
3,974,838,308,224,309,000
44.710526
85
0.688543
false
aurofable/medhack-server
venv/lib/python2.7/site-packages/sqlalchemy/orm/interfaces.py
17
26335
# orm/interfaces.py # Copyright (C) 2005-2012 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 """ Contains various base classes used throughout the ORM. Defines the now depreca...
mit
-1,921,495,769,978,973,700
32.633461
86
0.587963
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/SQLAlchemy-0.9.7-py2.7-linux-x86_64.egg/sqlalchemy/orm/mapper.py
10
108109
# 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:`~sqlalche...
apache-2.0
-347,847,619,742,065,860
38.556897
78
0.582828
false
anbangleo/NlsdeWeb
Python-3.6.0/Lib/email/headerregistry.py
12
20164
"""Representing and manipulating email headers via custom objects. This module provides an implementation of the HeaderRegistry API. The implementation is designed to flexibly follow RFC5322 rules. Eventually HeaderRegistry will be a public API, but it isn't yet, and will probably change some before that happens. ""...
mit
-1,601,294,855,012,280,600
33.409556
80
0.602063
false
pamfilos/data.cern.ch
cap/modules/deposit/search.py
5
3516
# -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2016, 2017 CERN. # # CERN Analysis Preservation Framework 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; ...
gpl-2.0
-233,742,865,712,228,480
33.135922
79
0.654721
false
Frankkkkk/arctic
arctic/date/_daterange.py
1
8033
import datetime from six import string_types from ._generalslice import OPEN_OPEN, CLOSED_CLOSED, OPEN_CLOSED, CLOSED_OPEN, GeneralSlice from ._parse import parse INTERVAL_LOOKUP = {(True, True): OPEN_OPEN, (False, False): CLOSED_CLOSED, (True, False): OPEN_CLOSED, ...
lgpl-2.1
1,438,300,447,782,078,700
37.806763
113
0.529068
false
y12uc231/edx-platform
lms/djangoapps/courseware/tests/test_access.py
14
16756
import datetime import pytz from django.test import TestCase from django.core.urlresolvers import reverse from mock import Mock, patch from opaque_keys.edx.locations import SlashSeparatedCourseKey import courseware.access as access from courseware.masquerade import CourseMasquerade from courseware.tests.factories imp...
agpl-3.0
-5,003,193,154,016,205,000
42.979003
128
0.657257
false
bryx-inc/boto
tests/unit/ec2/test_blockdevicemapping.py
111
6739
from tests.compat import unittest from boto.ec2.connection import EC2Connection from boto.ec2.blockdevicemapping import BlockDeviceType, BlockDeviceMapping from tests.compat import OrderedDict from tests.unit import AWSMockServiceTestCase class BlockDeviceTypeTests(unittest.TestCase): def setUp(self): s...
mit
-2,947,765,186,996,055,000
45.157534
103
0.644606
false
rahul67/hue
apps/zookeeper/src/zookeeper/forms.py
38
1216
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
-3,322,291,735,640,719,000
38.225806
74
0.775493
false
alex/changes
migrations/versions/1c5907e309f1_add_failurereason.py
4
1593
"""Add FailureReason Revision ID: 1c5907e309f1 Revises: 4a12e7f0159d Create Date: 2014-06-02 15:31:02.991394 """ # revision identifiers, used by Alembic. revision = '1c5907e309f1' down_revision = '4a12e7f0159d' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembi...
apache-2.0
7,627,041,655,368,663,000
37.853659
98
0.657878
false
azunite/chrome_build
depot-tools-auth.py
27
3275
#!/usr/bin/env python # Copyright 2015 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. """Manages cached OAuth2 tokens used by other depot_tools scripts. Usage: depot-tools-auth login codereview.chromium.org depot-too...
bsd-3-clause
-262,266,611,635,079,140
31.107843
76
0.712672
false
Gchorba/Ask
lib/python2.7/site-packages/werkzeug/wsgi.py
147
37837
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
mit
1,368,267,649,332,455,200
35.06959
81
0.606206
false
NL66278/odoo
addons/hr_holidays/tests/__init__.py
121
1159
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-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
6,080,726,473,760,443,000
40.392857
78
0.626402
false
tchellomello/home-assistant
homeassistant/components/xiaomi_tv/media_player.py
21
3130
"""Add support for the Xiaomi TVs.""" import logging import pymitv import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity from homeassistant.components.media_player.const import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, ) from homeassi...
apache-2.0
1,234,339,652,272,674,000
27.981481
84
0.627476
false
privateip/ansible
lib/ansible/playbook/role/__init__.py
14
18852
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-1,690,207,452,564,387,300
37.710472
181
0.596435
false
sppps/coffee-cup-accounting
consume/__init__.py
1
2884
import forms from flask import current_app as app from generic.editor import GenericEditor from bson import ObjectId class ConsumeEditor(GenericEditor): def __init__(self, *args, **kwargs): super(ConsumeEditor, self).__init__(*args, **kwargs) def _create_form(self, *args, **kwargs): return f...
gpl-3.0
233,291,850,835,643,900
37.972973
89
0.48301
false
broferek/ansible
lib/ansible/modules/network/fortios/fortios_system_auto_install.py
13
9641
#!/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
6,889,538,730,088,696,000
29.509494
99
0.605124
false
Frederick888/cargo
src/etc/install-deps.py
17
2275
#!/usr/bin/env python import contextlib import download import os import shutil import sys import tarfile if os.environ.get('BITS') == '32': host_bits = 'i686' extra_bits = 'x86_64' else: host_bits = 'x86_64' extra_bits = 'i686' extra = None libdir = 'lib' # Figure out our target triple if sys.platf...
apache-2.0
-1,974,201,443,799,018,500
29.743243
68
0.582857
false
mfherbst/spack
var/spack/repos/builtin/packages/deconseq-standalone/package.py
5
2521
############################################################################## # 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
-3,389,374,328,395,453,400
41.016667
108
0.645379
false
squidsoup/snapcraft
snapcraft/file_utils.py
3
7787
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
gpl-3.0
5,294,693,437,406,654,000
37.171569
79
0.653525
false
dpgaspar/Flask-AppBuilder
examples/related_fields/testdata.py
1
2739
import logging from app import db from app.models import ContactGroup, ContactSubGroup, Gender, Contact import random from datetime import datetime log = logging.getLogger(__name__) def get_random_name(names_list, size=1): name_lst = [ names_list[random.randrange(0, len(names_list))].decode("utf-8").capi...
bsd-3-clause
-7,856,697,193,785,780,000
29.098901
88
0.655714
false
blckshrk/Weboob
modules/allocine/backend.py
1
4176
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
-4,641,905,836,682,227,000
34.991379
77
0.649581
false
boedy1996/SPARC
geonode/contrib/dynamic/models.py
23
13932
from __future__ import unicode_literals import keyword import re from django.utils.datastructures import SortedDict from django.conf import settings from django.contrib.gis.utils import LayerMapping from django.contrib.gis.db import models from django.contrib.gis import admin from django.core.exceptions import Valida...
gpl-3.0
6,557,411,052,492,091,000
32.652174
96
0.599699
false
cuckoosandbox/monitor
src/capstone/bindings/python/test_xcore.py
3
2325
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * from capstone.xcore import * from xprint import to_x, to_hex, to_x_32 XCORE_CODE = b"\xfe\x0f\xfe\x17\x13\x17\xc6\xfe\xec\x17\x97\xf8\xec\x4f\x1f\xfd\xec\x37\x07\xf2...
gpl-3.0
8,256,170,380,025,095,000
31.746479
144
0.501075
false
jjmleiro/hue
apps/hbase/src/hbase/urls.py
32
1029
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
8,220,170,429,493,725,000
40.16
74
0.739553
false
hickford/cython
Cython/Compiler/FlowControl.py
14
45482
from __future__ import absolute_import import cython cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, Builtin=object, InternalError=object, error=object, warning=object, py_object_type=object, unspecified_type=object, object_expr=object, fake_rhs_expr=objec...
apache-2.0
128,987,482,302,917,060
33.639756
107
0.559122
false
yytang2012/novels-crawler
novelsCrawler/spiders/m-yushuwu.py
1
2338
# -*- coding: utf-8 -*- from scrapy import Selector from libs.misc import get_spider_name_from_domain from libs.polish import * from novelsCrawler.spiders.simpleSpider import SimpleSpider class MyushuwuSpider(SimpleSpider): """ classdocs example: https://m.yushuwu.com/novel/31960.html """ dom ...
mit
542,870,649,504,191,600
34.424242
90
0.587254
false
vuolter/pyload
src/pyload/plugins/downloaders/XdadevelopersCom.py
1
1413
# -*- coding: utf-8 -* # # Test links: # http://forum.xda-developers.com/devdb/project/dl/?id=10885 from ..base.simple_downloader import SimpleDownloader class XdadevelopersCom(SimpleDownloader): __name__ = "XdadevelopersCom" __type__ = "downloader" __version__ = "0.08" __status__ = "testing" ...
agpl-3.0
-224,362,435,025,899,740
31.860465
85
0.571833
false
posita/dropbox-sdk-python
dropbox/stone_validators.py
2
24413
""" Defines classes to represent each Stone type in Python. These classes should be used to validate Python objects and normalize them for a given type. The data types defined here should not be specific to an RPC or serialization format. This module should be dropped into a project that requires the use of Stone. In...
mit
-2,067,160,673,419,353,900
35.437313
115
0.588334
false
theicfire/djangofun
djangotoolbox/tests.py
6
14370
from .fields import ListField, SetField, DictField, EmbeddedModelField from django.db import models, connections from django.db.models import Q from django.db.models.signals import post_save from django.db.utils import DatabaseError from django.dispatch.dispatcher import receiver from django.test import TestCase from d...
bsd-3-clause
-1,283,027,664,947,976,000
42.153153
93
0.603897
false
wwright2/dcim3-angstrom1
sources/bitbake/lib/bb/fetch2/perforce.py
3
5987
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake 'Fetch' implementations Classes for obtaining upstream sources for the BitBake build tools. """ # Copyright (C) 2003, 2004 Chris Larson # # This program is free software; you can redistribute it and/or modify # it u...
mit
8,683,616,657,613,537,000
31.016043
120
0.540838
false
gkudos/qgis-cartodb
cartodb/simplejson/tests/test_float.py
141
1430
import math from unittest import TestCase from simplejson.compat import long_type, text_type import simplejson as json from simplejson.decoder import NaN, PosInf, NegInf class TestFloat(TestCase): def test_degenerates_allow(self): for inf in (PosInf, NegInf): self.assertEqual(json.loads(json.du...
gpl-2.0
-5,228,616,375,632,317,000
39.857143
78
0.627972
false
StackStorm/st2
st2common/tests/unit/test_unit_testing_mocks.py
3
4989
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
apache-2.0
7,089,959,499,132,218,000
37.976563
86
0.67268
false
CoherentLabs/depot_tools
third_party/pylint/checkers/stdlib.py
1
2665
# Copyright 2012 Google Inc. # # 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 version 2 of the License, or (at your option) any late...
bsd-3-clause
-1,799,978,615,859,561,500
37.071429
85
0.635272
false
lseyesl/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/urls_unittest.py
124
4004
# Copyright (C) 2012 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...
bsd-3-clause
9,005,511,434,208,433,000
64.639344
133
0.745255
false
flh/odoo
openerp/report/misc.py
458
1425
# -*- 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
-2,599,303,623,539,803,600
36.5
79
0.574035
false
tensorflow/datasets
tensorflow_datasets/image/coil100.py
1
3345
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets 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://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
apache-2.0
-2,295,583,092,356,631,000
34.967742
109
0.667265
false
cristiana214/cristianachavez214-cristianachavez
python/src/Lib/ctypes/macholib/dyld.py
253
5341
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### """ dyld emulation """ import os from framework import framework_info from dylib import dylib_info from it...
apache-2.0
-1,562,955,628,579,466,800
30.60355
103
0.628347
false
WillieMaddox/numpy
numpy/lib/tests/test_index_tricks.py
91
11462
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises ) from numpy.lib.index_tricks import ( mgrid, ndenumerate,...
bsd-3-clause
418,206,911,341,197,100
34.159509
81
0.48037
false
mcalhoun/ansible
test/units/plugins/test_plugins.py
99
2943
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-6,563,966,751,058,425,000
37.220779
85
0.639823
false
SamYaple/neutron
neutron/tests/functional/agent/linux/test_process_monitor.py
21
3784
# Copyright 2014 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 agre...
apache-2.0
1,664,293,690,557,467,600
33.715596
78
0.639271
false
cmdunkers/DeeperMind
PythonEnv/lib/python2.7/site-packages/numpy/core/shape_base.py
69
9050
from __future__ import division, absolute_import, print_function __all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'vstack', 'hstack', 'stack'] from . import numeric as _nx from .numeric import asanyarray, newaxis def atleast_1d(*arys): """ Convert inputs to arrays with at least one dimension. ...
bsd-3-clause
2,915,219,051,616,551,400
24.857143
79
0.53558
false
joseph-torres/spark
examples/src/main/python/ml/pipeline_example.py
126
2522
# # 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
-4,230,771,715,801,040,400
35.550725
93
0.672482
false
italomaia/django-allauth
allauth/socialaccount/south_migrations/0007_auto__add_field_socialapp_client_id.py
78
6438
# 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 'SocialApp.client_id' db.add_column('socialaccount_socialapp', 'client_id', self.gf('django...
mit
-3,893,418,292,645,992,400
67.489362
182
0.55219
false
neutronpy/neutronpy
tests/test_functions.py
2
1985
# -*- coding: utf-8 -*- r"""Tests special functions """ import numpy as np import pytest from neutronpy import functions from scipy.integrate import simps def test_gauss_norm(): """Test 1d gaussian """ p = np.array([0., 0., 1., -30., 3., 1., 30., 3.]) x = np.linspace(-1e6, 1e6, int(8e6) + 1) y = ...
mit
3,487,464,426,806,427,000
25.466667
74
0.531486
false
mohittahiliani/tcp-eval-suite-ns3
src/mesh/doc/source/conf.py
87
7452
# -*- coding: utf-8 -*- # # ns-3 documentation build configuration file, created by # sphinx-quickstart on Tue Dec 14 09:00:39 2010. # # 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 co...
gpl-2.0
-8,412,465,044,112,385,000
32.41704
108
0.70518
false
titiushko/readthedocs.org
readthedocs/restapi/views/search_views.py
25
7188
import logging from rest_framework import decorators, permissions, status from rest_framework.renderers import JSONPRenderer, JSONRenderer, BrowsableAPIRenderer from rest_framework.response import Response import requests from readthedocs.builds.constants import LATEST from readthedocs.builds.models import Version fr...
mit
-7,332,622,690,231,866,000
29.587234
86
0.516973
false
x303597316/hue
desktop/libs/libsaml/src/libsaml/conf.py
25
4857
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
-4,415,791,575,276,727,000
29.936306
201
0.711756
false
openqt/algorithms
leetcode/python/lc890-find-and-replace-pattern.py
1
1458
# coding=utf-8 import unittest """890. Find and Replace Pattern https://leetcode.com/problems/find-and-replace-pattern/description/ You have a list of `words` and a `pattern`, and you want to know which words in `words` matches the pattern. A word matches the pattern if there exists a permutation of letters `p` so t...
gpl-3.0
6,195,882,860,703,908,000
22.819672
101
0.630316
false
jamessergeant/pylearn2
pylearn2/expr/preprocessing.py
49
3088
""" Low-level utilities for preprocessing. Should be functions that apply to NumPy arrays, not preprocessor classes (though preprocessor classes should reuse these). """ __author__ = "David Warde-Farley" __copyright__ = "Copyright 2012, Universite de Montreal" __credits__ = ["David Warde-Farley"] __license__ = "3-claus...
bsd-3-clause
-3,666,265,793,086,349,300
31.851064
78
0.637306
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/aio/operations/_load_balancer_network_interfaces_operations.py
1
5637
# 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 may ...
mit
7,452,728,853,334,514,000
47.594828
192
0.649991
false
HERA-Team/hera_mc
alembic/versions/93ff199763ac_update_lib_raid_errors_table.py
2
1114
"""update lib_raid_errors table Revision ID: 93ff199763ac Revises: b1063869f198 Create Date: 2017-07-27 00:13:29.765073+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.schema import Sequence, CreateSequence # revision identifiers, used by Alembic. revision = '93ff199763ac' down_revision = '...
bsd-2-clause
6,957,662,874,944,768,000
29.108108
98
0.685817
false
alexhenrie/poedit
deps/boost/tools/build/test/implicit_dependency.py
7
1347
#!/usr/bin/python # Copyright (C) Vladimir Prus 2006. # 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) # Test the <implicit-dependency> is respected even if the target referred to is # not built itself, but only re...
mit
-6,630,603,134,510,737,000
15.62963
79
0.606533
false
gmarkall/numba
numba/cuda/tests/cudadrv/test_events.py
6
1075
import numpy as np from numba import cuda from numba.cuda.testing import unittest, CUDATestCase class TestCudaEvent(CUDATestCase): def test_event_elapsed(self): N = 32 dary = cuda.device_array(N, dtype=np.double) evtstart = cuda.event() evtend = cuda.event() evtstart.recor...
bsd-2-clause
-197,633,809,228,476,770
27.289474
77
0.612093
false
robotican/ric
ric_board/scripts/RiCConfigurator/GUI/Schemes/gazeboGui.py
1
5385
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'gazeboGui.ui' # # Created: Wed Aug 26 11:06:18 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
bsd-3-clause
-1,613,703,236,466,104,000
53.94898
155
0.708449
false
cloudtools/awacs
awacs/worklink.py
1
2663
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "Amazon WorkLink" prefix = "worklink" class Action(BaseAction): def __init__(self, action: str = None) -> None: ...
bsd-2-clause
8,752,525,424,813,745,000
41.951613
88
0.812617
false
ktosiek/spacewalk
spacecmd/src/lib/user.py
2
17881
# # Licensed under the GNU General Public License Version 3 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This p...
gpl-2.0
-3,437,310,527,126,000,000
29.052101
79
0.573458
false
nikitos/npui
netprofile/netprofile/export/pdf.py
2
7572
#!/usr/bin/env python # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*- # # NetProfile: Data export support for PDF files # © Copyright 2015 Alex 'Unik' Unigovsky # # This file is part of NetProfile. # NetProfile is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero Gen...
agpl-3.0
8,866,479,920,615,688,000
26.732601
104
0.629639
false
vijayendrabvs/ssl-neutron
neutron/tests/unit/brocade/test_brocade_plugin.py
38
2433
# Copyright (c) 2012 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...
apache-2.0
5,784,719,034,305,688,000
31.878378
76
0.677764
false
Nindaleth/ansible-modules-core
cloud/openstack/os_user.py
2
6966
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
7,634,729,258,371,155,000
29.552632
89
0.597186
false
CapOM/ChromiumGStreamerBackend
tools/telemetry/third_party/webpagereplay/third_party/dns/rdtypes/sigbase.py
235
6349
# Copyright (C) 2004-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
bsd-3-clause
5,038,593,685,260,407,000
36.791667
79
0.603087
false
marcosmodesto/django-testapp
django/contrib/gis/geos/coordseq.py
411
5396
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import c_double, c_uint, byref from django.contrib.gis.geos.base import GEOSBase, numpy from django.contrib.gis.geos.error impo...
bsd-3-clause
-9,033,275,954,397,161,000
33.589744
97
0.611379
false
faust64/ansible
lib/ansible/modules/cloud/webfaction/webfaction_db.py
19
6415
#!/usr/bin/python # # Create a webfaction database using Ansible and the Webfaction API # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015, with contributions gratefully acknowledged from: # * Andy Baker # * Federico Tarantini # # This file is part of Ansible # # Ansible is free...
gpl-3.0
6,204,298,063,020,600,000
30.292683
353
0.602027
false
DistributedSystemsGroup/zoe
zoe_api/web/executions.py
1
5923
# Copyright (c) 2017, Daniele Venzano # # 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 w...
apache-2.0
-489,584,597,766,974,660
35.337423
159
0.637684
false
googleapis/python-automl
google/cloud/automl_v1/services/prediction_service/transports/__init__.py
6
1221
# -*- coding: utf-8 -*- # Copyright 2020 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...
apache-2.0
-367,353,281,493,697,500
36
88
0.782146
false
ChristineLaMuse/mozillians
vendor-local/lib/python/import_export/widgets.py
9
3870
from __future__ import unicode_literals from decimal import Decimal from datetime import datetime try: from django.utils.encoding import force_text except ImportError: from django.utils.encoding import force_unicode as force_text class Widget(object): """ Widget takes care of converting between impo...
bsd-3-clause
7,886,282,879,968,031,000
22.454545
78
0.614729
false
alfredoavanzosc/odoomrp-wip-1
mrp_operations_start_without_material/__openerp__.py
11
1438
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of th...
agpl-3.0
-1,368,945,667,069,260,500
40.085714
78
0.580668
false
asphalt-framework/asphalt-web
asphalt/web/servers/http.py
1
3331
import logging from asyncio import ( start_unix_server, start_server, StreamReader, StreamWriter) from ssl import SSLContext from typing import Union from urllib.parse import urlparse, unquote import h11 from multidict import CIMultiDict from typeguard import check_argument_types from asphalt.core import Cont...
apache-2.0
7,885,006,894,332,097,000
39.13253
97
0.623536
false
mengxn/tensorflow
tensorflow/contrib/distributions/python/ops/transformed_distribution.py
8
22377
# 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,639,215,993,770,167,000
39.318919
90
0.668901
false
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/production_ml/labs/samples/contrib/azure-samples/kfp-azure-databricks/databricks/_cluster_op.py
3
10940
import json from kfp.dsl import ResourceOp class CreateClusterOp(ResourceOp): """Represents an Op which will be translated into a Databricks Cluster creation resource template. Examples: import databricks databricks.CreateClusterOp( name="createcluster", cluster_n...
apache-2.0
-3,990,632,828,487,379,000
38.927007
100
0.557313
false
avedaee/DIRAC
FrameworkSystem/private/logging/backends/RemoteBackend.py
1
2903
# $HeadURL$ __RCSID__ = "$Id$" """This Backend sends the Log Messages to a Log Server It will only report to the server ERROR, EXCEPTION, FATAL and ALWAYS messages. """ import threading import Queue from DIRAC.Core.Utilities import Time, Network from DIRAC.FrameworkSystem.private.logging.backends.BaseBackend import Bas...
gpl-3.0
-8,650,437,130,664,352,000
31.617978
82
0.666207
false
axinging/chromium-crosswalk
tools/perf/measurements/measurement_smoke_test.py
9
2471
# 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. import logging import optparse import os import unittest from telemetry import benchmark as benchmark_module from telemetry.core import discover from teleme...
bsd-3-clause
-2,954,254,400,516,684,000
38.222222
80
0.76811
false
xaowoodenfish/python-1
bigml/tests/delete_project_steps.py
1
1383
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2014-2015 BigML # # 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 requi...
apache-2.0
2,076,223,942,356,094,500
34.461538
75
0.718727
false