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
jMyles/AutobahnPython
autobahn/autobahn/compress_base.py
46
1628
############################################################################### ## ## Copyright 2013 Tavendo GmbH ## ## 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-2.0
-766,146,608,706,190,100
25.258065
85
0.641892
false
dchabot/ophyd
ophyd/scaler.py
2
1571
import logging from collections import OrderedDict from .signal import (EpicsSignal, EpicsSignalRO) from .device import Device from .device import (Component as C, DynamicDeviceComponent as DDC) logger = logging.getLogger(__name__) def _scaler_fields(attr_base, field_base, range_, **kwargs): defn = OrderedDic...
bsd-3-clause
-2,332,188,351,999,642,000
32.425532
76
0.614258
false
rcaelers/workrave
testconf.py
9
1287
#!/usr/bin/python import os; import sys; options = [ "gconf", "xml", "gnome3", "indicator", "distribution", "gstreamer", "dbus", "exercises", "pulse", "debug", "x11-monitoring-fallback", ...
gpl-3.0
-8,903,832,059,823,954,000
28.25
109
0.414918
false
moyogo/robofab
Lib/robofab/pens/filterPen.py
9
12103
"""A couple of point pens to filter contours in various ways.""" from fontTools.pens.basePen import AbstractPen, BasePen from robofab.pens.pointPen import AbstractPointPen from robofab.objects.objectsRF import RGlyph as _RGlyph from robofab.objects.objectsBase import _interpolatePt import math # # threshold filter...
bsd-3-clause
-7,695,697,370,394,359,000
28.739558
101
0.694539
false
ennoborg/gramps
gramps/plugins/tool/verify.py
1
66904
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2010 Jakim Friant # Copyright (C) 2011 Paul Franklin # # This program is free software; you can redistribute it and/or modify # it under the terms o...
gpl-2.0
-1,206,760,673,677,807,400
36.376536
80
0.562433
false
mdpiper/dakota-experiments
experiments/beaver-creek-lsq/long_profile.py
1
8531
#! /usr/bin/env python from __future__ import print_function import argparse import re import numpy as np import matplotlib.pyplot as plt import seaborn as sns def str2num(s): try: return int(s) except ValueError: return float(s) class Dakota(object): FLOAT_REGEX = '[-+]?[0-9]*\.?[0-9]...
mit
3,942,523,469,388,174,000
30.021818
85
0.527254
false
jorgb/airs
gui/images/icon_visit_site.py
1
3226
#---------------------------------------------------------------------- # This file was generated by D:\src\cvl_repository\wxpython\framework\images\make_images.py # from wx import ImageFromStream, BitmapFromImage, EmptyIcon import cStringIO, zlib def getData(): return zlib.decompress( 'x\xda\x01\x98\x03...
gpl-2.0
-6,762,988,010,150,052,000
58.867925
91
0.690949
false
richpolis/siveinpy
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py
550
8977
# urllib3/poolmanager.py # Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import logging try: # Python 3 from urllib.parse import urljoin except ImportError: ...
mit
-6,391,389,123,238,609,000
33.794574
78
0.604768
false
ssssam/ansible-modules-core
utilities/logic/fail.py
86
1443
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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 Lice...
gpl-3.0
-7,897,864,494,623,237,000
31.795455
77
0.725572
false
GoteoFoundation/goteo-api
goteoapi/auth/decorators.py
1
6707
# -*- coding: utf-8 -*- # # Currently this module only handles an implicit oauth authentication. # # ---------------------------------------- # Access token authorization # ---------------------------------------- # # With Basic HTTP Auth: # # HTTP AUTH # User owner | ---user/password--> | /login # ...
agpl-3.0
6,212,715,172,002,157,000
34.486772
77
0.537349
false
jaggu303619/asylum-v2.0
openerp/addons/edi/models/edi.py
16
32166
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
-7,557,016,406,543,260,000
51.817734
138
0.558416
false
nck0405/MyOwn
modules/templates/NYC/controllers.py
8
27529
# -*- coding: utf-8 -*- from gluon import * from s3 import S3CustomController, S3DataTable, S3Method, s3_request THEME = "NYC" # ============================================================================= class index(S3CustomController): """ Custom Home Page """ def __call__(self): output = {} ...
mit
4,212,521,881,576,037,000
37.128809
110
0.40441
false
chen0510566/MissionPlanner
Lib/site-packages/numpy/oldnumeric/arrayfns.py
86
2532
"""Backward compatible with arrayfns from Numeric """ __all__ = ['array_set', 'construct3', 'digitize', 'error', 'find_mask', 'histogram', 'index_sort', 'interp', 'nz', 'reverse', 'span', 'to_corners', 'zmin_zmax'] import numpy as np from numpy import asarray class error(Exception): pass d...
gpl-3.0
2,580,985,010,984,200,700
25.103093
80
0.586098
false
WMD-group/effectivemasstheory
examples/pbs.py
2
6662
#! /usr/bin/env python """Calculate simple semiconductor properties from effective mass theory""" ################################################################################ # Aron Walsh 2014 # ##########################################################...
gpl-2.0
3,475,265,889,998,475,000
37.293103
118
0.590363
false
inveniosoftware/invenio-webhooks
tests/test_invenio_webhooks.py
2
2538
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
1,212,733,137,187,976,400
28.511628
76
0.682821
false
lscheinkman/nupic
tests/swarming/nupic/swarming/experiments/simpleV2/description.py
10
15403
# ---------------------------------------------------------------------- # 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
1,962,491,982,011,765,800
37.896465
118
0.589625
false
st135yle/django-site
dbenv/lib/python3.4/site-packages/psycopg2/extras.py
8
42565
"""Miscellaneous goodies for psycopg2 This module is a generic place used to hold little helper functions and classes until a better place in the distribution is found. """ # psycopg/extras.py - miscellaneous extra goodies for psycopg # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is f...
mit
-6,672,258,316,171,880,000
32.04736
85
0.598402
false
espadrine/opera
chromium/src/third_party/protobuf/python/google/protobuf/internal/wire_format.py
561
8431
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
3,566,976,627,402,225,700
30.458955
77
0.735619
false
awkspace/ansible
lib/ansible/modules/network/f5/_bigip_gtm_facts.py
21
32103
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
5,635,920,808,132,340,000
31.460061
101
0.581379
false
ljhljh235/AutoRest
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/ModelFlattening/setup.py
28
1139
# 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 ...
mit
7,041,516,067,195,888,000
27.475
76
0.630378
false
rvalyi/OpenUpgrade
addons/auth_openid/__openerp__.py
62
1630
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
-3,429,020,692,663,971,000
34.434783
78
0.570552
false
x303597316/hue
desktop/core/ext-py/Django-1.6.10/django/core/handlers/base.py
74
12481
from __future__ import unicode_literals import logging import sys import types from django import http from django.conf import settings from django.core import urlresolvers from django.core import signals from django.core.exceptions import MiddlewareNotUsed, PermissionDenied, SuspiciousOperation from django.db import...
apache-2.0
7,693,558,067,626,371,000
42.336806
157
0.601314
false
damilare/opencore
opencore/utilities/converters/tests.py
3
7994
# -*- coding: iso-8859-15 -*- # Copyright (C) 2008-2009 Open Society Institute # Thomas Moroz: tmoroz.org # 2010-2011 Large Blue # Fergus Doyle: fergus.doyle@largeblue.com # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU ...
gpl-2.0
4,051,086,977,107,726,300
37.248804
92
0.609582
false
Antiun/connector-magento
magentoerpconnect_order_comment/__openerp__.py
11
2018
# -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL Copyright 2014 Akretion # # 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 F...
agpl-3.0
-6,159,933,027,892,063,000
31.031746
78
0.602577
false
lwbrooke/slackbot
fangorn/records.py
1
3467
from .configuration import config from collections import namedtuple from datetime import datetime, timezone from os.path import expanduser import falcon import json import marshmallow class TinnitusRecorder: def __init__(self): self._schema = SlashCommandDataSchema(config['slack']['tinnitus_command']['to...
apache-2.0
-3,814,327,335,754,892,000
31.401869
129
0.579464
false
rizac/gfzreport
gfzreport/templates/network/__init__.py
2
8938
#!/usr/bin/env ptatioython # -*- coding: utf-8 -*- ''' Created on May 18, 2016 @author: riccardo ''' from __future__ import print_function import os import sys # @UnusedImport from gfzreport.templates.network.core.utils import relpath from gfzreport.templates.network.core import get_noise_pdfs_content, gen_title,\ ...
gpl-3.0
6,692,339,618,454,849,000
51.887574
103
0.618595
false
Gravecorp/Gap
packages/IronPython.StdLib.2.7.3/content/Lib/encodings/cp869.py
593
33221
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP869.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
mpl-2.0
-7,944,446,275,887,443,000
47.216255
97
0.602751
false
xinwu/horizon
openstack_dashboard/contrib/sahara/content/data_processing/jobs/tabs.py
25
1331
# 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 the...
apache-2.0
4,340,218,670,803,891,700
29.953488
74
0.693464
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/util/menu.py
1
6238
import math import os SPACER = None QUIT_OPTION = 'Done' INVALID_CHOICE = (-1) def clear_screen(): os.system(('cls' if (os.name == 'nt') else 'clear')) class Menu(object, ): def __init__(self, heading, choices, choice_heading, prompt): self.heading = heading self.choices = choices se...
unlicense
746,663,883,259,221,800
34.448864
109
0.53623
false
xme1226/sahara
sahara/db/api.py
4
10563
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-9,173,557,103,353,114,000
26.365285
78
0.706523
false
suyashphadtare/vestasi-erp-final
erpnext/support/doctype/newsletter/newsletter.py
31
4539
# 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 frappe import frappe.utils from frappe.utils import cstr from frappe import throw, _ from frappe.model.document import Document import erpnex...
agpl-3.0
2,642,428,066,050,211,000
30.964789
88
0.676801
false
theplaymate/ferra
scripts/tracing/draw_functrace.py
170
3543
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
5,023,817,713,963,962,000
26.253846
70
0.671465
false
erasche/jbrowse
tests/selenium_tests/volvox_biodb_121_test.py
3
1208
import os import unittest import re from volvox_biodb_test import AbstractVolvoxBiodbTest class VolvoxBiodbTest121 ( AbstractVolvoxBiodbTest, unittest.TestCase ): data_dir = 'tests/data/volvox_formatted_1_2_1/' def setUp( self ): # skip calling VolvoxBiodbTest's setUp, cause we are not # actu...
lgpl-2.1
5,617,675,731,196,397,000
29.2
112
0.645695
false
quinot/ansible
lib/ansible/modules/remote_management/oneview/oneview_enclosure_facts.py
84
6416
#!/usr/bin/python # Copyright: (c) 2016-2017, Hewlett Packard Enterprise Development LP # 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
7,914,791,844,218,112,000
30.297561
119
0.641521
false
ryfeus/lambda-packs
Tensorflow_OpenCV_Nightly/source/tensorflow/contrib/keras/api/keras/datasets/__init__.py
133
1271
# 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...
mit
8,588,092,963,587,422,000
41.366667
80
0.743509
false
runetvilum/skolevej
ogr2osm/langleyroad.py
2
5104
''' A translation function for Township of Langley Roads_shp.shp roads data. The shapefiles are availble under the PDDL as "Roads" from the Township of Langley at http://www.tol.ca/ServicesContact/OpenData/OpenDataCatalogue.aspx The following fields are dropped from the source shapefile: Field De...
gpl-3.0
-8,450,556,021,789,135,000
39.177419
144
0.575823
false
dvliman/jaikuengine
.google_appengine/lib/django-1.5/django/contrib/admin/validation.py
100
20755
from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.fields import FieldDoesNotExist from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model, _get_foreign_key) from django.contrib.admin import ListFilter, FieldListFilter from django.co...
apache-2.0
2,461,566,227,178,170,000
48.299287
146
0.565502
false
mrroach/CentralServer
csrv/model/cards/corp/__init__.py
1
1920
from card01054 import Card01054 from card01055 import Card01055 from card01056 import Card01056 from card01057 import Card01057 from card01058 import Card01058 from card01059 import Card01059 from card01060 import Card01060 from card01061 import Card01061 from card01062 import Card01062 from card01063 import Card01063 ...
apache-2.0
-2,330,546,964,876,484,000
31
31
0.875
false
CallaJun/hackprince
indico/PIL/OleFileIO.py
7
89128
#!/usr/bin/env python ## OleFileIO_PL: ## Module to read Microsoft OLE2 files (also called Structured Storage or ## Microsoft Compound Document File Format), such as Microsoft Office ## documents, Image Composer and FlashPix files, Outlook messages, ... ## This version is compatible with Python 2.6+ and 3.x ## version...
lgpl-3.0
1,485,993,895,485,705,000
41.706277
115
0.586011
false
cbeloni/pychronesapp
backend/venv/lib/python2.7/site-packages/babel/messages/extract.py
151
22695
# -*- coding: utf-8 -*- """ babel.messages.extract ~~~~~~~~~~~~~~~~~~~~~~ Basic infrastructure for extracting localizable messages from source files. This module defines an extensible system for collecting localizable message strings from a variety of sources. A native extractor for Python source ...
mit
2,604,205,903,722,988,000
39.382562
80
0.552809
false
JVillella/tensorflow
tensorflow/contrib/timeseries/python/timeseries/state_space_models/varma.py
25
8860
# 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
-3,996,256,190,948,553,000
43.974619
96
0.680474
false
grantsewell/nzbToMedia
libs/guessit/containers.py
6
28866
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # Copyright (c) 2013 Rémi Alvergnat <toilal.dev@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Le...
gpl-3.0
-1,434,712,650,080,846,600
36.438392
232
0.574363
false
embox/mybuild
tests/test_solver.py
2
8677
from __future__ import absolute_import, division, print_function from mybuild._compat import * import functools import unittest from mybuild.req import pgraph from mybuild.req.solver import (ComparableSolution, create_trunk, solve_trunk, ...
bsd-2-clause
-8,386,382,138,881,340,000
26.810897
79
0.523914
false
elijah513/scikit-learn
sklearn/decomposition/truncated_svd.py
199
7744
"""Truncated SVD for sparse matrices, aka latent semantic analysis (LSA). """ # Author: Lars Buitinck <L.J.Buitinck@uva.nl> # Olivier Grisel <olivier.grisel@ensta.org> # Michael Becker <mike@beckerfuffle.com> # License: 3-clause BSD. import numpy as np import scipy.sparse as sp try: from scipy.sp...
bsd-3-clause
-8,825,230,040,330,761,000
34.360731
79
0.61157
false
addition-it-solutions/project-all
addons/mrp/res_config.py
4
3430
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
1,636,224,531,846,279,200
58.137931
160
0.627405
false
RockySteveJobs/python-for-android
python3-alpha/python3-src/Lib/test/test_structmembers.py
88
4796
from _testcapi import _test_structmembersType, \ CHAR_MAX, CHAR_MIN, UCHAR_MAX, \ SHRT_MAX, SHRT_MIN, USHRT_MAX, \ INT_MAX, INT_MIN, UINT_MAX, \ LONG_MAX, LONG_MIN, ULONG_MAX, \ LLONG_MAX, LLONG_MIN, ULLONG_MAX, \ PY_SSIZE_T_MAX, PY_SSIZE_T_MIN import unittest from test import support ts=_test...
apache-2.0
7,683,997,897,871,764,000
32.075862
76
0.546289
false
RO-ny9/python-for-android
python3-alpha/python3-src/Lib/tkinter/tix.py
45
77690
# -*-mode: python; fill-column: 75; tab-width: 8 -*- # # $Id$ # # Tix.py -- Tix widget wrappers. # # For Tix, see http://tix.sourceforge.net # # - Sudhir Shenoy (sshenoy@gol.com), Dec. 1995. # based on an idea of Jean-Marc Lugrin (lugrin@ms.com) # # NOTE: In order to minimize changes to Tkinter.py, ...
apache-2.0
-7,327,938,110,221,691,000
38.557026
96
0.60399
false
sobomax/virtualbox_64bit_edd
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Table/TableDsc.py
11
4793
## @file # This file is used to create/update/query/erase table for dsc datas # # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The ...
gpl-2.0
-8,285,747,981,038,263,000
43.37963
164
0.541832
false
Acehaidrey/incubator-airflow
tests/sensors/test_filesystem.py
7
5534
# # 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
7,784,071,263,839,600,000
32.743902
94
0.576075
false
pkilambi/ceilometer
ceilometer/event/converter.py
2
16032
# # Copyright 2013 Rackspace Hosting. # # 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...
apache-2.0
-6,682,836,564,940,995,000
38.683168
79
0.589009
false
xzhou/AppDepriv
androguard/core/analysis/sign.py
38
13670
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # 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...
apache-2.0
1,723,652,788,698,679,000
35.356383
167
0.501609
false
lahwaacz/qutebrowser
tests/helpers/test_stubs.py
2
2854
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
-941,748,385,140,620,500
25.672897
74
0.69972
false
radicalbit/ambari
ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor_perf.py
1
3190
''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
apache-2.0
-7,178,578,283,383,612,000
48.076923
136
0.710658
false
gabisurita/kinto-codegen-tutorial
python-client/test/test_inline_response_200.py
1
2249
# coding: utf-8 """ kinto Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host. **Limitations of this OpenAPI specification:** 1. Validation on OR clauses is not supported (e.g. provide `data` or `permissions` in patch ...
mit
5,450,828,966,988,681,000
41.433962
938
0.7261
false
jlegendary/opencog
tests/python/blending_test/test_conceptual_blending_base.py
4
6851
__author__ = 'DongMin Kim' from opencog.atomspace import * # Only run the unit tests if the required dependencies have been installed # (see: https://github.com/opencog/opencog/issues/337) try: __import__("nose.tools") except ImportError: import unittest raise unittest.SkipTest( "ImportError exce...
agpl-3.0
-7,822,427,700,280,675,000
29.180617
80
0.542257
false
nerzhul/ansible
lib/ansible/module_utils/api.py
106
3560
# # (c) 2015 Brian Ccoa, <bcoca@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 later versio...
gpl-3.0
6,616,689,715,007,551,000
30.22807
77
0.596629
false
tboyce021/home-assistant
homeassistant/components/wink/lock.py
9
6584
"""Support for Wink locks.""" import pywink import voluptuous as vol from homeassistant.components.lock import LockEntity from homeassistant.const import ( ATTR_CODE, ATTR_ENTITY_ID, ATTR_MODE, ATTR_NAME, STATE_UNKNOWN, ) import homeassistant.helpers.config_validation as cv from . import DOMAIN, W...
apache-2.0
-16,422,712,306,343,072
30.203791
88
0.61695
false
NeuralEnsemble/neuroConstruct
lib/jython/Lib/test/test_userdict.py
23
13413
# Check every path through every method of UserDict import test.test_support, unittest from sets import Set import UserDict class TestMappingProtocol(unittest.TestCase): # This base class can be used to check that an object conforms to the # mapping protocol # Functions that can be useful to override to...
gpl-2.0
-1,743,451,719,246,921,000
31.165468
91
0.557221
false
philetus/geosolver
workbench/ui_prefViews.py
1
18004
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'prefviews.ui' # # Created: Mon Oct 15 21:18:35 2007 # by: PyQt4 UI code generator 4.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_viewsForm(object): def setupUi(self, viewsForm...
gpl-3.0
5,432,342,705,482,745,000
50.884726
176
0.718118
false
Kemanth/Implementation-of-MRED-in-NS3
src/dsdv/bindings/modulegen__gcc_ILP32.py
10
510679
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
-4,834,875,251,255,893,000
65.184422
934
0.609377
false
dmlc/tvm
python/tvm/relay/op/vision/_vision.py
3
3411
# 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
-2,221,354,944,132,380,000
33.11
96
0.723248
false
pspacek/freeipa
ipatests/test_xmlrpc/test_replace.py
3
4816
# Authors: # Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information # # 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...
gpl-3.0
791,413,149,044,286,800
29.871795
114
0.484842
false
lucywyman/slides-ii
v/lib/python2.7/site-packages/pygments/styles/fruity.py
135
1298
# -*- coding: utf-8 -*- """ pygments.styles.fruity ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "fruity" vim theme. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Token, Co...
apache-2.0
-4,075,972,096,886,137,000
29.904762
70
0.531587
false
caslei/TfModels
textsum/data_convert_example.py
26
2271
"""Example of Converting TextSum model data. Usage: python data_convert_example.py --command binary_to_text --in_file data/data --out_file data/text_data python data_convert_example.py --command text_to_binary --in_file data/text_data --out_file data/binary_data python data_convert_example.py --command binary_to_text -...
apache-2.0
-719,352,649,894,492,200
33.938462
109
0.660502
false
narry/odenos
src/main/python/org/o3project/odenos/core/component/network/packet/ofp_in_packet.py
6
2181
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
apache-2.0
2,643,722,846,823,208,400
45.404255
81
0.469968
false
miroi/xcint
doc/conf.py
4
7747
# -*- coding: utf-8 -*- # # XCint documentation build configuration file, created by # sphinx-quickstart on Thu Jun 12 14:59:50 2014. # # 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 c...
bsd-3-clause
5,585,930,720,847,672,000
31.012397
80
0.703111
false
thjashin/tensorflow
tensorflow/contrib/learn/python/learn/utils/input_fn_utils.py
69
4846
# 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,306,074,237,626,435,600
41.13913
80
0.674164
false
canavandl/bokeh
examples/plotting/file/hover.py
43
1384
from __future__ import division import itertools import numpy as np from six.moves import zip from collections import OrderedDict from bokeh.plotting import ColumnDataSource, figure, show, output_file from bokeh.models import HoverTool output_file("hover.html") TOOLS="crosshair,pan,wheel_zoom,box_zoom,reset,hover,...
bsd-3-clause
1,508,747,226,448,632,300
22.862069
85
0.632225
false
cholarajaa/cold-temperature
hotorcold/reactor/views.py
1
1489
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.http import HttpResponse from rest_framework import status from rest_framework.response import Response from rest_framework import viewsets from rest_framework.decorators import api_view from reactor.models ...
gpl-3.0
-2,595,010,665,826,944,000
32.840909
78
0.698455
false
pauljohnleonard/pod-world
CI_2015/demos/brains/feedforwardbrain.py
1
6562
# converted to java and then to python by p.j.leonard # based on C++ code found at # http://www.codeproject.com/KB/recipes/BP.aspx?msg=2809798#xx2809798xx import math import random import copy import pickle """ multilayer neural network """ def sigmoid(x): if x < -100.0: # avoid...
gpl-2.0
8,403,507,685,512,127,000
28.968037
129
0.463121
false
palas/otp
lib/asn1/test/asn1_SUITE_data/BitStr.py
97
1813
BitStr DEFINITIONS ::= BEGIN -- F.2.5.1 -- Use a bit string type to model binary data whose format and -- length are unspecified, -- or specified elsewhere, and whose length in bits is not necessarily -- a multiple of eight. -- EXAMPLE G3FacsimilePage ::= BIT STRING -- a sequence of bits conforming to...
apache-2.0
-3,417,482,573,939,526,000
30.375
87
0.704357
false
wilvk/ansible
lib/ansible/modules/monitoring/zabbix/zabbix_host.py
5
37010
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013-2014, Epic Games, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-704,725,997,703,109,200
41.984901
145
0.578925
false
nestukh/trash-cli
unit_tests/test_trashdir.py
2
2738
# Copyright (C) 2011 Andrea Francia Trivolzio(PV) Italy from nose.tools import assert_equals from trashcli.trash import TrashDir from trashcli.trash import TrashDirectory class TestTrashDir: def test_path(self): trash_dir = TrashDirectory('/Trash-501', '/') assert_equals('/Trash-501', trash_dir.pa...
gpl-2.0
8,719,766,106,194,389,000
34.558442
81
0.629291
false
yuanming-hu/taichi
tests/python/test_ndrange.py
1
4333
import numpy as np import taichi as ti @ti.all_archs def test_1d(): x = ti.field(ti.f32, shape=(16)) @ti.kernel def func(): for i in ti.ndrange((4, 10)): x[i] = i func() for i in range(16): if 4 <= i < 10: assert x[i] == i else: asser...
mit
-3,639,789,089,023,463,400
21.450777
80
0.42234
false
jkyeung/XlsxWriter
xlsxwriter/test/comparison/test_chart_display_units06.py
1
1414
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
1,757,005,087,203,241,000
25.185185
83
0.58133
false
KDE/kcm-userconfig
models.py
1
10076
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################# ## ## Copyright 2009 Yuriy Kozlov <yuriy-kozlov@kubuntu.org> ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## p...
gpl-2.0
3,204,330,691,849,716,700
33.389078
82
0.562029
false
decode-dev/shodan-python
shodan/client.py
3
15861
# -*- coding: utf-8 -*- """ shodan.client ~~~~~~~~~~~~~ This module implements the Shodan API. :copyright: (c) 2014-2015 by John Matherly """ import requests import simplejson import time import shodan.exception as exception import shodan.helpers as helpers import shodan.stream as stream # Tr...
mit
-4,015,538,678,440,050,000
33.722973
246
0.561818
false
CongSmile/tp-qemu
qemu/tests/smartcard_setup.py
9
2568
""" smartcard_setup.py - Used as a setup test for smartcard tests. Before doing a remote viewer connection there is some setup required for smartcard tests: On the client, certs that will be put into the smartcard will need to be generated. """ import logging from autotest.client.shared import error from virttest ...
gpl-2.0
3,586,737,180,119,185,000
31.1
76
0.627726
false
jbruestle/aggregate_btree
python/bar.py
1
1368
import stat_tree tree = stat_tree.StatsTree('/tmp/thetree') tree.write(0, ['foobar'], {'a': 0.1, 'c': 1, 'b': 1}) tree.write(1, ['foobar'], {'a': 0.1, 'c': 1, 'b': 2}) tree.write(2, ['foobar'], {'a': 0.1, 'c': 100, 'b': 3}) tree.write(3, ['foobar'], {'a': 0.1, 'c': 1, 'b': 4}) tree.write(0.0, ['tag1'], {'m1':500, 'm...
agpl-3.0
-543,176,109,180,893,000
41.75
74
0.535088
false
splunk/splunk-webframework
contrib/django/django/utils/dateparse.py
229
2817
"""Functions to parse datetime objects.""" # We're using regular expressions rather than time.strptime because: # - They provide both validation and parsing. # - They're more flexible for datetimes. # - The date/datetime/time constructors produce friendlier error messages. import datetime import re from django.utils ...
apache-2.0
-398,283,725,272,993,800
33.353659
78
0.609159
false
BaladiDogGames/baladidoggames.github.io
mingw/bin/lib/msilib/text.py
159
9313
import msilib,os;dirname=os.path.dirname(__file__) ActionText = [ (u'InstallValidate', u'Validating install', None), (u'InstallFiles', u'Copying new files', u'File: [1], Directory: [9], Size: [6]'), (u'InstallAdminPackage', u'Copying network install files', u'File: [1], Directory: [9], Size: [6]'), (u'FileCost', u'C...
mit
-5,718,759,318,391,018,000
71.193798
163
0.71921
false
RuudBurger/CouchPotatoServer
couchpotato/core/_base/clientscript.py
37
1500
import os from couchpotato.core.event import addEvent from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.environment import Env log = CPLog(__name__) autoload = 'ClientScript' class ClientScript(Plugin): ...
gpl-3.0
-4,422,893,595,471,080,400
25.315789
95
0.6
false
bencorbett90/Graph
graph/datastream.py
1
5964
import numpy as np from PyQt4 import QtCore, QtGui import h5py from utils import * class DataStream(): def __init__(self, path, dataPath): """Initializes a HDF5 DataStream. PATH is the path to the .hdf5 file, and DATAPATH is the path within the file to the specific dataset. """ ...
gpl-2.0
2,714,412,018,828,600,300
33.08
86
0.552482
false
ak2703/edx-platform
lms/djangoapps/commerce/tests/test_views.py
85
4208
""" Tests for commerce views. """ import json from uuid import uuid4 from nose.plugins.attrib import attr import ddt from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase import mock from student.tests.factories import UserFactory class UserMixin(object): ...
agpl-3.0
-730,665,209,480,212,700
41.938776
120
0.662548
false
mjtamlyn/django
tests/admin_ordering/tests.py
37
6637
from django.contrib import admin from django.contrib.admin.options import ModelAdmin from django.contrib.auth.models import User from django.test import RequestFactory, TestCase from .models import ( Band, DynOrderingBandAdmin, Song, SongInlineDefaultOrdering, SongInlineNewOrdering, ) class MockRequest: ...
bsd-3-clause
-842,037,574,053,567,200
36.497175
110
0.638391
false
c3pko/GovScrape
dynamic_scraper/spiders/checker_test.py
4
4107
from scrapy import log, signals from scrapy.exceptions import CloseSpider from scrapy.http import Request from scrapy.xlib.pydispatch import dispatcher from dynamic_scraper.spiders.django_base_spider import DjangoBaseSpider from dynamic_scraper.models import Scraper class CheckerTest(DjangoBaseSpider): name ...
bsd-3-clause
-8,436,947,136,817,394,000
41.791667
145
0.588264
false
zappyk-github/zappyk-python
src/src_zappyk/queryExecWebZI/setup.py
1
3114
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'zappyk' import os, sys from lib_zappyk import _setup from QueryExecWebZI.xlsX2splits_sheets import _project, _description, _version #CZ#project = 'QueryExecWebZI' #CZ#name = __import__(project).get_project() #CZ#description = __import__(project)...
gpl-2.0
537,706,865,728,179,260
30.14
79
0.514772
false
roboogle/gtkmvc3
gtkmvco/gtkmvc3/support/utils.py
1
5390
# Author: Roberto Cavada <roboogle@gmail.com> # # Copyright (C) 2007-2015 by Roberto Cavada # # gtkmvc3 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 2 of the License, or (at yo...
lgpl-2.1
4,519,275,363,316,341,000
35.174497
77
0.589054
false
firmlyjin/brython
www/gallery/sudoku.py
16
1493
# Boris Borcic 2006 # Quick and concise Python 2.5 sudoku solver # # Adapted for Brython by Pierre Quentel # load pre-computed tables import json data = json.loads(open('sudoku.json').read()) w2q = data['w2q'] q2w = data['q2w'] w2q2w = data['w2q2w'] class Completed(Exception) : pass def sudoku99(problem) : given...
bsd-3-clause
-9,059,244,082,900,557,000
28.86
105
0.557267
false
teriyakichild/ansible-modules-extras
cloud/cloudstack/cs_network.py
33
17539
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
2,045,262,663,436,802,800
28.774194
98
0.603125
false
alexgibson/bedrock
lib/fluent_migrations/firefox/new.py
6
12542
from __future__ import absolute_import import fluent.syntax.ast as FTL from fluent.migrate.helpers import transforms_from from fluent.migrate.helpers import VARIABLE_REFERENCE, TERM_REFERENCE from fluent.migrate import REPLACE, COPY trailhead = "firefox/new/trailhead.lang" def migrate(ctx): """Migrate bedrock/fir...
mpl-2.0
-30,394,558,929,232,560
45.731343
224
0.503114
false
sdague/home-assistant
homeassistant/components/aqualogic/sensor.py
9
3466
"""Support for AquaLogic sensors.""" import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_MONITORED_CONDITIONS, PERCENTAGE, POWER_WATT, TEMP_CELSIUS, TEMP_FAHRENHEIT, ) from homeassistant.core import callback import homeassista...
apache-2.0
-7,143,763,547,252,820,000
29.946429
86
0.639354
false
turon/openthread
tests/scripts/thread-cert/test_coaps.py
1
3715
#!/usr/bin/env python # # Copyright (c) 2018, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
bsd-3-clause
-3,723,091,081,261,567,500
38.105263
78
0.685868
false
Joshuaalbert/IonoTomo
src/ionotomo/tomography/model.py
1
2831
import tensorflow as tf import numpy as np from ionotomo.settings import TFSettings from ionotomo import * from ionotomo.ionosphere.iri import a_priori_model import astropy.coordinates as ac import astropy.units as au import astropy.time as at def calc_rays_and_initial_model(antennas,directions,times,zmax=1000.,res_n...
apache-2.0
-8,423,156,270,954,309,000
49.553571
128
0.630872
false
DiCarloLab-Delft/PycQED_py3
pycqed/instrument_drivers/physical_instruments/SCPIBase.py
1
7440
""" File: SCPIBase.py Author: Wouter Vlothuizen, TNO/QuTech Purpose: self contained base class for SCPI ('Standard Commands for Programmable Instruments') commands, with selectable transport Usage: don't use directly, use a derived class (e.g. Qutech_CC) Notes: ...
mit
-2,040,579,547,664,667,400
32.628959
137
0.594187
false
zbsz/micro-protobuf
python/google/protobuf/message.py
43
9283
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
5,035,086,795,164,039,000
35.547244
79
0.730152
false
laiqiqi886/kbengine
kbe/src/lib/python/Tools/scripts/patchcheck.py
36
5829
#!/usr/bin/env python3 import re import sys import shutil import os.path import subprocess import sysconfig import reindent import untabify SRCDIR = sysconfig.get_config_var('srcdir') def n_files_str(count): """Return 'N file(s)' with the proper plurality on 'file'.""" return "{} file{}".format(count, "s" ...
lgpl-3.0
8,688,180,622,422,530,000
30.852459
78
0.611769
false
pratikmallya/hue
desktop/core/ext-py/Babel-0.9.6/babel/messages/frontend.py
67
51292
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. ...
apache-2.0
7,283,750,700,929,195,000
40.460265
89
0.513043
false
ronny3050/MobileNet
retrain.py
1
56996
# 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...
mit
8,927,775,730,241,449,000
39.857348
112
0.663854
false
LANGFAN/APM
libraries/AP_InertialSensor/examples/coning.py
241
10508
#!/usr/bin/python from math import * from pymavlink.rotmat import Vector3, Matrix3 from numpy import linspace from visual import * class Quat: def __init__(self,w=1.0,x=0.0,y=0.0,z=0.0): self.w = w self.x = x self.y = y self.z = z def to_euler(self): roll = (atan2(2.0*...
gpl-3.0
3,157,157,247,998,838,000
30.461078
141
0.576894
false