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
mcsosa121/cafa
cafaenv/lib/python2.7/site-packages/django/contrib/admin/widgets.py
345
14769
""" Form Widget classes specific to the Django admin site. """ from __future__ import unicode_literals import copy from django import forms from django.contrib.admin.templatetags.admin_static import static from django.core.urlresolvers import reverse from django.db.models.deletion import CASCADE from django.forms.uti...
mit
-289,937,274,514,064,200
36.772379
105
0.604442
false
AnsgarSchmidt/sensomatic
server/Chromecast.py
1
6445
import os import sys import pafy import time import Queue import logging import threading import ConfigParser import pychromecast import paho.mqtt.client as mqtt class Chromecast(threading.Thread): def _readConfig(self): update = False if not os.path.isdir(self._homeDir): print ...
apache-2.0
-2,742,828,524,497,194,000
35.412429
117
0.504112
false
lattwood/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/read_checksum_from_png.py
207
1877
# Copyright (c) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
-8,800,238,285,847,755,000
47.128205
72
0.761321
false
dklann/rivendell
apis/pypad/scripts/pypad_live365.py
2
2842
#!%PYTHON_BANGPATH% # pypad_live365.py # # Write PAD updates to Live365 stations # # (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Fr...
gpl-2.0
-5,344,064,998,090,861,000
38.472222
202
0.672414
false
aungmyo/iso8583py
ISO8583/ISO8583.py
6
50397
""" (C) Copyright 2009 Igor V. Custodio This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that ...
gpl-3.0
-3,592,548,285,869,355,500
40.032527
187
0.534893
false
superchilli/webapp
venv/lib/python2.7/site-packages/setuptools/ssl_support.py
104
8220
import os import socket import atexit import re import functools from setuptools.extern.six.moves import urllib, http_client, map, filter from pkg_resources import ResolutionError, ExtractionError try: import ssl except ImportError: ssl = None __all__ = [ 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_a...
mit
3,345,719,740,955,882,500
31.235294
82
0.597567
false
wonder-sk/QGIS
python/plugins/processing/gui/GeometryPredicateSelectionPanel.py
5
4757
# -*- coding: utf-8 -*- """ *************************************************************************** PredicatePanel.py --------------------- Date : January 2015 Copyright : (C) 2015 by Arnaud Morvan Email : arnaud dot morvan at camptocamp dot com Con...
gpl-2.0
6,895,619,115,096,405,000
37.674797
77
0.577044
false
xin3liang/platform_external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/style/filereader_unittest.py
51
6710
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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 # notice, this list of conditions and...
bsd-3-clause
-3,069,485,598,192,042,000
42.290323
108
0.672876
false
sebgoa/client-python
kubernetes/client/models/v1alpha1_policy_rule.py
2
8145
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
1,410,812,381,560,535,800
35.524664
552
0.615838
false
sysadmin75/ansible
test/units/module_utils/common/test_dict_transformations.py
78
4363
# -*- coding: utf-8 -*- # (c) 2017, Will Thames <will.thames@xvt.com.au> # # 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 y...
gpl-3.0
-4,988,993,447,885,094,000
36.612069
131
0.638093
false
xanv/painindex
painindex_app/views.py
1
1646
import random from django.shortcuts import get_object_or_404, render from django.views.generic.edit import CreateView from django.core.urlresolvers import reverse_lazy from painindex_app.models import PainSource from painindex_app.forms import PainReportForm from django.http import HttpResponse def homepage(request):...
mit
-4,861,295,582,622,492,000
38.214286
94
0.72175
false
grbd/GBD.Embedded.CMake4Mbed
bin/tools/LPCLink1/upload.py
1
1174
#!python3 """ Script Wrapper for uploading firmware to LPC Expresso boards via LPCLink-1 """ import sys, logging, argparse from lpc_settings import LPCSettings from pylib.logwrapper import LogWrapper from pylib.process import Process from os.path import abspath, dirname, join try: # Setup logging LogWrapper...
apache-2.0
-2,058,515,021,008,512,000
19.561404
122
0.672355
false
hbhzwj/imalse
tools/ns-allinone-3.14.1/ns-3.14.1/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py
11
10238
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,shutil,traceback,errno,sys,stat from waflib import Utils,Configure,Logs,Options,ConfigSet,Context,Errors,Build,Node build_dir_override=None no_climb_commands=['confi...
gpl-3.0
6,496,410,394,792,291,000
26.896458
160
0.680602
false
ganeshnalawade/ansible-modules-core
network/nxos/nxos_bgp.py
8
37282
#!/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
-6,927,397,311,194,130,000
35.986111
153
0.579851
false
famulus/aubio
python.old/aubio/task/notes.py
13
4192
from aubio.task import task from aubio.aubioclass import * class tasknotes(task): def __init__(self,input,output=None,params=None): task.__init__(self,input,params=params) self.opick = onsetpick(self.params.bufsize, self.params.hopsize, self.channels, self.myvec, self.params.threshold, mode=self.p...
gpl-3.0
-4,630,648,995,086,963,000
25.36478
73
0.643845
false
theheros/kbengine
kbe/res/scripts/common/Lib/importlib/test/builtin/test_loader.py
3
3295
import importlib from importlib import machinery from .. import abc from .. import util from . import util as builtin_util import sys import types import unittest class LoaderTests(abc.LoaderTests): """Test load_module() for built-in modules.""" verification = {'__name__': 'errno', '__packag...
lgpl-3.0
9,135,244,934,120,568,000
30.303922
79
0.618209
false
ronekko/chainer
chainer/utils/__init__.py
2
1537
import contextlib import shutil import tempfile import numpy # import classes and functions from chainer.utils.array import sum_to # NOQA from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental # NOQA from ...
mit
-8,352,859,726,091,759,000
28.557692
79
0.683149
false
dharmabumstead/ansible
lib/ansible/modules/utilities/logic/import_role.py
2
2570
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: 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 ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': [...
gpl-3.0
-5,240,738,264,196,468,000
26.340426
118
0.652529
false
bbiskup/cpp_benchmarks
vendor/google/googletest/googletest/scripts/upload.py
24
52037
#!/usr/bin/env python # # Copyright 2007, 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...
mit
-8,161,537,520,510,285,000
36.116262
109
0.623287
false
GNOME/orca
test/keystrokes/oowriter/ui_role_combo_box.py
1
2256
#!/usr/bin/python """Test of Orca's presentation of a combo box.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(PauseAction(3000)) sequence.append(TypeAction("This is a test.")) sequence.append(KeyComboAction("Left")) sequence.append(KeyComboAction("<Control><Shift>Left")...
lgpl-2.1
-2,554,693,782,248,598,500
37.237288
138
0.742908
false
mayragomez/Chapter05_Tigram
plugins/ti.alloy/plugin.py
1729
5251
import os, sys, subprocess, hashlib import subprocess def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Python 2.6....
apache-2.0
4,331,266,186,733,491,000
41.691057
147
0.476862
false
arnaud-morvan/QGIS
python/plugins/processing/gui/matrixmodelerwidget.py
11
5263
# -*- coding: utf-8 -*- """ *************************************************************************** MatrixModelerWidget.py --------------------- Date : May 2018 Copyright : (C) 2018 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********...
gpl-2.0
3,554,258,830,917,110,000
36.06338
109
0.601938
false
stephen144/odoo
openerp/addons/base/ir/ir_values.py
8
25408
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import tools from openerp.osv import osv, fields from openerp.exceptions import AccessError, MissingError from openerp.tools.translate import _ from openerp.tools import pickle EXCLUDED_FIELDS = set(( '...
agpl-3.0
-1,517,788,412,815,742,000
50.853061
137
0.557659
false
SimVascular/VTK
Filters/Hybrid/Testing/Python/TestPCA.py
20
8348
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # This example shows how to visualise the variation in shape in a set of objects using # vtkPCAAnalysisFilter. # # We make three ellipsoids by distorting and translating a sphere and ...
bsd-3-clause
-3,546,683,433,607,851,500
35.938053
100
0.727
false
d40223223/608
static/Brython3.1.1-20150328-091302/Lib/formatter.py
751
14930
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor an...
gpl-3.0
1,993,670,750,629,682,000
32.550562
77
0.574213
false
Aimage/shinken
test/test_freshness.py
18
3293
#!/usr/bin/env python # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken 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
-642,349,712,366,915,600
39.654321
115
0.639842
false
TheImagingSource/tiscamera
doc/sphinx-tabs/sphinx_tabs/test/testcase.py
1
5094
# pylint: disable=import-error,no-name-in-module from distutils.version import StrictVersion import unittest import re import os import pkg_resources from sphinx import __version__ as __sphinx_version__ from sphinx.builders.html import StandaloneHTMLBuilder from lxml import etree try: from StringIO import StringIO...
apache-2.0
-3,972,731,438,923,564,000
34.131034
73
0.605614
false
talumbau/blaze
samples/ooc-groupby.py
4
8446
""" This script performs an out of core groupby operation for different datasets. The datasets to be processed are normally in CSV files and the key and value to be used for the grouping are defined programatically via small functions (see toy_stream() and statsmodel_stream() for examples). Those datasets included in...
bsd-3-clause
1,484,661,787,544,520,400
32.784
82
0.621004
false
vlukes/sfepy
tests/test_poly_spaces.py
1
11051
""" Test continuity of polynomial basis and its gradients along an edge on :math:`y` line (2D) or on a face in :math:`x`-:math:`y` plane (3D) between two elements aligned with the coordinate system, stack one on top of the other. The evaluation occurs in several points shifted by a very small amount from the boundary b...
bsd-3-clause
8,535,092,990,415,452,000
36.208754
79
0.485024
false
jurassic-c/Pynterface
Pynterface/grid.py
1
2463
class grid: w = 0 h = 0 grid = None def __init__(self): rows = grid_array() rows.onAdd = self._add_width cols = grid_array() cols.onAdd = self._add_height self.grid = rows self.grid.append(cols) def __getitem__(self, x): return self.grid[x] def __setitem__(self, x, value): self.grid[x] = value ...
bsd-3-clause
-5,554,907,739,047,441,000
18.712
73
0.589119
false
steedos/odoo
addons/purchase/report/purchase_report.py
137
7689
# -*- 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,974,978,140,705,717,000
53.147887
163
0.5344
false
eonpatapon/rally
rally/common/objects/task.py
2
19210
# Copyright 2013: Mirantis 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 b...
apache-2.0
8,770,160,190,723,299,000
36.814961
79
0.427642
false
shubhdev/edx-platform
common/djangoapps/track/shim.py
71
6434
"""Map new event context values to old top-level field values. Ensures events can be parsed by legacy parsers.""" import json import logging from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import UsageKey log = logging.getLogger(__name__) CONTEXT_FIELDS_TO_INCLUDE = [ 'username', 'session...
agpl-3.0
-3,451,045,645,332,800,000
34.15847
118
0.580665
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.5.9/Python-3.5.9/Lib/plat-sunos5/CDIO.py
191
1872
# Generated by h2py from /usr/include/sys/cdio.h CDROM_LBA = 0x01 CDROM_MSF = 0x02 CDROM_DATA_TRACK = 0x04 CDROM_LEADOUT = 0xAA CDROM_AUDIO_INVALID = 0x00 CDROM_AUDIO_PLAY = 0x11 CDROM_AUDIO_PAUSED = 0x12 CDROM_AUDIO_COMPLETED = 0x13 CDROM_AUDIO_ERROR = 0x14 CDROM_AUDIO_NO_STATUS = 0x15 CDROM_DA_NO_SUBCODE = 0x00 CDROM...
apache-2.0
8,759,125,590,722,919,000
24.643836
48
0.746795
false
Nihn/Diamond-1
src/diamond/utils/scheduler.py
13
3655
# coding=utf-8 import time import math import multiprocessing import os import random import sys import signal try: from setproctitle import getproctitle, setproctitle except ImportError: setproctitle = None from diamond.utils.signals import signal_to_exception from diamond.utils.signals import SIGALRMExcept...
mit
2,758,102,708,496,036,000
30.239316
79
0.63119
false
onitake/ansible
lib/ansible/modules/cloud/azure/azure_rm_aks_facts.py
37
3911
#!/usr/bin/python # # Copyright (c) 2018 Yuwei Zhou, <yuwzho@microsoft.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
-1,204,300,653,085,398,000
23.291925
93
0.601636
false
nju520/django
django/conf/locale/it/formats.py
504
2079
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' # 25 Ottobre 2006 TIME_FO...
bsd-3-clause
8,403,339,704,444,455,000
42.270833
77
0.502648
false
drawks/ansible
test/units/modules/network/slxos/test_slxos_lldp.py
38
3087
# # (c) 2018 Extreme Networks 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. # # Ans...
gpl-3.0
-5,790,417,363,404,388,000
31.494737
75
0.610625
false
apurvbhartia/gnuradio-routing
gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/doxyindex.py
19
6638
# # Copyright 2010 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
-4,469,162,914,909,103,600
27.008439
92
0.631666
false
rajul/tvb-library
tvb/datatypes/region_mapping_framework.py
1
4261
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
gpl-2.0
5,406,132,247,589,643,000
37.396396
113
0.685755
false
danielpalomino/gem5
src/arch/x86/isa/insts/general_purpose/data_transfer/move.py
44
9098
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
bsd-3-clause
520,694,776,469,366,000
23.132626
72
0.659376
false
shingonoide/odoo
addons/survey/survey.py
36
58953
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and / or modify # it under the ter...
agpl-3.0
-8,569,363,682,851,703,000
46.466184
184
0.562838
false
pcodes/mhn_interface
mhn_api/stats.py
1
1127
import requests from django.conf import settings def get_request(params): if settings.DEBUG: api_key = {'api_key': settings.MHN_DEV_KEY} else: api_key = {'api_key': settings.MHN_API_KEY} base_url = settings.MHN_URL if not params: request = api_key else: request = {...
mit
-1,567,096,663,958,261,000
23.5
66
0.637977
false
reidwooten99/botbot-web
botbot/apps/accounts/forms.py
2
1038
from django import forms from . import models class AccountForm(forms.ModelForm): class Meta: model = models.User exclude = ('first_name', 'last_name', 'password', 'is_staff', 'is_active', 'is_superuser', 'last_login', 'date_joined', 'groups', 'user_permissi...
mit
-1,861,307,075,970,532,900
34.793103
80
0.573218
false
abhinavp13/IITBX-edx-platform-dev
common/djangoapps/student/tests/test_email.py
14
11282
import json import django.db from student.tests.factories import UserFactory, RegistrationFactory, PendingEmailChangeFactory from student.views import reactivation_email_for_user, change_email_request, confirm_email_change from student.models import UserProfile, PendingEmailChange from django.contrib.auth.models impor...
agpl-3.0
2,796,403,994,389,115,000
40.175182
124
0.673905
false
pymedusa/SickRage
ext/boto/s3/key.py
5
83034
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the...
gpl-3.0
-5,227,606,604,879,772,000
41.956027
89
0.580136
false
loriab/qcdb
data/sapt_HBC1.py
2
28020
DATA = {} #DATA['SAPT MODELCHEM'] = 'SAPT3FC-SA-atz' DATA['SAPT MODELCHEM'] = 'SAPT3FC-CP-atz' # LAB 2017 for consistency with saptone mc labels DATA['SAPT ELST ENERGY'] = {} DATA['SAPT ELST ENERGY']['HBC1-FaOOFaOO-3.4'] = -64.1477 DATA['SAPT ELST ENERGY']['HBC1-FaOOFaOO-3.5'] = -54.7215 DATA['SAPT ELST ENERGY'][...
lgpl-3.0
-6,363,534,931,982,228,000
57.375
92
0.633976
false
cloudfoundry/php-buildpack-legacy
builds/runtimes/python-2.7.6/lib/python2.7/test/test_complex_args.py
136
3507
import unittest from test import test_support import textwrap class ComplexArgsTestCase(unittest.TestCase): def check(self, func, expected, *args): self.assertEqual(func(*args), expected) # These functions are tested below as lambdas too. If you add a # function test, also add a similar lambda ...
mit
8,366,292,857,915,607,000
28.720339
75
0.457371
false
wilsonxiao/machinekit
lib/python/popupkeyboard.py
13
10233
#!/usr/bin/env python #------------------------------------------------------------------------------ # Copyright: 2013 # Author: Dewey Garrett <dgarrett@panix.com> # # 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 F...
gpl-3.0
5,839,902,503,262,441,000
32.55082
79
0.546565
false
nsfmc/pygments
scripts/check_sources.py
6
7467
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Checker for file headers ~~~~~~~~~~~~~~~~~~~~~~~~ Make sure each Python file has a correct file header including copyright and license information. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE fo...
bsd-2-clause
600,573,782,592,376,000
29.855372
77
0.492969
false
stormi/tsunami
src/secondaires/navigation/commandes/pavillon/montrer.py
1
3737
# -*-coding:Utf-8 -* # Copyright (c) 2014 LE GOFF Vincent # 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 # rai...
bsd-3-clause
5,690,620,867,056,685,000
43.309524
79
0.666308
false
adobecs5/urp2015
lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py
375
5760
from collections import namedtuple from ..exceptions import LocationParseError url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'] class Url(namedtuple('Url', url_attrs)): """ Datastructure for representing an HTTP URL. Used as a return value for :func:`parse_url`. """ s...
apache-2.0
-3,002,193,206,718,222,300
26.169811
86
0.538194
false
snakeleon/YouCompleteMe-x86
third_party/ycmd/third_party/JediHTTP/vendor/jedi/test/test_speed.py
24
1870
""" Speed tests of Jedi. To prove that certain things don't take longer than they should. """ import time import functools from .helpers import TestCase, cwd_at import jedi class TestSpeed(TestCase): def _check_speed(time_per_run, number=4, run_warm=True): """ Speed checks should typically be very tolera...
gpl-3.0
-9,094,616,104,802,528,000
34.283019
84
0.597861
false
chetan/ansible
lib/ansible/module_utils/ec2.py
19
7219
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
465,084,310,774,944,800
36.994737
100
0.648428
false
Benster900/mhn
server/mhn/api/models.py
12
8796
import string from random import choice from datetime import datetime from sqlalchemy import UniqueConstraint, func from mhn import db from mhn.api import APIModel from mhn.auth.models import User from mhn.common.clio import Clio class Sensor(db.Model, APIModel): # Defines some properties on the fields: # ...
lgpl-2.1
1,394,689,924,598,664,700
32.96139
80
0.573101
false
lfairchild/PmagPy
dialogs/grid_frame2.py
2
48571
""" GridFrame -- subclass of wx.Frame. Contains grid and buttons to manipulate it. GridBuilder -- data methods for GridFrame (add data to frame, save it, etc.) """ #import pdb import wx from . import drop_down_menus2 as drop_down_menus from . import pmag_widgets as pw from . import magic_grid2 as magic_grid from pmagp...
bsd-3-clause
3,387,519,270,409,559,000
46.712181
485
0.546314
false
cyanna/edx-platform
lms/djangoapps/class_dashboard/tests/test_dashboard_data.py
13
13192
""" Tests for class dashboard (Metrics tab in instructor dashboard) """ import json from django.core.urlresolvers import reverse from django.test.client import RequestFactory from mock import patch from capa.tests.response_xml_factory import StringResponseXMLFactory from courseware.tests.factories import StudentModu...
agpl-3.0
-3,457,612,067,813,124,600
40.484277
141
0.617344
false
40223119/2015w13-1
static/Brython3.1.3-20150514-095342/Lib/fractions.py
722
23203
# Originally contributed by Sjoerd Mullender. # Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>. """Fraction, infinite-precision, real numbers.""" from decimal import Decimal import math import numbers import operator import re import sys __all__ = ['Fraction', 'gcd'] def gcd(a, b): """Calcu...
gpl-3.0
5,410,290,453,816,333,000
35.830159
81
0.536956
false
sgallagher/anaconda
pyanaconda/core/constants.py
1
15488
# # constants.py: anaconda constants # # Copyright (C) 2001 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your ...
gpl-2.0
5,043,724,416,630,659,000
30.672802
168
0.735408
false
drnextgis/QGIS
python/plugins/processing/algs/taudem/dinftranslimaccum2.py
5
5539
# -*- coding: utf-8 -*- """ *************************************************************************** dinftranslimaccum2.py --------------------- Date : October 2012 Copyright : (C) 2012 by Alexander Bruy Email : alexander dot bruy at gmail dot com ******...
gpl-2.0
1,106,286,502,480,047,900
42.614173
101
0.593067
false
hmen89/odoo
openerp/addons/base/module/wizard/base_module_configuration.py
447
2274
# -*- 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
1,595,395,310,813,440,500
41.90566
93
0.566403
false
dhanunjaya/neutron
neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_phys.py
19
2828
# Copyright (C) 2014,2015 VA Linux Systems Japan K.K. # Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp> # 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 t...
apache-2.0
-6,272,813,429,753,597,000
41.208955
78
0.658769
false
wakashige/bazel
third_party/py/gflags/gflags_validators.py
488
6977
#!/usr/bin/env python # Copyright (c) 2010, 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 l...
apache-2.0
-780,311,137,269,644,300
36.31016
80
0.717214
false
3dfxsoftware/cbss-addons
TODO-7.0/rent/wizard/__init__.py
4
1149
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
gpl-2.0
8,586,734,705,867,777,000
43.192308
78
0.625762
false
mistercrunch/panoramix
superset/sql_parse.py
2
12236
# 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
5,100,324,801,963,068,000
34.466667
88
0.607715
false
eceglov/phantomjs
src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py
118
9310
# udis86 - scripts/ud_opcode.py # # Copyright (c) 2009 Vivek Thampi # 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 not...
bsd-3-clause
6,608,667,989,198,803,000
38.617021
92
0.5116
false
lqdc/pyew
vstruct/defs/rar.py
18
1851
import vstruct from vstruct.primitives import * HEAD_TYPE_MARKER = 0x72 #marker block HEAD_TYPE_ARCHIVE = 0x73 #archive header HEAD_TYPE_FILE_HDR = 0x74 #file header HEAD_TYPE_OLD_COMMENT = 0x75 #old style comment header HEAD_TYPE_OLD_AUTH = 0x76 #o...
gpl-2.0
1,196,307,651,309,374,000
30.913793
75
0.563479
false
Philippe12/external_chromium_org
build/util/lib/common/unittest_util.py
138
4879
# 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. """Utilities for dealing with the python unittest module.""" import fnmatch import sys import unittest class _TextTestResult(unittest._TextTestResult): ...
bsd-3-clause
919,054,958,707,597,700
31.311258
80
0.676778
false
chatcannon/numpy
tools/test-installed-numpy.py
106
2385
#!/usr/bin/env python from __future__ import division, absolute_import, print_function # A simple script to test the installed version of numpy by calling # 'numpy.test()'. Key features: # -- convenient command-line syntax # -- sets exit status appropriately, useful for automated test environments # It would be b...
bsd-3-clause
-7,005,186,474,165,323,000
40.12069
83
0.641929
false
felixbuenemann/sentry
src/sentry/migrations/0176_auto__add_field_organizationmember_counter__add_unique_organizationmem.py
34
37043
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'OrganizationMember.counter' db.add_column('sentry_organiz...
bsd-3-clause
-1,925,319,230,407,451,400
86.990499
223
0.574575
false
MarishaYasko/interactive-stories-stands
InteractiveStands/Lib/encodings/iso8859_4.py
272
13376
""" Python Character Mapping Codec iso8859_4 generated from 'MAPPINGS/ISO8859/8859-4.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_table) def decode(self,input,errors='...
mit
5,786,654,797,660,300,000
42.570033
107
0.527288
false
Geoion/AutobahnPython
examples/twisted/wamp/test_newapi3.py
8
1593
from twisted.internet.task import react from twisted.internet.defer import inlineCallbacks as coroutine from autobahn.twisted.connection import Connection def main(reactor, connection): @coroutine def on_join(session, details): print("on_join: {}".format(details)) try: print(sessi...
mit
1,319,316,661,898,317,000
24.693548
63
0.502825
false
mjmottram/echidna
echidna/calc/decay.py
1
24391
""" Double beta decay utility converter Provides a useful tool for converting between different double beta dacay parameters. """ import numpy from echidna.calc import constants as const import echidna.test.physics_tests as physics_tests class DBIsotope(object): """ Class which calculates expected counts for a...
mit
-7,840,562,604,556,354,000
40.270728
79
0.608298
false
bmotlaghFLT/FLT_PhantomJS
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py
118
5561
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
3,430,661,511,680,019,500
37.351724
116
0.639453
false
richardcs/ansible
lib/ansible/modules/network/fortimanager/fmgr_device.py
7
9564
#!/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
6,154,863,902,149,134,000
31.641638
119
0.620661
false
illicitonion/givabit
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_0_96/django/core/cache/backends/db.py
33
3522
"Database cache backend." from django.core.cache.backends.base import BaseCache from django.db import connection, transaction, DatabaseError import base64, time from datetime import datetime try: import cPickle as pickle except ImportError: import pickle class CacheClass(BaseCache): def __init__(self, tab...
apache-2.0
4,704,807,404,130,249,000
41.95122
140
0.593413
false
NejcZupec/ggrc-core
test/integration/ggrc_workflows/converters/test_workflow_export_csv.py
1
11972
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for workflow object exports.""" from os.path import abspath, dirname, join from flask.json import dumps from ggrc.app import app from ggrc_workflows.models import Workflow from integration.ggrc im...
apache-2.0
-5,409,014,967,524,844,000
31.532609
105
0.498998
false
michaelbuehlmann/CatAna
setup.py
1
3178
import os import re import sys import subprocess import platform import versioneer from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion class CMakeExtension(Extension): def __init__(self, name, sourcedir=''): Extension.__ini...
gpl-2.0
816,685,248,942,817,400
35.965116
133
0.614852
false
mandeepdhami/neutron
neutron/tests/unit/db/test_db_base_plugin_v2.py
1
279583
# Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
2,024,602,076,515,273,000
48.952296
79
0.498889
false
rgarcia-herrera/bici-tren
abm/flock_sim.py
1
3274
from time import sleep # from datetime import datetime import bike_agent as model from router import refine, Router import argparse import random parser = argparse.ArgumentParser(description='grab adscriptions from medline') parser.add_argument('--init', type=int, default=50, help="set to 0 to resu...
gpl-3.0
-7,662,580,180,257,736,000
29.886792
78
0.50336
false
ClearCorp-dev/odoo-clearcorp
TODO-7.0/product_cost_group/__openerp__.py
4
1780
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
agpl-3.0
4,125,528,385,182,812,000
33.901961
79
0.561798
false
jtyr/ansible
test/lib/ansible_test/_internal/ci/shippable.py
25
10040
"""Support code for working with Shippable.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import re import time from .. import types as t from ..config import ( CommonConfig, TestConfig, ) from ..git import ( Git, ) from ..http import ( HttpCli...
gpl-3.0
-5,102,911,793,507,095,000
36.32342
133
0.601693
false
rafaeltomesouza/frontend-class1
aula2/a15/linkedin/client/.gradle/yarn/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
1366
120842
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
mit
1,906,428,355,258,426,000
40.285275
80
0.653721
false
intermezzo-fr/hillary-clinton-emails
scripts/outputCsvs.py
5
3577
import numpy as np import pandas as pd def normalize_address(raw_address): for c in ["'", ",", "°", "•", "`", '"', "‘", "-"]: raw_address = raw_address.replace(c, "") raw_address = raw_address.lower() if "<" in raw_address: prefix = raw_address[:raw_address.index("<")].strip() if ...
mit
-1,115,130,354,492,080,400
43.6625
119
0.639138
false
magacoin/magacoin
contrib/devtools/optimize-pngs.py
51
3392
#!/usr/bin/env python # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script every time you change one of the png files. Using pngcrush, it will optimize the png fi...
mit
-6,995,588,937,856,915,000
42.487179
193
0.618219
false
gppezzi/easybuild-framework
easybuild/toolchains/linalg/blis.py
2
1479
## # Copyright 2013-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
116,938,786,233,554,610
32.613636
96
0.73428
false
lizardsystem/lizard-workspace
lizard_workspace/migrations/0019_auto__add_field_wmsserver_js_popup_class.py
1
18569
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'WmsServer.js_popup_class' db.add_column('lizard_workspace_wmsserver', 'js_popup_class', se...
gpl-3.0
-5,273,317,594,217,322,000
81.163717
233
0.549518
false
sonofmun/DissProject
unit_tests/test_sem_extract_pipeline.py
1
6474
from unittest import TestCase from Data_Production.sem_extract_pipeline import SemPipeline, ParamTester from collections import Counter import re import os import shutil import numpy as np __author__ = 'matt' class TestInit(TestCase): def test_sim_algo_reset(self): """ Tests whether an incorrect value fo...
gpl-3.0
-9,033,154,179,774,351,000
44.113475
119
0.588208
false
aivarsk/scrapy
scrapy/utils/url.py
89
4183
""" This module contains general purpose URL functions not found in the standard library. Some of the functions that used to be imported from this module have been moved to the w3lib.url module. Always import those from there instead. """ import posixpath from six.moves.urllib.parse import (ParseResult, urlunparse, ur...
bsd-3-clause
-396,007,967,302,989,440
36.348214
82
0.672245
false
squidsoup/pip
pip/req/req_install.py
5
42989
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import warnings import zipfile from distutils.util import change_root from distutils import sysconfig from email.parser import FeedParser from pip._vendor import pkg_resources, six from pip._vendor.dist...
mit
1,861,971,498,874,812,400
36.742757
79
0.530415
false
jdepoix/goto_cloud
goto_cloud/operating_system_support/tests/test_operating_system_support.py
1
2975
import unittest from django.test import TestCase from operating_system.public import OperatingSystem from remote_host.public import RemoteHost from ..operating_system_support import OperatingSystemRelations, AbstractedRemoteHostOperator RELATION_MOCK = { '1': { '2': { '3': { ...
mit
4,885,126,101,358,753,000
27.066038
108
0.615798
false
matthiasdiener/spack
var/spack/repos/builtin/packages/dri3proto/package.py
5
1811
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-108,918,064,149,468,660
43.170732
81
0.686913
false
malkoto1/just_cook
SQLAlchemy-1.0.4/lib/sqlalchemy/events.py
2
42935
# sqlalchemy/events.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Core event interfaces.""" from . import event, exc from .pool import Pool f...
gpl-2.0
8,982,065,422,000,288,000
38.791474
79
0.642879
false
rmboggs/django
tests/test_runner/test_debug_sql.py
146
2971
import sys import unittest from django.db import connection from django.test import TestCase from django.test.runner import DiscoverRunner from django.utils import six from django.utils.encoding import force_text from .models import Person @unittest.skipUnless(connection.vendor == 'sqlite', 'Only run on sqlite so w...
bsd-3-clause
-2,560,002,149,524,444,700
34.369048
101
0.600808
false
aayushidwivedi01/spark-tk
python/sparktk/sparkconf.py
11
14663
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
apache-2.0
3,749,180,461,735,072,000
38.101877
117
0.635105
false
EmreAtes/spack
lib/spack/spack/modules/__init__.py
5
1780
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
4,173,090,949,385,514,000
37.695652
78
0.698315
false
agoose77/hivesystem
bee/worker.py
1
9348
from __future__ import print_function from .segments import reg_helpersegment, decoratorsegment from .types import parse_parameters from .beewrapper import beewrapper, reg_beehelper import inspect import libcontext import functools from . import emptyclass, mytype from .event import exception from .resolve import reso...
bsd-2-clause
2,343,842,993,586,595,000
34.011236
113
0.57638
false
tjsavage/rototutor_djangononrel
django/contrib/admindocs/views.py
296
15504
from django import template, templatetags from django.template import RequestContext from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.shortcuts import render_to_response from django.core.exceptions import ImproperlyConfigur...
bsd-3-clause
6,566,172,881,790,980,000
39.062016
180
0.597072
false
rproepp/spykeutils
spykeutils/tests/test_tools.py
1
18764
try: import unittest2 as ut assert ut # Suppress pyflakes warning about redefinition of unused ut except ImportError: import unittest as ut from builders import arange_spikes from numpy.testing import assert_array_equal, assert_array_almost_equal from spykeutils import tools import neo import neo.io.tools...
bsd-3-clause
8,237,204,206,433,174,000
39.094017
80
0.584364
false
museomix/2013_Quebec_thermoscope
raspberry/pygame-1.9.1release/lib/_camera_opencv_highgui.py
13
2229
import pygame import numpy import opencv #this is important for capturing/displaying images from opencv import highgui def list_cameras(): """ """ # -1 for opencv means get any of them. return [-1] def init(): pass def quit(): pass class Camera: def __init__(self, device =0, size =...
mit
-7,127,214,837,392,641,000
21.744898
83
0.565276
false