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 |
|---|---|---|---|---|---|---|---|---|---|---|
SunguckLee/MariaDB-PageCompression | storage/tokudb/mysql-test/tokudb/t/change_column_int_not_supported.py | 56 | 1592 | #!/usr/bin/env python
import sys
def supported(from_int, from_modifier, to_int, to_modifer):
if from_modifier != to_modifer:
return False
if from_int > to_int:
return False
return True
def gen_tests_for_int(from_int, from_modifier, int_types, modifiers):
for to_int in range(len(int_types... | gpl-2.0 | -6,082,248,923,451,358,000 | 43.222222 | 103 | 0.626256 | false |
camptocamp/odoo | openerp/addons/base/tests/test_views.py | 3 | 28297 | # -*- encoding: utf-8 -*-
from functools import partial
import unittest2
from lxml import etree as ET
from lxml.builder import E
from openerp.tests import common
Field = E.field
class ViewCase(common.TransactionCase):
def setUp(self):
super(ViewCase, self).setUp()
self.addTypeEqualityFunc(ET._E... | agpl-3.0 | -7,062,963,063,714,226,000 | 33.131484 | 90 | 0.474678 | false |
PyLearner/tp-qemu | qemu/tests/watchdog.py | 7 | 12678 | import re
import time
import logging
from autotest.client.shared import error
from autotest.client.shared import utils
from virttest import utils_misc
from virttest import env_process
from virttest import utils_test
@error.context_aware
def run(test, params, env):
"""
Configure watchdog, crash the guest and ... | gpl-2.0 | 6,043,382,866,843,691,000 | 40.841584 | 88 | 0.590866 | false |
lexyan/SickBeard | lib/hachoir_core/compatibility.py | 186 | 4441 | """
Compatibility constants and functions. This module works on Python 1.5 to 2.5.
This module provides:
- True and False constants ;
- any() and all() function ;
- has_yield and has_slice values ;
- isinstance() with Python 2.3 behaviour ;
- reversed() and sorted() function.
True and False constants
===============... | gpl-3.0 | 5,251,549,785,416,989,000 | 23.005405 | 113 | 0.600766 | false |
odejesush/tensorflow | tensorflow/python/kernel_tests/extract_image_patches_op_test.py | 111 | 3672 | # 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 | 5,353,874,031,271,961,000 | 30.655172 | 80 | 0.581972 | false |
chudaol/edx-platform | common/djangoapps/config_models/admin.py | 84 | 7287 | """
Admin site models for managing :class:`.ConfigurationModel` subclasses
"""
from django.forms import models
from django.contrib import admin
from django.contrib.admin import ListFilter
from django.core.cache import get_cache, InvalidCacheBackendError
from django.core.urlresolvers import reverse
from django.http imp... | agpl-3.0 | -6,547,920,886,641,973,000 | 37.967914 | 112 | 0.62783 | false |
Kobzol/kaira | ptp/gencpp/checker.py | 10 | 7739 | #
# Copyright (C) 2013 Stanislav Bohm
#
# This file is part of Kaira.
#
# Kaira 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 3 of the License, or
# (at your option) any later versi... | gpl-3.0 | 8,627,674,714,373,072,000 | 34.995349 | 98 | 0.572425 | false |
umitproject/openmonitor-aggregator | django/db/__init__.py | 60 | 2444 | from django.conf import settings
from django.core import signals
from django.core.exceptions import ImproperlyConfigured
from django.db.utils import (ConnectionHandler, ConnectionRouter,
load_backend, DEFAULT_DB_ALIAS, DatabaseError, IntegrityError)
__all__ = ('backend', 'connection', 'connections', 'router', 'Dat... | agpl-3.0 | -5,601,569,821,014,144,000 | 36.6 | 84 | 0.74509 | false |
mocne/PycharmProjects | test/lanchView.py | 1 | 1219 | from selenium import webdriver
import time,os,sys
stepNum = 1
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches",["ignore-certificate-errors"])
browser = webdriver.Chrome(chrome_options=options)
browser.get("http://www.cnaidai.com/")
print stepNum,": Come in First_Page"
stepNum += 1
... | mit | 9,113,739,498,879,963,000 | 25.5 | 80 | 0.73831 | false |
hradec/gaffer | python/GafferImageTest/ImageNodeTest.py | 8 | 3790 | ##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | bsd-3-clause | 997,347,437,487,613,400 | 30.065574 | 103 | 0.690501 | false |
taniwha-qf/io_object_mu | import_mu/camera.py | 2 | 1774 | # vim:ts=4:et
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This prog... | gpl-2.0 | 9,205,316,160,519,216,000 | 34.48 | 74 | 0.713641 | false |
hsaputra/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/bijectors/sinh_arcsinh_bijector_test.py | 27 | 7437 | # 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 | -4,828,737,609,994,359,000 | 40.088398 | 94 | 0.63695 | false |
jedie/pypyjs-standalone | website/js/pypy.js-0.3.0/lib/modules/test/test_genericpath.py | 8 | 10778 | """
Tests common to genericpath, macpath, ntpath and posixpath
"""
import unittest
from test import test_support
import os
import genericpath
import sys
def safe_rmdir(dirname):
try:
os.rmdir(dirname)
except OSError:
pass
class GenericTest(unittest.TestCase):
# The path module to be tes... | mit | -6,713,611,173,318,551,000 | 36.423611 | 83 | 0.553071 | false |
eliasdesousa/indico | indico/core/signals/acl.py | 2 | 3773 | # This file is part of Indico.
# Copyright (C) 2002 - 2017 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; either version 3 of the
# License, or (a... | gpl-3.0 | 8,958,564,303,630,099,000 | 40.01087 | 78 | 0.750331 | false |
tensorflow/models | official/vision/beta/modeling/layers/box_sampler.py | 1 | 3406 | # Copyright 2021 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 | 451,350,931,227,537,600 | 35.623656 | 79 | 0.677921 | false |
Teagan42/home-assistant | homeassistant/components/smappee/switch.py | 7 | 2707 | """Support for interacting with Smappee Comport Plugs."""
import logging
from homeassistant.components.switch import SwitchDevice
from . import DATA_SMAPPEE
_LOGGER = logging.getLogger(__name__)
ICON = "mdi:power-plug"
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Smappee ... | apache-2.0 | 1,099,271,562,690,929,800 | 29.761364 | 84 | 0.564093 | false |
luotao1/Paddle | python/paddle/fluid/tests/unittests/test_rand_op.py | 2 | 4607 | # Copyright (c) 2020 PaddlePaddle 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 app... | apache-2.0 | 4,664,354,330,586,007,000 | 30.554795 | 78 | 0.596267 | false |
mondwan/py-iems5723 | hw3/1155002613_hw3.py | 1 | 2439 | """
File: 1155002613_hw3.py
Author: Me
Email: 0
Github: 0
Description: Compute betweenness centrality and produce the network graph
"""
import os
import pydot
import networkx as nx
with open(os.path.join('.', 'input.csv'), 'r') as f:
lines = [l.rstrip('\n') for l in f.readlines()]
# Process graph
graph = pydot.... | mit | -8,851,176,529,973,871,000 | 29.873418 | 74 | 0.621976 | false |
snakeleon/YouCompleteMe-x86 | third_party/ycmd/ycmd/tests/clang/flags_test.py | 1 | 22341 | # Copyright (C) 2011, 2012 Google Inc.
#
# This file is part of ycmd.
#
# ycmd 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.
#
# ycmd... | gpl-3.0 | -408,365,900,259,094,400 | 28.014286 | 80 | 0.546484 | false |
yousafsyed/casperjs | bin/Lib/ctypes/test/test_simplesubclasses.py | 170 | 1289 | import unittest
from ctypes import *
class MyInt(c_int):
def __eq__(self, other):
if type(other) != MyInt:
return NotImplementedError
return self.value == other.value
class Test(unittest.TestCase):
def test_compare(self):
self.assertEqual(MyInt(3), MyInt(3))
self.a... | mit | -2,096,861,125,331,265,500 | 22.436364 | 59 | 0.547711 | false |
cfei18/incubator-airflow | airflow/operators/generic_transfer.py | 15 | 3125 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 7,989,031,497,120,880,000 | 37.580247 | 80 | 0.68608 | false |
ZachRiegel/scriptbin | pypyjs/modules/rfc822.py | 99 | 33295 | """RFC 2822 message manipulation.
Note: This is only a very rough sketch of a full RFC-822 parser; in particular
the tokenizing of addresses does not adhere to all the quoting rules.
Note: RFC 2822 is a long awaited update to RFC 822. This module should
conform to RFC 2822, and is thus mis-named (it's not worth rena... | gpl-3.0 | 631,795,350,256,148,900 | 31.93274 | 79 | 0.549452 | false |
lz1988/django-web2015 | django/dispatch/saferef.py | 218 | 10623 | """
"Safe weakrefs", originally from pyDispatcher.
Provides a way to safely weakref any function, including bound methods (which
aren't handled by the core weakref module).
"""
import traceback
import weakref
def safeRef(target, onDelete = None):
"""Return a *safe* weak reference to a callable target
target... | bsd-2-clause | -3,088,620,277,964,761,000 | 40.33463 | 148 | 0.617246 | false |
alheinecke/tensorflow-xsmm | tensorflow/tools/quantization/quantize_graph_test.py | 28 | 42167 | # 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 | 3,081,141,184,661,387,000 | 42.83264 | 80 | 0.643702 | false |
hastern/jelly | plugin.py | 1 | 8548 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Jelly Plugin - A minimal plugin framework.
The idea and basis for this code came from:
http://martyalchin.com/2008/jan/10/simple-plugin-framework/
To create a pluginhook define a new class, and set `PluginMount` or
`TaxonomyPluginMount` as its `__metaclass__`.
Every... | mit | 1,019,852,720,748,311,300 | 35.220339 | 129 | 0.588091 | false |
MechCoder/scikit-learn | sklearn/metrics/tests/test_score_objects.py | 33 | 17877 | import pickle
import tempfile
import shutil
import os
import numbers
import numpy as np
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import assert_raises_regexp
from sklearn.utils.t... | bsd-3-clause | -685,105,346,319,181,600 | 38.118162 | 79 | 0.642893 | false |
GeoscienceAustralia/geodesy-domain-model | aws/amazonia/amazonia/classes/amz_cf_distribution.py | 3 | 10697 | #!/usr/bin/python3
from troposphere import cloudfront, ImportValue
class CloudfrontConfigError(Exception):
"""
Error thrown Cloudfront objects are misconfigured
"""
def __init__(self, value):
self.value = value
class CFDistribution(object):
def __init__(self, title, template, cf_origin... | bsd-3-clause | -2,338,429,881,151,709,700 | 43.385892 | 119 | 0.609517 | false |
loco-odoo/localizacion_co | openerp/addons-extra/odoo-pruebas/odoo-server/openerp/addons/base/res/ir_property.py | 116 | 12223 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | 8,759,935,453,005,685,000 | 38.944444 | 119 | 0.524994 | false |
Peratham/tensorlib | tensorlib/decomposition/tests/test_decomposition.py | 2 | 1591 | import numpy as np
from tensorlib.decomposition import cp
from tensorlib.decomposition.decomposition import _cp3
from tensorlib.decomposition import tucker
from tensorlib.decomposition.decomposition import _tucker3
from tensorlib.datasets import load_bread
from numpy.testing import assert_almost_equal
from nose.tools i... | bsd-3-clause | -826,047,317,476,428,000 | 32.145833 | 66 | 0.653048 | false |
brownnrl/moneyguru | core/tests/gui/general_ledger_view_test.py | 1 | 1195 | # Copyright 2019 Virgil Dupras
#
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
from ..testutil import eq_
from ...const import AccountType
from ..base im... | gpl-3.0 | 154,731,344,535,883,330 | 33.142857 | 89 | 0.686192 | false |
placrosse/ImpalaToGo | common/thrift/generate_error_codes.py | 4 | 6443 | #!/usr/bin/env python
# Copyright 2015 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 8,153,284,150,709,283,000 | 33.639785 | 89 | 0.68136 | false |
Danfocus/Flexget | flexget/tests/test_feed_control.py | 13 | 2291 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import pytest
class TestOnlyTask(object):
"""
Test --task option
"""
config = """
tasks:
test:
mock:
- {t... | mit | 2,666,615,488,175,976,400 | 31.728571 | 98 | 0.601048 | false |
stvstnfrd/edx-platform | openedx/core/djangoapps/olx_rest_api/block_serializer.py | 5 | 7645 | """
Code for serializing a modulestore XBlock to OLX suitable for import into
Blockstore.
"""
import logging
import os
from collections import namedtuple
from lxml import etree
from . import adapters
log = logging.getLogger(__name__)
# A static file required by an XBlock
StaticFile = namedtuple('StaticFile', ['name... | agpl-3.0 | -6,771,383,508,496,106,000 | 45.90184 | 115 | 0.608241 | false |
NLeSC/embodied-emotions-scripts | embem/emotools/folia_helpers.py | 1 | 1678 | """Helper functions for using the FoLiA format from pynlpl.
"""
from pynlpl.formats import folia
from lxml import etree
import os
def parse_document(file_name):
try:
doc = folia.Document(file=file_name)
except Exception as e:
return None, 'Unable to parse FoLiA XML file.\n{}'.format(str(e))
... | apache-2.0 | 4,368,718,293,767,857,000 | 33.244898 | 79 | 0.567938 | false |
Hack-a-thingie/game-of-will | Test.py | 1 | 7962 | import math
import pygame
import time
# Initializes the pygame library
pygame.init()
# Color definition
BLACK = (0, 0, 0)
BLACKA = (0, 0, 0, 0.3)
WHITE = (255, 255, 255)
WHITEA = (255, 255, 255, 0.3)
BLUE = (0, 0, 255)
BLUEA = (0, 0, 255, 0.3)
GREEN = (0, 255, 0)
GREENA = (0, 255, 0, 0.3)
RED = (255, 0, 0)
REDA = (25... | mit | 2,504,814,784,152,879,600 | 35.360731 | 133 | 0.582391 | false |
OAPDF/oapdf_tools | oapdf/jrecord.py | 2 | 3110 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
######################## Part3: Journal Record #############################
############### General Journal Record class ###############################
class Jrecord(object):
'''Basic journal record information'''
def __init__(self):
... | mit | -8,013,485,014,006,294,000 | 22.568182 | 138 | 0.62508 | false |
bswartz/cinder | cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_7mode.py | 1 | 7144 | # Copyright (c) 2015 Tom Barron. 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 | -2,602,581,882,698,884,000 | 41.023529 | 78 | 0.605123 | false |
cloud-fan/spark | examples/src/main/python/mllib/logistic_regression_with_lbfgs_example.py | 27 | 2043 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | -89,356,654,161,841,900 | 38.288462 | 99 | 0.723446 | false |
simbs/edx-platform | common/djangoapps/track/views/tests/test_segmentio.py | 40 | 21960 | """Ensure we can parse events sent to us from the Segment webhook integration"""
from datetime import datetime
import json
from ddt import ddt, data, unpack
from mock import sentinel
from django.contrib.auth.models import User
from django.test.client import RequestFactory
from django.test.utils import override_setti... | agpl-3.0 | 4,342,107,770,060,379,600 | 40.20075 | 175 | 0.544763 | false |
cristian99garcia/pilas-activity | pilas/actores/globoelegir.py | 1 | 1510 | # -*- encoding: utf-8 -*-
import pilas
from pilas.actores.globo import Globo
class GloboElegir(Globo):
def __init__(self, texto, opciones, funcion_a_invocar, x=0, y=0, dialogo=None):
self.dialogo = dialogo
self.opciones = opciones
self.funcion_a_invocar = funcion_a_invocar
espa... | gpl-3.0 | 2,976,796,157,890,573,300 | 39.810811 | 115 | 0.640397 | false |
Innovahn/odoo.old | openerp/report/render/rml2html/utils.py | 438 | 2386 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2005, Fabien Pinckaers, UCL, FSA
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesse... | agpl-3.0 | -6,644,504,774,736,889,000 | 33.085714 | 80 | 0.575021 | false |
bertucho/epic-movie-quotes-quiz | dialogos/build/Twisted/twisted/web/test/test_xml.py | 8 | 41745 | # -*- test-case-name: twisted.web.test.test_xml -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Some fairly inadequate testcases for Twisted XML support.
"""
from twisted.trial.unittest import TestCase
from twisted.web import sux
from twisted.web import microdom
from twisted.web import... | mit | -3,042,301,874,815,425,500 | 37.617021 | 87 | 0.581411 | false |
marc-sensenich/ansible | lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py | 24 | 9024 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ver... | gpl-3.0 | -8,372,312,183,524,192,000 | 39.832579 | 156 | 0.60184 | false |
Mappy/luigi | luigi/file.py | 1 | 4341 | # Copyright (c) 2012 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 or agreed to in writing, s... | apache-2.0 | -7,584,842,429,237,343,000 | 31.155556 | 103 | 0.612532 | false |
MiLk/ansible | lib/ansible/modules/system/ufw.py | 16 | 12151 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Ahti Kitsik <ak@ahtik.com>
# (c) 2014, Jarno Keskikangas <jarno.keskikangas@gmail.com>
# (c) 2013, Aleksey Ovcharenko <aleksey.ovcharenko@gmail.com>
# (c) 2013, James Martin <jmartin@basho.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can ... | gpl-3.0 | 3,308,007,628,219,006,500 | 31.230769 | 146 | 0.594684 | false |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | esstoolkit/urban_data_input/entrances.py | 1 | 10931 | # -*- coding: utf-8 -*-
# Space Syntax Toolkit
# Set of tools for essential space syntax network analysis and results exploration
# -------------------
# begin : 2016-06-03
# copyright : (C) 2016 by Abhimanyu Acharya/(C) 2016 by Space Syntax Limited’.
# author : Abhimanyu Achary... | gpl-3.0 | -6,585,765,034,687,079,000 | 41.691406 | 111 | 0.633635 | false |
yuxng/DA-RNN | lib/networks/vanilla2d.py | 1 | 1494 | import tensorflow as tf
class Vanilla2DCell(tf.contrib.rnn.RNNCell):
"""Vanilla Recurrent Unit cell."""
def __init__(self, num_units, channels):
self._num_units = num_units
self._channels = channels
@property
def state_size(self):
return self._num_units
@property
def ... | mit | -6,562,613,784,776,951,000 | 36.35 | 108 | 0.607095 | false |
btardio/Django_Personal_Website_Concept | app_manage_subscriptions/tests.py | 1 | 8788 | #
#
#
# Copyright (C) 2016 Brandon C Tardio
#
# This file is part of DPWC
#
# DPWC 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) a... | gpl-3.0 | 3,730,205,032,737,905,700 | 32.67433 | 119 | 0.631202 | false |
nwchandler/ansible | lib/ansible/modules/web_infrastructure/jenkins_plugin.py | 31 | 25931 | #!/usr/bin/python
# encoding: utf-8
# (c) 2016, Jiri Tyr <jiri.tyr@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 | 5,533,824,352,137,040,000 | 30.279855 | 79 | 0.564652 | false |
crazyoldbox/cellwars | pgu/gui/select.py | 29 | 4602 | """
"""
import traceback
from .const import *
from .button import Button
from .basic import Label, Image
from .table import Table
class Select(Table):
"""A combo dropdown box widget.
Example:
w = Select(value="goats")
w.add("Cats","cats")
w.add("Goats","goats")
w.add("Dog... | gpl-2.0 | 3,259,857,490,733,763,600 | 27.7625 | 79 | 0.531291 | false |
dealien/Red-Magician | cogs/roller.py | 1 | 4118 | import discord
from discord.ext import commands
import random
class Roller:
"""Rolling dices, the right way"""
def __init__(self, bot):
self.bot = bot
self.roll_arr = []
# Dice rolling function
def roll_dice(self, count, dice, mod, result):
# extra rolls check
extra_r... | gpl-3.0 | -3,442,680,167,455,032,000 | 31.171875 | 135 | 0.502914 | false |
fnordahl/nova | nova/tests/unit/virt/libvirt/volume/test_fibrechannel.py | 33 | 1894 | # 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 | 412,409,129,470,067,800 | 42.045455 | 79 | 0.681626 | false |
394954369/horizon | openstack_dashboard/dashboards/identity/groups/tests.py | 41 | 8437 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | -8,415,259,000,413,256,000 | 36.331858 | 79 | 0.584924 | false |
iulian787/spack | var/spack/repos/builtin/packages/py-workload-automation/package.py | 4 | 2174 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyWorkloadAutomation(PythonPackage):
"""Workload Automation (WA) is a framework for execut... | lgpl-2.1 | -474,040,615,755,539,700 | 56.210526 | 95 | 0.723551 | false |
dawnpower/nova | nova/tests/functional/api/client.py | 7 | 13069 | # Copyright (c) 2011 Justin Santa Barbara
#
# 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 applicab... | apache-2.0 | -4,884,405,605,397,709,000 | 35.10221 | 79 | 0.611064 | false |
i4Ds/IRE | IREMedia/libraries/OpenCV/samples/python2/watershed.py | 7 | 2096 | #!/usr/bin/env python
'''
Watershed segmentation
=========
This program demonstrates the watershed segmentation algorithm
in OpenCV: watershed().
Usage
-----
watershed.py [image filename]
Keys
----
1-7 - switch marker color
SPACE - update segmentation
r - reset
a - toggle autoupdate
ESC - exit... | apache-2.0 | -7,661,371,875,126,451,000 | 25.531646 | 88 | 0.535782 | false |
ya7lelkom/googleads-python-lib | examples/dfp/v201505/product_service/get_all_products.py | 3 | 1704 | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 5,062,446,718,980,249,000 | 29.981818 | 78 | 0.716549 | false |
rkq/cxxexp | third-party/src/thrift-0.9.1/lib/py/src/transport/THttpClient.py | 157 | 4221 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | mit | -6,163,582,388,347,731,000 | 27.328859 | 78 | 0.658375 | false |
DominoTree/servo | tests/wpt/web-platform-tests/tools/third_party/attrs/tests/test_validators.py | 41 | 6577 | """
Tests for `attr.validators`.
"""
from __future__ import absolute_import, division, print_function
import pytest
import zope.interface
import attr
from attr import has
from attr import validators as validator_module
from attr._compat import TYPE
from attr.validators import and_, in_, instance_of, optional, provi... | mpl-2.0 | -6,292,323,320,481,611,000 | 23.725564 | 79 | 0.500076 | false |
Tivix/wagtail | wagtail/wagtailcore/tests/test_utils.py | 27 | 1287 | # -*- coding: utf-8 -*
from __future__ import unicode_literals
from django.test import TestCase
from django.utils.text import slugify
from wagtail.wagtailcore.utils import cautious_slugify
class TestCautiousSlugify(TestCase):
def test_behaves_same_as_slugify_for_latin_chars(self):
test_cases = [
... | bsd-3-clause | 4,332,512,998,539,343,000 | 32.394737 | 73 | 0.567376 | false |
mlperf/inference_results_v0.5 | closed/CentaurTechnology/code/ssd-small/python/main.py | 3 | 22760 | """
mlperf inference benchmarking tool
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import array
import collections
import json
import logging
import os
import sys
import threading
import time
from queue import Queue
import mlperf_l... | apache-2.0 | -4,036,306,461,120,915,500 | 35.532905 | 116 | 0.611292 | false |
afabiani/mapstore | doc/en/conf.py | 13 | 8821 | # -*- coding: utf-8 -*-
#
# MapStore documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 1 14:56:36:21 2013.
#
# 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.
#
#... | gpl-3.0 | -3,921,279,716,736,816,000 | 33.061776 | 80 | 0.715678 | false |
gamahead/nupic | tests/unit/nupic/algorithms/tp10x2_test.py | 12 | 13288 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | gpl-3.0 | 7,080,548,617,124,376,000 | 35.707182 | 79 | 0.621312 | false |
biocyberman/bcbio-nextgen | bcbio/hla/bwakit.py | 5 | 4025 | """Call HLA alleles with assembly methods implemented in bwakit.
https://github.com/lh3/bwa/blob/master/README-alt.md#hla-typing
https://github.com/lh3/bwa/tree/master/bwakit
"""
import csv
import glob
import os
import toolz as tz
from bcbio import utils
from bcbio.distributed.transaction import file_transaction
fro... | mit | 4,608,289,395,812,743,000 | 44.224719 | 116 | 0.563727 | false |
praekelt/go-api-toolkit | go_api/collections/inmemory.py | 1 | 4132 | """
An in-memory ICollection implementation.
"""
from copy import deepcopy
from uuid import uuid4
from go_api.queue import PausingDeferredQueue, PausingQueueCloseMarker
from twisted.internet.defer import inlineCallbacks
from zope.interface import implementer
from .interfaces import ICollection
from .errors import (
... | bsd-3-clause | -1,214,058,584,306,570,000 | 29.835821 | 79 | 0.613262 | false |
chengsoonong/acton | acton/database.py | 1 | 72157 | """Wrapper class for databases."""
from abc import ABC, abstractmethod
from inspect import Traceback
import json
import logging
import os.path
import tempfile
from typing import Iterable, List, Sequence
import warnings
import time
from acton.proto.acton_pb2 import Database as DatabasePB
import astropy.io.ascii as io_... | bsd-3-clause | -836,827,482,069,498,800 | 32.236757 | 80 | 0.542234 | false |
wimberosa/samba | source4/scripting/python/samba/netcmd/dbcheck.py | 1 | 4646 | #!/usr/bin/env python
#
# Samba4 AD database checker
#
# Copyright (C) Andrew Tridgell 2011
# Copyright Giampaolo Lauria 2011 <lauria2@yahoo.com>
#
# 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... | gpl-3.0 | -6,792,434,476,454,457,000 | 36.467742 | 112 | 0.600086 | false |
leoc/home-assistant | tests/components/automation/test_time.py | 2 | 12787 | """The tests for the time automation."""
from datetime import timedelta
import unittest
from unittest.mock import patch
from homeassistant.bootstrap import _setup_component
import homeassistant.util.dt as dt_util
import homeassistant.components.automation as automation
from tests.common import fire_time_changed, get_... | mit | 1,080,260,107,991,362,600 | 31.619898 | 72 | 0.487683 | false |
simoesusp/Hexacoptero | Denis/MissionPlanner trabalho/LogAnalyzer/py2exe/tests/TestMotorBalance.py | 43 | 2389 | from LogAnalyzer import Test,TestResult
import DataflashLog
from VehicleType import VehicleType
class TestBalanceTwist(Test):
'''test for badly unbalanced copter, including yaw twist'''
def __init__(self):
Test.__init__(self)
self.name = "Motor Balance"
def run(self, logdata, verbose):
... | gpl-3.0 | 5,403,668,339,361,673,000 | 35.19697 | 201 | 0.581415 | false |
dhorelik/django-cms | cms/south_migrations/0061_revers_id_unique.py | 63 | 17555 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Page', fields ['reverse_id', 'site', 'publisher_is... | bsd-3-clause | -3,431,211,201,251,683,300 | 85.910891 | 196 | 0.557106 | false |
rense/django-rest-framework | tests/test_negotiation.py | 81 | 1649 | from __future__ import unicode_literals
from django.test import TestCase
from rest_framework.negotiation import DefaultContentNegotiation
from rest_framework.renderers import BaseRenderer
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
factory = APIRequestFactory()
clas... | bsd-2-clause | 8,572,414,278,038,751,000 | 34.847826 | 85 | 0.73681 | false |
dictoss/proto | cassandra/client_cassandra_cql.py | 1 | 3553 | #!/usr/bin/python3
#
# cassandra client test program
#
import os
import sys
import datetime
import json
import cassandra
from cassandra.cluster import Cluster
from cassandra.query import tuple_factory, named_tuple_factory, dict_factory, BatchStatement, PreparedStatement
CASSANDRA_CLUSTER = ['192.168.22.112']
def _ge... | bsd-2-clause | 564,791,133,483,122,560 | 30.166667 | 114 | 0.553898 | false |
wgcv/SWW-Crashphone | lib/python2.7/site-packages/django/template/debug.py | 42 | 3778 | from django.template.base import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError
from django.utils.encoding import force_text
from django.utils.html import conditional_escape
from django.utils.safestring import SafeData, EscapeData
from django.utils.formats import localize
from django.utils.timezone ... | apache-2.0 | 6,561,878,878,628,990,000 | 35.679612 | 104 | 0.636845 | false |
repotvsupertuga/repo | script.module.stream.tvsupertuga.addon/resources/lib/sources/en/phdmovies.py | 7 | 6565 | # -*- coding: utf-8 -*-
'''
Exodus Add-on
Copyright (C) 2016 Exodus
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 l... | gpl-2.0 | 3,446,264,878,434,111,000 | 35.472222 | 172 | 0.483016 | false |
cyberphox/MissionPlanner | Lib/site-packages/numpy/distutils/command/install_clib.py | 96 | 1249 | import os
from distutils.core import Command
from distutils.ccompiler import new_compiler
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
... | gpl-3.0 | -123,878,823,027,255,140 | 32.756757 | 78 | 0.646918 | false |
steven-cutting/icsisumm | icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/internals.py | 9 | 15857 | # Natural Language Toolkit: Internal utility functions
#
# Copyright (C) 2001-2008 University of Pennsylvania
# Author: Steven Bird <sb@csse.unimelb.edu.au>
# Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
import subprocess, os.path, re, war... | gpl-3.0 | 4,286,070,596,843,149,300 | 38.05665 | 76 | 0.566248 | false |
happy56/kivy | kivy/adapters/dictadapter.py | 3 | 5733 | '''
DictAdapter
===========
.. versionadded:: 1.5
.. warning::
This code is still experimental, and its API is subject to change in a
future version.
:class:`~kivy.adapters.dictadapter.DictAdapter` is an adapter around a python
dictionary of records. It extends the list-like capabilities of
:class:`~kivy.ad... | lgpl-3.0 | -2,623,227,311,798,766,600 | 37.736486 | 79 | 0.643468 | false |
samratashok87/Rammbock | utest/test_templates/test_protocol.py | 3 | 1141 | from unittest import TestCase
from Rammbock.templates.containers import Protocol
from Rammbock.templates.primitives import UInt, PDU
class TestProtocol(TestCase):
def setUp(self):
self._protocol = Protocol('Test')
def test_header_length(self):
self._protocol.add(UInt(1, 'name1', None))
... | apache-2.0 | 7,769,067,422,989,086,000 | 35.806452 | 71 | 0.648554 | false |
Lh4cKg/sl4a | python/src/Lib/plat-mac/Carbon/Events.py | 81 | 2232 | # Generated from 'Events.h'
nullEvent = 0
mouseDown = 1
mouseUp = 2
keyDown = 3
keyUp = 4
autoKey = 5
updateEvt = 6
diskEvt = 7
activateEvt = 8
osEvt = 15
kHighLevelEvent = 23
mDownMask = 1 << mouseDown
mUpMask = 1 << mouseUp
keyDownMask = 1 << keyDown
keyUpMask = 1 << keyUp
autoKeyMask = 1 << autoKey
updateMask = 1 <... | apache-2.0 | -1,690,061,486,933,927,000 | 20.882353 | 46 | 0.780466 | false |
vegarwe/luma | luma/base/gui/design/MainWindowDesign.py | 3 | 10734 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/mnt/debris/devel/repo/git/luma-fixes/resources/forms/MainWindowDesign.ui'
#
# Created: Wed May 25 21:41:09 2011
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtG... | gpl-2.0 | -5,036,886,839,506,748,000 | 72.520548 | 154 | 0.748556 | false |
Heteroskedastic/chills-pos | chills_pos/pos/views.py | 1 | 1514 | from django.conf import settings
from django.contrib.staticfiles.views import serve
from django.shortcuts import render, redirect
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from chills_pos.helpers.utils import Permissi... | mit | 4,051,998,776,018,459,600 | 33.409091 | 96 | 0.701453 | false |
xzYue/odoo | addons/mrp/tests/test_multicompany.py | 374 | 2660 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 | 5,387,902,889,045,220,000 | 47.363636 | 117 | 0.608271 | false |
ThomasWollmann/bioconda-recipes | scripts/build-packages.py | 3 | 8142 | #!/usr/bin/env python
import os
import glob
import subprocess as sp
import argparse
import sys
from collections import defaultdict, Iterable
from itertools import product, chain
import networkx as nx
import nose
from conda_build.metadata import MetaData
import yaml
def flatten_dict(dict):
for key, values in di... | mit | -3,556,682,061,934,191 | 33.35443 | 122 | 0.574306 | false |
rafaelmds/fatiando | gallery/datasets/hawaii_gravity.py | 6 | 2395 | """
Hawaii gravity data
-------------------
The :mod:`fatiando.datasets` package includes some data sets to make it easier
to try things out in Fatiando.
This example shows the gravity data from Hawaii.
"""
from __future__ import print_function
from fatiando.datasets import fetch_hawaii_gravity
import numpy as np
im... | bsd-3-clause | 8,703,158,273,821,744,000 | 32.732394 | 78 | 0.674739 | false |
manazhao/tf_recsys | tensorflow/examples/learn/hdf5_classification.py | 75 | 2899 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | apache-2.0 | -80,417,248,396,712,670 | 34.790123 | 78 | 0.701621 | false |
ebukoz/thrive | erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py | 5 | 6066 | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import getdate
def execute(filters=None):
filters["invoices"] = frappe.cache().hget("invoices", frappe.se... | gpl-3.0 | 977,070,479,083,311,000 | 27.083333 | 90 | 0.653643 | false |
we7/vamp-aubio-plugins | aubio/tests/python/src/utils/hist.py | 4 | 2279 | from template import aubio_unit_template
from localaubio import *
import random
buf_size = 2048
channels = 1
flow = float(random.randint(0, 100) + random.random())
fhig = float(random.randint(100, 1000) + random.random())
nelems = 1000
class hist_unit(aubio_unit_template):
def setUp(self):
self.o = new_aubio_... | gpl-2.0 | 6,575,190,219,817,128,000 | 30.652778 | 68 | 0.658183 | false |
sigmaris/python-gssapi | gssapi_ez_setup.py | 6 | 11837 | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | mit | -3,515,649,854,375,617,500 | 30.991892 | 87 | 0.622117 | false |
aeternallife/zookeeper | src/contrib/zkpython/src/python/setup.py | 128 | 1754 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not ... | apache-2.0 | 3,161,725,256,052,247,600 | 47.722222 | 95 | 0.582098 | false |
crowdhackathon-transport/optimizers | crowdstance-api/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/fields.py | 404 | 5976 | # urllib3/fields.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import email.utils
import mimetypes
from .packages import six
def guess_content_type(filename... | mit | -1,346,213,871,049,249,800 | 32.762712 | 136 | 0.600569 | false |
lmjohns3/py-viewer | popglove/viewer.py | 1 | 11110 | '''This module contains OpenGL code for rendering a world.'''
from __future__ import division
import climate
import contextlib
import numpy as np
import os
import pyglet
# normally this import should work; the try/except here is so the documentation
# will build on readthedocs.org!
try:
from pyglet.gl import *
e... | mit | -5,884,778,021,258,209,000 | 31.202899 | 88 | 0.546985 | false |
migasfree/migasfree-backend | migasfree/client/views/__init__.py | 1 | 1230 | # -*- coding: UTF-8 -*-
# Copyright (c) 2015-2021 Jose Antonio Chavarría <jachavar@gmail.com>
# Copyright (c) 2015-2021 Alberto Gacías <alberto@migasfree.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softw... | gpl-3.0 | 3,987,894,431,876,994,000 | 37.375 | 76 | 0.767915 | false |
adderall/regulations-site | regulations/tests/views_diff_tests.py | 7 | 8352 | from unittest import TestCase
from django.test import RequestFactory
from mock import patch
from regulations.views.diff import *
class ChromeSectionDiffViewTests(TestCase):
def test_extract_sections_subparts(self):
sub = [{'section_id': '8888-1', 'index': ['8888', '1']},
{'section_id': '... | cc0-1.0 | 8,808,804,133,995,490,000 | 46.725714 | 79 | 0.542864 | false |
daisymax/nvda | source/appModules/wlmail.py | 2 | 2452 | #appModules/wlmail.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2010 NVDA Contributors <http://www.nvda-project.org/>
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import appModuleHandler
import controlTypes
import api
import winUser
fro... | gpl-2.0 | 234,469,927,584,145,000 | 45.153846 | 161 | 0.766313 | false |
gqwest-erp/server | openerp/addons/claim_from_delivery/__init__.py | 68 | 1032 | ##############################################################################
#
# 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 Affero General Publ... | agpl-3.0 | -4,443,046,226,377,023,500 | 43.869565 | 79 | 0.609496 | false |
orion1024/Sick-Beard | lib/hachoir_parser/misc/msoffice_summary.py | 90 | 12537 | """
Microsoft Document summaries structures.
Documents
---------
- Apache POI (HPSF Internals):
http://poi.apache.org/hpsf/internals.html
"""
from lib.hachoir_parser import HachoirParser
from lib.hachoir_core.field import (FieldSet, ParserError,
RootSeekableFieldSet, SeekableFieldSet,
Bit, Bits, NullBits,... | gpl-3.0 | 8,430,156,796,228,348,000 | 32.254642 | 94 | 0.556912 | false |
mdhaman/superdesk-core | apps/duplication/archive_translate.py | 1 | 3967 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2016 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import supe... | agpl-3.0 | -2,981,251,008,943,036,000 | 32.905983 | 110 | 0.624653 | false |
iawells/gluon | gluon/common/particleGenerator/DataBaseModelGenerator.py | 2 | 6227 | #!/usr/bin/python
from __future__ import print_function
import sys
import re
import yaml
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
class DataBaseModelProcessor(object):
def __init__(self):
self.db_models = {}
def add_model(self, model):
self.data = model... | apache-2.0 | 6,349,227,982,772,251,000 | 41.074324 | 80 | 0.421391 | false |
alfredgamulo/cloud-custodian | tools/c7n_gcp/c7n_gcp/resources/mlengine.py | 2 | 1923 | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
import jmespath
from c7n_gcp.provider import resources
from c7n_gcp.query import QueryResourceManager, TypeInfo
@resources.register('ml-model')
class MLModel(QueryResourceManager):
"""GCP Resource
https://cloud.google.com/ai-platf... | apache-2.0 | -1,543,389,204,077,415,700 | 32.155172 | 90 | 0.587624 | false |
inkerra/cinder | cinder/openstack/common/scheduler/weights/__init__.py | 6 | 1305 | # Copyright (c) 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.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | 3,071,721,306,031,644,000 | 28 | 78 | 0.676628 | 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.