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 |
|---|---|---|---|---|---|---|---|---|---|---|
dwaynebailey/poedit | deps/boost/libs/python/test/pickle2.py | 45 | 1514 | # Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
r'''>>> import pickle2_ext
>>> import pickle
>>> pickle2_ext.world.__module__
'pickle2_ext'
>>> pickle2_ext.world.__safe... | mit | -3,232,684,655,737,211,400 | 29.28 | 71 | 0.587847 | false |
pwarren/AGDeviceControl | agdevicecontrol/thirdparty/site-packages/win32/twisted/test/test_unix.py | 3 | 8599 | # -*- test-case-name: twisted.test.test_unix -*-
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
import stat, os, sys
from twisted.internet import interfaces, reactor, protocol, error, address, defer, utils
from twisted.python import components, lockfile, failure
from twisted.protoc... | gpl-2.0 | 2,394,006,665,073,462,000 | 30.966543 | 104 | 0.637283 | false |
google/google-ctf | third_party/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/importlib/__init__.py | 63 | 1365 | """Backport of importlib.import_module from 3.x."""
# While not critical (and in no way guaranteed!), it would be nice to keep this
# code compatible with Python 2.3.
import sys
def _resolve_name(name, package, level):
"""Return the absolute name of the module to be imported."""
if not hasattr(package, ... | apache-2.0 | -8,491,769,309,917,597,000 | 33.921053 | 79 | 0.591941 | false |
Changaco/oh-mainline | vendor/packages/Django/django/utils/unittest/util.py | 751 | 2821 | """Various utility functions."""
__unittest = True
_MAX_LENGTH = 80
def safe_repr(obj, short=False):
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < _MAX_LENGTH:
return result
return result[:_MAX_LENGTH] + ' [truncated]...'... | agpl-3.0 | 3,530,069,987,254,066,700 | 27.494949 | 76 | 0.501241 | false |
imageio/imageio | tests/test_format.py | 1 | 12094 | from pytest import raises
from imageio.testing import run_tests_if_main, get_test_dir
import os
import gc
import shutil
import numpy as np
import imageio
from imageio.core import Format, FormatManager, Request
from imageio.core import get_remote_file
test_dir = get_test_dir()
def setup_module():
imageio.form... | bsd-2-clause | 8,967,853,195,860,766,000 | 28.497561 | 78 | 0.604928 | false |
jdemel/gnuradio | gnuradio-runtime/python/gnuradio/gru/seq_with_cursor.py | 3 | 1933 | #
# Copyright 2003,2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
# misc utilities
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import types
class seq_with_cursor (object):
... | gpl-3.0 | 6,732,069,088,681,068,000 | 27.426471 | 75 | 0.56596 | false |
azureplus/hue | desktop/core/ext-py/Paste-2.0.1/paste/url.py | 33 | 14673 | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
This module implements a class for handling URLs.
"""
from six.moves.urllib.parse import quote, unquote, urlencode
import cgi
from paste import re... | apache-2.0 | -26,832,918,228,309,264 | 29.696653 | 120 | 0.511961 | false |
theknightorc/p2pool-candycoin | p2pool/bitcoin/script.py | 282 | 2589 | from p2pool.util import math, pack
def reads_nothing(f):
return None, f
def protoPUSH(length):
return lambda f: pack.read(f, length)
def protoPUSHDATA(size_len):
def _(f):
length_str, f = pack.read(f, size_len)
length = math.string_to_natural(length_str[::-1].lstrip(chr(0)))
data, f... | gpl-3.0 | -230,655,566,045,688,320 | 31.3625 | 88 | 0.565856 | false |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v2_8_0/device_cpu_stat_broker.py | 16 | 40187 | from ..broker import Broker
class DeviceCpuStatBroker(Broker):
controller = "device_cpu_stats"
def index(self, **kwargs):
"""Lists the available device cpu stats. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this m... | apache-2.0 | 5,711,798,612,581,736,000 | 46.728029 | 494 | 0.58387 | false |
Osmose/trephub | vendor-local/lib/python/south/management/commands/migrationcheck.py | 23 | 2648 | from django.core.exceptions import ImproperlyConfigured
from django.core.management import call_command, CommandError
from django.core.management.base import BaseCommand
from django.conf import settings
from django.db.models import loading
from django.test import simple
from south.migration import Migrations
from sout... | bsd-3-clause | -4,748,965,350,035,943,000 | 38.522388 | 89 | 0.609894 | false |
M4sse/chromium.src | content/test/gpu/gpu_tests/webgl_conformance_expectations.py | 9 | 14631 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_test_expectations import GpuTestExpectations
# See the GpuTestExpectations class for documentation.
class WebGLConformanceExpectations(GpuTest... | bsd-3-clause | -8,940,711,419,465,400,000 | 47.77 | 85 | 0.653339 | false |
onaio/rapidpro | temba/flows/migrations/0098_flowpathrecentmessage.py | 3 | 1055 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-26 14:35
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('flows', '0097_interrupt_runs_for_archived_flows'),
]
... | agpl-3.0 | -3,407,266,135,274,197,000 | 38.074074 | 140 | 0.61327 | false |
CBMM/CBaaS | democlients/deepdream.py | 1 | 4018 | # imports and basic notebook setup
from cStringIO import StringIO
import numpy as np
import scipy.ndimage as nd
import PIL.Image
# from IPython.display import clear_output, Image, display
from google.protobuf import text_format
import caffe
import cbaas
try:
caffe.set_gpu_mode()
except:
print "CPU mode
caffe_roo... | bsd-3-clause | -3,577,119,237,515,131,000 | 35.862385 | 120 | 0.638128 | false |
arnif/CouchPotatoServer | libs/bs4/builder/_lxml.py | 36 | 6297 | __all__ = [
'LXMLTreeBuilderForXML',
'LXMLTreeBuilder',
]
from StringIO import StringIO
import collections
from lxml import etree
from bs4.element import Comment, Doctype, NamespacedAttribute
from bs4.builder import (
FAST,
HTML,
HTMLTreeBuilder,
PERMISSIVE,
TreeBuilder,
XML)
from b... | gpl-3.0 | -1,403,158,421,015,122,200 | 34.178771 | 82 | 0.597427 | false |
sodafree/backend | build/ipython/build/lib.linux-i686-2.7/IPython/parallel/util.py | 3 | 11405 | """some generic utilities for dealing with classes, urls, and serialization
Authors:
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2010-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the ... | bsd-3-clause | -7,666,810,411,723,747,000 | 30.857542 | 90 | 0.5758 | false |
sysadmin75/ansible-modules-core | network/junos/junos_config.py | 19 | 6663 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | 8,768,464,078,179,568,000 | 31.34466 | 81 | 0.662164 | false |
quentinlautischer/291MiniProject2 | lib/python3.5/site-packages/bsddb3/tests/test_compat.py | 1 | 6164 | """
Copyright (c) 2008-2015, Jesus Cea Avion <jcea@jcea.es>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of... | apache-2.0 | -8,264,466,455,791,649,000 | 27.146119 | 84 | 0.548021 | false |
ipafw/version1.0 | lib/ipafw_protocol_check.py | 2 | 6061 | import yaml
import pyshark
import time
import os
import re
import pyshark
from robot.api import logger
from robot.libraries.BuiltIn import BuiltIn
from collections import OrderedDict
from sip_message_validation import SipMessageValida... | gpl-2.0 | 2,770,785,507,142,415,400 | 43.240876 | 121 | 0.511962 | false |
pipermerriam/django | tests/gis_tests/geos_tests/test_geos_mutation.py | 183 | 5388 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Modified from original contribution by Aryeh Leib Taurog, which was
# released under the New BSD license.
import unittest
from unittest import skipUnless
from django.contrib.gis.geos import (
HAS_GEOS, LinearRing, LineString, MultiPoint, Point, P... | bsd-3-clause | 5,144,953,859,638,299,000 | 31.071429 | 107 | 0.525427 | false |
bala4901/odoo | openerpcommand/module.py | 10 | 2435 | """
Show module information for a given database or from the file-system.
"""
import os
import sys
import textwrap
from . import common
# TODO provide a --rpc flag to use XML-RPC (with a specific username) instead
# of server-side library.
def run(args):
assert args.database
import openerp
config = opene... | agpl-3.0 | 6,286,542,365,642,667,000 | 36.461538 | 110 | 0.598768 | false |
xylar/acciv | tests/convertImages/Vicar.py | 2 | 6017 | #!/usr/bin/python
import numpy
# based on the vicar2png module by Jessica McKellar (jesstess at mit.edu)
# substantial modifications have been made to the code. However for
# thoroughness, I am including her Copyright under the MIT License below:
'''
The MIT License (MIT)
Copyright (c) 2012-2013 Jessica McKellar
... | mit | -2,280,893,717,843,183,400 | 29.388889 | 104 | 0.597141 | false |
RobertABT/heightmap | build/matplotlib/examples/axes_grid/make_room_for_ylabel_using_axesgrid.py | 15 | 1723 | from mpl_toolkits.axes_grid1 import make_axes_locatable
from mpl_toolkits.axes_grid1.axes_divider import make_axes_area_auto_adjustable
if __name__ == "__main__":
import matplotlib.pyplot as plt
def ex1():
plt.figure(1)
ax = plt.axes([0,0,1,1])
# ax = plt.subplot(111)
ax... | mit | 827,487,395,596,332,200 | 26.790323 | 79 | 0.520023 | false |
chiller/pytest | _pytest/standalonetemplate.py | 203 | 3281 | #! /usr/bin/env python
# Hi There!
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we're up to something nefarious (good for you for being
# paranoid!). This is a base64 encoding of a zip file, this zip file contains
# a fully functional basic pytest script.
#
# Pyt... | mit | -4,449,495,799,019,133,400 | 35.865169 | 78 | 0.636391 | false |
awkspace/ansible | lib/ansible/plugins/terminal/ironware.py | 49 | 2700 | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... | gpl-3.0 | 7,482,653,632,618,591,000 | 33.615385 | 99 | 0.635185 | false |
PlunderKnowledge/SumCrawler | SumCrawlerProducer/SumCrawlerSpider/spiders/__init__.py | 1 | 1529 | # This package will contain the spiders of your Scrapy project
#
# Please refer to the documentation for information on how to create and manage
# your spiders.
import scrapy
import functools
import requests
def _link_is_http(l):
return l.startswith('https://') or l.startswith('http://')
def _link_is_archive(l):
... | mit | 7,614,296,310,504,786,000 | 33.75 | 105 | 0.601046 | false |
HiSPARC/station-software | user/python/Lib/site-packages/win32comext/adsi/adsicon.py | 29 | 12541 | ADS_ATTR_CLEAR = ( 1 )
ADS_ATTR_UPDATE = ( 2 )
ADS_ATTR_APPEND = ( 3 )
ADS_ATTR_DELETE = ( 4 )
ADS_EXT_MINEXTDISPID = ( 1 )
ADS_EXT_MAXEXTDISPID = ( 16777215 )
ADS_EXT_INITCREDENTIALS = ( 1 )
ADS_EXT_INITIALIZE_COMPLETE = ( 2 )
ADS_SEARCHPREF_ASYNCHRONOUS = 0
ADS_SEARCHPREF_DEREF_ALIASES = 1
ADS_SEARCHPREF_SIZE... | gpl-3.0 | -4,457,026,655,375,240,000 | 36.324405 | 91 | 0.764054 | false |
arborh/tensorflow | tensorflow/python/keras/engine/data_adapter_test.py | 3 | 30720 | # 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 | 4,397,016,905,069,076,500 | 38.334187 | 80 | 0.666732 | false |
voutilad/courtlistener | cl/audio/tasks.py | 1 | 7928 | import hashlib
import json
import subprocess
import traceback
from tempfile import NamedTemporaryFile
import httplib2
from celery.canvas import chain
from django.conf import settings
from google.cloud import storage
from google.cloud.exceptions import Forbidden, NotFound
from google.cloud.storage import Blob
from goog... | agpl-3.0 | -917,689,523,018,277,400 | 35.036364 | 116 | 0.631559 | false |
jmetzen/scikit-learn | sklearn/externals/joblib/func_inspect.py | 239 | 11338 | """
My own variation on function-specific inspect-like features.
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# Copyright (c) 2009 Gael Varoquaux
# License: BSD Style, 3 clauses.
from itertools import islice
import inspect
import warnings
import re
import os
from ._compat import _basestrin... | bsd-3-clause | -1,664,019,793,751,111,200 | 36.419142 | 79 | 0.54948 | false |
dana-i2cat/felix | optin_manager/src/python/openflow/optin_manager/opts/forms.py | 4 | 5414 | from django import forms
from openflow.optin_manager.flowspace.utils import dotted_ip_to_int, mac_to_int
from django.forms.util import ErrorList
import re
from openflow.optin_manager.opts.models import AdminFlowSpace
class MACAddressForm(forms.Field):
def clean(self, value):
pattern = re.compile(r"^([0... | apache-2.0 | 6,313,110,013,050,804,000 | 46.078261 | 81 | 0.590137 | false |
pfarnach/altvote | migrations/versions/4517f9cbe1f9_.py | 1 | 1246 | """empty message
Revision ID: 4517f9cbe1f9
Revises: 42ef4a834d23
Create Date: 2016-04-13 22:34:37.727821
"""
# revision identifiers, used by Alembic.
revision = '4517f9cbe1f9'
down_revision = '42ef4a834d23'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | gpl-3.0 | -5,819,834,206,866,143,000 | 37.9375 | 119 | 0.685393 | false |
TomBaxter/waterbutler | waterbutler/providers/figshare/provider.py | 2 | 42750 | import json
import asyncio
import hashlib
from http import HTTPStatus
import aiohttp
from waterbutler.core import streams
from waterbutler.core import provider
from waterbutler.core import exceptions
from waterbutler.providers.figshare.path import FigsharePath
from waterbutler.providers.figshare import metadata, set... | apache-2.0 | -1,248,170,990,952,856,600 | 41.835671 | 109 | 0.595462 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-relay/azure/mgmt/relay/models/relay_management_client_enums.py | 2 | 1280 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 8,996,185,734,192,992,000 | 21.857143 | 88 | 0.613281 | false |
vicky2135/lucious | oscar/lib/python2.7/site-packages/django/utils/feedgenerator.py | 42 | 17789 | """
Syndication feed generation library -- used for generating RSS, etc.
Sample usage:
>>> from django.utils import feedgenerator
>>> feed = feedgenerator.Rss201rev2Feed(
... title="Poynter E-Media Tidbits",
... link="http://www.poynter.org/column.asp?id=31",
... description="A group Weblog by the sharpes... | bsd-3-clause | -1,365,320,457,410,035,000 | 37.925602 | 107 | 0.594412 | false |
cjh1/StarCluster | starcluster/commands/completers.py | 19 | 4704 | # Copyright 2009-2014 Justin Riley
#
# This file is part of StarCluster.
#
# StarCluster 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 Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later ... | gpl-3.0 | 5,371,476,059,380,895,000 | 32.6 | 79 | 0.613095 | false |
jdramani/servo | tests/wpt/css-tests/tools/manifest/item.py | 148 | 5139 | import urlparse
from abc import ABCMeta, abstractmethod, abstractproperty
item_types = ["testharness", "reftest", "manual", "stub", "wdspec"]
def get_source_file(source_files, tests_root, manifest, path):
def make_new():
from sourcefile import SourceFile
return SourceFile(tests_root, path, manife... | mpl-2.0 | 6,806,863,417,964,295,000 | 28.365714 | 94 | 0.599338 | false |
doismellburning/edx-platform | common/djangoapps/track/tracker.py | 239 | 2374 | """
Module that tracks analytics events by sending them to different
configurable backends.
The backends can be configured using Django settings as the example
below::
TRACKING_BACKENDS = {
'tracker_name': {
'ENGINE': 'class.name.for.backend',
'OPTIONS': {
'host': ... ,
... | agpl-3.0 | 4,288,741,273,175,784,000 | 22.979798 | 76 | 0.633109 | false |
llvm-mirror/lldb | packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py | 9 | 1924 | """
Test lldb command aliases.
"""
from __future__ import print_function
import unittest2
import os
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class LaunchInTerminalTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
... | apache-2.0 | -8,344,414,717,979,708,000 | 36.72549 | 90 | 0.677235 | false |
teamfx/openjfx-9-dev-rt | modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py | 1 | 3139 | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | gpl-2.0 | 1,792,932,986,410,626,800 | 48.825397 | 92 | 0.721886 | false |
isida/vi | plugins/event.py | 1 | 4035 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# --------------------------------------------------------------------------- #
# #
# iSida bot VI plugin #
# Copyright (C) diSable... | gpl-3.0 | -3,806,604,913,408,036,000 | 38.15 | 116 | 0.485679 | false |
psiinon/addons-server | src/olympia/tags/models.py | 3 | 3249 | from django.db import models
from django.urls import NoReverseMatch
from olympia import activity, amo
from olympia.amo.fields import PositiveAutoField
from olympia.amo.models import ManagerBase, ModelBase
from olympia.amo.urlresolvers import reverse
class TagManager(ManagerBase):
def not_denied(self):
"... | bsd-3-clause | -11,809,604,041,455,852 | 29.942857 | 78 | 0.61619 | false |
jannopet/LEGO-WeDo-2.0-Python-SDK | wedo2/bluetooth/service_manager.py | 1 | 1809 |
from wedo2.bluetooth import bluetooth_helper
from wedo2.bluetooth.connect_info import ConnectInfo
from wedo2.services.lego_service_factory import LegoServiceFactory
HUB_CHARACTERISTIC_ATTACHED_IO = "0x1527"
class ServiceManager:
def __init__(self, io):
self.io = io
self.services = set()
... | mit | -7,829,592,372,651,970,000 | 33.788462 | 104 | 0.624655 | false |
holmes/intellij-community | python/helpers/pydev/pydevd_attach_to_process/winappdbg/win32/context_i386.py | 102 | 16108 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Mario Vilas
# 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... | apache-2.0 | -4,475,559,459,849,225,700 | 34.875278 | 140 | 0.57369 | false |
ctrlaltdylan/CouchPotato | app/lib/provider/yarr/sources/x264.py | 8 | 2981 | from app.config.cplog import CPLog
from app.lib.provider.yarr.base import torrentBase
from imdb.parser.http.bsouplxml._bsoup import SoupStrainer, BeautifulSoup
from urllib import quote_plus
from urllib2 import URLError
import time
import urllib
import urllib2
log = CPLog(__name__)
class x264(torrentBase):
"""Prov... | gpl-3.0 | 5,215,921,231,275,038,000 | 32.875 | 99 | 0.572291 | false |
DHI-GRAS/processing_workflow | ProcessingWorkflowPlugin.py | 1 | 3497 | """
***************************************************************************
ProcessingWorkflowPlugin.py
-------------------------------------
Copyright (C) 2014 TIGER-NET (www.tiger-net.org)
***************************************************************************
* This plugin is part of the Water Observ... | gpl-3.0 | -664,209,614,738,905,500 | 49.681159 | 94 | 0.60366 | false |
bokeh/bokeh | bokeh/util/__init__.py | 1 | 2529 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | -6,882,650,401,763,880,000 | 16.685315 | 78 | 0.534599 | false |
AloneRoad/Inforlearn | vendor/django/contrib/gis/utils/layermapping.py | 1 | 29869 | # LayerMapping -- A Django Model/OGR Layer Mapping Utility
"""
The LayerMapping class provides a way to map the contents of OGR
vector files (e.g. SHP files) to Geographic-enabled Django models.
This grew out of my personal needs, specifically the code repetition
that went into pulling geometries and fields out of... | apache-2.0 | 6,198,167,973,775,874,000 | 43.054572 | 142 | 0.593023 | false |
krintoxi/NoobSec-Toolkit | NoobSecToolkit - MAC OSX/tools/sqli/thirdparty/chardet/langbulgarianmodel.py | 235 | 12820 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-2.0 | 5,572,619,645,694,633,000 | 55.22807 | 70 | 0.553354 | false |
kartoza/geonode | geonode/contrib/metadataxsl/tests.py | 8 | 1090 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | 8,103,679,226,917,680,000 | 34.16129 | 73 | 0.615596 | false |
jhawkesworth/ansible-modules-core | cloud/amazon/ec2_snapshot.py | 53 | 9982 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 | 1,699,248,283,677,130,800 | 31.409091 | 139 | 0.642957 | false |
LethusTI/supportcenter | vendor/django/django/contrib/sitemaps/tests/https.py | 77 | 2364 | from datetime import date
from django.test.utils import override_settings
from .base import SitemapTestsBase
class HTTPSSitemapTests(SitemapTestsBase):
protocol = 'https'
urls = 'django.contrib.sitemaps.tests.urls.https'
def test_secure_sitemap_index(self):
"A secure sitemap index can be rendere... | gpl-3.0 | -5,617,805,502,087,068,000 | 45.352941 | 109 | 0.700931 | false |
blrm/openshift-tools | ansible/roles/lib_zabbix/library/zbx_triggerprototype.py | 13 | 5976 | #!/usr/bin/env python
'''
ansible module for zabbix triggerprototypes
'''
# vim: expandtab:tabstop=4:shiftwidth=4
#
# Zabbix triggerprototypes ansible module
#
#
# Copyright 2015 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance wit... | apache-2.0 | 2,899,257,072,297,944,600 | 32.016575 | 94 | 0.583501 | false |
sergiocorato/partner-contact | partner_multi_relation/tests/test_partner_relation.py | 5 | 10771 | # -*- coding: utf-8 -*-
# Copyright 2016 Therp BV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import date
from dateutil.relativedelta import relativedelta
from openerp import fields
from openerp.exceptions import ValidationError
from .test_partner_relation_common import TestPart... | agpl-3.0 | -8,273,743,371,782,072,000 | 37.467857 | 76 | 0.566336 | false |
bright-sparks/chromium-spacewalk | tools/perf/measurements/thread_times.py | 32 | 2068 | # 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.
from measurements import timeline_controller
from metrics import timeline
from telemetry.core.platform import tracing_category_filter
from telemetry.page impo... | bsd-3-clause | 5,142,429,836,900,233,000 | 41.204082 | 74 | 0.722921 | false |
jenalgit/django | tests/view_tests/tests/test_defaults.py | 286 | 5307 | from __future__ import unicode_literals
import datetime
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.test import TestCase
from django.test.utils import override_settings
from ..models import Article, Author, UrlArticle
@override_settings(ROOT_URLCONF='view_te... | bsd-3-clause | 3,070,041,610,430,873,600 | 41.456 | 114 | 0.606369 | false |
thrasher-/litecoin | test/functional/interface_zmq.py | 6 | 4367 | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the ZMQ notification interface."""
import struct
from test_framework.test_framework import Bitcoi... | mit | -2,317,787,060,682,136,600 | 33.65873 | 151 | 0.622853 | false |
Jay-Jay-D/LeanSTP | Algorithm.Python/EmaCrossUniverseSelectionAlgorithm.py | 3 | 4365 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Lice... | apache-2.0 | 6,977,960,127,184,586,000 | 39.785047 | 151 | 0.688517 | false |
django-leonardo/horizon | tools/install_venv_common.py | 166 | 5958 | # Copyright 2013 OpenStack Foundation
# Copyright 2013 IBM Corp.
#
# 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 | -240,903,994,781,460,900 | 33.639535 | 79 | 0.589124 | false |
Ictp/indico | indico/MaKaC/plugins/Collaboration/RecordingManager/micala.py | 1 | 24361 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; eith... | gpl-3.0 | 2,439,879,869,134,007,000 | 48.313765 | 165 | 0.605558 | false |
benschmaus/catapult | telemetry/telemetry/internal/backends/chrome/cros_browser_backend.py | 1 | 9477 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
from telemetry.core import exceptions
from telemetry.core import util
from telemetry import decorators
from telemetry.internal.back... | bsd-3-clause | -6,739,607,142,896,545,000 | 32.967742 | 80 | 0.668144 | false |
raw1z/ultisnips | pythonx/UltiSnips/snippet/parsing/_lexer.py | 29 | 10109 | #!/usr/bin/env python
# encoding: utf-8
"""Not really a lexer in the classical sense, but code to convert snippet
definitions into logical units called Tokens."""
import string
import re
from UltiSnips.compatibility import as_unicode
from UltiSnips.position import Position
from UltiSnips.text import unescape
class... | gpl-3.0 | 4,096,377,800,382,430,700 | 26.395664 | 80 | 0.548323 | false |
pandel/Marlin | buildroot/share/scripts/createTemperatureLookupMarlin.py | 6 | 6204 | #!/usr/bin/python
"""Thermistor Value Lookup Table Generator
Generates lookup to temperature values for use in a microcontroller in C format based on:
http://en.wikipedia.org/wiki/Steinhart-Hart_equation
The main use is for Arduino programs that read data from the circuit board described here:
http://reprap.org/wiki/... | gpl-3.0 | 5,479,447,195,025,076,000 | 39.025806 | 147 | 0.48501 | false |
aricoin/Aricoin | qa/rpc-tests/util.py | 1 | 5260 | # Copyright (c) 2014 The Aricoin Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Helpful routines for regression testing
#
# Add python-aricoinrpc to module search path:
import os
import sys
sys.path.append... | mit | -865,275,153,320,455,700 | 33.605263 | 94 | 0.599049 | false |
JonWel/CoolProp | Web/scripts/fluid_properties.Consistency.py | 3 | 1267 | from __future__ import print_function
import os.path
import CoolProp
import subprocess
import sys
web_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
root_dir = os.path.abspath(os.path.join(web_dir, '..'))
fluids_path = os.path.join(web_dir,'fluid_properties','fluids')
plots_path = os.path.join(w... | mit | -9,089,691,620,180,953,000 | 34.222222 | 128 | 0.685083 | false |
anisku11/sublimeku | Packages/pygments/all/pygments/lexers/igor.py | 35 | 16982 | # -*- coding: utf-8 -*-
"""
pygments.lexers.igor
~~~~~~~~~~~~~~~~~~~~
Lexers for Igor Pro.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, words
from pygments.token import Text, Commen... | mit | 6,296,747,295,079,383,000 | 59.65 | 86 | 0.635909 | false |
doug-fish/horizon | openstack_dashboard/api/rest/config.py | 45 | 1598 | # Copyright 2015 IBM Corp.
# Copyright 2015, 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
#
# Un... | apache-2.0 | 5,698,413,668,324,021,000 | 35.318182 | 75 | 0.750939 | false |
2015fallproject/2015fallcase1 | static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_opcodes.py | 175 | 2675 | # Python test set -- part 2, opcodes
from test.support import run_unittest
import unittest
class OpcodeTest(unittest.TestCase):
def test_try_inside_for_loop(self):
n = 0
for i in range(10):
n = n+i
try: 1/0
except NameError: pass
except ZeroDivision... | agpl-3.0 | -8,076,238,051,948,757,000 | 22.883929 | 47 | 0.509533 | false |
daenamkim/ansible | lib/ansible/modules/net_tools/snmp_facts.py | 24 | 12848 | #!/usr/bin/python
# This file is part of Networklore's snmp library for Ansible
# 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,555,917,520,073,629,000 | 33.537634 | 142 | 0.588263 | false |
YinongLong/scikit-learn | sklearn/ensemble/tests/test_voting_classifier.py | 21 | 10259 | """Testing for the VotingClassifier"""
import numpy as np
from sklearn.utils.testing import assert_almost_equal, assert_array_equal
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_raise_message
from sklearn.exceptions import NotFittedError
from sklearn.linear_model import Logist... | bsd-3-clause | 4,865,958,291,196,947,000 | 38.457692 | 79 | 0.578127 | false |
Jorge-Rodriguez/ansible-modules-core | cloud/docker/docker_login.py | 39 | 9349 | #!/usr/bin/python
#
# (c) 2016 Olaf Kilian <olaf.kilian@symanex.com>
# Chris Houseknecht, <house@redhat.com>
# James Tanner, <jtanner@redhat.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 ... | gpl-3.0 | 5,664,352,796,893,849,000 | 30.267559 | 124 | 0.619852 | false |
N-Bz/bybop | src/Bybop_Discovery.py | 1 | 3630 | # This sample uses https://pypi.python.org/pypi/zeroconf
# as its MDNS implementation
from zeroconf import ServiceBrowser, Zeroconf
import socket
import threading
class DeviceID(object):
# Drones
BEBOP_DRONE = '0901'
JUMPING_SUMO = '0902'
JUMPING_NIGHT = '0905'
JUMPING_RACE = '0906'
BEBOP_2 =... | bsd-3-clause | -4,144,571,306,696,994,000 | 24.034483 | 76 | 0.564187 | false |
SilverIce/JContainers | dep/boost/tools/build/src/tools/gcc.py | 5 | 38692 | # Status: being ported by Steven Watanabe
# Base revision: 47077
# TODO: common.jam needs to be ported
# TODO: generators.jam needs to have register_c_compiler.
#
# Copyright 2001 David Abrahams.
# Copyright 2002-2006 Rene Rivera.
# Copyright 2002-2003 Vladimir Prus.
# Copyright (c) 2005 Reece H. Dunn.
# Copyright 200... | mit | -5,779,130,502,161,862,000 | 44.843602 | 153 | 0.607878 | false |
mkieszek/odoo | openerp/addons/base/tests/test_base.py | 4 | 34257 | import unittest2
import openerp.tests.common as common
from openerp.exceptions import ValidationError
class test_base(common.TransactionCase):
def setUp(self):
super(test_base,self).setUp()
self.res_partner = self.registry('res.partner')
self.res_users = self.registry('res.users')
... | agpl-3.0 | -3,513,295,658,910,486,500 | 64.500956 | 161 | 0.564673 | false |
ovnicraft/openerp-restaurant | sale_crm/report/__init__.py | 17 | 1106 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -7,642,417,374,409,763,000 | 41.538462 | 78 | 0.622966 | false |
emilybache/texttest-runner | src/main/python/lib/capturemock/replayinfo.py | 1 | 11846 |
""" Module to manage the information in the file and return appropriate matches """
import logging, difflib, re, os
try: # Python 2.7, Python 3.x
from collections import OrderedDict
except ImportError: # Python 2.6 and earlier
from ordereddict import OrderedDict
try: # Python 2.x
import config
except Impo... | mit | 3,124,558,981,422,513,700 | 39.568493 | 112 | 0.617508 | false |
manipopopo/tensorflow | tensorflow/python/data/util/sparse_test.py | 32 | 12006 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 1,089,461,044,934,879,600 | 32.442897 | 80 | 0.499334 | false |
yencarnacion/jaikuengine | .google_appengine/lib/django-1.3/django/contrib/gis/geos/tests/test_mutable_list.py | 244 | 14587 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, http://www.aryehleib.com
# All rights reserved.
#
# Modified from original contribution by Aryeh Leib Taurog, which was
# released under the New BSD license.
from django.contrib.gis.geos.mutable_list import ListMixin
from django.utils import unittest
class UserListA(ListMi... | apache-2.0 | 8,071,807,780,167,120,000 | 35.558897 | 93 | 0.494618 | false |
bbfamily/abu | abupy/UmpBu/ABuUmpEdgeBase.py | 1 | 25925 | # -*- encoding:utf-8 -*-
"""
边裁基础实现模块
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import logging
import os
from abc import abstractmethod
import numpy as np
import sklearn.preprocessing as preprocessing
from enum import Enum
from sklearn.metric... | gpl-3.0 | 2,956,229,053,648,925,000 | 45.444672 | 119 | 0.527774 | false |
RAtechntukan/CouchPotatoServer | libs/html5lib/treebuilders/etree_lxml.py | 1724 | 14031 | """Module for supporting the lxml.etree library. The idea here is to use as much
of the native library as possible, without using fragile hacks like custom element
names that break between releases. The downside of this is that we cannot represent
all possible trees; specifically the following are known to cause proble... | gpl-3.0 | -6,675,355,274,938,921,000 | 37.02439 | 121 | 0.55356 | false |
adkerr/tempest | tempest/openstack/common/local.py | 57 | 1722 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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.apac... | apache-2.0 | 7,385,363,127,438,839,000 | 35.638298 | 79 | 0.695703 | false |
lcamacho/airmozilla | airmozilla/manage/tests/views/test_channels.py | 1 | 4246 | from nose.tools import eq_, ok_
from funfactory.urlresolvers import reverse
from airmozilla.main.models import Channel
from .base import ManageTestCase
class TestChannels(ManageTestCase):
def setUp(self):
super(TestChannels, self).setUp()
Channel.objects.create(
name='Testing',
... | bsd-3-clause | 4,185,374,170,748,353,500 | 32.968 | 71 | 0.530853 | false |
googleads/google-ads-python | google/ads/googleads/v6/enums/types/device.py | 1 | 1201 | # -*- 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 o... | apache-2.0 | 8,180,716,919,931,234,000 | 26.295455 | 74 | 0.676936 | false |
4rado/RepositoryForProject | Lib/site-packages/numpy/distutils/cpuinfo.py | 51 | 22808 | #!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe"
"""
cpuinfo
Copyright 2002 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy (BSD style) license. See ... | gpl-3.0 | 4,873,710,500,892,600,000 | 32.29635 | 100 | 0.546738 | false |
DougFirErickson/qgisSpaceSyntaxToolkit | esstoolkit/external/pyqtgraph/graphicsItems/LegendItem.py | 34 | 6755 | from .GraphicsWidget import GraphicsWidget
from .LabelItem import LabelItem
from ..Qt import QtGui, QtCore
from .. import functions as fn
from ..Point import Point
from .ScatterPlotItem import ScatterPlotItem, drawSymbol
from .PlotDataItem import PlotDataItem
from .GraphicsWidgetAnchor import GraphicsWidgetAnchor
__all... | gpl-3.0 | -7,023,315,805,515,124,000 | 37.821839 | 111 | 0.521095 | false |
SymbiFlow/python-symbiflow-v2x | v2x/vlog_to_model.py | 1 | 8475 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 The SymbiFlow Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
"""
Convert a Verilog simulation model to a V... | isc | -692,670,121,979,903,200 | 32.105469 | 79 | 0.529912 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/win32/Demos/CreateFileTransacted_MiniVersion.py | 17 | 2759 | """
This demonstrates the creation of miniversions of a file during a transaction.
The FSCTL_TXFS_CREATE_MINIVERSION control code saves any changes to a new
miniversion (effectively a savepoint within a transaction).
"""
import win32file, win32api, win32transaction
import win32con, winioctlcon
import struct
import os
... | gpl-3.0 | -3,537,284,033,961,492,000 | 39.573529 | 98 | 0.788692 | false |
hrasdt/cult-panel | Taskbar.py | 1 | 7577 | from gi.repository import Clutter, Wnck
import arrow
from PagerModel import PagerModel
from PagerModel import is_skipped_tasklist, is_mini, is_urgent, is_active, is_normal
def new_pixbuf_texture(ww, hh, pb):
t = Clutter.Texture.new()
# Set dimensions.
t.set_width(ww)
t.set_height(hh)
# S... | bsd-2-clause | -5,245,902,419,137,834,000 | 32.526549 | 124 | 0.549822 | false |
sveetch/boussole | boussole/cli/console_script.py | 1 | 1784 | """
Main entrance to commandline actions
"""
import click
from ..logs import init_logger
from .compile import compile_command
from .startproject import startproject_command
from .version import version_command
from .watch import watch_command
# Help alias on "-h" argument
CONTEXT_SETTINGS = dict(help_option_names=[... | mit | -5,387,472,785,050,404,000 | 26.875 | 78 | 0.684417 | false |
w1ll1am23/home-assistant | homeassistant/components/somfy/sensor.py | 4 | 1731 | """Support for Somfy Thermostat Battery."""
from pymfy.api.devices.category import Category
from pymfy.api.devices.thermostat import Thermostat
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE
from . import SomfyEntity
from .const import API, C... | apache-2.0 | 956,895,956,343,952,100 | 29.910714 | 68 | 0.681109 | false |
akshmakov/Dolfin-Fijee-Fork | demo/undocumented/refinement/python/demo_refinement.py | 2 | 1508 | "This demo illustrates mesh refinement."
# Copyright (C) 2007-2009 Anders Logg
#
# This file is part of DOLFIN.
#
# DOLFIN 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 Free Software Foundation, either version 3 of the Licens... | gpl-3.0 | -2,230,550,920,610,348,500 | 21.848485 | 77 | 0.696286 | false |
EmmanuelJohnson/ssquiz | flask/lib/python2.7/site-packages/whoosh/lang/snowball/hungarian.py | 96 | 11694 | from whoosh.compat import u
class HungarianStemmer(object):
"""
The Hungarian Snowball stemmer.
:cvar __vowels: The Hungarian vowels.
:type __vowels: unicode
:cvar __digraphs: The Hungarian digraphs.
:type __digraphs: tuple
:cvar __double_consonants: The Hungarian double consonants.
:... | bsd-3-clause | -5,808,433,952,855,672,000 | 42.634328 | 79 | 0.431931 | false |
RadioFreeAsia/RDacity | lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Tools/dmd.py | 316 | 1511 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import sys
from waflib.Tools import ar,d
from waflib.Configure import conf
@conf
def find_dmd(conf):
conf.find_program(['dmd','dmd2','ldc'],var='D')
out=conf.cmd_and_log([co... | gpl-2.0 | -3,985,840,735,551,648,300 | 28.627451 | 102 | 0.632694 | false |
gusai-francelabs/datafari | windows/python/Lib/test/test_exceptions.py | 12 | 26271 | # Python test set -- part 5, built-in exceptions
import os
import sys
import unittest
import pickle, cPickle
from test.test_support import (TESTFN, unlink, run_unittest, captured_output,
check_warnings, cpython_only)
from test.test_pep352 import ignore_deprecation_warnings
# XXX This i... | apache-2.0 | 6,515,690,789,532,742,000 | 39.292945 | 114 | 0.543413 | false |
GarySparrow/mFlaskWeb | venv/Lib/site-packages/pygments/lexers/ecl.py | 47 | 5875 | # -*- coding: utf-8 -*-
"""
pygments.lexers.ecl
~~~~~~~~~~~~~~~~~~~
Lexers for the ECL language.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, words
from pygments.... | mit | -5,665,498,378,417,315,000 | 46 | 108 | 0.482043 | false |
ofekd/servo | components/script/dom/bindings/codegen/parser/tests/test_mozmap.py | 75 | 1163 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
dictionary Dict {};
interface MozMapArg {
void foo(MozMap<Dict> arg);
};
""")
results = parser.finish()
harness.check(len(results), 2, "Should know about two things");
harness.ok(isinstance(results[1... | mpl-2.0 | -4,913,297,064,828,378,000 | 28.820513 | 73 | 0.595873 | false |
TsubameDono/codecombat | scripts/devSetup/mongo.py | 67 | 4203 | from __future__ import print_function
__author__ = u'schmatz'
from downloader import Downloader
import tarfile
from errors import DownloadCorruptionError
import warnings
import os
from configuration import Configuration
from dependency import Dependency
import sys
import shutil
class MongoDB(Dependency):
def __ini... | mit | 7,827,276,451,880,988,000 | 38.280374 | 128 | 0.677373 | false |
cdsteinkuehler/MachineKit | lib/python/gladevcp/makepins.py | 12 | 2268 | #!/usr/bin/python2.4
# -*- encoding: utf-8 -*-
# GLADE_VCP
# Copyright 2010 Chris Morley
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# ... | lgpl-2.1 | -1,763,400,239,115,743,000 | 30.943662 | 79 | 0.652116 | false |
Yarrick13/hwasp | tests/asp/AllAnswerSets/nontight/example.hamiltonian.7.asp.gringo.test.py | 4 | 1438 | input = """
1 2 2 1 3 4
1 3 2 1 2 4
1 4 0 0
1 5 2 1 6 7
1 6 2 1 5 7
1 7 0 0
1 8 2 1 9 10
1 9 2 1 8 10
1 10 0 0
1 11 2 1 12 13
1 12 2 1 11 13
1 13 0 0
1 14 2 1 15 16
1 15 2 1 14 16
1 16 0 0
1 17 2 1 18 19
1 18 2 1 17 19
1 19 0 0
1 20 2 1 21 22
1 21 2 1 20 22
1 22 0 0
1 23 2 1 24 25
1 24 2 1 23 25
1 25 0 0
1 26 2 1 27 28... | apache-2.0 | -8,308,275,653,089,778,000 | 11.396552 | 14 | 0.572323 | false |
stephane-martin/salt-debian-packaging | salt-2016.3.3/tests/unit/modules/status_test.py | 2 | 3076 | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Libs
from salt.modules import status
from salt.exceptions import CommandExecutionError
# Import Salt Testing Libs
from salttesting import TestCase
from salttesting.helpers import ensure_in_syspath
from salttesting.mock ... | apache-2.0 | 9,180,511,112,454,209,000 | 33.561798 | 102 | 0.601105 | false |
andmos/ansible | lib/ansible/modules/network/f5/bigip_monitor_udp.py | 14 | 20573 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks 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 | -7,406,920,542,612,304,000 | 30.171212 | 92 | 0.596413 | 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.