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
sagiss/sardana
src/sardana/spock/magic.py
1
9633
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## ## ## This file is part of Sardana ## ## http://www.sardana-controls.org/ ## ## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## ## Sardana is free software: you can redistribute it...
lgpl-3.0
3,876,645,581,433,441,000
31.543919
109
0.570643
false
wjo1212/aliyun-log-python-sdk
aliyun/log/es_migration/migration_manager.py
1
8762
#!/usr/bin/env python # encoding: utf-8 # Copyright (C) Alibaba Cloud Computing # All rights reserved. import logging import time from multiprocessing import Pool from aliyun.log import LogClient from aliyun.log.es_migration.collection_task import (CollectionTaskStatus, ...
mit
-2,013,282,463,689,481,700
45.606383
126
0.588222
false
luoyetx/mxnet
tools/ipynb2md.py
41
2272
#!/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 # "L...
apache-2.0
-4,459,009,894,870,522,400
28.894737
86
0.685299
false
atpy/atpy
atpy/registry.py
1
6496
_readers = {} _writers = {} _set_readers = {} _set_writers = {} _extensions = {} def register_reader(ttype, function, override=False): ''' Register a table reader function. Required Arguments: *ttype*: [ string ] The table type identifier. This is the string that will be used to ...
mit
6,330,407,224,070,350,000
27.243478
86
0.655018
false
thomas-sterrenburg/fingerprinting-python
src/static/constants.py
1
1239
# Copyright 2017 Thomas Sterrenburg # # Licensed under the MIT License (the License); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at https://opensource.org/licenses/MIT# import datetime # file and directory names CACHE = 'data/cache' KNOWN = 'data/known' R...
mit
1,184,538,720,387,479,800
22.396226
77
0.702179
false
jagguli/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geos/mutable_list.py
405
10386
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://www.aryehleib.com/MutableLists.html Author: Aryeh Leib Taurog. """ class ListMixin(obj...
apache-2.0
683,050,179,241,921,200
32.61165
92
0.568554
false
kochbeck/icsisumm
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/parse/__init__.py
9
4491
# Natural Language Toolkit: Parsers # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Steven Bird <sb@csse.unimelb.edu.au> # Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # """ Classes and interfaces for producing tree struct...
gpl-3.0
-2,136,103,843,931,177,200
40.201835
75
0.735026
false
pbougue/navitia
source/jormungandr/jormungandr/interfaces/v1/Places.py
2
13833
# coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility an...
agpl-3.0
-7,189,060,706,409,084,000
40.169643
112
0.619388
false
achabotl/pambox
setup.py
1
3387
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from setuptools import setup from setuptools.command.test import test as TestCommand import codecs import os import re here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding ...
bsd-3-clause
6,608,040,403,684,827,000
28.198276
71
0.588131
false
vipulroxx/kivy
examples/demo/multistroke/historymanager.py
38
9447
__all__ = ('GestureHistoryManager', 'GestureVisualizer') from kivy.app import App from kivy.clock import Clock from kivy.lang import Builder from kivy.uix.widget import Widget from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.graphics import ...
mit
-9,166,076,485,671,849,000
33.104693
79
0.618397
false
aviciimaxwell/odoo
addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py
337
3000
# -*- 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
5,851,024,442,269,922,000
47.387097
185
0.629333
false
hmendozap/auto-sklearn
autosklearn/metalearning/metafeatures/plot_metafeatures.py
1
20297
from __future__ import print_function import argparse import cPickle import itertools import os import StringIO import sys import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.decomposition import PCA try: from sklearn.manifold import TSNE from sklearn.metrics.pairwise import P...
bsd-3-clause
-632,687,654,449,007,400
40.00404
98
0.560773
false
rahlk/Experimental-Algorithms
multiProc/src/parGALE.py
1
4233
""" """ from __future__ import print_function, division import os from demo import * import subprocess import sys sys.path.append(os.path.abspath('../problems/')) # Get the git root directory root=repo_dir = subprocess.Popen(['git' ,'rev-parse' ...
mit
-8,693,513,753,031,806,000
26.673203
77
0.604063
false
campbe13/openhatch
vendor/packages/gdata/src/gdata/youtube/client.py
96
9463
#!/usr/bin/env 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 ...
agpl-3.0
-6,060,362,857,601,215,000
34.709434
94
0.646095
false
wangjun/odoo
addons/sales_team/sales_team.py
180
6131
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
1,121,648,430,971,460,000
46.161538
167
0.590442
false
StackPointCloud/libcloud
contrib/generate_provider_feature_matrix_table.py
6
18754
#!/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 "Licen...
apache-2.0
632,955,592,271,907,100
38.81741
112
0.595713
false
odoo-brazil/l10n-brazil-wip
l10n_br_account_product/__manifest__.py
3
2375
# -*- coding: utf-8 -*- # Copyright (C) 2013 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localization Account Product', 'summary': "Brazilian Localization Account Product", 'category': 'Localisation', 'license': 'AGPL-3', 'author': '...
agpl-3.0
522,042,916,848,649,000
36.698413
64
0.612632
false
msingh172/youtube-dl
youtube_dl/extractor/screencastomatic.py
149
1713
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( ExtractorError, js_to_json, ) class ScreencastOMaticIE(InfoExtractor): _VALID_URL = r'https?://screencast-o-matic\.com/watch/(?P<id>[0-9a-zA-Z]+)' _TEST...
unlicense
5,264,428,978,670,562,000
33.959184
119
0.556334
false
domeger/SplunkTAforPuppetEnterprise
bin/splunktaforpuppetenterprise/solnlib/packages/splunklib/searchcommands/validators.py
16
11478
# coding=utf-8 # # Copyright 2011-2015 Splunk, 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...
apache-2.0
-1,010,238,125,554,260,400
28.880208
120
0.592644
false
wsmith323/django
django/contrib/sites/management.py
467
1564
""" Creates the default Site object. """ from django.apps import apps from django.conf import settings from django.core.management.color import no_style from django.db import DEFAULT_DB_ALIAS, connections, router def create_default_site(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs): ...
bsd-3-clause
-8,553,015,671,072,065,000
40.157895
108
0.646419
false
linktlh/Toontown-journey
toontown/shtiker/ShtikerBook.py
1
19967
from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData from direct.gui.DirectGui import * from direct.showbase import DirectObject from pandac.PandaModules import * from toontown.effects import DistributedFireworkShow from toontown.nametag import NametagGlobals from toontown.parties import...
apache-2.0
5,514,424,025,963,807,000
40.94958
326
0.629689
false
harri88/harri88.github.io
node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/vim.py
364
1976
# -*- coding: utf-8 -*- """ pygments.styles.vim ~~~~~~~~~~~~~~~~~~~ A highlighting style for Pygments, inspired by vim. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keywor...
mit
-4,318,062,144,764,634,000
30.365079
70
0.448887
false
jmcorgan/gnuradio
gr-blocks/python/blocks/qa_wavfile.py
51
2216
#!/usr/bin/env python # # Copyright 2008,2010,2013 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 ...
gpl-3.0
3,665,465,583,131,429,400
29.777778
81
0.665162
false
LegitSavage/namebench
nb_third_party/graphy/line_chart.py
205
4253
#!/usr/bin/python2.4 # # Copyright 2008 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 o...
apache-2.0
-4,410,045,448,930,538,500
30.043796
79
0.654597
false
tianweizhang/nova
nova/virt/libvirt/vif.py
2
27960
# Copyright (C) 2011 Midokura KK # Copyright (C) 2011 Nicira, Inc # Copyright 2011 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 # # ...
apache-2.0
-5,238,624,102,279,983,000
39
79
0.539521
false
XXMrHyde/android_external_chromium_org
chrome/test/functional/webrtc_write_wsh.py
66
2397
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # This module is handler for incoming data to the pywebsocket standalone server # (source is in http://code.google.com/p/pywebsocket/source/browse/trunk...
bsd-3-clause
-1,515,579,690,475,073,300
30.539474
80
0.705465
false
t3dev/odoo
addons/resource/tests/common.py
15
1756
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import TransactionCase class TestResourceCommon(TransactionCase): def _define_calendar(self, name, attendances, tz): return self.env['resource.calendar'].create({ 'name':...
gpl-3.0
-9,076,034,270,985,825,000
37.173913
132
0.525057
false
bvcms/bvcms
CmsWeb/Lib/multiprocessing/dummy/connection.py
168
2807
# # Analogue of `multiprocessing.connection` which uses queues instead of sockets # # multiprocessing/dummy/connection.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditi...
gpl-2.0
4,601,270,643,949,414,400
31.264368
79
0.691842
false
faun/django_test
build/lib/django/contrib/gis/db/backends/oracle/models.py
310
2184
""" The GeometryColumns and SpatialRefSys models for the Oracle spatial backend. It should be noted that Oracle Spatial does not have database tables named according to the OGC standard, so the closest analogs are used. For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns model and the `SDO_...
bsd-3-clause
4,523,643,666,607,054,000
32.6
84
0.681319
false
lulufei/youtube-dl
test/test_YoutubeDL.py
24
20870
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import copy from test.helper import FakeYDL, assertRegexpMatches from youtube_dl import YoutubeDL from youtube_d...
unlicense
-5,176,356,957,062,949,000
36.401434
111
0.536033
false
lochiiconnectivity/boto
boto/ec2/reservedinstance.py
12
8480
# Copyright (c) 2006-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, modi...
mit
1,843,460,482,225,525,800
36.356828
91
0.620637
false
jyejare/robottelo
tests/foreman/cli/test_repository.py
1
102147
# -*- encoding: utf-8 -*- """Test class for Repository CLI :Requirement: Repository :CaseAutomation: Automated :CaseLevel: Component :CaseComponent: Repositories :TestType: Functional :CaseImportance: High :Upstream: No """ import pytest from fauxfactory import gen_alphanumeric from fauxfactory import gen_string...
gpl-3.0
4,146,998,596,047,780,000
36.402783
99
0.58873
false
matteocrippa/dsl-n55u-bender
release/src/router/openvpn/win/build_ddk.py
11
1559
import os from wb import system, home_fn, choose_arch def build_ddk(config, dir, x64): ddk_path = config['DDK_PATH'] ddk_major = int(config['DDKVER_MAJOR']) debug = 'PRODUCT_TAP_DEBUG' in config return build_tap(ddk_path, ddk_major, debug, dir, x64) def build_tap(ddk_path, ddk_major, debug, dir, x64):...
gpl-2.0
-6,540,174,947,459,720,000
27.345455
75
0.54009
false
gnieboer/gnuradio
gr-wxgui/python/wxgui/const_window.py
58
6131
# # Copyright 2008 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
-8,390,796,735,511,075,000
28.056872
90
0.650302
false
Angoreher/xcero
stats/models.py
1
1039
# -*- coding: utf-8 -*- """ Models for the stats application. """ # standard library # django from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _ # models from base.models import BaseModel from users.models import User class Stat(BaseMode...
mit
4,308,593,348,742,390,000
23.162791
61
0.599615
false
jessstrap/servotk
tests/wpt/web-platform-tests/tools/wptserve/wptserve/ranges.py
142
3004
from .utils import HTTPException class RangeParser(object): def __call__(self, header, file_size): prefix = "bytes=" if not header.startswith(prefix): raise HTTPException(416, message="Unrecognised range type %s" % (header,)) parts = header[len(prefix):].split(",") ran...
mpl-2.0
-8,742,856,931,317,612,000
32.377778
86
0.522636
false
rghe/ansible
lib/ansible/modules/packaging/os/opkg.py
95
5138
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrick Pelletier <pp.pelletier@gmail.com> # Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules # # 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...
gpl-3.0
-1,605,373,370,097,007,900
25.348718
150
0.579798
false
greut/invenio-kwalitee
kwalitee/views.py
3
12240
# -*- coding: utf-8 -*- # # This file is part of kwalitee # Copyright (C) 2014, 2015 CERN. # # kwalitee 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) an...
gpl-2.0
-8,063,789,881,589,458,000
37.980892
79
0.506454
false
andrewleech/SickRage
sickbeard/providers/hdtorrents_it.py
3
8277
# coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage 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 o...
gpl-3.0
4,297,038,823,792,430,000
41.88601
179
0.550441
false
kxliugang/edx-platform
lms/djangoapps/lti_provider/tests/test_tasks.py
36
4381
""" Tests for the LTI outcome service handlers, both in outcomes.py and in tasks.py """ import ddt from django.test import TestCase from mock import patch, MagicMock from student.tests.factories import UserFactory from lti_provider.models import GradedAssignment, LtiConsumer, OutcomeService import lti_provider.tasks ...
agpl-3.0
5,071,849,225,120,550,000
32.189394
102
0.611048
false
openhatch/oh-mainline
vendor/packages/gdata/src/atom/http_core.py
40
19862
#!/usr/bin/env 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...
agpl-3.0
5,632,854,148,327,313,000
32.269682
79
0.632917
false
duyet-website/api.duyet.net
lib/faker/providers/address/uk_UA/__init__.py
3
5601
# coding=utf-8 from __future__ import unicode_literals from random import randint from .. import Provider as AddressProvider class Provider(AddressProvider): address_formats = ['{{street_address}}, {{city}}, {{postcode}}'] building_number_formats = ['#', '##', '###'] city_formats = ['{{city_prefix}} {{f...
mit
-5,230,261,958,806,217,000
51.662162
79
0.590967
false
JMY1000/CyclesMineways
CyclesMineways.py
1
46368
# Cycles Mineways setup # Version 1.3.0, 5/28/16 # Copyright © 2016 # Please send suggestions or report bugs at https://github.com/JMY1000/CyclesMineways/ # 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 Foundat...
gpl-3.0
-3,542,560,193,766,556,700
46.168871
238
0.695085
false
ClovisIRex/Snake-django
env/lib/python3.6/site-packages/rest_framework/throttling.py
25
8143
""" Provides various throttling policies. """ from __future__ import unicode_literals import time from django.core.cache import cache as default_cache from django.core.exceptions import ImproperlyConfigured from rest_framework.compat import is_authenticated from rest_framework.settings import api_settings class Ba...
mit
-2,495,019,639,814,025,700
31.185771
80
0.608498
false
lyft/graphite-web
webapp/graphite/finders/standard.py
30
4096
import os from os.path import isdir, isfile, join, basename from django.conf import settings from graphite.logger import log from graphite.node import BranchNode, LeafNode from graphite.readers import WhisperReader, GzippedWhisperReader, RRDReader from graphite.util import find_escaped_pattern_fields from . import fs...
apache-2.0
1,509,728,894,003,232,500
38.76699
98
0.669434
false
oceanobservatories/mi-instrument
mi/platform/rsn/test/test_oms_client.py
9
1674
# #!/usr/bin/env python # # """ # @package ion.agents.platform.rsn.test.test_oms_client # @file ion/agents/platform/rsn/test/test_oms_client.py # @author Carlos Rueda # @brief Test cases for CIOMSClient. The OMS enviroment variable can be used # to indicate which CIOMSClient will be tested. # """ # # __a...
bsd-2-clause
1,153,583,282,259,573,200
31.192308
80
0.66368
false
dataxu/ansible
lib/ansible/modules/cloud/openstack/os_keypair.py
5
4722
#!/usr/bin/python # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # Copyright (c) 2013, John Dewey <john@dewey.ws> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, div...
gpl-3.0
-8,686,226,670,674,974,000
27.969325
125
0.613088
false
yaojenkuo/BuildingMachineLearningSystemsWithPython
ch03/rel_post_20news.py
24
3903
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License import sklearn.datasets import scipy as sp new_post = \ """Disk drive problems. Hi, I have a probl...
mit
4,443,673,887,272,943,600
32.358974
82
0.698437
false
hef/samba
python/samba/netcmd/spn.py
46
7603
# spn management # # Copyright Matthieu Patou mat@samba.org 2010 # # 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-3.0
-7,702,153,048,084,918,000
36.087805
79
0.549257
false
ace02000/pyload
module/plugins/accounts/FastshareCz.py
1
1470
# -*- coding: utf-8 -*- import re from module.plugins.internal.Account import Account from module.plugins.internal.Plugin import set_cookie class FastshareCz(Account): __name__ = "FastshareCz" __type__ = "account" __version__ = "0.11" __status__ = "testing" __description__ = """Fastshare...
gpl-3.0
-8,618,165,420,933,813,000
27.269231
94
0.543537
false
bowlofstew/common
api/biiapi.py
5
2554
from abc import ABCMeta, abstractmethod from biicode.common.model.symbolic.reference import References from biicode.common.edition.block_holder import BlockHolder class BiiAPI(object): '''The main interface to user-access biicode published information''' #TODO: Clearly specify raised Exceptions in each method...
mit
2,509,508,830,543,154,000
29.404762
88
0.659358
false
gbriones1/cloud-init
cloudinit/sources/DataSourceNone.py
15
1846
# vi: ts=4 expandtab # # Copyright (C) 2012 Yahoo! Inc. # # Author: Joshua Harlow <harlowja@yahoo-inc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # published by the Free Software Foundation. # # This...
gpl-3.0
-1,857,325,352,713,332,700
31.385965
74
0.680932
false
HerkCoin/herkcoin
share/qt/extract_strings_qt.py
2945
1844
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
mit
-3,160,543,746,266,249,700
24.611111
80
0.571584
false
jhonatajh/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/win/gyptest-link-opt-icf.py
344
1319
#!/usr/bin/env python # 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. """ Make sure comdat folding optimization setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test...
gpl-3.0
-3,098,525,694,876,766,700
31.170732
78
0.691433
false
locationtech/geowave
python/src/main/python/pygw/store/accumulo/accumulo_options.py
2
2877
# # Copyright (c) 2013-2020 Contributors to the Eclipse Foundation # # See the NOTICE file distributed with this work for additional information regarding copyright # ownership. All rights reserved. This program and the accompanying materials are made available # under the terms of the Apache License, Version 2.0 whic...
apache-2.0
8,841,141,749,998,820,000
27.205882
97
0.582551
false
matthewrudy/kubernetes
cluster/juju/layers/kubernetes/reactive/k8s.py
53
14370
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
-5,711,763,184,718,239,000
41.64095
113
0.693946
false
jephianlin/minrank_aux
xi_dict.py
1
6449
print("---SAPreduced_matrix, has_SAP, find_ZFloor, Zsap, etc.") def SAPmatrix(A): """ Input: a symmetric matrix A Output: The matrix for checking if A has SAP """ if A.is_symmetric()==False: raise ValueError("Input matrix is not symmetric.") AA=[]; n=A.dimensions()[0]; row_num=0...
gpl-2.0
-916,061,750,009,489,300
27.662222
95
0.509846
false
Lh4cKg/sl4a
python/src/Lib/test/test___all__.py
52
6085
import unittest from test.test_support import run_unittest import sys import warnings class AllTest(unittest.TestCase): def check_all(self, modname): names = {} with warnings.catch_warnings(): warnings.filterwarnings("ignore", ".* (module|package)", ...
apache-2.0
1,099,909,066,978,600,300
32.251366
81
0.5553
false
Andr3iC/courtlistener
cleaning_scripts/correct_links_to_resource_org_186.py
5
2193
import os import sys execfile('/etc/courtlistener') sys.path.append(INSTALL_ROOT) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from alert.search.models import Document, Citation from alert.lib.db_tools import queryset_generator from alert.lib.string_utils import clean_string from alert.lib.string_utils...
agpl-3.0
2,335,938,182,902,024,000
31.25
103
0.617875
false
Fokko/incubator-airflow
airflow/contrib/hooks/gdrive_hook.py
1
5267
# -*- coding: utf-8 -*- # # 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
-3,808,183,682,733,788,000
37.445255
102
0.601291
false
zzjkf2009/Midterm_Astar
opencv/samples/python/squares.py
1
1774
#!/usr/bin/env python ''' Simple "Square Detector" program. Loads several images sequentially and tries to find squares in each image. ''' # Python 2/3 compatibility import sys PY3 = sys.version_info[0] == 3 if PY3: xrange = range import numpy as np import cv2 def angle_cos(p0, p1, p2): d1, d2 = (p0-p1)....
mit
6,742,635,926,271,350,000
31.254545
110
0.543405
false
rbian/virt-test
tools/package_jeos.py
15
1491
#!/usr/bin/python import os import sys import logging import shutil import common from autotest.client import utils from autotest.client.shared import logging_manager from virttest import utils_misc def package_jeos(img): """ Package JeOS and make it ready for upload. Steps: 1) Move /path/to/jeos.q...
gpl-2.0
8,227,865,220,899,311,000
27.673077
80
0.637156
false
husni75/p2pool_idc
p2pool/bitcoin/sha256.py
285
3084
from __future__ import division import struct k = [ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0...
gpl-3.0
-4,307,064,108,313,667,000
40.12
131
0.582361
false
aisipos/django
django/db/backends/base/operations.py
43
23170
import datetime import decimal import warnings from importlib import import_module from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends import utils from django.utils import six, timezone from django.utils.dateparse import parse_duration from django.utils.dep...
bsd-3-clause
7,800,601,149,006,423,000
37.171334
117
0.635865
false
blackzw/openwrt_sdk_dev1
staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_strftime.py
132
6956
""" Unittest for time.strftime """ import calendar import sys import re from test import test_support import time import unittest # helper functions def fixasctime(s): if s[8] == ' ': s = s[:8] + '0' + s[9:] return s def escapestr(text, ampm): """ Escape text to deal with possible locale val...
gpl-2.0
7,704,706,241,512,089,000
36.6
83
0.475273
false
Don42/youtube-dl
youtube_dl/extractor/ina.py
129
1064
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class InaIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ina\.fr/video/(?P<id>I?[A-Z0-9]+)' _TEST = { 'url': 'http://www.ina.fr/video/I12055569/francois-hollande-je-crois-que-c-est-clair-video....
unlicense
-5,457,803,111,174,172,000
28.527778
105
0.555974
false
xpac1985/ansible
lib/ansible/plugins/action/win_copy.py
185
1153
# (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
-9,062,848,118,106,574,000
38.758621
73
0.774501
false
blindroot/django
django/contrib/gis/db/backends/spatialite/base.py
445
3615
import sys from ctypes.util import find_library from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.base import ( Database, DatabaseWrapper as SQLiteDatabaseWrapper, SQLiteCursorWrapper, ) from django.utils import six from .client import SpatiaL...
bsd-3-clause
-3,020,421,747,256,024,600
47.2
98
0.643707
false
RO-ny9/python-for-android
python3-alpha/python3-src/Lib/idlelib/AutoComplete.py
67
9061
"""AutoComplete.py - An IDLE extension for automatically completing names. This extension can complete either attribute names of file names. It can pop a window with all available names, for the user to select from. """ import os import sys import string from idlelib.configHandler import idleConf # This string inclu...
apache-2.0
-1,874,823,991,964,885,500
38.567686
79
0.54707
false
domesticduck/MenuConciergeServer
vendor/bundle/ruby/2.0.0/gems/libv8-3.16.14.3/vendor/v8/tools/testrunner/local/verbose.py
19
3680
# Copyright 2012 the V8 project 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
apache-2.0
7,575,706,523,352,208,000
36.171717
75
0.683152
false
theo-l/django
tests/postgres_tests/test_hstore.py
11
14088
import json from django.core import checks, exceptions, serializers from django.db import connection from django.db.models import OuterRef, Subquery from django.db.models.expressions import RawSQL from django.forms import Form from django.test.utils import CaptureQueriesContext, isolate_apps from . import PostgreSQLS...
bsd-3-clause
5,551,133,462,877,554,000
34.265664
113
0.576363
false
eranchetz/nupic
examples/opf/experiments/anomaly/spatial/10field_many_balanced/description.py
96
16581
# ---------------------------------------------------------------------- # 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
-2,198,227,235,380,133,000
37.922535
92
0.620891
false
bjolivot/ansible
lib/ansible/modules/network/lenovo/cnos_template.py
19
7146
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, 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 # ...
gpl-3.0
-8,577,342,859,167,690,000
38.480663
140
0.688497
false
Amechi101/indieapp
account/auth_backends.py
5
1360
from __future__ import unicode_literals from django.db.models import Q from django.contrib.auth.backends import ModelBackend from account.compat import get_user_model, get_user_lookup_kwargs from account.models import EmailAddress class UsernameAuthenticationBackend(ModelBackend): def authenticate(self, **cre...
mit
5,096,587,762,099,469,000
30.627907
76
0.604412
false
nelsonw2014/watershed
setup.py
1
1598
import setuptools from os import path if __name__ == "__main__": here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_description = f.read() setuptools.setup( name="watershed", version="0.0.1", description="Da...
apache-2.0
-7,060,895,278,487,383,000
33.76087
110
0.533792
false
dennissergeev/faamtools
faamtools/avaps.py
2
2620
# -*- coding: utf-8 -*- """ Functions to process AVAPS dropsondes data """ import datetime import netCDF4 as nc import numpy as np from . import DsFld, ObsData from . import utils def read_avaps_nc(fname, flds=None, time2datetime=False): """Read AVAPS dropsonde data from a NetCDF file. Open a NetCDF file an...
mit
-4,138,353,992,132,944,000
36.971014
102
0.55687
false
CSGreater-Developers/HMC-Grader
app/userViews/instructor/testSettings.py
2
4117
# coding=utf-8 '''This module handles all functions responsible for modifying the course settings page. View Function: instructorEditTestFile (instructor/testSettings.html) Redirect Functions: TODO AJAX Fuctions: TODO ''' #Import the app from app import app #Import needed flask functions from flask import g, rend...
mit
-1,211,996,728,680,589,300
29.496296
110
0.69711
false
hugovk/pylast
tests/test_pylast.py
1
4174
#!/usr/bin/env python """ Integration (not unit) tests for pylast.py """ import os import time import unittest import pytest from flaky import flaky import pylast def load_secrets(): secrets_file = "test_pylast.yaml" if os.path.isfile(secrets_file): import yaml # pip install pyyaml with op...
apache-2.0
2,102,698,527,309,571,800
29.918519
78
0.624341
false
weiting-chen/manila
manila/tests/fake_volume.py
4
1978
# Copyright 2013 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 requi...
apache-2.0
-8,207,143,754,066,170,000
25.72973
78
0.624368
false
napkindrawing/ansible
lib/ansible/utils/module_docs_fragments/vyos.py
224
2754
# # (c) 2015, Peter Sprygada <psprygada@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 late...
gpl-3.0
-3,828,806,618,456,020,000
40.104478
87
0.676107
false
waxmanr/moose
framework/contrib/nsiqcppstyle/rules/RULE_4_1_B_indent_each_enum_item_in_enum_block.py
43
3015
""" Indent the each enum item in the enum block. == Violation == enum A { A_A, <== Violation A_B <== Violation } == Good == enum A { A_A, <== Good A_B } """ from nsiqcppstyle_rulehelper import * from nsiqcppstyle_reporter import * from nsiqcppstyle_rulemanager import...
lgpl-2.1
-7,119,062,214,850,458,000
21.5
142
0.553234
false
petrus-v/odoo
addons/l10n_ro/__openerp__.py
186
2241
# -*- encoding: utf-8 -*- ############################################################################## # # Author: Fekete Mihai <feketemihai@gmail.com>, Tatár Attila <atta@nvm.ro> # Copyright (C) 2011-2014 TOTAL PC SYSTEMS (http://www.erpsystems.ro). # Copyright (C) 2014 Fekete Mihai # Copyright (C) 201...
agpl-3.0
-3,886,629,573,844,177,000
42.057692
112
0.57347
false
Eureka22/ASM_xf
PythonD/lib/python2.4/site-packages/display/PIL/Image.py
2
54748
# # The Python Imaging Library. # $Id: //modules/pil/PIL/Image.py#47 $ # # the Image class wrapper # # partial release history: # 1995-09-09 fl Created # 1996-03-11 fl PIL release 0.0 (proof of concept) # 1996-04-30 fl PIL release 0.1b1 # 1996-05-27 fl PIL release 0.1b2 # 1996-11-04 fl PIL release 0.2b1 # 199...
gpl-2.0
5,808,634,772,621,116,000
30.302459
77
0.591876
false
mhnatiuk/phd_sociology_of_religion
scrapper/build/scrapy/build/lib.linux-x86_64-2.7/scrapy/commands/deploy.py
15
8793
from __future__ import print_function import sys import os import glob import tempfile import shutil import time import urllib2 import netrc import json from urlparse import urlparse, urljoin from subprocess import Popen, PIPE, check_call from w3lib.form import encode_multipart from scrapy.command import ScrapyComman...
gpl-2.0
-4,714,787,654,887,287,000
33.081395
117
0.568293
false
Alwnikrotikz/cortex-vfx
test/IECore/CubeColorLookupTest.py
12
2884
########################################################################## # # Copyright (c) 2008-2010, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
bsd-3-clause
-154,930,911,467,281,180
30.010753
77
0.673024
false
haad/ansible
lib/ansible/modules/identity/ipa/ipa_hbacrule.py
134
13226
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, 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', ...
gpl-3.0
-7,225,423,844,489,080,000
38.363095
121
0.606155
false
jswope00/griffinx
common/test/acceptance/tests/lms/test_lms_acid_xblock.py
122
5837
# -*- coding: utf-8 -*- """ End-to-end tests for the LMS. """ from unittest import expectedFailure from ..helpers import UniqueCourseTest from ...pages.lms.auto_auth import AutoAuthPage from ...pages.lms.course_info import CourseInfoPage from ...pages.lms.tab_nav import TabNavPage from ...pages.xblock.acid import Aci...
agpl-3.0
3,285,360,143,309,951,500
33.134503
105
0.599109
false
jelugbo/hebs_repo
lms/envs/common.py
2
62020
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
agpl-3.0
-1,926,681,162,947,610,400
32.409978
180
0.62711
false
sachintyagi22/spark
examples/src/main/python/ml/generalized_linear_regression_example.py
76
2506
# # 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
-5,122,695,177,416,111,000
36.969697
99
0.721468
false
hitszxp/scikit-learn
sklearn/linear_model/tests/test_ransac.py
40
12814
import numpy as np from numpy.testing import assert_equal, assert_raises from numpy.testing import assert_array_almost_equal from scipy import sparse from sklearn.utils.testing import assert_less from sklearn.linear_model import LinearRegression, RANSACRegressor from sklearn.linear_model.ransac import _dynamic_max_tri...
bsd-3-clause
-3,065,065,606,213,625,300
36.034682
78
0.594038
false
TheWardoctor/Wardoctors-repo
script.module.fantastic/lib/resources/lib/sources/en/to_be_fixed/needsfixing/crazy.py
1
6406
# -*- coding: utf-8 -*- ''' fantastic Add-on 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. This pro...
apache-2.0
-3,745,853,968,392,189,400
36.244186
172
0.490946
false
vipullakhani/mi-instrument
mi/dataset/parser/dosta_ln_auv.py
8
3170
""" @package mi.dataset.parser @file marine-integrations/mi/dataset/parser/dosta_ln_auv.py @author Jeff Roy @brief Parser and particle Classes and tools for the dosta_ln_auv data Release notes: initial release """ __author__ = 'Jeff Roy' __license__ = 'Apache 2.0' from mi.core.log import get_logger log = get_logger(...
bsd-2-clause
4,454,281,206,801,478,700
28.082569
79
0.60694
false
stelfrich/openmicroscopy
components/tests/ui/library/python/ImageCheckLibrary.py
14
1094
import Image from numpy import asarray def crop_image(path, cropX, cropY, cropW, cropH): image = Image.open(path) x = int(cropX) y = int(cropY) x2 = int(cropW) + x y2 = int(cropH) + y img = image.crop((x, y, x2, y2)) img.save(path) def image_should_be_blank(path, expected=True): i...
gpl-2.0
-4,752,580,855,818,549,000
22.782609
74
0.542962
false
mrrrgn/AutobahnPython
examples/twisted/wamp/basic/pubsub/complex/backend.py
8
1506
############################################################################### ## ## Copyright (C) 2014 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:/...
apache-2.0
3,080,699,031,500,599,300
31.042553
91
0.630146
false
jettisonjoe/openhtf
examples/phase_groups.py
2
4400
# Copyright 2018 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
apache-2.0
7,505,461,385,569,393,000
25.506024
80
0.672727
false
LeeMendelowitz/malign_viz
server/cors.py
8
1654
from datetime import timedelta from flask import make_response, request, current_app from functools import update_wrapper def crossdomain(origin=None, methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_options=True): if methods is not None: methods = '...
gpl-3.0
6,683,719,636,215,468,000
35.777778
67
0.603386
false
hehongliang/tensorflow
tensorflow/contrib/learn/python/learn/estimators/rnn_common.py
42
12923
# 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
4,202,721,969,067,886,000
40.957792
93
0.693337
false
code-sauce/tensorflow
tensorflow/python/kernel_tests/substr_op_test.py
55
8327
# 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
-1,049,360,549,842,419,200
37.730233
80
0.609223
false
marcoscaceres/bedrock
bedrock/base/tests/test_middleware.py
28
2690
from django.test import TestCase, RequestFactory from django.test.utils import override_settings from bedrock.base.middleware import LocaleURLMiddleware @override_settings(DEV=True) class TestLocaleURLMiddleware(TestCase): def setUp(self): self.rf = RequestFactory() self.middleware = LocaleURLMid...
mpl-2.0
-9,013,458,169,412,726,000
43.098361
76
0.603717
false
laperry1/android_external_chromium_org
native_client_sdk/src/tools/tests/create_html_test.py
108
1808
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest import shutil import sys import tempfile SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_D...
bsd-3-clause
-6,435,832,612,186,421,000
31.285714
74
0.693031
false