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 |
|---|---|---|---|---|---|---|---|---|---|---|
jicruz/heroku-bot | lib/pip/_vendor/requests/packages/urllib3/_collections.py | 666 | 10553 | from __future__ import absolute_import
from collections import Mapping, MutableMapping
try:
from threading import RLock
except ImportError: # Platform-specific: No threads available
class RLock:
def __enter__(self):
pass
def __exit__(self, exc_type, exc_value, traceback):
... | gpl-3.0 | -2,547,096,938,643,429,400 | 31.570988 | 92 | 0.576613 | false |
matthewruttley/InterestsMap | map_server.py | 1 | 7199 | #!/usr/bin/env python
#Module to generate a map based on places you're interested in
#from your Firefox History
# mruttley - 2015-04-14
from json import load, dumps
from codecs import open as copen
from re import findall
from collections import defaultdict
from os import listdir, path
from sqlite3 import connect
from... | mit | 8,591,610,543,796,852,000 | 25.962547 | 88 | 0.663009 | false |
h4ck3rm1k3/orca-sonar | test/keystrokes/firefox/line_nav_heading_section.py | 1 | 6599 | # -*- coding: utf-8 -*-
#!/usr/bin/python
"""Test of line navigation output of Firefox on a page with headings
in sections.
"""
from macaroon.playback import *
import utils
sequence = MacroSequence()
########################################################################
# We wait for the focus to be on a blank Fi... | lgpl-2.1 | 5,094,293,050,071,747,000 | 32.668367 | 73 | 0.645098 | false |
tempbottle/restcommander | play-1.2.4/python/Lib/curses/ascii.py | 396 | 2607 | """Constants and membership tests for ASCII characters"""
NUL = 0x00 # ^@
SOH = 0x01 # ^A
STX = 0x02 # ^B
ETX = 0x03 # ^C
EOT = 0x04 # ^D
ENQ = 0x05 # ^E
ACK = 0x06 # ^F
BEL = 0x07 # ^G
BS = 0x08 # ^H
TAB = 0x09 # ^I
HT = 0x09 # ^I
LF = 0x0a # ^J
NL =... | apache-2.0 | 7,727,005,128,992,778,000 | 25.333333 | 79 | 0.479095 | false |
yzl0083/orange | Orange/testing/regression/tests_20/reference_transformvalue-domain.py | 6 | 1671 | # Description: Shows how to use value transformers
# Category: preprocessing
# Classes: TransformValue, Continuous2Discrete, Discrete2Continuous, MapIntValue
# Uses:
# Referenced:
import orange
print
def printExample(ex):
for val in ex:
print "%16s: %s" % (val.variable.name, val)
data = or... | gpl-3.0 | -1,618,650,396,070,907,400 | 21.581081 | 84 | 0.767205 | false |
yesudeep/themoneybees | app/appengine/gaefy/db/unique_model.py | 10 | 6578 | # -*- coding: utf-8 -*-
"""
gaefy.db.unique_model
~~~~~~~~~~~~~~~~~~~~~
A Model mixin that validates unique properties.
One limitation is that the entity with unique properties *must have* a
key_name. Example:
class MyModel(UniqueModelMixin, db.Model):
# Define a list of uniqu... | mit | 5,695,484,003,304,565,000 | 33.439791 | 79 | 0.631499 | false |
myxemhoho/mutil-cloud-manage-paltform | jumpgate/baremetal/drivers/sl/nodes.py | 3 | 1212 | import SoftLayer
class NodesV1(object):
def on_get(self, req, resp):
client = req.env['sl_client']
hardware = SoftLayer.HardwareManager(client)
nodes = []
hw_items = set([
'id',
'hostname',
'domain',
'hardwareStatus',
'gl... | mit | 1,334,777,669,793,321,000 | 30.076923 | 74 | 0.486799 | false |
pexip/os-python-bunch | bunch/__init__.py | 6 | 13203 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Bunch is a subclass of dict with attribute-style access.
>>> b = Bunch()
>>> b.hello = 'world'
>>> b.hello
'world'
>>> b['hello'] += "!"
>>> b.hello
'world!'
>>> b.foo = Bunch(lol=True)
>>> b.foo.lol
True
>>> b.foo is b['... | mit | -2,527,515,641,536,526,000 | 31.925187 | 94 | 0.506249 | false |
appsecyogi/Mobile-Security-Framework-MobSF | StaticAnalyzer/tools/enjarify/enjarify/hashtests.py | 12 | 1385 | # Copyright 2015 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... | gpl-3.0 | 4,014,949,921,014,706,000 | 34.512821 | 78 | 0.692419 | false |
bkaradzic/bgfx | 3rdparty/spirv-headers/include/spirv/unified1/spirv.py | 5 | 57788 | # Copyright (c) 2014-2020 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and/or associated documentation files (the "Materials"),
# to deal in the Materials without restriction, including without limitation
# the rights to use, copy, modify, m... | bsd-2-clause | 3,740,436,530,989,796,000 | 33.833032 | 89 | 0.593376 | false |
wyg3958/django-cms | setup.py | 17 | 1675 | from setuptools import setup, find_packages
import os
import cms
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independ... | bsd-3-clause | -9,002,528,573,939,030,000 | 30.603774 | 88 | 0.610149 | false |
Livit/Livit.Learn.EdX | lms/tests.py | 72 | 1950 | """Tests for the lms module itself."""
import mimetypes
from mock import patch
from django.test import TestCase
from django.core.urlresolvers import reverse
from edxmako import add_lookup, LOOKUP
from lms import startup
from xmodule.modulestore.tests.factories import CourseFactory
from xmodule.modulestore.tests.djan... | agpl-3.0 | -1,800,533,671,756,592,400 | 32.050847 | 108 | 0.678974 | false |
pereerro/schooly | school_base/school_base.py | 1 | 7759 | # -*- coding: utf-8 -*-
##############################################################################
#
# school module for OpenERP
# Copyright (C) 2010 Tecnoba S.L. (http://www.tecnoba.com)
# Pere Ramon Erro Mas <pereerro@tecnoba.com> All Rights Reserved.
# Copyright (C) 2011 Zikzakmedia S.L. (http://ww... | agpl-3.0 | -4,566,888,672,962,508,000 | 38.979381 | 139 | 0.58213 | false |
datalogics-robb/scons | src/engine/SCons/Environment.py | 2 | 74634 | """SCons.Environment
Base class for construction Environments. These are
the primary objects used to communicate dependency and
construction information to the build engine.
Keyword arguments supplied when the construction Environment
is created are construction variables used to initialize the
Environment
"""
#
#... | mit | 1,507,158,363,193,680,000 | 38.363924 | 138 | 0.549495 | false |
blacklin/kbengine | kbe/res/scripts/common/Lib/test/test_funcattrs.py | 84 | 13366 | from test import support
import types
import unittest
def global_function():
def inner_function():
class LocalClass:
pass
global inner_global_function
def inner_global_function():
def inner_function2():
pass
return inner_function2
... | lgpl-3.0 | -117,885,010,914,654,260 | 33.716883 | 112 | 0.566063 | false |
h00dy/Diamond | src/collectors/gridengine/test/testgridengine.py | 33 | 2490 | #!/usr/bin/python
# coding=utf-8
from test import CollectorTestCase
from test import get_collector_config
from mock import patch
import os
from diamond.collector import Collector
from gridengine import GridEngineCollector
class TestGridEngineCollector(CollectorTestCase):
"""Set up the fixtures for the test
... | mit | -2,310,737,842,205,680,000 | 35.617647 | 77 | 0.615261 | false |
rvalyi/geraldo | site/newsite/django_1_0/django/utils/datastructures.py | 10 | 13100 | class MergeDict(object):
"""
A simple class for creating new "virtual" dictionaries that actually look
up values in more than one dictionary, passed in the constructor.
If a key appears in more than one of the given dictionaries, only the
first occurrence will be used.
"""
def __init__(self... | lgpl-3.0 | -5,610,492,245,283,761,000 | 31.107843 | 131 | 0.55458 | false |
cloudera/hadoop-common | src/contrib/hod/hodlib/GridServices/hdfs.py | 182 | 9184 | #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 use thi... | apache-2.0 | 1,217,269,725,221,169,700 | 28.625806 | 84 | 0.637086 | false |
yaroslavvb/tensorflow | tensorflow/contrib/distributions/python/ops/vector_student_t.py | 17 | 12699 | # 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 | 4,074,506,447,078,012,000 | 39.571885 | 80 | 0.657375 | false |
lihui7115/ChromiumGStreamerBackend | net/tools/testserver/testserver.py | 5 | 84778 | #!/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.
"""This is a simple HTTP/FTP/TCP/UDP/BASIC_AUTH_PROXY/WEBSOCKET server used for
testing Chrome.
It supports several test URLs, as spec... | bsd-3-clause | 2,007,478,058,845,441,500 | 36.020961 | 80 | 0.616386 | false |
JordanSilverman/TrainFinder | suds/sudsobject.py | 8 | 10909 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will b... | bsd-3-clause | 3,224,821,242,688,862,000 | 27.483029 | 84 | 0.521771 | false |
remybaranx/qtaste | doc/src/docbkx/scripts/lib/PyGithub/github/tests/AuthenticatedUser.py | 39 | 16879 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 | 4,651,190,608,277,216,000 | 71.75431 | 524 | 0.671722 | false |
timpalpant/calibre | src/cherrypy/lib/auth.py | 88 | 3266 | import cherrypy
from cherrypy.lib import httpauth
def check_auth(users, encrypt=None, realm=None):
"""If an authorization header contains credentials, return True, else False."""
request = cherrypy.serving.request
if 'authorization' in request.headers:
# make sure the provided credentials are corr... | gpl-3.0 | -3,073,021,983,220,714,500 | 36.54023 | 86 | 0.611451 | false |
alex/pyopenssl | doc/conf.py | 4 | 7128 | # -*- coding: utf-8 -*-
#
# pyOpenSSL documentation build configuration file, created by
# sphinx-quickstart on Sat Jul 16 07:12:22 2011.
#
# 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... | apache-2.0 | 470,642,689,216,745,000 | 31.547945 | 80 | 0.708333 | false |
bobthekingofegypt/servo | tests/wpt/web-platform-tests/tools/pytest/_pytest/terminal.py | 176 | 21784 | """ terminal reporting of the full testing process.
This is a good source for looking at the various reporting hooks.
"""
from _pytest.main import EXIT_OK, EXIT_TESTSFAILED, EXIT_INTERRUPTED, \
EXIT_USAGEERROR, EXIT_NOTESTSCOLLECTED
import pytest
import py
import sys
import time
import platform
import _pytest._pl... | mpl-2.0 | 7,513,420,526,484,077,000 | 35.735245 | 107 | 0.53957 | false |
jscn/django | tests/forms_tests/field_tests/test_multiplechoicefield.py | 37 | 3519 | from __future__ import unicode_literals
from django.forms import MultipleChoiceField, ValidationError
from django.test import SimpleTestCase
class MultipleChoiceFieldTest(SimpleTestCase):
def test_multiplechoicefield_1(self):
f = MultipleChoiceField(choices=[('1', 'One'), ('2', 'Two')])
with sel... | bsd-3-clause | 2,246,098,725,867,116,300 | 47.875 | 118 | 0.565217 | false |
yugangw-msft/autorest | src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/models/salmon.py | 16 | 1645 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -8,489,827,262,724,760,000 | 31.254902 | 88 | 0.555015 | false |
aajanki/youtube-dl | youtube_dl/extractor/played.py | 24 | 1798 | # coding: utf-8
from __future__ import unicode_literals
import re
import os.path
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
)
class PlayedIE(InfoExtractor):
IE_NAME = 'played.to'
_VALID_URL = r'http... | unlicense | -8,190,561,586,896,509,000 | 27.09375 | 95 | 0.539488 | false |
Kast0rTr0y/ansible | lib/ansible/modules/monitoring/uptimerobot.py | 48 | 4469 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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 | -8,117,637,854,219,183,000 | 24.83237 | 95 | 0.637727 | false |
ensime/ensime-sublime | ensimesublime/patch.py | 1 | 43999 | #!/usr/bin/env python
# Imported from https://github.com/techtonik/python-patch as modules are funky in Sublime Text
"""
Patch utility to apply unified diffs
Brute-force line-by-line non-recursive parsing
Copyright (c) 2008-2016 anatoly techtonik
Available under the terms of MIT license
https://... | gpl-3.0 | 7,571,675,153,840,638,000 | 35.757728 | 118 | 0.487057 | false |
GitHublong/hue | desktop/core/ext-py/Django-1.6.10/docs/_ext/djangodocs.py | 40 | 7686 | """
Sphinx plugins for Django documentation.
"""
import json
import os
import re
from sphinx import addnodes, __version__ as sphinx_ver
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.writers.html import SmartyPantsHTMLTranslator
from sphinx.util.console import bold
from sphinx.util.compat import Di... | apache-2.0 | -4,312,267,564,699,730,000 | 33.778281 | 84 | 0.595889 | false |
jiachenning/muzei | web/lib/bs4/builder/_htmlparser.py | 412 | 8839 | """Use the HTMLParser library to parse HTML files that aren't too bad."""
__all__ = [
'HTMLParserTreeBuilder',
]
from HTMLParser import (
HTMLParser,
HTMLParseError,
)
import sys
import warnings
# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
# argument, which we'd like to s... | apache-2.0 | 3,626,675,217,784,462,000 | 33.25969 | 318 | 0.562507 | false |
mwilliamson/python-mammoth | mammoth/__init__.py | 1 | 1463 | from . import docx, conversion, options, images, transforms, underline
from .raw_text import extract_raw_text_from_element
from .docx.style_map import write_style_map, read_style_map
__all__ = ["convert_to_html", "extract_raw_text", "images", "transforms", "underline"]
_undefined = object()
def convert_to_html(*ar... | bsd-2-clause | 2,267,349,741,020,319,700 | 31.511111 | 111 | 0.676692 | false |
karban/agros2d | resources/python/rope/contrib/findit.py | 91 | 4503 | import rope.base.codeanalyze
import rope.base.evaluate
import rope.base.pyobjects
from rope.base import taskhandle, exceptions, worder
from rope.contrib import fixsyntax
from rope.refactor import occurrences
def find_occurrences(project, resource, offset, unsure=False, resources=None,
in_hierarch... | gpl-2.0 | -2,525,207,680,040,461,000 | 39.936364 | 82 | 0.65845 | false |
blackzw/openwrt_sdk_dev1 | staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_pty.py | 21 | 10927 | from test.test_support import verbose, run_unittest, import_module
#Skip these tests if either fcntl or termios is not available
fcntl = import_module('fcntl')
import_module('termios')
import errno
import pty
import os
import sys
import select
import signal
import socket
import unittest
TEST_STRING_1 = "I wish to bu... | gpl-2.0 | 7,723,819,385,928,454,000 | 36.809689 | 85 | 0.579116 | false |
auag92/n2dm | Asap-3.8.4/Python/asap3/io/ReadOldFiles.py | 1 | 3141 | # Reading old ASAP files (version 1.X NetCDF files).
"""Asap.IO.ReadOldFiles reads NetCDF files from ASAP version 1.X.
The following functions are defined:
`Reader(filename)`:
An object for reading old-style (ASAP 1.x) NetCDF files.
`Reader.Read(frame = None)`:
Read a given frame into an ASAP ListOfAtoms object. T... | mit | 7,960,173,064,802,280,000 | 31.71875 | 86 | 0.58994 | false |
CasualGaming/studlan | apps/authentication/views.py | 2 | 10907 | # -*- coding: utf-8 -*-
import uuid
from datetime import datetime
from django.conf import settings
from django.contrib import auth, messages
from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.models import User
from django.core.mail import send_mail
from django.sho... | mit | 1,923,669,264,310,897,200 | 33.846645 | 137 | 0.594297 | false |
tmhm/scikit-learn | examples/cluster/plot_cluster_comparison.py | 246 | 4684 | """
=========================================================
Comparing different clustering algorithms on toy datasets
=========================================================
This example aims at showing characteristics of different
clustering algorithms on datasets that are "interesting"
but still in 2D. The last ... | bsd-3-clause | 1,061,292,420,939,528,300 | 37.081301 | 77 | 0.645389 | false |
luistorresm/odoo | openerp/models.py | 36 | 285237 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 | -1,944,436,312,387,462,400 | 45.530995 | 247 | 0.551787 | false |
bthirion/scikit-learn | sklearn/metrics/scorer.py | 33 | 17925 | """
The :mod:`sklearn.metrics.scorer` submodule implements a flexible
interface for model selection and evaluation using
arbitrary score functions.
A scorer object is a callable that can be passed to
:class:`sklearn.model_selection.GridSearchCV` or
:func:`sklearn.model_selection.cross_val_score` as the ``scoring``
par... | bsd-3-clause | -7,294,291,899,897,417,000 | 39.462754 | 79 | 0.60251 | false |
Gitweijie/first_project | networking_cisco/plugins/cisco/db/scheduler/cfg_agentschedulers_db.py | 1 | 15087 | # Copyright 2014 Cisco Systems, 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 requir... | apache-2.0 | 1,863,933,026,288,120,300 | 48.303922 | 79 | 0.553788 | false |
OpenMOOC/moocng | moocng/externalapps/forms.py | 2 | 2200 | # -*- coding: utf-8 -*-
from django import forms
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
from moocng.externalapps.models import ExternalApp
from moocng.forms import BootstrapMixin
class ExternalAppForm(forms.ModelForm, BootstrapMixin):
error_messages = {
... | apache-2.0 | -4,356,682,295,020,363,000 | 42.137255 | 132 | 0.656818 | false |
barbuza/django | django/conf/locale/ru/formats.py | 1059 | 1267 | # -*- 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 = 'j E Y г.'
TIME_FORMAT = 'G:i'
DAT... | bsd-3-clause | -3,328,513,491,577,860,600 | 35.114286 | 77 | 0.574367 | false |
yuyuyu101/VirtualBox-NetBSD | src/VBox/Additions/common/crOpenGL/SunOS_i386_glxapi_exports.py | 11 | 2399 | """
Copyright (C) 2009-2012 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and/or modify it under the terms of the GNU
General Public License (GPL) as published by the Free Software
Foundatio... | gpl-2.0 | -1,484,865,708,603,554,800 | 22.519608 | 69 | 0.754481 | false |
lachenmayer/hyde | hydeengine/templatetags/aym.py | 4 | 2696 | from django import template
from django.utils import safestring
import hashlib
register = template.Library()
@register.tag(name="textile")
def textileParser(parser, token):
nodelist = parser.parse(('endtextile',))
parser.delete_first_token()
return TextileNode(nodelist)
class TextileNode(template.Node):... | mit | -5,431,007,708,731,724,000 | 27.378947 | 79 | 0.640579 | false |
jelugbo/tundex | common/djangoapps/microsite_configuration/templatetags/microsite.py | 22 | 2056 | """
Template tags and helper functions for displaying breadcrumbs in page titles
based on the current micro site.
"""
from django import template
from django.conf import settings
from microsite_configuration import microsite
from django.templatetags.static import static
register = template.Library()
def page_title_b... | agpl-3.0 | 8,713,201,690,093,480,000 | 31.634921 | 92 | 0.692607 | false |
deltreey/ansible | contrib/inventory/ovirt.py | 65 | 9521 | #!/usr/bin/env python
# Copyright 2015 IIX 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 ver... | gpl-3.0 | 5,157,149,965,287,260,000 | 32.174216 | 114 | 0.602773 | false |
dudymas/python-openstacksdk | openstack/auth/identity/v2.py | 3 | 6301 | # 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 | 4,981,119,792,516,904,000 | 31.479381 | 77 | 0.605618 | false |
dagwieers/ansible | lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py | 15 | 13242 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 | -1,979,956,809,765,139,700 | 32.18797 | 125 | 0.635025 | false |
lightbase/liblightbase | liblightbase/pytypes/__init__.py | 4 | 1738 | #
from .base import *
from .standard import *
from .extended import *
def is_lbtype(type_obj, object_only = False):
""" Verify if type_obj is an instance of lbtype
If object_only is false, return also true if the class
descend from lbtype
"""
if not object_only and isinstance(type_obj, type... | gpl-2.0 | -895,919,646,469,461,600 | 31.203704 | 83 | 0.621979 | false |
appleseedhq/gaffer | python/GafferSceneTest/SceneLoopTest.py | 8 | 5699 | ##########################################################################
#
# Copyright (c) 2015, Image Engine Design 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:
#
# * Redistrib... | bsd-3-clause | 9,206,340,961,981,512,000 | 39.41844 | 115 | 0.662572 | false |
wzbozon/scikit-learn | benchmarks/bench_glmnet.py | 297 | 3848 | """
To run this, you'll need to have installed.
* glmnet-python
* scikit-learn (of course)
Does two benchmarks
First, we fix a training set and increase the number of
samples. Then we plot the computation time as function of
the number of samples.
In the second benchmark, we increase the number of dimensions of... | bsd-3-clause | -6,235,407,090,715,678,000 | 29.0625 | 78 | 0.594075 | false |
altanawealth/django-report-builder | report_builder/api/serializers.py | 3 | 3976 | from django.db import transaction
from django.contrib.auth import get_user_model
from report_builder.models import Report, DisplayField, FilterField, Format
from rest_framework import serializers
import datetime
User = get_user_model()
class FormatSerializer(serializers.ModelSerializer):
class Meta:
mode... | bsd-3-clause | 1,825,411,802,613,917,700 | 39.161616 | 90 | 0.623239 | false |
denis-pitul/django | tests/middleware/test_security.py | 291 | 7781 | from django.http import HttpResponse
from django.test import RequestFactory, SimpleTestCase
from django.test.utils import override_settings
class SecurityMiddlewareTest(SimpleTestCase):
@property
def middleware(self):
from django.middleware.security import SecurityMiddleware
return SecurityMid... | bsd-3-clause | -2,003,902,466,241,355,300 | 37.519802 | 96 | 0.635394 | false |
imaculate/scikit-learn | sklearn/preprocessing/label.py | 28 | 26883 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Joel Nothman <joel.nothman@gmail.com>
# Hamzeh Alsalhi <ha258@cornell.edu>
# Licens... | bsd-3-clause | -6,069,778,541,359,297,000 | 32.066421 | 79 | 0.571923 | false |
obfuscurity/graphite-web | webapp/graphite/finders/standard.py | 2 | 8882 | import bisect
import fnmatch
import os
from os.path import isdir, isfile, join, basename, splitext
from django.conf import settings
# Use the built-in version of scandir/walk if possible, otherwise
# use the scandir module version
try:
from os import scandir, walk
except ImportError:
from scandir import scandi... | apache-2.0 | -1,096,286,104,204,407,900 | 42.326829 | 110 | 0.538955 | false |
izapolsk/integration_tests | cfme/common/vm.py | 1 | 43167 | """Module containing classes with common behaviour for both VMs and Instances of all types."""
import json
from datetime import date
from datetime import datetime
from datetime import timedelta
import attr
from cached_property import cached_property
from manageiq_client.filters import Q
from navmazing import NavigateT... | gpl-2.0 | 856,402,703,160,096,500 | 40.347701 | 100 | 0.616397 | false |
ciraxwe/cherrypy-app-engine | cherrypy/test/test_config_server.py | 21 | 4125 | """Tests for the CherryPy configuration system."""
import os
import sys
localDir = os.path.join(os.getcwd(), os.path.dirname(__file__))
import socket
import time
import cherrypy
# Client-side code #
from cherrypy.test import helper
class ServerConfigTests(h... | apache-2.0 | 1,930,417,736,493,795,300 | 31.226563 | 76 | 0.520242 | false |
3quarterstack/simple_blog | django/contrib/localflavor/ar/forms.py | 96 | 4555 | # -*- coding: utf-8 -*-
"""
AR-specific Form helpers.
"""
from __future__ import absolute_import, unicode_literals
from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import RegexField... | mit | 4,919,539,153,038,554,000 | 34.5625 | 95 | 0.588313 | false |
gauribhoite/personfinder | env/google_appengine/lib/webob-1.2.3/webob/dec.py | 49 | 10184 | """
Decorators to wrap functions to make them WSGI applications.
The main decorator :class:`wsgify` turns a function into a WSGI
application (while also allowing normal calling of the method with an
instantiated request).
"""
from webob.compat import (
bytes_,
text_type,
)
from webob.request import Reque... | apache-2.0 | 3,179,510,718,396,337,700 | 33.060201 | 81 | 0.565986 | false |
dfang/odoo | addons/stock_picking_wave/models/stock_picking_wave.py | 22 | 3190 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class StockPickingWave(models.Model):
_inherit = "mail.thread"
_name = "stock.picking.wave"
_description = "Picking Wave"
_o... | agpl-3.0 | -149,265,678,196,604,320 | 37.433735 | 151 | 0.603448 | false |
ashhher3/invenio | modules/webaccess/lib/external_authentication_oauth1.py | 24 | 8849 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) a... | gpl-2.0 | 3,444,818,593,273,060,400 | 37.307359 | 102 | 0.565488 | false |
ltilve/chromium | build/android/pylib/base/base_setup.py | 15 | 2499 | # Copyright (c) 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.
"""Base script for doing test setup."""
import logging
import os
from pylib import constants
from pylib import valgrind_tools
from pylib.utils import i... | bsd-3-clause | 5,694,196,479,200,006,000 | 39.306452 | 80 | 0.685074 | false |
dmordom/nipype | nipype/workflows/dmri/camino/connectivity_mapping.py | 14 | 25076 | import nipype.interfaces.io as nio # Data i/o
import nipype.interfaces.utility as util # utility
import nipype.pipeline.engine as pe # pypeline engine
import nipype.interfaces.camino as camino
import nipype.interfaces.fsl as fsl
import nipype.interfaces.camino2trackvis as cam2trk
import nipype.in... | bsd-3-clause | 7,545,277,342,304,137,000 | 49.96748 | 166 | 0.656644 | false |
semonte/intellij-community | python/lib/Lib/encodings/iso2022_jp_ext.py | 816 | 1069 | #
# iso2022_jp_ext.py: Python Unicode Codec for ISO2022_JP_EXT
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_jp_ext')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class Incr... | apache-2.0 | 352,938,930,514,405,200 | 26.410256 | 74 | 0.704397 | false |
yongshengwang/builthue | desktop/core/src/desktop/lib/paginator.py | 40 | 3581 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 1,169,482,305,325,266,700 | 35.917526 | 87 | 0.686121 | false |
mirestrepo/voxels-at-lems | boxm/render_expected_images.py | 1 | 1819 | import boxm_batch;
import os;
boxm_batch.register_processes();
boxm_batch.register_datatypes();
class dbvalue:
def __init__(self, index, type):
self.id = index # unsigned integer
self.type = type # string
# Capitol
model_dir = "/Users/isa/Experiments/CapitolBOXM";
model_imgs_dir = "/Users/isa/Experime... | bsd-2-clause | 4,998,137,039,995,012,000 | 32.090909 | 92 | 0.706432 | false |
yongtang/tensorflow | tensorflow/compiler/xla/python/xla_client_backend_independent_test.py | 10 | 4991 | # 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 | -4,494,357,296,630,078,000 | 33.184932 | 80 | 0.680024 | false |
diegosarmentero/ninja-ide | ninja_ide/gui/dialogs/preferences/preferences_editor_scheme_designer.py | 9 | 9616 | # -*- coding: utf-8 -*-
#
# This file is part of NINJA-IDE (http://ninja-ide.org).
#
# NINJA-IDE 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
# any later version.
#
# NIN... | gpl-3.0 | 2,324,475,225,258,415,600 | 40.270386 | 80 | 0.630616 | false |
iobeam/iobeam-client-python | tests/resources/test_data.py | 1 | 12131 | import unittest
from iobeam.resources import data
class TestTimestamp(unittest.TestCase):
def test_invalidValues(self):
def verify(val):
try:
ts = data.Timestamp(val)
self.assertTrue(False)
except ValueError:
pass
verify(No... | apache-2.0 | 7,508,279,263,699,706,000 | 33.075843 | 80 | 0.576952 | false |
billwanjohi/ansible | lib/ansible/playbook/__init__.py | 3 | 27719 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | -1,989,650,025,425,876,200 | 39.763235 | 136 | 0.545186 | false |
thegooglecodearchive/marave | marave/plugins/plugins.py | 6 | 3812 | # -*- coding: utf-8 -*-
import os, sys
from PyQt4 import QtGui
from Ui_conf import Ui_Dialog as ConfDialog
if hasattr(sys, 'frozen'):
PATH = os.path.join(os.path.abspath(os.path.dirname(sys.executable)),'plugins')
else:
PATH = os.path.abspath(os.path.dirname(__file__))
class ConfigDialog(QtGui.QDialog):
... | gpl-2.0 | 1,669,629,051,612,068,000 | 29.99187 | 92 | 0.591028 | false |
dovf/kitty | kitty/core/kassert.py | 1 | 1909 | # Copyright (C) 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
#
# This file is part of Kitty.
#
# Kitty 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, o... | gpl-2.0 | -8,175,512,240,416,787,000 | 30.816667 | 92 | 0.688318 | false |
2014c2g9/c2g9 | exts/wsgi/programs/c2g1/__init__.py | 18 | 8713 | import cherrypy
# 這是 C2G1 類別的定義
class C2G1(object):
# 各組利用 index 引導隨後的程式執行
@cherrypy.expose
def index(self, *args, **kwargs):
outstring = '''
這是 2014C2 協同專案下的 c2g1 分組程式開發網頁, 以下為 W12 的任務執行內容.<br />
<!-- 這裡採用相對連結, 而非網址的絕對連結 (這一段為 html 註解) -->
<a href="fillpoly">c2g1 fillpoly 繪圖</a><br />
<a href="dra... | gpl-2.0 | -4,863,434,212,296,183,000 | 25.624138 | 98 | 0.566248 | false |
AloneRoad/Inforlearn | console/app/pygments/filters/__init__.py | 20 | 9503 | # -*- coding: utf-8 -*-
"""
pygments.filters
~~~~~~~~~~~~~~~~
Module containing filter lookup functions and default
filters.
:copyright: 2006-2007 by Armin Ronacher, Georg Brandl.
:license: BSD, see LICENSE for more details.
"""
try:
set
except NameError:
from sets import Set as set
i... | apache-2.0 | 6,206,635,907,420,308,000 | 31.523973 | 89 | 0.581657 | false |
csparpa/robograph | robograph/sample_graphs/drawing.py | 1 | 1240 | from robograph.datamodel.base import graph
from robograph.datamodel.nodes import plotter
from robograph.datamodel.nodes.lib import value, printer, buffers, maths
def plot():
v1 = value.Value(value=[9, -3, 8.7], name='v1')
v2 = value.Value(value=[86, -0.43], name='v2')
s = maths.Sum(name='sum')
m = mat... | apache-2.0 | -724,011,907,617,908,400 | 29.268293 | 72 | 0.614516 | false |
Ted1993/Flasky | venv/lib/python2.7/site-packages/setuptools/tests/__init__.py | 147 | 11160 | """Tests for the 'setuptools' package"""
import sys
import os
import distutils.core
import distutils.cmd
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
from distutils.errors import DistutilsSetupError
from distutils.core import Extension
from distutils.version import LooseVersion
from setupto... | mit | -4,735,848,047,044,193,000 | 33.551084 | 86 | 0.592384 | false |
zahodi/ansible | test/units/parsing/vault/test_vault.py | 52 | 16031 | # -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free So... | gpl-3.0 | 6,855,794,402,372,167,000 | 40.960106 | 129 | 0.673322 | false |
globber-torpes/formula1 | tests/test_formula1.py | 1 | 8805 | from unittest import TestCase
from src.Piloto import Piloto
from src.Escuderia import Escuderia
from src.CampeonatoMundial import CampeonatoMundial
from src.Circuito import Circuito
from src.GranPremio import GranPremio
from src.Formula1 import Formula1
from mockito import *
__author__ = 'MAMISHO'
class TestFormula1... | mit | 3,310,179,275,382,030,000 | 37.282609 | 93 | 0.653152 | false |
40223229/2015cd_midterm2 | static/Brython3.1.1-20150328-091302/Lib/datetime.py | 628 | 75044 | """Concrete date/time and related types.
See http://www.iana.org/time-zones/repository/tz-link.html for
time zone and DST data sources.
"""
import time as _time
import math as _math
def _cmp(x, y):
return 0 if x == y else 1 if x > y else -1
MINYEAR = 1
MAXYEAR = 9999
_MAXORDINAL = 3652059 # date.max.toordinal()... | gpl-2.0 | -1,109,358,337,054,810,000 | 34.132959 | 85 | 0.555887 | false |
skurochkin/selenium | py/test/selenium/webdriver/common/proxy_tests.py | 65 | 5759 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 7,674,562,697,636,950,000 | 39.272727 | 94 | 0.684147 | false |
shawncaojob/LC | QUESTIONS/149_max_points_on_a_line_v2.py | 1 | 1940 | # 149. Max Points on a Line QuestionEditorial Solution My Submissions
# Total Accepted: 69049
# Total Submissions: 450757
# Difficulty: Hard
# Contributors: Admin
# Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
#
# Subscribe to see which companies asked this que... | gpl-3.0 | -2,954,128,842,527,250,400 | 30.290323 | 114 | 0.460309 | false |
nrkumar93/bnr_workspace | label_training_detection/scripts/imrotate.py | 1 | 1583 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# imrotate.py
#
# Copyright 2016 Ramkumar Natarajan <ram@ramkumar-ubuntu>
#
# 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 versio... | gpl-3.0 | 1,708,412,853,002,059,300 | 30.66 | 99 | 0.691093 | false |
hectord/lettuce | tests/integration/django/dill/leaves/models.py | 18 | 1285 | from django.db import models
class Garden(models.Model):
name = models.CharField(max_length=100)
area = models.IntegerField()
raining = models.BooleanField()
@property
def howbig(self):
if self.area < 50:
return 'small'
elif self.area < 150:
return 'medium'... | gpl-3.0 | 8,077,237,568,077,679,000 | 23.245283 | 77 | 0.640467 | false |
kouaw/CouchPotatoServer | libs/requests/adapters.py | 21 | 16075 | # -*- coding: utf-8 -*-
"""
requests.adapters
~~~~~~~~~~~~~~~~~
This module contains the transport adapters that Requests uses to define
and maintain connections.
"""
import socket
from .models import Response
from .packages.urllib3 import Retry
from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
... | gpl-3.0 | 671,405,195,088,660,900 | 37.002364 | 97 | 0.602799 | false |
pandeyop/tempest | tempest/scenario/test_snapshot_pattern.py | 27 | 3352 | # Copyright 2013 NEC Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 | 355,630,435,962,509,060 | 37.090909 | 78 | 0.670644 | false |
ktan2020/legacy-automation | win/Lib/site-packages/wx-3.0-msw/wx/lib/floatcanvas/Utilities/BBoxTest.py | 1 | 17378 | #!/usr/bin/env python
"""
Test code for the BBox Object
"""
import unittest
from BBox import *
class testCreator(unittest.TestCase):
def testCreates(self):
B = BBox(((0,0),(5,5)))
self.failUnless(isinstance(B, BBox))
def testType(self):
B = N.array(((0,0),(5,5)))... | mit | 5,466,037,045,721,539,000 | 28.866785 | 116 | 0.450627 | false |
hackers-terabit/portage | pym/portage/process.py | 6 | 20975 | # portage.py -- core Portage functionality
# Copyright 1998-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import atexit
import errno
import fcntl
import platform
import signal
import socket
import struct
import sys
import traceback
import os as _os
from portage import os
f... | gpl-2.0 | 701,203,567,679,626,500 | 31.318952 | 101 | 0.703933 | false |
croomjm/Cubli | Phidgets/Phidgets/Devices/Stepper.py | 11 | 37931 | """Copyright 2012 Phidgets Inc.
This work is licensed under the Creative Commons Attribution 2.5 Canada License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ca/
"""
__author__ = 'Adam Stelmack'
__version__ = '2.1.8'
__date__ = 'May 17 2010'
import threading
from ctypes ... | mit | -7,131,229,803,968,564,000 | 38.65702 | 157 | 0.602225 | false |
mlperf/training_results_v0.5 | v0.5.0/google/cloud_v2.8/resnet-tpuv2-8/code/resnet/model/models/official/utils/logs/hooks_helper.py | 8 | 5801 | # 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 | 1,765,100,543,086,239,700 | 34.588957 | 112 | 0.680055 | false |
Deepakpatle/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py | 117 | 46271 | # Copyright (C) 2010 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 | 832,439,309,406,604,400 | 44.274951 | 171 | 0.637095 | false |
MarcusMoeller/mfc | deb/builds/mfc1_1.0-2/mfc1-1.0/mfc1/popup.py | 12 | 6107 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# With the MindfulClock you turn your device into a Bell of Mindfulness.
# Concept, Design: Marcurs Möller
# <marcus.moeller@outlook.com>
# <http://apps.microsoft.com/windows/de-de/app/
# mindfulclock/58063160-9cc6-4dee-9d92-... | gpl-3.0 | 5,128,227,602,725,774,000 | 34.5 | 72 | 0.536521 | false |
michaelgugino/web_keyer | KeyerView.py | 1 | 7127 | from flask import request, session, g, redirect, url_for, abort, render_template, flash
from flask.views import MethodView
from models import User,KeyingTask, KeyingAnswer
import cache_methods
cache = cache_methods.cache
from database import db_session
class KeyerView(MethodView):
'''
This class displays... | gpl-3.0 | 2,678,845,136,543,623,000 | 42.457317 | 152 | 0.611337 | false |
alvinwan/md2py | setup.py | 1 | 1136 | import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ['tests']
... | apache-2.0 | -4,381,710,833,610,111,000 | 27.4 | 80 | 0.639085 | false |
luca-vercelli/odoo-modules | view_mustache/report_invoice/account_invoice.py | 1 | 4196 | # -*- coding: utf-8 -*-
from odoo import api, fields, models
from odoo.addons import account
import logging
_logger = logging.getLogger(__name__)
class FakeDict(dict):
def __init__(self, orig_dict={}):
super(FakeDict, self).__init__(orig_dict)
def __getitem__(self, key):
try:
... | gpl-3.0 | -6,247,293,348,928,896,000 | 33.966667 | 137 | 0.573642 | false |
mikekap/batchy | tests/futures_tests.py | 1 | 2383 | from threading import Semaphore
from unittest.case import SkipTest
from batchy.runloop import coro_return, runloop_coroutine
from batchy.batch_coroutine import batch_coroutine, class_batch_coroutine
try:
from concurrent.futures import ThreadPoolExecutor
import batchy.futures as batchy_futures
except ImportEr... | apache-2.0 | -9,072,754,923,605,329,000 | 23.822917 | 90 | 0.589173 | false |
junbochen/pylearn2 | pylearn2/scripts/tutorials/grbm_smd/test_grbm_smd.py | 44 | 1176 | import os
from nose.plugins.skip import SkipTest
from theano import config
import pylearn2
from pylearn2.testing import no_debug_mode
from pylearn2.utils.serial import load_train_file
@no_debug_mode
def test_train_example():
""" tests that the grbm_smd example script runs correctly """
assert config.mode !... | bsd-3-clause | -6,468,779,816,861,301,000 | 30.783784 | 79 | 0.634354 | false |
lancheng/flexx | flexx/react/pyscript.py | 21 | 10446 | """
Implementation of flexx.react in JS via PyScript.
"""
import json
from ..pyscript import py2js, evaljs, evalpy
from ..pyscript.parser2 import get_class_definition
from .signals import Signal, SourceSignal
class HasSignalsJS:
""" An implementation of the HasSignals class in PyScript. It has
some boilerp... | bsd-2-clause | -8,172,590,314,545,279,000 | 38.568182 | 109 | 0.571032 | false |
Scarygami/gae-gcs-push2deploy-secrets | lib/oauth2client/xsrfutil.py | 230 | 3368 | #!/usr/bin/python2.5
#
# Copyright 2010 the Melange 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... | apache-2.0 | -2,884,698,131,213,622,300 | 28.80531 | 74 | 0.684679 | false |
decvalts/landlab | landlab/grid/unstructured/status.py | 1 | 2868 | import numpy as np
# Define the boundary-type codes
#: Indicates a node is *core*.
CORE_NODE = 0
#: Indicates a boundary node is has a fixed values.
FIXED_VALUE_BOUNDARY = 1
#: Indicates a boundary node is has a fixed gradient.
FIXED_GRADIENT_BOUNDARY = 2
#: Indicates a boundary node is wrap-around.
TRACKS_CELL_BO... | mit | -3,865,066,948,501,734,400 | 28.265306 | 76 | 0.614365 | 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.