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 |
|---|---|---|---|---|---|---|---|---|---|---|
WeblateOrg/weblate | weblate/gitexport/apps.py | 1 | 1433 | #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | -4,928,123,204,983,857,000 | 30.086957 | 83 | 0.695804 | false |
JPFrancoia/scikit-learn | sklearn/cluster/k_means_.py | 4 | 59475 | """K-means clustering"""
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Thomas Rueckstiess <ruecksti@in.tum.de>
# James Bergstra <james.bergstra@umontreal.ca>
# Jan Schlueter <scikit-learn@jan-schlueter.de>
# Nelle Varoquaux
# Peter Prettenhofer <peter.prettenh... | bsd-3-clause | 5,216,101,133,302,494,000 | 37.545042 | 81 | 0.610357 | false |
gskachkov/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/python.py | 120 | 5538 | # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and... | bsd-3-clause | -3,065,896,886,463,507,500 | 41.930233 | 117 | 0.659624 | false |
mrquim/repository.mrquim | plugin.video.salts/scrapers/pubfilmto_scraper.py | 6 | 4875 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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.
T... | gpl-2.0 | -2,484,405,846,221,987,300 | 44.138889 | 157 | 0.611282 | false |
square/pants | tests/python/pants_test/targets/test_python_binary.py | 2 | 3271 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import pytest
from ... | apache-2.0 | -6,312,468,934,129,864,000 | 47.102941 | 93 | 0.549985 | false |
powerlim2/project_free_insight | data_api/venv/lib/python2.7/site-packages/pip/_vendor/pyparsing.py | 75 | 158096 | # module pyparsing.py
#
# Copyright (c) 2003-2015 Paul T. McGuire
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, cop... | bsd-3-clause | -3,378,580,532,135,950,000 | 40.203023 | 196 | 0.583702 | false |
ai0/sanic | examples/exception_monitoring.py | 1 | 1791 | """
Example intercepting uncaught exceptions using Sanic's error handler framework.
This may be useful for developers wishing to use Sentry, Airbrake, etc.
or a custom system to log and monitor unexpected errors in production.
First we create our own class inheriting from Handler in sanic.exceptions,
and pass in an i... | mit | 2,299,311,536,774,398,700 | 29.87931 | 79 | 0.731435 | false |
RockinRoel/FrameworkBenchmarks | toolset/benchmark/fortune_html_parser.py | 20 | 7205 | # -*- coding: utf-8
import re
from HTMLParser import HTMLParser
from difflib import unified_diff
class FortuneHTMLParser(HTMLParser):
body = []
valid = '''<!doctype html><html>
<head><title>Fortunes</title></head>
<body><table>
<tr><th>id</th><th>message</th></tr>
<tr><td>11</td><td><script>alert("This... | bsd-3-clause | 3,131,021,658,293,544,000 | 43.240741 | 130 | 0.625785 | false |
jordanemedlock/psychtruths | temboo/Library/Zendesk/IncrementalTickets/ExportIncrementalTickets.py | 5 | 4063 | # -*- coding: utf-8 -*-
###############################################################################
#
# ExportIncrementalTickets
# Returns a lightweight representation of what changed in the ticket "since you last asked".
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apac... | apache-2.0 | -366,234,906,031,487,300 | 40.886598 | 233 | 0.691853 | false |
omoju/Fundamentals | Data/twitterDataAnalysis/info_gain.py | 1 | 3353 |
import os
import sys
import numpy as np
import math
def findBinIndexFor(aFloatValue, binsList):
#print "findBinIndexFor: %s" % aFloatValue
returnIndex = -1
for i in range(len(binsList)):
thisBin = binsList[i]
if (aFloatValue >= thisBin[0]) and (aFloatValue < thisBin[1]):
returnIndex = i
break
return ... | gpl-3.0 | 3,282,682,775,217,605,000 | 19.321212 | 87 | 0.691321 | false |
nash-x/hws | neutron/common/constants.py | 1 | 5802 | # Copyright (c) 2012 OpenStack Foundation.
#
# 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 | -792,822,260,854,710,300 | 27.586207 | 74 | 0.7313 | false |
AversivePlusPlus/AversivePlusPlus | tools/conan/conans/test/integration/order_libs_test.py | 3 | 2031 | import unittest
from conans.test.tools import TestClient
from conans.paths import CONANFILE
from conans.util.files import load
import os
class OrderLibsTest(unittest.TestCase):
def setUp(self):
self.client = TestClient()
def _export(self, name, deps=None, export=True):
def _libs():
... | bsd-3-clause | 8,957,058,212,120,163,000 | 32.85 | 95 | 0.568193 | false |
yfried/ansible | lib/ansible/plugins/terminal/vyos.py | 191 | 1700 | #
# (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 d... | gpl-3.0 | 7,554,539,703,193,436,000 | 33 | 84 | 0.664706 | false |
PredictionGuru/pgurin | models.py | 1 | 1214 | """Models / Schema of pgur.in"""
from google.appengine.ext import ndb
class Accounts(ndb.Model):
"""Stores registration information."""
playstore_url = ndb.StringProperty()
appstore_url = ndb.StringProperty()
winstore_url = ndb.StringProperty()
default_url = ndb.StringProperty()
title = ndb.... | mit | -1,236,759,701,020,682,200 | 32.722222 | 64 | 0.714992 | false |
jhoos/django | django/core/management/__init__.py | 39 | 13130 | from __future__ import unicode_literals
import collections
from importlib import import_module
import os
import pkgutil
import sys
import django
from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import (BaseCommand, C... | bsd-3-clause | 6,515,534,424,421,108,000 | 38.787879 | 98 | 0.607083 | false |
linked67/p2pool-500 | SOAPpy/Types.py | 289 | 52214 | from __future__ import nested_scopes
"""
################################################################################
# Copyright (c) 2003, Pfizer
# Copyright (c) 2001, Cayce Ullman.
# Copyright (c) 2001, Brian Matthews.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or withou... | gpl-3.0 | 2,229,889,161,361,032,000 | 28.887808 | 80 | 0.50452 | false |
GoodRx/fwffr | fwffr.py | 1 | 7288 | #!/usr/bin/env python
"""
Utilities related to parsing files
"""
from collections import OrderedDict
import sys
PY3 = sys.version_info[0] == 3
__all__ = [
'FixedLengthError',
'FixedLengthUnknownRecordTypeError',
'FixedLengthSeparatorError',
'FixedLengthJustificationError',
'FixedLengthFieldParser... | mit | 321,731,035,504,264,400 | 37.357895 | 83 | 0.641603 | false |
gaddman/ansible | lib/ansible/modules/remote_management/ucs/ucs_vhba_template.py | 64 | 11155 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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_version': '1.1',
'status': ['preview'],
... | gpl-3.0 | -5,378,747,956,583,948,000 | 39.689781 | 139 | 0.596466 | false |
alxgu/ansible | lib/ansible/modules/storage/netapp/netapp_e_ldap.py | 31 | 15914 | #!/usr/bin/python
# (c) 2018, NetApp, Inc
# 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_version': '1.1',
'status': ['preview'],
... | gpl-3.0 | -8,731,499,991,611,449,000 | 39.805128 | 120 | 0.585522 | false |
inveniosoftware/invenio-collections | invenio_collections/ext.py | 3 | 5519 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015, 2016 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... | gpl-2.0 | 1,771,329,640,797,889,800 | 37.866197 | 78 | 0.642145 | false |
mrfawy/ModernEnigma | test/testUtil.py | 1 | 2635 | import unittest
from Util import Util
class TestUtil(unittest.TestCase):
def testConvertTupleListToMap(self):
tupleList=[]
tupleList.append((0,0))
tupleList.append((0,1))
tupleList.append((1,0))
tupleList.append((1,2))
tupleList.append((2,2))
wiringMap=Util.c... | mit | 3,768,703,100,938,810,000 | 32.782051 | 93 | 0.640987 | false |
fti7/ansible-modules-core | cloud/rax.py | 7 | 24940 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 | 7,403,977,200,706,098,000 | 34.077356 | 79 | 0.519126 | false |
amwelch/a10sdk-python | a10sdk/core/cm/cm_ut_list_entry_2.py | 2 | 3168 | from a10sdk.common.A10BaseClass import A10BaseClass
class EntryCfg(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param distance: {"minimum": 1, "type": "number", "maximum": 255, "format": "number"}
:param protocol: {"enum": ["any", "static", "dynamic"], "type": "s... | apache-2.0 | 7,505,602,990,336,736,000 | 35 | 640 | 0.586806 | false |
rikima/spark | python/pyspark/streaming/listener.py | 75 | 2333 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 6,195,760,527,659,988,000 | 27.802469 | 84 | 0.651093 | false |
MSA-Argentina/relojito_project | relojito/app/api_views.py | 1 | 1715 | from datetime import datetime
from rest_framework import generics, viewsets
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
from .models import Project, Task, TaskType
from .serializers import ProjectSerializer, TaskSerializer, TaskTypeSerializer
class TaskViewSet(views... | mit | 1,527,995,199,949,454,300 | 28.067797 | 78 | 0.692711 | false |
hugs/django | django/contrib/flatpages/admin.py | 82 | 1072 | from django import forms
from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from django.utils.translation import ugettext_lazy as _
class FlatpageForm(forms.ModelForm):
url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/]+$',
help_text = _("Example: '/a... | bsd-3-clause | -947,400,158,230,934,900 | 37.285714 | 133 | 0.63153 | false |
torchingloom/edx-platform | lms/djangoapps/verify_student/ssencrypt.py | 55 | 7001 | """
NOTE: Anytime a `key` is passed into a function here, we assume it's a raw byte
string. It should *not* be a string representation of a hex value. In other
words, passing the `str` value of
`"32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae"` is bad.
You want to pass in the result of calling .decode... | agpl-3.0 | -4,201,936,249,084,130,300 | 32.658654 | 96 | 0.668762 | false |
t0in4/django | django/db/backends/postgresql/version.py | 632 | 1517 | """
Extracts the version of the PostgreSQL server.
"""
import re
# This reg-exp is intentionally fairly flexible here.
# Needs to be able to handle stuff like:
# PostgreSQL #.#.#
# EnterpriseDB #.#
# PostgreSQL #.# beta#
# PostgreSQL #.#beta#
VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?')
def _parse_... | bsd-3-clause | 6,409,324,893,151,770,000 | 33.477273 | 79 | 0.661833 | false |
SivilTaram/edx-platform | common/lib/xmodule/xmodule/modulestore/split_mongo/split.py | 12 | 147531 | """
Provides full versioning CRUD and representation for collections of xblocks (e.g., courses, modules, etc).
Representation:
* course_index: a dictionary:
** '_id': a unique id which cannot change,
** 'org': the org's id. Only used for searching not identity,
** 'course': the course's catalog number
... | agpl-3.0 | 4,431,682,023,317,471,700 | 46.029327 | 148 | 0.619083 | false |
open-craft/opencraft | playbooks/collect_activity/stats.py | 1 | 4868 | #!/edx/app/edxapp/venvs/edxapp/bin/python
# pylint: skip-file
from __future__ import print_function
from argparse import ArgumentParser
from datetime import datetime, timedelta
import gzip
import os
import re
import sys
import django
from django.utils import timezone
from six.moves.configparser import ConfigParser
... | agpl-3.0 | -2,823,074,012,932,617,700 | 33.771429 | 120 | 0.626746 | false |
florentx/OpenUpgrade | addons/sale/report/__init__.py | 370 | 1086 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -5,067,360,055,020,680,000 | 44.25 | 78 | 0.620626 | false |
jkonecki/autorest | AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_server_failure.py | 5 | 7493 | # 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 | 3,776,026,413,389,372,400 | 36.094059 | 88 | 0.629121 | false |
davygeek/vitess | test/topo_flavor/zk2.py | 3 | 3694 | #!/usr/bin/env python
# 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... | apache-2.0 | 3,103,942,561,594,704,400 | 35.574257 | 112 | 0.607201 | false |
rotofly/odoo | addons/marketing_campaign_crm_demo/__openerp__.py | 260 | 1623 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -1,545,234,905,676,542,000 | 36.744186 | 87 | 0.589033 | false |
damianam/easybuild-framework | easybuild/scripts/fix_broken_easyconfigs.py | 3 | 5630 | #!/usr/bin/env python
# Copyright 2015-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Res... | gpl-2.0 | -6,872,350,944,006,082,000 | 37.827586 | 119 | 0.676199 | false |
wendlers/edubot-snap | ext/requests/packages/urllib3/contrib/appengine.py | 360 | 7937 | from __future__ import absolute_import
import logging
import os
import warnings
from ..exceptions import (
HTTPError,
HTTPWarning,
MaxRetryError,
ProtocolError,
TimeoutError,
SSLError
)
from ..packages.six import BytesIO
from ..request import RequestMethods
from ..response import HTTPResponse
... | mit | 2,247,989,972,706,746,000 | 33.359307 | 80 | 0.616984 | false |
cfei18/incubator-airflow | airflow/operators/check_operator.py | 5 | 9941 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 1,492,536,663,388,316,000 | 36.942748 | 85 | 0.611608 | false |
maxamillion/ansible | test/lib/ansible_test/_internal/ci/__init__.py | 21 | 8224 | """Support code for CI environments."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import abc
import base64
import json
import os
import tempfile
from .. import types as t
from ..encoding import (
to_bytes,
to_text,
)
from ..io import (
read_text_file,
w... | gpl-3.0 | -6,043,466,508,416,780,000 | 34.912664 | 157 | 0.657223 | false |
skuda/client-python | kubernetes/client/models/v1_node_selector.py | 1 | 3415 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | -6,541,284,341,743,627,000 | 28.439655 | 105 | 0.555783 | false |
andreesg/bda.plone.payment | src/bda/plone/payment/__init__.py | 1 | 2636 | # -*- coding: utf-8 -*-
from bda.plone.payment.interfaces import IPayment
from bda.plone.payment.interfaces import IPaymentEvent
from bda.plone.payment.interfaces import IPaymentFailedEvent
from bda.plone.payment.interfaces import IPaymentSettings
from bda.plone.payment.interfaces import IPaymentSuccessEvent
from zope.... | bsd-3-clause | -1,793,057,859,821,934,800 | 27.042553 | 79 | 0.670713 | false |
jianran/spark | examples/src/main/python/ml/quantile_discretizer_example.py | 123 | 1707 | #
# 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 | 3,423,585,803,748,837,000 | 34.5625 | 88 | 0.707088 | false |
sandhujasmine/conda-build | conda_build/exceptions.py | 8 | 1182 | import textwrap
SEPARATOR = "-" * 70
indent = lambda s: textwrap.fill(textwrap.dedent(s))
class CondaBuildException(Exception):
pass
class YamlParsingError(CondaBuildException):
pass
class UnableToParse(YamlParsingError):
def __init__(self, original, *args, **kwargs):
super(UnableToParse, sel... | bsd-3-clause | -4,719,867,041,256,370,000 | 24.695652 | 71 | 0.576142 | false |
tmpgit/intellij-community | python/lib/Lib/socket.py | 73 | 54596 | """
This is an updated socket module for use on JVMs > 1.5; it is derived from the old jython socket module.
It is documented, along with known issues and workarounds, on the jython wiki.
http://wiki.python.org/jython/NewSocketModule
"""
_defaulttimeout = None
import errno
import jarray
import string
import struct
im... | apache-2.0 | 1,362,556,074,297,899,800 | 33.467172 | 180 | 0.589695 | false |
katfang/django-guardian | guardian/admin.py | 37 | 15993 | from __future__ import unicode_literals
from django import forms
from django.conf import settings
from guardian.compat import url, patterns
from django.contrib import admin
from django.contrib import messages
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.core.urlresolvers import reverse
f... | bsd-2-clause | 8,433,074,742,907,653,000 | 38.007317 | 138 | 0.611142 | false |
chris-chris/tensorflow | tensorflow/contrib/slim/python/slim/nets/resnet_v2_test.py | 49 | 18547 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,453,306,463,318,792,000 | 40.678652 | 80 | 0.615733 | false |
hubo1016/vlcp | doc/source/ext/gendoc.py | 1 | 4701 | '''
Created on 2017/1/13
:author: hubo
'''
from configlist import list_config
from listmodules import list_modules, list_proxy
import jinja2
import os
import os.path
import shutil
from pkgutil import walk_packages
from vlcp.event import Event
def _merge_all(func):
def _func():
result = func('vlcp')
... | apache-2.0 | -2,827,953,606,072,934,400 | 38.838983 | 141 | 0.541374 | false |
ByteInternet/libcloud | libcloud/test/test_types.py | 68 | 3681 | # 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 ... | apache-2.0 | 5,038,615,631,753,387,000 | 31.866071 | 74 | 0.61668 | false |
saydulk/horizon | openstack_dashboard/dashboards/project/volumes/volumes/tables.py | 17 | 19481 | # Copyright 2012 Nebula, 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 agree... | apache-2.0 | -5,402,396,461,038,014,000 | 36.106667 | 79 | 0.591191 | false |
sklnet/beyonwiz-enigma2 | lib/python/Screens/WizardLanguage.py | 6 | 1151 | from Screens.Wizard import Wizard
from Components.Label import Label
from Components.Language import language
from os import system
class WizardLanguage(Wizard):
def __init__(self, session, showSteps = True, showStepSlider = True, showList = True, showConfig = True):
Wizard.__init__(self, session, showSteps, showSt... | gpl-2.0 | 6,397,110,349,425,385,000 | 32.852941 | 120 | 0.770634 | false |
Simran-B/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/encodings/euc_jisx0213.py | 816 | 1051 | #
# euc_jisx0213.py: Python Unicode Codec for EUC_JISX0213
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_jp, codecs
import _multibytecodec as mbc
codec = _codecs_jp.getcodec('euc_jisx0213')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(m... | apache-2.0 | 8,363,706,389,705,244,000 | 25.948718 | 74 | 0.70314 | false |
alanbowman/home-assistant | homeassistant/components/switch/__init__.py | 4 | 4104 | """
homeassistant.components.switch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Component to interface with various switches that can be controlled remotely.
"""
from datetime import timedelta
import logging
import os
from homeassistant.config import load_yaml_config_file
from homeassistant.helpers.entity_component import EntityC... | mit | 6,389,894,774,043,276,000 | 27.901408 | 77 | 0.648148 | false |
kaste/waterf | tests/enqueue_test.py | 1 | 5368 | import pytest
from _helper import consume, tick, count_tasks
notimplemented = xfail = pytest.mark.xfail
beforeEach = pytest.mark.usefixtures
import datetime
from waterf import queue, task, snake
messages = []
@pytest.fixture
def clear_messages():
while messages:
messages.pop()
def P(message='P'):
... | bsd-2-clause | 4,655,545,624,584,011,000 | 30.576471 | 77 | 0.548808 | false |
andela-earinde/bellatrix-py | app/js/lib/lib/modules/test/test_fileio.py | 8 | 16500 | # Adapted from test_file.py by Daniel Stutzbach
from __future__ import unicode_literals
import sys
import os
import errno
import unittest
from array import array
from weakref import proxy
from functools import wraps
from UserList import UserList
from test.test_support import TESTFN, check_warnings, run_unittest, mak... | mit | 1,552,531,058,360,466,200 | 31.803181 | 83 | 0.544121 | false |
bixbydev/Bixby | google/dist/gdata-2.0.18/tests/gdata_tests/spreadsheets/live_client_test.py | 23 | 10326 | #!/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 | -1,331,789,492,698,588,000 | 38.868726 | 79 | 0.685648 | false |
SNoiraud/gramps | gramps/plugins/db/dbapi/test/db_test.py | 8 | 33651 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2016 Nick Hall
#
# 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) a... | gpl-2.0 | 5,173,359,953,541,537,000 | 37.67931 | 79 | 0.487801 | false |
jmservera/connectthedots | Devices/GatewayConnectedDevices/BLEMoisture/SensorAgent.py | 12 | 4093 | '''
Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitati... | mit | 2,547,338,478,582,387,000 | 39.127451 | 179 | 0.666748 | false |
minhphung171093/OpenERP_V8 | openerp/addons/event/report/report_event_registration.py | 310 | 4079 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -8,981,923,481,959,219,000 | 44.322222 | 188 | 0.585683 | false |
Jgarcia-IAS/ReporsitorioVacioOdoo | openerp/addons/product_extended/wizard/__init__.py | 374 | 1078 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 | 7,043,263,708,338,221,000 | 42.12 | 78 | 0.611317 | false |
MontyThibault/Force-Sensor-Integration | MayaIntegration/SixAxis.py | 1 | 2895 | from ctypes import *
import maya.cmds as cmds
import Calibration as C
import unittest
class SixAxis(object):
def __init__(self, device, channels, name, load = True):
""" Maps a single six-axis sensor to a Maya transform
Device: An instance of PAIO.AIODevice()
Channels: The channel indicies for the sensor in th... | mit | 344,397,595,779,008,000 | 25.09009 | 74 | 0.692573 | false |
akaszynski/vtkInterface | examples/00-load/create-geometric-objects.py | 1 | 1356 | """
.. _ref_geometric_example:
Geometric Objects
~~~~~~~~~~~~~~~~~
The "Hello, world!" of VTK
"""
import pyvista as pv
###############################################################################
# This runs through several of the available geomoetric objects available in
# VTK which PyVista provides simple conve... | mit | -3,061,681,696,562,847,000 | 24.584906 | 79 | 0.600295 | false |
akornatskyy/sample-blog-api | src/config.py | 1 | 4285 | """
"""
import logging
import os
import sys
from datetime import timedelta
try: # pragma: nocover
from ConfigParser import ConfigParser
config = ConfigParser()
except ImportError: # pragma: nocover
from configparser import ConfigParser
config = ConfigParser(strict=False)
from wheezy.caching.logging... | mit | -7,873,459,189,182,591,000 | 29.176056 | 78 | 0.705251 | false |
ahelsing/geni-ch | tools/guard_utils.py | 1 | 29623 | #----------------------------------------------------------------------
# Copyright (c) 2011-2015 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | mit | 8,756,129,583,212,817,000 | 38.183862 | 102 | 0.614691 | false |
elky/django | django/middleware/http.py | 39 | 1636 | from django.utils.cache import (
cc_delim_re, get_conditional_response, set_response_etag,
)
from django.utils.deprecation import MiddlewareMixin
from django.utils.http import parse_http_date_safe
class ConditionalGetMiddleware(MiddlewareMixin):
"""
Handle conditional GET operations. If the response has a... | bsd-3-clause | 1,925,139,212,509,101,600 | 37.952381 | 84 | 0.651589 | false |
pchauncey/ansible | lib/ansible/constants.py | 11 | 4431 | # Copyright (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
... | gpl-3.0 | 3,159,792,967,252,214,300 | 34.733871 | 134 | 0.654705 | false |
sposs/DIRAC | WorkloadManagementSystem/JobWrapper/WatchdogFactory.py | 7 | 2208 | ########################################################################
# $HeadURL$
# File : WatchdogFactory.py
# Author : Stuart Paterson
########################################################################
""" The Watchdog Factory instantiates a given Watchdog based on a quick
determination of the local... | gpl-3.0 | 1,571,040,758,825,177,600 | 35.196721 | 126 | 0.569293 | false |
bigdatauniversity/edx-platform | common/test/acceptance/tests/studio/test_studio_bad_data.py | 173 | 3970 | from base_studio_test import ContainerBase
from ...fixtures.course import XBlockFixtureDesc
from ...pages.studio.utils import verify_ordering
class BadComponentTest(ContainerBase):
"""
Tests that components with bad content do not break the Unit page.
"""
__test__ = False
def get_bad_html_content... | agpl-3.0 | 7,034,961,506,203,495,000 | 38.7 | 119 | 0.625189 | false |
PaoloCifariello/Node-Raspberry-GMusic | src/py_modules/url_getter.py | 1 | 1438 | import pygame, StringIO, sys, socket, os
from gmusicapi import Webclient, exceptions
class UrlGetter:
def __init__(self, sck_path, user, passwd):
pygame.init()
pygame.mixer.init()
self.sck_path = sck_path
self.webapi = Webclient()
self.socket = socket.socket(socket.AF... | mit | -8,829,889,209,707,210,000 | 25.145455 | 78 | 0.527121 | false |
Pointedstick/ReplicatorG | skein_engines/skeinforge-40/fabmetheus_utilities/miscellaneous/fabricate/example.py | 23 | 3740 | #!/usr/bin/python
try:
import serial
except:
print('You do not have pySerial installed, which is needed to control the serial port.')
print('Information on pySerial is at:\nhttp://pyserial.wiki.sourceforge.net/pySerial')
import reprap, time, sys
#reprap.snap.printOutgoingPackets = True
#reprap.snap.printIncomingPa... | gpl-2.0 | 5,781,374,852,292,309,000 | 24.972222 | 89 | 0.649733 | false |
Reinis/openbabel | test/testfastsearch.py | 2 | 1907 | """Test OpenBabel executables from Python
Note: Python bindings not used
On Windows or Linux, you can run these tests at the commandline
in the build folder with:
"C:\Program Files\CMake 2.6\bin\ctest.exe" -C CTestTestfile.cmake
-R pytest -VV
You could also "chdir" into bui... | gpl-2.0 | -7,050,159,164,864,471,000 | 31.322034 | 85 | 0.644468 | false |
naresh21/synergetics-edx-platform | lms/djangoapps/certificates/migrations/0003_data__default_modes.py | 54 | 1388 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Converted from the original South migration 0002_default_rate_limit_config.py
from django.db import migrations, models
from django.conf import settings
from django.core.files import File
def forwards(apps, schema_editor):
"""Add default modes"""
... | agpl-3.0 | -214,233,039,154,944,100 | 32.853659 | 106 | 0.653458 | false |
slipperyhank/pyphi | pyphi/models/fmt.py | 1 | 12680 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# models/fmt.py
"""
Helper functions for formatting pretty representations of PyPhi models.
"""
from itertools import chain
from .. import config, utils
# TODO: will these print correctly on all terminals?
SMALL_PHI = "\u03C6"
BIG_PHI = "\u03D5"
# repr verbosity leve... | gpl-3.0 | -6,574,216,693,771,430,000 | 28.55711 | 80 | 0.582571 | false |
musically-ut/statsmodels | statsmodels/graphics/tests/test_dotplot.py | 26 | 15330 | import numpy as np
from statsmodels.graphics.dotplots import dot_plot
import pandas as pd
from numpy.testing import dec
# If true, the output is written to a multi-page pdf file.
pdf_output = False
try:
import matplotlib.pyplot as plt
import matplotlib
have_matplotlib = True
except ImportError:
have_m... | bsd-3-clause | -7,396,296,424,038,274,000 | 35.5 | 84 | 0.605545 | false |
jonathanmarvens/jeeves | test/gallery/location/confidentiality/Location.py | 3 | 2705 | '''
Location example for Jeeves with confidentiality policies.
'''
from abc import ABCMeta, abstractmethod
from macropy.case_classes import macros, enum
import JeevesLib
from sourcetrans.macro_module import macros, jeeves
class InternalError(Exception):
def __init__(self, message):
self.message = message
# De... | mit | 4,861,977,379,362,715,000 | 26.886598 | 72 | 0.663586 | false |
xkmato/tracpro | tracpro/baseline/tests/test_charts.py | 2 | 5235 | from __future__ import unicode_literals
import datetime
from dateutil.relativedelta import relativedelta
import pytz
from tracpro.test import factories
from tracpro.test.cases import TracProTest
from ..charts import chart_baseline
from ..forms import BaselineTermFilterForm
from ..models import BaselineTerm
class... | bsd-3-clause | -4,913,954,953,545,818,000 | 38.961832 | 94 | 0.609742 | false |
ljmanso/AGM2 | AGGLPlanner/agglplannerclient.py | 1 | 1406 | #sudo apt-get install pypy pypy-setuptools
#git clone https://github.com/eleme/thriftpy.git
#cd thriftpy
#make sudo pypy setup.py install
#from thriftpy.protocol.binary import TBinaryProtocolFactory
#from thriftpy.transport.buffered import TBufferedTransportFactory
#from thriftpy.transport.framed import TFramedTranspo... | gpl-3.0 | -4,196,061,822,939,887,600 | 38.055556 | 120 | 0.795875 | false |
WeblateOrg/weblate | weblate/addons/management/commands/list_addons.py | 1 | 3032 | #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | 3,878,167,598,048,669,700 | 42.898551 | 120 | 0.555299 | false |
Antiun/purchase-workflow | mrp_smart_purchase/mrp_smart_purchase.py | 27 | 4265 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publi... | agpl-3.0 | 2,919,693,874,586,617,300 | 43.894737 | 79 | 0.610317 | false |
OscarPDR/labman_ud | labman_ud/entities/publications/views.py | 1 | 23606 | # -*- coding: utf-8 -*-
import threading
import weakref
import re
# from django.template.defaultfilters import slugify
from django.core import serializers
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator
from django.http import ... | gpl-3.0 | 9,083,560,607,378,424,000 | 38.539363 | 154 | 0.580386 | false |
b-dollery/testing | lib/ansible/runner/action_plugins/group_by.py | 134 | 4249 | # Copyright 2012, Jeroen Hoekx <jeroen@hoekx.be>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... | gpl-3.0 | -2,676,165,375,929,184,000 | 38.342593 | 132 | 0.614498 | false |
oknuutti/visnav-py | visnav/render/stars.py | 1 | 34131 | from datetime import datetime
from functools import lru_cache
import cv2
import math
import os
import sqlite3
import re
import time
import numpy as np
import quaternion
from visnav.algo import tools
from visnav.algo.image import ImageProc
from visnav.algo.model import SystemModel
from visnav.missions... | mit | -1,980,179,118,761,377,500 | 41.58493 | 141 | 0.482608 | false |
xkcd1253/Mimi | flask/lib/python2.7/site-packages/whoosh/sorting.py | 6 | 41298 | # Copyright 2011 Matt Chaput. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions a... | gpl-2.0 | 3,757,069,339,159,386,600 | 34.258121 | 84 | 0.601627 | false |
open-mmlab/mmdetection | mmdet/models/dense_heads/reppoints_head.py | 1 | 34356 | import numpy as np
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule
from mmcv.ops import DeformConv2d
from mmdet.core import (build_assigner, build_sampler, images_to_levels,
multi_apply, multiclass_nms, unmap)
from mmdet.core.anchor.point_generator import MlvlPointGenerator
f... | apache-2.0 | 55,407,049,409,072,120 | 44.869159 | 101 | 0.524683 | false |
LarryHillyer/PoolHost | PoolHost/env/Lib/site-packages/django/core/handlers/base.py | 96 | 10769 | from __future__ import unicode_literals
import logging
import sys
import types
import warnings
from django.conf import settings
from django.core import signals
from django.core.exceptions import ImproperlyConfigured, MiddlewareNotUsed
from django.db import connections, transaction
from django.urls import get_resolver... | gpl-3.0 | -3,024,721,698,968,874,500 | 42.076 | 107 | 0.597734 | false |
skirsdeda/django | tests/postgres_tests/test_hstore.py | 25 | 7536 | import json
import unittest
from django.contrib.postgres import forms
from django.contrib.postgres.fields import HStoreField
from django.contrib.postgres.validators import KeysValidator
from django.core import exceptions, serializers
from django.db import connection
from django.test import TestCase
from .models impor... | bsd-3-clause | 2,147,587,496,997,277,700 | 33.568807 | 114 | 0.606157 | false |
architecture-building-systems/CityEnergyAnalyst | cea/tests/__init__.py | 2 | 1234 | """
Run the CEA scripts and unit tests as part of our CI efforts (cf. The Jenkins)
"""
import os
import shutil
import tempfile
import cea.config
import cea.inputlocator
import cea.workflows.workflow
__author__ = "Daren Thomas"
__copyright__ = "Copyright 2020, Architecture and Building Systems - ETH Zurich"
__cred... | mit | -4,881,796,239,058,167,000 | 27.72093 | 123 | 0.702593 | false |
ChienliMa/Blends | blends.py | 1 | 11784 | """
Implement different Image blend Mode.
Author: Chienli Ma
Date: 2015.01.08
Incentive:
It's hard to find a image blending tool in python.
Some rare tool either have little mode or out_of_dated and hard to install.
Therefore I just implement all methods available on in Internet.
Recommended usage:
... | gpl-2.0 | 6,189,994,395,207,775,000 | 33.060694 | 84 | 0.607094 | false |
pabigot/pyxb | tests/trac/trac-0202/check.py | 2 | 1553 | # -*- coding: utf-8 -*-
import logging
if __name__ == '__main__':
logging.basicConfig()
_log = logging.getLogger(__name__)
import unittest
import pyxb
import sample
from pyxb.namespace.builtin import XMLSchema_instance as xsi
class TestTrac0202 (unittest.TestCase):
def tearDown (self):
pyxb.utils.domut... | apache-2.0 | -7,311,206,491,423,847,000 | 36.878049 | 156 | 0.690277 | false |
canassa/django-rest-framework | tests/test_response.py | 68 | 10811 | from __future__ import unicode_literals
from django.conf.urls import include, url
from django.test import TestCase
from django.utils import six
from rest_framework import generics, routers, serializers, status, viewsets
from rest_framework.renderers import (
BaseRenderer, BrowsableAPIRenderer, JSONRenderer
)
from... | bsd-2-clause | -2,592,706,110,948,173,000 | 36.66899 | 112 | 0.676441 | false |
cuongnv23/ansible | test/units/plugins/connection/test_ssh.py | 25 | 29424 | # -*- coding: utf-8 -*-
# (c) 2015, 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 Software Foundation, either version 3 of the License, or
# (a... | gpl-3.0 | -6,702,917,089,576,625,000 | 44.70451 | 149 | 0.628045 | false |
omasanori/gyp | test/subdirectory/gyptest-top-all.py | 261 | 1373 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies building a target and a subsidiary dependent target from a
.gyp file in a subdirectory, without specifying an explicit output b... | bsd-3-clause | -3,653,937,219,375,090,000 | 30.930233 | 73 | 0.694829 | false |
InspectorIncognito/visualization | AndroidRequests/migrations/0904_transformation_eventforbusv2_half_hour_period.py | 1 | 2254 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils import timezone
from django.db import models, migrations
def fill_tables(apps, schema_editor):
eventsforbusv2 = apps.get_model('AndroidRequests', 'EventForBusv2')
eventsforbusstop = apps.get_model('AndroidRequests', 'EventForBus... | gpl-3.0 | -5,810,775,897,405,534,000 | 39.981818 | 119 | 0.661934 | false |
Beauhurst/django | django/contrib/gis/gdal/field.py | 62 | 6699 | from ctypes import byref, c_int
from datetime import date, datetime, time
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.prototypes import ds as capi
from django.utils.encoding import force_text
# For more information, see the OG... | bsd-3-clause | 915,200,774,373,920,800 | 27.628205 | 93 | 0.621287 | false |
tjsavage/rototutor_djangononrel | django/core/cache/backends/base.py | 15 | 5118 | "Base Cache class."
import warnings
from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning
class InvalidCacheBackendError(ImproperlyConfigured):
pass
class CacheKeyWarning(DjangoRuntimeWarning):
pass
# Memcached does not accept keys longer than this.
MEMCACHE_MAX_KEY_LENGTH = 250
cl... | bsd-3-clause | -5,518,294,162,394,194,000 | 31.807692 | 80 | 0.58773 | false |
GrimDerp/numpy | numpy/f2py/diagnose.py | 188 | 5295 | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
import os
import sys
import tempfile
def run_command(cmd):
print('Running %r:' % (cmd))
os.system(cmd)
print('------')
def run():
_path = os.getcwd()
os.chdir(tempfile.gettempdir())
print('------')
pr... | bsd-3-clause | 4,899,266,432,671,819,000 | 32.942308 | 102 | 0.464967 | false |
MagazinnikIvan/pywinauto | pywinauto/tests/overlapping.py | 1 | 7707 | # GUI Application automation and testing library
# Copyright (C) 2006-2017 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or with... | bsd-3-clause | 4,851,115,866,928,656,000 | 34.183099 | 80 | 0.639419 | false |
orbitfp7/horizon | openstack_dashboard/dashboards/identity/users/forms.py | 5 | 9681 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 | 4,872,989,691,457,759,000 | 42.608108 | 78 | 0.554488 | false |
memtoko/django | tests/template_tests/filter_tests/test_chaining.py | 345 | 3940 | from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class ChainingTests(SimpleTestCase):
"""
Chaining safeness-preserving filters should not alter the safe status.
"""
@setup({'chaining01': '{{ a|capfirst|center:"7" }}.{{ b|capfirst|center:"... | bsd-3-clause | 163,067,351,612,124,450 | 44.813953 | 106 | 0.586041 | false |
matmutant/sl4a | python/src/Lib/json/tests/test_scanstring.py | 50 | 3738 | import sys
import decimal
from unittest import TestCase
import json
import json.decoder
class TestScanString(TestCase):
def test_py_scanstring(self):
self._test_scanstring(json.decoder.py_scanstring)
def test_c_scanstring(self):
self._test_scanstring(json.decoder.c_scanstring)
def _test_... | apache-2.0 | -8,849,219,774,212,633,000 | 33.293578 | 102 | 0.535581 | false |
saiwing-yeung/scikit-learn | examples/calibration/plot_calibration.py | 66 | 4795 | """
======================================
Probability calibration of classifiers
======================================
When performing classification you often want to predict not only
the class label, but also the associated probability. This probability
gives you some kind of confidence on the prediction. However,... | bsd-3-clause | 3,474,531,493,541,490,700 | 40.336207 | 80 | 0.708238 | false |
foss-transportationmodeling/rettina-server | .env/lib/python2.7/site-packages/sqlalchemy/sql/expression.py | 21 | 5668 | # sql/expression.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Defines the public namespace for SQL expression constructs.
Prior to version 0... | apache-2.0 | 8,975,929,962,325,991,000 | 41.298507 | 78 | 0.740473 | 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.