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
silky/autojump
bin/autojump_utils.py
18
4357
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import errno from itertools import islice import os import platform import re import shutil import sys import unicodedata if sys.version_info[0] == 3: imap = map os.getcwdu = os.getcwd else: from itertools import imap d...
gpl-3.0
1,224,634,568,230,208,500
20.894472
79
0.598347
false
makacodewalker/etsgh
django/utils/unittest/loader.py
353
13437
"""Loading unittests.""" import os import re import sys import traceback import types import unittest from fnmatch import fnmatch from django.utils.unittest import case, suite try: from os.path import relpath except ImportError: from django.utils.unittest.compatibility import relpath __unittest = True de...
bsd-3-clause
8,827,829,054,550,487,000
40.729814
123
0.594999
false
dymkowsk/mantid
Framework/PythonInterface/plugins/algorithms/SaveYDA.py
2
9618
from __future__ import absolute_import, division, print_function from mantid.api import PythonAlgorithm, AlgorithmFactory, MatrixWorkspaceProperty, WorkspaceUnitValidator, \ InstrumentValidator, FileProperty, FileAction from mantid.kernel import Direction, CompositeValidator from mantid.dataobje...
gpl-3.0
-1,325,700,988,289,296,000
29.340694
119
0.567894
false
qubell/contrib-python-qubell-client
qubell/tests/testing/test_values_decorator.py
5
2834
import unittest from qubell.api.private.testing import values __author__ = 'dmakhno' # noinspection PyUnresolvedReferences class ValuesDecoratorTests(unittest.TestCase): class FakeInstance(object): def __init__(self, return_value): self.returnValues = return_value rv = {"str": "some str...
apache-2.0
-3,205,658,777,891,764,000
32.75
119
0.606916
false
hioa-cs/IncludeOS
test/stress/test.py
4
9043
#!/usr/bin/env python3 from __future__ import division from __future__ import print_function from builtins import str from builtins import range from past.utils import old_div import sys import socket import time import subprocess import os from vmrunner import vmrunner from vmrunner.prettify import color test_name="...
apache-2.0
8,049,572,884,556,216,000
31.181495
127
0.687383
false
hdinsight/hue
desktop/core/ext-py/Django-1.6.10/django/conf/locale/lt/formats.py
118
1833
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y \m. E j \d.' TIME_FORMAT = 'H:...
apache-2.0
2,421,553,377,877,209,600
37.1875
80
0.505728
false
rallylee/gem5
tests/configs/pc-simple-timing.py
13
2346
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
-6,698,054,786,986,790,000
52.318182
76
0.771526
false
ZhangXinNan/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/reshape_test.py
14
13148
# 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,904,453,568,585,917,000
36.352273
94
0.64854
false
Ayub-Khan/edx-platform
lms/djangoapps/lti_provider/users.py
63
5258
""" LTI user management functionality. This module reconciles the two identities that an individual has in the campus LMS platform and on edX. """ import string import random import uuid from django.conf import settings from django.contrib.auth import authenticate, login from django.contrib.auth.models import User fr...
agpl-3.0
8,325,082,349,963,148,000
33.592105
84
0.635983
false
rghe/ansible
lib/ansible/modules/cloud/amazon/cloudfront_invalidation.py
49
10365
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module...
gpl-3.0
-378,006,918,937,320,000
36.690909
143
0.666956
false
chauhanhardik/populo
lms/djangoapps/shoppingcart/tests/test_views.py
3
96238
""" Tests for Shopping Cart views """ from collections import OrderedDict import pytz from urlparse import urlparse from decimal import Decimal import json from django.http import HttpRequest from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from django.c...
agpl-3.0
-3,320,037,734,340,536,000
45.64954
164
0.649006
false
molebot/brython
www/src/Lib/test/test_bufio.py
112
2599
import unittest from test import support import io # C implementation. import _pyio as pyio # Python implementation. # Simple test to ensure that optimizations in the IO library deliver the # expected results. For best testing, run this under a debug-build Python too # (to exercise asserts in the C code). lengths =...
bsd-3-clause
-5,732,120,321,829,700,000
34.60274
80
0.599077
false
Anonymouslemming/ansible
lib/ansible/modules/cloud/amazon/route53.py
24
22578
#!/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
9,016,012,369,639,254,000
35.593193
146
0.630968
false
moxon6/chemlab
build/lib.win32-3.4/chemlab/graphics/renderers/atom.py
6
3236
import numpy as np from .. import colors from ...db import ChemlabDB from .base import AbstractRenderer from .sphere import SphereRenderer from .sphere_imp import SphereImpostorRenderer from .point import PointRenderer vdw_dict = ChemlabDB().get("data", 'vdwdict') class AtomRenderer(AbstractRenderer): """Render ...
gpl-3.0
-5,107,993,247,953,647,000
34.966667
110
0.596106
false
texcaltech/windmilltownhomes-old
django/template/context.py
15
5405
from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module # Cache of actual callables. _standard_context_processors = None # We need the CSRF processor no matter what the user has in their settings, # because otherwise it is a security vulnerability, and we can't afford t...
bsd-3-clause
-2,431,719,393,821,315,000
35.033333
124
0.638483
false
mzdaniel/oh-mainline
vendor/packages/twisted/twisted/test/test_udp.py
18
25186
# -*- test-case-name: twisted.test.test_udp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorUDP} and L{IReactorMulticast}. """ from twisted.trial import unittest, util from twisted.internet.defer import Deferred, gatherResults, maybeDeferred from...
agpl-3.0
2,425,154,011,313,852,000
34.175978
101
0.603589
false
wwright2/dcim3-angstrom1
sources/openembedded-core/meta/lib/oeqa/selftest/sstate.py
7
2453
import datetime import unittest import os import re import shutil import oeqa.utils.ftools as ftools from oeqa.selftest.base import oeSelfTest from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer class SStateBase(oeSelfTest): def setUpLocal(self): self.temp_sstate_location = None ...
mit
-4,506,410,298,144,637,000
45.283019
155
0.627803
false
aarony/decaf-platform
scripts/qapi-types.py
47
6007
# # QAPI types generator # # Copyright IBM, Corp. 2011 # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level directory. from ordereddict import OrderedDict from qapi import * import sys import os import getopt impor...
gpl-2.0
-6,881,918,339,249,908,000
20.607914
84
0.556684
false
eadgarchen/tensorflow
tensorflow/python/debug/cli/curses_widgets.py
157
6418
# 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
-294,606,890,405,640,700
30.772277
80
0.64397
false
gangadhar-kadam/sapphire_app
selling/doctype/cgi_fun/cgi_fun.py
1
3899
#For license information, please see license.txt from __future__ import unicode_literals import webnotes sql = webnotes.conn.sql from webnotes.model.doc import Document, addchild from webnotes.utils import cstr, cint, flt, comma_or from datetime import date,timedelta import datetime from webnotes.model.code import ge...
agpl-3.0
-2,644,062,951,142,422,000
40.478723
204
0.551936
false
2013Commons/hue
desktop/core/ext-py/Django-1.4.5/django/contrib/gis/geos/libgeos.py
87
5581
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import os import re import sys from ctypes import c_char...
apache-2.0
8,755,209,616,744,701,000
38.027972
169
0.705429
false
cg31/tensorflow
tensorflow/contrib/layers/python/layers/feature_column_ops.py
5
36498
# 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
-6,547,539,210,600,149,000
40.522184
109
0.651844
false
WuPei/cv_reconstructor
main.py
1
4437
import fileManager as fm import camera import numpy as np import cv2 import shader as pts_shader import os import timeit from texture import Mesh from SortBuilding import SortBuilding as sb import math def sortBasedOnZ(mylist,refer_list): return [x for (y,x) in sorted(zip(refer_list,mylist),key = lambda pair:pair[0]...
mit
5,329,139,774,531,014,000
32.11194
133
0.672752
false
neilhan/tensorflow
tensorflow/tensorboard/tensorboard.py
7
5713
# 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
-4,709,308,220,453,153,000
35.858065
80
0.694031
false
librasungirl/openthread
tools/harness-automation/cases/border_7_1_3.py
9
1876
#!/usr/bin/env python # # Copyright (c) 2019, 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
1,063,340,442,533,154,400
41.636364
77
0.76226
false
wolfv/uberwriter
uberwriter/config.py
1
2377
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2019, Wolf Vollprecht <w.vollprecht@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free ...
gpl-3.0
-2,786,843,419,209,565,000
31.121622
75
0.685318
false
cloudbase/nova
nova/api/openstack/compute/suspend_server.py
4
3292
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
-7,628,689,967,489,013,000
38.190476
79
0.667375
false
ctag/cpe453
JMRI/jython/javaone/signalstop.py
21
1157
# stop on signals def setStopBlock(block, signal,dir) : s = signals.getSignalHead(signal) b = jmri.jmrit.tracker.StoppingBlock(block) b.addSignal(s,dir) return b def setStopBlock2(block, signal1, signal2, dir) : s1 = signals.getSignalHead(signal1) s2 = signals.getSignalHead(signal2) b = jmr...
gpl-2.0
-3,240,957,425,069,966,000
33.029412
72
0.712187
false
danimaribeiro/PyTrustNFe
tests/test_nfse_paulistana_tipo_cpfcnpj.py
1
1842
# coding=utf-8 import os.path import unittest from pytrustnfe.xml import render_xml, sanitize_response from tests.const import DEFAULT_RPS, NFSE template_path = 'pytrustnfe/nfse/paulistana/templates' def _get_nfse(tipo_cpfcnpj): nfse = NFSE lista_rps = DEFAULT_RPS for rps in lista_rps: rps['tom...
agpl-3.0
6,113,116,392,341,722,000
29.7
82
0.671553
false
snowzjx/ns3-buffer-management
src/nix-vector-routing/bindings/modulegen__gcc_ILP32.py
34
388692
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
5,886,418,370,597,066,000
63.846847
934
0.606658
false
awohns/selection
python_lib/lib/python3.4/site-packages/pip/locations.py
390
6202
"""Locations where we look for configs, install stuff, etc""" import sys import site import os import tempfile from distutils.command.install import install, SCHEME_KEYS import getpass from pip.backwardcompat import get_python_lib, get_path_uid, user_site import pip.exceptions DELETE_MARKER_MESSAGE = '''\ This file ...
mit
-680,543,060,823,316,000
35.05814
105
0.637536
false
avadacatavra/servo
tests/wpt/web-platform-tests/tools/third_party/py/py/_io/terminalwriter.py
54
13486
""" Helper functions for writing to terminals and files. """ import sys, os import py py3k = sys.version_info[0] >= 3 from py.builtin import text, bytes win32_and_ctypes = False colorama = None if sys.platform == "win32": try: import colorama except ImportError: try: import ctyp...
mpl-2.0
-5,988,573,641,286,052,000
34.119792
91
0.558209
false
ryfeus/lambda-packs
Selenium_PhantomJS/source/requests/packages/chardet/eucjpprober.py
2919
3678
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
4,271,729,559,649,714,700
39.866667
78
0.618271
false
grischard/postcode-centroid
postcode-centroid.py
1
2908
#!/usr/bin/env python """ Return GeoJSON centroids for each postcode in Luxembourg - Downloads the latest geojson from UDATA_ADDRESSES - Average the position of all postcodes - Spit out geojson Run like : python3 postcode-centroid.py > centroids.geojson A sample centroids.geojson.xz (from 2016-07-11) is included. ...
apache-2.0
-7,709,236,553,631,075,000
32.425287
94
0.70564
false
Opshun/API
venv/lib/python2.7/site-packages/pip/_vendor/packaging/version.py
451
11884
# Copyright 2014 Donald Stufft # # 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...
mit
-2,451,179,038,860,298,000
28.63591
79
0.562016
false
berezovskyi/nikola
nikola/data/themes/base/messages/messages_si_lk.py
28
1044
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", "(active)": "", "Also available in:": "", "Archive": "", "Authors": "", "Categories": "", "Comments": "", "LANGUAGE": "", "Languages:": "", "More posts about %s": "", ...
mit
-751,297,615,532,252,800
23.27907
42
0.457854
false
sudheesh001/RFID-DBSync
venv/lib/python2.7/site-packages/jinja2/compiler.py
623
61785
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from itertools import chain from copy import deepcopy from keyword import iskeyword as is_python_keyword from jinja2...
gpl-2.0
4,217,536,380,880,749,000
36.67378
87
0.559926
false
innainu/climatechangebot
climatechangebot/nyt_interface/nyt_interface.py
1
3194
""" Searches nyt API for articles related to climate change and returns them. API returns pages, each page has 10 articles. This currently only returns one page. Cannot specify how many articles per page in api. get_trending function returns articles for the past 3 days. """ from nytimesarticle impor...
mit
-7,454,735,974,498,665,000
34.098901
91
0.575454
false
lshain-android-source/external-chromium_org
third_party/jinja2/environment.py
111
44067
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import * from ...
bsd-3-clause
-8,990,053,606,960,601,000
38.310437
82
0.606259
false
andir/ganeti
test/py/ganeti.server.rapi_unittest.py
2
10157
#!/usr/bin/python # # Copyright (C) 2012 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of...
bsd-2-clause
-7,824,055,145,861,413,000
35.934545
80
0.645762
false
alxgu/ansible
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py
26
21404
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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': ['previe...
gpl-3.0
6,994,588,173,219,830,000
35.776632
119
0.59601
false
elishowk/django-poser
poser/appresolver.py
1
7288
# -*- coding: utf-8 -*- from poser.apphook_pool import apphook_pool from poser.utils.page_resolver import get_page_queryset from django.conf import settings from django.conf.urls.defaults import patterns from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.co...
agpl-3.0
-6,192,365,130,101,168,000
36.183673
105
0.607574
false
pbombnz/IRCBot
modules/quiz.py
1
11722
import os import json import time import re import random from modules import userDatabase class CaseInsensitiveDict(dict): def __contains__(self, key): return dict.__contains__(self, key.lower()) def __getitem__(self, key): return dict.__getitem__(self, key.lower()) def __setitem__(self...
gpl-2.0
-38,882,637,056,354,830
48.880851
349
0.496417
false
EvanK/ansible-modules-core
cloud/amazon/iam_cert.py
17
11879
#!/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,926,325,328,771,457,000
38.465116
172
0.567893
false
josenavas/labman
labman/db/process.py
1
115578
# ---------------------------------------------------------------------------- # Copyright (c) 2017-, labman development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # -----------------------------------------------------...
bsd-3-clause
-5,933,651,913,241,763,000
36.48881
79
0.538814
false
akhmadMizkat/odoo
addons/mail/models/res_partner.py
1
12524
# -*- coding: utf-8 -*- import logging import threading from openerp import _, api, fields, models, tools from openerp.osv import expression _logger = logging.getLogger(__name__) class Partner(models.Model): """ Update partner to add a field about notification preferences. Add a generic opt-out field that can b...
gpl-3.0
-7,622,205,926,994,756,000
48.501976
173
0.621048
false
dingliumath/quant-econ
quantecon/tests/test_graph_tools.py
4
7552
""" Filename: test_graph_tools.py Author: Daisuke Oyama Tests for graph_tools.py """ import sys import numpy as np from numpy.testing import assert_array_equal import nose from nose.tools import eq_, ok_, raises from quantecon.graph_tools import DiGraph def list_of_array_equal(s, t): """ Compare two lists ...
bsd-3-clause
6,756,743,770,318,353,000
33.801843
74
0.534163
false
pshen/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py
7
25136
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
gpl-3.0
-4,068,128,257,000,698,400
35.641399
149
0.605665
false
KhalidGit/flask
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/_vendor/distlib/wheel.py
185
38259
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2014 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import base64 import codecs import datetime import distutils.util from email import message_from...
apache-2.0
4,236,483,295,502,110,700
38.936326
82
0.485454
false
2ndQuadrant/ansible
test/units/playbook/test_task.py
43
3567
# (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
-8,951,836,807,881,490,000
30.289474
102
0.675638
false
soylentdeen/cuddly-weasel
gfVerification/plotSolar.py
1
1472
import matplotlib.pyplot as pyplot import Moog960 import MoogTools import numpy import glob correctionFiles = glob.glob('/home/deen/MoogPyData/AbsorptionLines/corrections/*Solar_results.dat') solarSpectrum = Moog960.ObservedMelody.fromFile(filename='SolarSpectrum.fits') solarSpectrum.loadData() arcturusSpectrum = Mo...
mit
-7,273,381,992,675,456,000
24.37931
99
0.695652
false
pbryzek/Freedom
objects/obj_home.py
1
3607
from common.globals import handle_err_msg from common.globals import format_citystatezip import consts.switches as switches class HomeObj(object): def __init__(self, type, address, city, state, zip, dom, listing_id, beds, baths, yearbuilt, sqfootage, lotsize, latitude, longitude, homelink, graphlink, maplink, comp...
mit
-8,255,637,214,159,607,000
39.988636
256
0.586083
false
ashishnitinpatil/django_appengine_project_template
django/contrib/admin/helpers.py
102
14143
from __future__ import unicode_literals from django import forms from django.contrib.admin.util import (flatten_fieldsets, lookup_field, display_for_field, label_for_field, help_text_for_field) from django.contrib.admin.templatetags.admin_static import static from django.contrib.contenttypes.models import ContentT...
bsd-2-clause
3,500,355,948,152,379,000
38.727528
132
0.604257
false
puittenbroek/slimmermeten
fabfile.py
1
5525
""" Starter fabfile for deploying the bigfattemplate project. Change all the things marked CHANGEME. Other things can be left at their defaults if you are happy with the default layout. """ import posixpath from fabric.api import run, local, env, settings, cd, task from fabric.contrib.files import exists from fabric...
bsd-3-clause
1,198,828,012,563,935,000
25.309524
97
0.623529
false
karthikvadla16/spark-tk
regression-tests/sparktkregtests/testcases/frames/entropy_test.py
14
2228
# 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
8,624,092,680,882,637,000
33.677419
75
0.615349
false
yangzilong1986/python
Matafight/0012/ResenWord.py
38
1202
# -*-coding:utf-8-*- import string class senseWord(): def __init__(self): self.list=[] self.word=[] inputfile=file('filtered_word.txt','r') for lines in inputfile.readlines(): self.list.append(lines.decode('utf-8').encode('gbk'))#I've set the file coding type as utf-8 ...
mit
-13,598,974,959,442,180
25.711111
104
0.490849
false
cycotech/WAR-app
env/lib/python3.5/site-packages/django/utils/timesince.py
64
2857
from __future__ import unicode_literals import calendar import datetime from django.utils.html import avoid_wrapping from django.utils.timezone import is_aware, utc from django.utils.translation import ugettext, ungettext_lazy TIMESINCE_CHUNKS = ( (60 * 60 * 24 * 365, ungettext_lazy('%d year', '%d years')), ...
mit
-2,407,093,981,083,487,000
34.7125
101
0.632832
false
tarzan0820/odoo
addons/account_cancel/__openerp__.py
261
1621
# -*- 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,226,602,984,074,769,000
37.595238
81
0.602097
false
alexschiller/osf.io
api/users/permissions.py
14
1403
from website.models import User from rest_framework import permissions class ReadOnlyOrCurrentUser(permissions.BasePermission): """ Check to see if the request is coming from the currently logged in user, and allow non-safe actions if so. """ def has_object_permission(self, request, view, obj): ...
apache-2.0
6,499,537,318,777,184,000
37.972222
100
0.672844
false
fluxw42/youtube-dl
test/test_download.py
2
10158
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import ( assertGreaterEqual, expect_warnings, get_params, gettestcases, expe...
unlicense
8,927,408,666,431,570,000
37.332075
223
0.54243
false
mtagle/airflow
airflow/providers/google/cloud/example_dags/example_automl_nl_text_extraction.py
5
3458
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
4,934,450,327,058,384,000
32.901961
88
0.711394
false
bitemyapp/flightcrew
src/googlemock/gtest/test/gtest_output_test.py
5
11611
#!/usr/bin/env python # # Copyright 2008, 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...
gpl-3.0
1,466,031,082,466,628,600
34.507645
79
0.672983
false
cloudify-cosmo/softlayer-python
SoftLayer/CLI/loadbal/service_edit.py
1
1738
"""Edit the properties of a service group.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import loadbal import click @click.command() @click.argument('identifier') @click.option('--enabled / --disabled', default=None, ...
mit
80,560,802,583,221,230
34.469388
78
0.631761
false
sda2b/youtube-dl
youtube_dl/extractor/quickvid.py
113
1719
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( determine_ext, int_or_none, ) class QuickVidIE(InfoExtractor): _VALID_URL = r'https?://(www\.)?quickvid\.org/watch\.php\?v=(?P<id>[a-zA-Z_0-9-]+)' _...
unlicense
-2,567,380,555,191,153,000
30.833333
87
0.518906
false
spark0001/spark2.1.1
examples/src/main/python/ml/stopwords_remover_example.py
123
1434
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
4,196,657,525,310,785,000
33.97561
74
0.698745
false
liu1xin/aria2app
aria2cmd/serverwrapper.py
1
2728
#!/usr/bin/env python # -*- coding: utf8 -*- import aria2app.a2jsonrpc as a2jsonrpc import aria2app.a2config as a2config ######################## Convenience Methods for Server############################# class Aria2ServerWrapper(object): def __init__(self, cfgfile, token=None): self.tok...
bsd-2-clause
-734,655,971,014,821,100
31.703704
84
0.555352
false
Tesora-Release/tesora-horizon
openstack_dashboard/dashboards/project/volumes/test.py
27
3473
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
8,476,527,710,628,363,000
42.962025
78
0.650158
false
markfinal/BuildAMation
tests/builderactions.py
1
12496
#!/usr/bin/python import copy import multiprocessing import os import subprocess import sys import tempfile import time import traceback class Builder(object): """Class that represents the actions for a builder""" def __init__(self, repeat_no_clean): self.repeat_no_clean = repeat_no_clean self...
bsd-3-clause
4,035,826,025,119,124,500
38.419558
176
0.573944
false
yewang15215/django
tests/gis_tests/layermap/tests.py
7
14506
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import unittest from copy import copy from decimal import Decimal from django.conf import settings from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import HAS_GEOS from django.db import connection from django.test impor...
bsd-3-clause
5,628,985,942,271,541,000
41.043478
105
0.629714
false
rdhyee/PyTables
tables/parameters.py
3
14633
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: February 25, 2005 # Author: Ivan Vilata - reverse:net.selidor@ivan # # $Id$ # ######################################################################## """Parameters for PyTables.""" __docform...
bsd-3-clause
3,934,861,005,748,138,000
31.713647
77
0.708268
false
Belxjander/Kirito
Python-3.5.0-Amiga/Lib/typing.py
3
53427
# TODO nits: # Get rid of asserts that are the caller's fault. # Docstrings (e.g. ABCs). import abc from abc import abstractmethod, abstractproperty import collections import functools import re as stdlib_re # Avoid confusion with the re we export. import sys import types try: import collections.abc as collection...
gpl-3.0
9,112,110,440,152,925,000
31.419296
79
0.565089
false
chafique-delli/OpenUpgrade
openerp/addons/test_impex/tests/test_export.py
71
19319
# -*- coding: utf-8 -*- import itertools import openerp.modules.registry import openerp from openerp.tests import common class CreatorCase(common.TransactionCase): model_name = False def __init__(self, *args, **kwargs): super(CreatorCase, self).__init__(*args, **kwargs) self.model = None ...
agpl-3.0
5,959,980,013,872,931,000
31.742373
87
0.491614
false
mrares/incubator-airflow
airflow/www/views.py
1
97991
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-3,028,809,324,157,581,300
34.084497
163
0.542805
false
BludhavenGrayson/repository.BludhavenGrayson
plugin.video.rohwrestling/default.py
1
6158
''' ROH Wrestling Add-on Copyright (C) 2017 BludhavenGrayson Copyright (C) 2016 rw86 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 la...
gpl-2.0
-4,051,893,939,305,754,600
30.906736
141
0.669373
false
mogoweb/chromium-crosswalk
chrome/test/chromedriver/test/unittest_util.py
134
4320
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utilities for dealing with the python unittest module.""" import fnmatch import sys import unittest class _TextTestResult(unittest._TextTestResult): ...
bsd-3-clause
-3,337,475,472,155,664,000
32.230769
80
0.672685
false
Eric89GXL/mne-python
tutorials/sample-datasets/plot_phantom_4DBTi.py
17
2910
# -*- coding: utf-8 -*- """ .. _tut_phantom_4Dbti: ============================================ 4D Neuroimaging/BTi phantom dataset tutorial ============================================ Here we read 4DBTi epochs data obtained with a spherical phantom using four different dipole locations. For each condition we comput...
bsd-3-clause
817,644,855,122,474,200
35.375
79
0.548797
false
coderb0t/CouchPotatoServer
libs/suds/client.py
150
25971
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
2,133,895,602,667,136,000
32.084076
84
0.567479
false
iemejia/incubator-beam
sdks/python/apache_beam/runners/worker/log_handler.py
2
7153
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
3,519,775,546,561,292,000
36.450262
80
0.688103
false
jcftang/ansible
lib/ansible/modules/cloud/vmware/vmware_vm_shell.py
37
6595
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, 2016 Ritesh Khadgaray <khadgaray () 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...
gpl-3.0
384,888,336,538,792,000
33.710526
136
0.609098
false
lukeiwanski/tensorflow-opencl
tensorflow/python/ops/losses/losses_impl.py
32
27543
# 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
8,471,071,283,230,081,000
43.210273
80
0.686091
false
ofekd/servo
tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
7
12111
import imp import os from six.moves.urllib.parse import urljoin from fnmatch import fnmatch try: from xml.etree import cElementTree as ElementTree except ImportError: from xml.etree import ElementTree here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here,...
mpl-2.0
3,970,844,834,167,457,300
32.92437
109
0.587482
false
simudream/django-rest-framework
tests/test_middleware.py
79
1134
from django.conf.urls import url from django.contrib.auth.models import User from rest_framework.authentication import TokenAuthentication from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase from rest_framework.views import APIView urlpatterns = [ url(r'^$', APIView.as_v...
bsd-2-clause
-4,972,840,849,270,209,000
30.5
79
0.696649
false
h2oai/h2o-2
py/testdir_hosts/test_GBM_mnist_restart_many.py
9
2499
import unittest import random, sys, time, re sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_glm, h2o_util, h2o_rf, h2o_jobs as h2j DO_DELETE_KEYS_AND_CAUSE_PROBLEM = False class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_er...
apache-2.0
-1,944,267,017,310,801,000
37.446154
124
0.540616
false
xyder/kivy-tasks-client
config.py
1
1043
from views.tasks_list_view import convert_time use_kv_file = False form_input_formats = [ { 'label': 'Title', 'key': 'title', 'formatter': None }, { 'label': 'Description', 'key': 'body', 'formatter': None, ...
mit
-1,044,341,272,146,560,000
22.833333
46
0.395973
false
iutrs/networkmap
explorer/network_objects.py
1
4355
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Auteur : Marc-Antoine Fortier Date : Mars 2015 """ import json HP_DEVICES = ("HP", "Hewlett-Packard", "ProCurve") JUNIPER_DEVICES = ("Juniper", "JUNOS") LINUX_DEVICES = ("Linux", "Debian", "Ubuntu") SUPPORTED_DEVICES = HP_DEVICES + JUNIPER_DEVICES + LINUX_DEVICES ...
gpl-3.0
3,856,414,417,218,168,000
25.077844
77
0.544661
false
TEAM-Gummy/platform_external_chromium_org
chrome/common/extensions/docs/server2/features_bundle.py
23
4255
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from compiled_file_system import Unicode from extensions_paths import ( API_FEATURES, JSON_TEMPLATES, MANIFEST_FEATURES, PERMISSION_FEATURES) import feat...
bsd-3-clause
4,624,158,483,061,556,000
37.681818
80
0.683196
false
ConnorGBrewster/servo
tests/wpt/web-platform-tests/referrer-policy/generic/tools/generate.py
15
7360
#!/usr/bin/env python from __future__ import print_function import os, sys, json from common_paths import * import spec_validator import argparse def expand_test_expansion_pattern(spec_test_expansion, test_expansion_schema): expansion = {} for artifact in spec_test_expansion: artifact_value = spec_t...
mpl-2.0
-1,497,128,428,926,079,200
41.298851
80
0.596467
false
showerst/openstates
openstates/hi/__init__.py
1
3432
from billy.utils.fulltext import pdfdata_to_text, text_after_line_numbers from .bills import HIBillScraper from .legislators import HILegislatorScraper from .events import HIEventScraper settings = dict(SCRAPELIB_TIMEOUT=300) metadata = dict( name='Hawaii', abbreviation='hi', capitol_timezone='Pacific/Hon...
gpl-3.0
-203,941,984,916,031,330
31.074766
78
0.516026
false
dinhkhanh/trac
trac/ticket/tests/wikisyntax.py
3
14175
# -*- coding: utf-8 -*- import unittest from trac.ticket.model import Ticket from trac.ticket.roadmap import Milestone from trac.wiki.tests import formatter TICKET_TEST_CASES = u""" ============================== ticket: link resolver ticket:1 ticket:12 ticket:abc ------------------------------ <p> <a class="new tic...
bsd-3-clause
-4,187,686,121,589,471,000
33.918317
275
0.547955
false
iftekeriba/softlayer-python
SoftLayer/CLI/template.py
5
2069
""" SoftLayer.CLI.template ~~~~~~~~~~~~~~~~~~~~~~ Provides functions for loading/parsing and writing template files. Template files are used for storing CLI arguments in the form of a file to be used later with the --template option. :license: MIT, see LICENSE for more details. """ import os.pa...
mit
8,517,302,804,808,450,000
30.348485
79
0.57564
false
da1z/intellij-community
python/helpers/pydev/_pydevd_bundle/pydevd_referrers.py
1
8753
import sys from _pydevd_bundle import pydevd_xml from os.path import basename import traceback try: from urllib import quote, quote_plus, unquote, unquote_plus except: from urllib.parse import quote, quote_plus, unquote, unquote_plus #@Reimport @UnresolvedImport #==============================================...
apache-2.0
4,170,149,844,746,825,000
35.623431
109
0.431966
false
ares/robottelo
tests/foreman/ui/test_setting.py
2
45901
# -*- encoding: utf-8 -*- """Test class for Setting Parameter values :Requirement: Setting :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: UI :TestType: Functional :CaseImportance: High :Upstream: No """ from fauxfactory import gen_email, gen_string, gen_url from random import choice, randint ...
gpl-3.0
-9,038,911,056,299,569,000
36.378664
79
0.563844
false
jacknjzhou/neutron
neutron/tests/unit/agent/linux/test_ovsdb_monitor.py
14
3944
# Copyright 2013 Red Hat, 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 agre...
apache-2.0
1,081,981,828,435,773,700
40.515789
79
0.644777
false
MontpellierRessourcesImagerie/openmicroscopy
components/tools/OmeroWeb/omeroweb/wsgi.py
12
1739
#!/usr/bin/env python # -*- coding: utf-8 -*- """ WSGI config for the OMERO.web project. Copyright 2014 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ """ This module contains the WSGI application used by Django's development server and any productio...
gpl-2.0
7,366,799,187,583,772,000
37.644444
79
0.775158
false
bigswitch/nova
nova/api/openstack/compute/schemas/floating_ips_bulk.py
93
1537
# Copyright 2014 IBM Corporation. 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 ...
apache-2.0
4,206,266,869,214,953,500
28.557692
78
0.55758
false
HybridF5/jacket
jacket/tests/compute/unit/virt/test_hardware.py
1
117764
# Copyright 2014 Red Hat, 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, ...
apache-2.0
1,708,356,849,637,165,000
43.999618
79
0.480945
false
bigfatpaulyj/py-airfoil
scons-local-2.2.0/SCons/Tool/mssdk.py
14
1891
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # 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 ...
gpl-3.0
512,825,390,122,961,860
36.82
107
0.751983
false
keflavich/APEX_CMZ_H2CO
reduction/calibration.py
1
7537
import numpy as np from astropy import log from pyspeckit.spectrum.readers import read_class from make_apex_cubes import all_apexfiles import os import paths import collections """ Calibrators can be IDd with: for ds in all_apexfiles: cl = read_class.ClassObject(ds) spdata = cl.get_spectra(line='CO(2-1)', ra...
bsd-3-clause
-6,341,933,152,122,965,000
48.585526
224
0.452833
false
Razorsheep/kleinesonne
node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
1835
12124
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
agpl-3.0
600,392,360,292,249,100
34.658824
80
0.619185
false
ewbankkit/cloud-custodian
c7n/actions/securityhub.py
3
12857
# Copyright 2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-6,466,889,442,097,719,000
35.734286
110
0.552151
false