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
stuckj/dupeguru
core_pe/tests/cache_test.py
1
4134
# Created By: Virgil Dupras # Created On: 2006/09/14 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/g...
gpl-3.0
-8,547,917,785,342,214,000
27.510345
99
0.52806
false
geekboxzone/mmallow_prebuilts_gcc_darwin-x86_x86_x86_64-linux-android-4.9
share/gdb/python/gdb/command/type_printers.py
126
4424
# Type printer commands. # Copyright (C) 2010-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any late...
gpl-2.0
-8,285,277,077,054,738,000
34.392
79
0.605561
false
symmetricapi/django-symmetric
symmetric/management/generatemodels.py
1
11905
from importlib import import_module from optparse import make_option import os from django.apps import apps from django.conf import settings from django.core.management.base import CommandError from django.db.models.fields import NOT_PROVIDED, TimeField, DateField from django.db.models.fields.related import ForeignKey...
mit
2,578,567,297,031,787,000
47.394309
260
0.563377
false
annarev/tensorflow
tensorflow/python/summary/writer/writer.py
11
16949
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-2,873,367,120,335,768,600
38.233796
83
0.681043
false
mxOBS/deb-pkg_trusty_chromium-browser
tools/memory_inspector/memory_inspector/classification/rules.py
109
5039
# 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. """This module defines the core structure of the classification rules. This module does NOT specify how the rules filter the data: this responsibility is of...
bsd-3-clause
-4,886,667,247,460,531,000
41.352941
80
0.57432
false
hogarthj/ansible
hacking/fix_test_syntax.py
135
3563
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2017, Matt Martz <matt@sivel.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 Licens...
gpl-3.0
2,247,590,909,063,366,100
30.530973
134
0.588268
false
liberorbis/libernext
env/lib/python2.7/site-packages/pip/exceptions.py
123
1125
"""Exceptions used throughout package""" from __future__ import absolute_import class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class ...
gpl-2.0
-457,518,654,800,270,100
22.93617
77
0.740444
false
ketjow4/NOV
Lib/site-packages/scipy/stats/info.py
55
8282
""" Statistical Functions ===================== This module contains a large number of probability distributions as well as a growing library of statistical functions. Each included distribution is an instance of the class rv_continous. For each given name the following methods are available. See docstring for rv_co...
gpl-3.0
-6,142,414,574,027,203,000
31.735178
91
0.452427
false
Vutshi/qutip
qutip/tests/test_subsystem_apply.py
1
5219
# This file is part of QuTiP. # # QuTiP 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. # # QuTiP is distributed in the ...
gpl-3.0
3,885,156,561,271,169,000
41.08871
78
0.597241
false
jgcaaprom/android_external_chromium_org
components/test/data/password_manager/run_tests.py
43
4038
# -*- coding: utf-8 -*- # 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. """This file allows the bots to be easily configure and run the tests.""" import argparse import os import tempfile from environmen...
bsd-3-clause
-3,363,233,355,291,991,000
39.38
80
0.631253
false
manazhao/tf_recsys
tensorflow/contrib/predictor/saved_model_predictor_test.py
93
6114
# 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,811,639,115,508,005,000
34.964706
80
0.626431
false
zahodi/ansible
test/units/vars/test_variable_manager.py
32
14137
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-1,478,598,134,294,481,400
38.488827
107
0.606918
false
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pandas/io/stata.py
7
82769
""" Module contains tools for processing Stata files into DataFrames The StataReader below was originally written by Joe Presbrey as part of PyDTA. It has been extended and improved by Skipper Seabold from the Statsmodels project who also developed the StataWriter and was finally added to pandas in a once again improv...
gpl-3.0
-911,198,936,538,238,300
35.574901
90
0.544443
false
Snailed/group-generator
gruppeapp/views.py
1
10629
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.datastructures import MultiValueDictKeyError from django.shortcuts import render, redirect from django.http import HttpResponse, Http404 from django.views import View from random import shuffle, randint from django.contrib.auth import aut...
mit
8,469,901,769,704,796,000
39.265152
146
0.6248
false
mozilla/captain
vendor/lib/python/django/contrib/staticfiles/finders.py
102
9658
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import default_storage, Storage, FileSystemStorage from django.utils.datastructures import SortedDict from django.utils.functional import empty, memoize, LazyObject from django.utils.importl...
mpl-2.0
3,624,644,190,722,065,400
33.992754
81
0.575896
false
datadesk/panda
config/settings.py
4
7153
#!/usr/bin/env python import datetime import os import django from django.utils.translation import ugettext_lazy as _ # Which settings are we using? # Useful for debugging. SETTINGS = 'base' # Base paths DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__)) SITE_ROOT = os.path.dirname(os.path.dirname(os....
mit
1,787,296,661,865,948,400
25.201465
101
0.617783
false
hmpf/nav
python/nav/statemon/event.py
2
1484
# # Copyright (C) 2018 Uninett AS # # This file is part of Network Administration Visualized (NAV) # # NAV 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)...
gpl-3.0
-3,148,251,219,955,815,000
33.511628
75
0.668464
false
cbrentharris/bricklayer
bricklayer/tests/doctor/config_test.py
1
2313
from unittest import TestCase from bricklayer.doctor.config import Configurator import uuid import os import shutil import tempfile import ConfigParser class ConfiguratorTest(TestCase): def setUp(self): self.random_dir = tempfile.gettempdir() + '/.' + uuid.uuid4().hex os.makedirs(self.random_dir)...
mit
7,152,472,166,302,749,000
38.20339
91
0.669261
false
rich-digi/wp-xml-transformer
cts-import.py
1
4100
# ------------------------------------------------------------------------------------------------ # Split Wordpress XML (using LXML) # ------------------------------------------------------------------------------------------------ import sys, os, re, pprint, codecs, datetime, subprocess # sys.path.append('/usr/local...
mit
-930,942,110,120,406,500
26.891156
98
0.560244
false
yd0str/infernal-twin
build/pillow/PIL/PaletteFile.py
72
1113
# # Python Imaging Library # $Id$ # # stuff to read simple, teragon-style palette files # # History: # 97-08-23 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and redistribution. # from PIL._binary import o8 ## # File h...
gpl-3.0
6,438,082,773,590,776,000
19.236364
66
0.497754
false
daphne-yu/aubio
python/tests/test_source.py
8
2264
#! /usr/bin/env python from numpy.testing import TestCase, assert_equal, assert_almost_equal from aubio import fvec, source from numpy import array from utils import list_all_sounds list_of_sounds = list_all_sounds('sounds') path = None class aubio_source_test_case(TestCase): def setUp(self): if not len...
gpl-3.0
-8,988,579,364,581,915,000
30.013699
100
0.534011
false
yjmade/odoo
addons/decimal_precision/tests/test_qweb_float.py
103
2000
# -*- coding: utf-8 -*- from openerp.tests import common class TestFloatExport(common.TransactionCase): def setUp(self): super(TestFloatExport, self).setUp() self.Model = self.registry('decimal.precision.test') def get_converter(self, name): converter = self.registry('ir.qweb.field.flo...
agpl-3.0
-1,733,428,438,505,503,200
29.30303
76
0.5305
false
richo/groundstation
groundstation/stream_client.py
1
1052
from sockets.stream_socket import StreamSocket from transfer.request import Request from transfer.notification import Notification import settings from groundstation.utils import path2id import groundstation.logger log = groundstation.logger.getLogger(__name__) class StreamClient(StreamSocket): def __init__(sel...
mit
4,035,132,895,205,636,000
34.066667
91
0.709125
false
argivaitv/argivaitv
plugin.video.salts/scrapers/movie25_scraper.py
1
3790
""" SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. T...
gpl-2.0
6,805,842,469,713,769,000
38.072165
187
0.595515
false
formiano/enigma2-4.4
lib/python/Components/Renderer/valioPosition.py
13
1298
# -*- coding: utf-8 -*- # # Maximum Temperature Renderer for Dreambox/Enigma-2 # Version: 1.0 # Coded by Vali (c)2010-2011 # ####################################################################### from Components.VariableText import VariableText from enigma import eLabel from Renderer import Renderer class v...
gpl-2.0
-8,136,977,001,451,987,000
28.5
71
0.607088
false
derekjchow/models
research/skip_thoughts/skip_thoughts/skip_thoughts_model_test.py
19
6755
# 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
9,216,509,880,755,745,000
34.366492
80
0.623834
false
edry/edx-platform
common/lib/xmodule/xmodule/annotator_token.py
211
1542
""" This file contains a function used to retrieve the token for the annotation backend without having to create a view, but just returning a string instead. It can be called from other files by using the following: from xmodule.annotator_token import retrieve_token """ import datetime from firebase_token_generator im...
agpl-3.0
478,234,736,981,009,540
47.1875
141
0.732815
false
ericMayer/tekton-master
backend/venv/lib/python2.7/site-packages/unidecode/x067.py
252
4635
data = ( 'Zui ', # 0x00 'Can ', # 0x01 'Xu ', # 0x02 'Hui ', # 0x03 'Yin ', # 0x04 'Qie ', # 0x05 'Fen ', # 0x06 'Pi ', # 0x07 'Yue ', # 0x08 'You ', # 0x09 'Ruan ', # 0x0a 'Peng ', # 0x0b 'Ban ', # 0x0c 'Fu ', # 0x0d 'Ling ', # 0x0e 'Fei ', # 0x0f 'Qu ', # 0x10 '[?] '...
mit
-5,882,486,668,536,943,000
16.965116
19
0.38835
false
mscherer/ansible-modules-core
cloud/openstack/os_port.py
70
12457
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
8,992,682,568,714,327,000
30.778061
80
0.593401
false
adviti/melange
app/gdata/dublincore/data.py
126
2106
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
3,880,798,802,522,566,000
26
90
0.714625
false
Zopieux/py-gfm
gfm/standalone_fenced_code.py
1
2080
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import markdown from markdown.extensions.fenced_code import FencedCodeExtension, FencedBlockPreprocessor ...
bsd-3-clause
-6,578,108,611,704,230,000
39.784314
88
0.576923
false
centic9/subversion-ppa
tools/dev/graph-dav-servers.py
5
5465
#!/usr/bin/env python # # # 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 #...
apache-2.0
-1,030,338,365,839,252,100
27.170103
83
0.610247
false
JulyKikuAkita/PythonPrac
cs15211/FindEventualSafeStates.py
1
7463
__source__ = 'https://leetcode.com/problems/find-eventual-safe-states/' # Time: O(N + E) # Space: O(N) # # Description: Leetcode # 802. Find Eventual Safe States # # In a directed graph, we start at some node and every turn, # walk along a directed edge of the graph. # If we reach a node that is terminal (that is, it ...
apache-2.0
-8,531,149,714,826,902,000
29.586066
122
0.536781
false
openstack/congress
congress/utils.py
1
9459
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
7,097,890,734,267,145,000
34.69434
79
0.566445
false
lixiangning888/whole_project
modules/signatures/antiemu_wine_func.py
3
1273
# -*- coding: utf-8 -*- # Copyright (C) 2015 Accuvant, Inc. (bspengler@accuvant.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 Free Software Foundation, either version 3 of the License, or # (at your option) any ...
lgpl-3.0
4,143,826,323,957,912,600
36.727273
72
0.71004
false
chhao91/QGIS
python/plugins/processing/gui/MessageBarProgress.py
5
2541
# -*- coding: utf-8 -*- """ *************************************************************************** MessageBarProgress.py --------------------- Date : April 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
7,812,491,997,703,610,000
32.88
122
0.512003
false
vishesh/pycket
pycket/prims/parameter.py
1
2433
from pycket import values from pycket import values_parameter from pycket.argument_parser import ArgParser, EndOfInput from pycket.arity import Arity from pycket.base import W_Object from pycket.error import SchemeException from pycket.prims.expose impo...
mit
-6,313,794,861,346,296,000
38.885246
96
0.708179
false
VirusTotal/msticpy
tests/test_ip_utils.py
1
3873
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """IP Util...
mit
7,113,057,487,669,496,000
36.970588
87
0.566228
false
KnowNo/reviewboard
reviewboard/reviews/views.py
3
64687
from __future__ import unicode_literals import logging import time from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.exceptions import MultipleObjectsReturned, ObjectDoesN...
mit
-2,637,150,893,756,488,000
36.477984
81
0.596704
false
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/pandas/io/tests/test_pickle.py
7
10831
# pylint: disable=E1101,E1103,W0232 """ manage legacy pickle tests """ import nose import os from distutils.version import LooseVersion import pandas as pd from pandas import Index from pandas.compat import u, is_platform_little_endian import pandas import pandas.util.testing as tm from pandas.tseries.offsets impor...
mit
-1,783,715,224,599,658,500
36.219931
78
0.549626
false
sbalde/edxplatform
lms/djangoapps/oauth2_handler/tests.py
57
9001
# pylint: disable=missing-docstring from django.core.cache import cache from django.test.utils import override_settings from lang_pref import LANGUAGE_KEY from xmodule.modulestore.tests.factories import (check_mongo_calls, CourseFactory) from student.models import anonymous_id_for_user from student.models import UserP...
agpl-3.0
5,138,256,475,205,075,000
37.465812
97
0.67037
false
eugene1g/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py
121
7646
# Copyright (c) 2009 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
2,118,831,475,188,653,800
41.477778
169
0.694481
false
lgarren/spack
var/spack/repos/builtin/packages/pathfinder/package.py
3
2190
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
3,253,582,773,949,579,300
38.818182
102
0.668037
false
blueboxgroup/cinder
cinder/volume/drivers/san/hp/hp_lefthand_iscsi.py
3
5725
# (c) Copyright 2014 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
-820,982,533,157,085,000
36.175325
78
0.659039
false
mahak/spark
examples/src/main/python/mllib/naive_bayes_example.py
27
2246
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
8,011,080,475,587,510,000
34.650794
96
0.720837
false
xHeliotrope/injustice_dropper
env/lib/python3.4/site-packages/setuptools/command/rotate.py
461
2038
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os from setuptools import Command from setuptools.compat import basestring class rotate(Command): """Delete older distributions""" description = "delete older distributions, keeping N n...
mit
-7,676,551,182,617,431,000
32.409836
78
0.571639
false
GitHublong/hue
desktop/core/ext-py/boto-2.38.0/boto/pyami/installers/ubuntu/__init__.py
205
1112
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
apache-2.0
1,199,796,690,065,275,000
49.545455
74
0.768885
false
crosick/zhishu
ENV/lib/python2.7/site-packages/pip/wheel.py
187
30186
""" Support for installing and building the "wheel" binary package format. """ from __future__ import absolute_import import compileall import csv import errno import functools import hashlib import logging import os import os.path import re import shutil import stat import sys import tempfile import warnings from ba...
mit
6,295,287,343,320,624,000
36.405204
79
0.574405
false
bowlofstew/Herd
herd/BitTornado/launchmanycore.py
5
12499
#!/usr/bin/env python # Written by John Hoffman # see LICENSE.txt for license information from BitTornado import PSYCO if PSYCO.psyco: try: import psyco assert psyco.__version__ >= 0x010100f0 psyco.full() except: pass from download_bt1 import BT1Download from RawServer import ...
mit
-6,484,234,279,455,621,000
31.805774
89
0.512121
false
benfinkelcbt/CPD200
CPD200-Lab13-Python/pyasn1/type/tag.py
162
4499
# ASN.1 types tags from operator import getitem from pyasn1 import error tagClassUniversal = 0x00 tagClassApplication = 0x40 tagClassContext = 0x80 tagClassPrivate = 0xC0 tagFormatSimple = 0x00 tagFormatConstructed = 0x20 tagCategoryImplicit = 0x01 tagCategoryExplicit = 0x02 tagCategoryUntagged = 0x04 class Tag: ...
gpl-3.0
967,501,181,214,894,500
34.148438
96
0.564792
false
diging/jars
cookies/operations.py
1
16043
from django.contrib.contenttypes.models import ContentType from django.db.models import Q, QuerySet from django.conf import settings from cookies.models import * from concepts.models import Concept from cookies import authorization import jsonpickle, datetime, copy, requests from itertools import groupby, combination...
gpl-3.0
-5,096,327,721,887,805,000
34.651111
132
0.634545
false
stefano-meschiari/SMESCHIA
.emacs.d/elpa/elpy-20140810.7/elpy/tests/test_pydocutils.py
6
3370
import os import unittest import shutil import sys import tempfile import mock import elpy.pydocutils class TestGetPydocCompletions(unittest.TestCase): def test_should_return_top_level_modules(self): modules = elpy.pydocutils.get_pydoc_completions("") self.assertIn('sys', modules) self.a...
mit
-7,241,288,110,066,562,000
36.444444
75
0.616914
false
ToontownUprising/src
toontown/toonbase/ContentPacksManager.py
3
4454
from direct.directnotify.DirectNotifyGlobal import directNotify import fnmatch import os from panda3d.core import Multifile, Filename, VirtualFileSystem import yaml APPLICABLE_FILE_PATTERNS = ('*.mf', 'ambience.yaml') CONTENT_EXT_WHITELIST = ('.jpg', '.jpeg', '.rgb', '.png', '.ogg', '.ttf') class ContentPackError(...
mit
-3,879,206,102,597,707,000
30.366197
78
0.583071
false
nesdis/djongo
tests/django_tests/tests/v22/tests/db_functions/text/test_trim.py
71
1357
from django.db.models import CharField from django.db.models.functions import LTrim, RTrim, Trim from django.test import TestCase from django.test.utils import register_lookup from ..models import Author class TrimTests(TestCase): def test_trim(self): Author.objects.create(name=' John ', alias='j') ...
agpl-3.0
-2,442,543,236,167,448,000
34.710526
105
0.556374
false
listamilton/supermilton.repository
script.module.youtube.dl/lib/youtube_dl/postprocessor/ffmpeg.py
13
22506
from __future__ import unicode_literals import io import os import subprocess import time from .common import AudioConversionError, PostProcessor from ..compat import ( compat_subprocess_get_DEVNULL, ) from ..utils import ( encodeArgument, encodeFilename, get_exe_version, is_outdated_version, ...
gpl-2.0
-6,507,072,544,954,738,000
37.803448
157
0.557629
false
rosudrag/Freemium-winner
VirtualEnvironment/Lib/site-packages/pip-7.1.0-py3.4.egg/pip/_vendor/requests/packages/urllib3/connection.py
483
9011
import datetime import sys import socket from socket import timeout as SocketTimeout import warnings from .packages import six try: # Python 3 from http.client import HTTPConnection as _HTTPConnection, HTTPException except ImportError: from httplib import HTTPConnection as _HTTPConnection, HTTPException cla...
mit
4,082,394,298,936,221,700
33.132576
109
0.616025
false
bgarnaat/codewars_katas
src/python/6kyu/string_average/test_string_average.py
1
1185
""" TEST CASES: Test.describe("Basic tests") Test.assert_equals(average_string("zero nine five two"), "four") Test.assert_equals(average_string("four six two three"), "three") Test.assert_equals(average_string("one two three four five"), "three") Test.assert_equals(average_string("five four"), "four") Test.assert_equ...
mit
1,762,866,812,907,619,300
29.384615
70
0.654852
false
DigitalSlideArchive/HistomicsTK
histomicstk/features/compute_intensity_features.py
1
5874
"""Compute intensity features in labeled image.""" import numpy as np import pandas as pd import scipy.stats from skimage.measure import regionprops def compute_intensity_features( im_label, im_intensity, num_hist_bins=10, rprops=None, feature_list=None): """Calculate intensity features from an in...
apache-2.0
-7,113,539,644,315,206,000
32.375
78
0.651515
false
Tigerwhit4/taiga-back
taiga/projects/custom_attributes/serializers.py
18
5454
# Copyright (C) 2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2015 David Barragán <bameda@dbarragan.com> # 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
-8,455,804,908,561,824,000
36.6
99
0.673698
false
cirruscluster/cirruscluster
cirruscluster/ext/ansible/inventory/host.py
1
2025
# (c) 2012, 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) any lat...
mit
5,611,364,958,188,585,000
29.681818
85
0.628642
false
balle/chaosmap
lib/cymruwhois.py
1
7940
#!/usr/bin/env python import socket import errno try : import memcache HAVE_MEMCACHE = True except ImportError: HAVE_MEMCACHE = False def iterwindow(l, slice=50): """Generate sublists from an iterator >>> list(iterwindow(iter(range(10)),11)) [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]] >>> list(iterwi...
gpl-3.0
-4,367,014,186,561,682,000
28.962264
118
0.53728
false
appneta/boto
boto/rds/dbsecuritygroup.py
185
6651
# Copyright (c) 2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
mit
3,858,321,539,029,553,000
34.758065
98
0.623515
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/jq-0.1-py2.5.egg/jq/queue/consumerend.py
1
1699
from twisted.internet.protocol import Protocol, ClientFactory from twisted.internet import reactor, error from twisted.python import log from jq.common import VariablePacketProtocol import pickle import functools class ConsumerClientProtocol(VariablePacketProtocol): def connectionMade(self): data = pickle....
bsd-3-clause
-3,788,942,848,196,670,500
32.98
80
0.696292
false
ykim362/mxnet
example/image-classification/fine-tune.py
38
3215
# 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
3,726,488,884,919,110,000
40.753247
92
0.676827
false
molebot/brython
www/src/Lib/encodings/iso8859_10.py
37
13896
""" Python Character Mapping Codec iso8859_10 generated from 'MAPPINGS/ISO8859/8859-10.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...
bsd-3-clause
-8,939,722,050,343,046,000
43.263844
109
0.519142
false
debugger87/spark
examples/src/main/python/mllib/elementwise_product_example.py
106
1756
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
1,547,029,056,104,505,000
33.431373
74
0.729499
false
origingod/hug
tests/module_fake.py
10
1042
"""Fake HUG API module usable for testing importation of modules""" import hug @hug.directive(apply_globally=False) def my_directive(default=None, **kwargs): '''for testing''' return default @hug.default_input_format('application/made-up') def made_up_formatter(data): '''for testing''' return data ...
mit
7,865,437,084,695,204,000
20.265306
69
0.699616
false
xmaruto/mcord
xos/tosca/resources/hpchealthcheck.py
3
1219
import importlib import os import pdb import sys import tempfile sys.path.append("/opt/tosca") from translator.toscalib.tosca_template import ToscaTemplate import pdb from services.hpc.models import HpcHealthCheck, HpcService from xosresource import XOSResource class XOSHpcHealthCheck(XOSResource): provides = "t...
apache-2.0
-8,430,083,443,676,888,000
30.25641
139
0.716161
false
datalogics-robb/scons
src/engine/SCons/cpp.py
2
18411
# # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicen...
mit
-274,357,927,382,766,880
32.596715
81
0.599316
false
petercable/mi-instrument
mi/core/test/test_persistent_store.py
9
11196
#!/usr/bin/env python """ @package mi.core.test.test_persistent_store @file <git-workspace>/ooi/edex/com.raytheon.uf.ooi.plugin.instrumentagent/utility/edex_static/base/ooi/instruments/mi-instrument/mi/core/test/test_persistent_store.py @author Johnathon Rusk @brief Unit tests for PersistentStoreDict module """ # Not...
bsd-2-clause
-8,588,406,243,775,132,000
46.240506
166
0.665952
false
edxnercel/edx-platform
common/lib/chem/chem/chemtools.py
250
10721
"""This module originally includes functions for grading Vsepr problems. Also, may be this module is the place for other chemistry-related grade functions. TODO: discuss it. """ import json import unittest import itertools def vsepr_parse_user_answer(user_input): """ user_input is json generated by vsepr.js...
agpl-3.0
7,097,200,553,950,299,000
51.043689
169
0.579797
false
vivekananda/fbeats
django/contrib/gis/db/backends/oracle/introspection.py
388
1777
import cx_Oracle from django.db.backends.oracle.introspection import DatabaseIntrospection class OracleIntrospection(DatabaseIntrospection): # Associating any OBJECTVAR instances with GeometryField. Of course, # this won't work right on Oracle objects that aren't MDSYS.SDO_GEOMETRY, # but it is the only o...
bsd-3-clause
-3,018,824,038,000,439,300
44.564103
131
0.596511
false
scarriere/CSGames-AI2015
AIClient_Python/test/test_mathUtils.py
1
1127
from unittest import TestCase from mathUtils.Vector2 import Vector2 from mathUtils.MathUtils import MathUtils from mathUtils.Direction import Direction class TestMathUtils(TestCase): def test_getDirectionVector(self): a = Vector2(1, 1) b = Vector2(7, 7) self.assertEqual(Vector2(6, 6), Math...
mit
2,933,137,239,843,517,000
44.08
84
0.710736
false
Zhongqilong/kbengine
kbe/src/lib/python/Lib/test/test_minidom.py
60
64328
# test for xml.dom.minidom import pickle from test.support import run_unittest, findfile import unittest import xml.dom.minidom from xml.dom.minidom import parse, Node, Document, parseString from xml.dom.minidom import getDOMImplementation tstfile = findfile("test.xml", subdir="xmltestdata") # The tests of Docume...
lgpl-3.0
8,152,278,292,653,398,000
40.636246
96
0.568415
false
datagrok/python-misc
datagrok/math/stats.py
1
1192
"""Utilities for statistics""" def sorted(xs): """Return a sorted copy of the list xs""" _xs = list(xs) _xs.sort() return _xs def stemleaf(ns): """Given a list of integers ns, print a stem-and-leaf display.""" return _stemleaf(sorted(ns)) def dsd(ns): """Given a list of integers ns, print...
agpl-3.0
-1,492,373,900,817,290,500
34.058824
85
0.580537
false
funson/rt-xen
tools/python/xen/remus/qdisc.py
22
4860
import socket, struct import netlink qdisc_kinds = {} TC_H_ROOT = 0xFFFFFFFF class QdiscException(Exception): pass class request(object): "qdisc request message" def __init__(self, cmd, flags=0, dev=None, handle=0): self.n = netlink.nlmsg() self.t = netlink.tcmsg() self.n.nlmsg_fla...
gpl-2.0
-3,870,929,609,614,113,300
26.303371
75
0.533333
false
skillness/OpenNI
Externals/PSCommon/Windows/CreateRedist/CopyToRepository.py
7
3337
import os import sys import re import time import traceback packageFullPath = "..\..\..\..\..\PrimeSenseVersions.nsh" def find_package_number(findStr, text): for line in text: temp = re.search(findStr, line) if temp != None: packageNumber = temp.group(1) return packageNumbe...
apache-2.0
-4,085,302,422,481,745,400
41.782051
111
0.591849
false
letolab/airy
airy/utils/translation/trans_null.py
1
2647
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. import warnings from airy.core.conf import settings from airy.utils.encoding import force_un...
bsd-2-clause
-2,453,132,263,570,895,400
32.935897
79
0.727238
false
shakamunyi/tensorflow
tensorflow/contrib/keras/python/keras/layers/convolutional_recurrent.py
2
24940
# 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
2,763,449,772,239,218,000
40.087315
80
0.623897
false
wrongtest/nnlight
src/computation_on_java_impl/layers/pooling.py
1
1033
from layer.basic.pooling import MaxPoolingWithTimeLayer as MaxPoolingWithTimeLayerBase class MaxPoolingWithTimeLayer(MaxPoolingWithTimeLayerBase): def get_computation_on_java_code(self, code, binder): datatype = binder.get_base_type(self.input) input_var = binder.get_name(self.input) outp...
gpl-2.0
729,158,902,350,442,100
43.913043
86
0.601162
false
bitpay/bitcoin
qa/rpc-tests/getchaintips.py
66
2133
#!/usr/bin/env python2 # 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. # Exercise the getchaintips API. We introduce a network split, work # on chains of different lengths, an...
mit
7,234,932,446,776,980,000
35.152542
70
0.627286
false
denys-duchier/Scolar
config/softs/jaxml-3.01/jaxml.py
2
49250
# Module for XML, HTML and CGI output # jaxml # (C) Jerome Alet <alet@librelogiciel.com> 2000-2002 # You're welcome to redistribute this software under the # terms of the GNU General Public Licence version 2.0 # or, at your option, any higher version. # # You can read the complete GNU GPL in the file COPYING # which sh...
gpl-2.0
-6,357,981,298,586,470,000
41.383821
210
0.519695
false
arun6582/django
tests/forms_tests/field_tests/test_nullbooleanfield.py
49
3555
from django.forms import Form, HiddenInput, NullBooleanField, RadioSelect from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class NullBooleanFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_nullbooleanfield_clean(self): f = NullBooleanField() self.assertI...
bsd-3-clause
1,982,692,439,101,740,800
47.040541
106
0.661885
false
tridao/cvxpy
cvxpy/atoms/affine/sum_entries.py
5
2288
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
-5,322,284,604,814,319,000
29.918919
68
0.625874
false
cdsgroup/qcdb
databases/A24.py
2
34755
# # @BEGIN LICENSE # # QCDB: quantum chemistry common driver and databases # # Copyright (c) 2011-2017 The QCDB Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of QCDB. # # QCDB is free software; you can redistribute it and/or modify # it ...
lgpl-3.0
5,668,789,873,789,682,000
44.550459
140
0.524529
false
codeforamerica/heroku-buildpack-pygeo
vendor/pip-1.3.1/pip/baseparser.py
63
12283
"""Base option parser setup""" import sys import optparse import pkg_resources import os import textwrap from distutils.util import strtobool from pip.backwardcompat import ConfigParser, string_types, ssl from pip.locations import default_config_file, default_log_file from pip.util import get_terminal_size, get_prog ...
mit
4,611,692,514,892,938,000
31.667553
85
0.583001
false
akhilari7/pa-dude
lib/python2.7/site-packages/pyrfc3339/generator.py
3
2170
import pytz from pyrfc3339.utils import timezone, timedelta_seconds def generate(dt, utc=True, accept_naive=False, microseconds=False): ''' Generate an :RFC:`3339`-formatted timestamp from a :class:`datetime.datetime`. >>> from datetime import datetime >>> generate(datetime(2009,1,1,12,59,59,0,p...
mit
-9,141,408,771,895,293,000
31.38806
78
0.631797
false
sbalde/edx-platform
cms/djangoapps/contentstore/features/signup.py
111
2821
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_true, assert_false # pylint: disable=no-name-in-module @step('I fill in the registration form$') def i_fill_in_the_registration_form(step): def fill_in_reg_form(): reg...
agpl-3.0
4,010,837,311,263,612,000
38.180556
85
0.685927
false
dmsimard/ansible
test/lib/ansible_test/_internal/test.py
7
15062
"""Classes for storing and processing test results.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import datetime import re from . import types as t from .util import ( display, get_ansible_version, ) from .util_common import ( write_text_test_results, wr...
gpl-3.0
-3,059,636,963,325,375,000
27.689524
150
0.566857
false
canwe/NewsBlur
apps/rss_feeds/migrations/0044_favicon_color.py
18
7246
# encoding: utf-8 import sys import datetime from south.db import db from south.v2 import DataMigration from django.db import models from apps.rss_feeds.models import Feed try: from apps.rss_feeds.models import FeedIcon except ImportError: pass class Migration(DataMigration): def forwards(self, orm): ...
mit
-6,049,237,689,037,459,000
64.279279
159
0.54016
false
MathieuDuponchelle/my_patched_photologue
photologue/tests/test_gallery.py
3
2220
from .. import models from .helpers import PhotologueBaseTest from .factories import GalleryFactory, PhotoFactory class GalleryTest(PhotologueBaseTest): def setUp(self): """Create a test gallery with 2 photos.""" super(GalleryTest, self).setUp() self.test_gallery = GalleryFactory() ...
bsd-3-clause
-6,755,612,140,835,178,000
34.238095
83
0.637838
false
ansrivas/pylogging
pylogging/formatters.py
1
1932
# !/usr/bin/env python # -*- coding: utf-8 -*- """Bunch of log formatters to be used.""" import logging try: import ujson as json except Exception as ex: import json class TextFormatter(logging.Formatter): """Format the meta data in the log message to fix string length.""" datefmt = '%Y-%m-%d %H:%M...
mit
-2,276,261,824,209,945,600
32.310345
111
0.577122
false
xchenum/quantum
quantum/plugins/cisco/client/cli.py
6
6937
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Cisco Systems, 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...
apache-2.0
3,999,638,209,563,791,400
31.115741
79
0.590889
false
anomitra/articleScraper
PyQt-gpl-5.4.1/examples/qml/referenceexamples/methods.py
2
4326
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE:BSD$ #...
gpl-2.0
-296,076,130,369,872,450
27.84
77
0.648636
false
liucode/tempest-master
tempest/api/compute/volumes/test_volume_snapshots.py
5
3040
# Copyright 2015 Fujitsu(fnst) Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
-4,811,655,127,097,651,000
40.643836
79
0.651316
false
PHSCRC/phsled
nfc/clf/rcs380.py
4
38231
# -*- coding: latin-1 -*- # ----------------------------------------------------------------------------- # Copyright 2012-2015 Stephen Tiedemann <stephen.tiedemann@gmail.com> # # Licensed under the EUPL, Version 1.1 or - as soon they # will be approved by the European Commission - subsequent # versions of the EUPL (t...
mit
6,889,416,888,422,765,000
42.444318
79
0.535011
false
hynekcer/django
django/db/migrations/operations/base.py
356
4370
from __future__ import unicode_literals from django.db import router class Operation(object): """ Base class for migration operations. It's responsible for both mutating the in-memory model state (see db/migrations/state.py) to represent what it performs, as well as actually performing it agains...
bsd-3-clause
5,531,483,985,423,518,000
35.722689
103
0.641648
false
Gitlab11/odoo
addons/calendar/controllers/main.py
329
3390
import simplejson import openerp import openerp.http as http from openerp.http import request import openerp.addons.web.controllers.main as webmain import json class meeting_invitation(http.Controller): @http.route('/calendar/meeting/accept', type='http', auth="calendar") def accept(self, db, token, action, ...
agpl-3.0
-883,575,146,776,035,200
46.746479
133
0.627139
false
toddpalino/kafka-tools
kafka/tools/protocol/requests/update_metadata_v3.py
1
2339
# 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
7,092,937,227,782,397,000
40.035088
86
0.574605
false
gauribhoite/personfinder
env/site-packages/pygments/lexers/data.py
72
18277
# -*- coding: utf-8 -*- """ pygments.lexers.data ~~~~~~~~~~~~~~~~~~~~ Lexers for data file format. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, ExtendedRegexLexer, LexerContext, \ ...
apache-2.0
2,063,301,534,494,567,400
33.484906
83
0.48799
false