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
Esri/community-addresses-python
source/arcrest/ags/featureservice.py
2
11788
from base import BaseAGSServer import layer from filters import LayerDefinitionFilter, GeometryFilter, TimeFilter ######################################################################## class FeatureService(BaseAGSServer): """ contains information about a feature service """ _url = None _currentVersion = N...
apache-2.0
394,119,322,188,927,740
37.526144
101
0.443841
false
sebrandon1/neutron
neutron/agent/linux/daemon.py
10
8106
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
apache-2.0
4,487,266,572,756,564,000
30.418605
78
0.590674
false
MihaiMoldovanu/ansible
lib/ansible/modules/network/avi/avi_backupconfiguration.py
27
4642
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # # 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...
gpl-3.0
-7,698,315,173,852,948,000
31.236111
102
0.640457
false
Nowheresly/odoo
addons/hr_gamification/wizard/grant_badge.py
195
2525
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
4,619,929,680,565,425,000
41.083333
113
0.571485
false
richardliaw/ray
python/ray/tests/test_runtime_context.py
1
2279
import ray import os import signal import time import sys def test_was_current_actor_reconstructed(shutdown_only): ray.init() @ray.remote(max_restarts=10) class A(object): def __init__(self): self._was_reconstructed = ray.get_runtime_context( ).was_current_actor_reconstruc...
apache-2.0
-935,065,272,194,276,400
32.028986
77
0.641071
false
awahlig/skype4py
Skype4Py/lang/lt.py
69
6414
apiAttachAvailable = u'API Available' apiAttachNotAvailable = u'Not Available' apiAttachPendingAuthorization = u'Pending Authorization' apiAttachRefused = u'Refused' apiAttachSuccess = u'Success' apiAttachUnknown = u'Unknown' budDeletedFriend = u'Deleted From Friendlist' budFriend = u'Friend' budNeverBeenFriend = u'Nev...
bsd-3-clause
8,519,046,525,296,658,000
33.299465
73
0.799189
false
deepakselvaraj/federated-horizon
openstack_dashboard/dashboards/admin/info/tabs.py
1
4164
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
apache-2.0
3,769,655,738,977,180,700
32.580645
78
0.646974
false
weilu/Hadoop-Resource-Aware-Scheduler
common/build/contrib/hod/hodlib/Common/hodsvc.py
182
8438
#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 use thi...
apache-2.0
5,018,280,392,220,353,000
36.008772
82
0.57324
false
FlaPer87/qpid-proton
examples/python/reactor/unhandled.py
4
1227
#!/usr/bin/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 # "Lice...
apache-2.0
1,230,418,990,511,210,500
35.088235
70
0.745721
false
cloudsidekick/vcloudpy
vcloudpy/vcloudpy.py
1
10080
######################################################################### # Copyright 2013 Cloud Sidekick # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
apache-2.0
7,799,849,399,042,436,000
37.181818
318
0.583829
false
google/ci_edit
app/parser.py
1
44726
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
8,835,021,043,116,245,000
39.328224
88
0.496534
false
niteoweb/libcloud
libcloud/test/storage/test_s3.py
10
39819
# 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 use ...
apache-2.0
-1,982,346,436,016,577,000
38.424752
88
0.56576
false
svagionitis/youtube-dl
youtube_dl/extractor/sport5.py
4
3251
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class Sport5IE(InfoExtractor): _VALID_URL = r'http://(?:www|vod)?\.sport5\.co\.il/.*\b(?:Vi|docID)=(?P<id>\d+)' _TESTS = [ { 'url': 'http://vod.sport5.co...
unlicense
-3,268,892,657,886,852,000
33.467391
116
0.502839
false
chris-wood/ndnSIM
.waf-tools/doxygen.py
67
6272
#! /usr/bin/env python # encoding: UTF-8 # Thomas Nagy 2008-2010 (ita) """ Doxygen support Variables passed to bld(): * doxyfile -- the Doxyfile to use When using this tool, the wscript will look like: def options(opt): opt.load('doxygen') def configure(conf): conf.load('doxygen') # check conf.env.DOXYGEN...
gpl-3.0
-1,489,065,448,620,793,300
28.308411
135
0.649713
false
Aravinthu/odoo
addons/membership/__manifest__.py
38
1228
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Membership Management', 'version': '1.0', 'category': 'Sales', 'description': """ This module allows you to manage all operations for managing memberships. ====================================...
agpl-3.0
-8,929,570,101,600,180,000
30.487179
87
0.578176
false
andyzsf/django-cms
cms/menu.py
6
15710
# -*- coding: utf-8 -*- from django.utils.translation import get_language from cms import constants from cms.apphook_pool import apphook_pool from cms.utils.permissions import load_view_restrictions, has_global_page_permission from cms.utils import get_language_from_request from cms.utils.conf import get_cms_setting f...
bsd-3-clause
7,270,507,652,183,873,000
37.116505
103
0.572275
false
lukeiwanski/tensorflow
tensorflow/python/kernel_tests/constant_op_test.py
16
34602
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-2,125,553,384,815,715,000
36.326861
80
0.627247
false
citrix-openstack-build/python-keystoneclient
keystoneclient/v2_0/roles.py
4
3130
# Copyright 2011 OpenStack LLC. # Copyright 2011 Nebula, 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/LICENS...
apache-2.0
2,433,845,845,748,123,000
34.568182
78
0.600958
false
Gus42/Conference-Organization-App
conference.py
1
35146
#!/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 ...
apache-2.0
7,905,612,813,404,146,000
37.243743
112
0.610966
false
TeslaProject/external_chromium_org
tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper.py
25
9850
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import glob import hashlib import logging import os import platform import re import shutil import subprocess from telemetry import decorators from telemetr...
bsd-3-clause
7,142,522,979,912,684,000
35.6171
80
0.680609
false
jackylee0424/dfr
tornado/platform/interface.py
387
2244
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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 a...
mit
-3,761,625,845,131,087,000
34.619048
80
0.694742
false
flotre/sickbeard-vfvo
lib/hachoir_parser/common/msdos.py
90
1463
""" MS-DOS structures. Documentation: - File attributes: http://www.cs.colorado.edu/~main/cs1300/include/ddk/winddk.h """ from lib.hachoir_core.field import StaticFieldSet from lib.hachoir_core.field import Bit, NullBits _FIELDS = ( (Bit, "read_only"), (Bit, "hidden"), (Bit, "system"), (NullBits, "...
gpl-3.0
6,943,576,195,616,262,000
22.596774
62
0.525632
false
gardner/youtube-dl
youtube_dl/extractor/hearthisat.py
108
4326
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_request, compat_urlparse, ) from ..utils import ( HEADRequest, str_to_int, urlencode_postdata, urlhandle_detect_ext, ) class HearThisAtIE(InfoExtractor): ...
unlicense
292,409,938,904,519,900
35.974359
99
0.525428
false
credativUK/OCB
addons/base_calendar/__openerp__.py
58
2107
# -*- 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
-6,509,496,914,223,909,000
35.964912
133
0.59421
false
shyamalschandra/scikit-learn
doc/sphinxext/numpy_ext/docscrape.py
108
15435
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from warnings import warn # Try Python 2 first, otherwise load from Python 3 try: from StringIO import StringIO except: from io import StringIO class Reader(object): """A line-based s...
bsd-3-clause
-5,797,727,995,152,349,000
29.205479
78
0.474441
false
haroldl/homeworklog
djangoappengine/mail.py
50
3162
from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from django.core.mail import EmailMultiAlternatives from django.core.exceptions import ImproperlyConfigured from google.appengine.api import mail as aeemail from google.appengine.runtime import apiproxy_errors def _send_def...
bsd-3-clause
7,514,909,983,685,544,000
36.2
77
0.575901
false
kubkon/DM-Simulator
analyze.py
1
4777
#!/usr/bin/env python # encoding: utf-8 """ analyze.py Created by Jakub Konka on 2012-10-23. Copyright (c) 2012 University of Strathclyde. All rights reserved. """ import argparse import csv import numpy as np import os import os.path import scipy.stats as stats import sys ### Parse command line arguments parser = a...
mit
-6,277,704,938,810,138,000
36.912698
114
0.627381
false
sometallgit/AutoUploader
Python27/Lib/distutils/tests/test_build_ext.py
5
20119
import sys import os from StringIO import StringIO import textwrap from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests import support from distutils.errors import (DistutilsSetupError, CompileError, ...
mit
-6,563,274,824,875,624,000
37.468451
83
0.584622
false
yashu-seth/networkx
networkx/algorithms/tests/test_euler.py
54
2973
#!/usr/bin/env python # run with nose: nosetests -v test_euler.py from nose.tools import * import networkx as nx from networkx import is_eulerian,eulerian_circuit class TestEuler: def test_is_eulerian(self): assert_true(is_eulerian(nx.complete_graph(5))) assert_true(is_eulerian(nx.complete_graph(...
bsd-3-clause
-8,699,727,090,639,512,000
29.649485
65
0.568113
false
thedekel/flask-auth
examples/sqlalchemy_model.py
1
2406
from flask import Flask, request, redirect, url_for from flask.ext.sqlalchemy import SQLAlchemy from flaskext.auth import Auth, login_required, logout from flaskext.auth.models.sa import get_user_class app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' db = SQLAlchemy(app) auth = Au...
mit
-5,925,795,288,053,814,000
32.416667
87
0.593101
false
steinsag/hosteurope-letsencrypt
neu.py
1
1584
#!/usr/bin/env python3 # coding=utf-8 import json import os from shared import domain_list, config_file # certbot tries to write to /var/log/letsencrypt by default; because of this, running as root is required. # certbot Error Message: # Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable...
apache-2.0
-8,905,589,023,466,916,000
30.039216
106
0.698042
false
pkuyym/Paddle
python/paddle/fluid/tests/unittests/op_test.py
2
21957
# Copyright (c) 2018 PaddlePaddle 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 app...
apache-2.0
8,343,985,241,773,808,000
37.319372
80
0.520608
false
Kazade/NeHe-Website
google_appengine/lib/django-0.96/django/core/mail.py
32
4253
# Use this module for e-mailing. from django.conf import settings from email.MIMEText import MIMEText from email.Header import Header from email.Utils import formatdate import smtplib import socket import time import random # Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of # seconds, which...
bsd-3-clause
8,903,947,972,080,728,000
38.37963
136
0.658594
false
iambibhas/django
django/contrib/gis/tests/geoapp/test_regress.py
28
3858
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.shortcuts import render_to_kmz from django.contrib.gis.tests.utils import no_oracle from django.db.models import Count, Min from django.test import TestC...
bsd-3-clause
-8,359,255,393,645,348,000
41.855556
110
0.651283
false
anisyonk/pilot
HPC/HPCManager.py
3
20132
import commands import os import shutil import sys import time import traceback import json import pickle from Logger import Logger import logging logging.basicConfig(level=logging.DEBUG) class HPCManager: def __init__(self, logFileName=None): self.__globalWorkingDir = None self.__localWorkingDir...
apache-2.0
5,759,876,556,891,450,000
41.925373
321
0.572869
false
recsm/SQP
sqp/migrations/0044_import_questions_jorge.py
1
30530
# encoding: utf-8 import os import datetime import re import codecs from south.db import db from south.v2 import DataMigration from django.db import models from django.conf import settings from sqp import models as sqp_models class Migration(DataMigration): def forwards(self, orm): try: sql...
mit
8,094,038,231,449,045,000
63.815287
182
0.519228
false
ArtUrim/elf2MockCreator
findUndefs.py
1
2186
# ######################################################################## # elf2MockCreator/findUndefs # # Find undefined symbols reffered in the elf object # # Artur Lozinski (lozinski dot artur at gmail dor com) # This code is the public domain # ######################################################################...
gpl-3.0
-4,342,781,872,272,854,000
32.121212
91
0.540714
false
SYSTRAN/geographic-api-python-client
systran_geographic_api/models/mail.py
1
1743
#!/usr/bin/env python # coding: utf-8 """ Copyright 2015 SYSTRAN Software, 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/licen...
apache-2.0
6,558,141,497,119,906,000
28.542373
101
0.59323
false
Nuos/python-docx
tests/image/test_gif.py
9
1224
# encoding: utf-8 """ Test suite for docx.image.gif module """ from __future__ import absolute_import, print_function import pytest from docx.compat import BytesIO from docx.image.constants import MIME_TYPE from docx.image.gif import Gif from ..unitutil.mock import initializer_mock class DescribeGif(object): ...
mit
-9,159,348,734,953,982,000
26.2
70
0.613562
false
olasitarska/django
django/contrib/gis/forms/widgets.py
39
3682
from __future__ import unicode_literals import logging from django.conf import settings from django.contrib.gis import gdal from django.contrib.gis.geos import GEOSGeometry, GEOSException from django.forms.widgets import Widget from django.template import loader from django.utils import six from django.utils import t...
bsd-3-clause
-6,066,016,336,003,402,000
29.683333
90
0.576046
false
tedi3231/openerp
openerp/addons/stock/wizard/stock_fill_inventory.py
12
6502
# -*- 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,780,465,935,644,894,000
42.932432
180
0.576438
false
aio-libs/aiomysql
examples/example_ssl.py
1
1347
import asyncio import ssl import aiomysql ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) ctx.check_hostname = False ctx.load_verify_locations(cafile='../tests/ssl_resources/ssl/ca.pem') async def main(): async with aiomysql.create_pool( host='localhost', port=3306, user='root', password='rootpw...
mit
8,928,918,910,717,193,000
34.447368
71
0.558278
false
gautam1858/tensorflow
tensorflow/contrib/training/python/training/sampling_ops_threading_test.py
25
2886
# 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
-4,023,316,949,231,106,000
36.480519
97
0.705821
false
fxia22/ASM_xf
PythonD/lib/python2.4/test/test_marshal.py
13
7142
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- from test import test_support import marshal import sys import unittest import os class IntTestCase(unittest.TestCase): def test_ints(self): # Test the full range of Python ints. n = sys.maxint while n: for expected in (-n, n):...
gpl-2.0
-1,153,361,895,748,557,000
35.070707
79
0.547186
false
lypnol/graph-theory
problem-01/submissions/ayoub.py
1
3170
from submission import Submission import random import networkx as nx class AyoubSubmission(Submission): def author(self): return 'ayoub' def run(self, input): graph, start = input V = set() # Noeuds visités S = list(graph.keys()) # Liste de tous les noeuds dan...
mit
4,263,970,677,070,131,700
36.035294
107
0.523507
false
fraferra/PlayPaloAltoServer
play_api/urls.py
3
2087
from django.conf.urls import patterns, url from django.core.urlresolvers import reverse_lazy from django.views.generic import RedirectView from play_api import views urlpatterns = patterns('', url(r'^api/registration/$', views.api_registration ,name='api_registration'), url(r'^api/facebook_auth/$', views.f...
mit
66,750,063,028,766,080
51.175
96
0.666028
false
BruceDLong/CodeDog
Scons/scons-local-4.1.0.post1/SCons/Tool/mwld.py
5
3576
"""SCons.Tool.mwld Tool-specific initialization for the Metrowerks CodeWarrior linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to an...
gpl-2.0
5,655,016,546,600,361,000
32.111111
135
0.684004
false
CLVsol/odoo_web2py_connector
models/menu.py
1
6416
# -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations ######################################################################### ## Customize your APP title, subtitle and menus here ######################################################################### # response.lo...
agpl-3.0
5,254,211,389,635,487,000
44.183099
89
0.482232
false
xchenum/quantum-bug
quantum/plugins/cisco/common/cisco_credentials_v2.py
9
3007
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
apache-2.0
-8,098,026,693,484,370,000
35.670732
78
0.66844
false
williballenthin/python-idb
scripts/extract_function_names.py
1
1585
#!/usr/bin/env python3 """ Extract the names of functions within the given IDA Pro database. author: Willi Ballenthin email: willi.ballenthin@gmail.com """ import argparse import logging import sys import idb import idb.analysis import idb.netnode logger = logging.getLogger(__name__) def main(arg...
apache-2.0
7,134,957,678,080,381,000
25.807018
87
0.627129
false
VenturaDelMonte/staticwebanalyzer
SDK/googlemaps-1.0.2/setup.py
3
1741
#!/usr/bin/env python # Copyright 2009 John Kleint # # This is free software, licensed under the Lesser Affero General # Public License, available in the accompanying LICENSE.txt file. """ Distutils setup script for googlemaps module. """ from distutils.core import setup import sys sys.path.insert(0, 'googlemaps...
mit
-6,399,534,143,466,032,000
36.847826
114
0.631821
false
johankaito/fufuka
microblog/old-flask/venv/lib/python2.7/site-packages/setuptools/command/upload_docs.py
390
6782
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError from distutils.command.upload import upload import os import s...
apache-2.0
-2,771,920,163,495,129,000
34.694737
79
0.554704
false
ralphbean/bugwarrior
tests/base.py
1
3350
from builtins import object import shutil import os.path import tempfile import unittest import configparser from unittest import mock import responses from bugwarrior import config from bugwarrior.data import BugwarriorData class AbstractServiceTest(object): """ Ensures that certain test methods are implemente...
gpl-3.0
-5,588,067,799,746,816,000
28.910714
79
0.624776
false
slohse/ansible
test/units/modules/network/f5/test_bigiq_application_fastl4_udp.py
21
5491
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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 import os import json import pytest import sys from nose.plugins.skip i...
gpl-3.0
-2,357,371,493,066,953,000
32.078313
92
0.599344
false
Neural-Network/TicTacToe
pybrain/rl/environments/shipsteer/shipsteer.py
31
4170
__author__ = 'Martin Felder, felder@in.tum.de' from scipy import random from pybrain.tools.networking.udpconnection import UDPServer import threading from pybrain.utilities import threaded from time import sleep from pybrain.rl.environments.environment import Environment class ShipSteeringEnvironment(Environment): ...
bsd-3-clause
4,586,759,278,276,096,000
31.325581
93
0.569065
false
comealong/skyeye-plus
android/tools/gen-hw-config.py
25
4283
#!/usr/bin/env python # # This software is licensed under the terms of the GNU General Public # License version 2, as published by the Free Software Foundation, and # may be copied, distributed, and modified under those terms. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANT...
gpl-2.0
2,885,301,569,009,133,000
27.177632
84
0.642774
false
yakky/django
django/forms/forms.py
141
19457
""" Form classes """ from __future__ import unicode_literals import copy from collections import OrderedDict from django.core.exceptions import NON_FIELD_ERRORS, ValidationError # BoundField is imported for backwards compatibility in Django 1.9 from django.forms.boundfield import BoundField # NOQA from django.forms...
bsd-3-clause
2,852,544,061,717,180,000
39.200413
113
0.570026
false
py-chemist/web_apps
mol2chemfig/options.py
3
9150
''' option declarations. The options will be used to update the settings dict in module common. ''' from optionparser import * def getParser(): ''' make sure the parser is created anew on each request ''' parser = OptionParser() parser.append(BoolOption( "help", ...
gpl-3.0
-8,394,151,282,715,934,000
37.940426
159
0.442186
false
michalliu/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/test/test_asyncio/test_events.py
17
87937
"""Tests for events.py.""" import functools import gc import io import os import platform import re import signal import socket try: import ssl except ImportError: ssl = None import subprocess import sys import threading import time import errno import unittest from unittest import mock import weakref import...
gpl-2.0
6,904,542,320,765,932,000
35.87086
81
0.597712
false
arpho/mmasgis5
mmasgis/albero.py
1
16405
""" /*************************************************************************** Albero A QGIS plugin permette di selezionare rapidamente gli elementi di un progetto qgis tramite una struttura ad albero ------------------- begin : 2012-04-06 author : (C) 2012 by Giuseppe D'Amico email ...
mit
-5,546,316,462,059,433,000
35.214128
283
0.682231
false
saurabh6790/omn-app
accounts/doctype/gl_entry/gl_entry.py
14
6905
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import flt, fmt_money, getdate from webnotes import _ class DocType: def __init__(self,d,dl): self.doc, sel...
agpl-3.0
-3,766,237,483,705,752,000
41.62963
92
0.69008
false
eruffaldi/protosim
protorec/protocols.py
1
19699
import struct import array class proto_env: id = 0 name = "env" size = 4 bytesize = 33 hash = "a7c9bdbae9b7c692af5d65a935fa8c78" meta = (("time",1,"double"),("camera",3,"double"),) def __init__(self): self.time = 0.0; self.camera = array.array('d',[0 for i in range(0,3)]); def decode(self,data): if len(da...
mit
-3,321,578,385,327,830,000
30.670418
269
0.648612
false
yaojingwu1992/XlsxWriter
xlsxwriter/test/comparison/test_autofilter06.py
8
2859
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
4,395,176,329,649,050,000
28.78125
79
0.552991
false
kseistrup/qtile
libqtile/pangocffi.py
2
6789
# Copyright (c) 2014-2015 Sean Vig # Copyright (c) 2014 roger # Copyright (c) 2014 Tycho Andersen # Copyright (c) 2015 Craig Barnes # # 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 r...
mit
-4,780,406,966,801,210,000
35.111702
93
0.692296
false
bak1an/django
tests/forms_tests/widget_tests/test_timeinput.py
47
1735
from datetime import time from django.forms import TimeInput from django.test import override_settings from django.utils import translation from .base import WidgetTest class TimeInputTest(WidgetTest): widget = TimeInput() def test_render_none(self): self.check_html(self.widget, 'time', None, html=...
bsd-3-clause
-7,205,766,293,288,358,000
35.145833
106
0.583862
false
knehez/edx-platform
pavelib/servers.py
43
9473
""" Run and manage servers for local development. """ from __future__ import print_function import argparse from paver.easy import * from .assets import collect_assets from .utils.cmd import django_cmd from .utils.process import run_process, run_multi_processes DEFAULT_PORT = {"lms": 8000, "studio": 8001} DEFAULT_SE...
agpl-3.0
8,616,919,781,809,527,000
34.612782
115
0.642669
false
vipul-sharma20/oh-mainline
vendor/packages/sphinx/sphinx/websupport/__init__.py
16
19132
# -*- coding: utf-8 -*- """ sphinx.websupport ~~~~~~~~~~~~~~~~~ Base Module for web support functions. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import cPickle as pickle import posixpath from os import path from jinja2...
agpl-3.0
-3,869,017,301,834,792,400
40.772926
80
0.580023
false
pinterest/thrift-tools
thrift_tools/tests/test_basic.py
1
6186
from collections import deque import unittest from thrift_tools.sniffer import Sniffer from thrift_tools.stream_handler import StreamHandler from thrift_tools.thrift_struct import ThriftField, ThriftStruct from .util import get_pcap_path class BasicTestCase(unittest.TestCase): def setUp(self): pass ...
apache-2.0
-5,531,886,598,577,072,000
36.95092
100
0.5742
false
waynesun09/virt-test
virttest/remote_commander/remote_runner.py
14
25909
#!/usr/bin/env python ''' Created on Dec 6, 2013 :author: jzupka ''' import os import sys import select import time import stat import gc import logging import traceback import subprocess import string import random import shutil import signal import remote_interface import messenger as ms def daemonize(pipe_root...
gpl-2.0
1,712,239,154,812,980,700
33.68407
85
0.50056
false
h3biomed/ansible
lib/ansible/modules/identity/keycloak/keycloak_clienttemplate.py
32
15139
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, Eike Frost <ei@kefro.st> # 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,506,126,172,518,170,000
36.19656
114
0.607504
false
brakhane/python-mode
pymode/libs3/rope/refactor/suites.py
16
4794
from rope.base import ast def find_visible(node, lines): """Return the line which is visible from all `lines`""" root = ast_suite_tree(node) return find_visible_for_suite(root, lines) def find_visible_for_suite(root, lines): if len(lines) == 1: return lines[0] line1 = lines[0] line2 ...
lgpl-3.0
429,894,985,887,452,000
30.748344
78
0.586358
false
wangyum/mxnet
example/ssd/dataset/imdb.py
56
3859
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
5,138,978,967,521,832,000
29.385827
81
0.545996
false
andresailer/DIRAC
Core/Base/API.py
1
5421
""" DIRAC API Base Class """ __RCSID__ = '$Id$' import pprint import sys from DIRAC import gLogger, gConfig, S_OK, S_ERROR from DIRAC.Core.Security.ProxyInfo import getProxyInfo, formatProxyInfoAsString from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getDNForUsername from DIRAC.Core.Utilities.Version i...
gpl-3.0
-3,649,864,643,911,173,600
34.664474
94
0.616307
false
svogl/mbed-os
tools/host_tests/host_tests_plugins/module_copy_firefox.py
128
2907
""" mbed SDK Copyright (c) 2011-2013 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 wr...
apache-2.0
-5,294,131,876,323,321,000
37.25
104
0.668387
false
sarakha63/persomov
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/radiofrance.py
163
2089
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class RadioFranceIE(InfoExtractor): _VALID_URL = r'^https?://maison\.radiofrance\.fr/radiovisions/(?P<id>[^?#]+)' IE_NAME = 'radiofrance' _TEST = { 'url': 'http://maison.radiofrance.fr/radiovisio...
gpl-3.0
9,114,662,398,767,614,000
34.288136
277
0.529779
false
RuudBurger/CouchPotatoServer
libs/guessit/transfo/guess_idnumber.py
102
2224
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
-6,766,431,930,355,873,000
30.323944
77
0.647932
false
mitocw/edx-platform
pavelib/paver_tests/test_assets.py
4
15231
"""Unit tests for the Paver asset tasks.""" import os from unittest import TestCase import ddt import paver.tasks import six from mock import patch from paver.easy import call_task, path from watchdog.observers import Observer from pavelib.assets import COLLECTSTATIC_LOG_DIR_ARG, collect_assets from ..utils.envs i...
agpl-3.0
8,341,379,516,608,814,000
38.356589
111
0.57035
false
cjhak/b2share
invenio/b2share/modules/docs/views.py
2
2431
"""SimpleStore Flask Blueprint""" from flask import Blueprint, render_template from flask.ext.breadcrumbs import register_breadcrumb from invenio.base.i18n import _ from flask import redirect import markdown, os CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) blueprint = Blueprint('docs', __name__, url_pref...
gpl-2.0
-7,859,502,589,860,170,000
40.20339
85
0.703826
false
shajrawi/swift
utils/gyb_syntax_support/AttributeNodes.py
4
8942
from Child import Child from Node import Node # noqa: I201 ATTRIBUTE_NODES = [ # token-list -> token? token-list? Node('TokenList', kind='SyntaxCollection', element='Token'), # token-list -> token token-list? Node('NonEmptyTokenList', kind='SyntaxCollection', element='Token', omit_w...
apache-2.0
4,429,870,212,763,630,600
43.71
79
0.524938
false
tdyas/pants
src/python/pants/engine/collection_test.py
1
3689
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.engine.collection import Collection, DeduplicatedCollection class Examples(Collection[int]): """A new type to ensure that subclassing works properly.""" class Examples2(...
apache-2.0
-2,044,524,285,191,513,900
29.237705
89
0.634047
false
fedosov/django-smuggler
smuggler/forms.py
1
4049
# Copyright (c) 2009 Guilherme Gondim and contributors # # This file is part of Django Smuggler. # # Django Smuggler is free software under terms of the GNU Lesser # General Public License version 3 (LGPLv3) as published by the Free # Software Foundation. See the file README for copying conditions. import os.path from ...
lgpl-3.0
-3,453,503,708,895,682,000
34.208696
75
0.566807
false
orekyuu/intellij-community
python/helpers/pydev/tests/test_check_pydevconsole.py
41
4796
import threading import unittest import pydevconsole from pydev_imports import xmlrpclib, SimpleXMLRPCServer import sys from pydev_localhost import get_localhost from pydev_ipython_console_011 import get_pydev_frontend try: raw_input raw_input_name = 'raw_input' except NameError: raw_input_name = 'input' ...
apache-2.0
4,431,482,966,708,448,000
38.966667
143
0.503962
false
gautam1858/tensorflow
tensorflow/contrib/learn/python/learn/estimators/estimator.py
14
62926
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
2,499,883,040,128,967,000
39.029262
152
0.64695
false
40223141/lego
static/Brython3.1.1-20150328-091302/Lib/importlib/__init__.py
610
3472
"""A pure Python implementation of import.""" __all__ = ['__import__', 'import_module', 'invalidate_caches'] # Bootstrap help ##################################################### # Until bootstrapping is complete, DO NOT import any modules that attempt # to import importlib._bootstrap (directly or indirectly). Since...
agpl-3.0
-3,012,894,658,117,746,000
34.793814
80
0.666187
false
losnikitos/googleads-python-lib
examples/dfp/v201505/line_item_service/get_recently_updated_line_items.py
4
2426
#!/usr/bin/python # # Copyright 2015 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 b...
apache-2.0
-6,126,845,329,684,619,000
31.783784
80
0.647568
false
alu0100207385/dsi_3Django
django/contrib/admin/sites.py
91
18706
from functools import update_wrapper from django.http import Http404, HttpResponseRedirect from django.contrib.admin import ModelAdmin, actions from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.auth import logout as auth_logout, REDIRECT_FIELD_NAME from django.contrib.contenttypes impor...
bsd-3-clause
-4,589,133,776,382,696,400
40.384956
121
0.560943
false
sodafree/backend
build/ipython/scripts/ipython_win_post_install.py
1
5291
#!python """Windows-specific part of the installation""" from __future__ import print_function import os, sys, shutil pjoin = os.path.join # import setuptools if we can try: import setuptools except ImportError: pass def mkshortcut(target,description,link_file,*args,**kw): """make a shortcut if it does...
bsd-3-clause
4,337,728,054,128,389,000
34.039735
112
0.603289
false
DamCB/tyssue
tyssue/utils/utils.py
2
12124
import warnings import numpy as np import logging import pandas as pd logger = logging.getLogger(name=__name__) def _to_2d(df): df_2d = to_nd(df, 2) return df_2d def _to_3d(df): df_3d = to_nd(df, 3) return df_3d def to_nd(df, ndim): """ Give a new shape to an input data by duplicating its...
gpl-3.0
-2,898,487,457,826,626,600
27.195349
87
0.599472
false
MediaSapiens/autonormix
django/contrib/gis/tests/distapp/tests.py
35
20147
import os, unittest from decimal import Decimal from django.db import connection from django.db.models import Q from django.contrib.gis.gdal import DataSource from django.contrib.gis.geos import GEOSGeometry, Point, LineString from django.contrib.gis.measure import D # alias for Distance from django.contrib.gis.tests....
bsd-3-clause
553,014,728,396,072,960
50.791774
196
0.636273
false
rven/odoo
addons/payment_ingenico/controllers/main.py
3
5278
# -*- coding: utf-8 -*- import logging import pprint import werkzeug from werkzeug.urls import url_unquote_plus from odoo import http from odoo.http import request from odoo.addons.payment.models.payment_acquirer import ValidationError from odoo.addons.payment.controllers.portal import PaymentProcessing _logger = log...
agpl-3.0
5,831,383,732,461,607,000
40.888889
110
0.597575
false
ravindrapanda/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_linear_operator_test.py
26
4018
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-2,184,069,351,581,081,000
39.18
109
0.596068
false
patwat/python-unitex
unitex/tools.py
1
44038
#!/usr/bin/env python # -*- coding: utf-8 -*- # NOTE: The documentation is somehow a copy/paste from the Unitex # manual. from __future__ import unicode_literals import logging import _unitex from unitex import * from unitex.config import CheckDicOptions,\ CompressOptions,\ ...
gpl-3.0
-4,233,475,980,761,591,300
33.884311
99
0.638924
false
p0cisk/Quantum-GIS
python/ext-libs/requests/packages/urllib3/response.py
152
18542
from __future__ import absolute_import from contextlib import contextmanager import zlib import io from socket import timeout as SocketTimeout from socket import error as SocketError from ._collections import HTTPHeaderDict from .exceptions import ( ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked ...
gpl-2.0
-1,503,451,911,078,410,000
34.250951
89
0.569302
false
mrkm4ntr/incubator-airflow
airflow/providers/google/cloud/operators/stackdriver.py
6
42186
# # 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,803,746,191,503,788,000
40.976119
106
0.653179
false
levi-rs/traw
tests/test_client.py
1
126791
from datetime import datetime as dt import sys import mock import pytest import traw from traw import models from traw.exceptions import TRAWClientError, UnknownCustomStatusError USER = 'mock username' PASS = 'mock password' URL = 'mock url' CASE1 = {'name': 'case1', 'id': 991} CASE2 = {'name': 'case2', 'id': 992} ...
mit
-2,773,728,249,695,593,500
33.77537
97
0.671365
false
RaoUmer/django
django/contrib/auth/tokens.py
4
2631
from datetime import date from django.conf import settings from django.utils.http import int_to_base36, base36_to_int from django.utils.crypto import constant_time_compare, salted_hmac from django.utils import six class PasswordResetTokenGenerator(object): """ Strategy object used to generate and check tokens...
bsd-3-clause
328,367,529,572,767,600
35.041096
87
0.632839
false
michdolan/samples
metrics.py
1
3282
""" Nuke 9 exposed a Python API for retrieving performance metrics from nodes during rendering, which had previously only been possible via command-line on Linux and was limited. Using that API, this script extends Nuke's standard node performance profiling with additional data as to where each node's cost fits into t...
mit
4,305,874,545,399,790,600
29.110092
78
0.669409
false
tuulos/luigi
test/lock_test.py
34
2946
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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,043,441,238,594,423,000
28.979592
80
0.636828
false
AladdinSonni/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/expectedfailures_unittest.py
122
5271
# Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
-7,753,045,192,454,510,000
54.484211
148
0.716942
false
NetIQ/mongo-connector
mongo_connector/connector.py
1
33340
# Copyright 2013-2014 MongoDB, Inc. # # Portions related to enabling timezone awareness flag and purging # the password files to avoid a possible security risk scenario. # are copyrighted to: # Copyright (c) 2015, NetIQ Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use ...
apache-2.0
-1,503,615,390,613,365,200
43.335106
87
0.535993
false