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 |
|---|---|---|---|---|---|---|---|---|---|---|
openstack/tacker | tacker/objects/fields.py | 1 | 6558 | # Copyright 2018 NTT Data.
# 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 app... | apache-2.0 | -3,187,668,274,477,417,500 | 22.173145 | 78 | 0.707228 | false |
gurneyalex/odoo | addons/test_mail_full/tests/test_sms_composer.py | 5 | 20746 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.sms.tests import common as sms_common
from odoo.addons.test_mail_full.tests import common as test_mail_full_common
class TestSMSComposerComment(test_mail_full_common.BaseFunctionalTest, sms_common.Mock... | agpl-3.0 | -7,740,930,999,319,327,000 | 40.64257 | 187 | 0.566978 | false |
JaneliaSciComp/osgpyplusplus | examples/debugging2/osgoutline.py | 1 | 2980 | #!/bin/env python
# Automatically translated python version of
# OpenSceneGraph example program "osgoutline"
# !!! This program will need manual tuning before it will work. !!!
import sys
from osgpypp import osg
from osgpypp import osgDB
from osgpypp import osgFX
from osgpypp import osgViewer
# Translated from fi... | bsd-3-clause | -6,478,428,171,334,861,000 | 27.653846 | 109 | 0.69094 | false |
unicefuganda/uSurvey | survey/tests/utils/test_views_helper.py | 1 | 7986 | from django.test import TestCase
from survey.models.locations import *
from survey.utils.views_helper import contains_key, get_descendants, get_ancestors, clean_query_params, prepend_to_keys
class ViewsHelperTest(TestCase):
def test_contains_key(self):
self.assertTrue(contains_key({'bla': '1'}, 'bla'))
... | bsd-3-clause | 6,841,801,498,728,483,000 | 55.246479 | 119 | 0.638492 | false |
nwiizo/workspace_2017 | ansible-modules-extras/notification/jabber.py | 32 | 4791 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Brian Coca <bcoca@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 Licen... | mit | -4,918,418,581,439,076,000 | 26.221591 | 90 | 0.637863 | false |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/stat/cmp/cmppolicy_stats.py | 1 | 4510 | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | apache-2.0 | 6,867,825,718,209,409,000 | 26.668712 | 186 | 0.700443 | false |
CvvT/crawler_sqlmap | crawler/setting.py | 1 | 2588 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = 'CwT'
import logging
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-d", "--depth", dest="depth", action="store", default=-1, type="int",
help="the distance from a starting location")
parser.add_option("--no... | apache-2.0 | -6,516,038,691,293,704,000 | 35.971429 | 90 | 0.584621 | false |
flochaz/horizon | openstack_dashboard/dashboards/admin/networks/tests.py | 6 | 65522 | # Copyright 2012 NEC 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 applicable law or ag... | apache-2.0 | 6,632,336,158,950,868,000 | 44.156444 | 79 | 0.533866 | false |
jabesq/home-assistant | tests/components/smartthings/test_lock.py | 10 | 4273 | """
Test for the SmartThings lock platform.
The only mocking required is of the underlying SmartThings API object so
real HTTP calls are not initiated during testing.
"""
from pysmartthings import Attribute, Capability
from pysmartthings.device import Status
from homeassistant.components.lock import DOMAIN as LOCK_DO... | apache-2.0 | 5,050,498,303,945,628,000 | 35.211864 | 77 | 0.657852 | false |
dvliman/jaikuengine | .google_appengine/lib/django-1.3/tests/urls.py | 21 | 1690 | from django.conf.urls.defaults import *
urlpatterns = patterns('',
# test_client modeltest urls
(r'^test_client/', include('modeltests.test_client.urls')),
(r'^test_client_regress/', include('regressiontests.test_client_regress.urls')),
# File upload test views
(r'^file_uploads/', include('regres... | apache-2.0 | -2,830,122,244,879,429,000 | 35.73913 | 95 | 0.688757 | false |
altaurog/django-shoogie | shoogie/admin.py | 1 | 6152 | from django.contrib import admin
from django.contrib.admin.views.main import ChangeList
try:
from django.conf.urls import patterns, url
except ImportError:
from django.conf.urls.defaults import patterns, url
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from . import models,... | mit | -779,838,395,596,206,200 | 37.691824 | 121 | 0.603544 | false |
jjhelmus/artview | artview/components/component_control.py | 1 | 7105 | """
component_control.py
Class instance for control variables shared between components.
"""
# Load the needed packages
from functools import partial
from ..core import Variable, Component, QtGui, QtCore, common, componentsList
class LinkPlugins(Component):
'''
Class instance for control variables shared b... | bsd-3-clause | -6,517,890,652,482,973,000 | 34.348259 | 78 | 0.611119 | false |
apple/llvm-project | lldb/third_party/Python/module/unittest2/unittest2/test/test_new_tests.py | 15 | 1677 | from cStringIO import StringIO
import unittest
import unittest2
from unittest2.test.support import resultFactory
class TestUnittest(unittest2.TestCase):
def assertIsSubclass(self, actual, klass):
self.assertTrue(issubclass(actual, klass), "Not a subclass.")
def testInheritance(self):
self.... | apache-2.0 | -8,616,042,802,471,574,000 | 31.25 | 76 | 0.65653 | false |
cern-it-sdc-id/davix | test/pywebdav/lib/locks.py | 4 | 8255 | import os
import sys
import time
import socket
import string
import posixpath
import base64
import urlparse
import urllib
import random
import logging
log = logging.getLogger(__name__)
import xml.dom
from xml.dom import minidom
from utils import rfc1123_date, IfParser, tokenFinder
from string import atoi,split
from... | lgpl-2.1 | -6,220,525,025,926,709,000 | 31.372549 | 89 | 0.544155 | false |
gmittal/aar-nlp-research-2016 | src/pygame-pygame-6625feb3fc7f/examples/chimp.py | 32 | 5876 | #!/usr/bin/env python
"""
This simple example is used for the line-by-line tutorial
that comes with pygame. It is based on a 'popular' web banner.
Note there are comments here, but for the full explanation,
follow along in the tutorial.
"""
#Import Modules
import os, pygame
from pygame.locals import *
from pygame.com... | mit | -7,890,414,618,805,825,000 | 29.28866 | 76 | 0.604152 | false |
kennedyshead/home-assistant | tests/components/auth/test_indieauth.py | 8 | 6005 | """Tests for the client validator."""
import asyncio
from unittest.mock import patch
import pytest
from homeassistant.components.auth import indieauth
from tests.test_util.aiohttp import AiohttpClientMocker
@pytest.fixture
def mock_session():
"""Mock aiohttp.ClientSession."""
mocker = AiohttpClientMocker()... | apache-2.0 | -2,260,595,293,303,195,400 | 31.459459 | 88 | 0.627977 | false |
joelpinheiro/safebox-smartcard-auth | ccModule.py | 1 | 10386 | # Portuguese Citizen Card Module for SafeBox
# author: Miguel Vicente
#
# reference:
# www.bit4id.org/trac/pykcs11
import PyKCS11
import getopt
import sys
import platform
import pytz
from datetime import datetime
from pytz import timezone
from M2Crypto import X509
import OpenSSL
import re
import requests
cl... | gpl-2.0 | -8,252,353,066,543,728,000 | 31.055556 | 113 | 0.566821 | false |
veroc/Bika-LIMS | bika/lims/exportimport/instruments/alere/pima/beads.py | 4 | 2900 | """ Alere Pima "Beads"
"""
from bika.lims import bikaMessageFactory as _
from bika.lims.utils import t
from . import AlerePimaImporter, AlerePimaSLKParser
import json
import traceback
title = "Alere Pima Beads"
def Import(context, request):
""" Alere Pima Beads analysis results
"""
infile = request.form[... | agpl-3.0 | -3,365,620,268,281,323,000 | 34.365854 | 78 | 0.542414 | false |
philanthropy-u/edx-platform | cms/djangoapps/contentstore/views/export_git.py | 24 | 1723 | """
This views handles exporting the course xml to a git repository if
the giturl attribute is set.
"""
import logging
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.utils.translation import ugettext as _
from django.views.decorators.csrf impo... | agpl-3.0 | 7,384,989,849,531,216,000 | 30.327273 | 73 | 0.660476 | false |
nathanielvarona/airflow | airflow/providers/google/cloud/example_dags/example_compute_igm.py | 10 | 5537 | #
# 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... | apache-2.0 | 5,540,849,412,725,495,000 | 39.416058 | 107 | 0.737222 | false |
JoelBender/bacpypes | py27/bacpypes/errors.py | 3 | 8195 | #!/usr/bin/python
#
# ConfigurationError
#
class ConfigurationError(ValueError):
"""This error is raised when there is a configuration problem such as
bindings between layers or required parameters that are missing.
"""
def __init__(self, *args):
self.args = args
#
# EncodingError
#
cl... | mit | 5,787,790,787,145,688,000 | 24.138037 | 79 | 0.719707 | false |
dcloud/marvelous | marvelous/tests/test_marvel_events.py | 1 | 1968 | from marvelous.tests.base import MarvelTests
from betamax import Betamax
class TestMarvelEvents(MarvelTests):
def test_event_by_id(self):
with Betamax(self.api._session).use_cassette('age_of_ultron_event'):
result = self.api.event(self.age_of_ultron_event)
self.assertIsInstance(re... | bsd-2-clause | 6,991,969,294,185,304,000 | 43.727273 | 76 | 0.653963 | false |
sogelink/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_team.py | 34 | 3468 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.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 | -7,191,851,142,042,355,000 | 29.156522 | 118 | 0.637543 | false |
cfangmeier/Project_Scorpion | src/scorpion/hal/scanner.py | 1 | 1944 | '''
Created on Feb 15, 2014
@author: caleb
'''
import struct
import os
import re
import select
import threading
from queue import Queue
from scorpion.config import scanner_path, use_gui
import scorpion.ui.ui_main
FORMAT = 'llHHI'
EVENT_SIZE = struct.calcsize(FORMAT)
scanner_data = Queue()
_mapping = {11: '0', 2 : ... | gpl-2.0 | 4,108,641,824,097,425,000 | 27.188406 | 69 | 0.572531 | false |
r0jsik/rinde | test/stage/__init__.py | 1 | 6341 | from rinde.stage import ControllerBase
from rinde.stage.node.switch import RadioSwitch
from rinde.stage.node.pane import Pane
from rinde.stage.node.text import Text
from rinde.stage.node.util import Canvas
from rinde.stage.node.util import Image
class Controller(ControllerBase):
def __lookup_element(self, node_id, s... | mit | 2,515,500,735,109,604,400 | 29.63285 | 447 | 0.671818 | false |
mmulazzani/HoneyConnector | client/stem/socket.py | 2 | 19481 | # Copyright 2011-2013, Damian Johnson
# Copyright 2012, Sean Robinson
# See LICENSE for licensing information
"""
Supports message based communication with sockets speaking the tor control
protocol. This lets users send messages as basic strings and receive responses
as instances of the :class:`~stem.response.ControlM... | gpl-3.0 | 899,650,971,048,636,200 | 31.041118 | 162 | 0.656537 | false |
wmarshall484/streamsx.topology | samples/python/com.ibm.streamsx.topology.pysamples/opt/python/streams/spl_sources.py | 1 | 3031 | # coding:utf-8
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2015, 2016
from __future__ import absolute_import, division, print_function
import sys
# Simple inclusion of Python logic within an SPL application
# as a SPL "Function" operator. A "Function" operator has
# a single input port and single out... | apache-2.0 | -8,876,306,261,303,396,000 | 33.83908 | 77 | 0.69779 | false |
TheMOOCAgency/edx-platform | openedx/core/djangoapps/credentials/tests/test_utils.py | 14 | 7362 | """Tests covering Credentials utilities."""
import unittest
from django.conf import settings
from django.core.cache import cache
from nose.plugins.attrib import attr
import httpretty
from edx_oauth2_provider.tests.factories import ClientFactory
from provider.constants import CONFIDENTIAL
from openedx.core.djangoapps.... | agpl-3.0 | -315,961,971,362,456,300 | 39.01087 | 108 | 0.655393 | false |
vincentfung13/TwitterRepManagement | twitter_services/management/commands/populate_training_set.py | 1 | 2021 | from django.core.management.base import BaseCommand
class Command(BaseCommand):
def __init__(self):
self.duplicates = set()
self.tweets_json = {}
self.ids = set()
def handle(self, **options):
import io
import json
from TwitterRepManagement import settings
... | mit | -7,170,286,164,807,566,000 | 37.865385 | 90 | 0.582385 | false |
ricktaylord/django-filebrowser | filebrowser/decorators.py | 1 | 2985 | # coding: utf-8
# PYTHON IMPORTS
import os
import logging
# DJANGO IMPORTS
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.core.exceptions import ImproperlyConfigured
from djang... | bsd-3-clause | -539,699,391,080,456,770 | 41.042254 | 139 | 0.680067 | false |
fatadama/mavlink-vscl | pymavlink/generator/lib/minixsv/minixsvWrapper.py | 4 | 2320 | #!/usr/local/bin/python
import sys
import getopt
from genxmlif import GenXmlIfError
from xsvalErrorHandler import ErrorHandler, XsvalError
from minixsv import *
from pyxsval import parseAndValidate
##########################################
# minixsv Wrapper for calling minixsv from comm... | lgpl-3.0 | -4,915,371,194,551,806,000 | 29.526316 | 86 | 0.54569 | false |
gf53520/kafka | tests/unit/directory_layout/check_project_paths.py | 28 | 3699 | # 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,203,107,733,110,843,000 | 40.1 | 117 | 0.691538 | false |
auduny/home-assistant | tests/components/heos/test_config_flow.py | 6 | 4313 | """Tests for the Heos config flow module."""
import asyncio
from homeassistant import data_entry_flow
from homeassistant.components.heos.config_flow import HeosFlowHandler
from homeassistant.components.heos.const import DATA_DISCOVERED_HOSTS, DOMAIN
from homeassistant.const import CONF_HOST, CONF_NAME
async def test... | apache-2.0 | 5,080,596,128,137,261,000 | 38.935185 | 77 | 0.669372 | false |
HaloExchange/HaloBitcoin | qa/rpc-tests/rpcbind_test.py | 1 | 5788 | #!/usr/bin/env python2
# Copyright (c) 2014 The Halo Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Test for -rpcbind, as well as -rpcallowip and -rpcconnect
# Add python-halobitcoinrpc to module search... | mit | 5,010,387,231,019,260,000 | 36.584416 | 110 | 0.63217 | false |
gilt/incubator-airflow | airflow/contrib/hooks/redshift_hook.py | 4 | 4303 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | -6,880,765,821,336,381,000 | 42.03 | 121 | 0.684174 | false |
dberroya/trad-arducopter | Tools/autotest/apmrover2.py | 5 | 5487 | # drive APMrover2 in SITL
import util, pexpect, sys, time, math, shutil, os
from common import *
from pymavlink import mavutil
import random
# get location of scripts
testdir=os.path.dirname(os.path.realpath(__file__))
#HOME=mavutil.location(-35.362938,149.165085,584,270)
HOME=mavutil.location(40.071374969556928,-1... | gpl-3.0 | -7,648,395,719,199,807,000 | 30.176136 | 103 | 0.632951 | false |
ngonzalvez/sentry | src/sentry/lang/javascript/processor.py | 4 | 21634 | from __future__ import absolute_import, print_function
__all__ = ['SourceProcessor']
import logging
import re
import base64
from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from collections import namedtuple
from hashlib import md5
from os.path import splitext
from requests.exc... | bsd-3-clause | 8,830,881,345,056,043,000 | 33.015723 | 117 | 0.569705 | false |
IPMITMO/statan | coala/coalib/parsing/ConfParser.py | 24 | 6164 | import os
from collections import OrderedDict
from types import MappingProxyType
import logging
from coalib.misc import Constants
from coalib.parsing.LineParser import LineParser
from coalib.settings.Section import Section
from coalib.settings.Setting import Setting
class ConfParser:
def __init__(self,
... | mit | -7,632,719,172,983,834,000 | 37.049383 | 79 | 0.483777 | false |
nanocell/lsync | python/boto/resultset.py | 4 | 6186 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | gpl-3.0 | 7,787,772,964,696,987,000 | 36.041916 | 79 | 0.606693 | false |
dpk9/poclbm | guiminer.py | 2 | 101317 | #!/usr/bin/python
"""GUIMiner - graphical frontend to Bitcoin miners.
Currently supports:
- m0mchil's "poclbm"
- puddinpop's "rpcminer"
- ufasoft's "bitcoin-miner"
Copyright 2011-2012 Chris MacLeod
This program is released under the GNU GPL. See LICENSE.txt for details.
"""
import sys, os, subprocess, errno, re, thr... | gpl-3.0 | 6,675,025,466,027,185,000 | 39.738641 | 187 | 0.587888 | false |
Datastreamx/learn-english | learn_english/exercises/test_gerund.py | 1 | 1703 | from django.test import TestCase
from . import models
from django.test import Client
#Alle antwoorden worden al lowercase opgeslagen
class GerundTestCase(TestCase):
def setUp(self):
self.client = Client()
models.OpenQuestion.objects.create(category="CC" , question="This is a test question rush b",... | gpl-3.0 | 5,080,968,972,346,919,000 | 47.657143 | 116 | 0.698767 | false |
Alphadelta14/python-newdispatch | dispatch/events/event.py | 1 | 2415 |
class EventException(BaseException):
pass
class EventCancelled(EventException):
def __init__(self, evt):
EventException.__init__(self)
self.evt = evt
class EventDeferred(EventException):
pass
class EventData(object):
"""Object passed into emitted events
Attributes
------... | mit | 7,276,609,863,622,575,000 | 24.15625 | 74 | 0.5706 | false |
bsipocz/statsmodels | statsmodels/tsa/filters/cf_filter.py | 28 | 3435 | from statsmodels.compat.python import range
import numpy as np
from ._utils import _maybe_get_pandas_wrapper
# the data is sampled quarterly, so cut-off frequency of 18
# Wn is normalized cut-off freq
#Cutoff frequency is that frequency where the magnitude response of the filter
# is sqrt(1/2.). For butter, the norm... | bsd-3-clause | 5,811,148,767,338,814,000 | 32.676471 | 84 | 0.607278 | false |
rimbalinux/LMD3 | django/utils/unittest/suite.py | 12 | 9580 | """TestSuite"""
import sys
import unittest
from django.utils.unittest import case, util
__unittest = True
class BaseTestSuite(unittest.TestSuite):
"""A simple test suite that doesn't provide class or module shared fixtures.
"""
def __init__(self, tests=()):
self._tests = []
... | bsd-3-clause | 3,871,075,794,207,900,700 | 31.379791 | 80 | 0.568685 | false |
NewpTone/stacklab-nova | nova/api/openstack/volume/contrib/volume_actions.py | 6 | 5150 | # Copyright 2012 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 or agreed... | apache-2.0 | 8,319,964,724,987,609,000 | 38.312977 | 79 | 0.618252 | false |
hashems/Mobile-Cloud-Development-Projects | translate/cloud-client/snippets.py | 4 | 4692 | #!/usr/bin/env python
# Copyright 2016 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 | 7,563,367,722,656,731,000 | 32.514286 | 79 | 0.696292 | false |
jjshoe/ansible-modules-core | database/mysql/mysql_user.py | 5 | 22174 | #!/usr/bin/python
# (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
# Sponsored by Four Kitchens http://fourkitchens.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... | gpl-3.0 | 8,417,220,587,364,133,000 | 38.315603 | 178 | 0.611437 | false |
nuagenetworks/vspk-python | vspk/v5_0/fetchers/nuinfrastructureevdfprofiles_fetcher.py | 2 | 2226 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyrigh... | bsd-3-clause | 1,874,936,843,171,087,600 | 41.018868 | 86 | 0.739443 | false |
Pyangs/ShiPanE-Python-SDK | tests/shipane_sdk/matchers/dataframe_matchers.py | 1 | 1232 | # -*- coding: utf-8 -*-
import re
from hamcrest.core.base_matcher import BaseMatcher
class HasColumn(BaseMatcher):
def __init__(self, column):
self._column = column
def _matches(self, df):
return self._column in df.columns
def describe_to(self, description):
description.append_... | mit | 5,263,478,676,103,618,000 | 23.64 | 108 | 0.666396 | false |
ner0x652/CheckGuard | tests/CheckTests.py | 2 | 5706 |
import CheckParser
import re
import unittest
import itertools
class ParserIniPosTest(unittest.TestCase):
def setUp(self):
self.testObj = CheckParser.CheckParser(0)
print("ParserIniPos SetUp executed")
def tearDown(self):
self.testObj = None
print("ParserIniPos TearDown execut... | gpl-2.0 | 7,732,005,686,704,460,000 | 41.909774 | 116 | 0.560813 | false |
ramsateesh/designate | functionaltests/common/config.py | 1 | 2392 | """
Copyright 2015 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | apache-2.0 | -4,448,889,142,459,497,500 | 30.473684 | 79 | 0.692308 | false |
AO-StreetArt/FinalFlowChartExample | FlowChartExampleApp.py | 1 | 3129 | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 20 19:03:15 2015
@author: alex
"""
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty, ListProperty, NumericProperty, BooleanProperty
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy... | mit | 2,255,996,567,566,147,300 | 40.733333 | 141 | 0.691595 | false |
joelddiaz/openshift-tools | openshift/installer/vendored/openshift-ansible-3.4.40/roles/lib_openshift/library/oc_adm_policy_group.py | 12 | 68660 | #!/usr/bin/env python
# pylint: disable=missing-docstring
# flake8: noqa: T001
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ ... | apache-2.0 | 6,297,112,232,320,834,000 | 31.602089 | 118 | 0.536076 | false |
CapOM/ChromiumGStreamerBackend | tools/chrome_proxy/common/chrome_proxy_metrics.py | 15 | 3854 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import time
from common import network_metrics
from telemetry.page import page_test
from telemetry.value import scalar
CHROME_PROXY_VIA_HEA... | bsd-3-clause | 1,142,881,576,152,614,400 | 35.018692 | 80 | 0.69616 | false |
clausqr/HTPC-Manager | libs/sqlobject/maxdb/maxdbconnection.py | 8 | 10919 | """
Contributed by Edigram SAS, Paris France Tel:01 44 77 94 00
Ahmed MOHAMED ALI <ahmedmoali@yahoo.com> 27 April 2004
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
... | mit | 4,959,189,039,843,539,000 | 34.036304 | 103 | 0.576335 | false |
dcolligan/server | tests/unit/test_datarepo.py | 4 | 2918 | """
Tests the datarepo module
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import tempfile
import unittest
import ga4gh.server.datarepo as datarepo
import ga4gh.server.exceptions as exceptions
prefix = "ga4gh_datarepo_test"
def makeTem... | apache-2.0 | -7,094,235,138,709,637,000 | 30.042553 | 72 | 0.699109 | false |
SUSE/azure-sdk-for-python | unreleased/azure-mgmt-machinelearning/azure/mgmt/machinelearning/models/example_request.py | 5 | 1192 | # 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,103,612,022,085,685,000 | 35.121212 | 77 | 0.598993 | false |
samdowd/drumm-farm | drumm_env/bin/explode.py | 1 | 2465 | #!/home/sam/p/drumm-farm/drumm_env/bin/python
#
# The Python Imaging Library
# $Id$
#
# split an animation into a number of frame files
#
from __future__ import print_function
from PIL import Image
import os
import sys
class Interval(object):
def __init__(self, interval="0"):
self.setinterval(interval... | mit | 8,341,897,567,367,451,000 | 21.008929 | 75 | 0.532657 | false |
zaenalarifin/openshot_jmd | openshot/windows/ExportVideo.py | 1 | 22341 | # OpenShot Video Editor is a program that creates, modifies, and edits video files.
# Copyright (C) 2009 Jonathan Thomas
#
# This file is part of OpenShot Video Editor (http://launchpad.net/openshot/).
#
# OpenShot Video Editor is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | gpl-3.0 | 3,901,255,048,601,620,000 | 30.961373 | 292 | 0.695806 | false |
vlegoff/tsunami | src/primaires/scripting/commandes/scripting/alerte_rebase.py | 1 | 2791 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | -8,156,610,740,187,534,000 | 45.316667 | 79 | 0.712487 | false |
ake-koomsin/mapnik_nvpr | tests/python_tests/ogr_test.py | 1 | 2621 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from nose.tools import *
from utilities import execution_path
import os, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
if 'ogr' in mapnik.DatasourceCach... | lgpl-2.1 | -137,470,692,475,225,730 | 38.69697 | 119 | 0.606107 | false |
wwj718/ANALYSE | common/lib/xmodule/xmodule/mako_module.py | 6 | 1459 | from .x_module import XModuleDescriptor, DescriptorSystem
class MakoDescriptorSystem(DescriptorSystem):
def __init__(self, render_template, **kwargs):
super(MakoDescriptorSystem, self).__init__(**kwargs)
self.render_template = render_template
class MakoModuleDescriptor(XModuleDescriptor):
"... | agpl-3.0 | -8,738,385,567,089,706,000 | 34.585366 | 105 | 0.648389 | false |
nerdyLawman/pyhack | src/interface/controls.py | 1 | 4117 | import libtcodpy as libtcod
import gameconfig
def target_tile(max_range=None):
global key, mouse
# returns x, y of a tile selected by a mouseclick
while True:
libtcod.console_flush()
libtcod.sys_check_for_event(libtcod.EVENT_KEY_PRESS|libtcod.EVENT_MOUSE, key, mouse)
render_all()
... | gpl-3.0 | -7,436,060,564,142,350,000 | 37.476636 | 124 | 0.575419 | false |
subeax/grab | grab/tools/account/files/parse_ru_lname.py | 1 | 1893 | try:
from urllib import urlopen
except ImportError:
from urllib.request import urlopen
import re
urls = """
http://genofond.binec.ru/default2.aspx?p=98
http://genofond.binec.ru/default2.aspx?s=0&p=69
http://genofond.binec.ru/default2.aspx?s=0&p=70
http://genofond.binec.ru/default2.aspx?s=0&p=71
http://genofond... | mit | -4,212,795,307,099,121,700 | 36.117647 | 85 | 0.711569 | false |
tangentlabs/wagtail | wagtail/wagtailforms/tests.py | 14 | 17365 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
from django.test import TestCase
from django.core import mail
from django import forms
from django.core.urlresolvers import reverse
from wagtail.wagtailcore.models import Page
from wagtail.wagtailforms.models import FormSubmission
from wagta... | bsd-3-clause | -6,948,488,577,452,455,000 | 36.740175 | 150 | 0.631819 | false |
StackStorm/mistral | mistral/tests/unit/api/test_access_control.py | 1 | 2229 | # Copyright 2016 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -7,675,515,347,808,505,000 | 30.842857 | 79 | 0.647824 | false |
beni55/django | django/contrib/gis/maps/google/overlays.py | 13 | 11940 | from __future__ import unicode_literals
from django.contrib.gis.geos import (
LinearRing, LineString, Point, Polygon, fromstr,
)
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import total_ordering
from django.utils.safestring import mark_saf... | bsd-3-clause | 5,867,305,581,385,733,000 | 35.402439 | 119 | 0.622027 | false |
liberorbis/libernext | env/lib/python2.7/site-packages/celery/concurrency/gevent.py | 8 | 3510 | # -*- coding: utf-8 -*-
"""
celery.concurrency.gevent
~~~~~~~~~~~~~~~~~~~~~~~~~
gevent pool implementation.
"""
from __future__ import absolute_import
from time import time
try:
from gevent import Timeout
except ImportError: # pragma: no cover
Timeout = None # noqa
from celery.utils import ti... | gpl-2.0 | -4,081,642,633,367,579,600 | 24.808824 | 79 | 0.553561 | false |
defionscode/ansible | lib/ansible/modules/system/sefcontext.py | 3 | 9116 | #!/usr/bin/python
# Copyright: (c) 2016, Dag Wieers (@dagwieers) <dag@wieers.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 | 8,070,996,363,429,504,000 | 31.673835 | 140 | 0.632405 | false |
treycausey/scikit-learn | examples/manifold/plot_manifold_sphere.py | 8 | 4585 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=============================================
Manifold Learning methods on a severed sphere
=============================================
An application of the different :ref:`manifold` techniques
on a spherical data-set. Here one can see the use of
dimensionality reducti... | bsd-3-clause | 4,418,982,823,860,495,000 | 31.51773 | 75 | 0.679826 | false |
Mzero2010/MaxZone | plugin.video.Mzero/servers/cloudsix.py | 4 | 1449 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para cloudsix
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import re
from core import logger
def test_video_exists(... | gpl-3.0 | -7,217,112,036,263,297,000 | 32.674419 | 93 | 0.59116 | false |
nanolearningllc/edx-platform-cypress-2 | lms/djangoapps/discussion_api/tests/test_serializers.py | 21 | 33579 | """
Tests for Discussion API serializers
"""
import itertools
from urlparse import urlparse
import ddt
import httpretty
import mock
from django.test.client import RequestFactory
from discussion_api.serializers import CommentSerializer, ThreadSerializer, get_context
from discussion_api.tests.utils import (
Commen... | agpl-3.0 | -5,285,214,356,977,623,000 | 37.819653 | 110 | 0.564043 | false |
justintweaver/mtchi-cert-game | makahiki/apps/managers/challenge_mgr/migrations/0009_auto__del_field_challengesetting_location.py | 7 | 8591 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'ChallengeSetting.location'
db.delete_column('challenge_mgr_challengesetting', 'location'... | gpl-3.0 | 3,453,334,790,086,132,000 | 77.1 | 176 | 0.555814 | false |
xujun10110/DIE | DIE/Lib/DataPluginBase.py | 8 | 6517 |
import logging
from yapsy.PluginManager import IPlugin
from DIE.Lib.ParsedValue import ParsedValue
from idaapi import *
from idautils import *
from idc import *
class DataPluginBase(IPlugin):
"""
DIE Data Parser plugin base class.
"""
name = ""
version = 0
description = ""
author = ""
... | mit | 6,281,305,150,474,836,000 | 32.081218 | 120 | 0.59644 | false |
ojengwa/grr | gui/plugins/acl_manager_test.py | 2 | 24429 | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Tests the access control authorization workflow."""
import re
import time
import urlparse
from grr.gui import runtests_test
from grr.lib import access_control
from grr.lib import aff4
from grr.lib import email_alerts
from grr.lib import flags
from gr... | apache-2.0 | -9,013,492,060,328,073,000 | 36.291603 | 80 | 0.654426 | false |
photoninger/ansible | lib/ansible/modules/network/citrix/_netscaler.py | 15 | 4873 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Nandor Sivok <nandor@gawker.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': ... | gpl-3.0 | -1,848,312,706,524,774,000 | 25.483696 | 104 | 0.610507 | false |
dycodedev/taiga-back | taiga/projects/issues/api.py | 1 | 11959 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# 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 F... | agpl-3.0 | 6,412,214,018,278,567,000 | 46.63745 | 103 | 0.61487 | false |
ntucllab/libact | libact/query_strategies/query_by_committee.py | 1 | 7425 | """Query by committee
This module contains a class that implements Query by committee active learning
algorithm.
"""
from __future__ import division
import logging
import math
import numpy as np
from libact.base.dataset import Dataset
from libact.base.interfaces import QueryStrategy, ProbabilisticModel
import libac... | bsd-2-clause | 4,343,440,021,166,972,000 | 34.526316 | 93 | 0.598923 | false |
arnavd96/Cinemiezer | myvenv/lib/python3.4/site-packages/music21/figuredBass/examples.py | 1 | 19212 | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: examples.py
# Purpose: music21 class which allows running of test cases
# Authors: Jose Cabal-Ugaz
#
# Copyright: Copyright © 2010-2011 Michael Scott Cuthbert and the music21 Project
# L... | mit | 3,849,884,331,369,982,500 | 39.787686 | 172 | 0.665764 | false |
willprice/arduino-sphere-project | scripts/example_direction_finder/temboo/Library/Stripe/Charges/RefundCharge.py | 5 | 3456 | # -*- coding: utf-8 -*-
###############################################################################
#
# RefundCharge
# Issues a refund of an existing credit card charge.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may n... | gpl-2.0 | -9,004,033,191,687,605,000 | 36.565217 | 175 | 0.672164 | false |
citrix-openstack-build/os-collect-config | os_collect_config/cfn.py | 1 | 6705 | # Copyright (c) 2013 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 | 3,027,588,708,427,825,000 | 41.707006 | 79 | 0.544817 | false |
Blazemeter/taurus | bzt/engine/engine.py | 1 | 29705 | """
Main BZT classes
Copyright 2015 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in... | apache-2.0 | 210,177,917,894,074,000 | 36.696701 | 119 | 0.588386 | false |
mclaughlin6464/pylearn2 | pylearn2/datasets/tests/test_tfd.py | 45 | 3849 | import unittest
import numpy as np
from pylearn2.datasets.tfd import TFD
from pylearn2.space import Conv2DSpace
from pylearn2.testing.skip import skip_if_no_data
class TestTFD(unittest.TestCase):
def setUp(self):
skip_if_no_data()
def test_load(self):
TFD(which_set='valid')
TFD(which... | bsd-3-clause | -6,576,612,867,599,089,000 | 37.49 | 74 | 0.522473 | false |
jameskeaveney/Python-GUI-Interactive-Plotter | interactive_plotter.py | 1 | 24753 | #!/usr/bin/env python
import matplotlib
matplotlib.use('WxAgg')
import pylab
pylab.ioff()
from matplotlib import rc
rc('text', usetex=False)
rc('font',**{'family':'serif'})
import wx, os, sys, csv
from numpy import arange,array,pi,zeros,append,std
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg, Navi... | mit | 22,884,526,365,834,650 | 29.979975 | 153 | 0.681412 | false |
jiayisuse/cs73 | wp-admin/data_delete.py | 1 | 2483 | #!/usr/bin/env python
import nltk
import os
import sys
import include
title = sys.argv[1].lower()
html = sys.argv[2].lower()
cate_id = sys.argv[3]
def do_read_train(uni_dict, bi_dict, file):
lines = file.readlines()
for line in lines:
words = line.split()
bi_dict[words[0]] = int(words[2])
uni_dict[words[0].s... | gpl-2.0 | 659,474,404,455,746,600 | 24.864583 | 131 | 0.648409 | false |
att-comdev/deckhand | deckhand/tests/test_utils.py | 1 | 2701 | # Copyright 2016 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -8,100,752,528,894,591,000 | 30.406977 | 78 | 0.647908 | false |
jimpick/jaikuengine | actor/tests.py | 1 | 24011 | # -*- coding: utf-8 -*-
# Copyright 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 law o... | apache-2.0 | -7,610,653,294,364,199,000 | 39.694915 | 85 | 0.643815 | false |
thebjorn/dkcoverage | dkcoverage/shell.py | 1 | 4111 | # -*- coding: utf-8 -*-
"""Utility functions for shell-like programming::
for line in run('cat foo') | grep('hello'):
print line
New 'commands' only need to have a feed(lines) method that should return
a Lines instance.
"""
# pylint:disable=R0903,R0201
# R0903: Too few public methods
# R0201:... | gpl-2.0 | 7,848,778,357,293,426,000 | 19.555 | 79 | 0.600097 | false |
Forage/Gramps | gramps/plugins/tool/removeunused.py | 1 | 18449 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Stephane Charette
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the ter... | gpl-2.0 | -5,002,553,252,887,925,000 | 38.505353 | 87 | 0.525286 | false |
azumimuo/family-xbmc-addon | plugin.video.salts/salts_lib/gui_utils.py | 1 | 13329 | """
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 | 7,353,126,879,999,772,000 | 41.858521 | 160 | 0.572736 | false |
kod3r/vigra | vigranumpy/examples/rag3d.py | 7 | 1827 | import vigra
from vigra import graphs
from vigra import numpy
from vigra import Timer
iEdgeMap = graphs.implicitMeanEdgeMap
numpy.random.seed(42)
# input
shape = [200, 100, 100]
data = numpy.random.rand(*shape).astype(numpy.float32)
data = vigra.taggedView(data,"xyz")
if False:
labels = numpy.random.randint(5... | mit | -5,023,103,974,042,999,000 | 24.732394 | 80 | 0.775041 | false |
terentjew-alexey/market-analysis-system | mas_cryptobot/bot-rl_v0.0.py | 1 | 1653 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from keras.optimizers import Adam
from rl.agents.dqn import DQNAgent
from rl.policy import BoltzmannQPolicy
from rl.memory import SequentialMemory
from mas_tools.envs import MarketEnv
from mas_tools.markets import AbstractMarket
from mas_tools.api import Binance
from mas... | mit | -7,393,049,592,200,415,000 | 28.517857 | 82 | 0.715668 | false |
djsilenceboy/LearnTest | Python_Test/PyCodePractice/com/djs/learn/NQueues.py | 1 | 1882 | '''
@author: Du Jiang
https://leetcode.com/problems/n-queens/description/
'''
class Solution:
def innerSolveNQueens(self, n, positions, rowNum, validColumns):
if rowNum == n:
self.result.append(["." * positions[i] + "Q" + "." *
(n - 1 - positions[i]) for i in ra... | apache-2.0 | -4,831,033,325,880,515,000 | 22.234568 | 140 | 0.469182 | false |
masbog/CrackMapExec | crackmapexec.py | 3 | 117724 | #!/usr/bin/env python2
#This must be one of the first imports or else we get threading error on completion
from gevent import monkey
monkey.patch_all()
from gevent import sleep
from gevent.pool import Pool
from gevent import joinall
from netaddr import IPNetwork, IPRange, IPAddress, AddrFormatError
from threading imp... | bsd-2-clause | -1,112,329,128,676,382,200 | 41.346763 | 197 | 0.550669 | false |
adlius/osf.io | api_tests/providers/registrations/views/test_registration_provider_schemas.py | 1 | 4142 | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
RegistrationProviderFactory,
AuthUserFactory
)
from osf.models import RegistrationSchema
from waffle.models import Flag
from osf.migrations import update_provider_auth_groups
@pytest.mark.django_db
class TestRegi... | apache-2.0 | 6,367,725,758,147,988,000 | 29.681481 | 104 | 0.622646 | false |
mitocw/edx-platform | lms/djangoapps/instructor/services.py | 4 | 4998 | """
Implementation of "Instructor" service
"""
import logging
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey, UsageKey
import lms.djangoapps.instructor.enrollment as enrollmen... | agpl-3.0 | -2,426,297,679,966,818,000 | 40.65 | 114 | 0.623049 | false |
OpenSlides/OpenSlides | server/openslides/core/export.py | 3 | 69092 | import base64
import re
from collections import defaultdict
from datetime import datetime
from typing import Any
from asgiref.sync import async_to_sync
from django.conf import settings
from django.db import connections
from openslides.mediafiles.models import Mediafile
from openslides.mediafiles.views import use_medi... | mit | 812,854,984,259,115,900 | 38.708046 | 115 | 0.528267 | false |
apporc/neutron | neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/native/test_br_tun.py | 18 | 19192 | # Copyright (C) 2014,2015 VA Linux Systems Japan K.K.
# Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
# 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 t... | apache-2.0 | -28,277,967,848,881,816 | 38.652893 | 79 | 0.458524 | false |
keerts/home-assistant | homeassistant/components/binary_sensor/demo.py | 10 | 1257 | """
Demo platform that has two fake binary sensors.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/demo/
"""
from homeassistant.components.binary_sensor import BinarySensorDevice
def setup_platform(hass, config, add_devices, discovery_info=None):
"""S... | apache-2.0 | -4,975,289,294,281,543,000 | 26.933333 | 71 | 0.644391 | false |
kch8qx/osf.io | admin_tests/users/test_views.py | 6 | 4123 | from django.test import RequestFactory
from nose import tools as nt
import mock
from tests.base import AdminTestCase
from website import settings
from framework.auth import User
from tests.factories import UserFactory, AuthUserFactory
from admin_tests.utilities import setup_view, setup_log_view
from admin.users.views... | apache-2.0 | 7,104,416,714,735,291,000 | 33.940678 | 79 | 0.650012 | 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.