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 |
|---|---|---|---|---|---|---|---|---|---|---|
MoroGasper/client | client/account/verify.py | 1 | 1761 | """Copyright (C) 2013 COLDWELL AG
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that... | gpl-3.0 | -290,695,796,858,723,000 | 29.912281 | 79 | 0.695627 | false |
sander76/home-assistant | homeassistant/helpers/debounce.py | 3 | 3875 | """Debounce helper."""
from __future__ import annotations
import asyncio
from logging import Logger
from typing import Any, Awaitable, Callable
from homeassistant.core import HassJob, HomeAssistant, callback
class Debouncer:
"""Class to rate limit calls to a specific command."""
def __init__(
self,... | apache-2.0 | 2,296,178,138,656,947,200 | 30 | 84 | 0.572645 | false |
adobecs5/urp2015 | lib/python3.4/site-packages/setuptools/command/build_py.py | 155 | 8644 | from glob import glob
from distutils.util import convert_path
import distutils.command.build_py as orig
import os
import sys
import fnmatch
import textwrap
try:
from setuptools.lib2to3_ex import Mixin2to3
except ImportError:
class Mixin2to3:
def run_2to3(self, files, doctests=True):
"do not... | apache-2.0 | -5,836,651,945,381,175,000 | 36.582609 | 79 | 0.578899 | false |
danieljaouen/ansible | lib/ansible/executor/powershell/module_manifest.py | 13 | 11466 | # (c) 2018 Ansible Project
# 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
import base64
import json
import os
import pkgutil
import random
import re
from distutils.version import Loos... | gpl-3.0 | 6,868,002,435,473,395,000 | 38.8125 | 117 | 0.597331 | false |
croepha/django-filer | filer/views.py | 1 | 5797 | #-*- coding: utf-8 -*-
from django import forms
from django.contrib.admin import widgets
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render_to_response
from django.te... | mit | 1,555,104,859,506,539,000 | 33.921687 | 123 | 0.600656 | false |
wenxer/peewee | setup.py | 7 | 1084 | import os
from setuptools import find_packages
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
try:
from Cython.Build import cythonize
except ImportError:
ext_modules = None
else:
ext_modules = cythonize('playhouse/speedups.pyx')
se... | mit | -4,861,452,242,661,941,000 | 26.794872 | 63 | 0.631919 | false |
0x46616c6b/ansible | lib/ansible/plugins/action/junos_config.py | 43 | 4165 | #
# (c) 2017, Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is... | gpl-3.0 | -2,000,315,553,128,510,700 | 35.858407 | 85 | 0.614886 | false |
pi-bot/.v2 | python-code/servo.py | 3 | 1929 | import os
import time
#SERVOD_PATH='/home/pi/ServoBlaster1/user/servod'
#SERVOD_PATH='/usr/local/sbin/servod'
SERVOD_PATH='/usr/sbin/pi-blaster'
SERVO_ANGLE = 0
SERVO_CONTINUOUS = 1
class Servo(object):
"""A Servo instance controls a single servo
Parameters
----------
pin : int
GPIO pin numbe... | gpl-3.0 | -532,573,675,146,948,350 | 25.067568 | 81 | 0.598756 | false |
jonnatas/codeschool | old/cs_courses/admin.py | 2 | 1473 | from django.contrib import admin
from cs_courses import models
@admin.register(models.Course)
class CourseAdmin(admin.ModelAdmin):
# Inline models
class TimeSlotInline(admin.TabularInline):
model = models.TimeSlot
extra = 0
classes = ('collapse',)
class LessonInline(admin.TabularI... | gpl-3.0 | 6,358,048,349,702,993,000 | 23.516667 | 64 | 0.543168 | false |
maxhome1/l10n-italy | l10n_it_ipa/__openerp__.py | 3 | 1430 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 KTec S.r.l.
# (<http://www.ktec.it>).
#
# Copyright (C) 2014 Associazione Odoo Italia
# (<http://www.odoo-italia.org>).
#
# This program is free software: you can redistribute i... | agpl-3.0 | 6,657,273,555,512,023,000 | 34.75 | 78 | 0.563636 | false |
avneesh91/django | tests/model_regress/models.py | 25 | 2046 | from django.db import models
CHOICES = (
(1, 'first'),
(2, 'second'),
)
class Article(models.Model):
headline = models.CharField(max_length=100, default='Default headline')
pub_date = models.DateTimeField()
status = models.IntegerField(blank=True, null=True, choices=CHOICES)
misc_data = model... | bsd-3-clause | -2,525,138,410,276,201,500 | 25.545455 | 86 | 0.687867 | false |
unnikrishnankgs/va | venv/lib/python3.5/site-packages/tensorflow/python/util/tf_should_use.py | 13 | 7653 | # 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... | bsd-2-clause | 6,761,867,408,598,567,000 | 35.270142 | 80 | 0.650072 | false |
conanxin/Arduino-Meets-Blender-OSC | pyOSC_examples/basic_send.py | 1 | 2522 |
""" sending OSC with pyOSC
https://trac.v2.nl/wiki/pyOSC
example by www.ixi-audio.net based on pyOSC documentation
"""
import OSC
import time, random
"""
note that if there is nobody listening in the other end we get an error like this
OSC.OSCClientError: while sending: [Errno 111] Connection refused
so we need... | lgpl-3.0 | -7,874,286,355,684,756,000 | 28.325581 | 107 | 0.693497 | false |
topojoy/deepdive | examples/spouse_example/postgres/incremental/udf/ext_has_spouse_features.f1.py | 15 | 2715 | #! /usr/bin/env python
import sys
import ddlib # DeepDive python utility
ARR_DELIM = '~^~'
# For each input tuple
for row in sys.stdin:
parts = row.strip().split('\t')
if len(parts) != 6:
print >>sys.stderr, 'Failed to parse row:', row
continue
# Get all fields from a row
words = parts[0].split(... | apache-2.0 | -8,627,874,544,453,418,000 | 35.2 | 83 | 0.654144 | false |
huguesv/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/ctypes/test/test_stringptr.py | 114 | 2536 | import unittest
from test import support
from ctypes import *
import _ctypes_test
lib = CDLL(_ctypes_test.__file__)
class StringPtrTestCase(unittest.TestCase):
@support.refcount_test
def test__POINTER_c_char(self):
class X(Structure):
_fields_ = [("str", POINTER(c_char))]
x = X()... | apache-2.0 | 261,701,901,851,137,150 | 31.935065 | 71 | 0.576893 | false |
kdaily/altanalyze | SubGeneViewerExport.py | 1 | 10521 | ###SubGeneViewerExport
#Copyright 2005-2008 J. David Gladstone Institutes, San Francisco California
#Author Nathan Salomonis - nsalomonis@gmail.com
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in th... | apache-2.0 | -2,430,436,919,693,391,400 | 47.862559 | 180 | 0.609163 | false |
rhertzog/django | tests/serializers/test_yaml.py | 50 | 5754 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import importlib
import unittest
from django.core import management, serializers
from django.core.serializers.base import DeserializationError
from django.test import SimpleTestCase, TestCase, TransactionTestCase
from django.utils import six
from django.... | bsd-3-clause | 4,594,290,798,737,651,700 | 30.615385 | 93 | 0.668578 | false |
catapult-project/catapult-csm | third_party/html5lib-python/html5lib/sanitizer.py | 30 | 17677 | from __future__ import absolute_import, division, unicode_literals
import re
from xml.sax.saxutils import escape, unescape
from six.moves import urllib_parse as urlparse
from .tokenizer import HTMLTokenizer
from .constants import tokenTypes
content_type_rgx = re.compile(r'''
^
... | bsd-3-clause | -2,283,724,618,600,240,600 | 58.719595 | 146 | 0.47559 | false |
brenton/cobbler | cobbler/modules/authz_ownership.py | 1 | 5953 | """
Authorization module that allow users listed in
/etc/cobbler/users.conf to be permitted to access resources, with
the further restriction that cobbler objects can be edited to only
allow certain users/groups to access those specific objects.
Copyright 2008, Red Hat, Inc
Michael DeHaan <mdehaan@redhat.com>
This so... | gpl-2.0 | -2,054,941,537,949,601,500 | 32.44382 | 77 | 0.644213 | false |
zhjunlang/kbengine | kbe/res/scripts/common/Lib/test/test_strtod.py | 84 | 20594 | # Tests for the correctly-rounded string -> float conversions
# introduced in Python 2.7 and 3.1.
import random
import unittest
import re
import sys
import test.support
if getattr(sys, 'float_repr_style', '') != 'short':
raise unittest.SkipTest('correctly-rounded string->float conversions '
... | lgpl-3.0 | -8,665,009,773,078,541,000 | 46.233945 | 80 | 0.594882 | false |
lmprice/ansible | lib/ansible/modules/network/nxos/nxos_vtp_version.py | 70 | 5734 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | -6,535,706,264,248,284,000 | 26.175355 | 81 | 0.621207 | false |
geoff-reid/RackHD | test/tests/api-cit/v2_0/nodes_tests.py | 9 | 18541 | '''
Copyright (c) 2016-2017 Dell Inc. or its subsidiaries. All Rights Reserved.
Author(s):
'''
import fit_path # NOQA: unused import
import json
import fit_common
import flogging
from on_http_api2_0 import ApiApi as Api
from on_http_api2_0.rest import ApiException
from config.api2_0_config import config
from datetim... | apache-2.0 | -348,259,652,978,080,800 | 39.660088 | 109 | 0.543714 | false |
openstack/sahara | sahara/service/validations/node_group_templates.py | 2 | 3936 | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | 6,763,420,133,515,154,000 | 37.588235 | 78 | 0.623984 | false |
gaocegege/Processing.R | hack/migrate-from-ppy.py | 1 | 5211 | import click
import os
from defusedxml import ElementTree as etree
import jinja2
property_file_name = '.property.yml'
property_template_dir = 'hack/templates'
property_template_file_name = 'property_template.jinja'
class Migrator(object):
def __init__(self, input_dir, output_dir):
self.input_dir = input_d... | gpl-3.0 | -2,840,297,288,580,900,000 | 38.477273 | 94 | 0.601804 | false |
sunze/py_flask | venv/lib/python3.4/site-packages/alembic/testing/plugin/plugin_base.py | 8 | 17365 | # plugin/plugin_base.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Testing extensions.
this module is designed to work as a testing-framework-... | mit | 1,112,545,725,814,699,000 | 30.232014 | 79 | 0.584797 | false |
XiaosongWei/chromium-crosswalk | tools/telemetry/telemetry/internal/story_runner_unittest.py | 9 | 24824 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import StringIO
import sys
import unittest
from catapult_base import cloud_storage
from telemetry import benchmark
from telemetry.core import exce... | bsd-3-clause | -3,012,698,228,191,194,600 | 34.513591 | 79 | 0.689131 | false |
peterbarker/ardupilot-1 | mk/PX4/Tools/genmsg/src/genmsg/srvs.py | 216 | 3017 | # Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | gpl-3.0 | 5,111,986,698,318,454,000 | 37.679487 | 109 | 0.684123 | false |
rivy/xbmc-script.audio.pandora | resources/lib/pithos/pandora/blowfish.py | 5 | 19552 | #
# blowfish.py
# Copyright (C) 2002 Michael Gilfix <mgilfix@eecs.tufts.edu>
#
# This module is open source; you can redistribute it and/or
# modify it under the terms of the GPL or Artistic License.
# These licenses are available at http://www.opensource.org
#
# This software must be used and distributed in accordance... | gpl-3.0 | 8,313,397,504,653,805,000 | 40.6 | 106 | 0.723762 | false |
caioserra/apiAdwords | tests/adspygoogle/adwords/examples/basic_operations_unittest.py | 2 | 5729 | #!/usr/bin/python
#
# Copyright 2011 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 | -2,812,714,062,939,470,300 | 37.193333 | 89 | 0.714959 | false |
vinodkc/spark | examples/src/main/python/ml/vector_slicer_example.py | 27 | 1496 | #
# 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 | 6,469,558,512,927,764,000 | 33.790698 | 85 | 0.713235 | false |
ARPA-SIMC/arkimet | python/tests/test_scan_odimh5.py | 1 | 14226 | import unittest
import os
import arkimet as arki
import datetime
class TestScanODIMH5(unittest.TestCase):
def read(self, pathname, size, format="odimh5"):
"""
Read all the metadata from a file
"""
ds = arki.dataset.Reader({
"format": format,
"name": os.path.... | gpl-2.0 | 4,429,471,505,665,602,000 | 47.223729 | 114 | 0.590749 | false |
garyjs/Newfiesautodialer | newfies/dialer_audio/views.py | 3 | 6471 | #
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2013 Star2Billing S.L.
#
# The Initia... | mpl-2.0 | 9,172,752,467,631,976,000 | 31.19403 | 81 | 0.626333 | false |
kohnle-lernmodule/exe201based | exe/engine/orientacionestutoriafpdidevice.py | 11 | 6130 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ===========================================================================
# iDevice Orientaciones tutoria creado para la FPD por José Ramón Jiménez Reyes
# ===========================================================================
"""
FPD - Guidelines Teacher
Orientaciones... | gpl-2.0 | 7,477,322,399,942,530,000 | 37.778481 | 163 | 0.580055 | false |
ARTFL-Project/PhiloLogic4 | www/scripts/get_term_groups.py | 2 | 2111 | #!/usr/bin/env python3
import json
import os
from wsgiref.handlers import CGIHandler
from philologic.runtime.DB import DB
from philologic.runtime.Query import split_terms
from philologic.runtime.QuerySyntax import group_terms, parse_query
import sys
sys.path.append("..")
import custom_functions
try:
from custo... | gpl-3.0 | -50,458,323,633,017,176 | 31.984375 | 113 | 0.581715 | false |
joker946/nova | nova/tests/unit/api/openstack/compute/test_flavors.py | 7 | 25600 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -839,103,600,419,380,900 | 34.955056 | 79 | 0.46625 | false |
kursitet/edx-platform | common/lib/capa/capa/safe_exec/tests/test_lazymod.py | 152 | 1667 | """Test lazymod.py"""
import sys
import unittest
from capa.safe_exec.lazymod import LazyModule
class ModuleIsolation(object):
"""
Manage changes to sys.modules so that we can roll back imported modules.
Create this object, it will snapshot the currently imported modules. When
you call `clean_up()`,... | agpl-3.0 | -3,435,799,536,356,505,000 | 33.729167 | 81 | 0.658068 | false |
rsvip/Django | tests/model_options/test_tablespaces.py | 337 | 5389 | from __future__ import unicode_literals
from django.apps import apps
from django.conf import settings
from django.db import connection
from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature
from .models.tablespaces import (
Article, ArticleRef, Authors, Reviewers, Scientist, ScientistRef,
)
def ... | bsd-3-clause | -4,650,722,307,576,604,000 | 41.101563 | 79 | 0.651883 | false |
iambibhas/django | django/contrib/gis/tests/relatedapp/tests.py | 18 | 15753 | from __future__ import unicode_literals
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import no_oracle
from django.db import connection
from django.test import TestCase, skipUnlessDBFeature
from django.test.utils import override_settings
from django.utils import timezone
if HAS_GEOS... | bsd-3-clause | -8,291,912,508,637,438,000 | 47.62037 | 113 | 0.640894 | false |
nikolay-saskovets/Feedly | feedly/tests/feeds/cassandra.py | 4 | 1939 | from feedly.tests.feeds.base import TestBaseFeed, implementation
import pytest
from feedly.feeds.cassandra import CassandraFeed
from feedly.utils import datetime_to_epoch
from feedly.activity import Activity
class CustomActivity(Activity):
@property
def serialization_id(self):
'''
Shorter ser... | bsd-3-clause | -1,256,829,607,688,719,000 | 28.830769 | 77 | 0.665807 | false |
TNT-Samuel/Coding-Projects | DNS Server/Source - Copy/Lib/site-packages/prompt_toolkit/contrib/validators/base.py | 20 | 1240 | from __future__ import unicode_literals
from prompt_toolkit.validation import Validator, ValidationError
from six import string_types
class SentenceValidator(Validator):
"""
Validate input only when it appears in this list of sentences.
:param sentences: List of sentences.
:param ignore_case: If True... | gpl-3.0 | 1,115,785,107,839,765,200 | 35.470588 | 110 | 0.642742 | false |
ShinyROM/android_external_chromium_org | content/test/gpu/gpu_tests/webgl_conformance_expectations.py | 23 | 9671 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import test_expectations
# Valid expectation conditions are:
#
# Operating systems:
# win, xp, vista, win7, mac, leopard, snowle... | bsd-3-clause | -4,387,950,739,590,113,300 | 43.159817 | 94 | 0.653707 | false |
MycChiu/tensorflow | third_party/llvm/expand_cmake_vars.py | 168 | 2679 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 152,879,026,982,942,800 | 29.443182 | 80 | 0.651362 | false |
charbeljc/account-financial-tools | account_constraints/model/account_move.py | 36 | 1613 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | 6,635,438,415,234,804,000 | 42.594595 | 78 | 0.587725 | false |
EdDev/vdsm | lib/vdsm/network/netinfo/qos.py | 1 | 2562 | #
# Copyright 2015 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
# (at your option) any later version.
#
# This program is distributed in the ho... | gpl-2.0 | 5,145,588,878,955,180,000 | 36.130435 | 78 | 0.617096 | false |
flyher/pymo | android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_cookielib.py | 74 | 72202 | # -*- coding: latin-1 -*-
"""Tests for cookielib.py."""
import cookielib
import os
import re
import time
from unittest import TestCase
from test import test_support
class DateTimeTests(TestCase):
def test_time2isoz(self):
from cookielib import time2isoz
base = 1019227000
day = 24*3600... | mit | -2,345,805,633,671,034,000 | 39.977299 | 101 | 0.555206 | false |
was4444/chromium.src | chrome/common/extensions/docs/server2/url_fetcher_urllib2.py | 37 | 1153 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import time
from future import Future
from url_fetcher import UrlFetcher
from urllib2 import urlopen, Request, HTTPError
class UrlFetcherUr... | bsd-3-clause | -3,743,863,229,322,361,300 | 31.942857 | 77 | 0.705117 | false |
ghchinoy/tensorflow | tensorflow/python/compiler/tensorrt/test/lru_cache_test.py | 8 | 2883 | # Copyright 2018 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 | -7,759,453,831,901,751,000 | 35.961538 | 93 | 0.634062 | false |
twbarber/pygooglevoice | docs/conf.py | 39 | 6454 | # -*- coding: utf-8 -*-
#
# PyGoogleVoice documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 29 23:06:36 2009.
#
# 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.
#... | bsd-3-clause | 8,484,821,445,096,243,000 | 32.097436 | 80 | 0.714286 | false |
gengue/django | django/core/serializers/base.py | 41 | 6746 | """
Module for abstract serializer/unserializer base classes.
"""
from django.db import models
from django.utils import six
class SerializerDoesNotExist(KeyError):
"""The requested serializer was not found."""
pass
class SerializationError(Exception):
"""Something bad happened during serialization."""
... | bsd-3-clause | 3,069,541,795,163,127,000 | 33.070707 | 105 | 0.613104 | false |
toenuff/treadmill | lib/python/treadmill/ldap3kerberos.py | 1 | 3106 | """
Replaces the use of python-gssapi with pykerberos in ldap3.
"""
from __future__ import absolute_import
import socket
import base64
import kerberos
from ldap3.core.exceptions import LDAPCommunicationError
from ldap3.protocol.sasl.sasl import send_sasl_negotiation
from ldap3.protocol.sasl.sasl import abort_sasl_neg... | apache-2.0 | 6,199,855,993,410,642,000 | 36.421687 | 79 | 0.639086 | false |
bpgc-cte/python2017 | Week 7/django/lib/python3.6/site-packages/django/conf/locale/id/formats.py | 504 | 2135 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j N Y'
DATETIME_FORMAT = "j N Y, ... | mit | 474,990,087,374,055,000 | 40.057692 | 77 | 0.433255 | false |
therealjumbo/python_summer | pipeg/MeterMT.py | 2 | 5671 | #!/usr/bin/env python3
# Copyright © 2012-13 Qtrac Ltd. All rights reserved.
# This program or 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 version 3 of the
# License, or (at your option)... | gpl-3.0 | -8,570,640,199,171,173,000 | 29.153846 | 76 | 0.606349 | false |
getstackd/stackd | vendor/boost-context/tools/build/v2/test/make_rule.py | 44 | 1323 | #!/usr/bin/python
# Copyright 2003 Dave Abrahams
# Copyright 2003, 2006 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Test the 'make' rule.
import BoostBuild
import string
t = BoostBuild.Tester(pass_tool... | mit | -6,038,944,119,238,786,000 | 23.5 | 81 | 0.690854 | false |
dzan/xenOnArm | tools/xm-test/lib/XmTestLib/block_utils.py | 26 | 1410 | #!/usr/bin/python
# Copyright (c) 2006 XenSource Inc.
# Author: Ewan Mellor <ewan@xensource.com>
import time
from XmTestLib import *
import xen.util.blkif
__all__ = [ "block_attach", "block_detach" ]
def get_state(domain, devname):
(path, number) = xen.util.blkif.blkdev_name_to_number(devname)
s, o = tr... | gpl-2.0 | 7,406,630,954,436,803,000 | 25.603774 | 77 | 0.556028 | false |
brev/nupic | src/nupic/database/ClientJobsDAO.py | 21 | 136129 | #!/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 ... | agpl-3.0 | 3,009,553,711,223,972,400 | 39.990364 | 199 | 0.610715 | false |
jgoclawski/django | tests/staticfiles_tests/test_views.py | 279 | 1312 | from __future__ import unicode_literals
import posixpath
from django.conf import settings
from django.test import override_settings
from .cases import StaticFilesTestCase, TestDefaults
@override_settings(ROOT_URLCONF='staticfiles_tests.urls.default')
class TestServeStatic(StaticFilesTestCase):
"""
Test sta... | bsd-3-clause | 6,471,698,394,604,424,000 | 27.521739 | 71 | 0.73628 | false |
CookiesandCake/namebench | nb_third_party/dns/ipv4.py | 250 | 1365 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 | -860,795,559,723,809,400 | 36.916667 | 72 | 0.717949 | false |
KhalidGit/flask | Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/_vendor/distlib/version.py | 198 | 22996 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-386,
distribute-compatible and semantic versioning.
"""
import logging
import re
from .compat import string_types
... | apache-2.0 | 2,482,874,680,422,461,000 | 30.894591 | 78 | 0.521743 | false |
buqing2009/MissionPlanner | Lib/site-packages/scipy/special/tests/test_specfun.py | 53 | 3683 | # Corresponds to a small subset of scipy.special.specfun
# that has features that were ported manually from fwrap
# to f2py.
# It was assumed that SciPy 0.7.0 shipped with Ubuntu Lucid
# (using f2py) returned the correct values.
#
import numpy as np
from numpy import array, isnan, r_, arange, finfo, pi, sin, cos, ta... | gpl-3.0 | -233,872,286,578,042,900 | 41.825581 | 88 | 0.568287 | false |
tmerrick1/spack | lib/spack/external/_pytest/doctest.py | 23 | 13170 | """ discover and run doctests in modules and test files."""
from __future__ import absolute_import, division, print_function
import traceback
import pytest
from _pytest._code.code import ExceptionInfo, ReprFileLocation, TerminalRepr
from _pytest.fixtures import FixtureRequest
DOCTEST_REPORT_CHOICE_NONE = 'none'
DOC... | lgpl-2.1 | -2,125,331,049,508,436,700 | 35.381215 | 111 | 0.605163 | false |
jumpserver/jumpserver | apps/ops/ansible/runner.py | 1 | 8827 | # ~*~ coding: utf-8 ~*~
import os
import shutil
from collections import namedtuple
from ansible import context
from ansible.playbook import Playbook
from ansible.module_utils.common.collections import ImmutableDict
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.vars.manager import Vari... | gpl-2.0 | -2,293,008,394,910,669,300 | 32.697318 | 100 | 0.606367 | false |
luiseduardohdbackup/odoo | addons/mrp_repair/wizard/cancel_repair.py | 384 | 3683 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -5,815,422,239,373,185,000 | 41.825581 | 151 | 0.591637 | false |
wilvk/ansible | lib/ansible/modules/web_infrastructure/jenkins_plugin.py | 9 | 25319 | #!/usr/bin/python
# encoding: utf-8
# (c) 2016, Jiri Tyr <jiri.tyr@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 1,361,166,749,018,602,800 | 30.296663 | 112 | 0.559777 | false |
chamikaramj/beam | sdks/python/apache_beam/coders/stream_test.py | 18 | 5990 | #
# 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 | -4,929,290,495,287,715,000 | 32.277778 | 74 | 0.677129 | false |
MatthewWilkes/django | tests/forms_tests/widget_tests/test_checkboxselectmultiple.py | 161 | 4824 | from django.forms import CheckboxSelectMultiple
from .base import WidgetTest
class CheckboxSelectMultipleTest(WidgetTest):
widget = CheckboxSelectMultiple()
def test_render_value(self):
self.check_html(self.widget, 'beatles', ['J'], choices=self.beatles, html=(
"""<ul>
<li><l... | bsd-3-clause | -8,401,119,282,978,422,000 | 40.947826 | 117 | 0.519486 | false |
madhurauti/Map-Polygon | modules/tests/staff/staff.py | 27 | 1563 | # -*- coding: utf-8 -*-
""" Sahana Eden Staff Module Automated Tests
@copyright: 2011-2012 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the... | mit | -5,581,651,851,226,647,000 | 37.146341 | 69 | 0.704415 | false |
levkar/odoo-addons | account_partner_balance/account_move_line.py | 2 | 1130 | # -*- coding: utf-8 -*-
import time
from datetime import datetime
from openerp.osv import fields, osv, orm
from openerp.tools.translate import _
from openerp import tools
import openerp.addons.decimal_precision as dp
class account_move_line(osv.osv):
_inherit = "account.move.line"
def _net(self, cr, uid, i... | agpl-3.0 | 7,168,888,054,899,581,000 | 33.242424 | 145 | 0.59646 | false |
ronfung/incubator-airflow | airflow/contrib/operators/__init__.py | 15 | 1570 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | -8,353,051,064,109,564,000 | 32.404255 | 74 | 0.657962 | false |
hassanibi/erpnext | erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py | 14 | 3383 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint, getdate
from frappe import msgprint, _
from calendar import monthrange
def execute(filters=None):
i... | gpl-3.0 | 6,091,052,114,766,861,000 | 31.528846 | 131 | 0.66509 | false |
gangadhar-kadam/sms-erpnext | accounts/doctype/gl_entry/gl_entry.py | 2 | 8223 | # ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# 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 yo... | agpl-3.0 | -3,068,217,608,665,914,000 | 42.744681 | 94 | 0.682962 | false |
enikesha/ga-bitbot | bcfeed_synch.py | 17 | 3179 | #converts bitcoincharts csv download into the
#1min format used by the genetic trade framework
from time import *
import urllib2
import sys
__app_version__ = "0.01a"
print "-"*80
print """
Bitcoin Data Feed Synchronizer v%s
\tConverts the data into a weighted price 1min data feed format
To automaticaly download and... | gpl-3.0 | -7,603,904,153,504,948,000 | 29.27619 | 108 | 0.607109 | false |
pyconll/pyconll | tests/test_util.py | 1 | 6012 | import operator
import pytest
from pyconll.util import find_ngrams, find_nonprojective_deps
from pyconll import load_from_file
from tests.util import fixture_location
def test_ngram_standard():
"""
Test if the find_ngram method works for standard situations.
"""
c = load_from_file(fixture_location('... | mit | -8,035,202,226,930,701,000 | 27.211268 | 83 | 0.623897 | false |
Tesora/tesora-nodepool | tools/fake-servers.py | 3 | 3845 | #!/usr/bin/env python
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2011-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.... | apache-2.0 | -915,312,727,886,570,000 | 40.344086 | 770 | 0.622627 | false |
alf3r/GidroGraf-Sirius | src/main_satelite.py | 1 | 2207 | import cv2
import numpy as np
import matplotlib.pyplot as plt
from scipy import ndimage as sc
# Загрузка
filename = '../img/satelite.tif'
img = sc.imread(filename)
# img = img[0:8000, 0:8000]
# # Коррекция гистограммы
for i in range(1, 30):
alpha = 1 * i
a = cv2.convertScaleAbs(img, alpha=alp... | gpl-3.0 | 553,626,929,688,792,300 | 25.371795 | 122 | 0.607494 | false |
endlessm/chromium-browser | third_party/blink/renderer/bindings/scripts/web_idl/ir_map.py | 8 | 7613 | # Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from .composition_parts import Identifier
from .composition_parts import WithIdentifier
class IRMap(object):
"""
Manages an identifier-IR map, wher... | bsd-3-clause | -6,479,824,368,181,748,000 | 35.956311 | 80 | 0.584658 | false |
geodynamics/pylith | pylith/mpi/Communicator.py | 1 | 2985 | # ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copy... | mit | -6,920,570,047,259,990,000 | 25.184211 | 74 | 0.527973 | false |
Changaco/oh-mainline | vendor/packages/scrapy/scrapy/core/scraper.py | 17 | 8686 | """This module implements the Scraper component which parses responses and
extracts information from them"""
from collections import deque
from twisted.python.failure import Failure
from twisted.internet import defer
from scrapy.utils.defer import defer_result, defer_succeed, parallel, iter_errback
from scrapy.utils... | agpl-3.0 | -220,810,442,064,470,530 | 40.559809 | 90 | 0.643679 | false |
scavarda/mysql-dbcompare | mysql-utilities-1.6.0/info.py | 1 | 6742 | #
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. 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; version 2 of the License.
#
# This program is distributed in th... | apache-2.0 | 2,025,608,891,608,752,600 | 35.247312 | 79 | 0.619104 | false |
sunlianqiang/kbengine | kbe/res/scripts/common/Lib/tkinter/test/test_tkinter/test_variables.py | 67 | 5546 | import unittest
from tkinter import Variable, StringVar, IntVar, DoubleVar, BooleanVar, Tcl
class Var(Variable):
_default = "default"
side_effect = False
def set(self, value):
self.side_effect = True
super().set(value)
class TestBase(unittest.TestCase):
def setUp(self):
s... | lgpl-3.0 | 6,077,872,449,568,451,000 | 28.817204 | 76 | 0.59881 | false |
aitzol/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers | Chapter3_MCMC/github_pull.py | 13 | 2349 | #github data scrapper
"""
variables of interest:
indp. variables
- language, given as a binary variable. Need 4 positions for 5 langagues
- #number of days created ago, 1 position
- has wiki? Boolean, 1 position
- followers, 1 position
- following, 1 position
- constant
dep. variab... | mit | -6,011,581,157,829,038,000 | 25.393258 | 127 | 0.571307 | false |
heathseals/CouchPotatoServer | libs/pyutil/scripts/passphrase.py | 92 | 2747 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse, math, random
from pyutil.mathutil import div_ceil
from pkg_resources import resource_stream
def recursive_subset_sum(entropy_needed, wordlists):
# Pick a minimalish set of numbers which sum to at least
# entropy_needed.
# Okay now what's th... | gpl-3.0 | 8,847,292,703,454,747,000 | 37.690141 | 193 | 0.669822 | false |
mitchelljkotler/django-cacheback | sandbox/settings.py | 1 | 5883 | import os
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'db.sqlite3', # Or path to database file if using sqlite3.
'USER': '', # Not used with s... | mit | -4,780,852,623,837,055,000 | 30.8 | 108 | 0.63845 | false |
eonpatapon/nova | nova/db/sqlalchemy/migrate_repo/versions/291_enforce_flavors_migrated.py | 79 | 1586 | # 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 | -899,138,343,976,303,500 | 44.314286 | 78 | 0.668348 | false |
eXcomm/MozDef | mq/plugins/complianceitems.py | 9 | 2980 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
#
# Contributors:
# Julien Vehent jvehent@mozilla.com
# Aaron Meihm ameihm@moz... | mpl-2.0 | 4,099,947,618,132,973,000 | 37.205128 | 92 | 0.547651 | false |
erkrishna9/odoo | openerp/tools/mail.py | 15 | 28938 | # -*- 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 ... | agpl-3.0 | 5,986,793,322,884,983,000 | 42.321856 | 174 | 0.553183 | false |
CentroGeo/geonode | geonode/base/management/commands/lib/gn20_to_24.py | 6 | 9294 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... | gpl-3.0 | -1,545,460,659,259,246,300 | 31.957447 | 116 | 0.543792 | false |
isslayne/Enigma2-CN | lib/python/Plugins/SystemPlugins/Videomode/plugin.py | 32 | 9361 | from Screens.Screen import Screen
from Plugins.Plugin import PluginDescriptor
from Components.SystemInfo import SystemInfo
from Components.ConfigList import ConfigListScreen
from Components.config import getConfigListEntry, config, ConfigBoolean, ConfigNothing, ConfigSlider
from Components.Label import Label
from Compo... | gpl-2.0 | 8,531,375,203,241,289,000 | 37.522634 | 189 | 0.722679 | false |
hakuji/game3 | src/constants.py | 1 | 2653 | # Copyright 2013 by akuji
#
# This file is part of game 3.
#
# game 3 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.
#
# game 3 is dis... | gpl-3.0 | -4,149,039,170,330,297,000 | 25.79798 | 85 | 0.663023 | false |
louietsai/python-for-android | python-modules/twisted/twisted/test/test_enterprise.py | 61 | 1151 | # Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
General tests for twisted.enterprise.
"""
from twisted.trial import unittest
from twisted.enterprise import util
class QuotingTestCase(unittest.TestCase):
def testQuoting(self):
for value, typ, expected in [
... | apache-2.0 | 8,352,427,564,050,400,000 | 27.073171 | 83 | 0.543006 | false |
veger/ansible | lib/ansible/modules/cloud/vmware/vmware_host_ntp_facts.py | 54 | 4256 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, 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... | gpl-3.0 | 3,420,867,762,169,471,000 | 31 | 119 | 0.632519 | false |
ilya-epifanov/ansible-modules-core | utilities/logic/include_vars.py | 112 | 1428 | # -*- mode: python -*-
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Publ... | gpl-3.0 | 3,726,376,743,534,464,500 | 35.615385 | 176 | 0.714986 | false |
enixdark/10gen-Courses | Mongo-Developer-M101P-Pyramid/Week 4/HW4.3/hw4-3/sessionDAO.py | 34 | 2310 | __author__ = 'aje'
#
# Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.com>
#
# 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 r... | mit | 834,621,720,377,807,200 | 27.518519 | 85 | 0.651082 | false |
sugarguo/Flask_Blog | ext_lib/blinker/_utilities.py | 144 | 4457 | from weakref import ref
from blinker._saferef import BoundMethodWeakref
try:
callable
except NameError:
def callable(object):
return hasattr(object, '__call__')
try:
from collections import defaultdict
except:
class defaultdict(dict):
def __init__(self, default_factory=None, *a, **... | gpl-3.0 | 6,186,274,084,283,416,000 | 26.343558 | 74 | 0.572807 | false |
sorenk/ansible | test/units/modules/network/f5/test_bigip_configsync_action.py | 17 | 4138 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import sys
from nose.plugins.skip import SkipTest
i... | gpl-3.0 | -6,777,013,825,985,502,000 | 31.328125 | 91 | 0.658531 | false |
bowang/tensorflow | tensorflow/python/ops/gradients_impl.py | 7 | 38539 | # 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,216,677,275,937,029,000 | 37.654965 | 89 | 0.654324 | false |
brentp/vcfanno | scripts/paper/chunk-gap-plot.py | 2 | 2020 | import sys
import re
import numpy as np
from collections import defaultdict
from matplotlib import pyplot as plt
import seaborn as sns
sns.set_style("white")
colors = sns.set_palette('Set1', 8)
colors = sns.color_palette('Set1', 3)
f, axes = plt.subplots(1, figsize=(4, 2))
axes = (axes,)
# run as python chunk-gap-p... | mit | -185,534,603,966,313,020 | 27.857143 | 80 | 0.587129 | false |
torbjoernk/easybuild-framework | easybuild/toolchains/linalg/flame.py | 9 | 1496 | ##
# Copyright 2012-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (htt... | gpl-2.0 | 6,067,474,708,236,661,000 | 37.358974 | 96 | 0.74131 | false |
TribeMedia/synapse | scripts-dev/tail-synapse.py | 2 | 1711 | import requests
import collections
import sys
import time
import json
Entry = collections.namedtuple("Entry", "name position rows")
ROW_TYPES = {}
def row_type_for_columns(name, column_names):
column_names = tuple(column_names)
row_type = ROW_TYPES.get((name, column_names))
if row_type is None:
... | apache-2.0 | 3,885,878,511,642,642,400 | 24.537313 | 78 | 0.589129 | false |
stimpsonsg/moose | docs/tests/objects/test_object_syntax.py | 4 | 2999 | import os
import unittest
from MooseDocs.testing import MarkdownTestCase
class TestMooseObjectSyntax(MarkdownTestCase):
"""
Test commands in MooseObjectSyntax extension.
"""
def testDescription(self):
md = '!description /Adaptivity/Markers/BoxMarker'
self.assertConvert('test_description... | lgpl-2.1 | -1,934,649,453,162,387,200 | 55.584906 | 263 | 0.684228 | false |
trabacus-softapps/openerp-8.0-cc | openerp/addons/mass_mailing/wizard/__init__.py | 3 | 1053 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 4,449,589,685,969,165,000 | 44.782609 | 78 | 0.619183 | 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.