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
amarmaduke/ankipac
ffs/parser.py
2
7836
import os def split_path(path): folders = [] while True: path, folder = os.path.split(path) if folder != "": folders.append(folder) else: if path != "": folders.append(path) break folders.reverse() return folders def lex_file(...
mit
6,604,012,388,414,562,000
35.788732
79
0.41437
false
google-code-export/pyglet
contrib/layout/examples/xhtml_replaced.py
29
4059
#!/usr/bin/env python '''Example of a custom replaced element for XHTML layout. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: xml_css.py 322 2006-12-26 12:53:18Z Alex.Holkner $' from ctypes import * from pyglet.gl import * from pyglet.window import Window from pyglet import clock from layout import * ...
bsd-3-clause
4,457,149,742,771,977,700
27.787234
85
0.642523
false
nataddrho/DigiCue-USB
Python3/src/venv/Lib/site-packages/pip/_internal/utils/pkg_resources.py
1
1238
from pip._vendor.pkg_resources import yield_lines from pip._vendor.six import ensure_str from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Dict, Iterable, List class DictMetadata: """IMetadataProvider that reads metadata files from a dictionary. """ ...
mit
-5,722,745,296,286,096,000
27.136364
69
0.600162
false
lip6-mptcp/ns3mptcp
src/flow-monitor/examples/wifi-olsr-flowmon.py
108
7439
# -*- Mode: Python; -*- # Copyright (c) 2009 INESC Porto # # 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 Free Software Foundation; # # This program is distributed in the hope that it will be useful, #...
gpl-2.0
9,155,627,021,431,760,000
38.994624
125
0.646727
false
wujuguang/motor
motor/motor_asyncio.py
1
1907
# Copyright 2011-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
-4,334,285,275,192,233,500
25.859155
79
0.787625
false
myhdl/myhdl
myhdl/test/conversion/toVHDL/test_keywords.py
4
4751
import myhdl from myhdl import * from myhdl import ToVHDLWarning import pytest import tempfile import shutil import sys import string import importlib import os from keyword import kwlist as python_kwlist import warnings _vhdl_keywords = ["abs", "access", "after", "alias", "all", "and", "architectu...
lgpl-2.1
6,288,723,911,320,395,000
25.994318
86
0.585982
false
apparena/docs
readthedocs/projects/views/private.py
1
22444
import logging import shutil import json from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotAllowed, Http404 fro...
mit
-8,045,143,523,820,614,000
35.083601
129
0.638567
false
tigerneil/libcluster
python/testapi.py
2
4409
#! /usr/bin/env python # libcluster -- A collection of hierarchical Bayesian clustering algorithms. # Copyright (C) 2013 Daniel M. Steinberg (daniel.m.steinberg@gmail.com) # # This file is part of libcluster. # # libcluster is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser ...
gpl-3.0
8,875,051,140,514,799,000
25.884146
77
0.557496
false
eykd/owyl
src/owyl/core.py
1
13782
# -*- coding: utf-8 -*- """core -- core behaviors for Owyl. Copyright 2008 David Eyk. All rights reserved. $Author$\n $Rev$\n $Date$ """ __author__ = "$Author$"[9:-2] __revision__ = "$Rev$"[6:-2] __date__ = "$Date$"[7:-2] import logging try: from mx.Stack import Stack, EmptyError except ImportError: from s...
bsd-3-clause
4,855,135,930,262,106,000
27.126531
91
0.61145
false
kuhli/flask
flask/__init__.py
142
1676
# -*- coding: utf-8 -*- """ flask ~~~~~ A microframework based on Werkzeug. It's extensively documented and follows best practice patterns. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ __version__ = '0.11.dev0' # utilities we import from Werkzeug ...
bsd-3-clause
8,580,452,336,733,166,000
33.204082
78
0.745823
false
lipro-yocto/git-repo
tests/test_git_trace2_event_log.py
1
7135
# Copyright (C) 2020 The Android Open Source Project # # 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,565,504,848,270,866,400
36.952128
82
0.682551
false
zqhuang/COOP
lib/submit.py
1
2610
#!/usr/bin/env python ### submit cosmomc jobs #### by Zhiqi Huang (zqhuang@cita.utoronto.ca) import re import os import sys import glob import string def search_value(fname, pattern): fp = open(fname, 'r') file_content = fp.read() fp.close() m = re.search(pattern, file_content, flags = re.M + re.I) ...
gpl-3.0
6,965,492,952,397,711,000
30.071429
317
0.564368
false
Java1Guy/ansible-modules-extras
cloud/cloudstack/cs_portforward.py
11
13884
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
753,207,023,258,316,000
32.290168
106
0.621524
false
dpniel/snapcraft
snapcraft/tests/plugins/test_nodejs.py
4
11845
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # 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 program is distributed in the h...
gpl-3.0
1,353,711,722,917,171,000
34.785498
78
0.543183
false
Johnetordoff/osf.io
scripts/clear_sessions.py
12
1349
import sys import time import logging import datetime from django.db import transaction from django.utils import timezone from framework.celery_tasks import app as celery_app from website.app import setup_django setup_django() from osf.models import Session from scripts.utils import add_file_logger logger = logging...
apache-2.0
4,827,146,905,656,189,000
26.530612
119
0.699778
false
pwong-mapr/private-hue
desktop/core/ext-py/Django-1.4.5/tests/regressiontests/localflavor/cl/tests.py
33
2239
from django.contrib.localflavor.cl.forms import CLRutField, CLRegionSelect from django.test import SimpleTestCase class CLLocalFlavorTests(SimpleTestCase): def test_CLRegionSelect(self): f = CLRegionSelect() out = u'''<select name="foo"> <option value="RM">Regi\xf3n Metropolitana de Santiago</opt...
apache-2.0
4,824,381,532,471,481,000
38.982143
91
0.620813
false
arnaud-morvan/QGIS
python/plugins/processing/algs/grass7/ext/r_li_cwed_ascii.py
12
1536
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_cwed_ascii.py ------------------ Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr **********************...
gpl-2.0
-44,795,668,410,692,376
37.25
75
0.488235
false
ariandi/ktmavia
backend/web/ionicons-2.0.1/builder/scripts/generate_font.py
348
5381
# Font generation script from FontCustom # https://github.com/FontCustom/fontcustom/ # http://fontcustom.com/ import fontforge import os import md5 import subprocess import tempfile import json import copy SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) INPUT_SVG_DIR = os.path.join(SCRIPT_PATH, '..', '..', '...
bsd-3-clause
676,173,602,519,459,700
30.104046
174
0.616056
false
srowe/xen-api
ocaml/idl/binding_sanity_checks/sharedstorage.py
34
1972
#!/usr/bin/env python import datetime import XenAPI import sanitychecklib #parameters for the shared storage to be created storage_type='nfs' device_config={'server':sanitychecklib.network_storage_server, 'serverpath':sanitychecklib.network_storage_path } physical_size = '100000' name_label = 'created by sharedstor...
lgpl-2.1
4,057,534,475,928,699,000
35.518519
138
0.743915
false
datalyze-solutions/pandas-qt
pandasqt/views/EditDialogs.py
4
8445
import re from pandasqt.compat import QtCore, QtGui, Qt, Slot, Signal from pandasqt.models.SupportedDtypes import SupportedDtypes import numpy from pandas import Timestamp from pandas.tslib import NaTType class DefaultValueValidator(QtGui.QValidator): def __init__(self, parent=None): super(DefaultValueV...
mit
8,912,547,466,978,800,000
34.940426
113
0.619183
false
chiragjogi/odoo
addons/stock_account/__init__.py
384
1060
# -*- 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
-8,533,595,445,704,118,000
39.769231
78
0.616981
false
felipsmartins/namebench
tools/check_dns_servers.py
174
3835
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
3,839,970,656,477,663,000
28.960938
121
0.686832
false
alpinelinux/linux-stable-grsec
tools/perf/scripts/python/syscall-counts-by-pid.py
1996
2105
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
-5,189,957,477,307,039,000
27.445946
77
0.625178
false
darjus-amzn/ryu
ryu/ofproto/oxs_fields.py
26
5855
# Copyright (C) 2015 Nippon Telegraph and Telephone 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 required by appli...
apache-2.0
-9,174,764,506,429,617,000
35.141975
79
0.51392
false
skirsdeda/django
django/contrib/auth/tests/test_forms.py
15
21532
from __future__ import unicode_literals import os import re from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm, PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadO...
bsd-3-clause
-5,898,819,682,186,163,000
38.948052
110
0.620333
false
SnappleCap/oh-mainline
vendor/packages/whoosh/src/whoosh/qparser/common.py
16
2233
# Copyright 2010 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
agpl-3.0
-2,108,783,699,514,952,200
36.847458
78
0.734438
false
gardner/youtube-dl
youtube_dl/extractor/vier.py
69
4342
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class VierIE(InfoExtractor): IE_NAME = 'vier' _VALID_URL = r'https?://(?:www\.)?vier\.be/(?:[^/]+/videos/(?P<display_id>[^/]+)(?:/(?P<id>\d+))?|video/v3/embed/(?P<embed_id>\d+))' _TESTS = [{ 'url'...
unlicense
-8,440,910,133,286,628,000
34.884298
136
0.515891
false
hkernbach/arangodb
3rdParty/boost/1.62.0/tools/litre/litre.py
67
1906
from docutils import writers from docutils import nodes class LitreTranslator(nodes.GenericNodeVisitor): def __init__(self, document, config): nodes.GenericNodeVisitor.__init__(self,document) self._config = config def default_visit(self, node): pass # print '**visiting...
apache-2.0
-3,705,056,537,410,984,400
30.245902
85
0.524134
false
theakholic/ThinkStats2
code/timeseries.py
66
18035
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import pandas import numpy as np import statsmodels.formula.api as smf import st...
gpl-3.0
3,049,585,497,129,932,000
27.995177
78
0.636096
false
nowopen/scrapy
tests/test_http_response.py
95
19527
import unittest import six from w3lib.encoding import resolve_encoding from scrapy.http import (Request, Response, TextResponse, HtmlResponse, XmlResponse, Headers) from scrapy.selector import Selector from scrapy.utils.python import to_native_str class BaseResponseTest(unittest.TestCase): ...
bsd-3-clause
1,001,461,029,639,952,000
46.743276
137
0.629283
false
commtrack/commtrack-core
apps/maps/views.py
1
2488
import datetime #import simplejson as json from django.utils import simplejson as json from django.db.models.query_utils import Q from django.shortcuts import get_object_or_404 from django.template.loader import render_to_string from django.contrib.auth.models import User from django.http import HttpResponse from dja...
bsd-3-clause
-7,265,024,699,764,267,000
37.292308
74
0.57717
false
emgreen33/easy_bake
pin_lights.py
1
1041
# import RPi.GPIO as gpio # import time # #use board numbering on the pi # gpio.setmode(gpio.BOARD) # # output_pins = [40, 38] # output_pins = 16 # gpio.setup(output_pins, gpio.OUT) # #true and 1 are the same # # gpio.output(40, True) # # gpio.output(38, 1) # while True: # gpio.output(output_pins, (True, False))...
mit
2,288,275,546,881,519,000
16.948276
48
0.644573
false
dparshin/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/amountchangedpattern.py
134
3279
# 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
1,042,983,532,930,626,700
45.842857
106
0.665752
false
TalShafir/ansible
lib/ansible/modules/network/cnos/cnos_image.py
14
8925
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # 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 Licens...
gpl-3.0
5,461,305,516,231,691,000
36.1875
79
0.63619
false
AMOboxTV/AMOBox.LegoBuild
script.module.youtube.dl/lib/youtube_dl/extractor/camdemy.py
124
5425
# coding: utf-8 from __future__ import unicode_literals import datetime import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urlparse, ) from ..utils import ( parse_iso8601, str_to_int, ) class CamdemyIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?ca...
gpl-2.0
-2,679,662,175,431,187,000
34.235294
96
0.543684
false
rtucker-mozilla/mozpackager
vendor-local/lib/python/jinja2/debug.py
112
11028
# -*- coding: utf-8 -*- """ jinja2.debug ~~~~~~~~~~~~ Implements the debug interface for Jinja. This module does some pretty ugly stuff with the Python traceback system in order to achieve tracebacks with correct line numbers, locals and contents. :copyright: (c) 2010 by the Jinja Team. :...
bsd-3-clause
4,639,038,660,091,515,000
31.530973
78
0.593036
false
IndonesiaX/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py
46
6683
import datetime import random import unittest import uuid from nose.plugins.attrib import attr import mock from opaque_keys.edx.locator import CourseLocator, BlockUsageLocator from xmodule.modulestore import ModuleStoreEnum from xmodule.x_module import XModuleMixin from xmodule.modulestore.inheritance import Inherita...
agpl-3.0
7,442,936,480,802,987,000
39.017964
150
0.619482
false
napkindrawing/ansible
lib/ansible/modules/system/openwrt_init.py
58
6912
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Andrew Gaffney <andrew@agaffney.org> # # 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 L...
gpl-3.0
2,623,725,772,899,651,600
31.299065
106
0.576823
false
lulandco/SickRage
lib/mako/_ast_util.py
39
25690
# mako/_ast_util.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ ast ~~~ The `ast` module helps Python applications to process trees of the Pyth...
gpl-3.0
-8,453,796,403,953,522,000
29.188014
79
0.555313
false
way2heavy/youtube-dl-1
youtube_dl/extractor/jpopsukitv.py
170
2584
# coding=utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, ) class JpopsukiIE(InfoExtractor): IE_NAME = 'jpopsuki.tv' _VALID_URL = r'https?://(?:www\.)?jpopsuki\.tv/(?:category/)?video/[^/]+/(?P<id>\S+)' _TEST = { ...
unlicense
4,610,952,722,750,756,000
36.852941
106
0.556721
false
ashang/calibre
src/calibre/utils/opensearch/__init__.py
24
1335
''' Based on the OpenSearch Python module by Ed Summers <ehs@pobox.com> from https://github.com/edsu/opensearch . This module is heavily modified and does not implement all the features from the original. The ability for the the module to perform a search and retrieve search results has been removed. The original mod...
gpl-3.0
-7,356,611,286,848,842,000
35.081081
77
0.785019
false
asreimer/davitpy_asr
gme/ind/dst.py
3
10491
# Copyright (C) 2012 VT SuperDARN Lab # Full license can be found in LICENSE.txt # # 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 la...
gpl-3.0
7,036,213,003,003,469,000
33.741722
327
0.6721
false
primiano/depot_tools
third_party/boto/s3/key.py
51
73164
# 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...
bsd-3-clause
2,289,313,997,783,049,000
41.735981
89
0.578331
false
madphysicist/numpy
numpy/matrixlib/tests/test_matrix_linalg.py
17
2059
""" Test functions for linalg module using the matrix class.""" import numpy as np from numpy.linalg.tests.test_linalg import ( LinalgCase, apply_tag, TestQR as _TestQR, LinalgTestCase, _TestNorm2D, _TestNormDoubleBase, _TestNormSingleBase, _TestNormInt64Base, SolveCases, InvCases, EigvalsCases, EigCases, ...
bsd-3-clause
2,752,855,765,455,599,000
21.139785
78
0.663915
false
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_signal.py
39
18682
import unittest from test import test_support from contextlib import closing import gc import pickle import select import signal import subprocess import traceback import sys, os, time, errno if sys.platform in ('os2', 'riscos'): raise unittest.SkipTest("Can't test signal on %s" % sys.platform) class HandlerBCal...
gpl-2.0
-7,468,738,900,629,216,000
36.894523
80
0.592763
false
asgard-lab/neutron
neutron/api/versions.py
23
1958
# Copyright 2011 Citrix Systems. # 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 ...
apache-2.0
1,112,696,156,696,895,100
30.580645
78
0.639939
false
ArnossArnossi/django
django/contrib/staticfiles/views.py
581
1329
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath from django.conf import settings from django.contrib.staticfiles import finders from django.http import Http404 from django.utils.six.moves.url...
bsd-3-clause
-524,331,963,554,572,300
32.225
78
0.705794
false
educloudalliance/eca-auth-connector
selector/migrations/0001_initial.py
1
3810
# -*- encoding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2015 Haltu Oy, http://haltu.fi # # 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 ...
mit
8,547,131,683,336,520,000
59.47619
295
0.681102
false
hatchery/Genepool2
genes/ubuntu/traits.py
2
1762
#!/usr/bin/env python from functools import wraps from typing import Callable, Dict, List, Optional, Tuple, TypeVar from genes.debian.traits import is_debian from genes.lib.logging import log_error, log_warn from genes.lib.traits import ErrorLevel T = TypeVar('T') def is_ubuntu(versions: Optional[List[str]] = None)...
mit
594,642,152,192,244,600
35.708333
97
0.64983
false
dschopf/potfit
util/kim/kim_compare_lammps/potfit.py
3
4937
################################################################ # # kim_compare_lammps # ################################################################ # # Copyright 2018 the potfit development team # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated doc...
gpl-2.0
3,595,333,296,902,550,500
36.340909
163
0.604991
false
FlintHill/SUAS-Competition
env/lib/python3.7/site-packages/pip/_vendor/chardet/__init__.py
270
1559
######################## BEGIN LICENSE BLOCK ######################## # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ve...
mit
-7,928,416,710,489,227,000
38.974359
79
0.655548
false
antoviaque/edx-platform
common/djangoapps/dark_lang/migrations/0001_initial.py
86
1203
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operati...
agpl-3.0
2,883,550,345,770,450,400
39.1
178
0.61596
false
beezee/GAE-Django-site
djangotoolbox/db/base.py
46
3591
import datetime from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations, \ BaseDatabaseWrapper, BaseDatabaseClient, BaseDatabaseValidation, \ BaseDatabaseIntrospection from .creation import NonrelDatabaseCreation class NonrelDatabaseFeatures(BaseDatabaseFeatures): can_return_id_from_in...
bsd-3-clause
-2,836,708,845,408,063,000
30.778761
79
0.636313
false
nikste/tensorflow
tensorflow/tensorboard/scripts/generate_testdata.py
39
7626
# 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
6,928,227,767,710,201,000
31.589744
80
0.656176
false
Chemcy/vnpy
vn.api/vn.ksotp/vnksotptd/test/tdtest.py
21
4659
# encoding: UTF-8 import sys from time import sleep from PyQt4 import QtGui from vnksotptd import * #---------------------------------------------------------------------- def print_dict(d): """按照键值打印一个字典""" for key,value in d.items(): print key + ':' + str(value) #----------------...
mit
5,315,591,118,558,592,000
25.541401
75
0.400768
false
abhinavp13/IITBX-edx-platform-dev
common/lib/xmodule/xmodule/x_module.py
2
31496
import logging import copy import yaml import os from lxml import etree from collections import namedtuple from pkg_resources import resource_listdir, resource_string, resource_isdir from xmodule.modulestore import Location from xmodule.modulestore.exceptions import ItemNotFoundError from xblock.core import XBlock, ...
agpl-3.0
-8,704,171,430,949,502,000
35.243959
120
0.596171
false
akosyakov/intellij-community
plugins/hg4idea/testData/bin/mercurial/osutil.py
90
5363
# osutil.py - pure Python version of osutil.c # # Copyright 2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import os import stat as statmod def _mode_to_kind(mode): if statmod....
apache-2.0
3,775,535,050,962,136,600
30.547059
79
0.573187
false
nathanielvarona/airflow
tests/always/test_example_dags.py
3
2575
# 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,480,050,119,579,135,000
41.213115
104
0.655922
false
teamfx/openjfx-9-dev-rt
modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/tool/commands/perfalizer.py
1
8619
# Copyright (c) 2012 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 ...
gpl-2.0
-1,788,775,883,608,845,300
39.275701
137
0.670611
false
le9i0nx/ansible
lib/ansible/utils/module_docs_fragments/k8s_name_options.py
80
2450
# # Copyright 2018 Red Hat | Ansible # # 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. # # ...
gpl-3.0
-4,009,714,034,053,895,700
44.37037
111
0.733878
false
akhileshpillai/treeherder
tests/webapp/api/test_resultset_api.py
2
12700
import copy from django.core.urlresolvers import reverse from rest_framework.test import APIClient from tests import test_utils from treeherder.client import TreeherderResultSetCollection from treeherder.model.models import (FailureClassification, Job, ...
mpl-2.0
-5,041,567,084,023,381,000
30.829574
98
0.61063
false
mescobal/geined
consolidado.py
1
3865
#!/usr/bin/env python #! -*- coding: utf-8 -*- """Listado y creación del consolidado anual""" import cgi import cgitb; cgitb.enable() import funciones import datos import pagina import htm import csv import StringIO def listado(): """Listado de consolidado""" pag = pagina.Pagina("Consolidado anual", 4) prin...
gpl-3.0
-1,405,250,731,700,855,600
37.62
78
0.559037
false
hvnsweeting/Diamond
src/collectors/nagios/test/testnagios.py
35
2557
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from nagios import N...
mit
-597,908,211,141,537,700
30.9625
80
0.507626
false
NewpTone/stacklab-nova
debian/tmp/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py
6
6628
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
8,907,776,850,187,555,000
36.235955
78
0.599578
false
hyperized/ansible
lib/ansible/module_utils/facts/network/openbsd.py
232
1600
# 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 distributed in the hope that ...
gpl-3.0
-4,103,136,341,010,956,300
37.095238
95
0.7425
false
yujikato/DIRAC
src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DirectoryManager/DirectoryTreeBase.py
2
41293
""" DIRAC DirectoryTree base class """ from __future__ import absolute_import from __future__ import division from __future__ import print_function __RCSID__ = "$Id$" import six import time import threading import os import stat from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.DataManagementSystem.DB.FileCatalogC...
gpl-3.0
-1,730,127,434,162,081,000
33.211268
149
0.588187
false
Dev-Cloud-Platform/Dev-Cloud
dev_cloud/cc1/src/wi/tests/main_test.py
2
5683
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
apache-2.0
-475,982,100,918,563,500
34.685535
113
0.633944
false
yanlend/scikit-learn
examples/datasets/plot_iris_dataset.py
283
1928
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= The Iris Dataset ========================================================= This data sets consists of 3 different types of irises' (Setosa, Versicolour, and Virginica) petal and sepal length, stored in a 150x4 numpy...
bsd-3-clause
8,982,145,473,431,464,000
27.761194
72
0.655423
false
jetty-project/FrameworkBenchmarks
toolset/benchmark/test_types/plaintext_type.py
8
2358
from toolset.benchmark.test_types.framework_test_type import FrameworkTestType from toolset.benchmark.test_types.verifications import basic_body_verification, verify_headers from time import sleep class PlaintextTestType(FrameworkTestType): def __init__(self, config): self.plaintext_url = "" kwarg...
bsd-3-clause
-7,511,875,494,952,499,000
30.864865
102
0.540712
false
girving/tensorflow
tensorflow/python/ops/cond_v2.py
1
19004
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,024,098,045,345,669,900
37.862986
80
0.691696
false
onelogin/python-saml
src/onelogin/saml2/metadata.py
1
12340
# -*- coding: utf-8 -*- """ OneLogin_Saml2_Metadata class Copyright (c) 2010-2021 OneLogin, Inc. MIT License Metadata class of OneLogin's Python Toolkit. """ from time import gmtime, strftime, time from datetime import datetime from defusedxml.minidom import parseString from onelogin.saml2.constants import OneLog...
mit
3,680,094,676,359,582,700
42.298246
210
0.58517
false
czhengsci/pymatgen
pymatgen/io/lammps/tests/test_output.py
2
5248
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, \ absolute_import import os import unittest import numpy as np from pymatgen.io.lammps.output import LammpsRun, LammpsLog, LammpsDump _...
mit
8,858,521,344,486,607,000
42.371901
87
0.577553
false
albertomurillo/ansible
lib/ansible/modules/cloud/azure/azure_rm_webappslot.py
9
40667
#!/usr/bin/python # # Copyright (c) 2018 Yunge Zhu, <yungez@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
-6,400,516,954,900,791,000
37.730476
153
0.531881
false
open-synergy/stock-logistics-warehouse
stock_available/models/product_template.py
2
1628
# -*- coding: utf-8 -*- # © 2014 Numérigraphe SARL # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api from openerp.addons import decimal_precision as dp class ProductTemplate(models.Model): _inherit = 'product.template' @api.multi @api.depends('p...
agpl-3.0
1,215,361,201,699,620,600
37.714286
77
0.643296
false
OTWillems/GEO1005
SpatialDecision/external/networkx/algorithms/isomorphism/isomorphvf2.py
76
36794
# -*- coding: utf-8 -*- """ ************* VF2 Algorithm ************* An implementation of VF2 algorithm for graph ismorphism testing. The simplest interface to use this module is to call networkx.is_isomorphic(). Introduction ------------ The GraphMatcher and DiGraphMatcher are responsible for matching graphs or d...
gpl-2.0
-4,460,066,784,446,512,600
37.128497
129
0.586101
false
westinedu/similarinterest
django/utils/http.py
12
7434
import calendar import datetime import re import sys import urllib import urlparse from email.utils import formatdate from django.utils.datastructures import MultiValueDict from django.utils.encoding import smart_str, force_unicode from django.utils.functional import allow_lazy ETAG_MATCH = re.compile(r'(?:W/)?"((?:\...
bsd-3-clause
2,240,052,499,610,463,000
33.576744
83
0.635862
false
dlacombejr/deepy
deepy/utils/initializers.py
2
4016
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np def get_fans(shape): fan_in = shape[0] if len(shape) == 2 else np.prod(shape[1:]) fan_out = shape[1] if len(shape) == 2 else shape[0] return fan_in, fan_out class WeightInitializer(object): """ Initializer for creating weights. ...
mit
2,973,363,724,832,962,000
27.692857
72
0.573456
false
michitomo/ansible-modules-core
packaging/os/redhat_subscription.py
29
16866
#!/usr/bin/python DOCUMENTATION = ''' --- module: redhat_subscription short_description: Manage Red Hat Network registration and subscriptions using the C(subscription-manager) command description: - Manage registration and subscription to the Red Hat Network entitlement platform. version_added: "1.2" author: "Jam...
gpl-3.0
-6,449,662,796,856,098,000
35.506494
161
0.583304
false
brianlsharp/MissionPlanner
Lib/site-packages/numpy/linalg/tests/test_build.py
81
1631
from subprocess import call, PIPE, Popen import sys import re import numpy as np from numpy.linalg import lapack_lite from numpy.testing import TestCase, dec from numpy.compat import asbytes_nested class FindDependenciesLdd: def __init__(self): self.cmd = ['ldd'] try: st = call(self....
gpl-3.0
-1,720,254,437,328,524,000
31.62
79
0.61496
false
sittingbull/artefact.connectors
artefact/connectors/adwords/api/report_field.py
2
1472
class ReportField(object): REPORT_FIELD_TYPES_KNOWN = ['double', 'string', 'date', 'datetime', 'boolean'] REPORT_FIELD_TYPES_FALLBACK = 'string' REPORT_FIELD_TYPE_MAP = { 'money': 'double', 'integer': 'int', 'bid': 'double', 'long': 'int' } def __init__(self, defini...
apache-2.0
382,767,283,652,394,240
31.711111
154
0.606658
false
2014c2g4/2015cda0623
static/Brython3.1.0-20150301-090019/Lib/multiprocessing/__init__.py
693
6866
# # Package analogous to 'threading.py' but using processes # # multiprocessing/__init__.py # # This package is intended to duplicate the functionality (and much of # the API) of threading.py but uses processes instead of threads. A # subpackage 'multiprocessing.dummy' has the same API but is a simple # wrapper for 't...
gpl-3.0
-3,824,946,195,541,241,300
24.524164
79
0.668075
false
ABaldwinHunter/django-clone
tests/forms_tests/tests/test_forms.py
17
154413
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import ( Boolean...
bsd-3-clause
3,051,549,394,321,279,000
45.806794
122
0.588762
false
google/googleapps-message-recall
message_recall/lib/oauth2client/django_orm.py
261
3833
# Copyright (C) 2010 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 or agreed to in writ...
apache-2.0
-1,595,591,232,636,126,200
27.604478
80
0.694234
false
yfdyh000/olympia
apps/amo/cron.py
14
8565
import itertools from datetime import datetime, timedelta from subprocess import Popen, PIPE from django.conf import settings from django.utils import translation from django.db import connection, transaction import cronjobs import commonware.log import amo from amo.utils import chunked from amo.helpers import user_...
bsd-3-clause
3,741,104,273,846,964,000
33.817073
79
0.618447
false
wavefrontHQ/python-client
wavefront_api_client/models/module_layer.py
1
2765
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
apache-2.0
9,094,145,418,465,221,000
30.781609
409
0.56528
false
tsabi/Odoo-tsabi-fixes
addons/l10n_bo/__openerp__.py
114
1779
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
agpl-3.0
8,123,427,026,190,797,000
33.192308
79
0.598089
false
alexgorban/models
research/vid2depth/model.py
5
16378
# 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 applicab...
apache-2.0
-378,245,796,341,218,940
41.986877
80
0.572231
false
lastweek/gem5
src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py
91
4737
# Copyright (c) 2007 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 implemen...
bsd-3-clause
-7,121,462,339,753,888,000
28.981013
72
0.698332
false
simon-pepin/scikit-learn
sklearn/semi_supervised/label_propagation.py
128
15312
# coding=utf8 """ Label propagation in the context of this module refers to a set of semisupervised classification algorithms. In the high level, these algorithms work by forming a fully-connected graph between all points given and solving for the steady-state distribution of labels at each point. These algorithms per...
bsd-3-clause
-1,563,828,953,288,922,000
33.10245
79
0.621016
false
JuliaSprenger/python-neo
neo/test/iotest/test_brainwaresrcio.py
3
13068
""" Tests of neo.io.brainwaresrcio """ import logging import os.path import unittest import numpy as np import quantities as pq from neo.core import (Block, Event, Group, Segment, SpikeTrain) from neo.io import BrainwareSrcIO, brainwaresrcio from neo.test.iotest.common_io_test import BaseTestI...
bsd-3-clause
-1,596,888,692,930,027,300
38.720365
102
0.595654
false
dennis-sheil/commandergenius
project/jni/python/src/Lib/test/test_heapq.py
56
13195
"""Unittests for heapq.""" import random import unittest from test import test_support import sys # We do a bit of trickery here to be able to test both the C implementation # and the Python implementation of the module. # Make it impossible to import the C implementation anymore. sys.modules['_heapq'] = 0 # We must...
lgpl-2.1
-6,174,846,925,579,488,000
33.007732
85
0.56726
false
chromium/chromium
third_party/blink/web_tests/http/tests/websocket/expect-unfragmented_wsh.py
7
1154
# Read 32 messages and verify that they are not fragmented. # This can be removed if the "reassemble small messages" feature is removed. See # https://crbug.com/1086273. from mod_pywebsocket import common from mod_pywebsocket import msgutil NUMBER_OF_MESSAGES = 32 def web_socket_do_extra_handshake(request): # D...
bsd-3-clause
366,798,977,242,418,050
35.0625
87
0.677643
false
smartfile/django-1.4
django/conf/project_template/project_name/settings.py
41
5380
# Django settings for {{ project_name }} project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '',...
bsd-3-clause
1,032,081,707,042,921,900
33.709677
101
0.680112
false
soaplib/soaplib
examples/multiple_services.py
1
1055
from classserializer import UserManager, User from soaplib.core import Application from soaplib.core.model.clazz import ClassModel from soaplib.core.model.primitive import Integer, String from soaplib.core.service import soap, DefinitionBase from soaplib.core.server import wsgi computer_database = {} computerid_seq ...
lgpl-2.1
-6,641,727,588,634,941,000
24.756098
75
0.716588
false
alanljj/oca-partner-contact
account_partner_merge/partner_merge.py
37
1703
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
4,508,805,494,636,485,600
41.575
79
0.616559
false
antonve/s4-project-mooc
lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py
114
6426
# -*- coding: 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 model 'CourseAuthorization' db.create_table('bulk_email_courseauthorization', ( ('id', ...
agpl-3.0
-5,952,370,044,820,813,000
66.642105
182
0.554466
false
robclark/xbmc
lib/libUPnP/Neptune/Extras/Tools/Logging/NeptuneLogConsole.py
22
2839
#!/usr/bin/env python from socket import * from optparse import OptionParser UDP_ADDR = "0.0.0.0" UDP_PORT = 7724 BUFFER_SIZE = 65536 #HEADER_KEYS = ['Logger', 'Level', 'Source-File', 'Source-Function', 'Source-Line', 'TimeStamp'] HEADER_KEYS = { 'mini': ('Level'), 'standard': ('Logger', 'Level', 'Source-Func...
gpl-2.0
5,449,301,233,682,222,000
34.4875
165
0.567101
false
kartikp1995/gnuradio
gr-analog/python/analog/qa_pll_freqdet.py
40
6611
#!/usr/bin/env python # # Copyright 2004,2007,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 ...
gpl-3.0
4,644,895,739,234,520,000
40.062112
79
0.439117
false
etos/django
docs/conf.py
16
12406
# Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't picklable (module imports are okay...
bsd-3-clause
-5,356,771,640,173,593,000
32.439353
105
0.701112
false
babycaseny/audacity
lib-src/lv2/sord/waflib/Tools/gfortran.py
276
1966
#! /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 re from waflib import Utils from waflib.Tools import fc,fc_config,fc_scan,ar from waflib.Configure import conf @conf def find_gfortran(conf): fc=conf.find_program(['gf...
gpl-2.0
1,890,840,450,924,494,300
27.492754
102
0.709054
false