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 |
|---|---|---|---|---|---|---|---|---|---|---|
QijunPan/ansible | lib/ansible/plugins/action/eos_config.py | 7 | 1247 | #
# Copyright 2015 Peter Sprygada <psprygada@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any... | gpl-3.0 | 2,301,550,252,574,848,300 | 35.676471 | 83 | 0.750601 | false |
ironbox360/django | tests/select_related_regress/models.py | 282 | 3677 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Building(models.Model):
name = models.CharField(max_length=10)
def __str__(self):
return "Building: %s" % self.name
@python_2_unicod... | bsd-3-clause | 4,797,448,171,683,399,000 | 21.284848 | 75 | 0.688333 | false |
JackDanger/sentry | src/sentry/utils/versioning.py | 6 | 1883 | from __future__ import absolute_import
import six
from sentry.exceptions import InvalidConfiguration
from sentry.utils import warnings
class Version(tuple):
def __str__(self):
return '.'.join(map(six.binary_type, self))
def summarize(sequence, max=3):
items = sequence[:max]
remainder = len(seq... | bsd-3-clause | -5,039,679,280,810,666,000 | 32.625 | 97 | 0.653744 | false |
tildaslash/RatticWeb | cred/tests/test_ssh_key.py | 7 | 2827 | from django.test import TestCase
from django.core.files import File
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from ratticweb.tests.helper import TestData
from cred.models import Cred, Group
import os
here = os.path.abspath(os.path.dirname(__file__))
ssh_keys = os.pa... | gpl-2.0 | -2,074,448,005,590,447,000 | 37.726027 | 119 | 0.626459 | false |
kinow-io/kinow-python-sdk | kinow_client/models/employees.py | 1 | 3370 | # coding: utf-8
"""
Server API
Reference for Server API (REST/Json)
OpenAPI spec version: 1.4.41
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class Employees(object):
"""
NOTE: This class is auto g... | apache-2.0 | 3,120,977,432,514,950,000 | 23.779412 | 77 | 0.513056 | false |
mhvk/numpy | numpy/distutils/misc_util.py | 5 | 86629 | import os
import re
import sys
import copy
import glob
import atexit
import tempfile
import subprocess
import shutil
import multiprocessing
import textwrap
import importlib.util
from threading import local as tlocal
import distutils
from distutils.errors import DistutilsError
# stores temporary directory of each thre... | bsd-3-clause | -454,937,032,660,350,900 | 34.841539 | 102 | 0.542313 | false |
ChromiumWebApps/chromium | build/android/pylib/utils/test_options_parser.py | 54 | 3471 | # 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.
"""Parses options for the instrumentation tests."""
import os
# TODO(gkanwar): Some downstream scripts current rely on these functions
# existing. Thi... | bsd-3-clause | -3,982,643,941,300,668,400 | 50.044118 | 78 | 0.539902 | false |
endlessm/chromium-browser | tools/site_compare/commands/timeload.py | 189 | 4936 | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""SiteCompare command to time page loads
Loads a series of URLs in a series of browsers (and browser versions)
and measures how long the page takes to ... | bsd-3-clause | 2,941,878,904,120,362,500 | 33.277778 | 80 | 0.645057 | false |
xuanzhui/SoochowOraWIFIPW | Python3/getFileSSORequests.py | 1 | 2330 | __author__ = 'xuanzhui'
# http://docs.python-requests.org/en/latest/user/quickstart/
import requests, re
def printDebugInfo(resp):
print('respond status code : ', resp.status_code)
print('respond cookies : ', resp.cookies)
print('respond headers : ', resp.headers)
print('respond content : ', resp.con... | apache-2.0 | -1,201,422,974,821,296,600 | 27.084337 | 103 | 0.687124 | false |
dongpinglai/my_tornado | tornado/test/util_test.py | 5 | 9781 | from io import StringIO
import re
import sys
import datetime
import unittest
import tornado.escape
from tornado.escape import utf8
from tornado.util import (
raise_exc_info,
Configurable,
exec_in,
ArgReplacer,
timedelta_to_seconds,
import_object,
re_unescape,
is_finalizing,
)
import ty... | apache-2.0 | 7,630,557,462,167,638,000 | 30.756494 | 80 | 0.643084 | false |
uni2u/neutron | neutron/extensions/multiprovidernet.py | 18 | 4327 | # Copyright (c) 2013 OpenStack Foundation.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | 1,561,548,870,296,960,300 | 34.467213 | 78 | 0.670441 | false |
justathoughtor2/atomicApe | cygwin/lib/python2.7/site-packages/pylint/test/unittest_lint.py | 3 | 27410 | # Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE).
# 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 License, or (at your option) any later
# version.
#
# This program... | gpl-3.0 | 5,369,652,423,995,266,000 | 38.667149 | 103 | 0.586793 | false |
teamblueridge/gerrit | tools/gitlog2asciidoc.py | 22 | 3306 | #!/usr/bin/python
from optparse import OptionParser
import re
import subprocess
import sys
"""
This script generates a release note from the output of git log
between the specified tags.
Options:
--issues Show output the commits with issues associated with them.
--issue-numbers Show outputs issue numbers o... | apache-2.0 | -5,446,429,018,185,520,000 | 29.897196 | 77 | 0.557774 | false |
prospwro/odoo | addons/l10n_multilang/__openerp__.py | 339 | 1670 | # -*- 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,212,982,304,163,866,000 | 39.731707 | 79 | 0.611976 | false |
afrolov1/nova | nova/tests/api/openstack/compute/test_versions.py | 1 | 27566 | # Copyright 2010-2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | 472,370,035,869,532,000 | 36.100942 | 79 | 0.486287 | false |
srivassumit/servo | etc/ci/performance/gecko_driver.py | 42 | 3804 | #!/usr/bin/env python3
# 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/.
from contextlib import contextmanager
import json
import os
from selenium import webdriver
from ... | mpl-2.0 | -6,481,084,513,108,545,000 | 31.512821 | 107 | 0.563617 | false |
odootr/odoo | addons/payment_paypal/models/res_company.py | 422 | 1752 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class ResCompany(osv.Model):
_inherit = "res.company"
def _get_paypal_account(self, cr, uid, ids, name, arg, context=None):
Acquirer = self.pool['payment.acquirer']
company_id = self.pool['res.users'].browse(cr, uid, uid, context=co... | agpl-3.0 | 7,684,363,827,392,427,000 | 39.744186 | 97 | 0.583333 | false |
renanrodm/namebench | nb_third_party/dns/rdtypes/IN/NAPTR.py | 248 | 4889 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 | -773,157,015,335,396,100 | 36.037879 | 79 | 0.589078 | false |
dustymabe/ansible-modules-core | utilities/logic/async_wrapper.py | 10 | 7027 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others
#
# 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 ... | gpl-3.0 | 6,424,204,332,967,515,000 | 31.233945 | 122 | 0.55486 | false |
vikatory/kbengine | kbe/src/lib/python/Lib/test/test_tcl.py | 68 | 24957 | import unittest
import sys
import os
from test import support
# Skip this test if the _tkinter module wasn't built.
_tkinter = support.import_module('_tkinter')
# Make sure tkinter._fix runs to set up the environment
tkinter = support.import_fresh_module('tkinter')
from tkinter import Tcl
from _tkinter import TclErr... | lgpl-3.0 | 8,014,787,333,553,919,000 | 37.873832 | 85 | 0.531234 | false |
haad/ansible-modules-extras | network/asa/asa_command.py | 31 | 7099 | #!/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 | 2,720,456,023,957,801,000 | 30.691964 | 79 | 0.642626 | false |
fduraffourg/servo | tests/wpt/css-tests/tools/pywebsocket/src/example/close_wsh.py | 495 | 2835 | # Copyright 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | mpl-2.0 | 4,237,356,871,548,476,000 | 40.086957 | 76 | 0.725573 | false |
virtualnobi/MediaFiler | Model/MediaOrganization/testOrganizationByDate.py | 1 | 3086 | #!python
# -*- coding: latin-1 -*-
"""
(c) by nobisoft 2016-
"""
# Imports
## Standard
from __future__ import print_function
import unittest
import StringIO
## Contributed
## nobi
## Project
#import Model.Installer # to resolve import sequence issues
from OrganizationByDate import OrganizationByDate
class TestOrg... | gpl-3.0 | -5,699,060,997,224,642,000 | 34.068182 | 133 | 0.637719 | false |
xpansa/stock-logistics-tracking | stock_packaging_usability_ul/wizard/__init__.py | 1 | 1076 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Stock Packaging Usability UL module for Odoo
# Copyright (C) 2014 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you c... | agpl-3.0 | -4,326,466,640,440,655,000 | 45.782609 | 78 | 0.615242 | false |
mapleoin/cuZmeura | ads/migrations/0006_added_articles.py | 3 | 8975 | # -*- coding: utf-8 -*-
from south.db import db
from django.db import models
from cuZmeura.ads.models import *
class Migration:
def forwards(self, orm):
# Adding model 'Article'
db.create_table('ads_article', (
('id', orm['ads.article:id']),
('title', orm['ads... | agpl-3.0 | 3,630,286,502,190,281,700 | 60.054422 | 139 | 0.546407 | false |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/reportlab-3.2.0/demos/gadflypaper/gfe.py | 15 | 32480 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
__doc__=''
__version__=''' $Id$ '''
#REPORTLAB_TEST_SCRIPT
import sys
from reportlab.platypus import *
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.rl_config import defaultPageSize
PAGE_HEIGHT=defaultPageSize[1]
sty... | mit | -6,402,760,379,369,374,000 | 35.008869 | 95 | 0.730573 | false |
Plantain/sms-mailinglist | lib/googlecloudapis/resourceviews/v1beta1/resourceviews_v1beta1_messages.py | 5 | 15478 | """Generated message classes for resourceviews version v1beta1.
The Resource View API allows users to create and manage logical sets of Google
Compute Engine instances.
"""
from protorpc import messages
package = 'resourceviews'
class Label(messages.Message):
"""The Label to be applied to the resource views.
... | apache-2.0 | -7,198,569,461,245,594,000 | 32.79476 | 99 | 0.762372 | false |
John-NY/overo-oe | contrib/opie/opie_checksum_rewrite.py | 26 | 2820 | #!/usr/bin/env python
# ex:ts=4:sw=4:sts=4:et
# Opie recipe checksum rewriter
#
# A crude script for rewriting recipes to contain checksum information
#
# Some portions copied from oe-source-checker.py, copyright (C) 2007 OpenedHand
import os
import sys
def rewrite(recpfilename, sourcedir):
insrc = False
srcfirst ... | mit | 6,249,959,939,186,875,000 | 25.111111 | 83 | 0.615248 | false |
chrisidefix/devide.johannes | extra/soappy-cvp/bid/inventoryClient.py | 8 | 9035 | #!/usr/bin/env python
import getopt
import sys
import string
import re
import time
sys.path.insert(1,"..")
from SOAPpy import SOAP
import traceback
DEFAULT_SERVERS_FILE = './inventory.servers'
DEFAULT_METHODS = ('SimpleBuy', 'RequestForQuote','Buy','Ping')
def usage (error = None):
sys.stdout = sys.std... | bsd-3-clause | 6,337,120,792,880,035,000 | 30.04811 | 139 | 0.481904 | false |
sjthespian/ISYlib-python | ISY/IsyNodeClass.py | 2 | 21244 | """
Devices controlled my the ISY are represented as "nodes" on the ISY device and with Node Objects in the API
There are three types of Node Object:
* IsyNode - Node Object
Represent lights, switches, motion sensors
* IsyScene - Scene Object
Represents Scenes contains Nodes that comprise a "... | bsd-2-clause | -8,074,672,180,365,408,000 | 28.181319 | 107 | 0.525796 | false |
victoryckl/zxing-2.2 | cpp/scons/scons-local-2.0.0.final.0/SCons/Errors.py | 34 | 7440 | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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
# without li... | apache-2.0 | 1,073,460,788,715,367,200 | 35.292683 | 129 | 0.613844 | false |
fin-ger/alternative-toolbar | alttoolbar_repeat.py | 1 | 16340 | # This is a part of the external Repeat One Song plugin for Rhythmbox
#
# Author: Eduardo Mucelli Rezende Oliveira
# E-mail: edumucelli@gmail.com or eduardom@dcc.ufmg.br
# Version: 0.4 (Unstable) for Rhythmbox 3.0.1 or later
#
#
# reworked for alternative-toolbar
# Author: fossfreedom
#
# This program is free software:... | gpl-3.0 | -4,524,348,807,462,093,300 | 38.184652 | 78 | 0.585924 | false |
christer155/PTVS | Python/Tests/TestData/VirtualEnv/env/Lib/encodings/base64_codec.py | 88 | 2417 | """ Python 'base64_codec' Codec - base64 content transfer encoding
Unlike most of the other codecs which target Unicode, this codec
will return Python string objects for both encode and decode.
Written by Marc-Andre Lemburg (mal@lemburg.com).
"""
import codecs, base64
### Codec APIs
def bas... | apache-2.0 | 6,775,209,943,005,341,000 | 28.594937 | 68 | 0.670252 | false |
edisonlz/fruit | web_project/base/site-packages/androguard/core/binaries/idapipe.py | 7 | 6942 | # This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard 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 3 of th... | apache-2.0 | 4,810,304,831,253,265,000 | 31.745283 | 124 | 0.540334 | false |
nlloyd/SubliminalCollaborator | libs/twisted/test/test_epoll.py | 10 | 4326 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for epoll wrapper.
"""
import socket, errno, time
from twisted.trial import unittest
from twisted.python.util import untilConcludes
try:
from twisted.python import _epoll
except ImportError:
_epoll = None
class EPoll(unittes... | apache-2.0 | 4,625,523,827,321,189,000 | 26.379747 | 79 | 0.558715 | false |
tj93/pymtl | accel/strsearch/StrSearchFunc_test.py | 7 | 1324 | #=========================================================================
# StrSearchFunc_test.py
#=========================================================================
#
# PyMTL Functional Model of strsearch.
from pymtl import *
from StrSearchOO_test import strings, docs, reference
#---------------------... | bsd-3-clause | -7,372,949,633,870,052,000 | 29.790698 | 74 | 0.369335 | false |
shoyer/numpy | numpy/distutils/line_endings.py | 6 | 2085 | """ Functions for converting from DOS to UNIX line endings
"""
from __future__ import division, absolute_import, print_function
import sys, re, os
def dos2unix(file):
"Replace CRLF with LF in argument files. Print names of changed files."
if os.path.isdir(file):
print(file, "Directory!")
ret... | bsd-3-clause | 6,192,401,463,685,852,000 | 26.434211 | 76 | 0.576019 | false |
ilendl2/wagtail-cookiecutter-foundation | {{cookiecutter.project_slug}}/products/migrations/0008_auto_20180607_1804.py | 2 | 1109 | # Generated by Django 2.0 on 2018-06-07 18:04
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('products', '0007_productindexpage_feed_image'),
]
operations = [
migrations.AlterField(
model_nam... | mit | 2,805,889,800,421,968,000 | 37.241379 | 179 | 0.650135 | false |
claws/txBOM | setup.py | 1 | 1666 | #!/usr/bin/env python
"""
A distutils installation script for txBOM.
"""
from distutils.core import setup
import txbom
long_description = """txBOM is a Python Twisted package that lets you retrieve forecasts
and observations from the Australian Bureau of Meteorology (BOM).
Use it to integrate non blocking retrieva... | mit | -5,336,998,795,484,653,000 | 38.666667 | 153 | 0.62425 | false |
Threak/easyrel | getfav.py | 1 | 3507 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import os
import os.path
import oauth2 as oauth
import json
from font_colors import font_colors
import getrel
import setfav
import time
from torrentApi import torrent_api as api
#name of config file where all keys get stored
config = '~/.config/getrel/getrel.json'
nzb_pa... | mit | 6,407,258,964,736,092,000 | 29.763158 | 104 | 0.696322 | false |
Forage/Gramps | gramps/gen/plug/docgen/graphdoc.py | 1 | 41769 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2002 Gary Shao
# Copyright (C) 2007 Brian G. Matherly
# Copyright (C) 2009 Benny Malengier
# Copyright (C) 2009 Gary Burton
#
# This pr... | gpl-2.0 | 6,455,969,163,905,092,000 | 37.703429 | 110 | 0.487369 | false |
SmithsonianEnterprises/django-cms | cms/tests/test_permissions.py | 50 | 3054 | # -*- coding: utf-8 -*-
from django.contrib.sites.models import Site
from django.test.utils import override_settings
from cms.models import Page
from cms.api import create_page, assign_user_to_page
from cms.cache.permissions import (get_permission_cache, set_permission_cache,
clear_u... | bsd-3-clause | 6,572,548,832,098,503,000 | 43.911765 | 90 | 0.614604 | false |
jrwdunham/old | onlinelinguisticdatabase/tests/functional/test_phonologybackups.py | 1 | 8705 | # Copyright 2016 Joel Dunham
#
# 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 writi... | apache-2.0 | -4,767,553,644,585,063,000 | 46.82967 | 106 | 0.630557 | false |
hmightypirate/guided-backprop-chainerrl | examples/mygym/guided_relu.py | 1 | 2720 | import numpy
import chainer
from chainer import cuda
from chainer import function
from chainer import utils
from chainer.utils import type_check
if cuda.cudnn_enabled:
cudnn = cuda.cudnn
_mode = cudnn.cudnn.CUDNN_ACTIVATION_RELU
class GuidedReLU(function.Function):
"""Rectified Linear Unit."""
# T... | apache-2.0 | 333,923,042,579,023,400 | 27.041237 | 78 | 0.512132 | false |
atmark-techno/atmark-dist | user/python/Lib/plat-irix5/TERMIOS.py | 4 | 10049 | # Generated by h2py from /usr/include/sys/termios.h
# Included from sys/ttydev.h
B0 = 0
B50 = 0000001
B75 = 0000002
B110 = 0000003
B134 = 0000004
B150 = 0000005
B200 = 0000006
B300 = 0000007
B600 = 0000010
B1200 = 0000011
B1800 = 0000012
B2400 = 0000013
B4800 = 0000014
B9600 = 0000015
B19200 = 0000016
EXTA = 0000016
B... | gpl-2.0 | -5,540,328,107,601,423,000 | 16.446181 | 51 | 0.676286 | false |
goldmedal/spark | python/pyspark/sql/tests/test_group.py | 21 | 1831 | #
# 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 | -6,958,458,681,585,305,000 | 38.804348 | 97 | 0.696341 | false |
vbshah1992/microblog | flask/lib/python2.7/site-packages/markupsafe/_native.py | 1243 | 1187 | # -*- coding: utf-8 -*-
"""
markupsafe._native
~~~~~~~~~~~~~~~~~~
Native Python implementation the C module is not compiled.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from markupsafe import Markup
from markupsafe._compat import text_type
def escape(... | bsd-3-clause | -6,600,811,863,262,563,000 | 24.804348 | 71 | 0.576243 | false |
bowang/tensorflow | tensorflow/python/ops/nn_fused_batchnorm_test.py | 5 | 14553 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 6,077,937,473,905,084,000 | 38.332432 | 105 | 0.589844 | false |
Venturi/cms | env/lib/python2.7/site-packages/cms/cms_plugins.py | 46 | 4350 | # -*- coding: utf-8 -*-
from cms.models import CMSPlugin, Placeholder
from cms.models.aliaspluginmodel import AliasPluginModel
from cms.models.placeholderpluginmodel import PlaceholderReference
from cms.plugin_base import CMSPluginBase, PluginMenuItem
from cms.plugin_pool import plugin_pool
from cms.plugin_rendering im... | gpl-2.0 | 6,812,588,294,220,614,000 | 38.189189 | 109 | 0.647356 | false |
thedrow/samsa | pykafka/connection.py | 2 | 4337 | from __future__ import division
"""
Author: Keith Bourgoin, Emmett Butler
"""
__license__ = """
Copyright 2015 Parse.ly, 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.o... | apache-2.0 | -1,165,972,631,147,970,300 | 31.125926 | 78 | 0.595112 | false |
massmutual/scikit-learn | examples/manifold/plot_compare_methods.py | 259 | 4031 | """
=========================================
Comparison of Manifold Learning methods
=========================================
An illustration of dimensionality reduction on the S-curve dataset
with various manifold learning methods.
For a discussion and comparison of these algorithms, see the
:ref:`manifold module... | bsd-3-clause | 15,572,306,875,715,888 | 31.772358 | 76 | 0.658149 | false |
ddico/odoo | addons/website/models/website_visitor.py | 1 | 13772 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime, timedelta
import uuid
from odoo import fields, models, api, registry, _
from odoo.addons.base.models.res_partner import _tz_get
from odoo.exceptions import UserError
from odoo.tools.misc i... | agpl-3.0 | 7,276,033,292,381,220,000 | 50.774436 | 185 | 0.624092 | false |
404d/Temporals-Web | temporals_web/migration/versions/201508070005_1d84b7d16aa9_add_principal_group_system.py | 1 | 1285 | """Add principal group system
Revision ID: 1d84b7d16aa9
Revises: 179651effcbd
Create Date: 2015-08-07 00:05:42.996683
"""
# revision identifiers, used by Alembic.
revision = '1d84b7d16aa9'
down_revision = '179651effcbd'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def u... | mit | -7,546,771,122,862,709,000 | 31.948718 | 78 | 0.664591 | false |
Andrei-Stepanov/avocado-vt | virttest/libvirt_xml/devices/serial.py | 22 | 2004 | """
Classes to support XML for serial devices
http://libvirt.org/formatdomain.html#elementCharSerial
"""
from virttest.libvirt_xml import base, accessors, xcepts
from virttest.libvirt_xml.devices.character import CharacterBase
class Serial(CharacterBase):
__slots__ = ('protocol_type', 'target_port', 'target_ty... | gpl-2.0 | 9,054,372,876,214,156,000 | 38.294118 | 78 | 0.566367 | false |
Kast0rTr0y/ansible | lib/ansible/galaxy/api.py | 12 | 11035 | #!/usr/bin/env python
########################################################################
#
# (C) 2013, James Cammarata <jcammarata@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-3.0 | -2,094,465,704,581,779,000 | 35.419142 | 119 | 0.57961 | false |
Distrotech/dia | plug-ins/python/otypes.py | 10 | 5934 | # PyDia Self Documentation Series - Part II : Object Types
# Copyright (c) 2003, Hans Breuer <hans@breuer.org>
#
# generates a new diagram which contains all the currently
# registered object types sorted by their containing package
#
# This program is free software; you can redistribute it and/or m... | gpl-2.0 | 4,991,186,692,592,979,000 | 31.25 | 96 | 0.620492 | false |
chrismeyersfsu/ansible | lib/ansible/modules/system/lvg.py | 23 | 9903 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Alexander Bulimov <lazywolf0@gmail.com>
# based on lvol module by Jeroen Hoekx <jeroen.hoekx@dsquare.be>
#
# 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 p... | gpl-3.0 | -4,432,940,730,156,775,000 | 35.814126 | 135 | 0.559325 | false |
Celthi/youtube-dl-GUI | youtube_dl/extractor/foxgay.py | 146 | 1735 | from __future__ import unicode_literals
from .common import InfoExtractor
class FoxgayIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?foxgay\.com/videos/(?:\S+-)?(?P<id>\d+)\.shtml'
_TEST = {
'url': 'http://foxgay.com/videos/fuck-turkish-style-2582.shtml',
'md5': '80d72beab5d04e1655a56ad37... | mit | -8,052,325,421,669,403,000 | 35.145833 | 92 | 0.527378 | false |
myerpengine/odoo | addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py | 90 | 4696 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | agpl-3.0 | -6,170,180,791,611,054,000 | 38.79661 | 147 | 0.606261 | false |
SteveHNH/ansible | lib/ansible/modules/network/vyos/vyos_banner.py | 15 | 5123 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Li... | gpl-3.0 | -6,932,008,458,258,433,000 | 27.780899 | 95 | 0.632637 | false |
jasmas/DiscoNet | DiscoNet/_platform_detect.py | 1 | 1264 | import sys, os
from subprocess import call as subcall
class Detect():
doc_path = ''
icon = ''
def open_method(filename):
pass
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and sto... | mit | -7,375,834,841,672,422,000 | 31.410256 | 76 | 0.626582 | false |
samuelhavron/heroku-buildpack-python | Python-3.4.3/Lib/test/test_dictcomps.py | 121 | 3782 | import unittest
from test import support
# For scope testing.
g = "Global variable"
class DictComprehensionTest(unittest.TestCase):
def test_basics(self):
expected = {0: 10, 1: 11, 2: 12, 3: 13, 4: 14, 5: 15, 6: 16, 7: 17,
8: 18, 9: 19}
actual = {k: k + 10 for k in range(10)... | mit | 1,870,604,617,232,232,000 | 41.977273 | 79 | 0.486779 | false |
marcoitur/Freecad_test | src/Mod/Ship/shipUtils/Units.py | 17 | 3605 | #***************************************************************************
#* *
#* Copyright (c) 2011, 2012 *
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* ... | lgpl-2.1 | 1,859,189,974,534,633,500 | 41.916667 | 78 | 0.530929 | false |
ruuk/script.module.youtube.dl | lib/youtube_dl/extractor/twentyfourvideo.py | 11 | 4756 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_iso8601,
int_or_none,
xpath_attr,
xpath_element,
)
class TwentyFourVideoIE(InfoExtractor):
IE_NAME = '24video'
_VALID_URL = r'''(?x)
https?://
... | gpl-2.0 | 2,946,743,477,714,275,300 | 34.255639 | 96 | 0.498827 | false |
joshua-cogliati-inl/moose | framework/contrib/nsiqcppstyle/nsiqcppstyle_state.py | 43 | 3572 | # Copyright (c) 2009 NHN Inc. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the follow... | lgpl-2.1 | 4,267,907,544,120,690,700 | 41.023529 | 82 | 0.698768 | false |
dmitriy0611/django | tests/migrations/test_operations.py | 64 | 93154 | from __future__ import unicode_literals
import unittest
from django.db import connection, migrations, models, transaction
from django.db.migrations.migration import Migration
from django.db.migrations.state import ProjectState
from django.db.models.fields import NOT_PROVIDED
from django.db.transaction import atomic
f... | bsd-3-clause | -6,301,198,033,235,042,000 | 47.517708 | 144 | 0.619598 | false |
Changaco/oh-mainline | vendor/packages/gdata/tests/gdata_tests/calendar_resource/data_test.py | 41 | 3292 | #!/usr/bin/python
#
# Copyright (C) 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | agpl-3.0 | -4,038,400,666,007,035,000 | 40.670886 | 115 | 0.703827 | false |
flavour/eden | modules/templates/SHARE/config.py | 1 | 118243 | # -*- coding: utf-8 -*-
from collections import OrderedDict
from gluon import current, URL
from gluon.storage import Storage
from s3 import S3ReportRepresent
def config(settings):
"""
Settings for the SHARE Template
Migration Issues:
req_need.name is now length=64
(SHARE... | mit | 3,957,622,036,920,448,500 | 45.441084 | 198 | 0.39838 | false |
josherick/bokeh | bokeh/resources.py | 26 | 9535 | ''' The resources module provides the Resources class for easily configuring
how BokehJS code and CSS resources should be located, loaded, and embedded in
Bokeh documents.
Also provides some pre-configured Resources objects:
Attributes:
CDN : load minified BokehJS from CDN
INLINE : provide minified BokehJS fr... | bsd-3-clause | 7,206,736,764,343,613,000 | 35.957364 | 121 | 0.605454 | false |
zenodo/invenio | invenio/modules/submit/models.py | 5 | 17359 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2011, 2012 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... | gpl-2.0 | 7,377,009,094,002,682,000 | 42.3975 | 78 | 0.639668 | false |
hynnet/openwrt-mt7620 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/encodings/unicode_escape.py | 852 | 1184 | """ Python 'unicode-escape' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is inte... | gpl-2.0 | -1,086,509,078,208,769,000 | 25.311111 | 69 | 0.71875 | false |
orymeyer/Flask-Python-GAE-Login-Registration | lib/Werkzeug-0.10.4.dist-info/werkzeug/_reloader.py | 116 | 7938 | import os
import sys
import time
import subprocess
import threading
from itertools import chain
from werkzeug._internal import _log
from werkzeug._compat import PY2, iteritems, text_type
def _iter_module_files():
"""This iterates over all relevant Python files. It goes through all
loaded files from modules,... | apache-2.0 | -5,382,300,744,136,766,000 | 33.06867 | 78 | 0.568909 | false |
bslatkin/8-bits | appengine-mapreduce/python/src/mapreduce/lib/pipeline/simplejson/scanner.py | 43 | 2596 | #!/usr/bin/env python
"""JSON token scanner
"""
import re
def _import_c_make_scanner():
try:
from mapreduce.lib.simplejson._speedups import make_scanner
return make_scanner
except ImportError:
return None
c_make_scanner = _import_c_make_scanner()
__all__ = ['make_scanner']
NUMBER_RE = ... | apache-2.0 | -2,038,755,265,048,126,500 | 32.282051 | 71 | 0.560863 | false |
PGer/incubator-hawq | tools/bin/pythonSrc/PyGreSQL-4.0/tutorial/syscat.py | 59 | 5378 | # syscat.py - parses some system catalogs
# inspired from the PostgreSQL tutorial
# adapted to Python 1995 by Pascal ANDRE
print """
__________________________________________________________________
MODULE SYSCAT.PY : PARSES SOME POSTGRESQL SYSTEM CATALOGS
This module is designed for being imported from python prom... | apache-2.0 | -4,869,713,627,762,165,000 | 35.09396 | 77 | 0.692265 | false |
ahmadiga/min_edx | lms/djangoapps/shoppingcart/views.py | 64 | 40908 | import logging
import datetime
import decimal
import pytz
from ipware.ip import get_ip
from django.db.models import Q
from django.conf import settings
from django.contrib.auth.models import Group
from django.shortcuts import redirect
from django.http import (
HttpResponse, HttpResponseRedirect, HttpResponseNotFound... | agpl-3.0 | -2,168,807,708,431,187,700 | 39.664016 | 140 | 0.655446 | false |
vinhlh/bite-project | deps/gdata-python-client/samples/apps/marketplace_sample/gdata/apps/groups/service.py | 94 | 12924 | #!/usr/bin/python
#
# Copyright (C) 2008 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -5,219,982,116,276,173,000 | 32.395349 | 92 | 0.645543 | false |
firerszd/kbengine | kbe/src/lib/python/Lib/idlelib/AutoCompleteWindow.py | 88 | 17672 | """
An auto-completion window for IDLE, used by the AutoComplete extension
"""
from tkinter import *
from idlelib.MultiCall import MC_SHIFT
from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES
HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>"
HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>")
KEYPR... | lgpl-3.0 | -8,678,562,517,459,463,000 | 41.583133 | 80 | 0.5683 | false |
SivilTaram/edx-platform | common/djangoapps/embargo/migrations/0006_auto__add_field_restrictedcourse_disable_access_check.py | 94 | 7741 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'RestrictedCourse.disable_access_check'
db.add_column('emb... | agpl-3.0 | 7,519,264,810,908,044,000 | 68.747748 | 182 | 0.55768 | false |
Alexey-T/CudaText | app/cudatext.app/Contents/Resources/py/cuda_comments/cd_comments.py | 2 | 17881 | ''' Plugin for CudaText editor
Authors:
Andrey Kvichansky (kvichans on github.com)
Alexey Torgashin (CudaText)
Version:
'0.8.9 2021-04-05'
'''
import os
import cudatext as app
from cudatext import ed
import cudatext_cmd as cmds
import cudax_lib as apx
from .cd_p... | mpl-2.0 | 2,191,735,591,198,026,500 | 46.087071 | 161 | 0.452426 | false |
pbougue/navitia | source/jormungandr/jormungandr/interfaces/v1/Calendars.py | 2 | 4757 | # coding=utf-8
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility a... | agpl-3.0 | 5,105,262,989,505,532,000 | 39.313559 | 106 | 0.640109 | false |
WhySoGeeky/DroidPot | venv/lib/python2.7/site-packages/django/contrib/gis/admin/widgets.py | 449 | 4881 | import logging
from django.contrib.gis.gdal import GDALException
from django.contrib.gis.geos import GEOSException, GEOSGeometry
from django.forms.widgets import Textarea
from django.template import loader
from django.utils import six, translation
# Creating a template context that contains Django settings
# values n... | mit | -5,296,056,898,650,410,000 | 39.008197 | 90 | 0.551936 | false |
ManageIQ/integration_tests | cfme/containers/project.py | 3 | 5378 | import attr
from navmazing import NavigateToAttribute
from navmazing import NavigateToSibling
from cfme.common import Taggable
from cfme.common import TaggableCollection
from cfme.common import TagPageView
from cfme.containers.provider import ContainerObjectAllBaseView
from cfme.containers.provider import ContainerObj... | gpl-2.0 | 7,305,163,878,983,591,000 | 36.347222 | 100 | 0.68241 | false |
campbe13/openhatch | vendor/packages/whoosh/src/whoosh/filedb/filestore.py | 17 | 6771 | # Copyright 2009 Matt Chaput. 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 conditions and the... | agpl-3.0 | -8,832,049,253,634,278,000 | 30.788732 | 78 | 0.623542 | false |
bigswitch/neutron | neutron/tests/fullstack/test_qos.py | 1 | 7375 | # Copyright 2015 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 | -7,248,345,623,961,748,000 | 38.228723 | 79 | 0.642441 | false |
sharad/calibre | src/calibre/utils/logging.py | 2 | 5679 | from __future__ import with_statement
__license__ = 'GPL 3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
'A simplified logging system'
DEBUG = 0
INFO = 1
WARN = 2
ERROR = 3
import sys, traceback, cStringIO
from functools import partial
from threading import RLock... | gpl-3.0 | 5,599,739,534,599,482,000 | 24.581081 | 79 | 0.56436 | false |
factorlibre/openerp-server-6.1 | openerp/test/__init__.py | 14 | 1099 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 OpenERP S.A. http://www.openerp.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 | -1,864,227,978,890,069,000 | 42.96 | 78 | 0.621474 | false |
mosbasik/buzhug | javasrc/lib/Jython/Lib/test/test_jsr223.py | 23 | 2151 | # XXX Earlier version of this test also tested put, get, eval on the
# engine, however this introduced action at a distance where aspects
# of the sys state changed (notably sys.stdin.newlines), which then
# impacted test_univnewlines later in the regrtest.
#
# For now, there may be limits in how much we can test Jytho... | bsd-3-clause | 7,447,080,142,768,146,000 | 41.176471 | 127 | 0.691306 | false |
joshuamorton/kermit | Course.py | 1 | 5083 | """
:Author: Joshua Morton
"""
class And(object):
"""
represents a set of prerequisites that must be taken together
"""
def __init__(self, *components):
"""
initializes the And object
self - the And
components: List[Union[Course, Or]] - the set of prerequisites that
... | mit | -7,446,754,582,174,632,000 | 31.170886 | 79 | 0.568562 | false |
alsrgv/tensorflow | tensorflow/python/ops/clip_ops_test.py | 19 | 3810 | # 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,111,934,676,660,577,000 | 36.722772 | 80 | 0.644882 | false |
raildo/nova | nova/tests/functional/api_sample_tests/test_user_data.py | 16 | 1802 | # Copyright 2012 Nebula, Inc.
# 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... | apache-2.0 | 8,366,275,301,182,171,000 | 36.541667 | 78 | 0.668147 | false |
races1986/SafeLanguage | CEM/wiktionary/meaningtest.py | 3 | 2688 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Unit tests for meaning.py"""
import meaning
import unittest
class KnownValues(unittest.TestCase):
knownParserValues = (
("*German: [[wichtig]]",
[('de','wichtig','',1,False,'')]
),
("*[[Esperanto]]:... | epl-1.0 | -4,672,107,921,821,898,000 | 41.16129 | 111 | 0.44759 | false |
mcgachey/edx-platform | lms/djangoapps/courseware/tests/test_microsites.py | 13 | 10331 | """
Tests related to the Microsites feature
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from nose.plugins.attrib import attr
from courseware.tests.helpers import LoginEnrollmentTestCase
from course_modes.models import CourseMode
from... | agpl-3.0 | -6,665,277,559,964,517,000 | 44.712389 | 119 | 0.670506 | false |
ashutoshvt/psi4 | samples/python/mints13/input.py | 24 | 4179 | #! test fragment decomposition + to/from_dict
import numpy as np
import psi4
from psi4.driver import qcdb
psi4.set_output_file("output.dat", False)
def test_chgmult(expected, cgmpdict, label):
rc, rfc, rm, rfm = expected
qcdb.compare_integers(rc, cgmpdict['molecular_charge'], label + ': c')
qcdb.compare_... | lgpl-3.0 | -5,938,107,202,284,091,000 | 32.166667 | 102 | 0.627901 | false |
nathanaevitas/odoo | openerp/addons/l10n_hu/__openerp__.py | 320 | 1815 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 InnOpen Group Kft (<http://www.innopen.eu>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
... | agpl-3.0 | 7,347,765,701,903,957,000 | 33.245283 | 78 | 0.591736 | false |
firerszd/kbengine | kbe/res/scripts/common/Lib/multiprocessing/semaphore_tracker.py | 100 | 4820 | #
# On Unix we run a server process which keeps track of unlinked
# semaphores. The server ignores SIGINT and SIGTERM and reads from a
# pipe. Every other process of the program has a copy of the writable
# end of the pipe, so we get EOF when all other processes have exited.
# Then the server process unlinks any remai... | lgpl-3.0 | 6,751,274,481,822,104,000 | 32.706294 | 79 | 0.554979 | false |
nvl1109/openembeded | recipes/python/python-pyyaml/setup.py | 69 | 1936 | NAME = 'PyYAML'
VERSION = '3.06'
DESCRIPTION = "YAML parser and emitter for Python"
LONG_DESCRIPTION = """\
YAML is a data serialization format designed for human readability and
interaction with scripting languages. PyYAML is a YAML parser and
emitter for Python.
PyYAML features a complete YAML 1.1 parser, Unicode s... | mit | -8,885,935,945,144,873,000 | 29.25 | 81 | 0.671488 | false |
olehermanse/sim_game | sim_game/geometry.py | 1 | 2921 | import math
def limit(number, lower, upper):
assert lower < upper or (lower is None or upper is None)
if lower and number < lower:
number = lower
if upper and number > upper:
number = upper
# TODO: remove these asserts and make tests
assert number <= upper or not upper
assert nu... | mit | -2,224,986,608,748,187,600 | 24.849558 | 68 | 0.510442 | false |
sometallgit/AutoUploader | Python27/Lib/site-packages/tests/test__pkce.py | 15 | 1954 | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | mit | 2,721,102,256,278,466,000 | 35.185185 | 74 | 0.675026 | false |
ekcs/congress | thirdparty/antlr3-antlr-3.5/runtime/Python/tests/t054main.py | 16 | 7926 | # -*- coding: utf-8 -*-
import unittest
import textwrap
import antlr3
import antlr3.tree
import testbase
import sys
from StringIO import StringIO
class T(testbase.ANTLRTest):
def setUp(self):
self.oldPath = sys.path[:]
sys.path.insert(0, self.baseDir)
def tearDown(self):
sys.path = s... | apache-2.0 | 1,838,195,573,803,102,500 | 23.915094 | 109 | 0.4675 | false |
si618/pi-time | node_modules/grunt-pylint/tasks/lib/pylint/test/functional/inherit_non_class.py | 3 | 1287 | """Test that inheriting from something which is not
a class emits a warning. """
# pylint: disable=no-init, import-error, invalid-name
# pylint: disable=missing-docstring, too-few-public-methods, no-absolute-import
from missing import Missing
if 1:
Ambiguous = None
else:
Ambiguous = int
class Empty(object):... | gpl-3.0 | -5,674,234,478,516,721,000 | 18.8 | 79 | 0.655789 | 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.