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 |
|---|---|---|---|---|---|---|---|---|---|---|
oppia/oppia | extensions/interactions/MultipleChoiceInput/MultipleChoiceInput.py | 4 | 2849 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 | 5,902,671,003,178,104,000 | 32.916667 | 79 | 0.585118 | false |
sourcepole/qgis | qgis/python/plugins/fTools/tools/doReProject.py | 3 | 6615 | # -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import ftools_utils
from qgis.core import *
from qgis.gui import *
from ui_frmReProject import Ui_Dialog
import types
class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
self.iface = iface
... | gpl-2.0 | -5,447,309,672,979,438,000 | 50.27907 | 256 | 0.637944 | false |
postlund/home-assistant | tests/util/test_distance.py | 14 | 2520 | """Test Home Assistant distance utility functions."""
import pytest
from homeassistant.const import (
LENGTH_FEET,
LENGTH_KILOMETERS,
LENGTH_METERS,
LENGTH_MILES,
)
import homeassistant.util.distance as distance_util
INVALID_SYMBOL = "bob"
VALID_SYMBOL = LENGTH_KILOMETERS
def test_convert_same_unit... | apache-2.0 | 4,716,703,524,053,645,000 | 35.521739 | 87 | 0.713492 | false |
sergiyprotsiv/openaddresses | scripts/si/addNames.py | 5 | 3893 | # -*- coding: utf-8 -*-
import __future__
import csv, sys, json, copy, datetime, time, os
def readDictionary(path, filename):
dict = {}
with open(os.path.join(path, filename)) as f:
reader = csv.reader(f, delimiter=';')
next(reader) # skip header
for row in reader:
dict[row... | bsd-3-clause | 8,621,906,740,754,205,000 | 34.568807 | 110 | 0.632706 | false |
neurodata/ndstore | scripts/ingest/kanno/denseingest.py | 2 | 3846 | # Copyright 2014 NeuroData (http://neurodata.io)
#
# 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 | -363,374,322,400,247,700 | 31.871795 | 198 | 0.617525 | false |
0ps/plecost | plecost_lib/doc/en/source/conf.py | 2 | 10274 | # -*- coding: utf-8 -*-
#
# Plecost documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 11 01:21:33 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | bsd-3-clause | 6,861,128,514,571,701,000 | 30.039275 | 80 | 0.707806 | false |
memeshack/lolgit | hangups/message_parser.py | 5 | 4754 | """Parser for message formatting markup."""
import re
from reparser import Parser, Token, MatchGroup
from hangups.schemas import SegmentType
# Common regex patterns
boundary_chars = r'\s`!()\[\]{{}};:\'".,<>?«»“”‘’*_~='
b_left = r'(?:(?<=[' + boundary_chars + r'])|(?<=^))' # Lookbehind
b_right = r'(?:(?=[' + bound... | mit | 6,174,893,147,945,424,000 | 40.526316 | 93 | 0.555556 | false |
googleads/google-ads-python | google/ads/googleads/v7/enums/types/access_invitation_status.py | 1 | 1194 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -1,475,745,770,913,457,400 | 28.85 | 74 | 0.69598 | false |
jonparrott/gcloud-python | spanner/tests/unit/test_streamed.py | 3 | 40891 | # Copyright 2016 Google LLC 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 ag... | apache-2.0 | 359,996,281,145,104,000 | 37.759242 | 79 | 0.60627 | false |
dougfelt/nototools | nototools/generate_fontdiff_input.py | 2 | 1951 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -2,246,089,513,569,353,000 | 33.839286 | 78 | 0.64326 | false |
ssarangi/numba | numba/cuda/tests/cudadrv/test_reset_device.py | 8 | 1184 | from __future__ import print_function, absolute_import, division
import threading
from numba import cuda
from numba.cuda.cudadrv.driver import driver
from numba.cuda.testing import unittest, CUDATestCase
try:
from Queue import Queue # Python 2
except:
from queue import Queue # Python 3
class TestResetDevic... | bsd-2-clause | -888,023,770,386,663,700 | 27.878049 | 71 | 0.592905 | false |
tomka/CATMAID | django/applications/catmaid/control/point.py | 2 | 6638 | # -*- coding: utf-8 -*-
from django.shortcuts import get_object_or_404
from django.utils.decorators import method_decorator
from catmaid.control.authentication import requires_user_role, can_edit_or_fail
from catmaid.models import Point, UserRole
from catmaid.serializers import PointSerializer
from rest_framework.re... | gpl-3.0 | -7,236,466,781,905,183,000 | 32.867347 | 134 | 0.576077 | false |
martong/python-mode | pymode/libs/pylama/config.py | 13 | 6016 | """ Parse arguments from command line and configuration files. """
import fnmatch
import sys
import os
from re import compile as re
import logging
from argparse import ArgumentParser
from . import __version__
from .libs.inirama import Namespace
from .lint.extensions import LINTERS
# Setup a logger
LOGGER = logging.... | lgpl-3.0 | -2,540,613,288,940,328,400 | 25.737778 | 75 | 0.620678 | false |
numerigraphe/odoomrp-wip | mrp_project_link/models/project_project.py | 16 | 2484 | # -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | agpl-3.0 | 7,232,300,517,557,215,000 | 42.578947 | 78 | 0.586957 | false |
Aaronneyer/kraller | kraller/kraller.py | 3 | 8373 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Kraller
An application to allow signups for accounts on a server with a key.
"""
from functools import wraps
import logging
from logging.handlers import SMTPHandler
import os
import re
from urllib import urlencode
from flask import Flask, abort, render_template, redirect... | bsd-2-clause | 8,322,778,296,389,412,000 | 31.964567 | 147 | 0.639436 | false |
vivekdhayaal/keystone | keystone/token/persistence/backends/sql.py | 6 | 11002 | # Copyright 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 in... | apache-2.0 | 5,088,823,085,838,505,000 | 37.876325 | 79 | 0.605799 | false |
norov/glibc | scripts/build-many-glibcs.py | 1 | 70695 | #!/usr/bin/python3
# Build many configurations of glibc.
# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Fr... | gpl-2.0 | -956,953,792,958,987,000 | 43.574401 | 100 | 0.496683 | false |
geokrety/geokrety-api | tests/unittests/api/moves_comments/test_move_comment_delete.py | 2 | 3472 | # -*- coding: utf-8 -*-
from flask import current_app
from parameterized import parameterized
from app.api.helpers.data_layers import (MOVE_COMMENT_TYPE_MISSING,
MOVE_TYPE_DROPPED)
from tests.unittests.utils.base_test_case import BaseTestCase, request_context
from tests.unitte... | gpl-3.0 | 5,816,123,954,174,530,000 | 38.908046 | 109 | 0.648329 | false |
mikaelpatel/Cosa | build/PlatformIO/platform/cosa/platform.py | 3 | 1445 | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# 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 applicabl... | lgpl-2.1 | -3,250,313,395,905,753,000 | 38.054054 | 74 | 0.680277 | false |
missionpinball/mpf-examples | cookbook/TAF_mansion_awards/tests/test_taf_mansion_awards.py | 1 | 8600 | from mpf.tests.MpfMachineTestCase import MpfMachineTestCase
class TestTafMansionAwards(MpfMachineTestCase):
def _start_single_player_game(self, secs_since_plunge):
self.hit_and_release_switch('start')
# game should be running
self.assertIsNotNone(self.machine.game)
self.assertEqu... | mit | 8,448,376,711,812,944,000 | 34.983264 | 108 | 0.654302 | false |
appsembler/edx-platform | common/djangoapps/track/views/tests/test_segmentio.py | 14 | 19034 | """Ensure we can parse events sent to us from the Segment webhook integration"""
from datetime import datetime
import json
from ddt import ddt, data, unpack
from mock import sentinel
from nose.plugins.attrib import attr
from django.contrib.auth.models import User
from django.test.utils import override_settings
from... | agpl-3.0 | 3,170,615,436,583,846,400 | 41.203991 | 149 | 0.545918 | false |
alex/sqlalchemy | test/ext/declarative/test_mixin.py | 3 | 39191 | from sqlalchemy.testing import eq_, assert_raises, \
assert_raises_message, is_
from sqlalchemy.ext import declarative as decl
import sqlalchemy as sa
from sqlalchemy import testing
from sqlalchemy import Integer, String, ForeignKey
from sqlalchemy.testing.schema import Table, Column
from sqlalchemy.orm import rela... | mit | 375,318,797,681,062,500 | 30.252791 | 79 | 0.538593 | false |
Ecpy/ecpy | exopy/measurement/editors/database_access_editor/editor_model.py | 1 | 12086 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018-2018 by Exopy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ----------... | bsd-3-clause | 5,820,192,825,398,666,000 | 32.949438 | 79 | 0.518286 | false |
solin319/incubator-mxnet | tests/python/unittest/test_gluon_data.py | 11 | 4615 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 6,379,889,225,420,548,000 | 40.205357 | 103 | 0.678657 | false |
jumpstarter-io/keystone | keystone/auth/plugins/password.py | 6 | 1707 | # Copyright 2013 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 in... | apache-2.0 | 4,995,053,922,877,340,000 | 33.836735 | 79 | 0.704745 | false |
tedelhourani/ansible | lib/ansible/modules/cloud/misc/serverless.py | 26 | 6837 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Ryan Scott Brown <ryansb@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',... | gpl-3.0 | -3,198,238,929,038,244,000 | 31.402844 | 152 | 0.655404 | false |
seims/SEIMS | preprocess/soil_param.py | 2 | 27856 | #! /usr/bin/env python
# coding=utf-8
#
# @Author: Junzhi Liu, 2013-1-10
# @Revised: Liang-Jun Zhu, Huiran Gao, Fang Shen
# @Revised date: 2016-7-22
# @Note: 1. Names and units of soil physical parameter are referred to readsol.f, soil_par.f, and soil_phys.f in SWAT
# 2. Data validation checking is also conducte... | gpl-2.0 | -2,608,813,226,555,334,000 | 47.445217 | 118 | 0.53213 | false |
QJonny/CyNest | extras/ConnPlotter/build/lib.linux-x86_64-2.7/ConnPlotter/colormaps.py | 4 | 7098 | # ConnPlotter --- A Tool to Generate Connectivity Pattern Matrices
#
# This file is part of ConnPlotter.
#
# Copyright (C) 2009 Hans Ekkehard Plesser/UMB
#
# ConnPlotter 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 Fou... | gpl-2.0 | 1,749,659,060,957,901,000 | 34.848485 | 89 | 0.434348 | false |
nvoron23/hue | desktop/core/ext-py/Pygments-1.3.1/pygments/formatters/bbcode.py | 75 | 3314 | # -*- coding: utf-8 -*-
"""
pygments.formatters.bbcode
~~~~~~~~~~~~~~~~~~~~~~~~~~
BBcode formatter.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.formatter import Formatter
from pygments.util import get_bool_opt
__al... | apache-2.0 | 5,246,087,543,863,821,000 | 29.40367 | 78 | 0.539529 | false |
kamawanu/pydbgr | trepan/interface.py | 2 | 2837 | # -*- coding: utf-8 -*-
# Copyright (C) 2010, 2013 Rocky Bernstein <rocky@gnu.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 License, or
# (at your opti... | gpl-3.0 | 7,304,066,626,211,151,000 | 34.024691 | 75 | 0.667254 | false |
2ndQuadrant/ansible | lib/ansible/modules/network/iosxr/iosxr_logging.py | 45 | 30474 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, 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',
... | gpl-3.0 | -598,276,708,112,361,100 | 40.975207 | 132 | 0.546269 | false |
google-research/mma | libml/data_pair.py | 1 | 2663 | # coding=utf-8
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | 7,481,708,591,580,205,000 | 39.969231 | 117 | 0.593316 | false |
rlr/fjord | vendor/packages/translate-toolkit/translate/lang/test_common.py | 3 | 5288 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from translate.lang import common
from pytest import mark
def test_characters():
"""Test the basic characters segmentation"""
language = common.Common
assert language.characters(u"") == []
assert language.characters(u"Four") == [u"F", u"o", u"u", u"r"]
... | bsd-3-clause | -8,005,650,521,094,000,000 | 40.392 | 221 | 0.661384 | false |
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | python-packages/mne-python-0.10/mne/io/tests/test_reference.py | 3 | 13025 | # Authors: Marijn van Vliet <w.m.vanvliet@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import warnings
import os.path as op
import numpy as np
from nose.tools import assert_true, assert_equal, assert_raise... | bsd-3-clause | 1,385,957,040,128,003,300 | 41.42671 | 79 | 0.629251 | false |
dschwoerer/espresso | src/python/espressomd/gen_code_info.py | 4 | 1800 | # Copyright (C) 2016 The ESPResSo project
# Copyright (C) 2014 Olaf Lenz
#
# This file is part of ESPResSo.
#
# ESPResSo 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 | 7,520,917,404,588,576 | 25.086957 | 75 | 0.708333 | false |
jshiv/turntable | test/lib/python2.7/site-packages/scipy/linalg/decomp_schur.py | 9 | 8380 | """Schur decomposition functions."""
from __future__ import division, print_function, absolute_import
import numpy
from numpy import asarray_chkfinite, single, asarray
from scipy.lib.six import callable
# Local imports.
from . import misc
from .misc import LinAlgError, _datacopied
from .lapack import get_lapack_func... | mit | -6,437,494,931,466,885,000 | 32.927126 | 83 | 0.576611 | false |
Connexions/rbit | setup.py | 1 | 1039 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2013 Rice University
This software is subject to the provisions of the GNU AFFERO GENERAL PUBLIC LICENSE Version 3.0 (AGPL).
See LICENSE.txt for details.
"""
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = o... | lgpl-2.1 | 5,691,639,557,888,541,000 | 22.088889 | 105 | 0.641001 | false |
fusionpig/ansible | lib/ansible/constants.py | 3 | 16716 | # (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 | 7,276,075,401,001,199,000 | 66.403226 | 195 | 0.665769 | false |
zhoucen/gunicorn | setup.py | 10 | 3070 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from gunicorn import __version__
CLASSIFIERS = [
'Development S... | mit | 8,594,250,494,716,624,000 | 28.238095 | 72 | 0.638111 | false |
deKupini/erp | addons/website/models/ir_http.py | 3 | 13266 | # -*- coding: utf-8 -*-
import datetime
import hashlib
import logging
import os
import re
import traceback
import werkzeug
import werkzeug.routing
import werkzeug.utils
import openerp
from openerp.addons.base import ir
from openerp.addons.base.ir import ir_qweb
from openerp.addons.website.models.website import slug, ... | agpl-3.0 | 8,553,444,281,619,699,000 | 45.384615 | 143 | 0.57131 | false |
hpi-xnor/BMXNet | example/speech-demo/io_func/utils.py | 25 | 5707 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -6,621,914,986,255,953,000 | 32.570588 | 100 | 0.59611 | false |
lagopus/ryu-lagopus-ext | ryu/services/protocols/bgp/info_base/base.py | 4 | 43319 | # Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | apache-2.0 | -943,357,946,213,218,200 | 33.517131 | 79 | 0.573974 | false |
Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/twisted/cred/credentials.py | 30 | 15450 | # -*- test-case-name: twisted.test.test_newcred-*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from zope.interface import implements, Interface
import hmac, time, random
from twisted.python.hashlib import md5
from twisted.python.randbytes import secureRandom
from twisted.cred._digest imp... | gpl-3.0 | 9,024,818,655,870,962,000 | 30.987578 | 80 | 0.633074 | false |
aperigault/ansible | test/units/modules/crypto/test_luks_device.py | 23 | 8409 | import pytest
from ansible.modules.crypto import luks_device
class DummyModule(object):
# module to mock AnsibleModule class
def __init__(self):
self.params = dict()
def fail_json(self, msg=""):
raise ValueError(msg)
def get_bin_path(self, command, dummy):
return command
# ... | gpl-3.0 | -7,181,695,188,217,535,000 | 36.373333 | 82 | 0.587941 | false |
vitan/django | tests/test_client_regress/urls.py | 25 | 2463 | from django.conf.urls import include, url
from django.views.generic import RedirectView
from . import views
urlpatterns = [
url(r'', include('test_client.urls')),
url(r'^no_template_view/$', views.no_template_view),
url(r'^staff_only/$', views.staff_only_view),
url(r'^get_view/$', views.get_view),
... | bsd-3-clause | 1,625,592,356,221,824,300 | 59.073171 | 107 | 0.672757 | false |
diedthreetimes/VCrash | pybindgen-0.15.0.795/.waf-1.5.9-0c853694b62ef4240caa9158a9f2573d/wafadmin/Logs.py | 1 | 2494 | #! /usr/bin/env python
# encoding: utf-8
import os,re,logging,traceback,sys
from Constants import*
zones=''
verbose=0
colors_lst={'USE':True,'BOLD':'\x1b[01;1m','RED':'\x1b[01;91m','GREEN':'\x1b[32m','YELLOW':'\x1b[33m','PINK':'\x1b[35m','BLUE':'\x1b[01;34m','CYAN':'\x1b[36m','NORMAL':'\x1b[0m','cursor_on':'\x1b[?25h'... | gpl-2.0 | -1,031,789,942,086,977,700 | 25.531915 | 228 | 0.668805 | false |
PrairieLearn/PrairieLearn | exampleCourse/elements/clickable-image/clickable-image.py | 1 | 3105 | import chevron
import lxml.html
import prairielearn as pl
import random
def prepare(element_html, data):
element = lxml.html.fragment_fromstring(element_html)
pl.check_attribs(element, required_attribs=['answers-name'], optional_attribs=[])
name = pl.get_string_attrib(element, 'answers-name')
number ... | agpl-3.0 | -8,148,477,353,597,223,000 | 35.964286 | 108 | 0.639291 | false |
SepehrMN/nest-simulator | pynest/nest/tests/test_stdp_multiplicity.py | 15 | 9321 | # -*- coding: utf-8 -*-
#
# test_stdp_multiplicity.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 ... | gpl-2.0 | -3,635,231,856,413,262,300 | 37.8375 | 79 | 0.589744 | false |
Crespo911/pyspace | pySPACE/run/gui/node_chain_GUI.py | 4 | 48976 | """ Graphical user interface to create a complete processing flow
This version uses PyQt4 and YAML, and was developed with Python 2.6.5
When started the GUI is checking for all existing nodes. It lists them and the corresponding parameters.
Comments can also be inserted. They will appear at the beginning of the outp... | gpl-3.0 | -804,507,696,264,230,000 | 49.283368 | 208 | 0.639599 | false |
endlessm/chromium-browser | tools/json_schema_compiler/idl_schema.py | 3 | 21823 | #! /usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import itertools
import json
import os.path
import pprint
import re
import sys
if sys.vers... | bsd-3-clause | 5,246,746,538,860,953,000 | 36.240614 | 80 | 0.625945 | false |
hungtt57/matchmaker | lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/utils.py | 4 | 1991 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import warnings
from pyasn1.codec.der import decoder, encoder
from pyasn... | mit | 192,957,968,989,777,060 | 27.042254 | 79 | 0.681567 | false |
cwtaylor/viper | viper/modules/peepdf/colorama/ansitowin32.py | 43 | 6182 |
import re
import sys
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll
if windll is not None:
winterm = WinTerm()
def is_a_tty(stream):
return hasattr(stream, 'isatty') and stream.isatty()
class StreamWrappe... | bsd-3-clause | -1,934,969,445,790,508,500 | 33.125 | 79 | 0.571498 | false |
glorizen/nupic | tests/unit/nupic/research/temporal_memory_test.py | 19 | 21695 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | agpl-3.0 | -1,946,060,676,359,409,700 | 30.215827 | 95 | 0.633049 | false |
hradec/cortex | python/IECore/ClassLoader.py | 12 | 10600 | ##########################################################################
#
# Copyright (c) 2007-2011, 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:
#
# * Redis... | bsd-3-clause | -2,364,115,616,674,663,000 | 33.083601 | 149 | 0.686887 | false |
vileopratama/vitech | src/addons/account/wizard/account_financial_report.py | 43 | 2809 | # -*- coding: utf-8 -*-
from openerp import api, fields, models
class AccountingReport(models.TransientModel):
_name = "accounting.report"
_inherit = "account.common.report"
_description = "Accounting Report"
@api.model
def _get_account_report(self):
reports = []
if self._context... | mit | -8,505,433,429,684,724,000 | 54.078431 | 248 | 0.640441 | false |
ctdegroot/OpenFOAMTools | modules/FreeSurfaceCalculator.py | 1 | 4388 | import glob
import numpy as np
import os
class FreeSurfaceCalculator(object):
"""Class to calculate the level of a free surface as a function of time.
This assumes that sampled data is organized such that there is one folder
per timestep, containing a single .xy file. The .xy file should contain
... | mit | 4,544,724,996,992,386,000 | 35.272727 | 80 | 0.544895 | false |
sftd/scons | scons-local/SCons/Util.py | 7 | 49072 | """SCons.Util
Various utility functions go here.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "S... | mit | 4,967,142,932,388,679,000 | 31.89008 | 119 | 0.597877 | false |
sjsucohort6/openstack | python/venv/lib/python2.7/site-packages/novaclient/v2/contrib/host_evacuate.py | 5 | 2318 | # Copyright 2013 Rackspace Hosting
# 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 require... | mit | -4,473,016,173,373,141,000 | 35.21875 | 78 | 0.646247 | false |
rsig/jenkins-job-builder | jenkins_jobs/parallel.py | 11 | 5198 | #!/usr/bin/env python
# Copyright (C) 2015 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -385,167,474,104,383,360 | 33.423841 | 79 | 0.596768 | false |
hammerlab/isovar | test/test_value_object.py | 1 | 1113 | from __future__ import print_function, division, absolute_import
from isovar.value_object import ValueObject
from nose.tools import eq_
def test_no_fields_unless_specified():
v = ValueObject()
eq_(v._fields, ())
eq_(v._values, ())
def test_default_string_repr():
v = ValueObject()
eq_(str(v), "V... | apache-2.0 | -5,438,773,729,833,326,000 | 21.26 | 64 | 0.601078 | false |
lpotter/sensorfw | tests/contextfw/orientation/testorientation.py | 2 | 6293 | #!/usr/bin/env python
##
## Copyright (C) 2009-2010 Nokia Corporation
##
## Contact: Jean-Luc Lamadon <jean-luc.lamadon@nokia.com>
## Matias Muhonen <ext-matias.muhonen@nokia.com>
## Tapio Rantala <ext-tapio.rantala@nokia.com>
## Lihan Guo <ext-lihan.4.guo@nokia.com>
##
## This file is part o... | lgpl-2.1 | 2,377,500,349,425,687,000 | 39.6 | 178 | 0.627999 | false |
V155/qutebrowser | scripts/asciidoc2html.py | 5 | 10825 | #!/usr/bin/env python3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 | -8,659,248,438,781,764,000 | 34.726073 | 109 | 0.543834 | false |
codester2/devide | modules/insight/module_index.py | 7 | 12137 | # Copyright (c) Charl P. Botha, TU Delft
# All rights reserved.
# See COPYRIGHT for details.
class ITKtoVTK:
kits = ['itk_kit']
cats = ['Insight']
help = """Use this module to convert from any ITK image type to
the corresponding VTK type.
"""
class VTKtoITK:
kits = ['itk_kit']
cats = ['Ins... | bsd-3-clause | 4,509,483,396,588,039,000 | 32.902235 | 80 | 0.685837 | false |
neilnee/octopus | scrapy_sample/scrapy_sample/settings.py | 1 | 3196 | # -*- coding: utf-8 -*-
# Scrapy settings for scrapy_sample project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/... | apache-2.0 | -3,693,619,621,398,770,000 | 34.511111 | 109 | 0.767522 | false |
vbannai/neutron | neutron/extensions/firewall.py | 3 | 15602 | # Copyright 2013 Big Switch Networks, 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... | apache-2.0 | -2,531,924,139,244,412,400 | 35.624413 | 79 | 0.561659 | false |
p4datasystems/CarnotKE | jyhton/Lib/test/test_repr.py | 12 | 12407 | """
Test cases for the repr module
Nick Mathewson
"""
import sys
import os
import shutil
import unittest
from test.test_support import run_unittest, check_py3k_warnings
from repr import repr as r # Don't shadow builtin repr
from repr import Repr
def nestedTuple(nesting):
t = ()
for i in range(nesting):
... | apache-2.0 | 6,751,600,404,997,393,000 | 36.82622 | 461 | 0.575643 | false |
pku9104038/edx-platform | common/lib/xmodule/xmodule/videoannotation_module.py | 7 | 6581 | """
Module for Video annotations using annotator.
"""
from lxml import etree
from pkg_resources import resource_string
from xmodule.x_module import XModule
from xmodule.raw_module import RawDescriptor
from xblock.core import Scope, String
import textwrap
class AnnotatableFields(object):
""" Fields for `VideoMod... | agpl-3.0 | 3,959,338,050,696,684,000 | 37.261628 | 185 | 0.605227 | false |
reachalpineswift/frappe-bench | frappe/config/desktop.py | 8 | 1740 | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
"Activity": {
"color": "#e67e22",
"icon": "icon-play",
"icon": "octicon octicon-pulse",
"label": _("Activity"),
"link": "activity",
"type": "page"
},
"Calendar": {
"color": "#2980b9",
"icon": "icon-cale... | mit | 4,521,741,137,452,631,000 | 20.481481 | 48 | 0.53046 | false |
PXke/invenio | invenio/legacy/bibrank/record_sorter.py | 1 | 19472 | # -*- coding: utf-8 -*-
## Ranking of records using different parameters and methods on the fly.
##
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General ... | gpl-2.0 | -2,718,542,281,756,288,500 | 42.954853 | 165 | 0.622381 | false |
alexgibson/bedrock | lib/fluent_migrations/firefox/retention/thank-you.py | 4 | 4312 | from __future__ import absolute_import
import fluent.syntax.ast as FTL
from fluent.migrate.helpers import transforms_from
from fluent.migrate.helpers import VARIABLE_REFERENCE, TERM_REFERENCE
from fluent.migrate import REPLACE, COPY
thank_you = "firefox/retention/thank-you.lang"
def migrate(ctx):
"""Migrate bedro... | mpl-2.0 | 4,757,993,256,762,706,000 | 38.888889 | 116 | 0.490019 | false |
clouserw/zamboni | mkt/submit/tests/test_forms.py | 12 | 14318 | from django.forms.fields import BooleanField
from django.test.client import RequestFactory
from django.utils.safestring import SafeText
from django.utils.translation import ugettext_lazy as _
import mock
from nose.tools import eq_, ok_
import mkt
import mkt.site.tests
from mkt.comm.models import CommunicationNote
fro... | bsd-3-clause | 361,190,859,090,516,400 | 38.443526 | 79 | 0.578223 | false |
kemia/kemia | scripts/addnamespaces.py | 1 | 1486 | import os, sys
namespaces = '''
var sys = require('sys');
goog={};
goog.array={};
goog.array.forEach={};
goog.debug={};
goog.events={};
goog.events.pools={};
goog.string={};
goog.userAgent={};
goog.userAgent.jscript={};
goog.userAgent.product={};
goog.structs={};
goog.object={};
goog.iter={};
goog.math={};
goog.graphi... | apache-2.0 | -2,841,521,769,973,920,300 | 18.552632 | 63 | 0.652086 | false |
ageron/tensorflow | tensorflow/contrib/seq2seq/python/ops/helper.py | 11 | 28495 | # 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,127,528,187,332,910,300 | 37.716033 | 89 | 0.653939 | false |
jasondunsmore/heat | heat/tests/test_common_service_utils.py | 7 | 3171 | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,060,401,556,529,435,000 | 41.851351 | 72 | 0.666351 | false |
jacquerie/inspire-dojson | inspire_dojson/data/__init__.py | 2 | 1085 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | gpl-3.0 | 7,282,977,334,080,461,000 | 37.75 | 77 | 0.749309 | false |
BigDataforYou/movie_recommendation_workshop_1 | big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/compat/numpy/__init__.py | 1 | 2259 | """ support numpy compatiblitiy across versions """
import re
import numpy as np
from distutils.version import LooseVersion
from pandas.compat import string_types, string_and_binary_types
# turn off all numpy warnings
np.seterr(all='ignore')
# numpy versioning
_np_version = np.version.short_version
_nlv = LooseVersi... | mit | -35,845,655,230,070,376 | 28.337662 | 74 | 0.593183 | false |
s-garbuzov/pybvc | samples/samplenetconf/demos/ctrl_demo10.py | 4 | 9051 | #!/usr/bin/python
# Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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:
# 1. Redistributions of source code must retain the above copyright n... | bsd-3-clause | -5,867,213,145,645,777,000 | 33.284091 | 78 | 0.595846 | false |
hiryou/pandora_extractor | src/app/Welcome.py | 1 | 1605 | from __init__ import *
class Welcome:
@staticmethod
def disclaimer():
print
print "#################################################################################"
print "# Welcome to PandoraExtractor, a free software which helps you download your #"
print "# favorite musi... | mit | 4,235,529,976,819,997,000 | 60.769231 | 98 | 0.420561 | false |
olivierverdier/sfepy | examples/large_deformation/active_fibres.py | 1 | 4761 | # -*- coding: utf-8 -*-
import numpy as nm
from sfepy import data_dir
filename_mesh = data_dir + '/meshes/3d/cylinder.mesh'
vf_matrix = 0.5
vf_fibres1 = 0.2
vf_fibres2 = 0.3
options = {
'nls' : 'newton',
'ls' : 'ls',
'ts' : 'ts',
'save_steps' : -1,
'post_process_hook' : 'stress_strain',
}
fiel... | bsd-3-clause | 8,988,453,457,501,024,000 | 24.057895 | 79 | 0.485822 | false |
petricm/DIRAC | DataManagementSystem/Service/DataIntegrityHandler.py | 9 | 6693 | """
:mod: DataIntegrityHandler
.. module: DataIntegrityHandler
:synopsis: DataIntegrityHandler is the implementation of the Data Integrity service in
the DISET framework
"""
## imports
from types import DictType, IntType, LongType, ListType, StringTypes
## from DIRAC
from DIRAC.Core.DISET.RequestHandler import... | gpl-3.0 | 6,767,732,409,155,483,000 | 40.06135 | 120 | 0.732706 | false |
Jumpscale/jumpscale_core8 | lib/JumpScale/data/hash/HashTool.py | 1 | 7832 |
from JumpScale import j
# import ExtraTools
import hashlib
import binascii
try:
from pyblake2 import blake2b
except:
rc, out = j.sal.process.execute("pip3 install pyblake2", die=True, outputToStdout=False, ignoreErrorOutput=False)
class HashTool:
def __init__(self):
self.__jslocation__ = "j.dat... | apache-2.0 | -5,521,307,720,803,020,000 | 27.071685 | 174 | 0.600485 | false |
delicb/PyScripts | src/flat_folder.py | 1 | 3941 | #!/usr/bin/env python
__author__ = "Bojan Delic <bojan@delic.in.rs>"
__date__ = "Sep 13, 2010"
import sys
import os
import shutil
from optparse import OptionParser
from utils import get_abs_folder
# TODO: Add optin to exclude file names, extensions, folders etc.
USAGE = "%prog <FOLDER>"
ROOT = ""
o... | mit | -5,815,836,849,265,394,000 | 28.550388 | 83 | 0.59731 | false |
benmuresan/django_work | tango_with_django_project/rango/forms.py | 1 | 1840 | from django import forms
from django.contrib.auth.models import User
from rango.models import Page, Category, UserProfile
class CategoryForm(forms.ModelForm):
name = forms.CharField(max_length=128, help_text="Please enter the category name.")
views = forms.IntegerField(widget=forms.HiddenInput(), initial=0)
... | mit | 539,592,929,100,364,800 | 39.021739 | 92 | 0.681522 | false |
shanestafford/moose | python/FactorySystem/Parser.py | 3 | 3723 | #!/usr/bin/python
import os, sys, re
import ParseGetPot, Factory
from MooseObject import MooseObject
from Warehouse import Warehouse
"""
Parser object for reading GetPot formatted files
"""
class Parser:
def __init__(self, factory, warehouse):
self.factory = factory
self.warehouse = warehouse
self.para... | lgpl-2.1 | 6,957,539,235,142,895,000 | 32.241071 | 100 | 0.628525 | false |
spraints/for-example | hgext/convert/cvsps.py | 4 | 31758 | # Mercurial built-in replacement for cvsps.
#
# Copyright 2008, Frank Kingswood <frank@kingswood-consulting.co.uk>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import os
import re
import cPickle as pickle
from mercurial import ... | gpl-2.0 | -4,641,087,352,338,654,000 | 34.844244 | 80 | 0.491971 | false |
jjellis/marvin | Marvin/app/emboss.py | 1 | 3536 | import os
from subprocess import Popen, PIPE
import wx
import wx.richtext as richtext
class EmbossFrame(wx.Frame):
def __init__(self, parent, topframe, id=wx.ID_ANY, title='EMBOSS'):
wx.Frame.__init__(self, parent, id, title)
self.topframe = topframe
try:
self.nucseq = to... | gpl-3.0 | -6,765,850,251,319,605,000 | 32.358491 | 77 | 0.538179 | false |
alfa-addon/addon | plugin.video.alfa/servers/mediafire.py | 2 | 1261 | # -*- coding: utf-8 -*-
from core import httptools
from core import scrapertools
from platformcode import logger
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data
if "Invalid or Deleted File" in data or "Well, looks like we" ... | gpl-3.0 | 7,863,214,625,377,572,000 | 38.645161 | 84 | 0.63254 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py | 1 | 1123 | # 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 | -6,176,011,524,582,688,000 | 34.09375 | 76 | 0.569012 | false |
chemelnucfin/tensorflow | tensorflow/lite/python/lite_mlir_test.py | 1 | 20194 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,968,847,766,658,398,000 | 38.909091 | 80 | 0.674903 | false |
KnightHawk3/Hummingbird | hummingbird/__init__.py | 1 | 7490 | import json
import requests
from hummingbird.objects import *
__version__ = '0.0.4'
class Hummingbird(object):
"""Object for the wrapper for the Hummingbird API v1"""
headers = {'content-type': 'application/json'}
auth_token = ''
api_url = "http://hummingbird.me/api/v1"
def __init__(self, user... | mit | 8,201,267,218,918,231,000 | 35.359223 | 80 | 0.568758 | false |
ECP-CANDLE/Benchmarks | Pilot1/UnoMT/networks/structures/residual_block.py | 1 | 1441 | """
File Name: UnoPytorch/residual_block.py
Author: Xiaotian Duan (xduan7)
Email: xduan7@uchicago.edu
Date: 8/13/18
Python Version: 3.6.6
File Description:
"""
import torch.nn as nn
from networks.initialization.weight_init import basic_wei... | mit | 7,751,717,003,790,064,000 | 25.685185 | 79 | 0.469813 | false |
msunardi/blog | Control/sim_and_plot_pygame.py | 4 | 10489 | '''
Copyright (C) 2015 Travis DeWolf
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope t... | gpl-3.0 | -5,241,659,287,703,154,000 | 37.141818 | 103 | 0.567452 | false |
beni55/catkin | cmake/test/download_checkmd5.py | 2 | 5716 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
try:
from urllib.request import addinfourl, BaseHandler, build_opener, Request, URLError
except ImportError:
from urllib2 import addinfourl, BaseHandler, build_opener, Request, URLError
import hashlib
from argparse import Argument... | bsd-3-clause | 4,726,529,626,388,738,000 | 32.623529 | 161 | 0.572778 | false |
chrisidefix/devide.johannes | extra/soappy-cvp/SOAPpy/wstools/XMLname.py | 15 | 2529 | """Translate strings to and from SOAP 1.2 XML name encoding
Implements rules for mapping application defined name to XML names
specified by the w3 SOAP working group for SOAP version 1.2 in
Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft
17, December 2001, <http://www.w3.org/TR/soap12-part2/#namem... | bsd-3-clause | 5,062,211,323,455,546,000 | 27.1 | 78 | 0.553183 | false |
mottosso/maya-multicapture | multicapture.py | 1 | 4677 | import os
import sys
import shutil
import tempfile
import contextlib
from PySide import QtGui
from maya import (
cmds,
OpenMaya as api,
OpenMayaUI as apiUI
)
class Window(QtGui.QDialog):
def __init__(self, filename, parent=None):
super(Window, self).__init__(parent)
panel1 = QtGui.Q... | mit | 3,182,195,300,037,787,600 | 24.557377 | 79 | 0.548856 | false |
Lektorium-LLC/edx-platform | cms/djangoapps/contentstore/views/certificates.py | 6 | 22682 | """
Certificates Data Model:
course.certificates: {
'certificates': [
{
'version': 1, // data contract version
'id': 12345, // autogenerated identifier
'name': 'Certificate 1',
'description': 'Certificate 1 Description',
'course_title': 'course ti... | agpl-3.0 | -6,564,033,490,755,635,000 | 39.721724 | 121 | 0.624724 | false |
iAMr00t/opencog | opencog/python/blending/src/connector/connect_conflict_interaction_information.py | 15 | 20117 | from opencog.atomspace import *
from opencog.logger import log
from opencog.statistics import \
PyDataProviderAtom, PyProbabilityAtom, \
PyEntropyAtom, PyInteractionInformationAtom
from blending.src.connector.base_connector import BaseConnector
from blending.src.connector.connect_util import *
import blending.s... | agpl-3.0 | -250,953,747,012,042,080 | 39.476861 | 80 | 0.586519 | false |
magnastrazh/NEUCOGAR | RecNM/image_processing.py | 3 | 2041 | import root
import os
import numpy as np
from pybrain.datasets import SupervisedDataSet
__author__ = 'kamil'
import cv2
def get_number_of_files(path):
count = 0
for file in os.listdir(path):
type = file.split(".")[1]
if type == "DS_Store":
continue
count += 1
return coun... | gpl-2.0 | 5,613,655,091,397,096,000 | 34.189655 | 73 | 0.576188 | false |
allevato/swift | utils/gyb_syntax_support/Classification.py | 13 | 2779 | from .Node import error
from .kinds import lowercase_first_word # noqa: I201
class SyntaxClassification(object):
'''
Represents a classification a token can receive for syntax highlighting.
'''
def __init__(self, name, description):
self.name = name
self.swift_name = lowercase_first_... | apache-2.0 | -833,870,276,065,859,100 | 33.7375 | 76 | 0.670385 | false |
KiChjang/servo | tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py | 5 | 5045 | import base64
import json
import os
import six
from wptserve.utils import isomorphic_decode, isomorphic_encode
def decodebytes(s):
if six.PY3:
return base64.decodebytes(six.ensure_binary(s))
return base64.decodestring(s)
def main(request, response):
headers = []
headers.append((b'X-ServiceWo... | mpl-2.0 | 7,991,890,450,060,178,000 | 42.491379 | 125 | 0.605154 | 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.