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
SerCeMan/intellij-community
python/lib/Lib/site-packages/django/conf/locale/nn/formats.py
685
1657
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FOR...
apache-2.0
-7,663,121,929,892,323,000
37.534884
81
0.490646
false
slabanja/ase
ase/test/__init__.py
1
3984
import sys import unittest from glob import glob import numpy as np class NotAvailable(SystemExit): def __init__(self, msg, code=0): SystemExit.__init__(self, (msg,code,)) self.msg = msg self.code = code # ------------------------------------------------------------------- # Custom test...
gpl-2.0
4,836,849,556,218,759,000
27.056338
79
0.557229
false
octavioturra/aritial
google_appengine/lib/django/django/contrib/admin/utils.py
33
3621
"Misc. utility functions/classes for admin documentation generator." import re from email.Parser import HeaderParser from email.Errors import HeaderParseError try: import docutils.core import docutils.nodes import docutils.parsers.rst.roles except ImportError: docutils_is_available = False else: do...
apache-2.0
162,816,134,839,681,600
34.5
140
0.63325
false
lpeska/BRDTI
netlaprls.py
1
2811
''' We base the NetLapRLS implementation on the one from PyDTI project, https://github.com/stephenliu0423/PyDTI, changes were made to the evaluation procedure [1] Xia, Zheng, et al. "Semi-supervised drug-protein interaction prediction from heterogeneous biological spaces." BMC systems biology 4.Suppl 2 (2010): S6. De...
gpl-2.0
-5,001,422,388,090,338,000
40.955224
156
0.608324
false
albertodonato/toolrack
toolrack/tests/test_config.py
1
7449
from operator import attrgetter import pytest from ..config import ( Config, ConfigKey, ConfigKeyTypes, InvalidConfigValue, MissingConfigKey, ) class TestConfigKeyTypes: def test_get_converter_unknown_type(self): """An error is raised if type is unknown.""" with pytest.raises...
lgpl-3.0
-941,328,867,736,283,300
35.336585
85
0.57444
false
mick-d/nipype
tools/make_examples.py
10
3014
#!/usr/bin/env python """Run the py->rst conversion and run all examples. This also creates the index.rst file appropriately, makes figures, etc. """ from __future__ import print_function, division, unicode_literals, absolute_import from builtins import open from past.builtins import execfile # -----------------------...
bsd-3-clause
-8,356,474,151,126,147,000
29.14
89
0.536165
false
lief-project/LIEF
examples/python/authenticode/api_example.py
1
2223
#!/usr/bin/env python import lief import sys import os # Parse PE file pe = lief.parse(sys.argv[1]) sep = (":") if sys.version_info.minor > 7 else () # Get authenticode print(pe.authentihash_md5.hex(*sep)) # 1c:a0:91:53:dc:9a:3a:5f:34:1d:7f:9b:b9:56:69:4d print(pe.authentihash(lief.PE.ALGORITHMS.SHA_1).hex(*sep)) # ...
apache-2.0
-2,141,882,747,915,137,500
38.696429
125
0.683761
false
robclark/chromium
chrome/test/webdriver/test/run_webdriver_tests.py
9
9476
#!/usr/bin/env python # Copyright (c) 2011 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 logging import optparse import os import sys import types import unittest from chromedriver_launcher import ChromeDriverLau...
bsd-3-clause
8,846,056,834,166,375,000
34.096296
80
0.647847
false
the-engine-room/replication-sprint-02
crowdataapp/migrations/0009_auto__chg_field_document_stored_validity_rate.py
1
11069
# -*- 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): # Changing field 'Document.stored_validity_rate' db.alter_column(u'crowdataapp_document', 'stored_validity_...
mit
-5,602,460,521,301,749,000
79.80292
400
0.564279
false
VanirAOSP/external_chromium_org
tools/deep_memory_profiler/tests/mock_gsutil.py
131
1558
#!/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 re import sys import zipfile def main(): ZIP_PATTERN = re.compile('dmprof......\.zip') assert len(sys.argv)...
bsd-3-clause
5,369,982,917,557,783,000
29.54902
72
0.607831
false
kevinlondon/youtube-dl
youtube_dl/extractor/jeuxvideo.py
85
1990
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class JeuxVideoIE(InfoExtractor): _VALID_URL = r'http://.*?\.jeuxvideo\.com/.*/(.*?)\.htm' _TESTS = [{ 'url': 'http://www.jeuxvideo.com/reportages-videos-jeux/0004/00046170/tearaway-playstation-vita...
unlicense
-6,721,072,622,530,988,000
34.446429
172
0.573804
false
sacharya/nova
nova/openstack/common/rpc/serializer.py
72
1600
# Copyright 2013 IBM Corp. # # 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 agree...
apache-2.0
-2,485,294,463,701,161,000
29.769231
78
0.68125
false
RyanSkraba/beam
sdks/python/apache_beam/io/gcp/bigquery_io_read_it_test.py
7
2252
# # 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
6,066,251,425,929,830,000
34.746032
74
0.706483
false
elthariel/dff
ui/console/console.py
1
4149
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2010 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
gpl-2.0
5,961,799,795,319,090,000
31.928571
92
0.590986
false
kwurst/grading-scripts
assignmentconvert.py
1
1952
# Copyright (C) 2014 Karl R. Wurst # # 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 program is distributed in ...
gpl-3.0
-1,461,167,914,750,726,700
36.538462
76
0.650102
false
anisridhar/AudioShop
analysisClass.py
1
5377
import pyaudio import wave import sys import time import cv2 import numpy as np import os from Tkinter import * from pydubtest import play, make_chunks from pydub import AudioSegment from threading import Thread from vidAnalysis import vid2SoundFile from eventBasedAnimationClass import EventBasedAnimationClass import i...
mit
-1,557,240,659,029,682,200
30.444444
90
0.7175
false
Cinntax/home-assistant
homeassistant/helpers/state.py
1
8248
"""Helpers that help with state related things.""" import asyncio import datetime as dt import json import logging from collections import defaultdict from types import ModuleType, TracebackType from typing import Awaitable, Dict, Iterable, List, Optional, Tuple, Type, Union from homeassistant.loader import bind_hass,...
apache-2.0
6,869,102,920,101,998,000
29.66171
88
0.639185
false
fxa90id/mozillians
mozillians/users/tests/test_tasks.py
1
11847
from datetime import datetime from django.conf import settings from django.contrib.auth.models import User from django.test.utils import override_settings from basket.base import BasketException from celery.exceptions import Retry from mock import patch from nose.tools import eq_, ok_ from mozillians.common.tests im...
bsd-3-clause
1,835,935,476,286,033,000
41.462366
99
0.589854
false
aladagemre/django-guardian
guardian/core.py
9
5191
from __future__ import unicode_literals from itertools import chain from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.db.models import Q from guardian.utils import get_identity from guardian.utils import get_user_obj_perms_model from guardian.uti...
bsd-2-clause
4,431,847,641,564,421,600
40.198413
80
0.577731
false
yograterol/django
tests/auth_tests/test_basic.py
328
4643
from __future__ import unicode_literals from django.apps import apps from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tests.custom_user import CustomUser from django.core.exceptions import ImproperlyConfigured from django.dispatch import...
bsd-3-clause
-881,401,330,870,592,800
39.025862
84
0.670472
false
dhermes/google-cloud-python
tasks/noxfile.py
34
4095
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-4,940,406,954,807,149,000
29.110294
84
0.63663
false
yestech/gae-django-template
django/contrib/localflavor/fr/forms.py
309
1747
""" FR-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re phone_digits_re = re.com...
bsd-3-clause
-1,115,112,162,775,680,900
33.254902
100
0.63652
false
msabramo/ansible
lib/ansible/modules/packaging/os/pacman.py
5
15028
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Indrajit Raychaudhuri <irc+code@indrajit.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it un...
gpl-3.0
-2,744,254,601,337,594,400
32.321508
270
0.57486
false
rishibarve/incubator-airflow
tests/jobs.py
1
61326
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-6,800,183,360,643,084,000
33.530405
115
0.574177
false
leductan-nguyen/RaionPi
src/octoprint/plugin/core.py
1
42607
# coding=utf-8 """ In this module resides the core data structures and logic of the plugin system. It is implemented in an RaionPi-agnostic way and could be extracted into a separate Python module in the future. .. autoclass:: PluginManager :members: .. autoclass:: PluginInfo :members: .. autoclass:: Plugin ...
agpl-3.0
-19,205,386,692,209,010
33.331185
230
0.708133
false
mungerd/plastex
plasTeX/Base/LaTeX/Index.py
5
13222
#!/usr/bin/env python """ C.11.5 Index and Glossary (p211) """ import string, os from plasTeX.Tokenizer import Token, EscapeSequence from plasTeX import Command, Environment, IgnoreCommand, encoding from plasTeX.Logging import getLogger from Sectioning import SectionUtils try: from pyuca import Collator col...
mit
1,139,842,964,231,324,900
30.183962
92
0.515731
false
nitzmahone/ansible
test/units/modules/network/eos/test_eos_banner.py
55
3617
# 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
-7,322,685,729,992,643,000
42.059524
114
0.683163
false
jacobq/csci5221-viro-project
tests/unit/lib/mock_socket_test.py
45
2309
#!/usr/bin/env python # # Copyright 2011-2012 Andreas Wundsam # # 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 applic...
apache-2.0
6,304,971,189,688,081,000
28.602564
91
0.673019
false
cmisenas/artos
PyARTOS/config.py
2
7158
"""Reads and writes the configuration file of PyARTOS. This module provides access to the configuration given in the file 'pyartos.ini', which is searched for in the current working directory. To access the configuration options, the 'config' object in this module's dictionary can be used, which is an instance of...
gpl-3.0
4,831,734,620,645,749,000
36.702703
124
0.562448
false
JorgeCoock/django
django/contrib/gis/maps/google/__init__.py
287
2771
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...
bsd-3-clause
-1,248,986,223,294,137,300
39.15942
92
0.666546
false
urandu/mfl_api
chul/filters.py
1
2760
import django_filters from .models import ( CommunityHealthUnit, CommunityHealthWorker, CommunityHealthWorkerContact, Status, CommunityHealthUnitContact, Approver, CommunityHealthUnitApproval, CommunityHealthWorkerApproval, ApprovalStatus ) from common.filters.filter_shared import ...
mit
3,575,506,609,307,269,600
30.724138
75
0.752174
false
Pretio/boto
boto/gs/lifecycle.py
157
9086
# Copyright 2013 Google Inc. # # 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, dis- # trib...
mit
-5,630,623,549,038,599,000
39.026432
79
0.607418
false
HybridF5/jacket
jacket/db/sqlalchemy/migrate_repo/versions/036_compute_251_add_numa_topology_to_comput_nodes.py
81
1166
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
7,172,868,707,938,977,000
37.866667
78
0.736707
false
ehirt/odoo
addons/resource/__init__.py
448
1086
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
8,884,400,627,985,877,000
39.222222
79
0.611418
false
chen0031/nupic
nupic/bindings/__init__.py
33
1033
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, 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
8,889,139,551,205,847,000
45.954545
72
0.652469
false
crowdhackathon-transport/optimizers
crowdstance-api/venv/lib/python2.7/site-packages/setuptools/command/bdist_egg.py
286
18718
"""setuptools.command.bdist_egg Build .egg distributions""" # This module should be kept compatible with Python 2.3 import sys, os, marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: # Python 2.7 or >=3.2 from sysconfig import get_path, get_python_version def _g...
mit
1,960,047,681,496,302,300
32.848101
79
0.567048
false
phenoxim/cinder
cinder/api/v2/snapshots.py
3
6696
# 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 with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
5,824,212,714,935,135,000
37.045455
79
0.606481
false
danwchan/trail_of_cthulhu
mythos_website_upgrade/birthcharacter/admin.py
1
1941
from django.contrib import admin from .models import AbilityList, AbilityExamples, OccupationList, DriveList, DriveExamples, AssociatedOccuDrive, AssociatedOccuAbil, SpecialList # Primary keys you care about #primary_keys = [ # 'occupation', # 'drive', # 'ability' # ] # Inline projects to build the editin...
gpl-3.0
8,635,215,398,481,176,000
27.544118
144
0.702731
false
mrunge/horizon
openstack_dashboard/dashboards/admin/metering/urls.py
2
1031
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
-5,958,527,509,451,031,000
43.826087
75
0.741028
false
befair/sbcatalog
api/flaskapp.py
2
2401
# This file is part of sbcatalog # # sbcatalog is Copyright © 2015 beFair.it # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License version 3, as published by # the Free Software Foundation. # # This program is distributed in the hope that ...
agpl-3.0
-4,922,071,561,362,104,000
40.37931
81
0.642917
false
ruibarreira/linuxtrail
usr/lib/python2.7/xml/etree/ElementInclude.py
74
5076
# # ElementTree # $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xinclude support for element trees # # history: # 2003-08-15 fl created # 2003-11-14 fl fixed default loader # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware...
gpl-3.0
9,197,676,049,436,645,000
34.746479
74
0.607565
false
gisweb/plomino.printdocuments
bootstrap-buildout.py
172
6501
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
gpl-3.0
1,815,683,320,820,004,600
33.396825
79
0.620366
false
caot/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geometry/test_data.py
364
2994
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import gzip import os from django.contrib import gis from django.utils import simplejson # This global used to store reference geometry data. GEOMETRIES = None # Path where reference test data is located...
apache-2.0
-2,980,834,686,938,754,000
27.514286
78
0.611556
false
ianzhengnan/learnpy
task_master.py
1
1106
import random, time, queue from multiprocessing.managers import BaseManager from multiprocessing import freeze_support task_queue = queue.Queue() result_queue = queue.Queue() class QueueManager(BaseManager): pass def return_task_queue(): global task_queue return task_queue def return...
apache-2.0
-4,354,926,830,302,793,700
19.72549
77
0.615732
false
9kopb/django-easy-maps
easy_maps/migrations/0005_auto__add_unique_address_address.py
3
1806
# -*- 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): # Removing index on 'Address', fields ['address'] if db.backend_name != 'sqlite3': # South forg...
mit
1,825,776,804,113,828,400
40.045455
130
0.589701
false
eddo888/Tools
parser.py
1
15876
#!/usr/bin/env python2 # $Date$ # $Revision$ # $Author$ # $HeadURL$ # $Id$ import sys, re, os import xml.parsers.expat from xml.dom import minidom from Tools.pretty import * from Tools.colours import Colours tokens = [ ['&amp;' , '####amp####'], ['&' , '&amp;'], ['<' , '&lt;'], ['>' , '&gt;'], ...
mit
-5,552,825,259,485,982,000
28.730337
136
0.473923
false
chenjun0210/tensorflow
tensorflow/contrib/cudnn_rnn/__init__.py
54
1524
# 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,820,304,823,444,089,000
33.636364
83
0.730971
false
mozilla-b2g/fxos-certsuite
mcts/web-platform-tests/tests/tools/wptserve/tests/functional/base.py
293
1831
import base64 import logging import os import unittest import urllib import urllib2 import urlparse import wptserve logging.basicConfig() here = os.path.split(__file__)[0] doc_root = os.path.join(here, "docroot") class Request(urllib2.Request): def __init__(self, *args, **kwargs): urllib2.Request.__init...
mpl-2.0
-643,062,989,662,435,100
29.016393
111
0.555434
false
hanwenyan/ud858
Lesson_4/00_Conference_Central/conference.py
35
3749
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime import ...
gpl-3.0
7,480,339,121,754,663,000
29.233871
93
0.596692
false
bminchew/PySAR
pysar/insar/sarcorrelation.py
1
4976
#!/usr/bin/env python """ sarcorrelation.py : Calculates interferometric correlation usage:: $ sarcorrelation.py int_file amp_input [options] Parameters ---------- int_file : complex interferogram file amp_input : amplitude file(s); one of: -a bip_amp...
gpl-3.0
696,523,402,408,382,300
30.1
97
0.499598
false
liuqr/edx-xiaodun
lms/djangoapps/psychometrics/models.py
38
2026
# # db model for psychometrics data # # this data is collected in real time # from django.db import models from courseware.models import StudentModule class PsychometricData(models.Model): """ This data is a table linking student, module, and module performance, including number of attempts, grade, max g...
agpl-3.0
-1,907,014,464,397,483,800
44.022222
130
0.562685
false
moksha11/xen-hv
dist/install/usr/lib64/python2.6/site-packages/xen/util/utils.py
43
1937
import traceback import sys import os def exception_string(e): (ty,v,tb) = sys.exc_info() return traceback.format_exception_only(ty,v) def daemonize(prog, args, stdin_tmpfile=None): """Runs a program as a daemon with the list of arguments. Returns the PID of the daemonized program, or returns...
gpl-2.0
-3,659,018,382,319,848,000
23.833333
78
0.500774
false
shdxiang/yunba-smartoffice
tests/get_status.py
2
1501
#!/usr/bin/env python import time import sys import logging import argparse from socketIO_client import SocketIO from messenger import Messenger logger = logging.getLogger('get_status') logging.basicConfig(level=logging.DEBUG) APPKEY = '5697113d4407a3cd028abead' #TOPIC = 'yunba_smart_plug' #ALIAS = 'plc_0' class St...
mit
-6,718,916,338,333,225,000
27.865385
102
0.624917
false
calfonso/ansible
lib/ansible/modules/web_infrastructure/django_manage.py
22
11134
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Scott Anderson <scottanderson42@gmail.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': ...
gpl-3.0
-1,560,587,839,478,336,300
35.625
148
0.649093
false
ganeshmurthy/qpid-dispatch
python/qpid_dispatch_internal/tools/__init__.py
7
1221
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-4,032,058,930,197,351,400
41.103448
120
0.745291
false
dlab-berkeley/collaboratool-archive
bsd2/vagrant-ansible/ansible/lib/ansible/runner/action_plugins/debug.py
2
1760
# Copyright 2012, Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versi...
apache-2.0
5,034,036,433,593,402,000
32.846154
92
0.665909
false
embeddedarm/android_external_chromium_org
third_party/android_platform/development/scripts/stack_core.py
50
9531
#!/usr/bin/env python # # Copyright (C) 2013 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 req...
bsd-3-clause
7,700,434,137,084,070,000
41.549107
199
0.637918
false
hfp/tensorflow-xsmm
tensorflow/python/ops/functional_ops.py
3
44679
# 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
7,424,192,598,383,770,000
38.714667
91
0.668233
false
bluecoiner/bluecoin-new
qa/rpc-tests/disablewallet.py
102
1820
#!/usr/bin/env python3 # Copyright (c) 2015-2016 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 API with -disablewallet. # from test_framework.test_framework import BitcoinTestFramework f...
mit
-239,444,178,507,247,170
36.916667
97
0.667033
false
rockyzhang/zhangyanhit-python-for-android-mips
python3-alpha/python3-src/Lib/email/test/test_email_torture.py
85
3657
# Copyright (C) 2002-2004 Python Software Foundation # # A torture test of the email package. This should not be run as part of the # standard Python test suite since it requires several meg of email messages # collected in the wild. These source messages are not checked into the # Python distro, but are available as...
apache-2.0
2,013,427,111,629,872,600
25.121429
79
0.606235
false
ep1cman/workload-automation
wlauto/tests/test_instrumentation.py
5
7244
# Copyright 2013-2015 ARM Limited # # 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 w...
apache-2.0
8,217,612,873,723,125,000
29.825532
104
0.679873
false
salamer/django
django/contrib/gis/geoip/prototypes.py
535
3943
from ctypes import POINTER, Structure, c_char_p, c_float, c_int, string_at from django.contrib.gis.geoip.libgeoip import free, lgeoip # #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('cou...
bsd-3-clause
-1,152,448,507,726,844,300
30.544
87
0.643672
false
damienmg/bazel
third_party/def_parser/def_parser_test.py
17
4087
# Copyright 2017 The Bazel 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 applicable la...
apache-2.0
-2,259,040,881,502,733,000
36.842593
130
0.676046
false
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/boto/services/result.py
153
5596
#!/usr/bin/env python # Copyright (c) 2006,2007 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 rig...
mit
3,630,449,697,623,213,000
40.451852
88
0.602395
false
psychotechnik/mycv
mycv/apps/projects/migrations/0013_auto__add_field_skill_applicant__add_field_client_applicant__add_field.py
1
12221
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Skill.applicant' db.add_column(u'projects_skill', 'applic...
gpl-2.0
-8,670,182,636,055,603,000
74.444444
190
0.553228
false
2013Commons/hue
desktop/core/ext-py/Django-1.4.5/docs/_ext/applyxrefs.py
143
2148
"""Adds xref targets to the top of files.""" import sys import os testing = False DONT_TOUCH = ( './index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines...
apache-2.0
1,275,210,266,804,636,200
23.420455
75
0.512104
false
petersanchez/django-allauth
allauth/socialaccount/views.py
8
3507
from django.contrib import messages from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse, reverse_lazy from django.contrib.auth.decorators import login_required from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from ..account.views im...
mit
-2,675,504,095,613,910,500
33.722772
73
0.639863
false
davidzchen/tensorflow
tensorflow/python/eager/def_function_test.py
1
28978
# 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,999,680,924,349,402,000
29.66455
80
0.649665
false
blooparksystems/odoo
addons/website_slides/models/slides.py
2
25969
# -*- coding: utf-8 -*- import datetime import io import json from PIL import Image import re from urllib import urlencode import urllib2 from urlparse import urlparse from openerp import api, fields, models, SUPERUSER_ID, _ from openerp.tools import image from openerp.exceptions import Warning from openerp.addons.we...
gpl-3.0
-3,853,517,502,678,667,000
48.55916
189
0.610998
false
Ayub-Khan/edx-platform
lms/djangoapps/verify_student/tests/test_models.py
27
36071
# -*- coding: utf-8 -*- from datetime import timedelta, datetime import ddt import json import mock import requests.exceptions import pytz from django.conf import settings from django.db import IntegrityError from django.test import TestCase from mock import patch from nose.tools import assert_is_none, assert_equals, ...
agpl-3.0
-5,600,385,692,779,133,000
40.432681
131
0.66899
false
40223226/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/logging/__init__.py
733
66279
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
gpl-3.0
2,682,146,306,567,428,600
33.737421
89
0.585404
false
magenta/magenta
magenta/pipelines/dag_pipeline_test.py
1
29773
# Copyright 2021 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
525,818,771,944,524,740
32.641808
80
0.603231
false
jgoclawski/django
tests/messages_tests/base.py
319
14243
from django import http from django.contrib.messages import constants, get_level, set_level, utils from django.contrib.messages.api import MessageFailure from django.contrib.messages.constants import DEFAULT_LEVELS from django.contrib.messages.storage import base, default_storage from django.contrib.messages.storage.ba...
bsd-3-clause
7,031,746,378,745,251,000
36.18799
94
0.604718
false
ArcticWarriors/scouting-app-2016
ScoutingWebsite/Scouting2017/model/get_team_metrics.py
2
1861
''' Created on Mar 5, 2017 @author: PJ ''' from django.db.models.aggregates import Avg, Sum from django.db.models.expressions import Case, When def get_team_metrics(team, regional_code): metrics = team.scoreresult_set.filter(competition__code=regional_code).aggregate( ...
mit
-8,228,313,592,155,410,000
41.295455
138
0.475551
false
bringingheavendown/numpy
numpy/distutils/fcompiler/g95.py
229
1379
# http://g95.sourceforge.net/ from __future__ import division, absolute_import, print_function from numpy.distutils.fcompiler import FCompiler compilers = ['G95FCompiler'] class G95FCompiler(FCompiler): compiler_type = 'g95' description = 'G95 Fortran Compiler' # version_pattern = r'G95 \((GCC (?P<gccver...
bsd-3-clause
1,675,645,612,454,257,400
29.644444
105
0.542422
false
liyitest/rr
openstack_dashboard/api/ceilometer.py
13
49091
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
922,808,792,004,095,200
36.588821
79
0.539203
false
vstoykov/django-cms
cms/migrations/0002_auto_start.py
525
20033
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
bsd-3-clause
-526,735,759,091,465,660
54.187328
93
0.456996
false
wevial/bpython
bpython/test/test_line_properties.py
2
10588
import re from bpython.test import unittest from bpython.line import current_word, current_dict_key, current_dict, \ current_string, current_object, current_object_attribute, \ current_from_import_from, current_from_import_import, current_import, \ current_method_definition_name, current_single_word, \ ...
mit
3,930,925,309,451,489,300
33.154839
78
0.588402
false
waytai/p2pool
wstools/MIMEAttachment.py
294
3379
#TODO add the license #I had to rewrite this class because the python MIME email.mime (version 2.5) #are buggy, they use \n instead \r\n for new line which is not compliant #to standard! # http://bugs.python.org/issue5525 #TODO do not load all the message in memory stream it from the disk import re import random impo...
gpl-3.0
-2,123,325,751,531,944,400
29.718182
115
0.572359
false
coleifer/irc
bots/markov.py
3
5130
#!/usr/bin/python import os import pickle import random import re import sys from irc import IRCBot, IRCConnection class MarkovBot(IRCBot): """ Hacking on a markov chain bot - based on: http://code.activestate.com/recipes/194364-the-markov-chain-algorithm/ http://github.com/ericflo/yourmomdotcom ...
mit
5,246,617,683,997,780,000
29.35503
115
0.534113
false
simonolander/euler
euler-126.py
1
1057
from itertools import count def layer(x, y, z, n): return 2*(x*y + y*z + x*z) + 4*(x + y + z + n - 2) * (n - 1) print(layer(3, 2, 1, 1)) # 22 print(layer(3, 2, 1, 2)) # 46 print(layer(3, 2, 1, 3)) # 78 print(layer(3, 2, 1, 4)) # 118 print(layer(5, 1, 1, 1)) # 22 limit = 30000 memo = {} for x in count(1): ...
mit
8,148,229,678,060,357,000
23.581395
64
0.449385
false
licode/scikit-xray
skbeam/core/fitting/models.py
4
5983
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # @author: Li Li (lili@bnl.g...
bsd-3-clause
1,957,733,177,105,586,200
42.671533
79
0.520976
false
DanielleQuinn/studyGroup
scripts/updateCalendar.py
27
6851
####################################################################### # date: 2015-07-28 # author: Thea Van Rossum theavanrossum@gmail.com # functionality: # 1. Creates a Google Calendar API service object # 2. Deletes all events in the calendar in case changes have been # made to existing events # 3. ...
apache-2.0
-5,042,752,143,507,849,000
34.133333
138
0.628813
false
Thraxis/SickRage
sickbeard/providers/torrentbytes.py
1
7783
# Author: Idan Gutman # URL: http://code.google.com/p/sickbeard/ # # 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 of the License, or # (at your ...
gpl-3.0
-579,820,408,553,699,700
38.100503
191
0.510603
false
kokogaga/arducopter
mk/PX4/Tools/genmsg/test/test_genmsg_msg_loader.py
215
29225
# Software License Agreement (BSD License) # # Copyright (c) 2009, Willow Garage, 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...
gpl-3.0
-7,631,231,549,216,794,000
41.726608
141
0.64479
false
ARCCN/elt
server/pox/openflow/libopenflow_01.py
1
126604
# Copyright 2011,2012 James McCauley # # This file is part of POX. # # POX 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. # # POX is d...
bsd-3-clause
7,203,568,719,793,936,000
28.367664
74
0.595384
false
was4444/chromium.src
tools/perf/profile_creators/fast_navigation_profile_extender.py
14
8768
# Copyright 2015 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 time from profile_creators import profile_extender from telemetry.core import exceptions from telemetry.core import util class FastNavigationProfile...
bsd-3-clause
-6,631,524,169,817,016,000
34.787755
80
0.690237
false
Telrik/komimport-2.0
vendor/guzzlehttp/guzzle/docs/conf.py
100
2995
import sys, os from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer lexers['php'] = PhpLexer(startinline=True, linenos=1) lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) primary_domain = 'php' # -- General configuration -----------------------------------------------------...
bsd-3-clause
-4,678,375,126,345,400,000
31.204301
80
0.641402
false
kewisch/bedrock
bedrock/newsletter/tests/test_footer_form.py
3
2110
from funfactory.urlresolvers import reverse from mock import patch from nose.tools import eq_ from pyquery import PyQuery as pq from bedrock.mozorg.tests import TestCase @patch('bedrock.newsletter.utils.get_languages_for_newsletters', lambda *x: set(['en', 'fr', 'pt'])) @patch('lib.l10n_utils.template_is_acti...
mpl-2.0
-8,319,709,939,350,413,000
36.678571
75
0.608531
false
Microsoft/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/isapi/simple.py
23
2490
"""Simple base-classes for extensions and filters. None of the filter and extension functions are considered 'optional' by the framework. These base-classes provide simple implementations for the Initialize and Terminate functions, allowing you to omit them, It is not necessary to use these base-classes - but if you...
apache-2.0
-4,035,626,619,538,003,000
35.617647
82
0.66506
false
datalogistics/libdlt
tools/dlt_xfer.py
1
4008
#!/usr/bin/env python3 import os import argparse import json import libdlt from unis.exceptions import CollectionIndexError from libdlt.util.common import print_progress SYS_PATH="/etc/periscope" USER_DEPOTS=os.path.join(SYS_PATH, "depots.conf") UNIS_URL = "http://unis.crest.iu.edu:8890" XFER_TOTAL = 0 def progress(...
bsd-3-clause
8,300,174,638,794,628,000
37.912621
110
0.545409
false
whitzhu/kolibri
kolibri/auth/test/test_permissions_classes.py
10
5747
from __future__ import absolute_import, print_function, unicode_literals from django.test import TestCase from mock import Mock from ..models import FacilityUser, DeviceOwner, Facility, KolibriAnonymousUser from ..api import KolibriAuthPermissions from ..permissions.base import BasePermissions from ..permissions.gene...
mit
8,803,652,868,043,418,000
45.346774
113
0.708022
false
FedeDR/django-oscar-paypal
paypal/payflow/models.py
9
3364
from __future__ import unicode_literals import re from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext from paypal.payflow import codes from paypal import base @python_2_unicod...
bsd-3-clause
-1,132,983,771,953,467,100
35.172043
96
0.616825
false
Ban3/Limnoria
plugins/Dict/__init__.py
4
2289
### # Copyright (c) 2004, Jeremiah Fincher # 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...
bsd-3-clause
-3,868,354,150,566,165,000
37.79661
79
0.760594
false
kennedyshead/home-assistant
homeassistant/components/smarthab/config_flow.py
2
2392
"""SmartHab configuration flow.""" import logging import pysmarthab import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from . import DOMAIN _LOGGER = logging.getLogger(__name__) class SmartHabConfigFlow(config_entries.ConfigFlow, domain=DOMA...
apache-2.0
9,158,663,498,396,323,000
29.666667
88
0.58194
false
sql-machine-learning/sqlflow
python/runtime/pai/submitter_evaluate.py
1
4277
# Copyright 2020 The SQLFlow 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 applicable law o...
apache-2.0
8,518,427,084,068,251,000
40.931373
79
0.611644
false
hgrimelid/feincms
feincms/views/base.py
1
3756
from django.contrib.auth.decorators import permission_required from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.utils.cache import add_never_cache_headers try: from django.template.response import TemplateResponse except ImportError: Templ...
bsd-3-clause
-1,696,824,816,090,143,000
31.66087
98
0.647764
false
charlesbastos/ArduPilotMega_demo
Tools/LogAnalyzer/LogAnalyzer.py
74
12240
#!/usr/bin/env python # # A module to analyze and identify any common problems which can be determined from log files # # Initial code by Andrew Chapman (amchapman@gmail.com), 16th Jan 2014 # # some logging oddities noticed while doing this, to be followed up on: # - tradheli MOT labels Mot1,Mot2,Mot3,Mot4,GGain # ...
gpl-3.0
-2,479,926,188,697,281,000
46.8125
179
0.600572
false
MoamerEncsConcordiaCa/tensorflow
tensorflow/python/saved_model/builder.py
126
1271
# 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
-1,713,068,632,878,346,500
35.314286
80
0.722266
false
mpharrigan/mdtraj
mdtraj/geometry/distance.py
1
11815
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2015 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: Kyle A Beauchamp, Jason Swails...
lgpl-2.1
-2,654,320,538,677,725,700
40.024306
158
0.588489
false