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
ssavvides/posix-omni-parser
parsers/Parser.py
1
4623
""" <Started> July 2013 <Author> Savvas Savvides <savvas@purdue.edu> <Purpose> Acts as the parent for all parsers. Defines some abstract methods required by all parsers and some helper methods that can be used by any parser. """ import pickle class Parser(): def __init__(self, trace_path): ""...
apache-2.0
-9,150,104,786,020,287,000
31.787234
99
0.58793
false
atsao72/sympy
sympy/matrices/expressions/hadamard.py
91
2443
from __future__ import print_function, division from sympy.core import Mul, sympify from sympy.strategies import unpack, flatten, condition, exhaust, do_one from sympy.matrices.expressions.matexpr import MatrixExpr, ShapeError def hadamard_product(*matrices): """ Return the elementwise (aka Hadamard) product...
bsd-3-clause
-3,206,721,213,672,988,000
28.433735
82
0.623414
false
paplorinc/intellij-community
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/pgen2/driver.py
212
5164
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser driver. This provides a high-level interface to parse a file into a synta...
apache-2.0
8,759,328,518,994,612,000
31.89172
76
0.553641
false
Forage/Gramps
gramps/gen/db/backup.py
1
6924
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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 ve...
gpl-2.0
-5,332,859,217,872,030,000
30.616438
76
0.617562
false
erhuabushuo/crossbar
crossbar/router/test/test_observation.py
2
12951
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
agpl-3.0
-5,212,526,780,463,815,000
36.430636
115
0.613157
false
hesseltuinhof/mxnet
example/gluon/dcgan.py
1
8010
import matplotlib as mpl mpl.use('Agg') from matplotlib import pyplot as plt import argparse import mxnet as mx from mxnet import gluon from mxnet.gluon import nn from mxnet import autograd import numpy as np import logging from datetime import datetime import os import time def fill_buf(buf, i, img, shape): n = ...
apache-2.0
9,172,698,070,382,929,000
35.575342
192
0.618102
false
frankinit/ThinkStats2
code/chap14soln.py
68
4396
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import numpy as np import random import first import normal import th...
gpl-3.0
-4,082,255,599,991,445,000
27.921053
76
0.686988
false
dob71/x2swn
skeinforge/skeinforge_application/skeinforge_plugins/craft_plugins/coil.py
8
9991
""" This page is in the table of contents. Coil is a script to coil wire or filament around an object. ==Operation== The default 'Activate Coil' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called. ==Settings== ===Minimum Tool Distance=== Default i...
gpl-3.0
4,871,438,744,447,986,000
38.646825
213
0.75598
false
vnsofthe/odoo-dev
addons/hr_gamification/__openerp__.py
320
1676
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-5,633,707,142,457,344,000
38.904762
78
0.614558
false
dostavro/dotfiles
sublime2/Packages/SublimeCodeIntel/libs/process.py
2
26248
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozilla.org/MPL/ # # Softwa...
mit
-4,697,782,535,981,483,000
43.868376
128
0.580539
false
ZenithDK/mopidy
tests/http/test_handlers.py
17
3205
from __future__ import absolute_import, unicode_literals import os import mock import tornado.testing import tornado.web import tornado.websocket import mopidy from mopidy.http import handlers class StaticFileHandlerTest(tornado.testing.AsyncHTTPTestCase): def get_app(self): return tornado.web.Applic...
apache-2.0
5,895,193,230,728,938,000
35.420455
78
0.626209
false
clovett/MissionPlanner
Lib/site-packages/numpy/random/__init__.py
54
4688
""" ======================== Random Number Generation ======================== ==================== ========================================================= Utility functions ============================================================================== random Uniformly distributed values of a given sha...
gpl-3.0
-4,809,571,773,812,460,000
44.960784
78
0.470137
false
drammock/mne-python
tutorials/preprocessing/59_head_positions.py
5
3467
""" .. _tut-head-pos: ================================================ Extracting and visualizing subject head movement ================================================ Continuous head movement can be encoded during MEG recordings by use of HPI coils that continuously emit sinusoidal signals. These signals can then b...
bsd-3-clause
-878,726,450,097,594,800
37.511111
79
0.596942
false
nanolearningllc/edx-platform-cypress-2
common/djangoapps/third_party_auth/tests/specs/base.py
36
38777
"""Base integration test for provider implementations.""" import unittest import json import mock from django import test from django.contrib import auth from django.contrib.auth import models as auth_models from django.contrib.messages.storage import fallback from django.contrib.sessions.backends import cache from ...
agpl-3.0
-8,429,236,133,985,940,000
51.119624
122
0.691544
false
bratsche/Neutron-Drive
google_appengine/lib/webob_1_1_1/docs/wiki-example-code/example.py
6
5829
import os import re from webob import Request, Response from webob import exc from tempita import HTMLTemplate VIEW_TEMPLATE = HTMLTemplate("""\ <html> <head> <title>{{page.title}}</title> </head> <body> <h1>{{page.title}}</h1> {{if message}} <div style="background-color: #99f">{{message}}</div> {{endif}} <div>{...
bsd-3-clause
8,047,626,835,512,956,000
28.145
96
0.56562
false
MBoustani/climate
ocw/data_source/esgf.py
1
5050
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-2,879,182,417,511,300,600
34.815603
80
0.638416
false
peguin40/zulip
zerver/logging_handlers.py
12
3082
from __future__ import absolute_import from django.conf import settings import logging import traceback import platform from django.core import mail from django.http import HttpRequest from django.utils.log import AdminEmailHandler from django.views.debug import ExceptionReporter, get_exception_reporter_filter from...
apache-2.0
-4,740,146,126,959,366,000
35.258824
96
0.560999
false
Changaco/oh-mainline
vendor/packages/Django/django/test/simple.py
78
13939
import unittest as real_unittest from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import get_app, get_apps from django.test import _doctest as doctest from django.test.utils import setup_test_environment, teardown_test_environment from django.test.testcases...
agpl-3.0
8,643,021,026,561,968,000
36.270053
108
0.589497
false
ptsneves/ardupilot
Tools/ardupilotwaf/gtest.py
52
1267
#!/usr/bin/env python # encoding: utf-8 """ gtest is a Waf tool for test builds in Ardupilot """ from waflib import Utils from waflib.Configure import conf import boards def configure(cfg): cfg.env.HAS_GTEST = False if cfg.options.disable_tests: return board = cfg.get_board() if isinstance(...
gpl-3.0
8,475,376,088,885,046,000
23.843137
75
0.593528
false
NickRuiz/wikitrans-pootle
strings.py
5
1461
# These are some strings that we need for successful extraction. They come from # Django and is not included in our POT file otherwise. This file itself is not # used for a running Pootle. # Don't change any of these strings unless they changed in Django. The adding # of extra comments to help translators is fine. _(...
gpl-2.0
398,595,724,868,094,700
40.742857
253
0.720739
false
Embisto/lightblue-0.4
src/series60/_obex.py
47
4585
# Copyright (c) 2009 Bea Lam. All rights reserved. # # This file is part of LightBlue. # # LightBlue 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 l...
gpl-3.0
4,234,448,177,152,668,700
35.110236
86
0.594329
false
kyvinh/home-assistant
homeassistant/components/light/mqtt_template.py
3
10024
""" Support for MQTT Template lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.mqtt_template/ """ import logging import voluptuous as vol import homeassistant.components.mqtt as mqtt from homeassistant.components.light import ( ATTR_BRI...
apache-2.0
2,160,206,562,729,314,000
32.525084
79
0.57911
false
inspirehep/invenio-accounts
invenio_accounts/alembic/e12419831262_add_new_columns_on_sessionactivity.py
3
1487
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2017-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Add new columns on SessionActivity.""" import sqlalchemy as sa from alembic impor...
mit
-349,904,017,482,896,060
32.044444
79
0.642905
false
nacc/autotest
cli/acl.py
6
7654
# # Copyright 2008 Google Inc. All Rights Reserved. """ The acl module contains the objects and methods used to manage ACLs in Autotest. The valid actions are: add: adds acl(s), or users or hosts to an ACL remove: deletes acl(s), or users or hosts from an ACL list: lists acl(s) The common options are: --...
gpl-2.0
-4,741,960,179,637,047,000
33.169643
79
0.490854
false
Aloomaio/googleads-python-lib
examples/ad_manager/v201811/premium_rate_service/get_all_premium_rates.py
1
1967
#!/usr/bin/env python # # Copyright 2016 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 requir...
apache-2.0
67,322,337,558,389,420
35.425926
79
0.699542
false
tryolabs/luminoth
luminoth/utils/bbox_transform_tf.py
1
4791
import tensorflow as tf def get_width_upright(bboxes): with tf.name_scope('BoundingBoxTransform/get_width_upright'): bboxes = tf.cast(bboxes, tf.float32) x1, y1, x2, y2 = tf.split(bboxes, 4, axis=1) width = x2 - x1 + 1. height = y2 - y1 + 1. # Calculate up right point of b...
bsd-3-clause
302,808,356,167,152,300
30.519737
79
0.591943
false
KonradBreitsprecher/espresso
testsuite/coulomb_tuning.py
1
3369
# # Copyright (C) 2017 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 ver...
gpl-3.0
2,391,780,901,949,024,000
34.09375
78
0.618284
false
saurabh6790/test-med-app
accounts/report/item_wise_sales_register/item_wise_sales_register.py
14
3553
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import flt def execute(filters=None): if not filters: filters = {} columns = get_columns() last_col = len(col...
agpl-3.0
-81,592,160,253,702,400
36.808511
99
0.685336
false
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/tensorflow/python/framework/importer.py
8
18388
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
agpl-3.0
7,695,854,965,801,430,000
38.887202
109
0.620513
false
simeonmiteff/junkbox
wbx.py
1
1978
#!/usr/bin/python # wbx.py - dump MikroTik winbox addresses.wbx file format # Mon Oct 13 10:03:26 SAST 2008 import sys def munge_pair(pair): """ Convert integer values to integers """ name, value, offset = pair if name in ['secure-mode', 'keep-pwd']: value = ord(value) return (name, value, off...
apache-2.0
8,535,797,178,449,414,000
29.90625
82
0.578362
false
bukzor/sympy
sympy/galgebra/debug.py
52
4148
# sympy/galgebra/debug.py from __future__ import print_function from itertools import islice def ostr(obj, dict_mode=False): """ Recursively convert iterated object (list/tuple/dict/set) to string. """ def ostr_rec(obj, dict_mode): global ostr_s if isinstance(obj, tuple): ...
bsd-3-clause
965,823,605,520,485,900
29.057971
89
0.437078
false
fujunwei/chromium-crosswalk
tools/memory_inspector/memory_inspector/classification/mmap_classifier_unittest.py
109
3441
# 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 unittest from memory_inspector.classification import mmap_classifier from memory_inspector.core import memory_map _TEST_RULES = """ [ { 'name': '...
bsd-3-clause
8,150,648,225,591,802,000
31.471698
79
0.474571
false
natebeacham/saml2
src/saml2/__init__.py
1
32985
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2006 Google Inc. # Copyright (C) 2009 Umeå University # # 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.apa...
bsd-2-clause
-2,803,088,786,592,272,400
37.08776
83
0.594409
false
crs4/pydoop
examples/avro/py/avro_container_dump_results.py
2
1109
# BEGIN_COPYRIGHT # # Copyright 2009-2021 CRS4. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
3,710,244,477,270,306,000
28.184211
77
0.64743
false
google-research/seed_rl
football/vtrace_main.py
1
1875
# coding=utf-8 # Copyright 2019 The SEED 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 applicable law or agre...
apache-2.0
-8,279,843,570,903,421,000
29.241935
74
0.725867
false
Limezero/libreoffice
wizards/com/sun/star/wizards/ui/DocumentPreview.py
6
3783
# # This file is part of the LibreOffice project. # # 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/. # # This file incorporates work covered by the following license noti...
gpl-3.0
8,928,524,716,255,180,000
36.088235
106
0.670896
false
amorwilliams/chameleon
client/tools/buildscript/chameleon_upgrade.py
4
1737
#encoding=utf-8 import os, zipfile, sys BASEDIR = os.path.split(os.path.abspath(__file__))[0] class UpgradeEnv(object): def __init__(self, basedir): self.basedir = basedir def upgradeFromZip(self, filename): with zipfile.ZipFile(filename) as fs: try: with fs.open('...
mit
2,906,772,957,653,932,500
28.672414
79
0.492156
false
gberl001/vlfeat
python/vlfeat/misc/colorspaces.py
6
3124
import numpy def vl_xyz2lab(I,il='E'): # VL_XYZ2LAB Convert XYZ color space to LAB # J = VL_XYZ2LAB(I) converts the image from XYZ format to LAB format. # # VL_XYZ2LAB(I,IL) uses one of the illuminants A, B, C, E, D50, D55, # D65, D75, D93. The default illuminant is E. # # See also:: VL_XYZ2LUV(), VL_HELP(). ...
gpl-2.0
2,055,845,819,630,849,300
23.992
71
0.513764
false
CeltonMcGrath/TACTIC
src/pyasm/deprecated/flash/widget/flash_status_filter.py
6
3018
########################################################### # # 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
-2,763,023,821,148,622,300
30.768421
84
0.610338
false
EvenStrangest/tensorflow
tensorflow/python/framework/function_test.py
8
20920
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
882,205,278,723,251,700
34.041876
80
0.583461
false
bregman-arie/ansible
lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py
18
7495
#!/usr/bin/python # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- modul...
gpl-3.0
5,544,168,762,524,447,000
28.624506
129
0.645897
false
a-doumoulakis/tensorflow
tensorflow/python/debug/cli/tensor_format_test.py
41
37994
# 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,602,637,298,285,162,000
36.212537
80
0.554982
false
jonparrott/google-cloud-python
api_core/tests/unit/future/test__helpers.py
3
1334
# Copyright 2017, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-4,931,825,302,833,869,000
35.054054
77
0.722639
false
charitychain/Charitychain
Simplechaindb/clusterdeploy/write_keypairs_file.py
1
1603
"""A Python 3 script to write a file with a specified number of keypairs, using bigchaindb.crypto.generate_key_pair() The written file is always named keypairs.py and it should be interpreted as a Python 2 script. Usage: $ python3 write_keypairs_file.py num_pairs Using the list in other Python scripts: # in a...
apache-2.0
3,639,801,397,304,456,700
31.714286
67
0.637555
false
jakevdp/supersmoother
supersmoother/windowed_sum.py
2
9106
import numpy as np def windowed_sum_slow(arrays, span, t=None, indices=None, tpowers=0, period=None, subtract_mid=False): """Compute the windowed sum of the given arrays. This is a slow function, used primarily for testing and validation of the faster version of ``windowed_sum()`` ...
bsd-2-clause
-7,030,775,545,794,044,000
36.628099
79
0.534593
false
haoyunfeix/crosswalk-test-suite
stability/stability-lowresource-android-tests/lowresource/Webapp_Operations_UnderLowDisk.py
7
9653
#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of c...
bsd-3-clause
-8,843,083,820,183,271,000
33.848375
136
0.56656
false
no-zone6/pimouse_ros_2
scripts/motors2.py
1
2299
#!/usr/bin/env python #enchoding: utf8 import sys, rospy, math from pimouse_ros_2.msg import MotorFreqs from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse class Motor(): def __init__(self): if not self.set_power(False): sys.exit(1) rospy.on_shutdown(self.set_power) sel...
gpl-3.0
8,072,252,889,652,269,000
30.067568
84
0.639843
false
jeasoft/odoo
addons/portal/wizard/__init__.py
447
1098
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 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
5,266,056,062,556,404,000
41.230769
78
0.621129
false
Omegaice/smartcontainers
sc/configmanager.py
3
3152
"""Configuration manager for reading and writing SC configuration files.""" import simplejson as json import os import rdflib __author__ = 'cwilli34' # noinspection PyBroadException,PyBroadException class ConfigManager(object): """ Configuration File Creator """ def __init__(self, filename='sc.config'): ...
apache-2.0
8,467,702,487,026,619,000
31.494845
100
0.566624
false
mpare002/HackTech_2017
env/Lib/site-packages/flask/blueprints.py
773
16320
# -*- coding: utf-8 -*- """ flask.blueprints ~~~~~~~~~~~~~~~~ Blueprints are the recommended way to implement larger or more pluggable applications in Flask 0.7 and later. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from functools import update_wrap...
mit
324,947,670,098,490,400
39.698254
87
0.624387
false
Krossom/python-for-android
python3-alpha/python3-src/Misc/Vim/syntax_test.py
82
1457
"""Test file for syntax highlighting of editors. Meant to cover a wide range of different types of statements and expressions. Not necessarily sensical or comprehensive (assume that if one exception is highlighted that all are, for instance). Extraneous trailing whitespace can't be tested because of svn pre-commit ho...
apache-2.0
-381,032,114,071,405,060
22.5
77
0.69801
false
starrybeam/samba
source4/dsdb/tests/python/token_group.py
26
20392
#!/usr/bin/env python # -*- coding: utf-8 -*- # test tokengroups attribute against internal token calculation import optparse import sys import os sys.path.insert(0, "bin/python") import samba from samba.tests.subunitrun import SubunitOptions, TestProgram import samba.getopt as options from samba.auth import syste...
gpl-3.0
4,856,807,539,757,336,000
40.030181
125
0.588319
false
weimingtom/python-for-android
python3-alpha/python3-src/Lib/test/test_pkgimport.py
57
2757
import os import sys import shutil import string import random import tempfile import unittest from imp import cache_from_source from test.support import run_unittest class TestImport(unittest.TestCase): def __init__(self, *args, **kw): self.package_name = 'PACKAGE_' while self.package_name in sy...
apache-2.0
6,518,947,396,120,516,000
31.821429
79
0.61226
false
msmolens/VTK
Interaction/Widgets/Testing/Python/TestSphereWidget.py
21
14176
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ========================================================================= Program: Visualization Toolkit Module: TestNamedColorsIntegration.py Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www....
bsd-3-clause
1,285,815,760,385,609,500
39.161473
119
0.569484
false
drexly/openhgsenti
lib/django/db/models/fields/reverse_related.py
106
11166
""" "Rel objects" for related fields. "Rel objects" (for lack of a better name) carry information about the relation modeled by a related field and provide some utility functions. They're stored in the ``remote_field`` attribute of the field. They also act as reverse fields for the purposes of the Meta API because th...
apache-2.0
4,159,855,481,848,597,500
34.447619
106
0.638277
false
timduru/platform-external-chromium_org
chrome/test/install_test/chrome_options.py
36
1375
# Copyright (c) 2012 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. """Chrome-specific options for configuring a ChromeDriver instance.""" import base64 class ChromeOptions(object): """Chrome-specific options for con...
bsd-3-clause
-2,065,348,662,000,482,000
29.555556
77
0.685091
false
TeamEOS/external_chromium_org
build/android/buildbot/bb_run_bot.py
10
11374
#!/usr/bin/env python # # Copyright (c) 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 collections import copy import json import os import pipes import re import subprocess import sys import bb_utils sys.pa...
bsd-3-clause
-1,167,933,406,802,593,500
35.22293
80
0.637595
false
tkinz27/ansible
lib/ansible/inventory/script.py
80
6338
# (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
-389,742,244,353,685,250
37.412121
159
0.577469
false
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/numpy/lib/tests/test_io.py
29
77244
from __future__ import division, absolute_import, print_function import sys import gzip import os import threading from tempfile import NamedTemporaryFile import time import warnings import gc from io import BytesIO from datetime import datetime import numpy as np import numpy.ma as ma from numpy.lib._iotools import ...
gpl-3.0
7,245,831,063,296,634,000
37.107548
84
0.503534
false
grammarly/browser-extensions
firefox/addon-sdk/python-lib/cuddlefish/tests/test_init.py
34
9626
# 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/. import os, unittest, shutil import zipfile from StringIO import StringIO from cuddlefish import initializer from cuddlef...
bsd-3-clause
227,023,230,142,235,940
38.941909
90
0.57646
false
dscho/hg
tests/test-minirst.py
1
5259
from __future__ import absolute_import, print_function import pprint from mercurial import ( minirst, ) def debugformat(text, form, **kwargs): if form == 'html': print("html format:") out = minirst.format(text, style=form, **kwargs) else: print("%d column format:" % form) ou...
gpl-2.0
-7,429,733,303,438,178,000
19.226923
78
0.626735
false
rkq/cxxexp
third-party/src/boost_1_56_0/tools/build/src/tools/cast.py
45
2707
# Status: ported # Base revision: 64432. # Copyright 2005-2010 Vladimir Prus. # 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) # Defines main target 'cast', used to change type for target. For example, in Qt # libra...
mit
-6,135,820,684,126,165,000
38.231884
97
0.663465
false
flavour/RedHat
modules/geopy/geocoders/yahoo.py
46
3135
""" Wrapper to the Yahoo's new PlaceFinder API. (doc says that the API RELEASE 1.0 (22 JUNE 2010)) """ import xml.dom.minidom from geopy import util from geopy import Point from urllib import urlencode from urllib2 import urlopen from geopy.geocoders.base import Geocoder try: import json except ImportError: try...
mit
-7,243,598,916,188,055,000
35.453488
119
0.564593
false
adfernandes/mbed
tools/host_tests/stdio_auto.py
13
2147
""" mbed SDK Copyright (c) 2011-2013 ARM Limited SPDX-License-Identifier: Apache-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 http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
apache-2.0
-4,132,267,945,904,014,000
36.666667
139
0.635305
false
shuishoudage/CloudappCLI
env/lib/python2.7/site-packages/setuptools/command/rotate.py
389
2164
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os import shutil from setuptools.extern import six from setuptools import Command class rotate(Command): """Delete older distributions""" description = "delete older distributions, kee...
gpl-3.0
-7,007,840,098,665,345,000
31.787879
78
0.556839
false
paypal/keystone
tests/test_import_legacy.py
4
4145
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
apache-2.0
8,269,073,250,400,327,000
34.127119
76
0.652352
false
cs564/heron
heron/tools/tracker/tests/python/topology_helpers_unittest.py
8
10177
''' topology_helpers_unittest.py ''' # pylint: disable=missing-docstring import unittest2 as unittest from heron.common.src.python import constants from heron.tools.tracker.src.python import topology_helpers from mock_proto import MockProto class TopologyHelpersTest(unittest.TestCase): def setUp(self): self.moc...
apache-2.0
8,044,475,698,967,496,000
42.866379
98
0.701484
false
ertugruldeveloper/hesapmak1
hesapmak1.py
1
14146
# hesapmak1 print("\nSürüm kontrolü yapıldı, 3.X sürümü kullanılıyor\n") karşılama = open("karşılama.txt","r") print("\n",karşılama.read()) karşılama.close() def kimlik(): #KİMLİK FONKSİYONU print("1.) Merhabalar Yeni Kullanıcı Detaylı Kimlik Kartını Oluşturmak\n\ ister misin? Evet için 'E', Hayır içi...
gpl-3.0
4,412,204,513,986,033,700
40.435045
105
0.450164
false
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9/lib/python/lib/python2.3/email/MIMEMessage.py
11
1244
# Copyright (C) 2001,2002 Python Software Foundation # Author: barry@zope.com (Barry Warsaw) """Class representing message/* MIME documents. """ from email import Message from email.MIMENonMultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart): """Class representing message/* MIME documents."""...
gpl-2.0
8,431,801,291,668,306,000
36.69697
78
0.676849
false
SnappleCap/oh-mainline
vendor/packages/scrapy/scrapy/tests/test_selector_libxml2.py
17
3028
""" Selectors tests, specific for libxml2 backend """ import unittest from scrapy.http import TextResponse, HtmlResponse, XmlResponse from scrapy.selector.libxml2sel import XmlXPathSelector, HtmlXPathSelector, \ XPathSelector from scrapy.selector.document import Libxml2Document from scrapy.utils.test import libxm...
agpl-3.0
7,905,456,730,438,875,000
32.274725
106
0.582893
false
Yen-Chung-En/w16b_test
static/Brython3.1.1-20150328-091302/Lib/importlib/_bootstrap.py
623
63710
"""Core implementation of import. This module is NOT meant to be directly imported! It has been designed such that it can be bootstrapped into Python as the implementation of import. As such it requires the injection of specific modules and attributes in order to work. One should use importlib as the public-facing ver...
agpl-3.0
2,637,171,813,854,033,400
34.772038
82
0.590661
false
maelg/RaspiNotifier
checker/facebook.py
1
1031
import RPi.GPIO as GPIO, subprocess #if( int(time.strftime('%H')) >= 8 and int(time.strftime('%H')) <= 21 ): def checkFacebook(): nbr_notif = int(open("/home/pi/RaspiNotifier/nbr/nbr_facebook.txt", "r").read()) GPIO_PIN = int(config.get("Facebook", "gpioPin")) GPIO.setmode(GPIO.BOARD) GPIO.setup(GPIO_PIN,...
gpl-2.0
2,763,489,857,918,660,000
36.185185
116
0.656644
false
openshift/openshift-tools
ansible/roles/lib_openshift_3.2/library/oc_process.py
6
37409
#!/usr/bin/env python # pylint: disable=too-many-lines # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) ...
apache-2.0
-6,849,262,103,608,643,000
32.793135
118
0.519928
false
boxuk/ansible-boxuk-modules-passwordstate
passwordstate_password/passwordstate_password.py
1
9460
#!/usr/bin/python """ PasswordState Ansible Module """ from ansible.module_utils.basic import * import urllib import urllib2 import json class PasswordIdException(Exception): msg = 'Either the password id or the match ' \ 'field id and value must be configured' class Password(object): """ Passwor...
mit
3,357,975,394,028,972,000
34.698113
94
0.568076
false
nekohayo/snowy
lib/south/management/commands/startmigration.py
4
34660
""" Startmigration command, version 2. """ import sys import os import re import string import random import inspect import parser from optparse import make_option from django.core.management.base import BaseCommand from django.core.management.color import no_style from django.db import models from django.db.models.f...
agpl-3.0
7,942,868,048,085,797,000
36.350216
242
0.531362
false
beni55/edx-platform
lms/lib/xblock/test/test_mixin.py
37
14587
""" Tests of the LMS XBlock Mixin """ import ddt from xblock.validation import ValidationMessage from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, TEST_DATA_MIXED_TOY_MODULES...
agpl-3.0
2,259,181,729,043,136,500
40.796562
120
0.64249
false
klmitch/nova
nova/objects/instance_action.py
3
12223
# Copyright 2013 IBM Corp. # # 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 agree...
apache-2.0
5,409,888,471,082,891,000
41.737762
79
0.609016
false
wli/django-allauth
allauth/socialaccount/providers/oauth2/views.py
1
5403
from __future__ import absolute_import from datetime import timedelta from django.core.exceptions import PermissionDenied from django.http import HttpResponseRedirect from django.utils import timezone from allauth.compat import reverse from allauth.exceptions import ImmediateHttpResponse from allauth.utils import bu...
mit
-3,249,859,391,584,768,500
37.592857
75
0.587822
false
Work4Labs/lettuce
tests/integration/lib/Django-1.3/django/contrib/redirects/middleware.py
447
1105
from django.contrib.redirects.models import Redirect from django import http from django.conf import settings class RedirectFallbackMiddleware(object): def process_response(self, request, response): if response.status_code != 404: return response # No need to check for a redirect for non-404 re...
gpl-3.0
-990,782,274,214,012,200
39.925926
85
0.608145
false
birm/Elemental
python/blas_like/level3.py
2
29133
# # Copyright (c) 2009-2015, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # from ..core import * # BLAS 3 # ====== # Gemm # ---- ...
bsd-3-clause
580,383,098,763,690,600
36.254476
79
0.665809
false
pyjs/pyjs
pyjswidgets/pyjamas/ui/StackPanel.py
9
5080
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009, 2010 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # # 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.apach...
apache-2.0
5,465,043,149,589,785,000
30.75
78
0.610236
false
jbedorf/tensorflow
tensorflow/contrib/image/python/ops/sparse_image_warp.py
19
8517
# Copyright 2018 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,351,512,663,865,067,500
41.163366
80
0.685453
false
britcey/ansible
lib/ansible/modules/notification/mattermost.py
49
5291
#!/usr/bin/python # -*- coding: utf-8 -*- # Benjamin Jolivot <bjolivot@gmail.com> # Inspired by slack module : # # (c) 2017, Steve Pletcher <steve@steve-pletcher.com> # # (c) 2016, René Moser <mail@renemoser.net> # # (c) 2015, Stefan Berggren <nsg@nsg.cc> # # (c) 2014, Ramon de la Fuente <ramon@delafuente....
gpl-3.0
918,623,554,169,724,800
31.857143
120
0.650851
false
zuphilip/ocropy
ocrolib/exceptions.py
5
2139
import inspect import numpy def summary(x): """Summarize a datatype as a string (for display and debugging).""" if type(x)==numpy.ndarray: return "<ndarray %s %s>"%(x.shape,x.dtype) if type(x)==str and len(x)>10: return '"%s..."'%x if type(x)==list and len(x)>10: return '%s...'%...
apache-2.0
-5,357,816,646,254,686,000
28.30137
71
0.570827
false
ksrajkumar/openerp-6.1
openerp/addons/sale/report/sale_order.py
10
1447
# -*- 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
4,156,238,087,402,635,300
39.194444
126
0.620594
false
mu-editor/mu
tests/test_logic.py
2
115644
# -*- coding: utf-8 -*- """ Tests for the Editor and REPL logic. """ import sys import os import atexit import codecs import contextlib import json import locale import random import re import shutil import subprocess import tempfile from unittest import mock import uuid import pytest import mu.config import mu.logic ...
gpl-3.0
-5,647,787,153,525,241,000
31.712871
82
0.640868
false
doirisks/dori
models/10.1161:CIRCULATIONAHA.108.816694/example.py
1
5090
""" example.py by Ted Morin contains example code for 30-year CVD calculator - all models 10.1161/CIRCULATIONAHA.108.816694 2009 Predicting the Thirty-year Risk of Cardiovascular Disease The Framingham Heart Study """ #ismale,age,sbp,antihyp,smoke,diabet,totchol,hdlchol #tests from modela import model as a from mod...
gpl-3.0
1,394,828,117,851,864,600
68.726027
148
0.700196
false
Br1an6/ACS_Netplumber_Implementation
hassel-c/net_plumbing/examples/template/run_reachability.py
5
1972
''' Created on Aug 1, 2012 @author: Peyman Kazemian ''' from examples.utils.network_loader import load_network from config_parser.cisco_router_parser import cisco_router from utils.wildcard import wildcard_create_bit_repeat from utils.wildcard_utils import set_header_field from headerspace.hs import headerspace from ...
gpl-2.0
6,675,274,983,090,147,000
34.854545
78
0.711968
false
keiranFTW/android_kernel_sony_msm8660
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
-6,301,984,418,473,873,000
25.78125
89
0.592765
false
remh/dd-agent
transaction.py
22
7764
# stdlib from datetime import datetime, timedelta import logging from operator import attrgetter import sys import time # project from checks.check_status import ForwarderStatus from util import get_tornado_ioloop, plural log = logging.getLogger(__name__) FLUSH_LOGGING_PERIOD = 20 FLUSH_LOGGING_INITIAL = 5 class Tr...
bsd-3-clause
8,739,511,181,782,206,000
34.131222
123
0.570711
false
atosorigin/ansible
test/units/module_utils/common/parameters/test_check_arguments.py
11
2059
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # 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 import pytest from ansible.module_utils.common.parameters import get_unsuppo...
gpl-3.0
-1,232,834,871,734,089,000
30.676923
106
0.582807
false
kabuku/blender-python
blenderlib/bpy.props.py
1
10232
'''Property Definitions (bpy.props) This module defines properties to extend blenders internal data, the result of these functions is used to assign properties to classes registered with blender and can't be used directly. ''' def BoolProperty(name="", description="", default=False, options={'ANIMATABLE'...
mit
-3,745,827,375,671,624,000
50.471795
282
0.661943
false
kant/inasafe
safe/postprocessors/building_type_postprocessor.py
4
8986
# -*- coding: utf-8 -*- """**Postprocessors package.** """ __author__ = 'Marco Bernasocchi <marco@opengis.ch>' __revision__ = '$Format:%H$' __date__ = '10/10/2012' __license__ = "GPL" __copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' __copyright__ += 'Disaster Reduction' from collections import Ord...
gpl-3.0
2,637,087,067,071,337,500
36.756303
79
0.546294
false
Eivindbergman/Skrapa
libs/chardet/big5prober.py
291
1757
######################## 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
-3,854,750,538,754,702,000
36.382979
69
0.706887
false
titienmiami/mmc.repository
plugin.video.tvalacarta/servers/bitshare.py
1
1991
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para bitshare # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impo...
gpl-2.0
-6,686,012,041,411,494,000
32.166667
91
0.584422
false
QinerTech/QinerApps
openerp/tools/mail.py
1
31289
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import etree import cgi import logging import lxml.html import lxml.html.clean as clean import random import re import socket import threading import time from email.utils import getaddresses, formataddr impor...
gpl-3.0
392,269,764,883,536,450
42.276625
174
0.554029
false
a-parhom/edx-platform
common/lib/capa/capa/capa_problem.py
10
50215
# # File: capa/capa_problem.py # # Nomenclature: # # A capa Problem is a collection of text and capa Response questions. # Each Response may have one or more Input entry fields. # The capa problem may include a solution. # """ Main module which shows problems (of "capa" type). This is used by capa_module. """ impor...
agpl-3.0
1,741,531,692,781,358,600
41.918803
118
0.59072
false
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/Django-1.6.10/django/contrib/auth/tests/test_remote_user.py
47
8774
from datetime import datetime from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.backends import RemoteUserBackend from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase from django.ut...
apache-2.0
-8,954,293,098,419,403,000
39.62037
87
0.661728
false
sergey-shandar/autorest
src/generator/AutoRest.Python.Tests/AcceptanceTests/dictionary_tests.py
8
11966
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""),...
mit
33,616,641,839,558,130
43.147601
105
0.643263
false
Nate-Devv/Tuxemon
tuxemon/core/components/eztext.py
3
12040
#!/usr/bin/python # -*- coding: utf-8 -*- # # Tuxemon # Copyright (C) 2014, William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon. # # Tuxemon is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
gpl-3.0
2,814,659,116,262,268,000
63.79235
172
0.519934
false