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
tchernomax/ansible
lib/ansible/plugins/cliconf/routeros.py
12
2615
# # (c) 2017 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 d...
gpl-3.0
7,068,408,176,685,725,000
32.525641
90
0.666539
false
python-thumbnails/python-thumbnails
tests/test_images.py
2
2628
# -*- coding: utf-8 -*- import hashlib import os import unittest from io import BytesIO from unittest import mock from PIL import Image from thumbnails.conf import settings from thumbnails.images import SourceFile, Thumbnail from . import data from .utils import has_installed class ThumbnailTestCase(unittest.TestC...
mit
-8,696,018,387,905,633,000
31.85
93
0.67656
false
biocore/micronota
micronota/database/rfam.py
2
3670
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, micronota development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------------------------------...
bsd-3-clause
8,964,697,703,556,082,000
48.594595
101
0.380654
false
justajeffy/arsenalsuite
python/blur/globals.py
10
1528
# # __PYDOC__ # # [TITLE] # TODO:Add Document Title # # [DESCRIPTION] # TODO: Add Document Description # # [CREATION INFO] # Author: Eric Hulser # Email: eric@blur.com # Company: Blur Studios # Date: 06/30/06 # # [HISTORY] # --1.0 - Created # # [DEPENDENCIES] # # __END__ # import ConfigParser, o...
gpl-2.0
-512,934,844,207,685,800
25.818182
110
0.536649
false
hyperledgerchina/fabric_zh_CN
bddtests/server_admin_pb2.py
48
7728
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: server_admin.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _...
apache-2.0
8,679,039,150,330,917,000
38.630769
676
0.744565
false
mvaled/OpenUpgrade
addons/l10n_th/__openerp__.py
260
1453
# -*- 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
2,178,616,468,227,587,300
36.25641
78
0.592567
false
lento/cortex
test/IECoreGL/CoordinateSystemTest.py
7
4103
########################################################################## # # Copyright (c) 2010-2013, Image Engine Design 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: # # * Redis...
bsd-3-clause
-4,908,008,782,944,872,000
34.37069
90
0.664392
false
sznekol/django-cms
cms/south_migrations/0052_auto__add_placeholderreference__add_staticplaceholder__add_field_page_.py
63
18423
# -*- coding: 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 model 'StaticPlaceholder' db.create_table(u'cms_staticplaceholder', ( (u'id', self.gf('...
bsd-3-clause
-433,022,720,095,351,300
83.127854
187
0.558052
false
gvanhorn38/inception
inputs/stat_tfrecords.py
1
6169
""" These utility functions are meant for computing basic statistics in a set of tfrecord files. They can be used to sanity check the training and testing files. """ import argparse import tensorflow as tf def class_stats(tfrecords): """ Sum the number of images and compute the number of images available for eac...
mit
-7,065,890,723,068,690,000
31.298429
183
0.630572
false
pedro2d10/SickRage-FR
lib/hachoir_parser/image/xcf.py
95
10353
""" Gimp image parser (XCF file, ".xcf" extension). You can find informations about XCF file in Gimp source code. URL to read CVS online: http://cvs.gnome.org/viewcvs/gimp/app/xcf/ \--> files xcf-read.c and xcf-load.c Author: Victor Stinner """ from hachoir_parser import Parser from hachoir_core.field import (St...
gpl-3.0
6,027,284,386,587,850,000
30.277946
108
0.550468
false
yongshengwang/hue
build/env/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ses/__init__.py
131
2013
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Harry Marr http://hmarr.com/ # # 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 # wit...
apache-2.0
-5,958,768,946,310,884,000
37.711538
75
0.724789
false
zycdragonball/tensorflow
tensorflow/user_ops/duplicate_op_test.py
146
1303
# 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,027,949,823,127,863,800
32.410256
80
0.663853
false
Redjumpman/Jumper-Cogs
casino/data.py
1
10487
from copy import deepcopy from redbot.core import Config from collections import namedtuple user_defaults = { "Pending_Credits": 0, "Membership": { "Name": "Basic", "Assigned": False }, "Played": { "Allin": 0, "Blackjack": 0, "Coin": 0, "Craps": 0, ...
gpl-3.0
1,010,766,413,017,309,700
28.049861
79
0.50882
false
kaedroho/wagtail
wagtail/images/fields.py
7
4310
import os import willow from django.conf import settings from django.core.exceptions import ValidationError from django.forms.fields import ImageField from django.template.defaultfilters import filesizeformat from django.utils.translation import gettext_lazy as _ ALLOWED_EXTENSIONS = ['gif', 'jpg', 'jpeg', 'png', '...
bsd-3-clause
1,670,652,457,660,001,500
35.525424
117
0.598376
false
civisanalytics/ansible
lib/ansible/modules/network/eos/eos_user.py
7
11844
#!/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
-3,051,016,206,257,393,700
31.628099
82
0.630361
false
vitaly4uk/django
tests/model_formsets_regress/tests.py
182
20697
from __future__ import unicode_literals from django import forms from django.forms.formsets import DELETION_FIELD_NAME, BaseFormSet from django.forms.models import ( BaseModelFormSet, inlineformset_factory, modelform_factory, modelformset_factory, ) from django.forms.utils import ErrorDict, ErrorList from djan...
bsd-3-clause
-1,401,712,692,222,905,000
37.116022
126
0.588636
false
hyperized/ansible
lib/ansible/modules/storage/purestorage/purefa_connect.py
21
4803
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Simon Dodsley (simon@purestorage.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_version': '1.1',...
gpl-3.0
-6,024,199,754,247,194,000
29.987097
119
0.637726
false
tomasreimers/tensorflow-emscripten
tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined_benchmark_test.py
83
8976
# 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
6,358,232,206,721,285,000
39.071429
81
0.664996
false
tdtrask/ansible
lib/ansible/modules/system/svc.py
63
9262
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2015, Brian Coca <bcoca@ansible.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_version': '...
gpl-3.0
3,428,583,038,939,498,000
29.976589
114
0.566724
false
odoobgorg/odoo
addons/website/models/ir_qweb.py
15
2010
# -*- coding: utf-8 -*- from openerp.addons.web.http import request from openerp.osv import orm class QWeb(orm.AbstractModel): """ QWeb object for rendering stuff in the website context """ _inherit = 'ir.qweb' URL_ATTRS = { 'form': 'action', 'a': 'href', } CDN_TRIGGERS = { ...
gpl-3.0
534,303,859,542,299,700
40.020408
189
0.629851
false
jeffery9/mixprint_addons
stock_invoice_directly/__openerp__.py
120
1651
# -*- 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
-2,642,284,740,905,262,000
36.522727
78
0.601454
false
geekboxzone/lollipop_external_chromium_org
tools/telemetry/telemetry/core/local_server.py
26
7004
# 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 collections import json import os import re import subprocess import sys from telemetry.core import forwarders from telemetry.core import util Named...
bsd-3-clause
6,926,521,521,989,381,000
31.728972
80
0.681611
false
interlegis/sapl
sapl/base/models.py
1
12876
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models.deletion import CASCADE from django.db.models.signals import post_migrate from django.db.utils import DEFAULT_DB_ALIAS from django.utils.translat...
gpl-3.0
7,180,013,481,431,099,000
32.886243
92
0.580061
false
thopiekar/Uranium
tests/Settings/TestInstanceContainer.py
1
7410
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import pytest import os import UM.Settings.InstanceContainer # import UM.Settings.SettingDefinition from UM.Resources import Resources Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__))) def test_create...
lgpl-3.0
7,039,812,692,972,390,000
49.408163
219
0.711471
false
jmartinm/invenio
modules/bibfield/lib/bibfield_reader.py
15
18944
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2013 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 ...
gpl-2.0
4,163,143,448,585,835,000
41.956916
137
0.541913
false
TRSasasusu/blender_envmap_to_unity
blender_envmap_to_unity.py
1
1793
import sys from PIL import Image if __name__ == "__main__": param = sys.argv if len(param) == 1 or len(param) > 3: sys.exit(0) image = Image.open(param[1]) # Size of the one image. size = int(image.size[1] / 2) if len(param) == 3 and param[2] == "-t": new_image = Image.new("...
gpl-3.0
3,473,553,553,687,615,000
35.591837
66
0.52705
false
YanTangZhai/tf
tensorflow/g3doc/how_tos/adding_an_op/zero_out_3_test.py
9
1853
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
8,722,297,402,151,114,000
33.314815
80
0.653535
false
jpn--/larch
larch/util/activitysim/nonmand_tour_freq.py
1
5435
import numpy as np import pandas as pd import re import os import yaml import itertools from typing import Mapping from larch import P, X, DataFrames, Model from larch.util import Dict from pathlib import Path import logging from ...log import logger_name from .general import remove_apostrophes, linear_utility_from_sp...
gpl-3.0
-5,397,907,306,984,123,000
32.555556
100
0.639926
false
polymonster/pmtech
tools/pmbuild_ext/cgu.py
1
23757
# cgu - code gen utilities for parsing c-like languages for use in code generation tools # copyright Alex Dixon 2020: https://github.com/polymonster/cgu/blob/master/license import re import json import sys # make code gen more readable and less fiddly def in_quotes(string): return "\"" + string + "\"" # append ...
mit
3,406,653,670,295,917,600
31.678129
117
0.466094
false
highweb-project/highweb-webcl-html5spec
third_party/WebKit/Source/devtools/scripts/compiler-runner/build_compiler_runner_jar.py
67
2199
#!/usr/bin/python import os import shutil import subprocess import sys import tempfile def rel_to_abs(rel_path): return os.path.join(script_path, rel_path) java_bin_path = os.getenv('JAVA_HOME', '') if java_bin_path: java_bin_path = os.path.join(java_bin_path, 'bin') main_class = 'org.chromium.devtools.co...
bsd-3-clause
-572,641,604,850,607,500
29.123288
124
0.637108
false
bpramod/azure-linux-extensions
OSPatching/patch/SuSEPatching.py
8
3479
#!/usr/bin/python # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
1,734,510,609,921,212,700
38.089888
141
0.614257
false
ankurankan/scikit-learn
examples/linear_model/plot_sgd_penalties.py
249
1563
""" ============== SGD: Penalties ============== Plot the contours of the three penalties. All of the above are supported by :class:`sklearn.linear_model.stochastic_gradient`. """ from __future__ import division print(__doc__) import numpy as np import matplotlib.pyplot as plt def l1(xs): return np.array([np....
bsd-3-clause
6,805,296,028,425,274,000
22.328358
74
0.466411
false
asankasanjaya/stratos
components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/thrift/transport/TTwisted.py
19
6528
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
1,186,111,573,958,505,200
28.538462
79
0.669577
false
sonchang/python-agent
cattle/plugins/host-api/host_api.py
4
1095
import os from cattle.plugins.docker import DockerConfig from cattle import Config from cattle.process_manager import background class HostApi(object): def on_startup(self): env = dict(os.environ) env['HOST_API_CATTLE_ACCESS_KEY'] = Config.access_key() env['HOST_API_CATTLE_SECRET_KEY'] =...
apache-2.0
1,133,045,107,947,439,700
33.21875
71
0.520548
false
yugui/grpc
examples/python/multiplex/helloworld_pb2_grpc.py
85
1378
import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import helloworld_pb2 as helloworld__pb2 class GreeterStub(object): """The greeting service definition. """ def __init__(self, channel): """Constructor. Args: channel...
bsd-3-clause
-4,854,418,231,846,816,000
28.319149
75
0.71045
false
zhengwsh/InplusTrader_Linux
InplusTrader/backtestEngine/mod/analyser/mod.py
1
10204
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
mit
6,857,322,447,363,878,000
40.99177
116
0.612015
false
hrayr-artunyan/shuup
shuup_tests/core/test_order_source_weights.py
2
1682
# This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import decimal import pytest from shuup.core.models import OrderLineType from shuup.testing.factor...
agpl-3.0
-2,846,138,221,494,016,500
29.035714
97
0.590369
false
BeDjango/intef-openedx
lms/djangoapps/instructor/enrollment.py
10
17026
""" Enrollment operations for use by instructor APIs. Does not include any access control, be sure to check access before calling. """ import json import logging from django.contrib.auth.models import User from django.conf import settings from django.core.urlresolvers import reverse from django.core.mail import send_...
agpl-3.0
-8,776,075,057,709,575,000
36.919822
118
0.657876
false
callakrsos/Gargoyle
gargoyle-jython/script/Test.py
1
2542
import java.lang.String from org.python.core import PyString x = 100 if x > 0: print('wow this is elegant') else: print('Oranization is the key.') print('hello ' + ' ' + 'world') def my_function(a='zz'): print(a) my_function() class my_class: def __init__(self, x, y ): ...
gpl-2.0
-2,368,762,196,635,599,400
15.289855
85
0.458508
false
c960657/dd-agent
tests/checks/mock/test_java_jmx.py
48
4565
# stdlib import os import tempfile import threading import time from types import ListType import unittest # 3p from mock import patch from nose.plugins.attrib import attr import yaml # project from aggregator import MetricsAggregator from dogstatsd import Server from jmxfetch import JMXFetch from tests.checks.common...
bsd-3-clause
3,685,181,932,702,570,000
33.583333
173
0.626944
false
darkryder/django
tests/schema/tests.py
3
99065
import datetime import itertools import unittest from copy import copy from django.db import ( DatabaseError, IntegrityError, OperationalError, connection, ) from django.db.models import Model from django.db.models.deletion import CASCADE, PROTECT from django.db.models.fields import ( AutoField, BigIntegerFiel...
bsd-3-clause
-4,581,057,897,059,393,500
43.403855
114
0.619068
false
cyberintruder/django-cms
cms/test_utils/project/placeholderapp/views.py
37
3569
from django.http import HttpResponse from django.shortcuts import render from django.template import RequestContext from django.template.base import Template from django.views.generic import DetailView from cms.test_utils.project.placeholderapp.models import ( Example1, MultilingualExample1, CharPksExample) from cm...
bsd-3-clause
1,384,143,165,232,242,700
36.568421
92
0.665172
false
keulraesik/pyelftools
examples/dwarf_location_lists.py
7
4363
#------------------------------------------------------------------------------- # elftools example: dwarf_location_lists.py # # Examine DIE entries which have location list values, and decode these # location lists. # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #-----------------------------...
unlicense
-3,121,972,343,039,634,400
40.160377
80
0.57025
false
JoeWoo/grpc
src/python/grpcio_test/grpc_test/framework/core/_base_interface_test.py
14
3751
# Copyright 2015, 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
-2,971,644,101,020,410,000
38.072917
80
0.763796
false
nesdis/djongo
tests/django_tests/tests/v21/tests/template_tests/filter_tests/test_default.py
521
2159
from django.template.defaultfilters import default from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class DefaultTests(SimpleTestCase): """ Literal string arguments to the default filter are always treated as safe strings, regardless of the au...
agpl-3.0
6,870,199,864,903,251,000
34.983333
96
0.630384
false
pburkholder/chef
lib/chef/provider/package/yum-dump.py
63
9728
# # Author:: Matthew Kent (<mkent@magoazul.com>) # Copyright:: Copyright (c) 2009, 2011 Matthew Kent # License:: Apache License, Version 2.0 # # 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 # ...
apache-2.0
-4,792,070,233,770,948,000
30.687296
114
0.629317
false
jagguli/intellij-community
python/testData/inspections/PyRedeclarationInspection/test.py
54
1786
def test_class(): class X: pass class <warning descr="Redeclared 'X' defined above without usage">X</warning>: pass def test_function(): def foo(): pass def <warning descr="Redeclared 'foo' defined above without usage">foo</warning>(): pass # Top-level variable test ...
apache-2.0
-4,047,892,999,949,122,000
17.8
98
0.596305
false
javaes/sailfish-msg-importer
tests/test_SMSImporter.py
1
1478
import unittest from sail_sms import SMSImporter, SMSParser class SMSImporterTest(unittest.TestCase): def setUp(self): parser = SMSParser("assets/samples.xml") self.sms_list = parser.get_all_sms_in_sf_format() self.importer = SMSImporter("assets/test_commhistory.db") def tearDown(sel...
apache-2.0
8,007,218,844,872,381,000
35.975
75
0.650203
false
ecsnavarretemit/sarai-interactive-maps-backend
app/views/chirps.py
1
9046
# chirps.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 1.0.0-alpha6 import ee import csv import StringIO from datetime import datetime from flask import Blueprint, jsonify, abort, request, make_response from flask_cors import cross_origin from app import EE_CREDE...
mit
1,647,792,523,333,437,000
28.37013
113
0.672673
false
yarikoptic/scrapy
tests/test_downloadermiddleware_robotstxt.py
58
6754
from __future__ import absolute_import import re from twisted.internet import reactor, error from twisted.internet.defer import Deferred, DeferredList, maybeDeferred from twisted.python import failure from twisted.trial import unittest from scrapy.downloadermiddlewares.robotstxt import (RobotsTxtMiddleware, ...
bsd-3-clause
-7,115,397,180,566,656,000
44.026667
104
0.666568
false
mcalhoun/ansible
lib/ansible/plugins/__init__.py
31
15255
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others # # 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 Foun...
gpl-3.0
-3,340,620,599,088,709,000
33.749431
118
0.582563
false
floft/rpi-linux
scripts/gdb/linux/dmesg.py
367
2005
# # gdb helper commands and functions for Linux kernel debugging # # kernel log buffer dump # # Copyright (c) Siemens AG, 2011, 2012 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import string from linux import utils class LxDme...
gpl-2.0
-324,024,537,315,020,100
29.846154
77
0.545636
false
openthread/silk
silk/unit_tests/test_otns.py
1
13819
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
1,092,938,107,745,399,300
34.986979
118
0.61647
false
jankeromnes/depot_tools
tests/fix_encoding_test.py
50
1817
#!/usr/bin/env python # coding=utf8 # 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. """Unit tests for fix_encoding.py.""" import os import sys import unittest sys.path.insert(0, os.path.dirname(os.pa...
bsd-3-clause
457,384,913,952,144,100
29.133333
79
0.693584
false
keithroe/vtkoptix
ThirdParty/Twisted/twisted/names/authority.py
35
13994
# -*- test-case-name: twisted.names.test.test_names -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Authoritative resolvers. """ import os import time from twisted.names import dns, error from twisted.internet import defer from twisted.python import failure from twisted.python.compat ...
bsd-3-clause
361,017,640,421,592,450
33.553086
99
0.531085
false
davgibbs/django
django/db/migrations/recorder.py
478
2868
from __future__ import unicode_literals from django.apps.registry import Apps from django.db import models from django.db.utils import DatabaseError from django.utils.encoding import python_2_unicode_compatible from django.utils.timezone import now from .exceptions import MigrationSchemaMissing class MigrationRecor...
bsd-3-clause
7,765,198,183,956,358,000
32.348837
112
0.642957
false
Triv90/Nova
nova/compute/power_state.py
37
2162
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache Licen...
apache-2.0
-6,042,826,040,592,432,000
33.870968
78
0.738205
false
justdotJS/rowboat
rowboat/plugins/modlog/core.py
2
19552
import re import six import time import pytz import string import operator import humanize from holster.enum import Enum from holster.emitter import Priority from datetime import datetime from collections import defaultdict from disco.bot import CommandLevels from disco.types.base import UNSET, cached_property from d...
mit
-3,277,385,303,123,714,600
32.652324
115
0.580708
false
tsukinowasha/ansible-lint-rules
rules/RoleRelativePath.py
1
1521
from ansiblelint import AnsibleLintRule format = "{}" class RoleRelativePath(AnsibleLintRule): id = 'E201' shortdesc = "Doesn't need a relative path in role" description = '' tags = ['role'] def matchplay(self, file, play): # assume if 'roles' in path, inside a role. if 'roles' n...
mit
-532,232,559,362,185,900
35.214286
65
0.470743
false
ashhher3/pylearn2
pylearn2/datasets/stl10.py
44
5563
""" .. todo:: WRITEME """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" import numpy as np from theano.compat.six.moves import xrange from ...
bsd-3-clause
4,910,655,483,707,017,000
31.91716
79
0.549164
false
jaxkodex/odoo
addons/sale_margin/__openerp__.py
261
1592
############################################################################## # # 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
-4,785,474,599,201,802,000
37.829268
78
0.601131
false
sarvex/tensorflow
tensorflow/python/ops/data_flow_ops.py
17
93142
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-29,576,775,816,573,380
36.019873
95
0.664308
false
iulian787/spack
var/spack/repos/builtin/packages/memkind/package.py
1
2407
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import os class Memkind(AutotoolsPackage): """The memkind library is a user extensible heap mana...
lgpl-2.1
-8,613,304,074,765,195,000
44.415094
96
0.718322
false
pronexo-odoo/odoo-argentina
l10n_ar_account_check_duo/wizard_third/ticket_check_deposit.py
1
7776
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 OpenERP - Team de Localización Argentina. # https://launchpad.net/~openerp-l10n-ar-localization # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
5,548,067,059,574,496,000
41.194444
137
0.492219
false
kevinlee12/oppia
core/platform/transactions/gae_transaction_services.py
2
2181
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-447,977,621,515,229,500
32.553846
78
0.701055
false
PandaWei/tp-libvirt
libvirt/tests/src/virsh_cmd/domain/virsh_migrate_compcache.py
1
5964
import logging import subprocess import time from autotest.client.shared import error from autotest.client.shared import utils from autotest.client.shared import ssh_key from virttest import virsh, utils_misc from virttest.utils_test import libvirt as utlv def get_page_size(): """ Get the current memory page ...
gpl-2.0
-6,760,102,733,770,932,000
34.712575
81
0.561201
false
gammalib/gammalib
inst/cta/test/dev/test_gauss.py
1
3354
#! /usr/bin/env python # ========================================================================== # This script tests the Gaussian gradient. # # Requires: # - matplotlib (optional) # # Copyright (C) 2012 Juergen Knoedlseder # # This program is free software: you can redistribute it and/or modify # it under the terms ...
gpl-3.0
-3,768,378,017,085,694,000
25.619048
76
0.52266
false
sushramesh/lwc
lib/python2.7/site-packages/django/db/backends/sqlite3/base.py
103
17462
""" SQLite3 backend for django. Works with either the pysqlite2 module or the sqlite3 module in the standard library. """ from __future__ import unicode_literals import datetime import decimal import re import warnings from django.conf import settings from django.db import utils from django.db.backends import utils ...
mit
1,259,074,180,433,314,600
40.183962
117
0.629424
false
ninotoshi/tensorflow
tensorflow/python/framework/errors_test.py
14
3484
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
7,324,481,814,523,009,000
42.55
113
0.687715
false
Southpaw-TACTIC/TACTIC
src/tactic/ui/table/explorer_wdg.py
2
3695
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-4,529,819,484,269,279,000
30.581197
193
0.592963
false
qedi-r/home-assistant
homeassistant/components/arduino/sensor.py
4
1767
"""Support for getting information from Arduino pins.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.components import arduino from homeassistant.const import CONF_NAME from homeassistant.helpers.entity import Entity import homeassistant.helpe...
apache-2.0
-3,106,905,260,717,750,000
27.047619
76
0.664403
false
Softmotions/edx-platform
lms/djangoapps/courseware/grades.py
10
33625
# Compute grades using real division, with no integer truncation from __future__ import division from collections import defaultdict from functools import partial import json import random import logging from contextlib import contextmanager from django.conf import settings from django.db import transaction from djang...
agpl-3.0
1,305,954,899,915,342,800
40.926434
120
0.63652
false
hammerlab/pyensembl
setup.py
1
2738
# Copyright (c) 2014-2018. Mount Sinai School of Medicine # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
138,644,291,976,165,840
31.987952
76
0.60263
false
xsynergy510x/android_external_chromium_org
tools/perf/benchmarks/dromaeo.py
27
6772
# 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. import math import os from metrics import power from telemetry import benchmark from telemetry.page import page_set from telemetry.page import page_test fro...
bsd-3-clause
-8,007,784,083,550,300,000
32.196078
80
0.658004
false
ganeshrn/ansible
lib/ansible/plugins/callback/__init__.py
9
17661
# (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
-5,645,457,410,690,070,000
37.900881
160
0.593398
false
google/google-ctf
third_party/edk2/BaseTools/Source/Python/GenFds/GuidSection.py
1
12965
## @file # process GUIDed section generation # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of th...
apache-2.0
2,015,284,398,259,210,200
43.975177
162
0.561203
false
todaychi/hue
desktop/core/ext-py/guppy-0.1.10/guppy/sets/__init__.py
37
2124
#._cv_part guppy.sets from setsc import BitSet # base bitset type from setsc import ImmBitSet # immutable bitset type from setsc import immbit # immutable bitset singleton constructor from setsc import immbitrange # immutable bitset range constructor from setsc import immbitset # immutable bitset constructor from sets...
apache-2.0
3,686,968,608,578,551,000
31.181818
83
0.73823
false
sambitgaan/nupic
src/nupic/math/proposal.py
49
10882
# ---------------------------------------------------------------------- # 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
974,384,016,643,580,900
34.562092
85
0.653373
false
jskew/gnuradio
gr-wxgui/python/wxgui/plotter/bar_plotter.py
59
4281
# # Copyright 2009 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 option) # any later version. # #...
gpl-3.0
-6,525,055,968,020,980,000
27.54
70
0.655221
false
antgonza/qiita
qiita_pet/handlers/websocket_handlers.py
3
5203
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
-6,262,409,310,801,753,000
35.131944
79
0.628291
false
catapult-project/catapult-csm
third_party/google-endpoints/Crypto/Cipher/AES.py
126
4218
# -*- coding: utf-8 -*- # # Cipher/AES.py : AES # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # n...
bsd-3-clause
2,018,486,926,964,257,800
35.678261
86
0.64936
false
TeddyDesTodes/aubio
python/tests/test_midi2note.py
14
1250
#! /usr/bin/env python # -*- coding: utf-8 -*- from aubio import midi2note import unittest list_of_known_midis = ( ( 0, 'C-1' ), ( 1, 'C#-1' ), ( 38, 'D2' ), ( 48, 'C3' ), ( 59, 'B3' ), ( 60, 'C4' ), ( 127, 'G9' ), ) class midi2note_good_values(unittest...
gpl-3.0
-9,205,508,400,190,226,000
28.069767
76
0.6064
false
gimoh/ansible-modules-core
cloud/google/gce_net.py
1
9195
#!/usr/bin/python # Copyright 2013 Google 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 vers...
gpl-3.0
-7,889,475,828,839,855,000
30.597938
95
0.596302
false
hrjn/scikit-learn
examples/covariance/plot_lw_vs_oas.py
159
2951
""" ============================= Ledoit-Wolf vs OAS estimation ============================= The usual covariance maximum likelihood estimate can be regularized using shrinkage. Ledoit and Wolf proposed a close formula to compute the asymptotically optimal shrinkage parameter (minimizing a MSE criterion), yielding th...
bsd-3-clause
3,060,097,794,879,363,600
34.554217
79
0.667909
false
hpicgs/cmake-init
source/tests/googletest/googletest/test/googletest-json-outfiles-test.py
80
5663
#!/usr/bin/env python # Copyright 2018, 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 o...
mit
7,272,105,547,636,897,000
28.649215
80
0.59668
false
lessaworld/SQLpie
scripts/shell.py
1
2395
# -*- coding: utf-8 -*- """ SQLpie License (MIT License) Copyright (c) 2011-2016 André Lessa, http://sqlpie.com See LICENSE file. """ import os, time import sys sys.path.append(os.getcwd()) from flask import Flask, current_app, g from flask import jsonify from flaskext.mysql import MySQL import sqlpie # load globa...
mit
5,498,696,795,190,789,000
30.090909
96
0.541353
false
FusionSP/android_external_chromium_org
third_party/tlslite/tlslite/utils/aes.py
149
1064
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """Abstract class for AES.""" class AES(object): def __init__(self, key, mode, IV, implementation): if len(key) not in (16, 24, 32): raise AssertionError() if mode != 2: raise A...
bsd-3-clause
-1,739,239,728,106,831,000
30.323529
72
0.581767
false
andrius-preimantas/odoo
addons/website_forum_doc/controllers/main.py
338
3425
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website.models.website import slug class WebsiteDoc(http.Controller): @http.route(['/forum/how-to', '/forum/how-to/<model("forum.documentation.toc"):toc>'], type='http', auth="public", website=True) def toc...
agpl-3.0
-4,304,907,298,652,110,300
47.239437
187
0.608759
false
epeios-q37/epeios
tools/xdhq/examples/PYH/ReversiIMG/main.py
1
7636
""" MIT License Copyright (c) 2017 Hajime Nakagami<nakagami@gmail.com> Copyright (c) 2019 Claude SIMON (https://q37.info/s/rmnmqd49) 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 withou...
agpl-3.0
-4,467,023,362,767,694,000
28.181818
142
0.58748
false
barbagroup/conferences
GTC2016/plots/scripts/readCylinder2dRe40.py
1
2840
# coding: utf-8 ''' read performance results of 2D cylinder flow, Re40 ''' import os from matplotlib import pyplot from parsePetIBMperformance import * def plotOneCylinderFig( caseNames, caseNameDict, events, timing, plotOrder, figName, save): ''' Plot the figures for cylinder flow tests. ''' ...
mit
5,029,523,045,314,537,000
28.278351
80
0.604225
false
gsarma/PyOpenWorm
PyOpenWorm/worm.py
1
2810
# -*- coding: utf-8 -*- from __future__ import print_function from .dataObject import DatatypeProperty, ObjectProperty, Alias from .muscle import Muscle from .cell import Cell from .biology import BiologyType from .network import Network from .worm_common import WORM_RDF_TYPE class Worm(BiologyType): """ A repr...
mit
-7,301,807,419,841,298,000
25.761905
85
0.596085
false
AmrnotAmr/zato
code/zato-web-admin/src/zato/admin/settings.py
6
4767
# -*- coding: utf-8 -*- """ Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ # stdlib import logging, logging.config, os # SQLAlchemy from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy import create_engine # YAML import...
gpl-3.0
-7,116,689,378,196,310,000
29.363057
116
0.69163
false
jjmleiro/hue
desktop/core/ext-py/Django-1.6.10/tests/get_earliest_or_latest/tests.py
53
6138
from __future__ import absolute_import from datetime import datetime from django.test import TestCase from .models import Article, Person class EarliestOrLatestTests(TestCase): """Tests for the earliest() and latest() objects methods""" def tearDown(self): """Makes sure Article has a get_latest_by...
apache-2.0
-8,007,111,876,249,648,000
38.857143
96
0.602313
false
Fruit-Snacks/aima-python
submissions/Hess/vaccuum.py
18
6465
import agents as ag import envgui as gui import random # ______________________________________________________________________________ loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world def RandomVacuumAgent(): "Randomly choose one of the actions from the vacuum environment." p = ag.Ra...
mit
3,520,377,068,160,282,600
30.236715
81
0.560866
false
gypogypo/plugin.video.sneek
sucuri_cookie.py
6
2463
#copied from salt thanks import sys,traceback,urllib2,re, urllib,xbmc, base64 import cookielib, urlparse def _get_sucuri_cookie(html): if 'sucuri_cloudproxy_js' in html: match = re.search("S\s*=\s*'([^']+)", html) if match: s = base64.b64decode(match.group(1)) s = s.r...
gpl-3.0
-4,860,317,410,150,261,000
35.892308
141
0.508323
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/operations/_application_gateway_private_endpoint_connections_operations.py
1
23133
# 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
-3,322,252,620,837,356,500
51.694761
241
0.660442
false
bjodah/mpmath
mpmath/libmp/libmpc.py
40
26843
""" Low-level functions for complex arithmetic. """ import sys from .backend import MPZ, MPZ_ZERO, MPZ_ONE, MPZ_TWO, BACKEND from .libmpf import (\ round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast, bitcount, bctable, normalize, normalize1, reciprocal_rnd, rshift, lshift, giant_...
bsd-3-clause
-7,883,377,010,783,945,000
31.147305
80
0.519502
false
kater169/libcloud
docs/examples/storage/create_directory_backup_stream_to_cf.py
60
1097
import subprocess from datetime import datetime from libcloud.storage.types import Provider, ContainerDoesNotExistError from libcloud.storage.providers import get_driver driver = get_driver(Provider.CLOUDFILES_US)('username', 'api key') directory = '/home/some/path' cmd = 'tar cvzpf - %s' % (directory) object_name ...
apache-2.0
-7,709,273,666,597,322,000
33.28125
75
0.7165
false
apbard/scipy
scipy/io/matlab/tests/test_mio5_utils.py
1
5535
""" Testing mio5_utils Cython module """ from __future__ import division, print_function, absolute_import import sys from io import BytesIO cStringIO = BytesIO import numpy as np from nose.tools import (assert_true, assert_equal, assert_raises) from numpy.testing import (assert_array_equal) from scipy._lib.six i...
bsd-3-clause
8,428,395,452,064,657,000
28.758065
75
0.558446
false
MaxStrange/ArtieInfant
scripts/ad-hoc/vowel_embedding.py
1
6030
""" Loads an autoencoder model, plots the latent space for the test set and the plots sounds from a directory on top of that space, with arrows pointing to each of the overlaid sounds. The arrows have labels that are the file names of the sounds (without the extension). """ import argparse import matplotlib.pyplot as p...
mit
7,139,527,320,254,267,000
42.695652
208
0.658375
false