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 |
|---|---|---|---|---|---|---|---|---|---|---|
inveniosoftware/invenio-theme | invenio_theme/ext.py | 1 | 3372 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Invenio standard theme."""
from __future__ import absolute_import, print_function... | mit | -578,604,932,151,019,800 | 32.058824 | 78 | 0.627521 | false |
gaetjen/Blendorf | code/proto/Block_pb2.py | 1 | 3773 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Block.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
import sys
if sys.version_info >= (3,):
#some constants that are python2 only
... | mit | -7,128,083,945,373,861,000 | 30.441667 | 326 | 0.684071 | false |
napkindrawing/ansible | lib/ansible/modules/files/patch.py | 31 | 6638 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Luis Alberto Perez Lazaro <luisperlazaro@gmail.com>
# (c) 2015, Jakub Jirutka <jakub@jirutka.cz>
#
# 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... | gpl-3.0 | -5,559,353,191,776,429,000 | 32.695431 | 117 | 0.626243 | false |
alejob/mdanalysis | package/MDAnalysis/__init__.py | 1 | 6697 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under th... | gpl-2.0 | 1,956,727,311,427,512,800 | 30.589623 | 81 | 0.717485 | false |
mistercrunch/airflow | airflow/operators/check_operator.py | 7 | 2892 | #
# 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 | -8,701,846,942,614,378,000 | 29.125 | 102 | 0.66148 | false |
defaultnamehere/grr | gui/plugins/container_viewer.py | 13 | 10526 | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
#
# Copyright 2011 Google Inc. All Rights Reserved.
"""This plugin renders AFF4 objects contained within a container."""
import locale
import urllib
import logging
from grr.gui import renderers
from grr.gui.plugins import fileview
from grr.gui.plugins im... | apache-2.0 | -1,988,817,380,860,933,000 | 31.387692 | 80 | 0.687631 | false |
anirudhSK/chromium | tools/telemetry/telemetry/core/platform/mac_platform_backend.py | 2 | 5253 | # Copyright (c) 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.
import ctypes
import os
import time
try:
import resource # pylint: disable=F0401
except ImportError:
resource = None # Not available on all platfor... | bsd-3-clause | -3,023,262,378,738,300,000 | 33.788079 | 78 | 0.649724 | false |
la0rg/Genum | GenumCore/vendor/requests/packages/chardet/langthaimodel.py | 1 | 15961 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | mit | -711,373,719,207,209,000 | 78.805 | 99 | 0.382119 | false |
mdavid/cherokee-webserver-svnclone | admin/wizards/django.py | 2 | 10328 | # -*- coding: utf-8 -*-
#
# Cherokee-admin's Django wizard
#
# Authors:
# Taher Shihadeh <taher@octality.com>
# Alvaro Lopez Ortega <alvaro@alobbs.com>
#
# Copyright (C) 2010 Alvaro Lopez Ortega
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the G... | gpl-2.0 | -5,993,363,958,163,832,000 | 33.541806 | 186 | 0.610476 | false |
rimbalinux/LMD3 | docutils/writers/docutils_xml.py | 2 | 2800 | # $Id: docutils_xml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Simple internal document tree Writer, writes Docutils XML.
"""
__docformat__ = 'reStructuredText'
import docutils
from docutils impor... | bsd-3-clause | -8,488,675,864,830,142,000 | 36.356164 | 79 | 0.589286 | false |
migasfree/migasfree | migasfree/server/views/domain.py | 1 | 1158 | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from ..models import Domain, UserProfile
@log... | gpl-3.0 | 5,910,889,564,819,243,000 | 33.058824 | 76 | 0.673575 | false |
windyuuy/opera | chromium/src/ppapi/native_client/tools/browser_tester/browser_tester.py | 3 | 15921 | #!/usr/bin/python
# 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.
import glob
import optparse
import os.path
import socket
import sys
import thread
import time
import urllib
# Allow the import of thir... | bsd-3-clause | -2,603,890,054,870,597,000 | 41.683646 | 80 | 0.614095 | false |
windyuuy/opera | chromium/src/tools/swarm_client/tests/swarm_get_results_smoke_test.py | 2 | 1044 | #!/usr/bin/env python
# Copyright (c) 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.
import logging
import os
import subprocess
import sys
import unittest
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
clas... | bsd-3-clause | -839,683,949,399,303,300 | 25.769231 | 75 | 0.661877 | false |
axbaretto/beam | sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/test/functional/class_members_py30.py | 5 | 1629 | """ Various tests for class members access. """
# pylint: disable=R0903,import-error,no-init,missing-docstring, wrong-import-position,wrong-import-order
from missing import Missing
class MyClass(object):
"""class docstring"""
def __init__(self):
"""init"""
self.correct = 1
def test(self):
... | apache-2.0 | 5,880,805,701,747,577,000 | 24.857143 | 104 | 0.631062 | false |
pombredanne/discern | ml_grading/ml_model_creation.py | 1 | 10108 | """
Scripts to generate a machine learning model from input data
"""
from django.conf import settings
from django.core.management.base import NoArgsCommand
from django.utils import timezone
from django.db import transaction
import urlparse
import time
import json
import logging
import sys
import pickle
from ml_grading... | agpl-3.0 | -3,245,844,143,461,049,000 | 44.742081 | 152 | 0.599723 | false |
bohlian/frappe | frappe/utils/setup_docs.py | 8 | 10287 | """Automatically setup docs for a project
Call from command line:
bench setup-docs app path
"""
from __future__ import unicode_literals, print_function
import os, json, frappe, shutil
from frappe.utils import markdown
class setup_docs(object):
def __init__(self, app, target_app):
"""Generate source templates f... | mit | 3,292,683,442,139,439,000 | 32.508143 | 102 | 0.658598 | false |
christianurich/VIBe2UrbanSim | 3rdparty/opus/src/urbansim_parcel/building/tests/population.py | 2 | 1091 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
from opus_core.tests import opus_unittest
from numpy import array, arange
from opus_core.tests.utils.variable_tester import VariableTester
class Tests(opus_unittest.OpusTestCase):
def t... | gpl-2.0 | -6,975,361,520,329,054,000 | 33.258065 | 81 | 0.484876 | false |
subutai/nupic | src/nupic/swarming/dummy_model_runner.py | 10 | 25423 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | -8,940,740,549,955,239,000 | 40.745484 | 89 | 0.518074 | false |
kingvuplus/PKT-gui2 | lib/python/Components/SystemInfo.py | 2 | 3272 | from enigma import eDVBResourceManager, Misc_Options
from Tools.Directories import fileExists, fileCheck
from Tools.HardwareInfo import HardwareInfo
from boxbranding import getMachineBuild, getBoxType
SystemInfo = { }
#FIXMEE...
def getNumVideoDecoders():
idx = 0
while fileExists("/dev/dvb/adapter0/video%d"% idx, ... | gpl-2.0 | -4,827,641,275,631,091,000 | 55.413793 | 173 | 0.754584 | false |
jimsimon/sky_engine | build/android/PRESUBMIT.py | 33 | 2184 | # Copyright (c) 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.
"""Presubmit script for android buildbot.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on the presubmit API b... | bsd-3-clause | -6,715,853,584,673,475,000 | 33.125 | 79 | 0.635531 | false |
broferek/ansible | lib/ansible/module_utils/k8s/common.py | 15 | 9347 | # Copyright 2018 Red Hat | Ansible
#
# 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 | -2,073,510,134,861,936,000 | 31.681818 | 145 | 0.59388 | false |
maruohon/Minecraft-Overviewer | contrib/validateRegionFile.py | 9 | 4732 | #!/usr/bin/env python
'''
Validate a region file
TODO description here'''
import os
import sys
# incantation to be able to import overviewer_core
if not hasattr(sys, "frozen"):
sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..')))
from overviewer_core import nbt
def check_region(... | gpl-3.0 | 455,474,146,862,234,560 | 40.508772 | 145 | 0.534446 | false |
brightchen/h2o-3 | h2o-py/tests/testdir_misc/pyunit_levels_nlevels_setlevel_setLevels.py | 4 | 4200 | import sys
sys.path.insert(1, "../../")
import h2o, tests
def levels_nlevels_setlevel_setLevels_test():
iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris.csv"))
# frame (default)
levels = iris.levels()
nlevels = iris.nlevels()
# frame (w/ index)
levels = iris.levels(col=4)
nle... | apache-2.0 | 5,062,021,508,417,512,000 | 42.298969 | 121 | 0.603333 | false |
jml/flocker | flocker/provision/_sphinx.py | 15 | 4359 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Sphinx extension to add a ``task`` directive
This directive allows sharing code between documentation and provisioning code.
.. code-block:: rest
.. task:: name_of_task
``name_of_task`` must the name of a task in ``flocker.provision._tasks``,
with... | apache-2.0 | 2,859,558,690,374,506,500 | 29.914894 | 79 | 0.605643 | false |
alexissmirnov/donomo | donomo_archive/lib/reportlab/test/test_pdfbase_fontembed.py | 2 | 3151 | import os
from reportlab.test import unittest
from reportlab.test.utils import makeSuiteForClasses, outputfile, printLocation
from reportlab.pdfgen.canvas import Canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.test.test_pdfbase_pdfmetrics import makeWidthTestForAllGlyphs
class EmbeddingTestCase(unitt... | bsd-3-clause | -1,317,289,938,052,693,800 | 34.011111 | 97 | 0.636941 | false |
StackStorm/st2 | st2common/st2common/util/gunicorn_workers.py | 3 | 1769 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | apache-2.0 | -8,903,827,690,578,233,000 | 35.102041 | 89 | 0.714528 | false |
yanchen036/tensorflow | tensorflow/contrib/signal/python/kernel_tests/mel_ops_test.py | 10 | 8480 | # 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 | -3,503,674,544,803,795,500 | 43.397906 | 85 | 0.674764 | false |
arcticshores/kivy | kivy/tests/test_utils.py | 9 | 8578 | '''
utils tests
===========
'''
import os
import unittest
try:
from unittest.mock import patch # python 3.x
except:
from mock import patch # python 2.x
from kivy.utils import (boundary, escape_markup, format_bytes_to_human,
is_color_transparent, SafeList, get_random_color, get_hex_from_color,
... | mit | 1,788,732,234,763,568,600 | 34.012245 | 77 | 0.54838 | false |
adaitche/luigi | luigi/contrib/hdfs/hadoopcli_clients.py | 13 | 9639 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 6,884,866,863,280,618,000 | 34.966418 | 144 | 0.574126 | false |
mlperf/training_results_v0.5 | v0.5.0/google/cloud_v2.8/gnmt-tpuv2-8/code/gnmt/model/staging/models/rough/mask_rcnn/object_detection/region_similarity_calculator.py | 22 | 4527 | # 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 | 2,156,094,656,638,969,900 | 32.533333 | 80 | 0.692291 | false |
EvenStrangest/tensorflow | tensorflow/contrib/rnn/python/kernel_tests/rnn_cell_test.py | 2 | 4125 | # 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 | -1,886,183,971,044,162,300 | 42.421053 | 80 | 0.570424 | false |
2013Commons/HUE-SHARK | desktop/core/ext-py/Spawning-0.9.6/build/lib.linux-i686-2.7/spawning/reloader_dev.py | 5 | 3919 | # Copyright (c) 2008, Donovan Preston
#
# 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
# to use, copy, modify, merge, publish, ... | apache-2.0 | -660,676,512,429,374,800 | 31.932773 | 86 | 0.618015 | false |
pichillilorenzo/JavaScript-Completions | make/_init.py | 2 | 4165 | import sublime, sublime_plugin
import os, sys, imp, platform, json, traceback, threading, urllib, shutil, re
from shutil import copyfile
from threading import Timer
PACKAGE_PATH = os.path.abspath(os.path.dirname(__file__))
PACKAGE_NAME = os.path.basename(PACKAGE_PATH)
SUBLIME_PACKAGES_PATH = os.path.dirname(PACKAGE_PA... | mit | -1,765,458,531,153,625,600 | 36.1875 | 90 | 0.693157 | false |
emetsger/osf.io | website/util/__init__.py | 2 | 8024 | # -*- coding: utf-8 -*-
import collections
import re
import urllib
import logging
import urlparse
from contextlib import contextmanager
import furl
from flask import request, url_for
from website import settings as website_settings
from api.base import settings as api_settings
from modularodm import Q
from modularo... | apache-2.0 | 4,639,323,866,970,273,000 | 33.735931 | 116 | 0.64843 | false |
mujin/jhbuild | jhbuild/errors.py | 9 | 1994 | # jhbuild - a tool to ease building collections of source packages
# Copyright (C) 2001-2006 James Henstridge
#
# errors.py: definitions of exceptions used by jhbuild modules
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | gpl-2.0 | -4,325,190,310,070,584,000 | 31.16129 | 75 | 0.728686 | false |
ReptarX/pyfpdf | attic/utils/PDFRUUtils.py | 26 | 2947 | # Utilities to Re-Use PDF files generated by FPDF for Python
# (Probably, more memory-wasting than it should)
import re, zlib
def UpdateStreamLengths(pdf):
"Updates the streams /Length in a modified, uncompressed PDF file"
L, Lengths=[],{}
for m in re.finditer('<</Length (\d+)(>>)\nstream\n(.+?)\nendstream',pdf,re.... | lgpl-3.0 | 7,877,222,338,657,175,000 | 30.351064 | 115 | 0.682389 | false |
hachreak/invenio-oauthclient | examples/orcid_app.py | 1 | 5114 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015, 2016, 2017 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 optio... | gpl-2.0 | 4,889,729,442,630,373,000 | 29.807229 | 79 | 0.736996 | false |
gzqichang/wa | qrest/qrest/permissions.py | 1 | 1662 | from rest_framework import permissions as rest_permissions
from qutils.objutils import resolve_obj_attribue
def make_owner_permission(owner_field, allow_readonly=True):
"""
allow_readonly
是否允许 只读
owner_field
判断 object.owner_field 是否是 已登录用户, 使用场景
话题(Topic)可以有多个评论(Discussion),话题... | mit | 4,928,703,315,115,664,000 | 29.608696 | 82 | 0.621449 | false |
andrewleech/script.module.pycurl | lib/pycurl/pycurl-7.19.5.1/tests/internals_test.py | 1 | 6751 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et
import pycurl
import unittest
try:
import cPickle
except ImportError:
cPickle = None
import pickle
import copy
from . import util
class InternalsTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl()
def tearDown(se... | lgpl-2.1 | 5,478,935,895,904,908,000 | 29.004444 | 96 | 0.49726 | false |
eLong-INF/idgen | tools/check.py | 1 | 2712 | import socket
import select
import sys
timeout = 5000
def error(str):
print '\033[1;31m%s\033[m' %(str)
def info(str):
print '\033[1;36m%s\033[m' %(str)
def send(sock, s):
sock.sendall(s)
p = select.poll()
p.register(sock, select.POLLIN)
if not p.poll(timeout):
error('send request to... | mit | -3,486,819,038,931,491,300 | 26.12 | 68 | 0.532817 | false |
Intel-Corporation/tensorflow | tensorflow/contrib/tpu/python/tpu/tpu_sharding.py | 8 | 1029 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -3,293,337,613,294,478,300 | 43.73913 | 80 | 0.717201 | false |
asadziach/tensorflow | tensorflow/tools/pip_package/pip_smoke_test.py | 9 | 4332 | # 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 | -7,120,889,178,217,108,000 | 35.403361 | 80 | 0.687211 | false |
bittner/django-domain-squeezer | domain_squeezer/templatetags/domain_squeezer.py | 1 | 1250 | from django.contrib.sites.shortcuts import get_current_site
from django.core.urlresolvers import reverse_lazy
from django.template import Library
from ..settings import SITEMAP
register = Library()
@register.inclusion_tag('domain_squeezer/tags/sitemap.html')
def site_sitemap():
"""Return a list of randomized in... | mit | 2,644,679,723,024,995,000 | 28.761905 | 78 | 0.7064 | false |
nikolas-hermanns/flash-test | doc/source/conf.py | 1 | 2458 | # -*- 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 | 1,825,575,360,427,390,700 | 31.773333 | 79 | 0.689585 | false |
dimtruck/fantasy | backend/token/redis_token.py | 1 | 3088 | import time
import redis
import fantasy_exceptions.fantasy_exceptions as _exception
import inspect
import uuid
import yaml
import os
import entities.entities as _entities
'''
redis provider will allow user to:
get users
get tokens from users
add users
add tokens to users
remove users
remove to... | mit | -9,019,091,173,901,575,000 | 28.980583 | 135 | 0.602979 | false |
myusuf3/courtside | courtside/register/views.py | 2 | 13898 | import hashlib
import json
import urllib
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponseRedirect
from django.short... | mit | 2,450,317,944,984,078,000 | 34.363868 | 214 | 0.609224 | false |
sestrella/ansible | lib/ansible/modules/network/cloudengine/ce_vxlan_global.py | 13 | 18732 | #!/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 distribut... | gpl-3.0 | -7,020,470,269,152,427,000 | 33.624769 | 102 | 0.579009 | false |
paulsmith/geodjango | tests/regressiontests/decorators/tests.py | 16 | 2356 | from unittest import TestCase
from sys import version_info
from django.http import HttpResponse
from django.utils.functional import allow_lazy, lazy, memoize
from django.views.decorators.http import require_http_methods, require_GET, require_POST
from django.views.decorators.vary import vary_on_headers, vary_on_cookie... | bsd-3-clause | -4,993,967,726,073,854,000 | 41.071429 | 96 | 0.749151 | false |
jarodwilson/atomic-reactor | atomic_reactor/util.py | 1 | 33392 | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, unicode_literals
import hashlib
import json
import jsonschema
import os
import re
from pipes import q... | bsd-3-clause | 4,022,747,853,513,998,000 | 33.178096 | 120 | 0.599994 | false |
bertucho/epic-movie-quotes-quiz | dialogos/build/Twisted/twisted/internet/process.py | 8 | 38736 | # -*- test-case-name: twisted.test.test_process -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
UNIX Process management.
Do NOT use this module directly - use reactor.spawnProcess() instead.
Maintainer: Itamar Shtull-Trauring
"""
from __future__ import division, absolute_import, prin... | mit | -2,618,738,320,387,080,700 | 33.709677 | 82 | 0.580158 | false |
LEDS/Lifebox | Codigo/Util/ThreadLog.py | 2 | 1532 | # !/usr/bin/python
# -*- coding: utf-8 -*-
"""
< Essa thread é responsável por gravar o log do software >
author: Cassiano Kunsch das Neves
last edited: <12/12/2015>
"""
from PyQt4 import QtCore
class ThreadLog(QtCore.QThread):
def __init__(self, diretorioArqDestino, lst_dados):
super(ThreadLog, self).... | gpl-3.0 | -3,751,442,415,844,133,400 | 33.568182 | 84 | 0.6167 | false |
marcore/edx-platform | lms/djangoapps/discussion_api/tests/test_forms.py | 11 | 7436 | """
Tests for Discussion API forms
"""
import itertools
from unittest import TestCase
from urllib import urlencode
import ddt
from django.http import QueryDict
from opaque_keys.edx.locator import CourseLocator
from openedx.core.djangoapps.util.test_forms import FormTestMixin
from discussion_api.forms import CommentL... | agpl-3.0 | 8,763,509,863,989,535,000 | 32.495495 | 115 | 0.580823 | false |
kms70847/Animation | src/Zooming_Fractals/test.py | 1 | 1090 | import output
import animation
import itertools
from koch import Koch
from gridFractal import GridFractal
from sierpinsky import Sierpinsky
def exists(filename):
try:
file = open(filename)
file.close()
return True
except:
return False
fractals = {
"koch": lambda: Koch(),
... | mit | 509,073,097,788,791,800 | 31.029412 | 101 | 0.63511 | false |
wakhub/monodict | fabfile.py | 1 | 11641 | """
Copyright (C) 2014 wak
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
distrib... | apache-2.0 | 8,359,090,461,101,069,000 | 33.13783 | 96 | 0.558629 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/packet_capture_parameters.py | 1 | 2687 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 1,794,777,171,915,556,600 | 43.04918 | 95 | 0.639003 | false |
kevintaw/django | django/template/defaulttags.py | 15 | 53639 | """Default tags used by the template system, available to all templates."""
from __future__ import unicode_literals
import os
import re
import sys
import warnings
from datetime import datetime
from itertools import cycle as itertools_cycle, groupby
from django.conf import settings
from django.utils import six, timezo... | bsd-3-clause | 1,518,544,875,300,233,700 | 32.991762 | 119 | 0.577528 | false |
SCPR/accountability-tracker | ballot_initiatives/management/commands/scraper_sos_import.py | 1 | 31064 | #!/usr/bin/python
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from ballot_initiatives.models import Initiative
from scraper_managers.csv2pylist import read_data
import logging
import datetime
import csv
import os
import re
import re... | gpl-2.0 | -4,615,156,610,511,991,000 | 37.022032 | 338 | 0.679854 | false |
girving/tensorflow | tensorflow/python/saved_model/constants.py | 9 | 2939 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,105,688,519,569,105,000 | 38.186667 | 80 | 0.732222 | false |
jamesr/sky_engine | tools/fuchsia/gen_repo.py | 14 | 1320 | #!/usr/bin/env python
#
# Copyright 2013 The Flutter 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 a Fuchsia repo capable of serving Fuchsia archives over the
network.
"""
import argparse
import collections
import json
im... | bsd-3-clause | 4,277,623,644,488,706,600 | 23.90566 | 79 | 0.675 | false |
koduj-z-klasa/python101 | docs/rg/rgkod10b.py | 3 | 2018 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import rg
class Robot:
def act(self, game):
# wszystkie pola
wszystkie = {(x, y) for x in xrange(19) for y in xrange(19)}
# punkty wejścia
wejscia = {poz for poz in wszystkie if 'spawn' in rg.loc_types(poz)}
# pola zablokowan... | mit | 7,788,187,623,656,751,000 | 35.236364 | 106 | 0.592072 | false |
amit0701/rally | rally/plugins/openstack/scenarios/fuel/nodes.py | 13 | 1432 | # 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 agreed to in... | apache-2.0 | -8,588,213,649,881,784,000 | 34.8 | 78 | 0.699022 | false |
kslundberg/pants | contrib/node/src/python/pants/contrib/node/targets/node_remote_module.py | 8 | 1300 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.base.payl... | apache-2.0 | -4,886,857,184,779,112,000 | 36.142857 | 99 | 0.68 | false |
amiguez/youtube-dl | youtube_dl/extractor/nbc.py | 64 | 10162 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_HTTPError,
)
from ..utils import (
ExtractorError,
find_xpath_attr,
lowercase_escape,
unescapeHTML,
)
class NBCIE(InfoExtractor):
_VALID_URL = r'https?://www\.nbc... | unlicense | -2,985,182,800,288,617,000 | 37.638783 | 190 | 0.529423 | false |
Mendeley/breakpad | src/testing/test/gmock_output_test.py | 12 | 7329 | #!/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... | bsd-3-clause | -8,427,670,384,429,979,000 | 30.865217 | 80 | 0.693956 | false |
archifix/settings | sublime/Packages/SublimeCodeIntel/libs/codeintel2/udl.py | 7 | 23676 | #!python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozilla.org/MPL/
#... | mit | 5,750,731,485,399,939,000 | 38.133884 | 130 | 0.59309 | false |
archifix/settings | sublime/Packages/SublimeCodeIntel/libs/codeintel2/manager.py | 8 | 23679 | #!/usr/bin/env python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozil... | mit | -5,748,281,799,251,240,000 | 39.339012 | 90 | 0.594535 | false |
tersmitten/ansible | lib/ansible/modules/network/fortios/fortios_firewall_shaping_profile.py | 24 | 9813 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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 Lic... | gpl-3.0 | -520,479,612,198,121,000 | 30.251592 | 110 | 0.557016 | false |
gisweb/plomino.printdocuments | src/plomino/printdocuments/testing.py | 1 | 1343 | # -*- coding: utf-8 -*-
from plone.app.robotframework.testing import REMOTE_LIBRARY_BUNDLE_FIXTURE
from plone.app.testing import applyProfile
from plone.app.testing import FunctionalTesting
from plone.app.testing import IntegrationTesting
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import PloneSa... | gpl-3.0 | -414,641,631,839,496,100 | 28.195652 | 74 | 0.785555 | false |
jecyrd/olcao | src/scripts/ab2pf.py | 2 | 16950 | #!/usr/bin/env python
################################################################
#
# ab2pf:
# convert abinit output data into potfit reference configurations
#
#################################################################
# This program was written by Paul Rulis and was based on the 2013 version of
# vasp... | gpl-2.0 | 3,831,948,402,184,061,400 | 40.955446 | 80 | 0.514336 | false |
ic-hep/DIRAC | tests/Integration/DataManagementSystem/FIXME_DataLoggingClientTests.py | 11 | 1794 | # FIXME: to bring back to life
# ########################################################################
# # File: DataLoggingClientTests.py
# # Author: Krzysztof.Ciba@NOSPAMgmail.com
# # Date: 2012/07/12 12:28:30
# ########################################################################
#
# """ :mod: DataLoggingClie... | gpl-3.0 | -5,528,584,331,742,733,000 | 28.409836 | 89 | 0.565775 | false |
mytliulei/DCNRobotInstallPackages | windows/win32/pygal-1.7.0/pygal/test/test_map.py | 4 | 2412 | # -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2014 Kozea
#
# This library 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... | apache-2.0 | 4,485,816,196,339,223,600 | 26.712644 | 79 | 0.656989 | false |
Edu-Glez/Bank_sentiment_analysis | env/lib/python3.6/site-packages/pandas/core/strings.py | 7 | 57832 | import numpy as np
from pandas.compat import zip
from pandas.types.generic import ABCSeries, ABCIndex
from pandas.types.missing import isnull, notnull
from pandas.types.common import (is_bool_dtype,
is_categorical_dtype,
is_object_dtype,
... | apache-2.0 | 2,730,388,258,960,137,700 | 29.926203 | 79 | 0.575028 | false |
kkoci/orthosie | register/views.py | 2 | 1118 | from django.shortcuts import render
from register.models import Transaction
from inventory.models import Grocery, Produce
def index(request):
current_transaction = Transaction.get_current()
line_items = current_transaction.lineitem_set.all()
context = {
'transaction': Transaction.get_current(),
... | gpl-3.0 | 2,058,899,947,864,408,600 | 35.064516 | 78 | 0.686047 | false |
OSSystems/lava-server | dashboard_app/migrations/0026_auto__add_pmqabundlestream.py | 1 | 22019 | # -*- 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 model 'PMQABundleStream'
db.create_table('dashboard_app_pmqabundlestream', (
('id', sel... | agpl-3.0 | -3,091,373,867,086,403,600 | 79.069091 | 200 | 0.556928 | false |
Taapat/enigma2-openpli-fulan | lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py | 1 | 16322 | from Plugins.Plugin import PluginDescriptor
from Components.ConfigList import ConfigListScreen
from Components.config import getConfigListEntry, config, ConfigNothing
from Components.ActionMap import ActionMap
from Components.Sources.StaticText import StaticText
from Screens.Screen import Screen
from Screens.MessageBox... | gpl-2.0 | -8,395,220,904,854,672,000 | 39.907268 | 192 | 0.733489 | false |
mapaction/osm2mapaction | osm2ma/ogrwrapper.py | 1 | 18700 |
from osgeo import ogr
from osgeo import gdal
import os
import logging
import json
logging.basicConfig(level=logging.INFO)
def _create_datacat_dir(output_dir, data_cat):
"""Create a per-datacategory subdirectory if required"""
if os.path.isdir(output_dir):
cat_dir_path = os.path.join(output_dir, data... | gpl-3.0 | 3,546,695,791,750,263,300 | 42.793911 | 95 | 0.667647 | false |
Avmb/lowrank-gru | RNN_memory.py | 1 | 11536 | import cPickle
import gzip
import theano
import pdb
from fftconv import cufft, cuifft
import numpy as np
import theano.tensor as T
from theano.ifelse import ifelse
from models import *
from optimizations import *
import argparse, timeit
import sys
from theano.printing import Print
def clip_gradients_norm(gradient... | bsd-3-clause | -3,713,367,610,090,195,500 | 37.972973 | 127 | 0.569955 | false |
geodynamics/gale | StGermain/pyre/Application.py | 4 | 4971 | #!/usr/bin/env python
##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##
## Copyright (C), 2003, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
##
## Authors:
## Stevan M. Quen... | gpl-2.0 | -4,399,334,562,450,044,400 | 35.284672 | 132 | 0.684168 | false |
sonuyos/couchpotato | couchpotato/core/plugins/quality/main.py | 28 | 23829 | from math import fabs, ceil
import traceback
import re
from CodernityDB.database import RecordNotFound
from couchpotato import get_db
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import toUnicode, ss
from couchpotato.core.helpers.v... | gpl-3.0 | 1,583,039,506,450,928,400 | 45.180233 | 281 | 0.536363 | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/medicationadministration.py | 1 | 8352 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/MedicationAdministration) on 2016-06-23.
# 2016, SMART Health IT.
from . import domainresource
class MedicationAdministration(domainresource.DomainResource):
""" Administration of medicatio... | bsd-3-clause | 8,271,077,605,362,204,000 | 42.051546 | 131 | 0.627395 | false |
illicitonion/givabit | lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_3/tests/regressiontests/fixtures_regress/models.py | 51 | 5411 | from django.db import models, DEFAULT_DB_ALIAS, connection
from django.contrib.auth.models import User
from django.conf import settings
class Animal(models.Model):
name = models.CharField(max_length=150)
latin_name = models.CharField(max_length=150)
count = models.IntegerField()
weight = models.FloatF... | apache-2.0 | -7,485,167,616,250,770,000 | 23.048889 | 79 | 0.653484 | false |
davidlmorton/spikepy | spikepy/builtins/file_interpreters/generic_matlab.py | 1 | 2038 | # Copyright (C) 2012 David Morton
#
# 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 is distribut... | gpl-3.0 | -7,477,594,477,413,825,000 | 36.740741 | 77 | 0.659961 | false |
spnow/grr | lib/flows/tests.py | 1 | 1265 | #!/usr/bin/env python
"""Loads up all flow tests."""
# pylint: disable=unused-import
# These import populate the Flow test registry
from grr.lib.flows.console import debugging_test
# Cron tests.
from grr.lib.flows.cron import filestore_stats_test
from grr.lib.flows.cron import system_test
from grr.lib.flows.general ... | apache-2.0 | -6,119,830,627,454,962,000 | 39.806452 | 53 | 0.818182 | false |
AdrianGaudebert/elmo | apps/shipping/views/status.py | 1 | 12509 | # 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/.
'''Views for shipping metrics.
'''
from collections import defaultdict
from django.http import HttpResponse, HttpRespon... | mpl-2.0 | 8,847,728,232,718,464,000 | 34.945402 | 78 | 0.522104 | false |
jdilallo/jdilallo-test | examples/dfa/v1_20/create_rotation_group.py | 1 | 3183 | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -5,321,148,805,414,634,000 | 31.151515 | 78 | 0.672322 | false |
xbmc/atv2 | xbmc/lib/libPython/Python/Doc/lib/caseless.py | 5 | 1973 | from optparse import Option, OptionParser, _match_abbrev
# This case-insensitive option parser relies on having a
# case-insensitive dictionary type available. Here's one
# for Python 2.2. Note that a *real* case-insensitive
# dictionary type would also have to implement __new__(),
# update(), and setdefault() -- bu... | gpl-2.0 | -8,799,737,704,770,540,000 | 31.883333 | 64 | 0.630512 | false |
Kentzo/Power | power/darwin.py | 1 | 16119 | # coding=utf-8
"""
Implements PowerManagement functions using IOPowerSources.
Requires Mac OS X 10.6+
See doc/darwin for platform-specific details.
"""
import weakref
import warnings
import objc
from objc import super
from Foundation import *
from power import common
# Generated in Mac OS X 10.8.2 using the following... | mit | 2,673,432,952,843,511,000 | 46.548673 | 270 | 0.691048 | false |
bluebore/tera | test/testcase/test_root.py | 10 | 3690 | '''
Copyright (c) 2015, Baidu.com, Inc. All Rights Reserved
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
'''
import common
from conf import const
'''
set env
'''
def setUp():
common.print_debug_msg(1, "setup()")
def tearDown():
common.print_debug_msg(1, ... | bsd-3-clause | 3,473,287,331,410,852,400 | 35.534653 | 94 | 0.680217 | false |
ampproject/amp-github-apps | project-metrics/metrics_service/apis/codecov.py | 1 | 2059 | """Module for fetching code coverage info from Codecov."""
from agithub import base as agithub_base
from flask_api import status
import logging
from typing import Any, Dict, Optional, Text
import env
class CodecovApiError(Exception):
"""Errors encountered while querying the Codecov API."""
def __init__(self, s... | apache-2.0 | 3,027,816,526,660,658,700 | 30.19697 | 79 | 0.662943 | false |
hightower8083/chimera | moduls/SR.py | 1 | 11134 | # This file is a part of CHIMERA software
# CHIMERA is a simulation code for FEL and laser plasma simulations
# Copyright (C) 2016 Igor A. Andriyash <igor.andriyash@gmail.com>
#
# 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... | gpl-3.0 | 830,170,328,831,006,700 | 32.945122 | 75 | 0.604634 | false |
carpe-diem/LinodeDNS | main.py | 1 | 3870 | # -*- coding: utf-8 -*-
import sys
from json import load
try:
import configparser
from urllib.request import urlretrieve
except Exception as excp:
exit("Couldn't import the standard library. Are you running Python 3?")
from PyQt4 import QtGui, QtCore
from src.utils import LinodeApi
from ui import design
... | gpl-3.0 | 246,120,490,744,734,300 | 25.689655 | 75 | 0.582429 | false |
offbyone/Flexget | flexget/plugins/input/letterboxd.py | 5 | 5038 | from __future__ import unicode_literals, division, absolute_import
import logging
import re
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.plugin import get_plugin_by_name
from flexget.utils.cached_input import cached
from flexget.utils.requests import RequestEx... | mit | -141,365,725,911,201,150 | 32.586667 | 108 | 0.550615 | false |
geonition/geoforms | geoforms/models.py | 1 | 14794 | from django.conf import settings
from django.contrib.gis.db import models as geomodel
from django.contrib.sites.managers import CurrentSiteManager
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.db import models
from django.template.defaultfilters import slugify
fro... | mit | 8,658,894,910,016,640,000 | 33.809412 | 501 | 0.547857 | false |
JackDanger/sentry | src/sentry/web/frontend/remove_account.py | 6 | 2704 | from __future__ import absolute_import
import logging
from django import forms
from django.contrib.auth import logout
from sentry import roles
from sentry.api import client
from sentry.models import (
Organization, OrganizationMember, OrganizationStatus, User
)
from sentry.web.frontend.base import BaseView
dele... | bsd-3-clause | 8,200,302,043,465,301,000 | 28.714286 | 71 | 0.551775 | false |
Ubuntu-Solutions-Engineering/ubuntu-tui-widgets | ubuntui/widgets/table.py | 3 | 1787 | from __future__ import unicode_literals
from urwid import (Columns, ListBox)
from ubuntui.widgets.hr import HR
class Table:
def __init__(self):
self._rows = []
self._row_id = []
self._is_header_set = False
def addHeadings(self, headings):
""" Takes list of headings and conve... | agpl-3.0 | 2,236,438,117,155,370,200 | 29.810345 | 79 | 0.585898 | false |
goldeneye-source/ges-python | lib/plistlib.py | 11 | 31481 | r"""plistlib.py -- a tool to generate and parse MacOSX .plist files.
The property list (.plist) file format is a simple XML pickle supporting
basic object types, like dictionaries, lists, numbers and strings.
Usually the top level object is a dictionary.
To write out a plist file, use the dump(value, file)
function. ... | gpl-3.0 | 7,975,824,539,926,685,000 | 29.773216 | 162 | 0.560052 | false |
FuzzJunket/pelican-plugins | post_stats/post_stats.py | 20 | 2245 | # -*- coding: utf-8 -*-
"""
Post Statistics
========================
This plugin calculates various statistics about a post and stores them in an article.stats dictionary:
wc: how many words
read_mins: how many minutes to read this article, based on 250 wpm (http://en.wikipedia.org/wiki/Words_per_minute#Reading_and_c... | agpl-3.0 | 8,886,822,029,380,463,000 | 30.450704 | 140 | 0.619794 | false |
stackforge/cloudbase-init | cloudbaseinit/tests/testutils.py | 4 | 6881 | # Copyright 2014 Cloudbase Solutions Srl
#
# 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... | apache-2.0 | 7,995,032,097,407,911,000 | 32.565854 | 78 | 0.625054 | false |
varunarya10/nova_test_latest | nova/api/openstack/compute/contrib/flavorextraspecs.py | 42 | 6412 | # Copyright 2011 University of Southern California
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | 791,315,564,808,528,400 | 37.860606 | 78 | 0.611822 | false |
desirable-objects/hotwire-shell | hotwire_ui/editor.py | 3 | 17219 | # This file is part of the Hotwire Shell user interface.
#
# Copyright (C) 2007 Colin Walters <walters@verbum.org>
#
# 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 of the Li... | gpl-2.0 | -2,181,879,372,015,905,000 | 38.583908 | 136 | 0.569545 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.