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
j00bar/ansible
lib/ansible/modules/storage/netapp/na_cdot_lun.py
69
12603
#!/usr/bin/python # (c) 2017, NetApp, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
gpl-3.0
-1,145,635,739,152,599,800
31.735065
126
0.542172
false
0jpq0/kbengine
kbe/res/scripts/common/Lib/test/test_peepholer.py
84
13107
import dis import re import sys from io import StringIO import unittest from math import copysign from test.bytecode_helper import BytecodeTestCase class TestTranforms(BytecodeTestCase): def test_unot(self): # UNARY_NOT POP_JUMP_IF_FALSE --> POP_JUMP_IF_TRUE' def unot(x): if not x =...
lgpl-3.0
4,436,646,010,475,193,300
37.663717
81
0.492866
false
xHeliotrope/injustice_dropper
env/lib/python3.4/site-packages/six.py
878
29664
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
mit
7,588,587,853,806,405,000
34.398568
98
0.632012
false
AlphaSmartDog/DeepLearningNotes
Note-6 A3CNet/Note 6 simple ACNet/sonnet/python/modules/nets/mlp.py
10
8926
# 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 # # Unless required by applicable l...
mit
-5,910,874,843,038,269,000
36.504202
80
0.666032
false
disqus/django-old
tests/modeltests/test_client/views.py
1
7992
from xml.dom.minidom import parseString from django.core import mail from django.template import Context, Template from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound from django.contrib.auth.decorators import login_required, permission_required from django.forms.forms import Form from dja...
bsd-3-clause
1,192,078,506,306,328,000
36.172093
131
0.647648
false
django-nonrel/django
docs/_ext/literals_to_xrefs.py
92
4869
""" Runs through a reST file looking for old-style literals, and helps replace them with new-style references. """ import re import sys import shelve refre = re.compile(r'``([^`\s]+?)``') ROLES = ( 'attr', 'class', "djadmin", 'data', 'exc', 'file', 'func', 'lookup', 'meth', 'm...
bsd-3-clause
920,105,961,648,006,400
27.144509
93
0.522284
false
e-dorigatti/pyspider
pyspider/database/mysql/mysqlbase.py
75
1880
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-11-05 10:42:24 import time import mysql.connector class MySQLMixin(object): @property def dbcur(self): try: if self.con...
apache-2.0
-5,175,928,262,583,091,000
27.923077
82
0.569149
false
doismellburning/edx-platform
lms/djangoapps/lms_xblock/test/test_runtime.py
92
6099
""" Tests of the LMS XBlock Runtime and associated utilities """ from django.contrib.auth.models import User from django.conf import settings from ddt import ddt, data from mock import Mock from unittest import TestCase from urlparse import urlparse from opaque_keys.edx.locations import SlashSeparatedCourseKey from lm...
agpl-3.0
951,441,535,099,486,800
38.348387
118
0.646663
false
sorenk/ansible
lib/ansible/modules/crypto/openssl_certificate.py
15
36712
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org> # (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at> # 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_func...
gpl-3.0
2,915,841,326,876,497,000
39.745838
151
0.585749
false
tomka/rednotebook
rednotebook/gui/options.py
1
13404
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------- # Copyright (c) 2009 Jendrik Seipp # # RedNotebook 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 ver...
gpl-2.0
562,703,980,913,689,340
34.935657
105
0.571844
false
20tab/django-filer
filer/admin/folderadmin.py
2
52396
#-*- coding: utf-8 -*- from django import forms from django import template from django.core.exceptions import ValidationError from django.contrib.admin import helpers from django.contrib.admin.util import quote, unquote, capfirst from django.contrib import messages from django.template.defaultfilters import urlencode ...
bsd-3-clause
5,403,584,838,329,932,000
43.706485
178
0.58701
false
hyrole/scrapy
scrapy/settings/deprecated.py
160
1383
import warnings from scrapy.exceptions import ScrapyDeprecationWarning DEPRECATED_SETTINGS = [ ('TRACK_REFS', 'no longer needed (trackref is always enabled)'), ('RESPONSE_CLASSES', 'no longer supported'), ('DEFAULT_RESPONSE_ENCODING', 'no longer supported'), ('BOT_VERSION', 'no longer used (user agent ...
bsd-3-clause
3,784,398,596,325,435,000
52.192308
87
0.698482
false
rschnapka/odoo
addons/document_webdav/__init__.py
58
1119
# -*- 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
-497,559,327,671,061,950
40.444444
78
0.627346
false
aayushidwivedi01/spark-tk
python/sparktk/frame/ops/quantiles.py
12
2626
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
apache-2.0
-487,987,058,644,337,900
31.666667
119
0.547881
false
Instagram/django
tests/regressiontests/comment_tests/tests/__init__.py
88
3272
from django.contrib.auth.models import User from django.contrib.comments.forms import CommentForm from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.test import TestCase from regressiontests.comment_tests...
bsd-3-clause
1,980,281,448,776,372,200
35.355556
80
0.595049
false
bbozhev/flask-test
flask/lib/python2.7/site-packages/werkzeug/testsuite/datastructures.py
145
28212
# -*- coding: utf-8 -*- """ werkzeug.testsuite.datastructures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the functionality of the provided Werkzeug datastructures. TODO: - FileMultiDict - Immutable types undertested - Split up dict tests :copyright: (c) 2014 by Armin Ronacher....
mit
8,503,196,819,380,128,000
33.82963
98
0.549057
false
mgit-at/ansible
lib/ansible/modules/net_tools/nios/nios_dns_view.py
68
4192
#!/usr/bin/python # Copyright (c) 2018 Red Hat, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview...
gpl-3.0
-7,896,149,329,633,127,000
28.111111
92
0.662691
false
tareqalayan/ansible
lib/ansible/modules/network/f5/bigip_monitor_tcp.py
17
17981
#!/usr/bin/python # -*- 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-2,863,581,354,208,242,700
29.789384
92
0.601746
false
erikdejonge/youtube-dl
youtube_dl/extractor/ccma.py
19
3704
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, int_or_none, parse_duration, parse_iso8601, parse_resolution, url_or_none, ) class CCMAIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ccma\.cat/(?:[...
unlicense
8,081,314,114,472,602,000
32.972477
119
0.498785
false
openstack/heat
heat/tests/convergence/scenarios/update_replace.py
2
2098
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
1,620,001,236,693,267,000
31.276923
80
0.607245
false
tal-nino/shinken
shinken/objects/brokerlink.py
13
1701
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can re...
agpl-3.0
1,958,381,642,869,193,000
33.714286
77
0.716049
false
commial/miasm
miasm/arch/mep/arch.py
3
66072
# Toshiba MeP-c4 - miasm architecture definition # Guillaume Valadon <guillaume@valadon.net> from builtins import range from miasm.core.cpu import * from miasm.core.utils import Disasm_Exception from miasm.expression.expression import ExprId, ExprInt, ExprLoc, \ ExprMem, ExprOp, is_expr from miasm.core.asm_ast imp...
gpl-2.0
5,419,627,185,831,486,000
31.19883
135
0.601268
false
CodigoSur/cyclope
cyclope/apps/social/frontend_views.py
2
1653
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.template.loader import render_to_string from django.core.paginator import Paginator from actstream.models import Action, target_stream, user_stream from cyclope.core import frontend import cyclope....
gpl-3.0
-3,396,516,659,143,593
31.411765
77
0.69268
false
ahamilton55/ansible
lib/ansible/module_utils/facts/system/selinux.py
52
3061
# Collect facts related to selinux # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ans...
gpl-3.0
-387,949,802,047,458,100
34.593023
100
0.598171
false
Feverup/ansible-modules-extras
cloud/vmware/vmware_target_canonical_facts.py
16
3194
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
4,996,045,332,766,970,000
28.574074
109
0.68253
false
cstipkovic/spidermonkey-research
testing/mozbase/moznetwork/moznetwork/moznetwork.py
1
5591
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import argparse import array import re import socket import struct import subprocess import sys import mozinfo import m...
mpl-2.0
-1,904,276,421,798,624,300
31.505814
82
0.572706
false
hamzehd/edx-platform
lms/djangoapps/mobile_api/video_outlines/views.py
121
4888
""" Video Outlines We only provide the listing view for a video outline, and video outlines are only displayed at the course level. This is because it makes it a lot easier to optimize and reason about, and it avoids having to tackle the bigger problem of general XBlock representation in this rather specialized format...
agpl-3.0
-3,024,214,260,666,718,000
37.1875
126
0.639321
false
ingokegel/intellij-community
python/testData/inspections/PyTypeCheckerInspection/Generator.py
30
3112
def test(): def gen(n): for x in xrange(n): yield str(x) def f_1(xs): """ :type xs: list of int """ return xs def f_2(xs): """ :type xs: collections.Sequence of int """ return xs def f_3(xs): """ :type xs...
apache-2.0
7,211,044,012,061,668,000
30.755102
137
0.514781
false
xzregg/yunwei
yw/core/bf.py
2
3673
#!/usr/bin/env python # coding:utf-8 # 并发进程的类 by xzr import multiprocessing import time import subprocess import os import sys import traceback import threading #import Queue def get_now(): tf = '%Y-%m-%d %H:%M:%S' return time.strftime(tf, time.localtime()) _Cpus = multiprocessing.cpu_count() class xBF: ...
lgpl-3.0
5,872,661,661,233,947,000
25.395349
127
0.525404
false
cloudbase/maas
src/maasserver/tests/test_messages.py
1
6341
# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test maasserver messages.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metaclass__ = type __all__ = [] ...
agpl-3.0
-3,485,687,752,995,680,000
35.234286
77
0.677653
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/scipy/linalg/basic.py
9
39330
# # Author: Pearu Peterson, March 2002 # # w/ additions by Travis Oliphant, March 2002 # and Jake Vanderplas, August 2012 from __future__ import division, print_function, absolute_import __all__ = ['solve', 'solve_triangular', 'solveh_banded', 'solve_banded', 'solve_toeplitz', 'solve_circulant...
apache-2.0
-7,642,605,037,057,237,000
33.897959
83
0.569794
false
askulkarni2/ansible-modules-core
cloud/amazon/ec2_scaling_policy.py
37
6191
#!/usr/bin/python DOCUMENTATION = """ module: ec2_scaling_policy short_description: Create or delete AWS scaling policies for Autoscaling groups description: - Can create or delete scaling policies for autoscaling groups - Referenced autoscaling groups must already exist version_added: "1.6" author: "Zacharie Eaki...
gpl-3.0
6,494,474,825,796,692,000
34.58046
270
0.668551
false
jontrulson/upm
examples/python/ms5803.py
7
2129
#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2016 Intel Corporation. # # 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 l...
mit
3,736,096,687,156,722,000
35.706897
79
0.711602
false
rubyu/anki
aqt/addons.py
2
5205
# Copyright: Damien Elmes <anki@ichi2.net> # -*- coding: utf-8 -*- # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import sys, os, traceback from cStringIO import StringIO from aqt.qt import * from aqt.utils import showInfo, openFolder, isWin, openLink, \ askUser from zipfile import ...
agpl-3.0
5,297,795,852,006,329,000
31.943038
78
0.543324
false
carl-mastrangelo/grpc
tools/profiling/microbenchmarks/bm_json.py
18
6459
# Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
190,914,363,233,680,320
29.323944
79
0.495433
false
edx/edx-platform
lms/djangoapps/lti_provider/tests/test_views.py
5
9132
""" Tests for the LTI provider views """ from unittest.mock import MagicMock, patch from django.test import TestCase from django.test.client import RequestFactory from django.urls import reverse from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator from common.djangoapps.student.tests.factories impor...
agpl-3.0
5,933,823,660,744,590,000
36.892116
120
0.656373
false
udayinfy/openerp-7.0
wms/__openerp__.py
3
2789
# -*- coding: utf-8 -*- ############################################################################## # # wms module for OpenERP, This module allows to manage crossdocking in warehouses # Copyright (C) 2011 SYLEAM Info Services (<http://www.Syleam.fr/>) # Sylvain Garancher <sylvain.garancher@syleam....
agpl-3.0
6,473,723,334,495,469,000
33.432099
84
0.554679
false
MMaus/mutils
models/threeSeg.py
1
3984
# -*- coding : utf8 -*- """ .. module:: 3seg :synopsis: Equations and solutions for the three-segment model .. moduleauthor:: Moritz Maus <mmaus@sport.tu-darmstadt.de> """ # format: l1, l2, l3, c1, c2] from pylab import (array, arccos, linspace, vstack, figure, clf, plot, xlabel, ylabel, show, savefig, ...
gpl-2.0
334,950,680,466,379,970
23.9
81
0.522088
false
leilihh/novaha
nova/tests/virt/baremetal/db/test_bm_node.py
29
6886
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
apache-2.0
8,871,365,492,239,454,000
35.052356
78
0.55199
false
mSenyor/kivy
examples/animation/animate.py
40
1338
''' Widget animation ================ This example demonstrates creating and applying a multi-part animation to a button widget. You should see a button labelled 'plop' that will move with an animation when clicked. ''' import kivy kivy.require('1.0.7') from kivy.animation import Animation from kivy.app import App f...
mit
5,951,742,404,710,813,000
31.634146
78
0.648729
false
99cloud/keystone_register
horizon/management/commands/startdash.py
16
2450
import glob from optparse import make_option import os from django.core.management.base import CommandError from django.core.management.templates import TemplateCommand from django.utils.importlib import import_module import horizon class Command(TemplateCommand): template = os.path.join(horizon.__path__[0], "c...
apache-2.0
317,741,898,856,593,400
40.525424
79
0.546122
false
suyashphadtare/sajil-final-frappe
frappe/widgets/form/save.py
32
1739
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json from frappe.widgets.form.load import run_onload @frappe.whitelist() def savedocs(): """save / submit / update doclist""" try: doc = frappe.get_doc(json...
mit
-8,531,020,398,046,033,000
24.573529
111
0.688327
false
andim27/magiccamp
tests/regressiontests/forms/localflavor/ro.py
30
5828
# -*- coding: utf-8 -*- # Tests for the contrib/localflavor/ RO form fields. tests = r""" >>> from django.contrib.localflavor.ro.forms import * ##ROCIFField ################################################################ f = ROCIFField() f.clean('21694681') u'21694681' f.clean('RO21694681') u'21694681' f.clean('216...
bsd-3-clause
-7,796,059,109,742,182,000
32.291429
80
0.667525
false
ClimbsRocks/scikit-learn
examples/cluster/plot_color_quantization.py
61
3444
# -*- coding: utf-8 -*- """ ================================== Color Quantization using K-Means ================================== Performs a pixel-wise Vector Quantization (VQ) of an image of the summer palace (China), reducing the number of colors required to show the image from 96,615 unique colors to 64, while pre...
bsd-3-clause
-3,621,842,209,109,831,000
31.8
79
0.679733
false
GinnyN/towerofdimensions-django
build/lib/django/contrib/flatpages/models.py
410
1134
from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ class FlatPage(models.Model): url = models.CharField(_('URL'), max_length=100, db_index=True) title = models.CharField(_('title'), max_length=200) content = models.TextField(_(...
bsd-3-clause
9,040,081,696,244,614,000
42.615385
163
0.669312
false
shogun-toolbox/shogun
examples/undocumented/python/distance_manhattanword.py
2
1105
#!/usr/bin/env python import shogun as sg traindna = '../data/fm_train_dna.dat' testdna = '../data/fm_test_dna.dat' parameter_list = [[traindna,testdna,3,0,False],[traindna,testdna,4,0,False]] def distance_manhattenword (train_fname=traindna,test_fname=testdna,order=3,gap=0,reverse=False): charfeat=sg.create_string...
bsd-3-clause
4,810,299,774,981,410,000
35.833333
97
0.755656
false
cbertinato/pandas
pandas/_config/localization.py
1
4655
""" Helpers for configuring locale settings. Name `localization` is chosen to avoid overlap with builtin `locale` module. """ from contextlib import contextmanager import locale import re import subprocess from pandas._config.config import options @contextmanager def set_locale(new_locale, lc_var=locale.LC_ALL): ...
bsd-3-clause
-4,127,282,855,604,569,600
27.734568
79
0.625994
false
Microsoft/hummingbird
tests/test_sklearn_decomposition.py
1
5758
""" Tests sklearn matrix decomposition converters """ import unittest import warnings import sys from distutils.version import LooseVersion import numpy as np import torch import sklearn from sklearn.decomposition import FastICA, KernelPCA, PCA, TruncatedSVD from sklearn.model_selection import train_test_split from sk...
mit
8,471,067,745,009,065,000
38.438356
144
0.686349
false
mkrupcale/ansible
lib/ansible/modules/cloud/amazon/ec2_asg.py
13
38185
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
-2,928,054,172,319,307,300
40.236501
232
0.646065
false
bogdanvuk/sydpy
sydpy/types/__init__.py
1
1304
# This file is part of sydpy. # # Copyright (C) 2014-2015 Bogdan Vukobratovic # # sydpy is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 2.1 # of the License, or (at your option)...
lgpl-2.1
-2,229,752,739,850,204,400
30.047619
66
0.618098
false
kubeflow/kfserving
python/kfserving/test/test_v1beta1_transformer_config.py
1
2113
# Copyright 2020 kubeflow.org. # # 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
-1,648,028,866,633,783,300
29.623188
102
0.677709
false
zenodo/invenio
invenio/legacy/registry.py
18
2353
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 CERN. # # Invenio 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...
gpl-2.0
4,499,823,531,437,782,500
36.349206
79
0.708032
false
openmb/openblackhole-enigma2
lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
47
9344
# -*- coding: iso-8859-1 -*- from enigma import eConsoleAppContainer from Components.Console import Console from Components.About import about from Components.PackageInfo import PackageInfoHandler from Components.Language import language from Components.Sources.List import List from Components.Ipkg import IpkgComponent...
gpl-2.0
1,030,085,553,780,374,000
32.491039
130
0.710188
false
sassman/ansible-modules-core
cloud/amazon/ec2_snapshot.py
6
5398
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
-6,052,397,444,278,806,000
31.914634
127
0.658392
false
dcolligan/server
setup.py
4
2617
# Don't import __future__ packages here; they make setup fail # First, we try to use setuptools. If it's not available locally, # we fall back on ez_setup. try: from setuptools import setup except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup with open(...
apache-2.0
-4,213,342,856,843,965,400
33.893333
75
0.635078
false
saullocastro/compmech
doc/pyplots/theory/fem/fsdt_donnell_kquad4.py
3
1473
from matplotlib.pyplot import * from math import sqrt m = 1/3. xs = [+1, +1, -1, -1] ys = [-1, +1, -1, +1] figure(figsize=(4, 4)) ax = gca() ax.spines['right'].set_visible(False) ax.spines['top'].set_visible(False) ax.spines['left'].set_position(('data', 0)) ax.spines['bottom'].set_position(('data', 0)) ax.xaxis.set_t...
bsd-3-clause
-6,313,386,928,571,948,000
31.733333
74
0.545825
false
timduru/platform-external-chromium_org
tools/site_compare/site_compare.py
179
6504
#!/usr/bin/env python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """SiteCompare component to handle bulk scrapes. Invokes a list of browsers and sends them to a list of URLs, saving the rendered ...
bsd-3-clause
7,044,068,989,490,660,000
35.954545
80
0.699569
false
SummerLW/Perf-Insight-Report
third_party/gsutil/third_party/apitools/apitools/base/py/batch_test.py
11
19527
"""Tests for google3.cloud.bigscience.apitools.base.py.batch.""" import textwrap import mock from six.moves import http_client from six.moves.urllib import parse import unittest2 from apitools.base.py import batch from apitools.base.py import exceptions from apitools.base.py import http_wrapper class FakeCredentia...
bsd-3-clause
159,701,753,534,936,220
37.213307
79
0.557689
false
mensler/ansible
hacking/cherrypick.py
62
1474
#!/usr/bin/env python3 import os import sys import tempfile import sh REPO_PATH = {'extras': '/srv/ansible/stable-2.2/lib/ansible/modules/extras', 'core': '/srv/ansible/stable-2.2/lib/ansible/modules/core'} if __name__ == '__main__': commit_hash = sys.argv[1] which_modules = sys.argv[2] git = sh...
gpl-3.0
3,919,752,161,076,808,000
27.346154
86
0.567843
false
erikmcc/kubernetes
cluster/juju/layers/kubernetes-worker/lib/charms/kubernetes/flagmanager.py
290
4961
#!/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
3,580,320,430,098,121,000
32.295302
81
0.556138
false
JackWoot/E2E-Messenger
Server/server/lib/werkzeug/contrib/wrappers.py
318
10331
# -*- coding: utf-8 -*- """ werkzeug.contrib.wrappers ~~~~~~~~~~~~~~~~~~~~~~~~~ Extra wrappers or mixins contributed by the community. These wrappers can be mixed in into request objects to add extra functionality. Example:: from werkzeug.wrappers import Request as RequestBase fr...
gpl-2.0
-1,249,642,636,525,795,800
36.161871
78
0.626077
false
karthikvadla16/spark-tk
regression-tests/sparktkregtests/testcases/frames/column_method_drop_test.py
14
3803
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
apache-2.0
7,348,922,924,445,089,000
34.47619
75
0.645906
false
mikeckennedy/cookiecutter-pyramid-talk-python-starter
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/services/cms_service.py
1
1465
from {{cookiecutter.project_slug}}.data.cms_page import CmsPage from {{cookiecutter.project_slug}}.data.dbsession import DbSessionFactory class CmsService: @classmethod def get_page_by_url(cls, url): if not url: return None url = url.lower().strip() session = DbSessionFact...
mit
-4,483,074,600,582,903,300
25.160714
78
0.545392
false
jamesblunt/sympy
sympy/physics/sho.py
71
2482
from __future__ import print_function, division from sympy.core import S, pi, Rational from sympy.functions import assoc_laguerre, sqrt, exp, factorial, factorial2 def R_nl(n, l, nu, r): """ Returns the radial wavefunction R_{nl} for a 3d isotropic harmonic oscillator. ``n`` the "nodal" quan...
bsd-3-clause
-6,422,820,457,292,936,000
26.577778
79
0.520145
false
iceihehe/pipeg
python3/genome2.py
4
5090
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or module 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 ...
mit
1,511,552,572,860,280,300
29.656627
75
0.677343
false
sjdines/mezzanine-fluent-pages
mezzanine_fluent_pages/mezzanine_layout_page/admin.py
1
6680
from django.conf.urls import url from django.contrib import admin from fluent_contents.admin import PlaceholderEditorAdmin from fluent_contents.analyzer import get_template_placeholder_data from fluent_utils.ajax import JsonResponse from mezzanine.pages.admin import PageAdmin from . import models, widgets class Flue...
bsd-2-clause
5,857,697,848,118,716,000
33.43299
98
0.600599
false
ibmsoe/tensorflow
tensorflow/python/framework/meta_graph.py
34
26049
# 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
8,348,980,136,943,049,000
37.083333
80
0.657568
false
fuzzysteve/yamlloader
tableloader/tableFunctions/groups.py
1
1801
# -*- coding: utf-8 -*- from yaml import load, dump try: from yaml import CSafeLoader as SafeLoader print "Using CSafeLoader" except ImportError: from yaml import SafeLoader print "Using Python SafeLoader" import os import sys reload(sys) sys.setdefaultencoding("utf-8") from sqlalchemy import Table def importyaml...
mit
-532,967,351,756,892,740
45.179487
155
0.616324
false
gonzolino/heat
heat/db/sqlalchemy/migrate_repo/versions/047_stack_nested_depth.py
13
1602
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
5,128,205,200,936,451,000
34.6
78
0.663546
false
realsystem/CloudFerry
cloudferrylib/base/action/action.py
11
1065
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
apache-2.0
-73,018,738,342,877,380
26.307692
70
0.660094
false
oberstet/crossbarexamples
rest/needs_cleanup/python/lib/crossbarconnect/client.py
9
8266
############################################################################### ## ## Copyright (C) 2012-2014 Tavendo GmbH ## ## 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,130,401,927,103,038,000
32.064
126
0.604767
false
CiscoSystems/nova
nova/tests/api/openstack/compute/contrib/test_snapshots.py
30
8037
# Copyright 2011 Denali 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/LICENSE-2.0 # # Unless requ...
apache-2.0
3,658,086,337,553,203,000
37.454545
78
0.598358
false
diagramsoftware/odoomrp-utils
product_uom_change_fix/models/product.py
13
1920
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of th...
agpl-3.0
8,803,350,959,548,142,000
40.73913
78
0.521875
false
noba3/KoTos
addons/script.module.urlresolver/lib/urlresolver/plugins/watchfreeinhd.py
4
2097
''' watchfreeinhd urlresolver plugin Copyright (C) 2013 voinage This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program i...
gpl-2.0
5,861,438,281,677,494,000
35.789474
103
0.677635
false
OldHuntsman/DefilerWings
game/pythoncode/girls.py
1
16984
# coding=utf-8 import random import data import renpy.exports as renpy import renpy.store as store import girls_data from treasures import gen_treas from utils import call from characters import Girl from data import achieve_target class GirlsList(object): def __init__(self, game_ref, base_character): se...
bsd-3-clause
8,058,773,759,381,603,000
42.362573
112
0.570504
false
Reddine/dzlibs
tweeza/users/views.py
9
2145
from flask import (Blueprint, render_template, flash, request, redirect, url_for) from flask.ext.login import login_required, current_user from users.models import User from items.models import Item from users.forms import EditProfileForm from flask.ext.babel import gettext as _ users = Blueprint('u...
mpl-2.0
2,603,199,521,902,704,600
35.355932
75
0.618182
false
hujiajie/pa-chromium
tools/git/for-all-touched-files.py
130
3879
#!/usr/bin/env python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Invokes the specified (quoted) command for all files modified between the current git branch and the specified branch or co...
bsd-3-clause
8,868,940,145,502,394,000
33.026316
77
0.644754
false
asampat3090/readthedocs.org
readthedocs/restapi/urls.py
4
1407
from django.conf.urls import url, patterns, include from rest_framework import routers from .views.model_views import BuildViewSet, ProjectViewSet, NotificationViewSet, VersionViewSet from readthedocs.comments.views import CommentViewSet router = routers.DefaultRouter() router.register(r'build', BuildViewSet) router...
mit
6,997,323,850,555,082,000
42.96875
99
0.724236
false
kustodian/ansible
test/units/module_utils/network/ftd/test_fdm_swagger_parser.py
37
17322
# Copyright (c) 2018 Cisco and/or its affiliates. # # 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 v...
gpl-3.0
-4,849,606,375,866,482,000
44.704485
115
0.381192
false
ebukoz/thrive
erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py
11
3120
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from erpnext.utilities.transaction_base import TransactionBase class MaintenanceVisit(TransactionBase): def get_fe...
gpl-3.0
-2,751,693,802,528,694,300
35.27907
356
0.674359
false
joker946/nova
nova/tests/functional/v3/test_multiple_create.py
30
2240
# Copyright 2012 Nebula, Inc. # Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
5,971,094,824,780,547,000
36.333333
79
0.620536
false
owattenmaker/PythonFighter
fighterV02.py
1
14644
''' Worst fighting game ever By: Owen Wattenmaker, Max Lambek ''' #TODO ############################################################################################ ### -add in frames for attacking, looks too choppy, need more pictures ### ### -fix yellow hit marker ### ### -f...
mit
-6,023,337,996,907,088,000
31.741935
177
0.637531
false
FluidityProject/fluidity
python/elementtree/SimpleXMLWriter.py
103
8616
# # SimpleXMLWriter # $Id: SimpleXMLWriter.py 2312 2005-03-02 18:13:39Z fredrik $ # # a simple XML writer # # history: # 2001-12-28 fl created # 2002-11-25 fl fixed attribute encoding # 2002-12-02 fl minor fixes for 1.5.2 # 2004-06-17 fl added pythondoc markup # 2004-07-23 fl added flush method (from Jay Grav...
lgpl-2.1
7,714,591,521,416,884,000
29.88172
78
0.59552
false
alivecor/tensorflow
tensorflow/contrib/learn/python/learn/datasets/base_test.py
136
3072
# 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,082,588,630,421,991,000
36.925926
80
0.660807
false
MER-GROUP/intellij-community
python/helpers/py3only/docutils/languages/de.py
200
1722
# $Id: de.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Gunnar Schwant <g.schwant@gmx.de> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated ...
apache-2.0
5,806,921,949,485,640,000
28.689655
76
0.634727
false
KanoComputing/kano-toolset
tests/fixtures/keyboard.py
1
1887
# # keyboard.py # # Copyright (C) 2018 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2 # # Fixtures for fake keyboards # import imp import os import pytest KEYBOARD_LSUSB_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'keyboard' ) KEYBOARD_LSUSB_OUTPUTS = [ ...
gpl-2.0
-6,783,581,242,436,749,000
26.347826
80
0.63911
false
sudheesh001/oh-mainline
vendor/packages/PyYaml/lib/yaml/composer.py
534
4921
__all__ = ['Composer', 'ComposerError'] from error import MarkedYAMLError from events import * from nodes import * class ComposerError(MarkedYAMLError): pass class Composer(object): def __init__(self): self.anchors = {} def check_node(self): # Drop the STREAM-START event. if se...
agpl-3.0
-7,846,214,511,187,724,000
34.402878
89
0.581589
false
NeCTAR-RC/horizon
openstack_dashboard/templatetags/context_selection.py
1
4352
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
-3,776,427,272,437,218,000
32.221374
78
0.633502
false
bj7/pwndbg
ida_script.py
2
1687
import idaapi import idautils import idc import functools import datetime import threading import xmlrpclib from SimpleXMLRPCServer import SimpleXMLRPCServer import idaapi import idautils import idc # Save the database so nothing gets lost. idc.SaveBase(idc.GetIdbPath() + '.' + datetime.datetime.now().isoformat()) x...
mit
-5,278,602,193,776,303,000
25.359375
93
0.619443
false
7digital/troposphere
examples/ApiGateway.py
4
4609
from troposphere import Ref, Template, Output from troposphere.apigateway import RestApi, Method from troposphere.apigateway import Resource, MethodResponse from troposphere.apigateway import Integration, IntegrationResponse from troposphere.apigateway import Deployment, Stage, ApiStage from troposphere.apigateway impo...
bsd-2-clause
-7,410,159,825,665,922,000
24.048913
77
0.588631
false
andreparrish/python-for-android
python-build/python-libs/gdata/build/lib/gdata/blogger/__init__.py
140
6426
#!/usr/bin/python # # Copyright (C) 2007, 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 applicabl...
apache-2.0
2,902,015,068,329,859,600
30.811881
80
0.700124
false
kobotoolbox/kobocat
onadata/libs/constants.py
1
1349
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import # Userprofile Permissions CAN_ADD_USERPROFILE = 'add_userprofile' CAN_CHANGE_USERPROFILE = 'change_userprofile' CAN_DELETE_USERPROFILE = 'delete_userprofile' CAN_ADD_XFORM_TO_PROFILE = 'can_add_xform' CAN_VIEW_PROFILE = 'view_profile' # ...
bsd-2-clause
5,707,182,612,514,873,000
34.5
62
0.774648
false
alexteodor/odoo
addons/pos_restaurant/__init__.py
332
1074
# -*- 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
-7,123,556,356,118,463,000
41.96
79
0.60987
false
GeoNode/geonode
geonode/geoserver/tests/test_helpers.py
2
7983
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2019 OSGeo # # 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 ...
gpl-3.0
1,011,767,441,808,122,400
39.318182
110
0.634223
false
sajuptpm/neutron-ipam
neutron/plugins/ml2/drivers/mech_linuxbridge.py
26
2340
# Copyright (c) 2013 OpenStack Foundation # 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 ...
apache-2.0
8,434,575,220,404,979,000
40.052632
78
0.673077
false
nerdvegas/rez
src/rez/data/tests/builds/packages/foo/1.1.0/build.py
1
1617
from __future__ import print_function from build_util import build_directory_recurse, check_visible import os.path def build(source_path, build_path, install_path, targets): # build requirement 'floob' should be visible check_visible("foo", "floob") import floob print(floob.hello()) # do the bu...
lgpl-3.0
-6,371,292,564,097,938,000
32.6875
79
0.656772
false
cfg2015/EPT-2015-2
addons/marketing_campaign/report/__init__.py
441
1071
# -*- 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,746,986,861,130,917,000
43.625
78
0.61718
false
SheepDogInc/ssheepdog
ssheepdog/migrations/0007_auto__add_loginlog__chg_field_applicationkey_public_key__chg_field_use.py
1
8799
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'LoginLog' db.create_table('ssheepdog_loginlog', ( ('stdout', self.gf('djan...
bsd-3-clause
4,565,284,130,976,736,000
65.659091
178
0.5562
false
flyher/pymo
symbian/PythonForS60_1.9.6/module-repo/standard-modules/encodings/gb2312.py
816
1027
# # gb2312.py: Python Unicode Codec for GB2312 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_cn, codecs import _multibytecodec as mbc codec = _codecs_cn.getcodec('gb2312') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrem...
mit
7,419,779,822,632,666,000
25.333333
74
0.700097
false
Edraak/edx-platform
lms/djangoapps/shoppingcart/context_processor.py
173
1679
""" This is the shoppingcart context_processor module. Currently the only context_processor detects whether request.user has a cart that should be displayed in the navigation. We want to do this in the context_processor to 1) keep database accesses out of templates (this led to a transaction bug with user email change...
agpl-3.0
-5,993,320,272,630,864,000
43.184211
112
0.682549
false