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 |
|---|---|---|---|---|---|---|---|---|---|---|
pjaehrling/finetuneAlexVGG | preprocessing/tf_models/inception.py | 1 | 13193 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -8,236,779,835,723,323,000 | 44.33677 | 156 | 0.693701 | false |
alikins/ansible | test/units/module_utils/facts/base.py | 118 | 2325 | # base unit test classes for ansible/module_utils/facts/ tests
# -*- coding: utf-8 -*-
#
# 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 lat... | gpl-3.0 | -7,633,237,183,241,116,000 | 37.114754 | 96 | 0.667527 | false |
ganzenmg/lammps_current | tools/i-pi/ipi/inputs/atoms.py | 33 | 5049 | """Deals with creating the atoms class.
Copyright (C) 2013, Joshua More and Michele Ceriotti
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 ... | gpl-2.0 | 3,566,499,481,555,151,400 | 40.727273 | 134 | 0.586453 | false |
hanv89/api-client-python | lib/pyasn1/type/namedtype.py | 162 | 5725 | # NamedType specification for constructed types
import sys
from pyasn1.type import tagmap
from pyasn1 import error
class NamedType:
isOptional = 0
isDefaulted = 0
def __init__(self, name, t):
self.__name = name; self.__type = t
def __repr__(self): return '%s(%r, %r)' % (
self.__class__.... | apache-2.0 | 4,072,002,392,099,508,000 | 37.422819 | 75 | 0.559127 | false |
debugger22/sympy | sympy/functions/special/hyper.py | 56 | 33825 | """Hypergeometric and Meijer G-functions"""
from __future__ import print_function, division
from sympy.core import S, I, pi, oo, ilcm, Mod
from sympy.core.function import Function, Derivative, ArgumentIndexError
from sympy.core.containers import Tuple
from sympy.core.compatibility import reduce, range
from sympy.core... | bsd-3-clause | -44,631,277,238,190,776 | 31.776163 | 84 | 0.529845 | false |
vodik/pacman | test/pacman/tests/upgrade078.py | 23 | 1514 | self.description = "-U --recursive upgrades outdated dependencies"
# git (new package)
# |-- perl (up to date)
# |-- glibc (out of date, will be updated)
# |-- curl (out of date, will be updated)
# |-- expat (up to date)
perl_lpkg = pmpkg("perl", "5.14.1-3")
perl_lpkg.depends = ["glibc"]
self.addpkg2db("local", p... | gpl-2.0 | 5,689,667,981,667,865,000 | 26.527273 | 66 | 0.67041 | false |
Plain-Andy-legacy/android_external_chromium_org | native_client_sdk/src/build_tools/sdk_tools/command/info.py | 160 | 1162 | # 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 command_common
import logging
import manifest_util
def Info(manifest, bundle_names):
valid_bundles, invalid_bundles = command_common.GetValidBu... | bsd-3-clause | -5,368,061,142,005,745,000 | 34.212121 | 79 | 0.626506 | false |
fw1121/luigi | sitecustomize.py | 56 | 1375 | import os
import sys
def patch_process_for_coverage():
# patch multiprocessing module to get coverage
# https://bitbucket.org/ned/coveragepy/issue/117/enable-coverage-measurement-of-code-run-by
from coverage.collector import Collector
from coverage import coverage
import multiprocessing
# dete... | apache-2.0 | -8,777,401,417,802,725,000 | 28.891304 | 95 | 0.6 | false |
fernandog/Sick-Beard | lib/unidecode/x004.py | 249 | 4071 | data = (
'Ie', # 0x00
'Io', # 0x01
'Dj', # 0x02
'Gj', # 0x03
'Ie', # 0x04
'Dz', # 0x05
'I', # 0x06
'Yi', # 0x07
'J', # 0x08
'Lj', # 0x09
'Nj', # 0x0a
'Tsh', # 0x0b
'Kj', # 0x0c
'I', # 0x0d
'U', # 0x0e
'Dzh', # 0x0f
'A', # 0x10
'B', # 0x11
'V', # 0x12
'G', # 0x... | gpl-3.0 | -7,426,780,827,397,579,000 | 14.840467 | 24 | 0.332842 | false |
SpaceKatt/CSPLN | apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/gluon/tests/test_tools.py | 13 | 2558 | #!/bin/python
# -*- coding: utf-8 -*-
"""
Unit tests for gluon.tools
"""
import os
import sys
if sys.version < "2.7":
import unittest2 as unittest
else:
import unittest
from fix_path import fix_sys_path
fix_sys_path(__file__)
DEFAULT_URI = os.getenv('DB', 'sqlite:memory')
from gluon.dal import DAL, Fie... | gpl-3.0 | 2,727,319,155,355,220,000 | 29.819277 | 73 | 0.599687 | false |
MichaelAquilina/restructured-preview | lib/pygments/lexers/make.py | 72 | 7247 | # -*- coding: utf-8 -*-
"""
pygments.lexers.make
~~~~~~~~~~~~~~~~~~~~
Lexers for Makefiles and similar.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, include, bygroups, \
... | mit | -1,098,408,958,263,585,000 | 35.054726 | 90 | 0.507658 | false |
DiptoDas8/Biponi | lib/python2.7/site-packages/django/conf/locale/el/formats.py | 120 | 1477 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd/m/Y'
TIME_FORMAT = 'P'
DATETIME... | mit | 2,018,064,102,942,140,700 | 37.868421 | 82 | 0.545701 | false |
a1ezzz/wasp-general | tests/wasp_general_network_messenger_proto_test.py | 1 | 3944 | # -*- coding: utf-8 -*-
import pytest
from wasp_general.network.messenger.proto import WMessengerOnionProto, WMessengerEnvelopeProto
from wasp_general.network.messenger.proto import WMessengerOnionSessionProto, WMessengerOnionLayerProto
from wasp_general.network.messenger.proto import WMessengerOnionSessionFlowProto
... | lgpl-3.0 | -7,845,641,448,761,320,000 | 30.301587 | 103 | 0.768509 | false |
dimdung/boto | boto/ec2/regioninfo.py | 152 | 1568 | # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without res... | mit | -1,272,312,487,854,325,200 | 42.555556 | 74 | 0.732143 | false |
Arcanemagus/plexpy | lib/tqdm/_tqdm_notebook.py | 3 | 8426 | """
IPython/Jupyter Notebook progressbar decorator for iterators.
Includes a default (x)range iterator printing to stderr.
Usage:
>>> from tqdm_notebook import tnrange[, tqdm_notebook]
>>> for i in tnrange(10): #same as: for i in tqdm_notebook(xrange(10))
... ...
"""
# future division is important to divide ... | gpl-3.0 | -3,965,236,220,668,556,300 | 34.70339 | 79 | 0.55127 | false |
mrbox/django | tests/delete_regress/models.py | 325 | 3172 | from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Award(models.Model):
name = models.CharField(max_length=25)
object_id = models.PositiveIntegerField()
content_type = mode... | bsd-3-clause | -3,662,715,844,626,836,500 | 21.496454 | 82 | 0.722257 | false |
onecloud/neutron | neutron/openstack/common/service.py | 15 | 15623 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | apache-2.0 | 6,761,267,787,685,286,000 | 29.513672 | 79 | 0.594508 | false |
eeason3/Bootstrap | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py | 240 | 99242 | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import copy
import hashlib
import json
import multiprocessing
import os.path
import re
import signal
import subprocess
import sys
import gyp
imp... | mit | 1,748,202,850,518,125,300 | 40.506483 | 80 | 0.625038 | false |
2014c2g2/2014c2 | wsgi/static/Brython2.1.0-20140419-113919/Lib/inspect.py | 91 | 78882 | """Get useful information from live Python objects.
This module encapsulates the interface provided by the internal special
attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.
Here are some of the useful functions provided by this module:... | gpl-2.0 | -3,654,882,928,471,189,500 | 37.033751 | 84 | 0.588411 | false |
TheTypoMaster/chromium-crosswalk | build/android/pylib/base/test_dispatcher_unittest.py | 36 | 8197 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unittests for test_dispatcher.py."""
# pylint: disable=R0201
# pylint: disable=W0212
import os
import sys
import unittest
from py... | bsd-3-clause | 5,675,946,476,405,869,000 | 33.012448 | 80 | 0.687935 | false |
kyunghyuncho/GroundHog | tutorials/DT_RNN_Tut_Ex_Pieces.py | 28 | 1136 | ##############
outhid = outhid_dropout(outhid, use_noise=False)
##############
outhid_activ = UnaryOp(activation=eval(state['dout_activ']))
##############
emb_words_out = MultiLayer(
rng,
n_in=state['n_in'],
n_hids=eval(state['dout_nhid']),
activation=linear,
init_fn='sample_weights_classic',
... | bsd-3-clause | -7,631,969,955,045,318,000 | 24.818182 | 62 | 0.591549 | false |
DarkmatterVale/Haiku-Configuration-Repo | hello/models.py | 1 | 2729 | from django.db import models
from django.contrib.auth.models import User
class Component(models.Model):
name = models.CharField(default='', max_length=200)
notes = models.CharField(default='', max_length=500)
is_working = models.CharField(default='', max_length=10)
rating = models.CharField(default=''... | mit | -3,847,663,396,861,831,000 | 46.894737 | 74 | 0.700989 | false |
wgcv/SWW-Crashphone | lib/python2.7/site-packages/django/contrib/sessions/tests.py | 31 | 22770 | import base64
from datetime import timedelta
import os
import shutil
import string
import tempfile
import unittest
import warnings
from django.conf import settings
from django.contrib.sessions.backends.db import SessionStore as DatabaseSession
from django.contrib.sessions.backends.cache import SessionStore as CacheSes... | apache-2.0 | -3,112,168,473,351,696,400 | 37.204698 | 128 | 0.655512 | false |
TornikeNatsvlishvili/GeorgianAutoComplete | backend/app.py | 1 | 1103 | from flask import Flask, request, jsonify
import heapq
import logging
import trie
server = Flask(__name__, static_url_path='')
LOGGING_FILE_NAME = 'log.txt'
NUM_SUGGESTIONS_TO_RETURN = 10
single_word_trie = None
def init():
global single_word_trie
logging.basicConfig(filename=LOGGING_FILE_NAME, level=logging... | mit | 7,769,961,423,434,837,000 | 25.926829 | 112 | 0.679964 | false |
handspring/bite-project | tools/bugs/server/appengine/handlers/bugs/create.py | 17 | 2214 | # Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -2,026,380,078,236,471,300 | 30.183099 | 78 | 0.686992 | false |
uber/pyro | tests/contrib/gp/test_models.py | 1 | 15173 | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import logging
from collections import namedtuple
import pytest
import torch
import pyro.distributions as dist
from pyro.contrib.gp.kernels import Cosine, Matern32, RBF, WhiteNoise
from pyro.contrib.gp.likelihoods import Gaussian... | apache-2.0 | -4,389,233,313,417,823,000 | 33.641553 | 94 | 0.622883 | false |
crowdworks/redash | redash/handlers/embed.py | 4 | 3657 | from __future__ import absolute_import
import logging
import time
import pystache
from flask import request
from .authentication import current_org
from flask_login import current_user, login_required
from flask_restful import abort
from redash import models, utils
from redash.handlers import routes
from redash.handl... | bsd-2-clause | -9,171,818,190,971,916,000 | 35.207921 | 113 | 0.634126 | false |
dolph/keystone-workout | keystoneworkout/cli/subcommands.py | 1 | 8625 | # 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
# distributed under t... | apache-2.0 | 9,194,749,855,270,978,000 | 30.826568 | 79 | 0.57113 | false |
alfredodeza/boto | boto/manage/volume.py | 153 | 16296 | # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | mit | 3,173,922,511,789,879,300 | 37.8 | 117 | 0.580633 | false |
jordiclariana/ansible | lib/ansible/modules/cloud/openstack/os_stack.py | 27 | 9090 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2016, Mathieu Bultel <mbultel@redhat.com>
# (c) 2016, Steve Baker <sbaker@redhat.com>
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version ... | gpl-3.0 | 254,592,392,722,775,520 | 33.044944 | 109 | 0.587349 | false |
alexsavio/scikit-learn | sklearn/gaussian_process/gpr.py | 13 | 18747 | """Gaussian processes regression. """
# Authors: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import warnings
from operator import itemgetter
import numpy as np
from scipy.linalg import cholesky, cho_solve, solve_triangular
from scipy.optimize import fmin_l_bfgs_b
from sklearn.base im... | bsd-3-clause | -1,013,684,737,172,946,600 | 42.195853 | 79 | 0.593802 | false |
jaysonsantos/python-binary-memcached | test/test_auth.py | 1 | 2626 | import os
import unittest
import six
import bmemcached
from bmemcached.exceptions import AuthenticationNotSupported, InvalidCredentials, MemcachedException
if six.PY3:
from unittest import mock
else:
import mock
class TestServerAuth(unittest.TestCase):
@mock.patch.object(bmemcached.protocol.Protocol, '... | mit | 6,193,507,469,706,640,000 | 40.03125 | 100 | 0.649276 | false |
sovietspy2/uzletiProject | python/Lib/encodings/charmap.py | 103 | 2153 | """ Generic Python Character Mapping Codec.
Use this codec directly rather than through the automatic
conversion mechanisms supplied by unicode() and .encode().
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import codecs
### Cod... | gpl-3.0 | -2,366,965,947,977,882,000 | 29.202899 | 73 | 0.673479 | false |
samueldotj/TeeRISC-Simulator | tests/configs/realview-simple-timing.py | 6 | 2284 | # Copyright (c) 2012 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | bsd-3-clause | 388,707,909,129,281,400 | 53.380952 | 76 | 0.784151 | false |
pmeier82/spike_gnode | demo/forms.py | 1 | 1639 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.forms.formsets import BaseFormSet, formset_factory
from bootstrap3.tests import TestForm
RADIO_CHOICES = (
('1', 'Radio 1'),
('2', 'Radio 2'),
)
MEDIA_CHOICES = (
('Audio', (
('vinyl', 'Vinyl'),
... | bsd-3-clause | -7,188,622,172,614,896,000 | 23.462687 | 97 | 0.607077 | false |
Lanozavr/pvs | python/src/ui/mmgr.py | 4 | 9888 |
# This class manages all the menu items in the main menu of the editor
import wx
from constants import *
from evhdlr import *
import util
import logging
from preference import Preferences
from wx.lib.pubsub import setupkwargs, pub
import pvscomm
class MainFrameMenu(wx.MenuBar):
"""The class implementing and man... | gpl-2.0 | -8,416,605,621,835,454,000 | 46.311005 | 140 | 0.645934 | false |
Vishluck/sympy | sympy/physics/quantum/matrixcache.py | 124 | 3519 | """A cache for storing small matrices in multiple formats."""
from __future__ import print_function, division
from sympy import Matrix, I, Pow, Rational, exp, pi
from sympy.physics.quantum.matrixutils import (
to_sympy, to_numpy, to_scipy_sparse
)
class MatrixCache(object):
"""A cache for small matrices in... | bsd-3-clause | 6,685,193,551,654,197,000 | 33.5 | 77 | 0.574595 | false |
lcweb/node-oauth | node_modules/grunt/node_modules/gzip-js/node_modules/deflate-js/test/deflate.py | 177 | 2329 | import os
from colorama import Fore
from helpers import deflate, inflate, run_cmd
outDirDefault = 'test-outs'
testDirDefault = 'test-files'
"""
Run a single test
@param tFile- required; the full path to the file to run
@param level- optional (default: all); the compression level [1-9]
@param delete- optional (defaul... | mit | 5,035,441,041,865,910,000 | 28.1125 | 136 | 0.689137 | false |
pombredanne/numba | numba/cuda/tests/cudadrv/test_cuda_array_slicing.py | 6 | 2372 | from __future__ import print_function
import numpy as np
from numba import cuda
from numba.cuda.testing import unittest
class CudaArrayIndexing(unittest.TestCase):
def test_index_1d(self):
arr = np.arange(10)
darr = cuda.to_device(arr)
for i in range(arr.size):
self.assertEqual... | bsd-2-clause | -1,411,934,592,950,291,200 | 31.054054 | 73 | 0.534992 | false |
gangadhar-kadam/mic-erpnext | accounts/report/accounts_receivable/accounts_receivable.py | 5 | 5040 | from __future__ import unicode_literals
import webnotes
from webnotes import msgprint, _
from webnotes.utils import getdate, nowdate, flt, cstr
def execute(filters=None):
if not filters: filters = {}
columns = get_columns()
entries = get_gl_entries(filters)
entries_after_report_date = [[gle.voucher_type, gle.vou... | agpl-3.0 | 2,355,401,568,145,053,700 | 36.340741 | 88 | 0.682738 | false |
VikramShetty/google-diff-match-patch | python2/diff_match_patch.py | 337 | 67934 | #!/usr/bin/python2.4
from __future__ import division
"""Diff Match and Patch
Copyright 2006 Google Inc.
http://code.google.com/p/google-diff-match-patch/
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 Lice... | apache-2.0 | -7,892,302,318,778,395,000 | 34.40073 | 80 | 0.59549 | false |
d2bit/compose | compose/cli/log_printer.py | 21 | 2616 | from __future__ import unicode_literals
from __future__ import absolute_import
import sys
from itertools import cycle
from .multiplexer import Multiplexer
from . import colors
from .utils import split_buffer
class LogPrinter(object):
def __init__(self, containers, attach_params=None, output=sys.stdout, monochro... | apache-2.0 | -3,174,266,630,513,536,000 | 31.296296 | 92 | 0.606651 | false |
jaggu303619/asylum | openerp/addons/account/wizard/account_tax_chart.py | 51 | 3332 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -4,280,122,707,534,416,000 | 41.126582 | 110 | 0.561599 | false |
mikelarre/odoomrp-wip-1 | warning_log/models/warning.py | 2 | 6419 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
#
# 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 ... | agpl-3.0 | -7,234,104,609,690,881,000 | 41.230263 | 78 | 0.561458 | false |
ejpbruel/servo | tests/wpt/web-platform-tests/tools/pytest/testing/test_junitxml.py | 166 | 27154 | # -*- coding: utf-8 -*-
from xml.dom import minidom
from _pytest.main import EXIT_NOTESTSCOLLECTED
import py
import sys
import os
from _pytest.junitxml import LogXML
import pytest
def runandparse(testdir, *args):
resultpath = testdir.tmpdir.join("junit.xml")
result = testdir.runpytest("--junitxml=%s" % resul... | mpl-2.0 | 7,721,976,258,529,944,000 | 32.265931 | 79 | 0.576533 | false |
chauhanmohit/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py | 121 | 13839 | # Copyright (C) 2011, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... | bsd-3-clause | -2,344,811,317,096,883,700 | 49.507299 | 149 | 0.648891 | false |
samuelhavron/heroku-buildpack-python | Python-3.4.3/Lib/distutils/tests/test_build.py | 147 | 1919 | """Tests for distutils.command.build."""
import unittest
import os
import sys
from test.support import run_unittest
from distutils.command.build import build
from distutils.tests import support
from sysconfig import get_platform
class BuildTestCase(support.TempdirManager,
support.LoggingSilencer,
... | mit | -8,986,691,140,592,594,000 | 33.890909 | 77 | 0.64148 | false |
dwnld/thrift | contrib/fb303/py/setup.py | 67 | 1629 | #!/usr/bin/env python
#
# 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
# "L... | apache-2.0 | 6,503,494,003,974,539,000 | 32.244898 | 64 | 0.683241 | false |
denny820909/builder | lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/words/xish/xpath.py | 67 | 9290 | # -*- test-case-name: twisted.words.test.test_xpath -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
XPath query support.
This module provides L{XPathQuery} to match
L{domish.Element<twisted.words.xish.domish.Element>} instances against
XPath-like expressions.
"""
try:
import cSt... | mit | -3,427,233,356,405,903,400 | 26.897898 | 79 | 0.585468 | false |
andresgz/django | django/contrib/gis/utils/layermapping.py | 335 | 27300 | # LayerMapping -- A Django Model/OGR Layer Mapping Utility
"""
The LayerMapping class provides a way to map the contents of OGR
vector files (e.g. SHP files) to Geographic-enabled Django models.
For more information, please consult the GeoDjango documentation:
https://docs.djangoproject.com/en/dev/ref/contrib/gi... | bsd-3-clause | -6,452,305,376,381,567,000 | 42.54067 | 118 | 0.574212 | false |
RI-imaging/nrefocus | docs/conf.py | 1 | 4846 | # -*- coding: utf-8 -*-
#
# project documentation build configuration file, created by
# sphinx-quickstart on Sat Feb 22 09:35:49 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | bsd-3-clause | -3,984,860,011,925,307,000 | 31.086093 | 83 | 0.639422 | false |
Chilledheart/depot_tools | tests/download_from_google_storage_unittests.py | 20 | 10966 | #!/usr/bin/env 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.
# pylint: disable=W0212
"""Unit tests for download_from_google_storage.py."""
import optparse
import os
import Queue
import shutil... | bsd-3-clause | -2,016,420,420,946,737,200 | 36.172881 | 79 | 0.65621 | false |
NERC-CEH/jules-jasmin | majic/joj/websetup_watch_driving_dataset.py | 1 | 9887 | """
# Majic
# Copyright (C) 2014 CEH
#
# 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 pr... | gpl-2.0 | -5,249,293,521,845,372,000 | 48.189055 | 120 | 0.616163 | false |
pmisik/buildbot | master/buildbot/process/build.py | 2 | 32806 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | -4,814,507,617,775,266,000 | 40.844388 | 98 | 0.620313 | false |
hackshel/py-aluminium | src/__furture__/simplepool.py | 2 | 3289 | #!/usr/bin/env python
"""simple thread pool
@author: dn13(dn13@gmail.com)
@author: Fibrizof(dfang84@gmail.com)
"""
import threading
import Queue
import new
def WorkerPoolError( Exception ):
pass
class Task(threading.Thread):
def __init__(self, queue, result_queue):
threading.Thread.__init__(self)
... | bsd-3-clause | -8,035,226,930,779,316,000 | 21.598592 | 75 | 0.477096 | false |
hyowon/servo | tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resource.py | 113 | 6305 | import os
import re
def main(request, response):
type = request.GET['type']
encoding = request.GET['encoding']
# We want the raw input for 'q'
q = re.search(r'q=([^&]+)', request.url_parts.query).groups()[0]
if type == 'html':
return [("Content-Type", "text/html; charset=utf-8")], q
eli... | mpl-2.0 | 4,283,902,781,379,683,000 | 47.129771 | 146 | 0.462807 | false |
deKupini/erp | addons/l10n_in_hr_payroll/report/payslip_report.py | 8 | 3911 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 | -5,778,075,207,243,640,000 | 45.011765 | 107 | 0.515469 | false |
indie1982/osmc-fixes | package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x054.py | 251 | 4583 | data = (
'Mie ', # 0x00
'Xu ', # 0x01
'Mang ', # 0x02
'Chi ', # 0x03
'Ge ', # 0x04
'Xuan ', # 0x05
'Yao ', # 0x06
'Zi ', # 0x07
'He ', # 0x08
'Ji ', # 0x09
'Diao ', # 0x0a
'Cun ', # 0x0b
'Tong ', # 0x0c
'Ming ', # 0x0d
'Hou ', # 0x0e
'Li ', # 0x0f
'Tu ', # 0x10
'Xiang ... | gpl-2.0 | -6,180,879,606,491,094,000 | 16.763566 | 19 | 0.382064 | false |
dgrat/ardupilot | Tools/LogAnalyzer/LogAnalyzer.py | 63 | 12567 | #!/usr/bin/env python
#
# A module to analyze and identify any common problems which can be determined from log files
#
# Initial code by Andrew Chapman (amchapman@gmail.com), 16th Jan 2014
#
# some logging oddities noticed while doing this, to be followed up on:
# - tradheli MOT labels Mot1,Mot2,Mot3,Mot4,GGain
# ... | gpl-3.0 | -145,619,501,923,026,940 | 46.965649 | 179 | 0.605713 | false |
fbossy/SickRage | tornado/test/twisted_test.py | 18 | 25239 | # Author: Ovidiu Predescu
# Date: July 2011
#
# 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 ... | gpl-3.0 | 8,122,983,443,510,473,000 | 35.737991 | 82 | 0.634019 | false |
pedropena/iteexe | twisted/test/test_defer.py | 14 | 20998 |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for defer module.
"""
from __future__ import nested_scopes
from twisted.trial import unittest, util
from twisted.internet import reactor, defer
from twisted.python import failure, log
class GenericError(Exception): ... | gpl-2.0 | -6,722,740,205,430,782,000 | 31.707165 | 124 | 0.597819 | false |
mozilla/normandy | normandy/studies/migrations/0004_auto_20190115_0812.py | 1 | 1814 | # Generated by Django 2.0.9 on 2019-01-15 08:12
import hashlib
import json
import untangle
import zipfile
from django.core.files.storage import default_storage
from django.db import migrations
def populate_metadata(apps, schema_editor):
Extension = apps.get_model("studies", "Extension")
for extension in Ext... | mpl-2.0 | 5,356,067,160,852,254,000 | 34.568627 | 89 | 0.566703 | false |
PrashantKuntala/Machine-Learning | Feature Selection/scripts/pearsonFilter.py | 1 | 1377 | #!/usr/bin/python
#
# author : prashant kuntala
# date : 31th October,2016
# last modified : 11/4/16
# script that takes feature file and ranks the features based on Pearson Correlation.
from __future__ import division
import os
import numpy as np
import scipy.stats
# reading the data file into an array
data = np... | mit | 6,336,525,894,964,237,000 | 24.981132 | 85 | 0.699346 | false |
IronLanguages/ironpython2 | Src/StdLib/Lib/test/test_glob.py | 4 | 6944 | import glob
import os
import shutil
import sys
import unittest
from test.test_support import run_unittest, TESTFN
def fsdecode(s):
return unicode(s, sys.getfilesystemencoding())
class GlobTests(unittest.TestCase):
def norm(self, *parts):
return os.path.normpath(os.path.join(self.tempdir, *parts))
... | apache-2.0 | 8,587,466,239,934,903,000 | 37.364641 | 79 | 0.52621 | false |
anthonyalmarza/hendrix | setup.py | 1 | 1886 | from hendrix import __version__
import errno
import os
import sys
from setuptools import setup, find_packages
def file_name(rel_path):
dir_path = os.path.dirname(__file__)
return os.path.join(dir_path, rel_path)
def read(rel_path):
with open(file_name(rel_path)) as f:
return f.read()
def readl... | mit | 4,938,128,152,556,787,000 | 24.835616 | 68 | 0.612937 | false |
t794104/ansible | test/units/modules/remote_management/lxca/test_lxca_cmms.py | 43 | 4394 | import json
import pytest
from units.compat import mock
from ansible.modules.remote_management.lxca import lxca_cmms
@pytest.fixture(scope='module')
@mock.patch("ansible.module_utils.remote_management.lxca.common.close_conn", autospec=True)
def setup_module(close_conn):
close_conn.return_value = True
class Tes... | gpl-3.0 | 5,848,741,267,391,153,000 | 45.744681 | 97 | 0.546655 | false |
pdeesawat/PSIT58_test_01 | Test_Python_code/final_code/Malaysia/earthquake.py | 1 | 2089 | import plotly.plotly as py
import plotly.graph_objs as go
#Get data
data = open('Real_Final_database_02.csv')
alldata = data.readlines()
listdata = []
for i in alldata:
listdata.append(i.strip().split(','))
#Seperate information
year = []
affect = []
damage = []
death =[]
for j in listdata:
if j[0] == 'Malays... | apache-2.0 | -7,192,123,759,008,543,000 | 20.10101 | 51 | 0.526089 | false |
scrollback/kuma | vendor/packages/sqlalchemy/test/perf/masseagerload.py | 7 | 1564 | from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.test import profiling
NUM = 500
DIVISOR = 50
engine = create_engine('sqlite://')
meta = MetaData(engine)
items = Table('items', meta,
Column('item_id', Integer, primary_key=True),
Column('value', String(100)))
subitems =... | mpl-2.0 | 1,523,309,820,638,129,400 | 27.962963 | 80 | 0.581841 | false |
scripteed/mtasa-blue | vendor/google-breakpad/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_output_unittest.py | 306 | 9711 | #!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | gpl-3.0 | -48,976,319,838,377,160 | 42.352679 | 188 | 0.674081 | false |
rubencabrera/odoo | addons/l10n_be/wizard/l10n_be_account_vat_declaration.py | 309 | 10685 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# Adapted by Noviat to
# - enforce correct vat number
# - support negative balance
# - assign... | agpl-3.0 | -4,934,073,198,748,646,000 | 48.929907 | 196 | 0.556855 | false |
hhaoyan/keras | keras/layers/noise.py | 66 | 1791 | from __future__ import absolute_import
import numpy as np
from .core import MaskedLayer
import theano
import theano.tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
class GaussianNoise(MaskedLayer):
'''
Corruption process with GaussianNoise
'''
def __init__(self, s... | mit | -6,370,392,620,268,074,000 | 32.792453 | 122 | 0.598548 | false |
cxxgtxy/tensorflow | tensorflow/contrib/tensor_forest/hybrid/python/models/forest_to_data_then_nn_test.py | 159 | 3275 | # 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 | -7,586,365,249,513,438,000 | 35.797753 | 88 | 0.690992 | false |
ldoktor/autotest | client/fsdev_disks.py | 2 | 20751 | import sys, os, re
from autotest.client import utils, fsinfo, fsdev_mgr, partition
from autotest.client.shared import error
fd_mgr = fsdev_mgr.FsdevManager()
# For unmounting / formatting file systems we may have to use a device name
# that is different from the real device name that we have to use to set I/O
# sche... | gpl-2.0 | 2,685,340,555,410,013,700 | 34.839378 | 80 | 0.562093 | false |
chyeh727/django | django/db/__init__.py | 376 | 2322 | from django.core import signals
from django.db.utils import (
DEFAULT_DB_ALIAS, DJANGO_VERSION_PICKLE_KEY, ConnectionHandler,
ConnectionRouter, DatabaseError, DataError, Error, IntegrityError,
InterfaceError, InternalError, NotSupportedError, OperationalError,
ProgrammingError,
)
__all__ = [
'backe... | bsd-3-clause | -374,912,592,435,190,500 | 34.181818 | 79 | 0.727821 | false |
Ayrx/cryptography | src/_cffi_src/commoncrypto/common_digest.py | 10 | 1574 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
INCLUDES = """
#include <CommonCrypto/CommonDigest.h>
"""
TYPES = """
ty... | bsd-3-clause | 2,467,521,152,098,500,600 | 26.137931 | 79 | 0.679161 | false |
telwertowski/QGIS | tests/src/python/test_authmanager_pki_ows.py | 15 | 7719 | # -*- coding: utf-8 -*-
"""
Tests for auth manager WMS/WFS using QGIS Server through PKI
enabled qgis_wrapped_server.py.
This is an integration test for QGIS Desktop Auth Manager WFS and WMS provider
and QGIS Server WFS/WMS that check if QGIS can use a stored auth manager auth
configuration to access an HTTP Basic pro... | gpl-2.0 | -1,031,468,942,315,780,000 | 35.913876 | 161 | 0.617628 | false |
abhishekgahlot/flask | scripts/flaskext_compat.py | 6 | 5023 | # -*- coding: utf-8 -*-
"""
flaskext_compat
~~~~~~~~~~~~~~~
Implements the ``flask.ext`` virtual package for versions of Flask
older than 0.7. This module is a noop if Flask 0.8 was detected.
Usage::
import flaskext_compat
flaskext_compat.activate()
from flask.ext import ... | bsd-3-clause | -4,371,498,490,624,173,000 | 39.184 | 78 | 0.596456 | false |
blueboxgroup/nova | doc/source/conf.py | 13 | 9460 | # -*- coding: utf-8 -*-
#
# nova documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
# This file is execfile()d with the current directory set to
# its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | apache-2.0 | -3,720,759,975,768,422,000 | 33.652015 | 84 | 0.680338 | false |
funkyfuture/inxs | docs/conf.py | 1 | 8439 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
# Insert the project root dir as the first element in the PYTHONPATH.
# This lets us ensure that the source package is imported, and tha... | agpl-3.0 | 7,688,856,309,707,163,000 | 28.714789 | 83 | 0.683019 | false |
VeritasOS/cloud-custodian | c7n/executor.py | 2 | 2908 | # Copyright 2016 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | -6,002,800,774,975,796,000 | 25.678899 | 82 | 0.654402 | false |
SatoshiNXSimudrone/sl4a-damon-clone | python-build/python-libs/gdata/samples/oauth/oauth_on_appengine/appengine_utilities/cron.py | 129 | 18386 | """
Copyright (c) 2008, appengine-utilities project
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 ... | apache-2.0 | 672,776,900,727,331,000 | 35.919679 | 86 | 0.528826 | false |
akshaynathr/mailman | src/mailman/commands/eml_help.py | 3 | 3002 | # Copyright (C) 2012 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 opt... | gpl-3.0 | 6,177,972,270,006,929,000 | 36.061728 | 79 | 0.643571 | false |
credativ/pulp | client_lib/pulp/client/extensions/loader.py | 15 | 8665 | # -*- coding: utf-8 -*-
"""
Functionality related to loading extensions from a set location. The client
context is constructed ahead of time and provided to this module, which
then uses it to instantiate the extension components.
"""
import copy
from gettext import gettext as _
import logging
import os
import sys
im... | gpl-2.0 | -877,393,601,959,302,100 | 33.66 | 99 | 0.663358 | false |
JohnDenker/brython | www/src/Lib/unittest/signals.py | 1016 | 2403 | import signal
import weakref
from functools import wraps
__unittest = True
class _InterruptHandler(object):
def __init__(self, default_handler):
self.called = False
self.original_handler = default_handler
if isinstance(default_handler, int):
if default_handler == signal.SIG_D... | bsd-3-clause | 8,307,045,623,747,137,000 | 32.84507 | 75 | 0.605909 | false |
ealgis/ealgis | django/ealgis/ealauth/migrations/0009_auto_20170112_0911.py | 2 | 1405 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-12 09:11
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ealauth', '0008_auto_20161217_1337'),
]
operations = [
migrations.AlterUniqueTogeth... | gpl-3.0 | -885,091,823,587,835,800 | 25.018519 | 49 | 0.535943 | false |
dreamhost/ceilometer | ceilometer/objectstore/swift_middleware.py | 1 | 5594 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 eNovance <licensing@enovance.com>
#
# Author: Julien Danjou <julien@danjou.info>
#
# 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 Lice... | apache-2.0 | -7,225,466,726,738,422,000 | 31.517442 | 79 | 0.585375 | false |
williamfeng323/py-web | flask/lib/python3.6/site-packages/alembic/ddl/mysql.py | 13 | 12426 | from sqlalchemy.ext.compiler import compiles
from sqlalchemy import types as sqltypes
from sqlalchemy import schema
from ..util.compat import string_types
from .. import util
from .impl import DefaultImpl
from .base import ColumnNullable, ColumnName, ColumnDefault, \
ColumnType, AlterColumn, format_column_name, \
... | mit | -5,609,473,575,325,214,000 | 36.427711 | 79 | 0.561806 | false |
cnsoft/kbengine-cocos2dx | kbe/src/lib/python/Lib/test/test_cmd_line_script.py | 6 | 14270 | # tests command line execution of scripts
import unittest
import sys
import os
import os.path
import py_compile
from test import support
from test.script_helper import (
make_pkg, make_script, make_zip_pkg, make_zip_script,
assert_python_ok, assert_python_failure, temp_dir)
verbose = support.verbose
example... | lgpl-3.0 | 1,744,764,643,480,092,700 | 42.773006 | 106 | 0.572249 | false |
x111ong/django | django/core/handlers/wsgi.py | 339 | 9181 | from __future__ import unicode_literals
import cgi
import codecs
import logging
import sys
from io import BytesIO
from threading import Lock
from django import http
from django.conf import settings
from django.core import signals
from django.core.handlers import base
from django.core.urlresolvers import set_script_pr... | bsd-3-clause | 8,326,224,510,728,157,000 | 35.577689 | 102 | 0.611698 | false |
nordri/check_domains | lib/python2.7/site-packages/django/contrib/gis/db/backends/oracle/introspection.py | 79 | 1925 | import cx_Oracle
import sys
from django.db.backends.oracle.introspection import DatabaseIntrospection
from django.utils import six
class OracleIntrospection(DatabaseIntrospection):
# Associating any OBJECTVAR instances with GeometryField. Of course,
# this won't work right on Oracle objects that aren't MDSYS... | gpl-3.0 | 6,548,884,300,545,385,000 | 41.777778 | 131 | 0.588052 | false |
skython/eXe | exe/webui/appletblock.py | 2 | 7890 | # ===========================================================================
# eXe
# Copyright 2004-2005, University of Auckland
# Copyright 2004-2007 eXe Project http://eXeLearning.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | gpl-2.0 | 1,537,752,448,783,937,300 | 37.676471 | 101 | 0.517617 | false |
sauloal/pycluster | pypy-1.9_64/lib-python/2.7/unittest/test/test_discovery.py | 45 | 13032 | import os
import re
import sys
import unittest
class TestDiscovery(unittest.TestCase):
# Heavily mocked tests so I can avoid hitting the filesystem
def test_get_name_from_path(self):
loader = unittest.TestLoader()
loader._top_level_dir = '/foo'
name = loader._get_name_from_path('/fo... | mit | -7,284,816,298,653,743,000 | 35 | 91 | 0.575813 | false |
chiviak/CouchPotatoServer | libs/pyutil/test/current/test_iputil.py | 106 | 1287 | #!/usr/bin/env python
try:
from twisted.trial import unittest
unittest # http://divmod.org/trac/ticket/1499
except ImportError, le:
print "Skipping test_iputil since it requires Twisted and Twisted could not be imported: %s" % (le,)
else:
from pyutil import iputil, testutil
import re
DOTTED_QU... | gpl-3.0 | -3,031,319,074,144,863,700 | 38 | 145 | 0.604507 | false |
laperry1/android_external_chromium_org | tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py | 25 | 17290 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import pipes
import re
import subprocess
import sys
import time
from telemetry.core import exceptions
from telemetry.core import fo... | bsd-3-clause | 6,408,022,506,997,356,000 | 38.029345 | 80 | 0.664604 | false |
MilaPetrova/python-training-group3 | contact_Dima.py | 1 | 3567 | __author__ = 'Dzmitry'
from model.contact import Group
class ContactHelper:
def __init__(self, app):
self.app = app
def create(self, contact):
wd = self.app.wd
wd.get("http://localhost/addressbook/")
# init new contact creation
wd.find_element_by_link_text("add new").c... | apache-2.0 | -3,630,092,095,431,280,600 | 37.771739 | 110 | 0.606953 | false |
erickt/hue | desktop/core/ext-py/guppy-0.1.10/guppy/heapy/Monitor.py | 37 | 12734 | #._cv_part guppy.heapy.Monitor
import os, pprint, signal, socket, SocketServer, sys, threading, time, traceback
import cPickle as pickle
try:
import readline # Imported to _enable_ command line editing
except ImportError:
pass
import select, Queue
from guppy.heapy.RemoteConstants import *
from guppy.heapy.Co... | apache-2.0 | 6,023,512,965,370,912,000 | 25.529167 | 90 | 0.62981 | false |
henkvos/xhtml2pdf | demo/tgpisa/setup.py | 168 | 2452 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from turbogears.finddata import find_package_data
import os
execfile(os.path.join("tgpisa", "release.py"))
packages=find_packages()
package_data = find_package_data(where='tgpisa',
package='tgpisa')
if os.path.isdir('locales'):
packages.appe... | apache-2.0 | -2,551,769,783,067,074,600 | 30.844156 | 75 | 0.630914 | false |
elliotthill/django-oscar | tests/functional/dashboard/offer_tests.py | 49 | 3843 | from django.core.urlresolvers import reverse
from oscar.test import testcases, factories
from oscar.apps.offer import models
class TestAnAdmin(testcases.WebTestCase):
# New version of offer tests buy using WebTest
is_staff = True
def setUp(self):
super(TestAnAdmin, self).setUp()
self.ran... | bsd-3-clause | 6,953,103,364,318,199,000 | 35.951923 | 73 | 0.625033 | false |
denisKaranja/django-dive-in | karanja_me/polls/views.py | 2 | 1695 | from django.shortcuts import get_object_or_404, render, HttpResponse
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.views import generic
from django.utils import timezone
from .models import Choice, Question
# entry point of the polls app
class Inde... | mit | 8,746,758,442,586,414,000 | 28.224138 | 72 | 0.697935 | false |
Zanzibar82/pelisalacarta | python/main-classic/core/samba.py | 5 | 7516 | # -*- coding: iso-8859-1 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Acceso a directorios con samba
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import logger
import os
import config
... | gpl-3.0 | 6,868,801,339,193,905,000 | 28.072 | 135 | 0.588611 | 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.