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 |
|---|---|---|---|---|---|---|---|---|---|---|
uzh/ceph-tools | cleanup-spurious-images.py | 1 | 6125 | #!/usr/bin/env python
# -*- coding: utf-8 -*-#
#
#
# Copyright (C) 2015, S3IT, University of Zurich. All rights reserved.
#
#
# 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 ... | gpl-3.0 | 4,818,344,919,758,018,000 | 39.562914 | 112 | 0.597878 | false |
alfredgamulo/cloud-custodian | c7n/resources/sar.py | 2 | 2779 | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from c7n.actions import Action
from c7n.filters import CrossAccountAccessFilter
from c7n.query import QueryResourceManager, TypeInfo
from c7n.manager import resources
from c7n.utils import type_schema, local_session
@resources.register('... | apache-2.0 | 6,925,232,051,350,601,000 | 35.565789 | 82 | 0.625405 | false |
Belxjander/Kirito | Python-3.5.0-Amiga/Lib/test/test_pow.py | 7 | 4540 | import test.support, unittest
class PowTest(unittest.TestCase):
def powtest(self, type):
if type != float:
for i in range(-1000, 1000):
self.assertEqual(pow(type(i), 0), 1)
self.assertEqual(pow(type(i), 1), type(i))
self.assertEqual(pow(type(0), ... | gpl-3.0 | 4,114,914,832,122,593,300 | 35.031746 | 79 | 0.448678 | false |
frePPLe/frePPLe | freppledb/common/urls.py | 1 | 4543 | #
# Copyright (C) 2007-2017 by frePPLe bv
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This library is d... | agpl-3.0 | 6,669,151,123,050,445,000 | 33.946154 | 94 | 0.654634 | false |
luminousflux/lflux | lfluxproject/limage/migrations/0003_auto__add_field_image_content_type.py | 1 | 2650 | # -*- coding: 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):
# Adding field 'Image.content_type'
db.add_column('limage_image', 'content_type',
self... | mit | -1,360,185,327,364,889,300 | 52.02 | 174 | 0.558113 | false |
msabramo/ansible | lib/ansible/modules/commands/expect.py | 11 | 7754 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Matt Martz <matt@sivel.net>
#
# 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, ... | gpl-3.0 | -8,350,330,766,234,386,000 | 30.778689 | 79 | 0.607042 | false |
jptomo/rpython-lang-scheme | rpython/jit/backend/x86/runner.py | 1 | 5478 | import py
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi
from rpython.rlib.jit_hooks import LOOP_RUN_CONTAINER
from rpython.rlib import rgc
from rpython.jit.backend.x86.assembler import Assembler386
from rpython.jit.backend.x86.regalloc import gpr_reg_mgr_cls, xmm_reg_mgr_cls
from rpython.jit.backend.x8... | mit | -441,400,426,805,864,260 | 33.89172 | 121 | 0.640745 | false |
eHealthAfrica/onadata | onadata/apps/viewer/tests/test_remongo.py | 2 | 4545 | import os
from django.conf import settings
from django.core.management import call_command
from onadata.apps.main.tests.test_base import TestBase
from onadata.apps.viewer.models.parsed_instance import ParsedInstance
from onadata.apps.viewer.management.commands.remongo import Command
from onadata.libs.utils.common_tag... | bsd-2-clause | -3,514,362,526,714,842,600 | 43.126214 | 78 | 0.606381 | false |
gis4dis/poster | apps/processing/pmo/management/commands/pmo_import_watercourse_observation.py | 1 | 1400 | import logging
from django.core.management.base import BaseCommand
from apps.processing.pmo.util import util
from datetime import timedelta, datetime
from apps.processing.pmo.util.util import parse_date_range
logger = logging.getLogger(__name__)
#import_watercourse_observation
#import_watercourse_observation 2018-04-0... | bsd-3-clause | 4,288,616,242,207,365,600 | 39 | 88 | 0.632143 | false |
moniker-dns/debian-beaver | beaver/queue.py | 2 | 3627 | # -*- coding: utf-8 -*-
import Queue
import signal
import sys
import time
from beaver.transports import create_transport
from beaver.transports.exception import TransportException
from unicode_dammit import unicode_dammit
def run_queue(queue, beaver_config, logger=None):
signal.signal(signal.SIGTERM, signal.SIG_... | mit | 6,818,338,573,802,138,000 | 38 | 108 | 0.510339 | false |
nicolasmartinelli/PyRssMaker | addons/reddit/crawler.py | 3 | 8345 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from base.db import Article, Feed
from base.crawler import CrawlerBase
import json
import logging
import multiprocessing as mp
import re
from bs4 import BeautifulSoup
from mako.template import Template
l = logging.getLogger(__name__)
def _add_https(src):
if src and... | mit | -4,024,817,007,599,314,400 | 38.178404 | 100 | 0.475374 | false |
Brett55/moto | moto/iotdata/models.py | 8 | 6953 | from __future__ import unicode_literals
import json
import time
import boto3
import jsondiff
from moto.core import BaseBackend, BaseModel
from moto.iot import iot_backends
from .exceptions import (
ResourceNotFoundException,
InvalidRequestException
)
class FakeShadow(BaseModel):
"""See the specification:
... | apache-2.0 | 8,142,476,949,199,819,000 | 35.025907 | 143 | 0.606932 | false |
vladryk/horizon | openstack_dashboard/dashboards/project/volumes/backups/views.py | 22 | 4331 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -4,890,105,877,113,847,000 | 38.372727 | 75 | 0.670746 | false |
tylertian/Openstack | openstack F/python-glanceclient/glanceclient/v1/client.py | 5 | 1395 | # Copyright 2012 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 107,574,272,620,935,420 | 38.857143 | 78 | 0.688889 | false |
grilo/ansible-1 | lib/ansible/modules/cloud/openstack/os_image.py | 8 | 6880 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
#
# This module 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 vers... | gpl-3.0 | 3,854,045,003,820,647,000 | 31.761905 | 143 | 0.598983 | false |
Succeed-Together/bakfu | core/classes.py | 2 | 4230 | # -*- coding: utf-8 -*-
'''
Main classes
'''
from abc import abstractmethod
import inspect
from itertools import chain
def get_args_and_kwargs(var):
'''Extracts args ans kwargs variables from
the following forms :
((*args),{kwargs}),
(*args),
{kwargs},
Returns :
(args,kwargs)
The fo... | bsd-3-clause | 3,905,572,750,561,465,000 | 25.111111 | 77 | 0.560757 | false |
rg3/youtube-dl | youtube_dl/extractor/carambatv.py | 20 | 3524 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
float_or_none,
int_or_none,
try_get,
)
from .videomore import VideomoreIE
class CarambaTVIE(InfoExtractor):
_VALID_URL = r'(?:carambatv:|https?://video1\.ca... | unlicense | 5,214,221,152,321,013,000 | 31.074074 | 86 | 0.516744 | false |
russbishop/swift | test/Driver/Dependencies/Inputs/update-dependencies-bad.py | 10 | 1072 | #!/usr/bin/env python
# update-dependencies-bad.py - Fails on bad.swift -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LIC... | apache-2.0 | -7,649,270,629,936,343,000 | 31.484848 | 78 | 0.617537 | false |
GoogleCloudPlatform/datacatalog-connectors-hive | google-datacatalog-apache-atlas-connector/tests/google/datacatalog_connectors/apache_atlas/scrape/metadata_scraper_test.py | 1 | 6756 | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 1,052,945,719,632,120,700 | 39.698795 | 79 | 0.626258 | false |
pythonitalia/assopy | assopy/stripe/tests/test_templatetags.py | 2 | 2522 | from __future__ import absolute_import
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.template import Template, Context
from . import factories as f
class TestStripeTemplateTags(TestCase):
def setUp(self):
# clean fares
... | bsd-2-clause | 399,961,390,798,222,200 | 43.245614 | 95 | 0.635607 | false |
CiscoSystems/tempest | tempest/api/image/v2/test_images_member.py | 3 | 4250 | # 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
# d... | apache-2.0 | -77,989,964,925,644,900 | 45.195652 | 78 | 0.568941 | false |
cchanning/Impala | tests/common/impala_cluster_cm.py | 14 | 11556 | # Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Basic object model for an Impala cluster. Basic model is an "Impala Service" which
# represents a collection of ImpalaD processes and a State Store service. The Impala
# service is associated with an ImpalaCluster which has information on all the hosts
# / ma... | apache-2.0 | 2,030,616,690,927,677,000 | 38.040541 | 90 | 0.679647 | false |
czgu/opendataexperience | env/lib/python2.7/site-packages/django/contrib/auth/tests/test_forms.py | 35 | 19779 | from __future__ import unicode_literals
import os
import re
from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, Password... | apache-2.0 | 7,090,900,627,293,868,000 | 37.935039 | 143 | 0.624754 | false |
JesusAMR/ProgramasUNI | Romanos.py | 1 | 1218 | #! /usr/bin/python
import sys
inp = raw_input("Inserte el numero: ")
class Romano:
def __init__(self, entrada):
self.lstnRom = { 1: "I", 2: "X", 3: "C", 4: "M" }
self.lstcRom = { 1: "V", 2: "L", 3: "D"}
self.entrada = entrada
self.lon = len(entrada)
self.lim = self.lon
self.result = ""
def conversio... | gpl-3.0 | 1,153,205,829,685,655,600 | 33.8 | 96 | 0.609195 | false |
mathiasertl/django-ca | ca/django_ca/tests/tests_command_cache_crls.py | 1 | 2929 | # This file is part of django-ca (https://github.com/mathiasertl/django-ca).
#
# django-ca is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version... | gpl-3.0 | -329,267,803,858,479,300 | 38.581081 | 101 | 0.692386 | false |
ParticulateFlow/Palabos-PFM | scons/scons-local-2.1.0/SCons/Platform/irix.py | 21 | 1664 | """SCons.Platform.irix
Platform-specific initialization for SGI IRIX systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2... | agpl-3.0 | -4,935,553,149,364,765,000 | 36.818182 | 101 | 0.765024 | false |
openstack/cinder | cinder/tests/hacking/checks.py | 2 | 14111 | # Copyright (c) 2014 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -5,474,935,649,176,515,000 | 35.368557 | 79 | 0.619588 | false |
mburst/gevent-socketio-starterkit | fantasy/core/sockets.py | 1 | 5277 | from core.models import *
from socketio.namespace import BaseNamespace
from socketio.mixins import RoomsMixin, BroadcastMixin
from socketio.sdjango import namespace
import logging
import redis
from collections import defaultdict
def nested_defaultdict():
return defaultdict(dict)
@namespace('/home')... | mit | -3,127,850,271,263,903,000 | 45.133929 | 136 | 0.620428 | false |
palichis/elmolino | elmolino/urls.py | 1 | 1143 | from django.conf.urls import patterns, include, url
from django.contrib import admin
from web.views import *
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'elmolino.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
... | gpl-2.0 | 5,460,872,925,354,897,000 | 44.72 | 81 | 0.405074 | false |
wozz/electrum-myr | plugins/virtualkeyboard.py | 1 | 2092 | from PyQt4.QtGui import *
from electrum_myr import BasePlugin
from electrum_myr.i18n import _
from electrum_myr.plugins import BasePlugin, hook
from electrum_myr.i18n import _
class Plugin(BasePlugin):
def fullname(self):
return 'Virtual Keyboard'
def description(self):
return '%s\n%s' % (_(... | gpl-3.0 | -7,775,485,789,755,474,000 | 27.657534 | 160 | 0.544933 | false |
andymckay/addons-server | src/olympia/api/authentication.py | 3 | 5288 | from django.utils.encoding import smart_text
from django.utils.translation import ugettext as _
import commonware
import jwt
from rest_framework import exceptions
from rest_framework.authentication import get_authorization_header
from rest_framework_jwt.authentication import (
JSONWebTokenAuthentication as Upstrea... | bsd-3-clause | -6,535,593,066,688,116,000 | 37.59854 | 79 | 0.645991 | false |
elba7r/frameworking | frappe/www/rss.py | 8 | 1164 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import urllib
from frappe.utils import escape_html, get_request_site_address, now, cstr
no_cache = 1
base_template_path = "templates/www/rss.xml"
def get_context(c... | mit | 7,842,868,845,911,200,000 | 26.069767 | 82 | 0.702749 | false |
eecs445-f16/umich-eecs445-f16 | lecture07_naive-bayes/Lec07.py | 2 | 5343 | # plotting
from matplotlib import pyplot as plt;
from matplotlib import colors
import matplotlib as mpl;
from mpl_toolkits.mplot3d import Axes3D
if "bmh" in plt.style.available: plt.style.use("bmh");
# matplotlib objects
from matplotlib import mlab;
from matplotlib import gridspec;
# scientific
import numpy as np;
im... | mit | 2,807,670,406,307,736,600 | 33.477419 | 125 | 0.603781 | false |
jbeezley/girder | girder/api/describe.py | 1 | 30739 | # -*- coding: utf-8 -*-
import bson.json_util
import dateutil.parser
import inspect
import jsonschema
import os
import six
import cherrypy
from collections import OrderedDict
from girder import constants, logprint
from girder.api.rest import getCurrentUser, getBodyJson
from girder.constants import SortDir, VERSION
fro... | apache-2.0 | -6,370,051,301,363,379,000 | 37.137717 | 100 | 0.577182 | false |
balint256/gnuradio | docs/doxygen/doxyxml/doxyindex.py | 11 | 8909 | #
# Copyright 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later version.
#... | gpl-3.0 | -9,188,378,029,588,908,000 | 28.5 | 85 | 0.615894 | false |
VirusTotal/msticpy | msticpy/nbtools/foliummap.py | 1 | 11242 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Folium ... | mit | -5,948,565,719,242,640,000 | 32.064706 | 85 | 0.562444 | false |
SUNET/eduid-webapp | src/eduid_webapp/letter_proofing/views.py | 1 | 8577 | # -*- coding: utf-8 -*-
from flask import Blueprint, abort
from eduid_common.api.decorators import MarshalWith, UnmarshalWith, can_verify_identity, require_user
from eduid_common.api.exceptions import AmTaskFailed, MsgTaskFailed
from eduid_common.api.helpers import add_nin_to_user, check_magic_cookie, verify_nin_for... | bsd-3-clause | 6,693,204,529,694,503,000 | 44.142105 | 120 | 0.710505 | false |
shagi/cmsplugin_gallery_filer | cmsplugin_gallery/migrations/0004_auto__add_field_image_src_new.py | 2 | 11497 | # -*- coding: 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):
# Adding field 'Image.src_new'
db.add_column('cmsplugin_gallery_image', 'src_new',
sel... | bsd-2-clause | 234,057,685,695,669,000 | 79.971831 | 182 | 0.553971 | false |
ivmech/iviny-scope | lib/xlsxwriter/chart_stock.py | 1 | 3290 | ###############################################################################
#
# ChartStock - A class for writing the Excel XLSX Stock charts.
#
# Copyright 2013, John McNamara, jmcnamara@cpan.org
#
from . import chart
class ChartStock(chart.Chart):
"""
A class for writing the Excel XLSX Stock charts.
... | gpl-3.0 | 6,407,259,483,271,581,000 | 26.881356 | 79 | 0.426748 | false |
mac389/brainpy | lib/Analysis.py | 1 | 1379 | from brian import *
from itertools import product
import neuroTools as postdoc
from scipy.signal import fftconvolve
from time import time
import sortUtils as tech
import ISIpy as ISIpy
filenames = ['/Volumes/My Book/Rat/010113_real/continuous/ch045/ch045.spiketimes',
'/Volumes/My Book/Rat/010113_real/continuous/ch... | gpl-3.0 | -8,916,014,207,065,413,000 | 23.642857 | 82 | 0.708484 | false |
Grassboy/plugin.video.plurkTrend | youtube_dl/extractor/videofyme.py | 19 | 1697 | import re
from .common import InfoExtractor
from ..utils import (
find_xpath_attr,
determine_ext,
)
class VideofyMeIE(InfoExtractor):
_VALID_URL = r'https?://(www\.videofy\.me/.+?|p\.videofy\.me/v)/(?P<id>\d+)(&|#|$)'
IE_NAME = u'videofy.me'
_TEST = {
u'url': u'http://www.videofy.me/thisi... | mit | 782,440,485,634,443,300 | 35.891304 | 98 | 0.519151 | false |
hendrikwout/pynacolada | trash/pynacolada-20131101-2-old.py | 1 | 25756 | import pickle
import pylab as pl
from operator import itemgetter
import scipy.io as io
import numpy as np
import sys
from operator import mul
class SomeError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def rwicecube(filestream,shp... | gpl-3.0 | -2,215,253,140,054,306,300 | 40.743922 | 314 | 0.656119 | false |
blaa/WaveSync | libwavesync/audio_output.py | 1 | 2409 | class AudioOutput:
"""
Output abstraction - wraps all methods of sound card required to work.
"""
def __init__(self, config, device_index, buffer_size):
# Import pyaudio only if really needed.
# pylint: disable=import-outside-toplevel
import pyaudio
self.stream = None
... | mit | 2,106,156,185,354,112,000 | 32.929577 | 99 | 0.562059 | false |
hickey/amforth | core/devices/atmega165/device.py | 5 | 2197 | # Partname: ATmega165
# Built using part description XML file version 126
# generated automatically, do not edit
MCUREGS = {
'ADCH': '$79',
'ADCL': '$78',
'ADCSRA': '$7A',
'ADCSRB': '$7B',
'ADMUX': '$7C',
'DIDR0': '$7E',
'ACSR': '$50',
'DIDR1': '$7F',
'SPMCSR': '$57',
'CLKPR': '$61',
'GPIOR0': '$3E',
'GPIOR... | gpl-2.0 | 5,240,910,691,929,256,000 | 17.948276 | 51 | 0.474283 | false |
NauIceLab/SpectralAnalysis | GTanalysis.py | 4 | 17361 | ##############################################################################
# Created by Garrett Thompson
# Graphical User Interface for Data Analysis
# Created at Northern Arizona University
# for use in the Astrophysical Ice Laboratory
# Advisors: Jennifer Hanley, Will Grundy, Henry Roe
# garrett.leland.thom... | mit | 6,258,144,319,098,294,000 | 44.210938 | 200 | 0.580842 | false |
SeedScientific/luigi | luigi/__init__.py | 13 | 1841 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -1,592,065,354,899,458,300 | 29.683333 | 83 | 0.798479 | false |
gmalmquist/pants | contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_fetch.py | 2 | 8585 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import shu... | apache-2.0 | -8,099,423,934,128,981,000 | 36.986726 | 95 | 0.635294 | false |
mitmedialab/MediaCloud-Web-Tools | server/auth.py | 1 | 5016 | import datetime
import logging
import flask_login
import mediacloud.api
from flask import session
from server import user_db, login_manager
logger = logging.getLogger(__name__)
ROLE_ADMIN = 'admin' # Do everything, including editing users
ROLE_ADMIN_READ_ONLY = 'admin-readonly' # Read acce... | apache-2.0 | 5,876,654,610,688,028,000 | 32 | 113 | 0.632376 | false |
zstackorg/zstack-woodpecker | integrationtest/vm/multihosts/volumes/paths/path131.py | 2 | 2185 | import zstackwoodpecker.test_state as ts_header
TestAction = ts_header.TestAction
def path():
return dict(initial_formation="template2",
path_list=[[TestAction.create_volume, "volume1"], \
[TestAction.attach_volume, "vm1", "volume1"], \
[TestAction.create_volume, "volume2"], \
[TestAction.attach_volume, "v... | apache-2.0 | 5,785,840,727,852,143,000 | 42.7 | 75 | 0.670023 | false |
christi3k/zulip | zproject/jinja2/__init__.py | 12 | 1088 | from __future__ import absolute_import # Python 2 only
from typing import Any
from django.contrib.staticfiles.storage import staticfiles_storage
from django.template.defaultfilters import slugify, pluralize
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.u... | apache-2.0 | -3,926,545,575,955,192,300 | 31.969697 | 119 | 0.742647 | false |
tuxology/bcc | tests/python/test_tools_memleak.py | 4 | 4282 | #!/usr/bin/env python
from unittest import main, skipUnless, TestCase
import distutils.version
import os
import subprocess
import sys
import tempfile
TOOLS_DIR = "../../tools/"
class cfg:
cmd_format = ""
# Amount of memory to leak. Note, that test application allocates memory
# for its own needs in lib... | apache-2.0 | 5,513,017,951,526,482,000 | 33.532258 | 80 | 0.617235 | false |
marratj/ansible | lib/ansible/modules/network/eos/eos_vrf.py | 19 | 8633 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# 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 Li... | gpl-3.0 | 105,664,695,327,190,990 | 27.491749 | 104 | 0.576393 | false |
RonnyPfannschmidt/pip | src/pip/_internal/req/req_uninstall.py | 8 | 16547 | from __future__ import absolute_import
import csv
import functools
import logging
import os
import sys
import sysconfig
from pip._vendor import pkg_resources
from pip._internal.compat import WINDOWS, cache_from_source, uses_pycache
from pip._internal.exceptions import UninstallationError
from pip._internal.locations... | mit | 5,896,489,632,529,907,000 | 35.367033 | 79 | 0.559678 | false |
HPPTECH/hpp_IOSTressTest | Refer/IOST_OLD_SRC/IOST_0.12/IOST_WRun_PCIE.py | 6 | 6106 | #!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : IOST_WRun_PCIE.py
# Date : Oct 25, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# Copyright : 2016
# ... | mit | -6,395,786,963,239,752,000 | 59.455446 | 190 | 0.584671 | false |
addition-it-solutions/project-all | addons/l10n_fr/wizard/fr_report_compute_resultant.py | 8 | 2245 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
#... | agpl-3.0 | -3,881,236,392,867,007,000 | 39.089286 | 93 | 0.647661 | false |
kerimlcr/ab2017-dpyo | ornek/imageio/imageio-2.1.2/debian/python-imageio/usr/lib/python2.7/dist-packages/imageio/__init__.py | 2 | 1275 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, imageio contributors
# imageio is distributed under the terms of the (new) BSD License.
# This docstring is used at the index of the documentation pages, and
# gets inserted into a slightly larger description (in setup.py) for
# the page on Pypi:
"""
Imageio is a Python l... | gpl-3.0 | -5,891,973,240,517,837,000 | 27.977273 | 71 | 0.761569 | false |
pawelmhm/splash | splash/pool.py | 2 | 2940 | from __future__ import absolute_import
from twisted.internet import defer
from twisted.python import log
class RenderPool(object):
"""A pool of renders. The number of slots determines how many
renders will be run in parallel, at the most."""
def __init__(self, slots, network_manager_factory, splash_proxy... | bsd-3-clause | -3,478,791,923,297,984,000 | 37.684211 | 112 | 0.607823 | false |
jordotech/sherri_satchmo | satchmo/apps/payment/modules/sagepay/config.py | 7 | 4029 | from livesettings import *
from django.utils.translation import ugettext_lazy as _
# this is so that the translation utility will pick up the string
gettext = lambda s: s
_strings = (gettext('CreditCard'), gettext('Credit Card'), gettext('Sage Pay Secure Payments'))
# These cards require the issue number and start da... | bsd-3-clause | -7,466,817,001,370,552,000 | 35.963303 | 239 | 0.601638 | false |
Perferom/android_external_chromium_org | tools/telemetry/telemetry/core/platform/profiler/v8_profiler.py | 26 | 1625 | # 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 re
import tempfile
from telemetry.core.platform import profiler
class V8Profiler(profiler.Profiler):
_V8_ARG = '--js-flags=--logfile=%s --prof --... | bsd-3-clause | 2,839,174,302,564,927,000 | 33.574468 | 79 | 0.678769 | false |
jrper/fluidity | tools/profiling-graph.py | 5 | 1640 | #!/usr/bin/env python
import pylab
import matplotlib
import glob
import os.path
matplotlib.use('SVG')
def fetch_time(sub, file):
f = open(file)
for line in f:
if line.startswith("[") and sub in line:
return float(line.split()[3])
def draw_graph(times, output):
for sub in times.keys():
x = times[... | lgpl-2.1 | -7,722,557,930,395,733,000 | 23.477612 | 73 | 0.60122 | false |
Vagab0nd/SiCKRAGE | tests/db_tests.py | 1 | 5066 | """
Test show database functionality.
Tests:
DBBasicTests
DBMultiTests
"""
import threading
import time
import unittest
from datetime import datetime
import sickchill.oldbeard
from tests import test_lib as test
class DBBasicTests(test.SickChillTestDBCase):
"""
Perform basic database tests.
Test... | gpl-3.0 | 4,743,959,269,641,278,000 | 31.267516 | 159 | 0.567114 | false |
spacetelescope/asv | test/test_util.py | 2 | 11635 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import io
import locale
import os
import sys
import shutil
import pickle
import multiprocessing
import threading
import t... | bsd-3-clause | -2,144,581,552,295,334,100 | 27.610837 | 92 | 0.547607 | false |
jodygarnett/qgis-geoserver-plugin | src/geoserverexplorer/processingprovider/uploadvector.py | 1 | 1428 | import os
from qgis.core import *
from geoserveralgorithm import GeoServerAlgorithm
from processing.core.parameters import *
from processing.tools import dataobjects
class UploadVector(GeoServerAlgorithm):
INPUT = 'INPUT'
WORKSPACE = 'WORKSPACE'
def processAlgorithm(self, progress):
self.createC... | gpl-2.0 | -4,286,760,542,678,160,400 | 36.578947 | 77 | 0.659664 | false |
jsma/django-cms | menus/menu_pool.py | 5 | 15748 | # -*- coding: utf-8 -*-
import warnings
from functools import partial
from logging import getLogger
from django.conf import settings
from django.contrib import messages
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.core.exceptions import ValidationError
from django.core.u... | bsd-3-clause | -537,476,475,371,137,340 | 39.379487 | 86 | 0.588837 | false |
tacgomes/morph | morphlib/definitions_version.py | 1 | 2380 | # Copyright (C) 2015 Codethink Limited
#
# 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; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITH... | gpl-2.0 | -2,368,373,624,016,354,300 | 28.382716 | 77 | 0.673109 | false |
caosmo/pip | pip/__init__.py | 13 | 10419 | #!/usr/bin/env python
from __future__ import absolute_import
import logging
import os
import optparse
import warnings
import sys
import re
from pip.exceptions import InstallationError, CommandError, PipError
from pip.utils import get_installed_distributions, get_prog
from pip.utils import deprecation
from pip.vcs im... | mit | -3,944,030,378,682,795,500 | 32.07619 | 79 | 0.568577 | false |
rwightman/pytorch-image-models | timm/utils/model_ema.py | 1 | 5670 | """ Exponential Moving Average (EMA) of model updates
Hacked together by / Copyright 2020 Ross Wightman
"""
import logging
from collections import OrderedDict
from copy import deepcopy
import torch
import torch.nn as nn
_logger = logging.getLogger(__name__)
class ModelEma:
""" Model Exponential Moving Average ... | apache-2.0 | -66,506,024,903,776,400 | 44 | 102 | 0.657319 | false |
jackoalan/PSPL | Extensions/PMDLFormat/Blender/io_pspl/pspl_uvgen.py | 1 | 2087 | '''
PSPL Blender Addon
By Jack Andersen <jackoalan@gmail.com>
This file re-indexes UV generators for runtime-compatible materials
with valid texture slots.
'''
# Blend types supported by PSPL
pspl_compatible_blend_types = ['MIX', 'MULTIPLY', 'ADD', 'SUBTRACT']
# UV generator types types supported by PSPL
pspl_compa... | mit | -2,607,867,614,531,877,000 | 27.986111 | 110 | 0.597508 | false |
christianurich/VIBe2UrbanSim | 3rdparty/opus/src/opus_core/variables/expression_tests/aliases_file.py | 2 | 1737 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
from opus_core.tests import opus_unittest
from opus_core.datasets.dataset import Dataset
from opus_core.storage_factory import StorageFactory
from ... | gpl-2.0 | -6,464,573,354,038,030,000 | 44.945946 | 115 | 0.633276 | false |
moijes12/oh-mainline | vendor/packages/twisted/twisted/enterprise/sqlreflector.py | 19 | 11865 | # -*- test-case-name: twisted.test.test_reflector -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.enterprise import reflector
from twisted.enterprise.util import DBError, getKeyColumn, quote, safe
from twisted.enterprise.util import _TableInfo
from twisted.enterprise.row impor... | agpl-3.0 | 1,025,434,203,278,956,700 | 35.284404 | 106 | 0.56182 | false |
total-impact/depsy | models/search.py | 3 | 1682 | from sqlalchemy import sql
from package import prep_summary
from app import db
def autocomplete(search_str):
command = """(select project_name, impact, api_raw->'info'->>'summary' as summary, 'pypi_project' as type, 1 as first_sort, id
from package
where host='pypi'
and project_name ilike '{str}%'
... | mit | -3,141,067,465,177,040,400 | 24.104478 | 130 | 0.592152 | false |
BryceBrown/LinkstrDjango | rest_framework/templatetags/rest_framework.py | 1 | 9550 | from __future__ import unicode_literals, absolute_import
from django import template
from django.core.urlresolvers import reverse, NoReverseMatch
from django.http import QueryDict
from django.utils.html import escape
from django.utils.safestring import SafeData, mark_safe
from rest_framework.compat import urlparse
from... | apache-2.0 | -3,123,683,102,189,466,000 | 36.598425 | 143 | 0.586911 | false |
daineseh/kodi-plugin.video.ted-talks-chinese | youtube_dl/extractor/ard.py | 4 | 12530 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from .generic import GenericIE
from ..utils import (
determine_ext,
ExtractorError,
get_element_by_attribute,
qualities,
int_or_none,
parse_duration,
unified_strdate,
xpath_text,
)
from ... | gpl-2.0 | 9,107,583,091,590,075,000 | 38.878981 | 181 | 0.509423 | false |
claesenm/optunity | optunity/solvers/CMAES.py | 3 | 6744 | #! /usr/bin/env python
# Copyright (c) 2014 KU Leuven, ESAT-STADIUS
# 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
# notic... | bsd-3-clause | 5,052,498,143,691,891,000 | 36.054945 | 144 | 0.621886 | false |
mKeRix/home-assistant | homeassistant/components/zwave/light.py | 12 | 13263 | """Support for Z-Wave lights."""
import logging
from threading import Timer
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_HS_COLOR,
ATTR_TRANSITION,
ATTR_WHITE_VALUE,
DOMAIN,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_COLOR_TEMP,
SUPPORT_TRA... | mit | 5,844,130,539,537,956,000 | 32.40806 | 87 | 0.596698 | false |
antoviaque/edx-platform | common/djangoapps/track/tests/test_shim.py | 9 | 6809 | """Ensure emitted events contain the fields legacy processors expect to find."""
from mock import sentinel
from django.test.utils import override_settings
from openedx.core.lib.tests.assertions.events import assert_events_equal
from track.tests import EventTrackingTestCase, FROZEN_TIME
LEGACY_SHIM_PROCESSOR = [
... | agpl-3.0 | -3,236,976,696,412,245,500 | 30.233945 | 110 | 0.53488 | false |
ammarkhann/FinalSeniorCode | lib/python2.7/site-packages/django/forms/models.py | 6 | 55443 | """
Helper functions for creating Form classes from Django models
and database field objects.
"""
from __future__ import unicode_literals
import warnings
from collections import OrderedDict
from itertools import chain
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, Valida... | mit | -7,673,982,182,908,542,000 | 40.717833 | 116 | 0.586386 | false |
wkschwartz/django | django/contrib/contenttypes/forms.py | 21 | 3761 | from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.forms import ModelForm, modelformset_factory
from django.forms.models import BaseModelFormSet
class BaseGenericInlineFormSet(BaseModelFormSet):
"""
A formset for generic inline objects to a parent.
"""
... | bsd-3-clause | -590,207,776,006,884,500 | 43.77381 | 112 | 0.603031 | false |
aissehust/sesame-paste-noodle | mlbase/layers/output.py | 1 | 1364 | from .layer import Layer
from .layer import layerhelper
import theano
import theano.tensor as T
__all__ = [
'SoftMax',
]
@layerhelper
class SoftMax(Layer):
debugname = 'softmax'
LayerTypeName = 'SoftMax'
yaml_tag = u'!SoftMax'
def __init__(self):
super(SoftMax, self).__init__()
d... | bsd-3-clause | -7,449,609,179,001,500,000 | 25.230769 | 75 | 0.61217 | false |
davism4/MineHero | src/level.py | 1 | 7451 | import pygame, tiling, sprites
import constants as con, resources as res
import os
import randomMap
import time
def run(grid_data = None):
screen = res.screen
tilesize = con.TILE_WIDTH
player = sprites.JonesSprite()
clock = pygame.time.Clock()
# Initialize the grid
board = tiling.Board(co... | gpl-3.0 | -660,367,275,972,047,100 | 35.169903 | 212 | 0.481949 | false |
mengxn/tensorflow | tensorflow/python/layers/base.py | 9 | 14122 | # Copyright 2015 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,677,548,087,256,835,000 | 32.704057 | 110 | 0.65274 | false |
POFK/utilTool | stock/tools/Data.py | 1 | 3702 | #!/usr/bin/env python
# coding=utf-8
from abc import ABCMeta, abstractmethod
import datetime
import numpy as np
import pandas as pd
import tushare as ts
import tqdm
#Dir = '/mnt/data/'
print 'tushare ==>', ts.__version__
class Data(object):
__metaclass__ = ABCMeta
def __init__(self):
self.today = date... | mit | -237,900,982,935,462,240 | 27.045455 | 90 | 0.574824 | false |
PanDAWMS/autopyfactory | autopyfactory/utils.py | 1 | 5086 | #!/usr/bin/env python
"""
Convenience utilities for AutoPyFactory.
"""
import os
import signal
import subprocess
import threading
import time
class TimeOutException(Exception):
pass
class ExecutionFailedException(Exception):
pass
class TimedCommand(object):
"""
--------------------------... | apache-2.0 | 3,674,523,256,239,117,300 | 26.945055 | 131 | 0.500983 | false |
danielkza/dnf-plugins-extras | tests/support.py | 4 | 2697 | # Copyright (C) 2014 Red Hat, Inc.
# Copyright (C) 2015 Igor Gnatenko
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distri... | gpl-2.0 | -1,394,013,695,452,810,000 | 27.691489 | 79 | 0.678161 | false |
OWASP/django-DefectDojo | dojo/endpoint/views.py | 1 | 16171 | # # endpoints
import logging
from datetime import datetime
from dateutil.relativedelta import relativedelta
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.exceptions import PermissionDenied
from django.urls import reverse
from django.http import HttpRes... | bsd-3-clause | -785,144,914,726,463,500 | 39.528822 | 143 | 0.573619 | false |
ChinaMassClouds/copenstack-server | openstack/src/nova-2014.2/nova/objects/instance_action.py | 10 | 8511 | # 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 required by applicable law or agree... | gpl-2.0 | -4,201,443,530,869,758,000 | 38.771028 | 79 | 0.600752 | false |
madarou/angular-django | app/myblog/urls.py | 1 | 1385 | from django.conf.urls import patterns, url
from app.myblog import views
urlpatterns = patterns('',
#django url
url(r'^$', views.index, name='index'),
url(r'^code/$', views.code, name='code'),
url(r'^lab/$', views.lab, name='lab'),
url(r'^blog/$', views.blog, name='blog'),
url(r'^knowledge/$',... | bsd-2-clause | 4,079,235,829,388,876,000 | 45.166667 | 88 | 0.586282 | false |
EloYGomeZ/android-kenel-3.4.0 | scripts/build-all.py | 11 | 10171 | #! /usr/bin/env python
# Copyright (c) 2009-2011, Code Aurora Forum. 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
# n... | gpl-2.0 | -5,368,241,596,461,078,000 | 34.072414 | 80 | 0.583718 | false |
bkpathak/HackerRank-Problems | leet-code/recurring_fraction.py | 2 | 1088 | # To force Pythn 2.7 for floating point division
# from __future__ import division
import collections
import math
def recurring_fraction(numerator,denominator):
if numerator == 0:
return 0
if denominator == 0:
return ''
# Check if the numeratorbers are negative
result = ''
if ((numer... | mit | 7,396,879,520,662,295,000 | 26.2 | 50 | 0.581801 | false |
inducer/django-bootstrap3-datetimepicker | setup.py | 1 | 1143 | from setuptools import setup
setup(
name='django-bootstrap3-datetimepicker',
packages=['bootstrap3_datetime',],
package_data={'bootstrap3_datetime': ['static/bootstrap3_datetime/css/*.css',
'static/bootstrap3_datetime/js/*.js', ]},
include_package_data=True,
... | apache-2.0 | -3,795,952,842,707,160,000 | 37.1 | 83 | 0.628171 | false |
marcocor/semantic-view | src/main/python/annotate_jira.py | 1 | 4126 | from lxml import etree
from html2text import html2text
import dateparser
import unicodecsv as csv
import os
import logging
import argparse
import tagme
import re
from scipy.weave.converters import default
MAIL_REGEX = r"\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}"
URL_REGEX = r"(https?|ftp)://[^\s/$.?#].[^\s]*"
def clean_text(tex... | apache-2.0 | -3,442,580,906,351,728,000 | 43.365591 | 137 | 0.619244 | false |
wnesl/gnuradio-IA | gr-trellis/src/examples/python/test_turbo_equalization.py | 10 | 5525 | #!/usr/bin/env python
from gnuradio import gr
from gnuradio import trellis, digital
from gnuradio import eng_notation
import math
import sys
import fsm_utils
def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type):
metrics_in = trellis.metrics_f(fi.O(),dimensionality,tot_constellation,... | gpl-3.0 | -7,955,564,478,400,741,000 | 37.908451 | 187 | 0.65629 | false |
rubikloud/gpdb | gpMgmt/bin/gppylib/datetimeutils.py | 50 | 19603 | #!/usr/bin/env python
# $Id: $
# $Change: $
# $DateTime: $
# $Author: $
"""
Date and time input conversion
Module contents:
---- common
class DatetimeValueError - subclass of ValueError
---- datetime or date
datetime_syntax_msg - a string briefly describing the input format
str_to_datetime() - In... | apache-2.0 | 6,031,873,824,161,372,000 | 40.096436 | 196 | 0.585268 | false |
konsP/synnefo | snf-tools/synnefo_tools/burnin/logger.py | 8 | 15129 | # Copyright (C) 2010-2014 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed i... | gpl-3.0 | -2,835,812,318,677,861,000 | 31.960784 | 79 | 0.572146 | false |
abrt/gnome-abrt | src/gnome_abrt/errors.py | 1 | 1218 | ## Copyright (C) 2012 ABRT team <abrt-devel-list@redhat.com>
## Copyright (C) 2001-2005 Red Hat, Inc.
## 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
## (... | gpl-3.0 | -2,410,095,344,725,157,400 | 35.909091 | 79 | 0.716749 | false |
formiano/enigma2-4.4 | lib/python/Screens/VfdSkinSelector.py | 13 | 6028 | from Screens.Screen import Screen
from Screens.Standby import TryQuitMainloop
from Screens.MessageBox import MessageBox
from Components.ActionMap import NumberActionMap
from Components.Pixmap import Pixmap
from Components.Sources.StaticText import StaticText
from Components.MenuList import MenuList
from Plugins.Plugin ... | gpl-2.0 | -1,301,362,934,798,818,600 | 37.394904 | 253 | 0.694592 | false |
himanshu-setia/keystone | keystone/common/sql/migrate_repo/versions/095_add_integer_pkey_to_revocation_event_table.py | 8 | 2938 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | 363,206,148,695,778,300 | 46.387097 | 77 | 0.552076 | false |
BondAnthony/ansible | test/lib/ansible_test/_data/sanity/compile/compile.py | 34 | 1185 | #!/usr/bin/env python
"""Python syntax checker with lint friendly output."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import warnings
with warnings.catch_warnings():
# The parser module is deprecated as of Python 3.9.
# This implementation will need to be updated... | gpl-3.0 | -2,646,037,689,439,263,000 | 27.902439 | 99 | 0.599156 | false |
andreypopp/rrouter | docs/conf.py | 1 | 8228 | # -*- coding: utf-8 -*-
#
# rrouter documentation build configuration file, created by
# sphinx-quickstart on Wed May 21 02:47:06 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | mit | 1,727,973,927,432,875,000 | 30.76834 | 79 | 0.708192 | false |
teemulehtinen/a-plus | edit_course/operations/clone.py | 3 | 2013 | from django.db import transaction
def clone_learning_objects(category_map, module, objects, parent):
"""
Clones learning objects recursively.
"""
for lobject in list(a.as_leaf_class() for a in objects):
children = list(lobject.children.all())
# Save as new learning object.
lobj... | gpl-3.0 | 386,986,877,870,882,300 | 28.173913 | 75 | 0.645306 | 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.