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
MobinRanjbar/hue
apps/oozie/src/oozie/migrations/0027_auto__chg_field_node_name__chg_field_job_name.py
21
25573
# -*- 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): # Changing field 'Node.name' db.alter_column(u'oozie_node', 'name', self...
apache-2.0
5,193,480,082,138,684,000
77.207951
196
0.534548
false
nerandell/vyked
vyked/bus.py
1
12997
import asyncio from collections import defaultdict from functools import partial import json import logging import random import uuid from again.utils import unique_hex import aiohttp from retrial.retrial import retry from .services import TCPServiceClient, HTTPServiceClient from .pubsub import PubSub from .packet im...
mit
-2,944,843,209,032,914,400
41.613115
118
0.608525
false
JTCunning/sentry
src/sentry/migrations/0126_auto__add_field_option_last_updated.py
36
25153
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Option.last_updated' db.add_column('sentry_option', 'last_updated', se...
bsd-3-clause
-5,423,655,050,034,848,000
83.40604
223
0.558422
false
immstudios/notify
scripts/subscriber.py
1
1544
#!/usr/bin/env python import json import thread import uuid try: from urllib.request import urlopen from urllib.parse import urlparse except ImportError: from urlparse import urlparse from urllib2 import urlopen __all__ = ["NotifyPublisher"] class NotifySubscriber(): def __init__(self, **kwargs)...
gpl-3.0
8,703,723,381,790,196,000
23.903226
66
0.551166
false
danicarrion/python-sepa
sepa/debit/core.py
1
6958
# -*- coding: utf-8 -*- import gettext import os import random import string from datetime import datetime from jinja2 import Environment, PackageLoader _ = gettext.translation("sepa", os.path.join(os.path.dirname(os.path.abspath(__file__)), "../locale"), ["es"]).gettext SEQUENCE_TYPES = ("FRST", "RCUR", "FNAL", "O...
mit
8,724,976,275,508,185,000
35.145833
129
0.549712
false
GheRivero/ansible
lib/ansible/modules/web_infrastructure/rundeck_project.py
99
6314
#!/usr/bin/python # -*- coding: utf-8 -*- # Ansible module to manage rundeck projects # (c) 2017, Loic Blot <loic.blot@unix-experience.fr> # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org...
gpl-3.0
-1,655,150,778,085,865,200
33.315217
118
0.575863
false
mulby/edx-idea
edx/idea/workflow.py
1
1760
from edx.idea.common.identifier import generate_uuid class Workflow(object): def __init__(self, phases=None, name=None): self.phases = phases or [] self.name = name or ('workflow_' + generate_uuid()) def __repr__(self): return 'Workflow(phases={0}, name={1})'.format( rep...
agpl-3.0
-6,575,030,221,146,370,000
25.666667
90
0.553977
false
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/gzip.py
78
18226
"""Functions that read and write gzipped files. The user of the file doesn't have to worry about the compression, but random access is not allowed.""" # based on Andrew Kuchling's minigzip.py distributed with the zlib module import struct, sys, time, os import zlib import io import __builtin__ __all__ = ["GzipFile"...
gpl-3.0
7,786,892,701,775,080,000
34.807466
79
0.547295
false
mahak/nova
nova/policies/server_diagnostics.py
3
1211
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
apache-2.0
-4,643,886,886,718,087,000
29.275
78
0.668043
false
CedricVallee/pythonFinancialAnalyst
FinancialAnalystV2/extractMDA.py
1
2088
# -*- coding: utf-8 -*- """ Created on Wed Mar 02 2016 @author: Cedric Vallee Inspired by Chong Wee Tan """ import os import Helper as helper import Scraper as scraper from textblob import TextBlob from bs4 import BeautifulSoup def getMDAfromText(filename,text): try: soup = BeautifulSoup(te...
mit
-5,543,405,821,135,839,000
34.666667
152
0.616858
false
csachs/openmicroscopy
components/tools/OmeroPy/src/omero/plugins/delete.py
9
2773
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Startup plugin for command-line deletes Copyright 2009-2015 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import sys from omero.cli import CLI, GraphControl HELP = """Delete OMERO data. Remove enti...
gpl-2.0
8,406,148,015,071,239,000
31.244186
79
0.677605
false
Ichag/odoo
addons/l10n_fr_rib/__init__.py
433
1046
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Numérigraphe SARL. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
agpl-3.0
1,136,495,127,297,405,400
40.8
78
0.617225
false
luiseduardohdbackup/odoo
addons/crm_partner_assign/crm_lead.py
221
3039
# -*- 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
-4,883,371,584,449,180,000
50.508475
148
0.624218
false
lidavidm/sympy
sympy/physics/quantum/piab.py
124
1756
"""1D quantum particle in a box.""" from __future__ import print_function, division from sympy import Symbol, pi, sqrt, sin, Interval, S from sympy.physics.quantum.operator import HermitianOperator from sympy.physics.quantum.state import Ket, Bra from sympy.physics.quantum.constants import hbar from sympy.functions....
bsd-3-clause
8,298,416,204,019,598,000
24.449275
67
0.657745
false
s20121035/rk3288_android5.1_repo
external/wpa_supplicant_8/wpa_supplicant/examples/wpas-test.py
189
2571
#!/usr/bin/python import dbus import sys, os import time WPAS_DBUS_SERVICE = "fi.epitest.hostap.WPASupplicant" WPAS_DBUS_INTERFACE = "fi.epitest.hostap.WPASupplicant" WPAS_DBUS_OPATH = "/fi/epitest/hostap/WPASupplicant" WPAS_DBUS_INTERFACES_INTERFACE = "fi.epitest.hostap.WPASupplicant.Interface" WPAS_DBUS_INTERFACES...
gpl-3.0
6,988,988,108,679,617,000
27.252747
126
0.683392
false
woodpecker1/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem.py
126
9517
# Copyright (C) 2010 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
6,424,022,748,345,570,000
34.379182
140
0.630241
false
pjdelport/django-devserver
devserver/modules/request.py
13
2777
import urllib from devserver.modules import DevServerModule class SessionInfoModule(DevServerModule): """ Displays information about the currently authenticated user and session. """ logger_name = 'session' def process_request(self, request): self.has_session = bool(getattr(request, 'se...
bsd-3-clause
5,146,468,413,408,474,000
39.246377
178
0.60641
false
af1rst/bite-project
deps/gdata-python-client/src/gdata/tlslite/Session.py
359
4733
"""Class representing a TLS session.""" from utils.compat import * from mathtls import * from constants import * class Session: """ This class represents a TLS session. TLS distinguishes between connections and sessions. A new handshake creates both a connection and a session. Data is transmitt...
apache-2.0
2,835,819,671,686,261,000
35.129771
77
0.646736
false
KnowNo/reviewboard
reviewboard/ssh/storage.py
8
8054
from __future__ import unicode_literals import logging import os from django.utils.translation import ugettext_lazy as _ import paramiko from reviewboard.ssh.errors import MakeSSHDirError, UnsupportedSSHKeyError class SSHStorage(object): def __init__(self, namespace=None): self.namespace = namespace ...
mit
5,059,854,025,311,192,000
29.164794
79
0.537124
false
kingvuplus/enigma2
lib/python/Components/PackageInfo.py
43
12858
import xml.sax from Tools.Directories import crawlDirectory, resolveFilename, SCOPE_CONFIG, SCOPE_SKIN, copyfile, copytree from Components.NimManager import nimmanager from Components.Ipkg import IpkgComponent from Components.config import config, configfile from Tools.HardwareInfo import HardwareInfo from enigma impor...
gpl-2.0
8,949,410,646,252,805,000
30.592138
117
0.704542
false
SymbiFlow/python-fpga-interchange
fpga_interchange/constraints/sat.py
1
11109
# -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC class AssertStateVariable(): """ Abstract asserted state variab...
isc
-1,200,851,189,210,134,500
31.673529
140
0.606085
false
takeshineshiro/horizon
openstack_dashboard/dashboards/identity/projects/panel.py
43
1040
# 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 # not use this file except in compliance with the...
apache-2.0
384,950,350,010,431,100
36.142857
78
0.716346
false
hedaoyuan/Paddle
python/paddle/trainer_config_helpers/tests/configs/projections.py
8
1705
''' Test mixed layer, projections and operators. ''' from paddle.trainer_config_helpers import * settings(batch_size=1000, learning_rate=1e-4) din = data_layer(name='test', size=100) din = embedding_layer(input=din, size=256) with mixed_layer(size=100) as m1: m1 += full_matrix_projection(input=din) with mixed_...
apache-2.0
7,697,053,768,494,347,000
24.447761
77
0.626393
false
msarana/selenium_python
ENV/Lib/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py
199
4546
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ from __future__ import absolute_import try: from http.client import HTTPSConnection except ImportError: from httplib import HTTPSConnection from logging import getLogger from nt...
apache-2.0
7,307,572,819,719,631,000
38.530435
77
0.554333
false
mitchcapper/mythbox
resources/lib/IMDbPY/imdb/_compat.py
128
2753
""" _compat module (imdb package). This module provides compatibility functions used by the imdb package to deal with unusual environments. Copyright 2008-2010 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License...
gpl-2.0
3,267,902,793,357,768,700
37.236111
80
0.600799
false
jackTheRipper/iotrussia
web_server/lib/werkzeug-master/examples/simplewiki/actions.py
45
6428
# -*- coding: utf-8 -*- """ simplewiki.actions ~~~~~~~~~~~~~~~~~~ The per page actions. The actions are defined in the URL with the `action` parameter and directly dispatched to the functions in this module. In the module the actions are prefixed with 'on_', so be careful not to name any othe...
gpl-2.0
5,793,568,842,011,693,000
33.374332
76
0.569384
false
greyg00s/googletest
scripts/common.py
1180
2919
# Copyright 2013 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 foll...
bsd-3-clause
5,745,368,047,817,061,000
34.168675
78
0.730045
false
CharlesZhong/Blog
app/main/forms.py
2
2058
from flask.ext.wtf import Form from wtforms import StringField, TextAreaField, BooleanField, SelectField,\ SubmitField from wtforms.validators import Required, Length, Email, Regexp from wtforms import ValidationError from ..models import Role, User class NameForm(Form): name = StringField('What is your name?...
gpl-2.0
-8,898,752,411,423,584,000
41
78
0.617104
false
openhatch/oh-mainline
vendor/packages/Django/django/core/serializers/json.py
113
3461
""" Serialize data to/from JSON """ # Avoid shadowing the standard library json module from __future__ import absolute_import import datetime import decimal import json from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer from django....
agpl-3.0
-3,624,757,502,479,542,000
31.345794
82
0.60965
false
mpetyx/pychatbot
AIML/howie-src-0.6.0/howie/frontends/xmpp/filetransfer.py
1
8172
## filetransfer.py ## ## Copyright (C) 2004 Alexey "Snake" Nezhdanov ## ## 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 2, or (at your option) ## any later version...
apache-2.0
303,146,057,119,499,200
47.642857
202
0.613681
false
ratschlab/ASP
examples/undocumented/python_static/kernel_polymatchword.py
22
1186
from tools.load import LoadMatrix from sg import sg lm=LoadMatrix() traindna=lm.load_dna('../data/fm_train_dna.dat') testdna=lm.load_dna('../data/fm_test_dna.dat') trainlabel=lm.load_labels('../data/label_train_dna.dat') parameter_list=[[traindna,testdna,trainlabel,10,2,True,True,3,0,'n'], [traindna,testdna,trainlab...
gpl-2.0
3,845,931,131,152,108,500
36.0625
89
0.677909
false
pmarques/ansible
test/units/module_utils/urls/test_fetch_url.py
40
8423
# -*- coding: utf-8 -*- # (c) 2018 Matt Martz <matt@sivel.net> # 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 socket from ansible.module_utils.six import StringIO from ansible.mo...
gpl-3.0
8,721,435,920,171,849,000
37.286364
159
0.627449
false
robhudson/django
tests/gis_tests/relatedapp/tests.py
39
15582
from __future__ import unicode_literals from django.contrib.gis.db.models import F, Collect, Count, Extent, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.geos import GEOSGeometry, MultiPoint, Point from django.db import connection from django.test import TestCase, skipUnlessDBF...
bsd-3-clause
-2,444,144,809,718,204,400
46.944615
113
0.637017
false
xlqian/navitia
source/jormungandr/jormungandr/compat.py
3
2439
# 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,438,755,299,339,916,000
38.33871
114
0.724067
false
cmsj/pibus
EPD.py
1
4018
# Copyright 2013-2015 Pervasive Displays, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
mit
-287,905,039,462,322,270
24.75641
110
0.56894
false
SaikWolf/gnuradio
grc/core/utils/expr_utils.py
17
5486
""" Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any l...
gpl-3.0
1,450,718,963,967,682,000
27.722513
92
0.628873
false
s3nk4s/flaskTutorials
FlaskApp/FlaskApp/venv/local/lib/python2.7/encodings/ptcp154.py
647
8950
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,err...
mit
-2,846,169,505,267,492,000
50.142857
81
0.616648
false
klml/kohrsupply
settings.example.py
1
3449
""" Django settings for kohrsupply project. Generated by 'django-admin startproject' using Django 1.10.1. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import...
mit
5,635,828,932,064,017,000
23.820144
91
0.682227
false
aayush2911/Fibonaccio
web2py/gluon/packages/dal/pydal/adapters/imap.py
8
43003
# -*- coding: utf-8 -*- import datetime import re import sys from .._globals import IDENTITY, GLOBAL_LOCKER from .._compat import PY2, integer_types, basestring from ..connection import ConnectionPool from ..objects import Field, Query, Expression from ..helpers.classes import SQLALL from ..helpers.methods import use_...
gpl-2.0
3,524,233,606,457,079,000
39.838557
110
0.519173
false
cmdunkers/DeeperMind
PythonEnv/lib/python2.7/site-packages/pip/_vendor/requests/cookies.py
413
17191
# -*- coding: utf-8 -*- """ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import collections from .compat import cookielib, urlparse, urlunparse, Morsel try: import threading # grr, pyflakes...
bsd-3-clause
-4,791,816,411,596,893,000
34.889353
111
0.629457
false
adw0rd/lettuce
tests/integration/lib/Django-1.2.5/django/utils/functional.py
307
14218
# License for code in this file that was taken from Python 2.5. # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # -------------------------------------------- # # 1. This LICENSE AGREEMENT is between the Python Software Foundation # ("PSF"), and the Individual or Organization ("Licensee") accessing and # otherwise usin...
gpl-3.0
1,965,849,032,980,865,300
37.741144
130
0.610705
false
danilobellini/audiolazy
examples/lpc_plot.py
1
1396
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of AudioLazy, the signal processing Python package. # Copyright (C) 2012-2016 Danilo de Jesus da Silva Bellini # # AudioLazy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
gpl-3.0
3,357,333,521,711,741,000
35.736842
77
0.72851
false
lukasjuhrich/pycroft
hades_logs/__init__.py
1
5307
""" hades_logs ---------- This module provides access to Hades' radius logs utilizing its celery RPC api. """ import logging from celery.exceptions import TimeoutError as CeleryTimeoutError from flask.globals import current_app from werkzeug import LocalProxy from .app import HadesCelery from .exc import HadesConfig...
apache-2.0
2,022,353,213,843,764,200
34.145695
93
0.628227
false
rsteca/python-social-auth
social/backends/goclio.py
77
1247
from social.backends.oauth import BaseOAuth2 class GoClioOAuth2(BaseOAuth2): name = 'goclio' AUTHORIZATION_URL = 'https://app.goclio.com/oauth/authorize/' ACCESS_TOKEN_METHOD = 'POST' ACCESS_TOKEN_URL = 'https://app.goclio.com/oauth/token/' REDIRECT_STATE = False STATE_PARAMETER = False d...
bsd-3-clause
5,619,559,984,779,561,000
34.628571
65
0.566159
false
BFriedland/UserDataBase-Heroku
venv/Lib/site-packages/pip/_vendor/requests/compat.py
571
2556
# -*- coding: utf-8 -*- """ pythoncompat """ from .packages import chardet import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) #: Python 3.0.x is_py30 = (is_py3 and _ver[1] == 0) #: Python 3.1.x is_py31 =...
mit
-663,752,567,564,605,800
21.226087
132
0.641628
false
yazug/shade_janitor
shade_janitor/tests/unit/cleanup/test_cleanup_subnet.py
1
2092
import mock from shade_janitor import cleanup from shade_janitor.tests.unit import base class TestCleanupSubnet(base.BaseTestCase): def setUp(self): super(TestCleanupSubnet, self).setUp() self.cloud.delete_subnet = mock.Mock() self.subnet = mock.Mock() def add_single(self): ...
gpl-3.0
6,612,498,921,566,346,000
38.471698
77
0.695507
false
leighpauls/k2cro4
third_party/webdriver/pylib/test/selenium/webdriver/common/alerts_tests.py
1
5602
#Copyright 2007-2009 WebDriver committers #Copyright 2007-2009 Google Inc. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required b...
bsd-3-clause
-8,435,785,012,467,050,000
35.141935
96
0.662085
false
demon-ru/iml-crm
addons/l10n_fr/report/bilan_report.py
374
6196
# -*- coding: utf-8 -*- # # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users w...
agpl-3.0
6,254,801,947,465,168,000
42.943262
99
0.602485
false
fevxie/odoo
addons/account_analytic_default/__init__.py
445
1087
# -*- 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,987,626,279,441,079,000
44.291667
79
0.613615
false
bartvm/pylearn2
pylearn2/scripts/icml_2013_wrepl/emotions/make_submission.py
21
2184
from __future__ import print_function import sys from theano.compat.six.moves import xrange def usage(): print("""usage: python make_submission.py model.pkl submission.csv) Where model.pkl contains a trained pylearn2.models.mlp.MLP object. The script will make submission.csv, which you may then upload to the kagg...
bsd-3-clause
-8,061,702,330,874,752,000
24.694118
106
0.688187
false
dsanno/chainer-cifar
src/dataset.py
1
4361
import cPickle as pickle import numpy as np import os from PIL import Image import six train_files = ['data_batch_{}'.format(i + 1) for i in six.moves.range(5)] test_files = ['test_batch'] def load_file(file_path): with open(file_path, 'rb') as f: data = pickle.load(f) return data['data']....
mit
3,803,710,116,087,965,000
36.254386
103
0.608805
false
maackle/ILC-app
make.py
1
27624
import csv import os import re import sys import argparse import tempfile from subprocess import call import json from pyspatialite import dbapi2 as sqlite3 import geojson from shapely import wkt, wkb from conf import settings from conf.settings import global_datasets from conf.projects import projects from util impo...
gpl-3.0
-2,435,972,187,406,067,000
35.685259
149
0.503077
false
jschuecker/nest-simulator
pynest/examples/plot_weight_matrices.py
17
6243
# -*- coding: utf-8 -*- # # plot_weight_matrices.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the Li...
gpl-2.0
4,416,392,864,332,955,000
32.564516
77
0.670351
false
yland/coala
coalib/output/printers/HTMLWriter.py
14
3253
from pyprint.ClosableObject import ClosableObject class HTMLWriter(ClosableObject): """ Printer for outputting HTML Log files. :param filename: the name of the file to put the data into (string). :param indentation_per_tag: spaces used to indent every subseq...
agpl-3.0
-6,998,465,960,163,367,000
30.582524
79
0.547187
false
lepistone/stock-logistics-workflow
__unported__/stock_split_picking/__openerp__.py
4
1686
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi, Guewen Baconnier # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
agpl-3.0
590,598,808,028,302,800
36.466667
92
0.62159
false
Regner/will
will/settings.py
11
7860
import os from utils import show_valid, warn, note from clint.textui import puts, indent from urlparse import urlparse def import_settings(quiet=True): """This method takes care of importing settings from the environment, and config.py file. Order of operations: 1. Imports all WILL_ settings from the env...
mit
8,993,271,245,932,201,000
41.486486
119
0.536514
false
mr-ping/WebTesting
test/test.py
1
3234
import unittest from log import Log class LogTest(unittest.TestCase): def test_get_last_logs_one(self): file = '/var/log/siege.log' content = Log.get_last_logs(file, 121) content_list = content.split(",") self.assertEqual(len(content_list), 10) def test_get_last_logs_three(sel...
mit
5,447,924,264,857,259,000
28.669725
62
0.576994
false
sunny94/temp
sympy/polys/agca/tests/test_modules.py
121
13526
"""Test modules.py code.""" from sympy.polys.agca.modules import FreeModule, ModuleOrder, FreeModulePolyRing from sympy.polys import CoercionFailed, QQ, lex, grlex, ilex, ZZ from sympy.abc import x, y, z from sympy.utilities.pytest import raises from sympy import S def test_FreeModuleElement(): M = QQ.old_poly_r...
bsd-3-clause
-2,570,000,883,159,519,000
32.151961
107
0.51767
false
darcyfdu/findlicense
etc/scripts/json2csv.py
4
9466
#!/usr/bin/python2 # # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. ...
apache-2.0
-562,356,641,273,342,300
35.976563
112
0.573315
false
muraliselva10/cloudkitty-dashboard
cloudkittydashboard/dashboards/admin/pyscripts/tables.py
1
2361
# Copyright 2015 Objectif Libre # # 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 agr...
apache-2.0
-3,579,277,093,303,672,300
32.253521
78
0.682338
false
maxamillion/ansible-modules-extras
cloud/cloudstack/cs_cluster.py
44
12964
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
3,232,549,471,124,773,000
30.083933
126
0.623129
false
tamihiro/grpc
src/python/grpcio/tests/unit/framework/face/testing/__init__.py
1496
1530
# Copyright 2015, 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 f...
bsd-3-clause
-1,241,403,873,276,167,400
50
72
0.781699
false
Unow/edx-platform
common/djangoapps/course_groups/views.py
8
7573
from django_future.csrf import ensure_csrf_cookie from django.views.decorators.http import require_POST from django.contrib.auth.models import User from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.urlresolvers import reverse from django.http import HttpResponse import json impor...
agpl-3.0
-5,039,435,894,278,112,000
30.293388
91
0.576522
false
daimajia/duktape
src/dukutil.py
14
3679
#!/usr/bin/python # # Python utilities shared by the build scripts. # import datetime import json class BitEncoder: "Bitstream encoder." _bits = None def __init__(self): self._bits = [] def bits(self, x, nbits): if (x >> nbits) != 0: raise Exception('input value has too many bits (value: %d, bits: %d)'...
mit
-2,131,732,980,080,553,200
21.570552
112
0.621908
false
PennyQ/astro-vispy
glue_vispy_viewers/common/tools.py
3
3653
import os from qtpy import QtGui, compat from glue.viewers.common.tool import Tool, CheckableTool from glue.config import viewer_tool from vispy import app, io RECORD_START_ICON = os.path.join(os.path.dirname(__file__), 'glue_record_start.png') RECORD_STOP_ICON = os.path.join(os.path.dirname(__file__), 'glue_reco...
bsd-2-clause
-4,131,193,739,916,652,000
29.190083
91
0.578155
false
MobinRanjbar/hue
desktop/core/ext-py/boto-2.38.0/boto/opsworks/layer1.py
132
129869
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
apache-2.0
8,575,868,229,364,841,000
40.974467
81
0.626046
false
mmezzavilla/ns3-mmwave
.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/suncc.py
11
1168
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_scc(conf): v=conf.env cc=conf.find_program('cc',var='CC') try: conf.cmd_and_log(cc+['-flags']) except Excepti...
gpl-2.0
-2,771,855,335,719,540,700
24.391304
78
0.621575
false
JaDogg/__py_playground
reference/pages/sum1/_stops.py
1
9394
nltkStops = { '.': True, ',': True, ':': True, 'a': True, "a's": True, 'able': True, 'about': True, 'above': True, 'according': True, 'accordingly': True, 'across': True, 'actually': True, 'after': True, 'afterwards': True, 'again': True, 'against': True, "ain't": True, 'all': True, 'allow': True, ...
mit
532,217,711,085,866,940
15.224525
23
0.563445
false
kxxoling/support-tools
googlecode-issues-exporter/github_issue_converter.py
4
16928
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
5,167,044,544,049,124,000
34.340292
80
0.663339
false
aakashsinha19/Aspectus
Image Classification/models/differential_privacy/dp_sgd/dp_optimizer/sanitizer.py
19
4433
# 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
-6,854,037,978,217,485,000
35.04065
80
0.655087
false
spacewalkproject/spacewalk
client/tools/rhn-virtualization/virtualization/init_action.py
7
1286
# # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
-6,343,433,644,573,975,000
29.619048
73
0.644635
false
denis-pitul/django
django/core/management/commands/dumpdata.py
51
7861
from collections import OrderedDict from django.apps import apps from django.core import serializers from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, router class Command(BaseCommand): help = ("Output the contents of the database as a fixture of the given ...
bsd-3-clause
-4,149,776,207,703,098,400
47.826087
117
0.555527
false
TRox1972/youtube-dl
youtube_dl/extractor/drtuber.py
4
3040
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( NO_DEFAULT, str_to_int, ) class DrTuberIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?drtuber\.com/(?:video|embed)/(?P<id>\d+)(?:/(?P<display_id>[\w-]+))?' _TESTS = [{ 'url': 'http...
unlicense
-4,283,156,187,513,633,000
34.348837
107
0.504605
false
elaginm/python_training
fixture/contact.py
1
11101
from selenium.webdriver.support.ui import Select from model.contact import Contact import re class ContactHelper: def __init__(self, app): self.app = app def open_new_address(self): wd = self.app.wd wd.find_element_by_link_text("add new").click() def create(self, contact): ...
apache-2.0
-7,223,912,260,295,392,000
41.937255
117
0.605717
false
Neamar/django
django/contrib/sessions/backends/file.py
336
7715
import datetime import errno import logging import os import shutil import tempfile from django.conf import settings from django.contrib.sessions.backends.base import ( VALID_KEY_CHARS, CreateError, SessionBase, ) from django.contrib.sessions.exceptions import InvalidSessionKey from django.core.exceptions import I...
bsd-3-clause
7,620,896,581,612,116,000
36.634146
82
0.578354
false
boundarydevices/android_external_chromium_org
build/android/pylib/valgrind_tools.py
8
8691
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Classes in this file define additional actions that need to be taken to run a test under some kind of runtime error detection tool. The interface is...
bsd-3-clause
5,358,655,682,575,429,000
30.26259
80
0.667817
false
LeartS/odoo
addons/website_blog/wizard/document_page_show_diff.py
372
2184
# -*- 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
-1,258,101,384,202,335,000
34.803279
118
0.565476
false
TheWardoctor/Wardoctors-repo
script.module.uncoded/lib/resources/lib/sources/en/movie4uch.py
6
4375
# -*- coding: utf-8 -*- ''' Covenant Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
apache-2.0
-7,096,783,112,712,064,000
36.724138
107
0.526629
false
pam-bot/SMSQuery
lib/flask/testsuite/helpers.py
405
21973
# -*- coding: utf-8 -*- """ flask.testsuite.helpers ~~~~~~~~~~~~~~~~~~~~~~~ Various helpers. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import flask import unittest from logging import StreamHandler from flask.testsuite import FlaskTestCase,...
gpl-2.0
8,825,034,492,708,832,000
36.020236
89
0.519656
false
NeCTAR-RC/horizon
openstack_dashboard/test/unit/api/test_network.py
3
6498
# Copyright 2013 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
5,954,110,665,244,904,000
44.125
79
0.60911
false
shakamunyi/tensorflow
tensorflow/python/ops/sets.py
109
1167
# 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
9,110,681,560,006,499,000
32.342857
80
0.709512
false
381426068/MissionPlanner
Lib/ihooks.py
59
19540
"""Import hook support. Consistent use of this module will make it possible to change the different mechanisms involved in loading modules independently. While the built-in module imp exports interfaces to the built-in module searching and loading algorithm, and it is possible to replace the built-in function ...
gpl-3.0
-1,229,957,319,604,256,800
33.270758
77
0.566786
false
Batterfii/django
django/dispatch/weakref_backports.py
414
2151
""" weakref_backports is a partial backport of the weakref module for python versions below 3.4. Copyright (C) 2013 Python Software Foundation, see license.python.txt for details. The following changes were made to the original sources during backporting: * Added `self` to `super` calls. * Removed `from None` when...
bsd-3-clause
-2,260,852,891,896,577,300
30.632353
80
0.562994
false
efortuna/AndroidSDKClone
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/json/tests/test_fail.py
108
3915
from json.tests import PyTest, CTest # 2007-10-05 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_checker/test/fail3.json '{unqu...
apache-2.0
800,683,366,616,176,400
36.285714
86
0.605109
false
lanselin/pysal
pysal/esda/tests/test_join_counts.py
6
2224
import unittest import numpy as np from ..join_counts import Join_Counts from ...weights import lat2W from ...common import pandas PANDAS_EXTINCT = pandas is None class Join_Counts_Tester(unittest.TestCase): """Unit test for Join Counts""" def setUp(self): self.w = lat2W(4, 4) self.y = np.one...
bsd-3-clause
8,560,935,902,251,163,000
34.870968
71
0.633993
false
alvations/Sensible-SemEval
CWI-data/evaluate_system_original.py
2
1946
import sys import argparse def evaluateIdentifier(gold, pred): """ Performs an intrinsic evaluation of a Complex Word Identification approach. @param gold: A vector containing gold-standard labels. @param pred: A vector containing predicted labels. @return: Precision, Recall and F-1. """ #Initialize variable...
mit
-3,889,798,525,430,688,300
28.938462
145
0.705036
false
lanyuwen/openthread
tools/harness-automation/cases_R140/router_5_3_4.py
18
1876
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
-8,938,273,940,463,214,000
41.636364
77
0.76226
false
chuan9/chromium-crosswalk
tools/perf/page_sets/key_idle_power_cases.py
6
2704
# 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. from page_sets import android_screen_restoration_shared_state from telemetry.page import page as page_module from telemetry.page import shared_page_state fro...
bsd-3-clause
-3,171,268,725,044,818,400
38.764706
80
0.710799
false
Thraxis/pymedusa
lib/unidecode/x00b.py
252
4132
data = ( '[?]', # 0x00 'N', # 0x01 'N', # 0x02 'H', # 0x03 '[?]', # 0x04 'a', # 0x05 'aa', # 0x06 'i', # 0x07 'ii', # 0x08 'u', # 0x09 'uu', # 0x0a 'R', # 0x0b 'L', # 0x0c '[?]', # 0x0d '[?]', # 0x0e 'e', # 0x0f 'ai', # 0x10 '[?]', # 0x11 '[?]', # 0x12 'o', # ...
gpl-3.0
-987,273,519,638,611,000
15.077821
19
0.295983
false
xuru/pyvisdk
pyvisdk/do/vmfs_datastore_base_option.py
1
1045
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VmfsDatastoreBaseOption(vim, *args, **kwargs): '''Base class that describes a VMFS da...
mit
3,912,797,045,908,335,000
30.69697
124
0.605742
false
stendarr/searchengine-imagescraper
bingscraperv3.py
1
2359
from bs4 import BeautifulSoup, SoupStrainer from html.parser import * import http.client import urllib.request from urllib.request import urlopen, Request #99 questions yes = ['y','ye','yes'] search_term = str(input('Bing Image Search: ')).replace(" ", "+") link_limit = int(input("Enter link limit (1-100): ")) sav...
mit
-8,017,445,782,539,123,000
27.421687
161
0.650699
false
Whisper-Cao/802.15.4-revision
docs/doxygen/swig_doc.py
6
8675
# # Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later versi...
gpl-3.0
-3,040,831,430,250,062,000
33.019608
100
0.658674
false
igordejanovic/textX
tests/functional/test_scoping/test_model_repository.py
1
4915
from __future__ import unicode_literals from os.path import dirname, abspath, join import textx.scoping.providers as scoping_providers from textx import metamodel_from_file from textx.scoping import is_file_included def test_inclusion_check_1(): """ Test to demonstrate how to check if a file is used by a mod...
mit
-316,587,254,507,203,500
30.107595
79
0.527772
false
medspx/QGIS
python/plugins/processing/gui/wrappers_map_theme.py
30
1829
# -*- coding: utf-8 -*- """ *************************************************************************** wrappers_map_theme.py - Map theme widget wrappers --------------------- Date : August 2017 Copyright : (C) 2017 by OPENGIS.ch Email : mario@opengis.ch **...
gpl-2.0
1,001,300,684,197,698,400
34.173077
86
0.48059
false
appsembler/edx-platform
cms/djangoapps/contentstore/management/commands/delete_course.py
16
3568
from __future__ import print_function from six import text_type from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from contentstore.utils import delete_course from xmodule.contentstore.django import contentstore from xm...
agpl-3.0
-3,616,656,670,771,902,500
42.512195
118
0.653307
false
katstalk/android_external_chromium_org
third_party/re2/re2/make_unicode_groups.py
219
2849
#!/usr/bin/python # Copyright 2008 The RE2 Authors. All Rights Reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Generate C++ tables for Unicode Script and Category groups.""" import sys import unicode _header = """ // GENERATED BY make_unicode_groups...
bsd-3-clause
7,432,405,191,888,053,000
24.666667
71
0.602317
false
rchekaluk/cloudbiolinux
cloudbio/package/cpan.py
9
3266
"""Install perl packages using CPAN and cpanminus (cpanm). """ import os from fabric.api import cd, settings from cloudbio.flavor.config import get_config_file from cloudbio.fabutils import find_cmd from cloudbio.package.shared import _yaml_to_packages from cloudbio.custom import shared as cshared def install_packag...
mit
-31,958,989,676,459,468
43.135135
113
0.572872
false
azumimuo/family-xbmc-addon
script.module.liveresolver/lib/liveresolver/resolvers/zoomtv.py
1
1639
# -*- coding: utf-8 -*- import re,urlparse,urllib from liveresolver.modules import client,decryptionUtils from liveresolver.modules.log_utils import log def resolve(url): try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0] headers = { 'referer': referer, ...
gpl-2.0
1,185,564,609,960,311,300
40
135
0.514338
false
tarballs-are-good/sympy
sympy/physics/quantum/tests/test_matrixutils.py
2
3418
from sympy import Matrix, zeros, ones, Integer from sympy.physics.quantum.matrixutils import ( to_sympy, to_numpy, to_scipy_sparse, matrix_tensor_product, matrix_to_zero ) m = Matrix([[1,2],[3,4]]) def test_sympy_to_sympy(): assert to_sympy(m) == m def test_matrix_to_zero(): assert matrix_to_zero(...
bsd-3-clause
4,332,148,937,329,089,500
31.865385
82
0.607665
false
ah391/sc-python
datalook.py
1
1722
# coding: utf-8 import sys import numpy import matplotlib.pyplot def analyse(filename, outfile=None): """Load data and create plots. Subplots with placeholders, with set lables, layout tight """ data = numpy.loadtxt(fname=filename, delimiter=',') # Create a wide figure to hold the subplo...
mit
7,377,298,487,821,775,000
26.333333
114
0.643438
false