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
nashve/mythbox
resources/lib/twisted/twisted/conch/manhole_ssh.py
61
5076
# -*- test-case-name: twisted.conch.test.test_manhole -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ insults/SSH integration support. @author: Jp Calderone """ from zope.interface import implements from twisted.conch import avatar, interfaces as iconch, error as econch fro...
gpl-2.0
-6,452,543,690,144,424,000
33.767123
182
0.707841
false
princeofdarkness76/thefuck
tests/rules/test_docker_not_command.py
17
6175
import pytest from io import BytesIO from tests.utils import Command from thefuck.rules.docker_not_command import get_new_command, match @pytest.fixture def docker_help(mocker): help = b'''Usage: docker [OPTIONS] COMMAND [arg...] A self-sufficient runtime for linux containers. Options: --api-cors-header= ...
mit
-4,187,696,475,156,271,600
46.868217
79
0.611336
false
RafaelTorrealba/odoo
addons/crm/calendar_event.py
375
1829
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
336,527,390,128,710,900
42.547619
135
0.624385
false
ramr/origin
vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py
29
44441
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
apache-2.0
-7,478,915,153,824,803,000
34.897415
101
0.658581
false
jonesmat/codechallenge
main.py
2
8187
import os from random import randint import uuid import time from flask import Flask, request, render_template, redirect, make_response from werkzeug import secure_filename from data_manager import DataManager from model.puzzle_manager import PuzzleManager from model.puzzle import Puzzle, PuzzleState from model.probl...
mit
-6,056,894,351,491,328,000
30.732558
101
0.691829
false
neuroelectro/neuroelectro_org
neuroelectro/south_migrations/0077_auto__add_neurondata__add_ephysproperty__add_neuron.py
2
33888
# -*- 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 model 'NeuronData' db.create_table(u'neuroelectro_neurondata', (...
gpl-2.0
-6,220,639,116,356,996,000
74.476615
195
0.552585
false
aninternetof/bremen
bremenenv/lib/python3.5/site-packages/django/db/utils.py
192
11323
import inspect import os import pkgutil import warnings from importlib import import_module from threading import local from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils._os import npath, upath from django.utils.deprecation import Re...
mit
5,904,895,173,200,417,000
32.40118
93
0.574318
false
jacebrowning/gdm-demo
setup.py
1
1027
#!/usr/bin/env python """Setup script for GDM.""" import setuptools from gdm import __project__, __version__, CLI, DESCRIPTION import os if os.path.exists('README.rst'): README = open('README.rst').read() else: README = "" # a placeholder, readme is generated on release CHANGES = open('CHANGES.md').read() ...
mit
-424,321,693,452,093,500
24.04878
64
0.631938
false
brenton/openshift-ansible
inventory/openstack/hosts/openstack.py
11
8956
#!/usr/bin/env python # pylint: skip-file # Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com> # Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P. # Copyright (c) 2016, Rackspace Australia # # This module is free software: you can...
apache-2.0
3,511,546,778,482,264,600
35.259109
78
0.644372
false
jansel/opentuner
examples/unitary/unitary.py
1
4271
#!/usr/bin/env python # # This is a quantum control example motivated by the experimental need # to synthesize unitary matrices in SU(2) in optimal time, given an # explicit and finite control set generating the whole space, and an # admissible error. # # See problem_description.pdf for additional details. # # Contribu...
mit
1,555,980,249,640,128,000
29.507143
83
0.635448
false
wkh124/wkh124
blast_cluster_sequences.py
1
1426
#!/usr/bin/env python # -*- coding: utf-8 -*- """Cluster sequence IDs into groups of IDs whose sequences blast together. Input file is the result file (outfmt 0) of fasta file blasted against itself. Usage: %program <input_file> <output_file>""" import sys from collections import defaultdict from copy import de...
gpl-3.0
7,072,095,089,609,737,000
24.464286
136
0.608696
false
wartman4404/servo
tests/wpt/css-tests/tools/html5lib/html5lib/html5parser.py
423
117297
from __future__ import absolute_import, division, unicode_literals from six import with_metaclass import types from . import inputstream from . import tokenizer from . import treebuilders from .treebuilders._base import Marker from . import utils from . import constants from .constants import spaceCharacters, ascii...
mpl-2.0
5,491,962,003,502,255,000
42.076386
118
0.544532
false
andresgz/django
tests/i18n/tests.py
87
85521
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import datetime import decimal import gettext as gettext_module import os import pickle from contextlib import contextmanager from importlib import import_module from threading import local from unittest import skipUnless from django import forms from ...
bsd-3-clause
6,017,047,268,544,719,000
45.796935
119
0.560458
false
awalls-cx18/gnuradio
gnuradio-runtime/examples/volk_benchmark/volk_plot.py
6
6198
#!/usr/bin/env python from __future__ import division from __future__ import unicode_literals import sys, math import argparse from volk_test_funcs import * try: import matplotlib import matplotlib.pyplot as plt except ImportError: sys.stderr.write("Could not import Matplotlib (http://matplotlib.sourcefor...
gpl-3.0
-3,862,064,761,760,789,000
35.245614
96
0.530494
false
RO-ny9/python-for-android
python3-alpha/python3-src/Lib/distutils/log.py
163
1908
"""A simple log mechanism styled after PEP 282.""" # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. DEBUG = 1 INFO = 2 WARN = 3 ERROR = 4 FATAL = 5 import sys class Log: def __init__(self, threshold=WARN): self.threshold = thre...
apache-2.0
-6,223,391,399,144,870,000
24.44
79
0.577568
false
nesdis/djongo
tests/django_tests/tests/v21/tests/model_fields/test_foreignkey.py
21
3762
from decimal import Decimal from django.apps import apps from django.core import checks from django.db import models from django.test import TestCase, skipIfDBFeature from django.test.utils import isolate_apps from .models import Bar, FkToChar, Foo, PrimaryKeyCharModel class ForeignKeyTests(TestCase): def test...
agpl-3.0
-2,686,376,007,269,670,400
34.828571
100
0.625731
false
jiachenning/odoo
addons/base_gengo/res_company.py
321
1890
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
8,114,104,333,890,831,000
48.736842
172
0.630159
false
zero-rp/miniblink49
third_party/WebKit/Source/build/scripts/make_css_property_names.py
8
7760
#!/usr/bin/env python import subprocess import sys import css_properties import in_generator import license HEADER_TEMPLATE = """ %(license)s #ifndef %(class_name)s_h #define %(class_name)s_h #include "core/css/parser/CSSParserMode.h" #include "wtf/HashFunctions.h" #include "wtf/HashTraits.h" #include <string.h> ...
apache-2.0
-3,800,670,338,386,017,300
32.593074
155
0.689562
false
venzen/zen2pool
p2pool/test/util/test_math.py
283
1198
from __future__ import division import random import unittest from p2pool.util import math def generate_alphabet(): if random.randrange(2): return None else: a = map(chr, xrange(256)) random.shuffle(a) return a[:random.randrange(2, len(a))] class Test(unittest.TestCase): ...
gpl-3.0
5,744,770,421,417,181,000
30.526316
74
0.520033
false
VerifiableRobotics/LTLMoP
src/lib/handlers/NXT/NXTDriveHandler.py
7
1102
#!/usr/bin/env python """ ================================================= NXTDrive.py - LEGO Mindstorms NXT Drive Handler ================================================= Converts a desired global velocity vector into translational and rotational rates for a differential-drive robot, using feedback linearization. "...
gpl-3.0
4,545,534,771,686,127,000
30.485714
113
0.594374
false
gmalmquist/pants
src/python/pants/backend/jvm/targets/jvm_app.py
2
10801
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from colle...
apache-2.0
2,738,428,420,579,894,300
35.989726
104
0.676789
false
runekaagaard/django-contrib-locking
django/contrib/gis/tests/geoapp/tests.py
1
40591
from __future__ import unicode_literals import re from tempfile import NamedTemporaryFile from django.db import connection from django.contrib.gis import gdal from django.contrib.gis.db.models import Extent, MakeLine, Union from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import no_ora...
bsd-3-clause
-2,589,750,615,624,961,500
45.126136
117
0.614964
false
patrick-brian-mooney/UlyssesRedux
utility_scripts/get-chapter-7-stats.py
1
1619
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Produces a quick .csv file summarizing number of sentences in each paragraph in this particular chapter, encoding basic facts about structure that are relevant to the script 7.py. Makes a lot of assumptions about the structure of the text file it's processing, including...
gpl-3.0
6,991,494,615,193,302,000
46.529412
106
0.677399
false
rvalyi/OpenUpgrade
addons/report_webkit/__openerp__.py
89
4029
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who ...
agpl-3.0
-5,398,358,394,539,707,000
37.740385
117
0.654008
false
olegpshenichniy/Booktype
lib/booki/messaging/migrations/0001_initial.py
7
3743
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import booki.messaging.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Endpoint', fields=[ ...
agpl-3.0
-2,273,823,821,851,916,500
41.534091
146
0.541811
false
gowiden/shadowsocks
shadowsocks/asyncdns.py
8
16614
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # 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 # ...
mit
435,152,333,448,464,260
35.514286
79
0.472493
false
j0nathan33/CouchPotatoServer
couchpotato/core/plugins/quality/main.py
9
23606
from math import fabs, ceil import traceback import re from CodernityDB.database import RecordNotFound from couchpotato import get_db from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import toUnicode, ss from couchpotato.core.helpers.v...
gpl-3.0
-5,462,301,581,825,021,000
44.92607
281
0.535372
false
xukunfeng/ardupilot
Tools/autotest/pysim/aircraft.py
164
4001
import math, util, rotmat, time import random from rotmat import Vector3, Matrix3 class Aircraft(object): '''a basic aircraft class''' def __init__(self): self.home_latitude = 0 self.home_longitude = 0 self.home_altitude = 0 self.ground_level = 0 self.frame_height = 0.0 ...
gpl-3.0
-7,964,310,487,600,907,000
35.045045
98
0.567108
false
BT-jmichaud/sale-workflow
__unported__/sale_multi_picking/sale.py
37
2758
# -*- coding: utf-8 -*- # # # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publis...
agpl-3.0
7,854,332,225,512,065,000
37.305556
79
0.586657
false
NetApp/cinder
cinder/tests/unit/zonemanager/test_brcd_http_fc_zone_client.py
6
26929
# (c) Copyright 2016 Brocade Communications 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.org/licenses/LICEN...
apache-2.0
4,383,558,335,729,830,400
32.245679
82
0.630176
false
SnakeJenny/TensorFlow
tensorflow/contrib/learn/python/learn/estimators/estimator_test.py
8
42354
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,605,781,900,967,880,000
37.644161
88
0.664943
false
lahosken/pants
tests/python/pants_test/backend/python/tasks/python_task_test_base.py
8
3057
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textw...
apache-2.0
-6,328,344,959,043,414,000
33.738636
99
0.656526
false
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/uuid.py
34
23209
r"""UUID objects (universally unique identifiers) according to RFC 4122. This module provides immutable UUID objects (class UUID) and the functions uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122. If all you want is a unique ID, you should probably call uuid1() ...
mit
6,904,771,882,234,420,000
37.172697
79
0.591969
false
glennyonemitsu/MarkupHiveServer
src/form/admin.py
1
1667
''' All forms for admin control panel. NOT the customers' manager ''' from flask.ext.wtf import Form from wtforms import BooleanField, DateTimeField, DecimalField, IntegerField, \ TextField from wtforms.validators import InputRequired as Required class AccountForm(Form): join_timestamp = Date...
mit
2,417,664,599,174,713,300
31.686275
78
0.674265
false
franc3000/temp-app
temp_app/app.py
1
2398
# -*- coding: utf-8 -*- """The app module, containing the app factory function.""" from flask import Flask, render_template from temp_app import commands, public, user from temp_app.extensions import bcrypt, cache, csrf_protect, db, debug_toolbar, login_manager, migrate, webpack from temp_app.settings import ProdConfi...
bsd-3-clause
-5,186,378,249,124,932,000
27.211765
111
0.683903
false
campbe13/openhatch
vendor/packages/PyYaml/lib3/yaml/composer.py
273
4881
__all__ = ['Composer', 'ComposerError'] from .error import MarkedYAMLError from .events import * from .nodes import * class ComposerError(MarkedYAMLError): pass class Composer: def __init__(self): self.anchors = {} def check_node(self): # Drop the STREAM-START event. if self.ch...
agpl-3.0
-7,896,552,725,963,259,000
34.115108
89
0.580414
false
loop1024/pymo-global
android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_pep292.py
103
7682
# Copyright (C) 2004 Python Software Foundation # Author: barry@python.org (Barry Warsaw) # License: http://www.opensource.org/licenses/PythonSoftFoundation.php import unittest from string import Template class Bag: pass class Mapping: def __getitem__(self, name): obj = self for part in name...
mit
-4,160,576,771,462,007,300
38.803109
79
0.545171
false
megraf/asuswrt-merlin
release/src/router/samba36/lib/dnspython/setup.py
20
2509
#!/usr/bin/env python # # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # T...
gpl-2.0
-2,784,612,753,532,327,000
38.825397
77
0.672778
false
bixbydev/Bixby
google/gdata-2.0.18/build/lib.linux-x86_64-2.7/gdata/contacts/service.py
120
17345
#!/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 requir...
gpl-3.0
-747,881,336,851,750,900
39.620609
79
0.658172
false
ganeshnalawade/ansible
test/integration/targets/ansible-doc/library/test_docs_suboptions.py
38
1590
#!/usr/bin/python from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: test_docs_suboptions short_description: Test module description: - Test module author: - Ansible Core Team options: with_suboptions: description: - An...
gpl-3.0
-7,835,797,767,777,357,000
21.714286
64
0.446541
false
Migal/opt_ctrl_lab_1
lab_1/utils.py
1
13364
import math import numpy as np from scipy.optimize import minimize def array(f, numval, numdh): """Создать N-мерный массив. param: f - функция, которая приминает N аргументов. param: numval - диапазоны значений параметров функции. Список param: numdh - шаги для параметров. Список """ ...
bsd-3-clause
8,019,691,262,636,017,000
34.062687
119
0.472927
false
takahirox/three.js
utils/converters/obj/convert_obj_three_for_python3.py
68
48066
"""Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with ascii / binary loader) ------------------------- How to use this converter ------------------------- python convert_obj_three.py -i infile.obj -o outfile.js [-m "morphfiles*.obj"] [-c "morphcolors*.obj"] [-a center|centerxz|top|bo...
mit
2,842,735,792,077,529,600
28.966334
219
0.517185
false
Grirrane/odoo
addons/product/partner.py
8
1627
# -*- 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...
agpl-3.0
6,757,276,186,433,065,000
41.815789
117
0.601721
false
Lucterios2/documents
lucterios/documents/__init__.py
1
1251
# -*- coding: utf-8 -*- ''' lucterios.contacts package @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licens...
gpl-3.0
7,503,149,240,182,401,000
26.195652
68
0.714628
false
ubic135/odoo-design
addons/analytic/report/analytic_inverted_balance.py
23
5761
# -*- 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,180,133,221,918,445,000
43.315385
107
0.540878
false
jatinmistry13/pattern
pattern/web/pdf/pdfparser.py
53
27593
#!/usr/bin/env python2 import sys import re import struct try: import hashlib as md5 except ImportError: import md5 try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from psparser import PSStackParser from psparser import PSSyntaxError, PSEOF from psparser import lite...
bsd-3-clause
4,269,555,453,303,722,500
33.883692
99
0.519588
false
nicolas-f/I-Simpa
currentRelease/SystemScript/graphy/backends/google_chart_api/pie_chart_test.py
33
5892
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
gpl-3.0
6,365,583,014,160,218,000
38.543624
79
0.666158
false
hivesolutions/netius
src/netius/extra/file.py
1
31736
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Netius System # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Netius System. # # Hive Netius System is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apache # Foun...
apache-2.0
-2,074,414,766,747,293,700
37.470149
313
0.544526
false
neumerance/deploy
openstack_dashboard/dashboards/project/access_and_security/keypairs/views.py
6
3083
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
-2,109,214,817,483,301,400
34.848837
78
0.708725
false
keflavich/pvextractor
pvextractor/utils/wcs_utils.py
2
2457
import numpy as np from astropy import units as u from astropy.wcs import WCSSUB_CELESTIAL, WCSSUB_SPECTRAL def get_spatial_scale(wcs, assert_square=True): # Code adapted from APLpy wcs = wcs.sub([WCSSUB_CELESTIAL]) cdelt = np.matrix(wcs.wcs.get_cdelt()) pc = np.matrix(wcs.wcs.get_pc()) scale = ...
bsd-3-clause
1,899,790,934,084,369,200
32.657534
76
0.560847
false
OpenMDM/OpenMDM
OpenMDM/settings.py
1
3172
""" Django settings for OpenMDM project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
apache-2.0
-8,522,370,902,335,511,000
24.18254
85
0.719105
false
talishte/ctigre
env/lib/python2.7/site-packages/pip/_vendor/requests/api.py
206
4935
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. Retur...
bsd-2-clause
-76,924,421,751,037,340
36.671756
144
0.668693
false
natbraun/biggraphite
biggraphite/cli/command.py
1
2819
#!/usr/bin/env python # Copyright 2016 Criteo # # 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
-7,809,193,109,073,678,000
29.641304
77
0.677545
false
AutorestCI/azure-sdk-for-python
azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_sink.py
2
2726
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-5,599,786,718,588,279,000
45.20339
229
0.619956
false
nightjean/Deep-Learning
tensorflow/contrib/specs/python/summaries.py
164
8831
# 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 applicable ...
apache-2.0
9,155,838,821,160,433,000
27.214058
80
0.666742
false
zhouzhenghui/python-for-android
python3-alpha/extra_modules/gdata/tlslite/utils/dateFuncs.py
407
2181
import os #Functions for manipulating datetime objects #CCYY-MM-DDThh:mm:ssZ def parseDateClass(s): year, month, day = s.split("-") day, tail = day[:2], day[2:] hour, minute, second = tail[1:].split(":") second = second[:2] year, month, day = int(year), int(month), int(day) hour, minute, secon...
apache-2.0
3,611,379,737,006,941,000
28.08
66
0.622192
false
obulpathi/datascience
neural-networks/src/network2.py
7
14296
"""network2.py ~~~~~~~~~~~~~~ An improved version of network.py, implementing the stochastic gradient descent learning algorithm for a feedforward neural network. Improvements include the addition of the cross-entropy cost function, regularization, and better initialization of network weights. Note that I have...
apache-2.0
-7,943,350,106,024,821,000
41.060241
78
0.596321
false
2014c2g2/2015cda
static/Brython3.1.1-20150328-091302/Lib/test/pystone.py
718
7379
#! /usr/bin/python3.3 """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness ha...
gpl-3.0
4,250,244,549,711,245,300
26.32963
75
0.600352
false
takeshineshiro/neutron
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
1
86867
# Copyright 2011 VMware, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
4,824,762,044,695,882,000
45.083289
79
0.542807
false
dkoppstein/recipes
recipes/gridss/gridss.py
39
2707
#!/opt/anaconda1anaconda2anaconda3/bin/python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Paramet...
mit
325,748,212,977,062,000
30.476744
175
0.653122
false
SeerLabs/PDFMEF
src/extraction/test/test_utils.py
3
1277
import unittest import subprocess32 as subprocess import extraction.utils as utils import os class TestUtils(unittest.TestCase): def setUp(self): pass def test_external_process_works(self): (status, out, err) = utils.external_process(['grep', '3'], input_data='Line 1\nLine 2\nLine 3\n') self.a...
apache-2.0
-2,429,745,622,572,371,500
33.513514
103
0.665623
false
avelino/vcm
lib/app/libvirttemplate.py
2
12232
# -*- coding: utf-8 -*- import os, sys, random import virt # libvirt XML Template # General Metadata # This name should consist only of alpha-numeric characters and is required to be unique within the scope of a single host # args : # name : name for virtual machine. ( ex: host112 ) def GENERAL_METADATA(type_,nam...
gpl-3.0
7,490,259,844,561,313,000
25.824561
123
0.548316
false
p/wolis-phpbb
tests/subscribe.py
1
1812
from wolis.test_case import WolisTestCase class SubscribeTopicTestCase(WolisTestCase): def test_subscribe_topic(self): self.login('test43', 'test42') url = '/index.php' self.get(url) self.assert_successish() assert 'Index page' in self.response.body ...
bsd-2-clause
4,787,972,534,417,937,000
30.241379
101
0.581678
false
mdrumond/tensorflow
tensorflow/contrib/specs/python/summaries_test.py
112
3062
# 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 applicable ...
apache-2.0
339,867,214,552,702,200
35.452381
80
0.660679
false
peter-jang/ansible
lib/ansible/compat/tests/__init__.py
339
1268
# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
3,829,800,877,383,940,000
30.7
78
0.739748
false
FreicoinAlliance/p2pool
p2pool/bitcoin/networks/litecoin.py
29
1199
import os import platform from twisted.internet import defer from .. import data, helper from p2pool.util import pack P2P_PREFIX = 'fbc0b6db'.decode('hex') P2P_PORT = 9333 ADDRESS_VERSION = 48 RPC_PORT = 9332 RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue( 'litecoinaddress' in (yie...
gpl-3.0
-5,503,548,432,604,623,000
41.821429
276
0.708924
false
arielmakestuff/loadlimit
test/unit/util/test_event.py
1
4403
# -*- coding: utf-8 -*- # test/unit/util/test_event.py # Copyright (C) 2016 authors and contributors (see AUTHORS file) # # This module is released under the MIT License. """Test Logger""" # ============================================================================ # Imports # ======================================...
mit
-7,606,463,165,431,031,000
28.75
78
0.526005
false
javierlgroba/Eventer-gapp
django/contrib/humanize/tests.py
100
9960
from __future__ import unicode_literals import datetime try: import pytz except ImportError: pytz = None from django.conf import settings from django.contrib.humanize.templatetags import humanize from django.template import Template, Context, defaultfilters from django.test import TestCase from django.test.ut...
lgpl-3.0
-4,962,453,755,484,577,000
43.070796
119
0.57761
false
jgeskens/django
tests/staticfiles_tests/tests.py
8
31390
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import codecs import os import posixpath import shutil import sys import tempfile from django.template import loader, Context from django.conf import settings from django.core.cache.backends.base import BaseCache from django.core.exceptions import Impr...
bsd-3-clause
-3,465,020,453,550,904,300
39.445876
372
0.648665
false
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/google/protobuf/internal/message_set_extensions_pb2.py
42
8373
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/internal/message_set_extensions.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goo...
mit
-7,865,963,746,384,495,000
38.871429
878
0.757196
false
Jeff-Tian/mybnb
Python27/Lib/lib2to3/btm_utils.py
62
10294
"Utility functions used by the btm_matcher module" from . import pytree from .pgen2 import grammar, token from .pygram import pattern_symbols, python_symbols syms = pattern_symbols pysyms = python_symbols tokens = grammar.opmap token_labels = token TYPE_ANY = -1 TYPE_ALTERNATIVES = -2 TYPE_GROUP = -3 ...
apache-2.0
-1,216,065,350,421,542,100
34.374558
83
0.53604
false
Yannig/ansible
lib/ansible/utils/module_docs_fragments/mysql.py
168
2909
# -*- coding: utf-8 -*- # Copyright (c) 2015 Jonathan Mainguy <jon@soh.re> # # 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...
gpl-3.0
-9,021,203,995,907,818,000
31.322222
140
0.694397
false
resmo/ansible
test/units/executor/test_play_iterator.py
10
18331
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
-688,375,071,870,857,600
38.506466
105
0.576455
false
dyoung418/tensorflow
tensorflow/contrib/timeseries/examples/multivariate_test.py
91
1330
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
5,347,629,935,582,527,000
35.944444
80
0.707519
false
listyque/TACTIC-Handler
thlib/side/client/tactic_client_lib/interpreter/callback.py
1
3820
########################################################### # # Copyright (c) 2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
4,974,397,715,924,807,000
26.681159
92
0.634555
false
xieshenglin/shadowsocks
shadowsocks/common.py
1
11907
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
-8,404,457,653,548,966,000
31.355978
79
0.528345
false
lamby/pkg-fabric
tests/server.py
34
16145
from __future__ import with_statement import copy import itertools import os import re import socket import stat import sys import threading import time import types from StringIO import StringIO from functools import wraps from Python26SocketServer import BaseRequestHandler, ThreadingMixIn, TCPServer from fabric.ope...
bsd-2-clause
-9,018,983,030,411,116,000
31.682186
78
0.564385
false
kirmani/hlpr_cadence
third_party/vector_v1/vector_common/vector_ros/src/vector/vector_teleop.py
2
12505
"""-------------------------------------------------------------------- COPYRIGHT 2016 Stanley Innovation Inc. Software License Agreement: The software supplied herewith by Stanley Innovation Inc. (the "Company") for its licensed SI Vector Platform is intended and supplied to you, the Company's customer, for use so...
mit
-5,914,154,296,067,903,000
43.820789
130
0.555618
false
kevin-coder/tensorflow-fork
tensorflow/contrib/resampler/python/ops/resampler_ops_test.py
23
10484
# pylint: disable=g-bad-file-header # Copyright 2017 The Sonnet 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...
apache-2.0
-1,578,798,126,782,536,200
37.82963
80
0.633251
false
vrutkovs/atomic-reactor
atomic_reactor/plugins/pre_distribution_scope.py
3
3257
""" Copyright (c) 2016 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals from atomic_reactor.constants import INSPECT_CONFIG from atomic_reactor.plugin import...
bsd-3-clause
-7,025,605,410,515,274,000
29.439252
92
0.639239
false
vascotenner/holoviews
holoviews/plotting/bokeh/raster.py
1
6949
import numpy as np import param from bokeh.models.mappers import LinearColorMapper try: from bokeh.models.mappers import LogColorMapper except ImportError: LogColorMapper = None from ...core.util import cartesian_product from ...element import Image, Raster, RGB from ..renderer import SkipRendering from ..uti...
bsd-3-clause
503,011,877,690,609,200
36.766304
90
0.559217
false
laszlocsomor/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/models/forest_to_data_then_nn.py
190
1972
# 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,642,623,428,907,691,000
41.869565
83
0.66785
false
ttsubo/ryu
ryu/services/protocols/vrrp/monitor_linux.py
23
8400
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
apache-2.0
6,038,771,836,545,631,000
37.709677
79
0.567381
false
umitproject/tease-o-matic
django/contrib/gis/db/backends/postgis/introspection.py
514
4385
from django.db.backends.postgresql_psycopg2.introspection import DatabaseIntrospection from django.contrib.gis.gdal import OGRGeomType class GeoIntrospectionError(Exception): pass class PostGISIntrospection(DatabaseIntrospection): # Reverse dictionary for PostGIS geometry types not populated until # intro...
bsd-3-clause
-5,026,107,382,639,190,000
45.157895
95
0.581072
false
jvpoulos/cs289-hw5
hw5-code/census_clf.py
1
2480
import numpy as np import copy import cPickle as pickle import decision_tree as dt from sklearn.cross_validation import train_test_split # Load train data # train, load from csv without headers features_train = np.genfromtxt('../census-dataset/census-train-features-median.csv', delimiter=' ', skip_header=1) # remove ...
mit
7,878,106,940,940,895,000
32.513514
123
0.7125
false
thehyve/variant
eggs/django-1.3.1-py2.7.egg/django/contrib/sites/tests.py
153
2147
from django.conf import settings from django.contrib.sites.models import Site, RequestSite, get_current_site from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test import TestCase class SitesFrameworkTests(TestCase): def setUp(self): Site(id=settings.SI...
apache-2.0
7,812,828,801,594,570,000
37.339286
82
0.658128
false
malishevg/edugraph
cms/djangoapps/contentstore/tests/test_import.py
5
8862
# -*- coding: utf-8 -*- # pylint: disable=E1101 """ Tests for import_from_xml using the mongo modulestore. """ from django.test.client import Client from django.test.utils import override_settings from django.conf import settings from path import path import copy from django.contrib.auth.models import User from xmod...
agpl-3.0
4,733,230,776,457,976,000
38.824324
156
0.641783
false
midokura/python-neutron-plugin-midonet
midonet/neutron/extensions/subnet.py
1
6971
# Copyright 2014 Midokura SARL # # 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...
apache-2.0
8,747,944,328,724,261,000
33.339901
78
0.583274
false
pfcurtis/twitter-spark-sentiment
lib/oauthlib/oauth1/rfc5849/endpoints/request_token.py
42
8945
# -*- coding: utf-8 -*- """ oauthlib.oauth1.rfc5849.endpoints.request_token ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of the request token provider logic of OAuth 1.0 RFC 5849. It validates the correctness of request token requests, creates and persists tokens as well as create t...
gpl-2.0
8,032,301,520,749,755,000
43.282178
131
0.622471
false
MarcusJones/py_ExergyUtilities
SenegalUtilities/senegal_process_excel.py
2
11595
# -*- coding: utf-8 -*- import copy import csv import logging import os import utility_excel_api as util_xl from collections import defaultdict from tables.hdf5extension import VLArray from util_pretty_print import print_table #from ExergyUtilities.senegal_process_excel import get_village_row_dict logging.basicConfig(...
lgpl-3.0
-2,254,199,536,409,960,200
33.718563
120
0.585252
false
geheimnis/core-commands
cryptoalgo/hash/md5.py
1
9805
""" /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material me...
gpl-3.0
-5,933,299,831,391,369,000
31.466887
74
0.48975
false
Z-KO/url-expanderscanner-bot
botmain.py
2
1380
import socket import re import simplejson import urllib import urllib2 import urlclean url = "https://www.virustotal.com/vtapi/v2/url/report" server = "server" channel = "#channel" botnick = "botnick" ircsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ircsock.connect((server, 6667)) #connect to server usin...
mit
-3,164,663,737,821,480,000
22.389831
67
0.674638
false
y-higuchi/ramcloud
systemtests/run.py
18
2525
#!/usr/bin/env python # Copyright (c) 2012 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
isc
-3,181,258,570,780,073,500
39.725806
91
0.739406
false
donckers/ansible
lib/ansible/galaxy/role.py
6
12494
######################################################################## # # (C) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation...
gpl-3.0
-348,200,999,350,290,370
38.04375
184
0.523931
false
infoxchange/lettuce
tests/integration/lib/Django-1.2.5/django/contrib/admin/templatetags/admin_list.py
43
12835
import datetime from django.conf import settings from django.contrib.admin.util import lookup_field, display_for_field, label_for_field from django.contrib.admin.views.main import ALL_VAR, EMPTY_CHANGELIST_VALUE from django.contrib.admin.views.main import ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR from django.cor...
gpl-3.0
2,467,092,187,173,016,600
40.672078
198
0.564316
false
is06/navitia
source/tyr/migrations/versions/1fd68e6d0456_.py
17
4088
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
-8,373,651,164,782,698,000
35.5
79
0.649217
false
django-nonrel/django-nonrel
tests/regressiontests/views/tests/defaults.py
50
3720
from os import path from django.conf import settings from django.test import TestCase from django.contrib.contenttypes.models import ContentType from regressiontests.views.models import Author, Article, UrlArticle class DefaultsTests(TestCase): """Test django views in django/views/defaults.py""" fixtures = [...
bsd-3-clause
4,775,754,228,563,769,000
45.5
111
0.639785
false
arthurmco/ghostwriter
ghostwriter/__init__.py
1
12587
# GhostWriter main file # Copyright (C) 2017 Arthur M # from flask import Flask, request, jsonify, render_template, flash, redirect, url_for from flask_login import LoginManager, login_user, logout_user, current_user, login_required from ghostwriter.models.modelmanager import ModelManager app = Flask("ghostwriter")...
mit
5,365,902,246,058,635,000
27.033408
98
0.584412
false
nvazquez/Turtlebots
plugins/xevents/Xlib/error.py
2
4823
# $Id: error.py,v 1.6 2007/06/10 14:11:58 mggrant Exp $ # # Xlib.error -- basic error classes # # Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se> # # 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 Fr...
mit
8,317,324,891,183,167,000
28.771605
80
0.605225
false
ntuecon/server
pyenv/Lib/site-packages/twisted/python/roots.py
14
7404
# -*- test-case-name: twisted.test.test_roots -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Twisted Python Roots: an abstract hierarchy representation for Twisted. Maintainer: Glyph Lefkowitz """ from __future__ import absolute_import, division from twisted.python import reflect fr...
bsd-3-clause
7,952,127,301,510,339,000
27.809339
91
0.635197
false