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 |
|---|---|---|---|---|---|---|---|---|---|---|
shanemikel/beets | extra/release.py | 24 | 8554 | #!/usr/bin/env python3
"""A utility script for automating the beets release process.
"""
import click
import os
import re
import subprocess
from contextlib import contextmanager
import datetime
BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
CHANGELOG = os.path.join(BASE, 'docs', 'changelog.rst')
... | mit | 7,448,902,146,651,192,000 | 26.242038 | 77 | 0.510638 | false |
kermitfr/kermit-webui | src/webui/scheduler/models.py | 1 | 1725 | '''
Created on Nov 12, 2012
@author: mmornati
'''
from djcelery.models import PeriodicTask, IntervalSchedule
from django.db import models
class TaskScheduler(models.Model):
periodic_task = models.ForeignKey(PeriodicTask)
@staticmethod
def schedule_every(task_name, task, period, every, args=None, kwa... | gpl-3.0 | 9,001,897,786,654,543,000 | 33.52 | 102 | 0.641159 | false |
felipebetancur/numpy | numpy/lib/tests/test_shape_base.py | 44 | 12658 | from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.lib.shape_base import (
apply_along_axis, apply_over_axes, array_split, split, hsplit, dsplit,
vsplit, dstack, kron, tile
)
from numpy.testing import (
run_module_suite, TestCase, assert_, assert_equal, asser... | bsd-3-clause | 1,246,992,711,318,358,300 | 32.575597 | 79 | 0.509401 | false |
indextbag/arsenalsuite | python/apps/farm_stats/farmreport.py | 11 | 5364 |
from blur.Stone import *
from blur.Stonegui import *
from PyQt4.QtCore import *
from blur.defaultdict import *
class FarmReport:
def __init__(self,name):
self.name = name
self.records = RecordList()
self.columns = []
self.headerLabels = []
self.model = None
def generate(self,startDate,endDate):
self.... | gpl-2.0 | 100,529,723,854,904,000 | 38.441176 | 491 | 0.717002 | false |
nitzmahone/ansible | test/units/modules/storage/netapp/test_netapp_e_asup.py | 56 | 7858 | # (c) 2018, NetApp Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import json
from ansible.modules.storage.netapp.netapp_e_asup import Asup
from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args
__metaclass__ = type
from uni... | gpl-3.0 | 7,229,876,532,404,796,000 | 42.414365 | 120 | 0.590736 | false |
masia02/chainer | tests/chainer_tests/optimizers_tests/test_optimizers_by_linear_model.py | 13 | 4116 | import unittest
import numpy as np
import six
import chainer
from chainer import cuda
import chainer.functions as F
from chainer import optimizers
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
class LinearModel(object):
UNIT_NUM = 10
BATCH_SIZE = 32
E... | mit | 3,332,656,179,386,335,700 | 27.783217 | 79 | 0.615646 | false |
prekolna/AlgorithmsGreatestHits | search_algorithms/rselect.py | 2 | 1689 | import math
import random
def rselect(array_to_search, n):
"""
Returns the nth order statistic from the array provided.
"""
return rselect_internal(array_to_search, n, 0, len(array_to_search))
def rselect_internal(search_array, n, start_index, end_index):
"""
Recursively computes the nth order... | mit | 1,694,561,958,122,009,600 | 28.12069 | 79 | 0.605684 | false |
betrisey/home-assistant | homeassistant/components/media_player/snapcast.py | 6 | 3231 | """
Support for interacting with Snapcast clients.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.snapcast/
"""
import logging
import socket
import voluptuous as vol
from homeassistant.components.media_player import (
SUPPORT_VOLUME_MU... | mit | 5,034,449,880,911,987,000 | 27.59292 | 78 | 0.648406 | false |
HM2MC/Webfront | reportlab-2.5/tests/test_platypus_breaking.py | 5 | 10374 | #Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
"""Tests pageBreakBefore, frameBreakBefore, keepWithNext...
"""
__version__='''$Id: test_platypus_breaking.py 3703 2010-04-14 17:13:51Z rgbecker $'''
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocati... | mit | -1,525,761,835,906,517,200 | 44.104348 | 490 | 0.652207 | false |
rwboyer/marilyn-project | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/formatters/_mapping.py | 263 | 5508 | # -*- coding: utf-8 -*-
"""
pygments.formatters._mapping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Formatter mapping defintions. This file is generated by itself. Everytime
you change something on a builtin formatter defintion, run this script from
the formatters folder to update it.
Do not alter the FORMA... | mit | 2,742,865,975,532,099,600 | 58.869565 | 290 | 0.663943 | false |
Jgarcia-IAS/localizacion | openerp/addons-extra/odoo-pruebas/odoo-server/openerp/addons/base/tests/test_api.py | 59 | 17630 |
from openerp import models
from openerp.tools import mute_logger
from openerp.osv.orm import except_orm
from openerp.tests import common
class TestAPI(common.TransactionCase):
""" test the new API of the ORM """
def assertIsRecordset(self, value, model):
self.assertIsInstance(value, models.BaseModel... | agpl-3.0 | -5,340,214,268,252,326,000 | 38.707207 | 91 | 0.607657 | false |
haad/ansible | lib/ansible/modules/network/enos/enos_facts.py | 14 | 15199 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | gpl-3.0 | -4,203,922,445,176,120,300 | 30.018367 | 95 | 0.591552 | false |
alikins/ansible | test/units/modules/network/aruba/test_aruba_command.py | 57 | 4349 | # (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | gpl-3.0 | 914,267,263,835,871,700 | 38.899083 | 98 | 0.655553 | false |
paolodedios/tensorflow | tensorflow/python/ops/ragged/ragged_factory_ops.py | 6 | 15316 | # Copyright 2018 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,152,489,952,701,906,000 | 42.265537 | 89 | 0.671912 | false |
divyang4481/photivo | scons-local-2.2.0/SCons/SConf.py | 7 | 39115 | """SCons.SConf
Autoconf-like configuration support.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"... | gpl-3.0 | 5,041,546,324,769,144,000 | 36.975728 | 107 | 0.583868 | false |
ar7z1/ansible | lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py | 45 | 8151 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata... | gpl-3.0 | 529,082,759,061,568,100 | 36.219178 | 123 | 0.549258 | false |
kislayabhi/pgmpy | pgmpy/models/JunctionTree.py | 1 | 9137 | #!/usr/bin/env python3
from pgmpy.base import UndirectedGraph
from pgmpy.exceptions import CardinalityError
from collections import defaultdict
import numpy as np
class JunctionTree(UndirectedGraph):
"""
Class for representing Junction Tree.
Junction tree is undirected graph where each node represents a... | mit | 8,400,024,964,131,166,000 | 32.591912 | 91 | 0.51089 | false |
ueshin/apache-spark | examples/src/main/python/ml/multilayer_perceptron_classification.py | 27 | 2133 | #
# 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 | -8,999,367,979,361,018,000 | 37.089286 | 98 | 0.728551 | false |
NLeSC/embodied-emotions-scripts | embem/bodyparts/make_body_part_mapping.py | 1 | 2023 | """Make a mapping from body part words to categories.
Make mapping <body part word> -> [historic words] based on Inger Leemans'
clustering.
Usage: python make_body_part_mapping.py
Requires files body_part_clusters_renaissance.csv,
body_part_clusters_classisism.csv, and body_part_clusters_enlightenment.csv to
be in t... | apache-2.0 | 8,523,695,496,334,761,000 | 28.75 | 79 | 0.608008 | false |
epitron/youtube-dl | youtube_dl/extractor/polskieradio.py | 50 | 6668 | # coding: utf-8
from __future__ import unicode_literals
import itertools
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_urllib_parse_unquote,
compat_urlparse
)
from ..utils import (
extract_attributes,
int_or_none,
strip_or_none,
unified_timestamp,
)
... | unlicense | -6,136,740,264,607,030,000 | 35.972222 | 143 | 0.527874 | false |
phenoxim/cinder | cinder/backup/drivers/tsm.py | 4 | 21172 | # Copyright 2013 IBM Corp
# 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 appl... | apache-2.0 | -6,735,286,062,990,707,000 | 37.919118 | 79 | 0.540147 | false |
googleapis/python-compute | google/cloud/compute_v1/services/zones/client.py | 1 | 20310 | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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... | apache-2.0 | 8,675,702,358,126,756,000 | 40.704312 | 106 | 0.614623 | false |
yelizariev/account-financial-tools | __unported__/account_tax_update/model/select_taxes.py | 44 | 3407 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2012 Therp BV (<http://therp.nl>).
# This module copyright (C) 2013 Camptocamp (<http://www.camptocamp.com>).
#
# This program is fr... | agpl-3.0 | 8,396,009,991,247,459,000 | 39.559524 | 78 | 0.565013 | false |
Kalyzee/edx-platform | lms/djangoapps/courseware/tests/test_course_info.py | 49 | 4735 | """
Test the course_info xblock
"""
import mock
from nose.plugins.attrib import attr
from urllib import urlencode
from django.conf import settings
from django.core.urlresolvers import reverse
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from util.date_utils import strftime_localized
from xmodule.modu... | agpl-3.0 | 6,964,415,047,079,912,000 | 39.818966 | 114 | 0.68321 | false |
suncycheng/intellij-community | python/lib/Lib/site-packages/django/contrib/comments/views/moderation.py | 307 | 5037 | from django import template
from django.conf import settings
from django.shortcuts import get_object_or_404, render_to_response
from django.contrib.auth.decorators import login_required, permission_required
from utils import next_redirect, confirmation_view
from django.contrib import comments
from django.contrib.commen... | apache-2.0 | 7,732,639,032,318,813,000 | 30.679245 | 95 | 0.654755 | false |
jeyram/smtes | sites/all/libraries/fckeditor/editor/filemanager/connectors/py/fckconnector.py | 89 | 2686 | #!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | gpl-2.0 | 1,272,957,748,835,924,200 | 27.844444 | 92 | 0.680566 | false |
tdliu/hoop-picks | lib/rsa/_compat.py | 81 | 3890 | # -*- coding: utf-8 -*-
#
# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Un... | apache-2.0 | 8,861,021,726,803,497,000 | 25.277027 | 77 | 0.63641 | false |
lavvy/xbmc | tools/EventClients/examples/python/example_button2.py | 228 | 2074 | #!/usr/bin/python
# This is a simple example showing how you can send a key press event
# to XBMC in a non-queued fashion to achieve a button pressed down
# event i.e. a key press that repeats.
# The repeat interval is currently hard coded in XBMC but that might
# change in the future.
# NOTE: Read the comments in '... | gpl-2.0 | -8,564,324,540,124,046,000 | 27.410959 | 71 | 0.664899 | false |
yujikato/DIRAC | src/DIRAC/ResourceStatusSystem/Utilities/RSSCache.py | 2 | 5865 | """
:mod: RSSCache
Extension of DictCache to be used within RSS
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = '$Id$'
import datetime
import threading
import time
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities.DictCache import... | gpl-3.0 | -2,095,863,789,811,628,800 | 23.3361 | 84 | 0.633248 | false |
OpenOil-UG/aleph | aleph/analyze/regex_entity.py | 1 | 2596 | import re
import logging
from threading import RLock
from itertools import count
from collections import defaultdict
from sqlalchemy.orm import joinedload
from aleph.core import db
from aleph.text import normalize_strong
from aleph.model import Reference, Entity
from aleph.analyze.analyzer import Analyzer
log = logg... | mit | -2,023,235,563,477,382,700 | 28.168539 | 71 | 0.575501 | false |
apollo13/ansible | test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/module_utils/network/vyos/facts/lldp_global/lldp_global.py | 47 | 3926 | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The vyos lldp_global fact class
It is in this file the configuration is collected from the device
for a given resource, parsed, and the facts tree is populated
based on t... | gpl-3.0 | 3,418,385,576,419,272,700 | 32.844828 | 109 | 0.590168 | false |
jrwdunham/old | onlinelinguisticdatabase/tests/functional/test_speakers.py | 1 | 16641 | # 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 | 1,115,147,111,097,894,800 | 45.48324 | 131 | 0.607175 | false |
bsmedberg/socorro | socorro/unittest/cron/sampleapp.py | 16 | 1051 | #!/usr/bin/env python
# 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/.
"""
A sample app that is able to exit and spit out specific messages on stdout
and stderr exactly ... | mpl-2.0 | -720,410,696,225,023,600 | 27.405405 | 74 | 0.650809 | false |
iivic/BoiseStateX | lms/djangoapps/shoppingcart/models.py | 9 | 89079 | """ Models for the shopping cart and assorted purchase types """
from collections import namedtuple
from datetime import datetime
from datetime import timedelta
from decimal import Decimal
import json
import analytics
from io import BytesIO
from django.db.models import Q
import pytz
import logging
import smtplib
impor... | agpl-3.0 | -2,998,263,824,327,978,000 | 39.787088 | 166 | 0.629801 | false |
sxpert/ansible-modules-core | cloud/openstack/os_client_config.py | 75 | 2295 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# 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 3 of the License, or
# (at your option) any late... | gpl-3.0 | 6,739,196,852,783,882,000 | 30.013514 | 83 | 0.696732 | false |
jhseu/tensorflow | tensorflow/python/kernel_tests/record_input_test.py | 30 | 6186 | # 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,773,673,381,558,493,000 | 32.258065 | 80 | 0.615422 | false |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive2/end_to_end_ml/solutions/serving/application/lib/werkzeug/urls.py | 7 | 39322 | # -*- coding: utf-8 -*-
"""
werkzeug.urls
~~~~~~~~~~~~~
``werkzeug.urls`` used to provide several wrapper functions for Python 2
urlparse, whose main purpose were to work around the behavior of the Py2
stdlib and its lack of unicode support. While this was already a somewhat
inconvenient situat... | apache-2.0 | 4,818,498,585,642,058,000 | 33.553603 | 86 | 0.596257 | false |
alphaBenj/zipline | zipline/pipeline/api_utils.py | 4 | 1654 | """
Utilities for creating public APIs (e.g. argument validation decorators).
"""
from zipline.utils.input_validation import preprocess
def restrict_to_dtype(dtype, message_template):
"""
A factory for decorators that restrict Term methods to only be callable on
Terms with a specific dtype.
This is c... | apache-2.0 | 5,438,483,734,019,035,000 | 32.755102 | 79 | 0.623942 | false |
a-parhom/edx-platform | openedx/core/djangoapps/external_auth/tests/test_shib.py | 3 | 30178 | # -*- coding: utf-8 -*-
"""
Tests for Shibboleth Authentication
@jbau
"""
import unittest
from importlib import import_module
from urllib import urlencode
from ddt import ddt, data
from django.conf import settings
from django.http import HttpResponseRedirect
from django.test import TestCase
from django.test.client imp... | agpl-3.0 | -7,099,426,558,321,744,000 | 48.933555 | 118 | 0.605289 | false |
zouyapeng/horizon_change | openstack_dashboard/test/tests/utils.py | 31 | 1368 | # 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 | 5,032,897,742,688,927,000 | 33.2 | 78 | 0.688596 | false |
jaygattuso/set_pattern_finder | sorter.py | 1 | 1359 | import os
import operator
def get_seq(f_path, start, end):
with open(f_path, "rb") as data:
bytes = data.read()
return bytes[start:end]
def get_seq_reversed(f_path, start, end):
with open(f_path, "rb") as data:
bytes = data.read()
bytes = bytes[::-1]
return bytes[start:end]
def process(folder, start=0,... | gpl-3.0 | 7,033,288,415,971,022,000 | 20.919355 | 78 | 0.615158 | false |
sangheestyle/elasticsearch-dsl-py | elasticsearch_dsl_fake/faceted_search.py | 1 | 7770 | from datetime import timedelta, datetime
from six import iteritems, itervalues
from functools import partial
from .search import Search
from .aggs import A
from .utils import AttrDict
from .result import Response
from .query import Q
__all__ = ['FacetedSearch', 'HistogramFacet', 'TermsFacet', 'DateHistogramFacet', 'R... | apache-2.0 | 6,693,925,014,120,659,000 | 27.566176 | 108 | 0.54955 | false |
tomlof/scikit-learn | sklearn/datasets/twenty_newsgroups.py | 31 | 13747 | """Caching loader for the 20 newsgroups text classification dataset
The description of the dataset is available on the official website at:
http://people.csail.mit.edu/jrennie/20Newsgroups/
Quoting the introduction:
The 20 Newsgroups data set is a collection of approximately 20,000
newsgroup documents,... | bsd-3-clause | 5,981,431,855,286,744,000 | 35.464191 | 79 | 0.64014 | false |
kaplun/invenio | modules/websearch/lib/websearch_external_collections_unit_tests.py | 16 | 4127 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2010, 2011, 2013 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
## Li... | gpl-2.0 | -6,180,852,939,487,801,000 | 40.27 | 103 | 0.647686 | false |
CityGenerator/Megacosm-Generator | integration_tests/test_mundaneitems.py | 1 | 1111 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from megacosm.generators import MundaneItem
import unittest2 as unittest
from pprint import pprint
import redis
from config import IntegrationTestConfiguration
class TestMundaneItemIntegration(unittest.TestCase):
def setUp(self):
self.redis = redis.from_ur... | gpl-2.0 | -2,370,052,794,324,904,000 | 30.742857 | 90 | 0.630963 | false |
twig/django-taggit | taggit/south_migrations/0002_unique_tagnames.py | 36 | 2027 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Tag', fields ['name']
db.create_unique('taggit_tag', ['name'])
def back... | bsd-3-clause | -3,490,421,810,255,152,000 | 46.139535 | 174 | 0.558461 | false |
SynapticNulship/Anibots | sim_py/anibots_breve_exp0.py | 1 | 6082 | # Anibots (anigraf robots) physical/visual sim
#
# Copyright (c) 2007-2012 Samuel H. Kenyon. <sam@synapticnulship.com>
# http://synapticnulship.com
# This is open source, made available under the MIT License (see the
# accompanying file LICENSE).
#
# This python script connects my anibots C++ program (with the help of... | mit | 451,751,977,938,320,640 | 32.60221 | 119 | 0.677573 | false |
lancezlin/ml_template_py | lib/python2.7/site-packages/IPython/utils/tests/test_importstring.py | 35 | 1247 | """Tests for IPython.utils.importstring."""
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------... | mit | 6,173,793,511,771,363,000 | 30.974359 | 78 | 0.437049 | false |
intel-analytics/analytics-zoo | pyzoo/test/zoo/chronos/model/forecast/test_tcmf_forecaster.py | 1 | 14341 | #
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | -3,451,015,139,734,833,700 | 46.486755 | 99 | 0.607907 | false |
tod31/pyload | module/lib/beaker/ext/database.py | 46 | 6000 | import cPickle
import logging
import pickle
from datetime import datetime
from beaker.container import OpenResourceNamespaceManager, Container
from beaker.exceptions import InvalidCacheBackendError, MissingCacheParameter
from beaker.synchronization import file_synchronizer, null_synchronizer
from beaker.util import ve... | gpl-3.0 | 5,639,595,611,823,150,000 | 35.363636 | 87 | 0.552 | false |
havatv/QGIS | tests/src/python/test_qgsfieldmappingwidget.py | 30 | 13209 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsFieldMapping widget and model.
.. note:: 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 lat... | gpl-2.0 | 523,796,389,606,779,200 | 45.347368 | 118 | 0.638504 | false |
bixbydev/Bixby | google/dist/gdata-2.0.18/tests/gdata_tests/spreadsheets/data_test.py | 23 | 29150 | #!/usr/bin/env python
#
# Copyright (C) 2009 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 ... | gpl-3.0 | -4,184,402,483,841,609,000 | 40.882184 | 79 | 0.673413 | false |
tomv564/LSP | tests/test_configurations.py | 1 | 3675 | from LSP.plugin.core.configurations import ConfigManager
from LSP.plugin.core.configurations import is_supported_syntax
from LSP.plugin.core.configurations import WindowConfigManager
from test_mocks import MockView
from test_mocks import MockWindow
from test_mocks import TEST_CONFIG, DISABLED_CONFIG
from test_mocks imp... | mit | -1,186,141,084,797,502,500 | 34.336538 | 91 | 0.626939 | false |
smspillaz/artificial-intelligence | tests/knapsack_test.py | 1 | 2053 | # /tests/knapsack_test.py
#
# Test cases for artificialintelligence.knapsack
#
# See LICENCE.md for Copyright information
"""Test cases for usage of polysquarecmakelinter.main()."""
from artificialintelligence.knapsack import (knapsack,
items_for_knapsack)
from nose_parame... | mit | -8,818,266,844,360,322,000 | 28.328571 | 84 | 0.577204 | false |
zamattiac/osf.io | framework/postcommit_tasks/handlers.py | 1 | 2700 | # -*- coding: utf-8 -*-
import functools
import hashlib
import logging
import threading
import binascii
from collections import OrderedDict
import os
from celery.local import PromiseProxy
from gevent.pool import Pool
from website import settings
_local = threading.local()
logger = logging.getLogger(__name__)
def po... | apache-2.0 | -2,392,158,319,296,812,500 | 34.064935 | 98 | 0.657407 | false |
ISA-tools/bii-webapp | bii_webapp/apps/browse/urls.py | 1 | 2197 | from django.conf.urls import patterns, url
from views import *
from django.views.generic.base import RedirectView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', browse,name='browse.browse... | mit | -1,855,626,403,353,748,200 | 59.027778 | 142 | 0.514338 | false |
mou4e/zirconium | tools/telemetry/telemetry/util/path.py | 13 | 1600 | # Copyright 2014 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 os
from telemetry.core import util
# TODO(dtu): Move these functions from core.util to here.
GetBaseDir = util.GetBaseDir
GetTelemetryDir = util.Ge... | bsd-3-clause | 2,108,918,166,511,178,000 | 28.090909 | 78 | 0.728125 | false |
Zhongqilong/mykbengineer | kbe/src/lib/python/Lib/test/test_weakset.py | 86 | 15546 | import unittest
from test import support
from weakref import proxy, ref, WeakSet
import operator
import copy
import string
import os
from random import randrange, shuffle
import sys
import warnings
import collections
from collections import UserString as ustr
import gc
import contextlib
class Foo:
pass
class Ref... | lgpl-3.0 | 8,036,661,379,808,338,000 | 33.546667 | 81 | 0.567927 | false |
civisanalytics/ansible | lib/ansible/plugins/cache/memcached.py | 46 | 6133 | # (c) 2014, Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | gpl-3.0 | -5,988,151,207,353,509,000 | 29.974747 | 96 | 0.621719 | false |
klmitch/neutron | neutron/quota/__init__.py | 5 | 13086 | # Copyright (c) 2015 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 | -897,353,543,936,886,100 | 39.264615 | 79 | 0.629375 | false |
google/language-resources | festival_utils/festival_prompts_from_tsv.py | 2 | 1218 | #! /usr/bin/env python
# Copyright 2016, 2017 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 re... | apache-2.0 | -1,791,926,198,499,103,200 | 30.230769 | 74 | 0.69376 | false |
marcellodesales/svnedge-console | ext/solaris-sparc/pkg-toolkit/pkg/vendor-packages/pkg/client/image.py | 4 | 127776 | #!/usr/bin/python2.4
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://w... | agpl-3.0 | -9,001,017,668,164,328,000 | 45.667641 | 92 | 0.444043 | false |
DaniilLeksin/theblog | env/lib/python2.7/site-packages/django/contrib/gis/tests/gis_migrations/test_operations.py | 9 | 4776 | from __future__ import unicode_literals
from unittest import skipUnless
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql
from django.db import connection, migrations, models
from django.db.migrations.migration import Migration
from django.db.migrations.state import ProjectState
from django.test import... | gpl-2.0 | -1,516,915,852,004,003,300 | 37.208 | 98 | 0.649079 | false |
kobejean/tensorflow | tensorflow/python/debug/cli/cli_config_test.py | 68 | 5541 | # 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 | 6,307,184,653,127,392,000 | 39.445255 | 80 | 0.700596 | false |
extremenetworks/xkit | EXOS/Python/mibview/mibview.py | 2 | 1758 | #!/usr/bin/env python2.7
# usage: mibview.py [-h] mibString
#
# Convert wildcarded OID MIB views into OID/mask format as used by EXOS.
#
# positional arguments:
# mibString Wildcard MIB string to be translated into OID/mask format
#
# optional arguments:
# -h, --help show this help message and exit
import a... | bsd-2-clause | -3,314,987,007,003,286,000 | 24.852941 | 108 | 0.602389 | false |
mjfarmer/scada_py | env/lib/python2.7/site-packages/twisted/internet/error.py | 12 | 12677 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Exceptions and errors for use in twisted.internet modules.
"""
from __future__ import division, absolute_import
import socket
from twisted.python import deprecate
from twisted.python.versions import Version
class BindError(Exception):
... | gpl-3.0 | 2,147,458,708,089,896,400 | 24.05336 | 79 | 0.625542 | false |
zeroSteiner/boltons | docs/conf.py | 1 | 9797 | # -*- coding: utf-8 -*-
#
# boltons documentation build configuration file, created by
# sphinx-quickstart on Sat Mar 21 00:34:18 2015.
#
# 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,875,076,784,427,650,000 | 30.603226 | 103 | 0.68623 | false |
sauloal/introgressionbrowser | vcfmerger/py-editdist-0.3/test.py | 5 | 1900 | #!/usr/bin/env python
# Copyright (c) 2006 Damien Miller <djm@mindrot.org>
#
# Permission to use, copy, modify, and distribute this software 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 ... | mit | 7,538,173,575,648,505,000 | 27.787879 | 74 | 0.647895 | false |
cisco-openstack/neutron | neutron/tests/retargetable/client_fixtures.py | 24 | 3529 | # 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 ... | apache-2.0 | 2,730,919,819,026,089,500 | 29.162393 | 78 | 0.670162 | false |
tradej/pcs | pcs/cluster.py | 1 | 61319 | from __future__ import absolute_import
from __future__ import print_function
import os
import subprocess
import re
import usage
import utils
import sys
import status
import prop
import resource
import stonith
import constraint
import settings
import socket
import tempfile
import datetime
import json
import xml.dom.mini... | gpl-2.0 | -8,940,818,766,676,604,000 | 36.028382 | 166 | 0.540599 | false |
j2sol/ursula | library/sensu_process_check.py | 1 | 4037 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2014, Blue Box Group, Inc.
# Copyright 2014, Craig Tracey <craigtracey@gmail.com>
#
# 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
#
# ... | mit | 3,134,995,776,205,844,500 | 41.946809 | 184 | 0.567501 | false |
lamby/pkg-codespeak-lib | testing/test_iniconfig.py | 162 | 8194 | import py
import pytest
from py._iniconfig import IniConfig, ParseError, __all__ as ALL
from py._iniconfig import iscommentline
from textwrap import dedent
def pytest_generate_tests(metafunc):
if 'input' in metafunc.funcargnames:
for name, (input, expected) in check_tokens.items():
metafunc.add... | mit | 7,089,518,600,776,442,000 | 26.404682 | 73 | 0.56578 | false |
yuyichao/Scical.jl | cmake/cmake-python-helper.py | 3 | 2168 | # Copyright (C) 2012~2013 by Yichao Yu
# yyc1992@gmail.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2 of the License.
#
# This program is distributed in the hope tha... | gpl-3.0 | -8,935,082,448,801,797,000 | 30.882353 | 75 | 0.663745 | false |
bollu/polymage | sandbox/tests/test_grouping.py | 1 | 1428 | from __future__ import absolute_import, division, print_function
from fractions import Fraction
import sys
import subprocess
sys.path.insert(0, '../')
from compiler import *
from constructs import *
def test_tree_graph():
R = Parameter(Int, "R")
C = Parameter(Int, "C")
x = Variable(Int, "x")
y = Va... | apache-2.0 | -8,775,009,632,833,237,000 | 24.052632 | 77 | 0.519608 | false |
MinFu/youtube-dl | youtube_dl/extractor/canalc2.py | 145 | 1258 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class Canalc2IE(InfoExtractor):
IE_NAME = 'canalc2.tv'
_VALID_URL = r'http://.*?\.canalc2\.tv/video\.asp\?.*?idVideo=(?P<id>\d+)'
_TEST = {
'url': 'http://www.canalc2.tv/video.asp?idVideo=12163&v... | unlicense | 2,028,543,952,890,103,800 | 29.658537 | 78 | 0.533811 | false |
SCOAP3/invenio | invenio/legacy/websubmit/file_metadata_plugins/extractor_plugin.py | 13 | 2472 | # This file is part of Invenio.
# Copyright (C) 2010, 2011 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 later version.
#
# Inveni... | gpl-2.0 | 2,411,986,732,170,704,000 | 32.405405 | 74 | 0.635113 | false |
leb2dg/osf.io | api/actions/serializers.py | 3 | 6414 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from rest_framework import generics
from rest_framework import serializers as ser
from api.base import utils
from api.base.exceptions import Conflict
from api.base.exceptions import JSONAPIAttributeException
from api.base.serializers import JSONAPISerial... | apache-2.0 | 1,211,229,551,755,577,900 | 34.832402 | 165 | 0.653726 | false |
dwightgunning/django | tests/admin_scripts/tests.py | 22 | 93594 | # -*- coding: utf-8 -*-
"""
A series of tests to establish that the command-line management tools work as
advertised - especially with regards to the handling of the
DJANGO_SETTINGS_MODULE and default settings.py files.
"""
from __future__ import unicode_literals
import codecs
import os
import re
import shutil
import ... | bsd-3-clause | 7,163,149,988,315,127,000 | 42.571495 | 118 | 0.63407 | false |
saydulk/django | django/utils/version.py | 344 | 2445 | from __future__ import unicode_literals
import datetime
import os
import subprocess
from django.utils.lru_cache import lru_cache
def get_version(version=None):
"Returns a PEP 386-compliant version number from VERSION."
version = get_complete_version(version)
# Now build the two parts of the version num... | bsd-3-clause | 5,311,313,625,077,512,000 | 29.949367 | 79 | 0.643354 | false |
tensorflow/tensorflow | tensorflow/python/keras/layers/preprocessing/hashing_test.py | 6 | 12401 | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 3,963,965,094,357,582,300 | 43.448029 | 80 | 0.647125 | false |
matthiascy/panda3d | direct/src/directtools/DirectGrid.py | 8 | 5373 |
from panda3d.core import *
from direct.showbase.DirectObject import DirectObject
from DirectUtil import *
from DirectGeometry import *
class DirectGrid(NodePath, DirectObject):
def __init__(self,gridSize=100.0,gridSpacing=5.0,planeColor=(0.5,0.5,0.5,0.5),parent = None):
# Initialize superclass
Nod... | bsd-3-clause | -2,813,981,199,005,000,000 | 31.96319 | 97 | 0.604504 | false |
Balachan27/django | django/core/management/__init__.py | 35 | 13771 | from __future__ import unicode_literals
import collections
import os
import pkgutil
import sys
from importlib import import_module
import django
from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import (
BaseComma... | bsd-3-clause | 130,774,821,343,594,900 | 38.915942 | 98 | 0.605693 | false |
GbalsaC/bitnamiP | django-wiki/wiki/editors/markitup.py | 2 | 2520 | from django import forms
from django.forms.util import flatatt
from django.utils.encoding import force_unicode
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from wiki.editors.base import BaseEditor
class MarkItUpAdminWidget(forms.Widget):
"""A simplified more fail-... | agpl-3.0 | -4,455,695,049,904,713,700 | 36.058824 | 89 | 0.593254 | false |
andyraib/data-storage | python_scripts/env/lib/python3.6/site-packages/numpy/lib/shape_base.py | 22 | 25915 | from __future__ import division, absolute_import, print_function
import warnings
import numpy.core.numeric as _nx
from numpy.core.numeric import (
asarray, zeros, outer, concatenate, isscalar, array, asanyarray
)
from numpy.core.fromnumeric import product, reshape
from numpy.core import vstack, atleast_3d
_... | apache-2.0 | -5,822,813,939,751,265,000 | 28.415437 | 79 | 0.513564 | false |
jieshen-sjtu/caffe-for-DDNet | python/caffe/imagenet/wrapper.py | 5 | 3938 | #!/usr/bin/env python
"""wrapper.py implements an end-to-end wrapper that classifies an image read
from disk, using the imagenet classifier.
"""
import numpy as np
import os
from skimage import io
from skimage import transform
import caffe
IMAGE_DIM = 256
CROPPED_DIM = 227
# Load the imagenet mean file
IMAGENET_MEA... | bsd-2-clause | 4,015,008,097,100,136,000 | 29.765625 | 80 | 0.646521 | false |
turbomanage/training-data-analyst | courses/developingapps/v1.2/python/pubsub-languageapi-spanner/bonus/quiz/gcp/spanner.py | 4 | 3809 | # Copyright 2017 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 or agreed to in writing, ... | apache-2.0 | -6,855,456,083,344,788,000 | 24.918367 | 74 | 0.497768 | false |
OpenSlides/OpenSlides | server/openslides/users/signals.py | 6 | 7902 | from django.apps import apps
from django.contrib.auth.models import Permission
from django.db.models import Q
from openslides.utils.auth import GROUP_ADMIN_PK, GROUP_DEFAULT_PK
from openslides.utils.postgres import restart_id_sequence
from .models import Group, User
def get_permission_change_data(sender, permission... | mit | 7,079,119,437,851,027,000 | 39.943005 | 92 | 0.65262 | false |
brutasse/graphite-web | webapp/graphite/account/migrations/0001_initial.py | 9 | 2951 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-14 11:22
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | apache-2.0 | -986,899,212,361,702,100 | 39.986111 | 121 | 0.555405 | false |
GeoffEvans/aol_model | aol_model/tests/test_aod.py | 1 | 3438 | from aol_model.aod import Aod
from aol_model.ray import Ray
from numpy import sqrt, allclose, cross, dot
from aol_model.vector_utils import normalise
aod = Aod([0,0,1], [1,0,0], 1, 1, 1)
def test_on_axis_ray_displacement():
rays = [Ray([0,0,0],[0,0,1],800e-9,1)]*5
aod.move_ray_through_aod(rays)
still_on_a... | gpl-3.0 | 7,832,397,868,850,825,000 | 37.211111 | 137 | 0.656486 | false |
vinilios/synnefo | snf-admin-app/synnefo_admin/admin/resources/volumes/utils.py | 7 | 1622 | # Copyright (C) 2010-2014 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed i... | gpl-3.0 | -2,668,342,294,817,101,300 | 32.791667 | 72 | 0.746609 | false |
frosty308/webapps | susana/gallery.py | 2 | 11263 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2017-2018 Alan Frost. All rights reserved.
Generate static image gallery HTML as masonary layout or carousel
> python gallery.py -t "Susan Frost's Gallery" -p index.html masonary > t
> python gallery.py -t "Susan Frost's Gallery" -p gallery.html gallery... | gpl-3.0 | 1,488,239,500,763,890,200 | 37.179661 | 137 | 0.526591 | false |
resmo/ansible | test/units/modules/network/nxos/test_nxos_vpc_interface.py | 68 | 2764 | # (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | gpl-3.0 | -6,590,251,486,470,188,000 | 39.057971 | 102 | 0.685962 | false |
alphafoobar/intellij-community | python/lib/Lib/encodings/cp863.py | 593 | 34508 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP863.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | apache-2.0 | -1,160,218,315,818,363,600 | 48.438395 | 97 | 0.605686 | false |
mjudsp/Tsallis | sklearn/gaussian_process/tests/test_gpr.py | 23 | 11915 | """Testing for Gaussian process regression """
# Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# Licence: BSD 3 clause
import numpy as np
from scipy.optimize import approx_fprime
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels \
import RBF, Constan... | bsd-3-clause | 6,034,558,483,838,411,000 | 36.351097 | 79 | 0.611162 | false |
tanglei528/nova | nova/virt/baremetal/db/api.py | 29 | 4985 | # Copyright (c) 2012 NTT DOCOMO, INC.
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "Lic... | apache-2.0 | -3,577,337,200,458,046,500 | 32.682432 | 79 | 0.673821 | false |
navrasio/mxnet | example/image-classification/symbols/mobilenet.py | 29 | 8457 | # 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 u... | apache-2.0 | -8,220,656,619,985,914,000 | 57.729167 | 174 | 0.622679 | false |
blampe/M2M | basic/profiles/views.py | 3 | 2564 | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import Http404, HttpResponseRedirect
from django.views.generic import list_detail
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.core.urlresolver... | mit | -5,088,857,060,205,680,000 | 37.863636 | 119 | 0.668877 | false |
hubertta/Wget | testenv/Test-504.py | 10 | 2069 | #!/usr/bin/env python3
from sys import exit
from test.http_test import HTTPTest
from misc.wget_file import WgetFile
"""
This test ensures that Wget handles a 504 Gateway Timeout response
correctly.
Since, we do not have a direct mechanism for conditionally sending responses
via the HTTP Server, I've us... | gpl-3.0 | -5,477,047,049,410,487,000 | 27.736111 | 80 | 0.61914 | false |
DmitryYurov/BornAgain | Tests/Functional/Python/PyCore/shape2d.py | 2 | 1377 | import numpy, os, sys, unittest
sys.path.append("@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
import bornagain as ba
class Shape2DTest(unittest.TestCase):
def test_constructPolygonFromList(self):
"""
Testing construction of polygon from two Numpy arrays
"""
# initializing from list
... | gpl-3.0 | -3,845,242,699,820,250,000 | 30.295455 | 82 | 0.554829 | false |
jptomo/rpython-lang-scheme | rpython/translator/backendopt/tailrecursion.py | 2 | 1271 | from rpython.flowspace.model import mkentrymap, checkgraph
# this transformation is very academical -- I had too much time
def _remove_tail_call(translator, graph, block):
print "removing tail call"
assert len(block.exits) == 1
assert block.exits[0].target is graph.returnblock
assert block.operations[... | mit | 5,405,664,327,636,290,000 | 37.515152 | 64 | 0.646735 | 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.