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 |
|---|---|---|---|---|---|---|---|---|---|---|
travisreed-wf/PyGithub | github/PaginatedList.py | 23 | 7707 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 | 2,083,754,415,230,222,800 | 35.014019 | 101 | 0.504217 | false |
katyhuff/moose | python/MooseDocs/extensions/MooseCSS.py | 1 | 2028 | from markdown.blockprocessors import BlockProcessor
from MooseCommonExtension import MooseCommonExtension
import re
from markdown.util import etree
class MooseCSS(BlockProcessor, MooseCommonExtension):
"""
Markdown extension for applying CSS styles to paragraph
Markdown syntax is:
!css <options>
... | lgpl-2.1 | -579,466,075,485,279,600 | 30.2 | 71 | 0.634615 | false |
karrtikr/ete | ete3/test/test_treeview/item_faces.py | 1 | 4140 | # We will need to create Qt4 items
from PyQt4 import QtCore
from PyQt4.QtGui import QGraphicsRectItem, QGraphicsSimpleTextItem, \
QGraphicsEllipseItem, QColor, QPen, QBrush
from ... import Tree, faces, TreeStyle, NodeStyle
# To play with random colors
import colorsys
import random
class InteractiveItem(QGraphics... | gpl-3.0 | -2,597,335,711,891,780,600 | 33.214876 | 79 | 0.655556 | false |
alexandrucoman/vbox-neutron-agent | neutron/db/api.py | 6 | 1693 | # Copyright 2011 VMware, 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 by ... | apache-2.0 | 9,142,357,548,287,583,000 | 27.694915 | 78 | 0.694034 | false |
MrLoick/python-for-android | python-modules/twisted/twisted/python/dispatch.py | 64 | 1187 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
import warnings
warnings.warn(
"Create your own event dispatching mechanism, "
"twisted.python.dispatch will soon be no more.",
DeprecationWarning, 2)
class EventDispatcher:
"""
A global event dispatcher for events.... | apache-2.0 | 2,742,561,835,455,537,000 | 27.261905 | 78 | 0.651222 | false |
0xc0170/pyOCD | pyOCD/test/test_utility/test_cmdline.py | 11 | 1600 | """
mbed CMSIS-DAP debugger
Copyright (c) 2015 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law o... | apache-2.0 | 9,100,859,842,178,979,000 | 39 | 73 | 0.629375 | false |
mementum/backtrader | samples/sigsmacross/sigsmacross.py | 1 | 3835 | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015-2020 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | gpl-3.0 | 7,282,086,597,289,401,000 | 34.183486 | 79 | 0.575228 | false |
cchanning/Impala | tests/common/failure_injector.py | 16 | 3806 | # Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Failure injection module for the Impala service. There are two main ways this module
# can be used - the first is to initialize the failure injector and then call start()
# which will kick off a timer that chooses a random impalad/state store process
# to fai... | apache-2.0 | -6,335,984,440,422,511,000 | 41.288889 | 90 | 0.705202 | false |
parthea/pydatalab | google/datalab/bigquery/_query.py | 4 | 13135 | # 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 by applicable law or agreed ... | apache-2.0 | 4,199,476,646,674,152,400 | 37.976261 | 100 | 0.65314 | false |
kmacinnis/sympy | sympy/assumptions/tests/test_context.py | 126 | 1153 | from sympy.assumptions import ask, Q
from sympy.assumptions.assume import assuming, global_assumptions
from sympy.abc import x, y
def test_assuming():
with assuming(Q.integer(x)):
assert ask(Q.integer(x))
assert not ask(Q.integer(x))
def test_assuming_nested():
assert not ask(Q.integer(x))
ass... | bsd-3-clause | -1,177,393,594,256,946,400 | 28.564103 | 65 | 0.628794 | false |
lodemo/CATANA | src/face_recognition/youtube_dl/extractor/ina.py | 55 | 1062 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class InaIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?ina\.fr/video/(?P<id>I?[A-Z0-9]+)'
_TEST = {
'url': 'http://www.ina.fr/video/I12055569/francois-hollande-je-crois-que-c-est-clair-video.ht... | mit | -8,776,238,411,303,982,000 | 28.472222 | 105 | 0.555137 | false |
cmyr/keras | keras/preprocessing/sequence.py | 4 | 4010 | from __future__ import absolute_import
# -*- coding: utf-8 -*-
import numpy as np
import random
from six.moves import range
def pad_sequences(sequences, maxlen=None, dtype='int32', padding='pre'):
"""
Pad each sequence to the same length:
the length of the longuest sequence.
If maxlen is ... | mit | 6,439,112,295,302,569,000 | 35.126126 | 125 | 0.590524 | false |
GenericMappingTools/gmt-python | pygmt/tests/test_helpers.py | 1 | 3568 | """
Tests the helper functions/classes/etc used in wrapping GMT.
"""
import os
import numpy as np
import pytest
from pygmt.exceptions import GMTInvalidInput
from pygmt.helpers import (
GMTTempFile,
args_in_kwargs,
data_kind,
kwargs_to_strings,
unique_name,
)
@pytest.mark.parametrize(
"data,x,... | bsd-3-clause | -8,962,987,882,936,566,000 | 30.026087 | 78 | 0.625561 | false |
linktlh/Toontown-journey | toontown/dna/DNALandmarkBuilding.py | 3 | 2519 | from panda3d.core import LVector4f
import DNANode
import DNAUtil
import DNAError
class DNALandmarkBuilding(DNANode.DNANode):
COMPONENT_CODE = 13
def __init__(self, name):
DNANode.DNANode.__init__(self, name)
self.code = ''
self.wallColor = LVector4f(1, 1, 1, 1)
self.title = ''
... | apache-2.0 | -4,839,080,749,253,332,000 | 30.898734 | 111 | 0.616911 | false |
mvaled/gunicorn | gunicorn/selectors.py | 107 | 18997 | """Selectors module.
This module allows high-level and efficient I/O multiplexing, built upon the
`select` module primitives.
The following code adapted from trollius.selectors.
"""
from abc import ABCMeta, abstractmethod
from collections import namedtuple, Mapping
import math
import select
import sys
from gunicor... | mit | -8,908,488,979,811,775,000 | 31.089527 | 80 | 0.549403 | false |
xiangel/hue | desktop/core/ext-py/Babel-0.9.6/babel/messages/tests/data/setup.py | 42 | 1045 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: sw=4 ts=4 fenc=utf-8
# =============================================================================
# $Id: setup.py 114 2007-06-14 21:17:14Z palgarvio $
# =============================================================================
# $URL: http://svn.edgewall... | apache-2.0 | 36,494,104,289,918,264 | 35.321429 | 91 | 0.442105 | false |
rabitt/mir_eval | evaluators/beat_eval.py | 4 | 1856 | #!/usr/bin/env python
'''
CREATED:2014-01-24 12:42:43 by Brian McFee <brm2132@columbia.edu>
Compute beat evaluation metrics
Usage:
./beat_eval.py REFERENCE.TXT ESTIMATED.TXT
'''
from __future__ import print_function
import argparse
import sys
import os
import eval_utilities
import mir_eval
def process_arguments... | mit | -5,275,290,441,729,628,000 | 29.933333 | 77 | 0.597522 | false |
LukeM12/samba | source4/scripting/devel/speedtest.py | 31 | 8527 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Unix SMB/CIFS implementation.
# This speed test aims to show difference in execution time for bulk
# creation of user objects. This will help us compare
# Samba4 vs MS Active Directory performance.
# Copyright (C) Zahari Zahariev <zahari.zahariev@postpath.com> 2010
#
#... | gpl-3.0 | -389,703,416,252,953,300 | 34.381743 | 113 | 0.634338 | false |
jakar/odoo-bank-statement-reconcile | __unported__/account_statement_completion_label/partner.py | 18 | 1385 | # -*- coding: utf-8 -*-
###############################################################################
#
# account_statement_completion_label for OpenERP
# Copyright (C) 2013 Akretion (http://www.akretion.com). All Rights Reserved
# @author Benoît GUILLOT <benoit.guillot@akretion.com>
#
# This program is free ... | agpl-3.0 | -8,480,900,677,500,525,000 | 40.939394 | 79 | 0.585983 | false |
kgullikson88/IGRINS_Scripts | Search_Fast.py | 1 | 2751 | import sys
import os
import GenericSearch
import pandas
# Define regions contaminated by telluric residuals or other defects. We will not use those regions in the cross-correlation
badregions = [[0, 1510], # Blue end of H band (lots of water absorption)
#[1561, 1615], # CO2 band that is often poorly c... | mit | -3,009,733,239,299,444,000 | 38.3 | 124 | 0.556525 | false |
RubenKelevra/rethinkdb | external/v8_3.30.33.16/build/gyp/PRESUBMIT.py | 496 | 3373 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | agpl-3.0 | 4,849,723,541,785,945,000 | 27.108333 | 77 | 0.628521 | false |
jarvys/django-1.7-jdb | django/middleware/common.py | 52 | 7351 | import hashlib
import logging
import re
import warnings
from django.conf import settings
from django.core.mail import mail_managers
from django.core import urlresolvers
from django import http
from django.utils.deprecation import RemovedInDjango18Warning
from django.utils.encoding import force_text
from django.utils.h... | bsd-3-clause | -9,207,017,432,528,226,000 | 41.005714 | 91 | 0.566726 | false |
waseem18/oh-mainline | mysite/search/migrations/0041_add_created_and_modified_timestamps_to_all_models.py | 17 | 14730 | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | agpl-3.0 | 8,717,758,586,210,936,000 | 64.466667 | 160 | 0.5852 | false |
fbossy/SickRage | lib/guessit/plugins/transformers.py | 33 | 9580 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | gpl-3.0 | -433,597,681,300,607,170 | 42.153153 | 161 | 0.621399 | false |
jedi22/osquery | tools/tests/test_osqueryi.py | 5 | 9121 | #!/usr/bin/env python
# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under both the Apache 2.0 license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree)... | bsd-3-clause | 663,276,022,926,242,600 | 33.94636 | 92 | 0.544129 | false |
sonuyos/couchpotato | libs/html5lib/treebuilders/etree.py | 721 | 12609 | from __future__ import absolute_import, division, unicode_literals
from six import text_type
import re
from . import _base
from .. import ihatexml
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory
tag_regexp = re.compile("{([^}]*)}(.*)")
def getETreeBuilder(Elemen... | gpl-3.0 | -1,413,215,153,787,059,500 | 36.41543 | 85 | 0.509557 | false |
bq/bitbloq-offline | app/res/web2board/linux/res/Scons/sconsFiles/SCons/Tool/rpmutils.py | 6 | 17072 | """SCons.Tool.rpmutils.py
RPM specific helper routines for general usage in the test framework
and SCons core modules.
Since we check for the RPM package target name in several places,
we have to know which machine/system name RPM will use for the current
hardware setup. The following dictionaries and functions try t... | gpl-3.0 | -5,800,444,543,613,495,000 | 30.440147 | 107 | 0.519154 | false |
Etxea/gestion_eide_web | grupos/migrations/0003_auto__add_field_alumno_activo.py | 1 | 2078 | # -*- 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 field 'Alumno.activo'
db.add_column(u'alumnos_alumno', 'activo',... | mit | 7,626,090,300,032,314,000 | 50.975 | 140 | 0.547642 | false |
Dhivyap/ansible | lib/ansible/module_utils/network/eos/providers/module.py | 20 | 2106 | #
# (c) 2019, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import Connection
from ansible.module_utils.network.eos.providers import providers
from ansible.m... | gpl-3.0 | -4,444,893,630,275,901,000 | 32.967742 | 92 | 0.612061 | false |
ArneBachmann/configr | configr/test.py | 1 | 3339 | import doctest
import json
import logging
import os
import unittest
import sys
sys.path.insert(0, "..")
import configr
class Tests(unittest.TestCase):
''' Test suite. '''
def tests_metadata(_):
_.assertTrue(hasattr(configr, "version"))
_.assertTrue(hasattr(configr.version, "__version__"))
_.assertT... | mit | 5,298,692,201,717,053,000 | 34.147368 | 136 | 0.616652 | false |
fnugrahendi/petuk.corp | installer/pysource/source/installer.py | 1 | 6796 | import os,sys
from PyQt4 import QtCore
from PyQt4 import QtGui
import functools
import itertools
import re
from subprocess import Popen
import pythoncom #-- shortcut
from win32com.shell import shell, shellcon
from installer_ui import Ui_MainWindow
class MainGUI(QtGui.QMainWindow,Ui_MainWindow):
def __init__(self,pa... | gpl-2.0 | 7,519,898,417,814,834,000 | 33.323232 | 209 | 0.719982 | false |
cristianquaglio/odoo | addons/hr_attendance/report/attendance_errors.py | 377 | 3669 | # -*- 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... | apache-2.0 | -2,122,865,311,469,535,700 | 42.164706 | 294 | 0.576724 | false |
enigmampc/catalyst | catalyst/support/issue_227.py | 1 | 1521 | import pytz
from datetime import datetime
from catalyst.api import symbol
from catalyst.utils.run_algo import run_algorithm
coin = 'btc'
quote_currency = 'usd'
n_candles = 5
def initialize(context):
context.symbol = symbol('%s_%s' % (coin, quote_currency))
def handle_data_polo_partial_candles(context, data):
... | apache-2.0 | 7,911,985,052,871,495,000 | 30.040816 | 67 | 0.530572 | false |
atmark-techno/atmark-dist | user/python/Lib/lib-tk/turtle.py | 4 | 10917 | # LogoMation-like turtle graphics
from math import * # Also for export
import Tkinter
class Error(Exception):
pass
class RawPen:
def __init__(self, canvas):
self._canvas = canvas
self._items = []
self._tracing = 1
self.degrees()
self.reset()
def degrees(self, full... | gpl-2.0 | 438,159,064,982,537,540 | 30.827988 | 76 | 0.446276 | false |
jbobron/node-workshop | challenge6/start/node_modules/browserify/node_modules/syntax-error/node_modules/esprima-six/tools/generate-unicode-regex.py | 341 | 5096 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# By Yusuke Suzuki <utatane.tea@gmail.com>
# Modified by Mathias Bynens <http://mathiasbynens.be/>
# http://code.google.com/p/esprima/issues/detail?id=110
import sys
import string
import re
class RegExpGenerator(object):
def __init__(self, detector):
self.de... | mit | 646,803,075,168,037,400 | 29.073171 | 169 | 0.560636 | false |
bfurtaw/thrust | performance/report.py | 12 | 1519 | from build import plot_results, print_results
#valid formats are png, pdf, ps, eps and svg
#if format=None the plot will be displayed
format = 'png'
#output = print_results
output = plot_results
for function in ['fill', 'reduce', 'inner_product', 'gather', 'merge']:
output(function + '.xml', 'InputType', 'InputSi... | apache-2.0 | -5,358,173,115,082,442,000 | 49.633333 | 143 | 0.663594 | false |
IT-Department-Projects/OOAD-Project | Flask_App/oakcrest/lib/python2.7/site-packages/requests/auth.py | 68 | 9541 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import threading
import warnings
from base64 import b64encode
from .compat import urlparse, str, basestring
from .cookies import extract_cookies_... | mit | -6,903,700,700,795,054,000 | 32.128472 | 88 | 0.570066 | false |
obeattie/sqlalchemy | lib/sqlalchemy/sql/functions.py | 19 | 3067 | from sqlalchemy import types as sqltypes
from sqlalchemy.sql.expression import (
ClauseList, Function, _literal_as_binds, text, _type_from_args
)
from sqlalchemy.sql import operators
from sqlalchemy.sql.visitors import VisitableType
class _GenericMeta(VisitableType):
def __call__(self, *args, **kwargs):
... | mit | -3,386,888,585,508,713,000 | 28.490385 | 80 | 0.656668 | false |
calebfoss/tensorflow | tensorflow/contrib/metrics/python/metrics/classification.py | 23 | 2583 | # 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 | 1,662,373,576,708,966,100 | 40 | 80 | 0.678281 | false |
elhuhdron/knossos | python/user/custom_graphics_view.py | 2 | 2659 | #!/home/amos/anaconda/bin/python
from PythonQt.Qt import *
from PythonQt.QtGui import *
class CGScene(QGraphicsScene):
def __init__(self, parent = None):
super(CGScene, self).__init__(self)
class Texture(QGraphicsItem):
def __init__(self, pos, tex):
super(Texture, self).__init__(self)
self.tex = tex
s... | gpl-2.0 | 9,022,214,861,748,472,000 | 22.530973 | 99 | 0.719819 | false |
b3c/VTK-5.8 | Wrapping/Python/vtk/util/misc.py | 9 | 1984 | """Miscellaneous functions and classes that dont fit into specific
categories."""
import sys, os, vtk
#----------------------------------------------------------------------
# the following functions are for the vtk regression testing and examples
def vtkGetDataRoot():
"""vtkGetDataRoot() -- return vtk example d... | bsd-3-clause | -7,155,833,687,008,587,000 | 28.176471 | 76 | 0.555948 | false |
ActiveState/code | recipes/Python/577760_Change_a_Functions_Closure/recipe-577760.py | 1 | 1282 | """inject_closure module"""
INJECTEDKEY = "injected_{}"
OUTERLINE = " outer_{0} = injected_{0}"
INNERLINE = " inner_{0} = outer_{0}"
SOURCE= ("def not_important():",
" def also_not_important():",
" return also_not_important")
def inject_closure(f, *args):
"""Ret... | mit | 7,580,353,531,385,490,000 | 31.871795 | 60 | 0.552262 | false |
HackSoftware/hackconf.bg | home/website/migrations/0002_auto_20160903_1043.py | 1 | 12244 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-03 10:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
(... | mit | 5,730,577,551,946,824,000 | 33.883191 | 151 | 0.537406 | false |
duhzecca/cinder | cinder/tests/unit/fake_service.py | 13 | 1787 | # Copyright 2015 Intel Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | apache-2.0 | 948,339,716,318,436,500 | 30.910714 | 78 | 0.623951 | false |
beiko-lab/gengis | bin/Lib/site-packages/wx-2.8-msw-unicode/wx/lib/flashwin.py | 6 | 8028 | #----------------------------------------------------------------------
# Name: wx.lib.flashwin
# Purpose: A class that allows the use of the Shockwave Flash
# ActiveX control
#
# Author: Robin Dunn
#
# Created: 22-March-2004
# RCS-ID: $Id: flashwin.py 54040 2008-06-08 23:03:22Z RD... | gpl-3.0 | 4,649,919,121,262,041,000 | 29.641221 | 80 | 0.645615 | false |
sencha/chromium-spacewalk | third_party/libxml/src/check-xsddata-test-suite.py | 343 | 10682 | #!/usr/bin/python
import sys
import time
import os
import string
import StringIO
sys.path.insert(0, "python")
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
debug = 0
verbose = 0
quiet = 1
#
# the testsuite description
#
CONF=os.path.join(os.path.dirname(__file__), "test/xsdtest/xsdtestsuite.xml")
LOG=... | bsd-3-clause | -4,038,784,097,681,990,000 | 24.433333 | 96 | 0.624134 | false |
Learningtribes/edx-platform | openedx/core/djangolib/nose.py | 32 | 1212 | """
Utilities related to nose.
"""
from django.core.management import call_command
from django.db import DEFAULT_DB_ALIAS, connections, transaction
import django_nose
class NoseTestSuiteRunner(django_nose.NoseTestSuiteRunner):
"""Custom NoseTestSuiteRunner."""
def setup_databases(self):
""" Setup dat... | agpl-3.0 | 7,844,781,151,393,649,000 | 39.4 | 107 | 0.674917 | false |
ran5515/DeepDecision | tensorflow/contrib/rnn/python/kernel_tests/core_rnn_cell_test.py | 21 | 34945 | # 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 | 6,530,988,242,362,112,000 | 42.46393 | 80 | 0.612906 | false |
crisisking/udbraaains | brains/namelist/migrations/0006_auto.py | 1 | 2967 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding index on 'Player', fields ['is_dead']
db.create_index('namelist_player', ['is_dead'])
# ... | bsd-3-clause | 8,975,468,805,227,400,000 | 50.155172 | 144 | 0.552747 | false |
SimVascular/VTK | ThirdParty/Twisted/twisted/test/test_manhole.py | 41 | 2092 |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.trial import unittest
from twisted.manhole import service
from twisted.spread.util import LocalAsRemote
class Dummy:
pass
class DummyTransport:
def getHost(self):
return 'INET', '127.0.0.1', 0
class DummyManholeCl... | bsd-3-clause | -8,801,727,760,354,455,000 | 26.893333 | 87 | 0.640535 | false |
jab1982/opennsa | opennsa/config.py | 1 | 8668 | """
Configuration reader and defaults.
Author: Henrik Thostrup Jensen <htj@nordu.net>
Copyright: NORDUnet (2011)
"""
import os
import ConfigParser
from opennsa import constants as cnt
# defaults
DEFAULT_CONFIG_FILE = '/etc/opennsa.conf'
DEFAULT_LOG_FILE = '/var/log/opennsa.log'
DEFAULT_TLS ... | bsd-3-clause | -7,235,053,058,537,928,000 | 29.202091 | 126 | 0.61479 | false |
jrwdunham/old-webapp | onlinelinguisticdatabase/lib/app_globals.py | 1 | 16584 | # −*− coding: UTF−8 −*−
# Copyright (C) 2010 Joel Dunham
#
# This file is part of OnlineLinguisticDatabase.
#
# OnlineLinguisticDatabase 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... | gpl-3.0 | -8,743,266,454,911,274,000 | 33.892632 | 119 | 0.482141 | false |
Hellowlol/PyTunes | libs/mutagen/monkeysaudio.py | 16 | 2785 | # A Monkey's Audio (APE) reader/tagger
#
# Copyright 2006 Lukas Lalinsky <lalinsky@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Monkey's Audio streams with APEv2 ta... | gpl-3.0 | -5,587,546,866,950,363,000 | 32.154762 | 76 | 0.610772 | false |
bdang2012/taiga-back-casting | taiga/projects/mixins/on_destroy.py | 1 | 1879 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | 480,005,793,771,961,600 | 39.804348 | 107 | 0.670751 | false |
klundberg/swift-corelibs-foundation | lib/target.py | 2 | 12322 | # This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of ... | apache-2.0 | 4,916,125,948,489,552,000 | 27.589327 | 78 | 0.503571 | false |
marcelometal/Django-facebook | facebook_example/facebook_example/urls.py | 2 | 1535 | try:
from django.conf.urls import include, patterns, url
except ImportError:
from django.conf.urls.defaults import include, patterns, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
... | bsd-3-clause | 2,463,787,182,072,904,700 | 39.394737 | 90 | 0.500326 | false |
hirokihamasaki/irma | probe/modules/antivirus/avg/avg.py | 1 | 3787 | #
# Copyright (c) 2013-2016 Quarkslab.
# This file is part of IRMA project.
#
# 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 in the top-level directory
# of this distribution and at:
#
# http:... | apache-2.0 | 3,487,845,709,680,859,600 | 36.49505 | 78 | 0.537365 | false |
nullishzero/Portage | pym/_emerge/create_depgraph_params.py | 2 | 3934 | # Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import logging
from portage.util import writemsg_level
def create_depgraph_params(myopts, myaction):
#configure emerge engine parameters
#
# self: include _this_ package regardless of if it is merged.
#... | gpl-2.0 | 8,581,386,654,657,836,000 | 34.125 | 82 | 0.706151 | false |
ghold/OneKeySql | onekey/oracle/OkSqlHandler.py | 1 | 1458 | import cx_Oracle
import logging
import os
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
class OkSqlHandler(object):
@classmethod
def setupConn(cls):
# dsn = cx_Oracle.makedsn("10.0.44.99", "1521", "ompdb")
dsn = cx_Oracle.makedsn("10.0.76.128", "1521", "omp2st")
conn = cx_... | apache-2.0 | -4,715,842,806,353,815,000 | 46.032258 | 569 | 0.606996 | false |
einaru/cconverter | cconverter.py | 1 | 1284 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:Date: Thu Jun 30 17:17:35 CEST 2011
:Version: 1
:Authors: Einar Uvsløkk <einar.uvslokk@linux.com>
:Copyright: (c) 2011 Einar Uvsløkk
:License: GNU General Public License (GPL) version 3 or later
vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
"""
import gettext
i... | gpl-3.0 | 47,153,859,680,810,424 | 26.276596 | 66 | 0.695788 | false |
Thraxis/SickRage | lib/hachoir_parser/image/bmp.py | 95 | 6682 | """
Microsoft Bitmap picture parser.
- file extension: ".bmp"
Author: Victor Stinner
Creation: 16 december 2005
"""
from hachoir_parser import Parser
from hachoir_core.field import (FieldSet,
UInt8, UInt16, UInt32, Bits,
String, RawBytes, Enum,
PaddingBytes, NullBytes, createPaddingField)
from hachoir_cor... | gpl-3.0 | 8,301,769,140,815,707,000 | 33.266667 | 104 | 0.577971 | false |
pshen/ansible | docs/docsite/rst/conf.py | 37 | 7361 | # -*- coding: utf-8 -*-
#
# documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... | gpl-3.0 | 735,740,287,424,502,000 | 31.004348 | 131 | 0.707513 | false |
ejoful/scrapy_example | zhihu_spider/zhihu_spider/settings.py | 1 | 3176 | # -*- coding: utf-8 -*-
# Scrapy settings for zhihu_spider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/l... | gpl-3.0 | -9,045,986,626,991,025,000 | 34.288889 | 109 | 0.766058 | false |
tboyce021/home-assistant | tests/helpers/test_area_registry.py | 1 | 5502 | """Tests for the Area Registry."""
import asyncio
import pytest
from homeassistant.core import callback
from homeassistant.helpers import area_registry
import tests.async_mock
from tests.common import flush_store, mock_area_registry
@pytest.fixture
def registry(hass):
"""Return an empty, loaded, registry."""
... | apache-2.0 | 2,767,099,778,234,758,000 | 27.957895 | 83 | 0.666848 | false |
CapOM/ChromiumGStreamerBackend | tools/telemetry/third_party/gsutilz/third_party/protorpc/protorpc/util_test.py | 19 | 14232 | #!/usr/bin/env python
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | bsd-3-clause | 5,187,513,290,084,454,000 | 35.775194 | 80 | 0.599705 | false |
devendermishrajio/nova_test_latest | nova/tests/functional/v3/test_networks.py | 29 | 3919 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | 8,226,567,836,231,889,000 | 41.139785 | 78 | 0.630263 | false |
msiedlarek/qtwebkit | Tools/Scripts/webkitpy/port/gtk_unittest.py | 117 | 5598 | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | lgpl-3.0 | -3,901,070,757,604,433,000 | 49.890909 | 138 | 0.728117 | false |
keedio/hue | desktop/core/ext-py/Django-1.6.10/django/db/backends/postgresql_psycopg2/base.py | 47 | 6866 | """
PostgreSQL database backend for Django.
Requires psycopg 2: http://initd.org/projects/psycopg2
"""
import sys
from django.db.backends import *
from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations
from django.db.backends.postgresql_psycopg2.client import DatabaseClient
from django.db.b... | apache-2.0 | 5,477,455,794,934,373,000 | 36.113514 | 105 | 0.63647 | false |
tobegit3hub/glance_docker | glance/db/sqlalchemy/migrate_repo/versions/026_add_location_storage_information.py | 19 | 1514 | # Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | 8,841,245,119,567,651,000 | 34.209302 | 78 | 0.611625 | false |
luoyetx/Apriori | apriori/apriori.py | 1 | 9932 | # -*- coding: utf-8 -*-
from collections import defaultdict
from itertools import combinations
from sys import stdout
class cached_property(object):
"""A cached property only computed once
"""
def __init__(self, func):
self.func = func
def __get__(self, obj, cls):
if obj is None: retu... | mit | -2,762,654,598,857,889,000 | 34.598566 | 106 | 0.551752 | false |
gptech/ansible | lib/ansible/modules/network/iosxr/iosxr_system.py | 50 | 8452 | #!/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 | -2,665,395,511,299,902,500 | 32.539683 | 91 | 0.643753 | false |
alanhamlett/flask | examples/flaskr/flaskr.py | 157 | 2893 | # -*- coding: utf-8 -*-
"""
Flaskr
~~~~~~
A microblog example application written as Flask tutorial with
Flask and sqlite3.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
from sqlite3 import dbapi2 as sqlite3
from flask import Flask, request... | bsd-3-clause | 9,113,911,731,009,416,000 | 25.3 | 73 | 0.62945 | false |
wilvk/ansible | test/units/modules/network/nxos/test_nxos_vxlan_vtep.py | 57 | 2521 | # (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | gpl-3.0 | 744,538,491,116,916,600 | 39.015873 | 104 | 0.712812 | false |
lazytech-org/RIOT | tests/libfixmath/do-test.py | 19 | 2250 | #!/usr/bin/env python3
import math
import operator
import sys
def rem(a, b):
ret = a % b
if ret < 0 and a > 0 and b < 0 or \
ret > 0 and a < 0 and b > 0:
ret -= b
return ret
FUNS = {
'add': operator.add,
'sub': operator.sub,
'mul': operator.mul,
'div': operator.truediv,
... | lgpl-2.1 | -4,720,635,382,678,311,000 | 22.195876 | 123 | 0.485778 | false |
frouty/odoo_oph | openerp/workflow/wkf_service.py | 61 | 6596 | # -*- 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,100,437,129,249,882,000 | 41.282051 | 139 | 0.603699 | false |
kartben/iotivity | tools/scons/BoostBuild.py | 1 | 5868 | # -*- coding: utf-8 -*-
# *********************************************************************
#
# Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
#
# *********************************************************************
#
# Licensed under the Apache License, Version 2.0 (the "License");
... | apache-2.0 | -9,195,859,482,871,720,000 | 35.615385 | 234 | 0.604635 | false |
davetcoleman/sdk-examples | baxter/baxter_interface/src/baxter_interface/robustcontroller.py | 3 | 5500 | # Copyright (c) 2013, Rethink Robotics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions an... | bsd-3-clause | -5,226,904,284,030,844,000 | 38.007092 | 105 | 0.638727 | false |
megaumi/django | tests/m2m_recursive/tests.py | 424 | 5410 | from __future__ import unicode_literals
from operator import attrgetter
from django.test import TestCase
from .models import Person
class RecursiveM2MTests(TestCase):
def setUp(self):
self.a, self.b, self.c, self.d = [
Person.objects.create(name=name)
for name in ["Anne", "Bill"... | bsd-3-clause | -3,986,207,669,628,941,300 | 26.74359 | 86 | 0.502588 | false |
jpanikulam/experiments | gpgpu/generators/sdf_shape_defs.py | 1 | 1463 | # %codegen(cl_gen)
import generate_opencl_structs
def main():
plane_defd = [
{
'type': 'vector',
'length': 3,
'name': 'normal',
},
{
'type': 'float',
'length': 1,
'name': 'd',
}
]
sphere_defd = [
... | mit | -843,259,497,694,248,400 | 18.77027 | 84 | 0.358852 | false |
napkindrawing/ansible | lib/ansible/modules/cloud/vmware/vmware_vm_facts.py | 33 | 3282 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.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 Li... | gpl-3.0 | 5,134,906,733,403,485,000 | 29.388889 | 86 | 0.667276 | false |
rkokkelk/CouchPotatoServer | libs/guessit/__main__.py | 94 | 6835 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2011 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | gpl-3.0 | 126,389,051,734,252 | 53.238095 | 160 | 0.610623 | false |
coreos/chromite | scripts/cros_generate_sysroot.py | 2 | 3711 | #!/usr/bin/python
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Generates a sysroot tarball for building a specific package.
Meant for use after setup_board and build_packages have been run.
"... | bsd-3-clause | -5,398,978,733,905,501,000 | 32.133929 | 79 | 0.674212 | false |
psi4/psi4 | psi4/share/psi4/scripts/apply_license.py | 7 | 3497 | # Checks all psi4 relevant files for proper boilerplate GNU license.
# This is sold as is with no warrenty-- probably should double check everything
# after running. I am not responsible if you break Psi4.
#
# Do not forget to do share/plugins by hand!
import os
# File type we know how to handle
ftypes = ['cc', 'h', ... | lgpl-3.0 | 3,931,227,482,959,317,000 | 29.675439 | 82 | 0.598799 | false |
Tivix/wagtail | wagtail/utils/setup.py | 5 | 1510 | from __future__ import absolute_import, print_function, unicode_literals
import os
import subprocess
from setuptools import Command
from setuptools.command.bdist_egg import bdist_egg
from setuptools.command.sdist import sdist as base_sdist
class assets_mixin(object):
def compile_assets(self):
try:
... | bsd-3-clause | 1,847,419,954,249,556,700 | 26.962963 | 79 | 0.566887 | false |
xxshutong/openerp-7.0 | openerp/addons/mrp/company.py | 56 | 1393 | # -*- 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 | -1,361,544,100,795,959,600 | 37.694444 | 84 | 0.615219 | false |
CareerVillage/slack-moderation | tools/smt/smt/conf/settings.py | 1 | 1207 | # -*- coding: utf-8 -*-
import os
AWS_ACCESS_KEY_ID = None
AWS_SECRET_ACCESS_KEY = None
PROJECT_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
def rel(*x):
return os.path.abspath(os.path.join(PROJECT_ROOT, *x))
SETUP_DIR = rel('../../../setup')
KEY_DIR = rel('../../../keys')
# Stagin... | mit | 2,738,662,883,398,976,000 | 24.680851 | 77 | 0.71831 | false |
RecursiveGreen/pymod | formats/XM.py | 1 | 16803 | import struct
from pymod.constants import *
from pymod.module import *
from pymod.util import *
class XMNote(Note):
"""The definition of an note and it's effects in Fast Tracker II"""
def __init__(self, note=0, instrument=0, voleffect=0, volparam=0, effect=0, param=0):
super(XMNote, self).__init__(note... | gpl-3.0 | 775,969,824,501,384,100 | 46.067227 | 116 | 0.526632 | false |
chatcannon/scipy | scipy/linalg/_cython_signature_generator.py | 52 | 8369 | """
A script that uses f2py to generate the signature files used to make
the Cython BLAS and LAPACK wrappers from the fortran source code for
LAPACK and the reference BLAS.
To generate the BLAS wrapper signatures call:
python _cython_signature_generator.py blas <blas_directory> <out_file>
To generate the LAPACK wrapp... | bsd-3-clause | -2,962,760,018,220,139,000 | 64.382813 | 297 | 0.620982 | false |
samdoran/ansible | lib/ansible/modules/network/nxos/nxos_evpn_vni.py | 25 | 10474 | #!/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 | 3,545,773,953,491,117,000 | 32.89644 | 91 | 0.62068 | false |
NeuralEnsemble/neuroConstruct | lib/jython/Lib/test/test_shelve.py | 138 | 4596 | import os
import unittest
import shelve
import glob
from test import test_support
test_support.import_module('anydbm', deprecated=True)
class TestCase(unittest.TestCase):
fn = "shelftemp" + os.extsep + "db"
def test_close(self):
d1 = {}
s = shelve.Shelf(d1, protocol=2, writeback=False)
... | gpl-2.0 | 5,054,181,829,437,752,000 | 27.196319 | 74 | 0.532637 | false |
hjanime/VisTrails | vistrails/db/versions/v0_9_0/domain/abstraction.py | 3 | 2728 | ###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | bsd-3-clause | 1,268,253,190,841,583,600 | 46.034483 | 80 | 0.689516 | false |
SanPen/GridCal | src/research/opf/dc_opf_3.py | 1 | 8418 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This program implements the DC power flow as a linear program
This version uses the sparse structures and it the problem compilation is
blazing fast compared to the full matrix version
"""
from pulp import *
import numpy as np
import pandas as pd
from matplotlib import ... | gpl-3.0 | -8,476,126,009,338,461,000 | 38.144186 | 120 | 0.467681 | false |
tungvx/deploy | appengine_django/management/commands/testserver.py | 45 | 2504 | #!/usr/bin/python2.4
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 4,503,622,777,847,848,400 | 32.837838 | 79 | 0.711262 | false |
jaspreetw/tempest | tempest/tests/base.py | 42 | 1610 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | 8,564,911,682,959,017,000 | 34.777778 | 79 | 0.668944 | false |
RAtechntukan/CouchPotatoServer | libs/pyutil/platformutil.py | 106 | 3607 | # Thanks to Daenyth for help porting this to Arch Linux.
import os, platform, re, subprocess
_distributor_id_cmdline_re = re.compile("(?:Distributor ID:)\s*(.*)", re.I)
_release_cmdline_re = re.compile("(?:Release:)\s*(.*)", re.I)
_distributor_id_file_re = re.compile("(?:DISTRIB_ID\s*=)\s*(.*)", re.I)
_release_file_r... | gpl-3.0 | 3,251,873,817,201,707,500 | 35.07 | 144 | 0.596618 | false |
inetCatapult/flask-sqlalchemy | test_sqlalchemy.py | 7 | 23928 | from __future__ import with_statement
import atexit
import unittest
from datetime import datetime
import flask
import flask_sqlalchemy as sqlalchemy
from sqlalchemy import MetaData
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import sessionmaker
def make_todo_model(db):
class Todo(db.... | bsd-3-clause | -191,731,611,490,733,000 | 33.23176 | 114 | 0.584838 | false |
un33k/CouchPotatoServer | libs/axl/axel.py | 65 | 13262 | # axel.py
#
# Copyright (C) 2010 Adrian Cristea adrian dot cristea at gmail dotcom
# Edits by Ruud Burger
#
# Based on an idea by Peter Thatcher, found on
# http://www.valuedlessons.com/2008/04/events-in-python.html
#
# This module is part of Axel and is released under
# the MIT License: http://www.opensource.org/licen... | gpl-3.0 | -4,642,282,576,360,396,000 | 33.808399 | 95 | 0.537928 | false |
ford-prefect/cerbero | test/test_packages_common.py | 31 | 3804 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | lgpl-2.1 | -5,708,435,954,015,954,000 | 27.818182 | 67 | 0.660358 | false |
mozts2005/OuterSpace | oslauncher/oslauncher/version.py | 3 | 1031 | #
# Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/]
#
# This file is part of Outer Space.
#
# Outer Space 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, ... | gpl-2.0 | 9,115,858,535,065,539,000 | 36.185185 | 77 | 0.704171 | false |
JesseLivezey/pylearn2 | pylearn2/datasets/tests/test_ocr.py | 43 | 3754 | """module for testing datasets.ocr"""
import unittest
import numpy as np
from pylearn2.datasets.ocr import OCR
from pylearn2.space import Conv2DSpace
from pylearn2.testing.skip import skip_if_no_data
class TestOCR(unittest.TestCase):
"""
Unit test of OCR dataset
Parameters
----------
None
"""... | bsd-3-clause | -5,110,563,710,441,589,000 | 36.54 | 73 | 0.520511 | 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.