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 |
|---|---|---|---|---|---|---|---|---|---|---|
vtslab/sensafety-midterm | ilp/Libxml2_Library/Downloads/libxml2-2.9.1/python/tests/reader2.py | 32 | 5345 | #!/usr/bin/python -u
#
# this tests the DTD validation with the XmlTextReader interface
#
import sys
import glob
import string
import libxml2
try:
import StringIO
str_io = StringIO.StringIO
except:
import io
str_io = io.StringIO
# Memory debug specific
libxml2.debugMemory(1)
err=""
expect="""../../tes... | apache-2.0 | -4,243,533,581,839,886,000 | 19.169811 | 114 | 0.644341 | false |
skitzycat/beedraw | beeeventstack.py | 1 | 16265 | # Beedraw/Hive network capable client and server allowing collaboration on a single image
# Copyright (C) 2009 Thomas Becker
#
# 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; eith... | gpl-2.0 | 6,452,624,062,806,670,000 | 29.630885 | 296 | 0.764832 | false |
f4nt/djpandora | djpandora/migrations/0012_auto__add_field_song_album_art.py | 1 | 6939 | # 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 field 'Song.album_art'
db.add_column('djpandora_song', 'album_art', self.gf('django.db.models.fie... | bsd-3-clause | 3,958,098,334,282,590,700 | 66.368932 | 182 | 0.547341 | false |
MartijnBraam/CouchPotatoServer | couchpotato/core/media/_base/media/index.py | 5 | 5476 | from string import ascii_letters
from hashlib import md5
from CodernityDB.tree_index import MultiTreeBasedIndex, TreeBasedIndex
from couchpotato.core.helpers.encoding import toUnicode, simplifyString
class MediaIndex(MultiTreeBasedIndex):
_version = 3
custom_header = """from CodernityDB.tree_index import Mu... | gpl-3.0 | 9,104,146,214,868,600,000 | 29.764045 | 103 | 0.581264 | false |
vovanbo/django-oscar | tests/functional/customer/alert_tests.py | 39 | 2902 | from django_webtest import WebTest
from django.core.urlresolvers import reverse
from django.core import mail
from oscar.apps.customer.models import ProductAlert
from oscar.test.factories import create_product, create_stockrecord
from oscar.test.factories import UserFactory
class TestAUser(WebTest):
def test_can... | bsd-3-clause | 8,301,335,333,063,073,000 | 34.82716 | 78 | 0.647829 | false |
sacnayak/ssnayak-viz | lib/werkzeug/useragents.py | 257 | 5418 | # -*- coding: utf-8 -*-
"""
werkzeug.useragents
~~~~~~~~~~~~~~~~~~~
This module provides a helper to inspect user agent strings. This module
is far from complete but should work for most of the currently available
browsers.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more deta... | apache-2.0 | -351,692,411,183,870,340 | 26.784615 | 78 | 0.509782 | false |
andreparrish/python-for-android | python3-alpha/python3-src/Lib/test/test_sysconfig.py | 47 | 13554 | """Tests for 'site'.
Tests assume the initial paths in sys.path once the interpreter has begun
executing have not been removed.
"""
import unittest
import sys
import os
import subprocess
import shutil
from copy import copy, deepcopy
from test.support import (run_unittest, TESTFN, unlink, get_attribute,
... | apache-2.0 | -7,551,443,673,973,191,000 | 36.441989 | 97 | 0.535488 | false |
orvi2014/kitsune | kitsune/questions/tests/test_forms.py | 17 | 3740 | from django.contrib.auth.models import AnonymousUser
from nose.tools import eq_
from kitsune.questions.forms import NewQuestionForm, WatchQuestionForm
from kitsune.questions.tests import TestCaseBase
from kitsune.users.tests import user
class WatchQuestionFormTests(TestCaseBase):
"""Tests for WatchQuestionForm.... | bsd-3-clause | -7,620,746,438,086,362,000 | 37.163265 | 79 | 0.568449 | false |
boddumanohar/Holmes-Totem | src/main/scala/org/holmesprocessing/totem/services/zipmeta/holmeslibrary/files.py | 2 | 3314 | import mmap
# import tempfile
# import shutil
# import os
class LargeFileReader (object):
"""
FOr mapping file to virtual memory.
File-like (read-only) object trimmed for low memory footprint.
Reading and finding does not advance the offset.
Usage:
# open
file = LargeFileReader("/f... | apache-2.0 | 5,567,854,183,211,431,000 | 31.811881 | 88 | 0.566687 | false |
qedsoftware/commcare-hq | corehq/form_processor/utils/general.py | 1 | 2578 | import threading
from django.conf import settings
from corehq.toggles import NEW_EXPORTS, TF_DOES_NOT_USE_SQLITE_BACKEND
_thread_local = threading.local()
def get_local_domain_sql_backend_override(domain):
try:
return _thread_local.use_sql_backend[domain]
except (AttributeError, KeyError):
... | bsd-3-clause | 7,933,356,832,999,004,000 | 33.373333 | 105 | 0.725369 | false |
meabsence/python-for-android | python-build/python-libs/gdata/tests/gdata_tests/client_online_test.py | 87 | 3314 | #!/usr/bin/python
#
# Copyright (C) 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 ... | apache-2.0 | 3,523,605,542,196,642,300 | 33.520833 | 76 | 0.635486 | false |
Dandandan/wikiprogramming | jsrepl/build/extern/python/closured/lib/python2.7/mailbox.py | 74 | 78102 | #! /usr/bin/env python
"""Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
# Notes for authors of new mailbox subclasses:
#
# Remember to fsync() changes to disk before closing a modified file
# or returning from a flush() method. See functions _sync_flush() and
# _sync_close().
import sys
im... | mit | -8,683,369,202,477,308,000 | 34.975127 | 81 | 0.524199 | false |
krafczyk/spack | var/spack/repos/builtin/packages/perl-devel-globaldestruction/package.py | 5 | 1639 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 9,130,658,932,716,278,000 | 47.205882 | 106 | 0.688835 | false |
YNedderhoff/aspect-classifier | modules/perceptron.py | 2 | 2250 | class classifier(object):
# initialize classifier setting all weights to 0.5:
def __init__(self, tag, feat_vec, lmi_dict, top_x):
self.tag = tag
self.top_x = top_x
self.lmi_dict = lmi_dict
self.feat_vec = feat_vec
self.weight_vector = [0.0 for ind in range(len(feat_vec))... | mit | 1,709,497,343,692,722,700 | 44.918367 | 148 | 0.564 | false |
samdoran/ansible | lib/ansible/plugins/inventory/host_list.py | 14 | 2818 | # Copyright 2017 RedHat, 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 i... | gpl-3.0 | -3,809,308,995,205,995,500 | 35.128205 | 119 | 0.655075 | false |
CWSL/cwsl-mas | cwsl/vt_modules/mv_output.py | 4 | 1316 | """
Authors: Tim Bedin
Copyright 2015 CSIRO, Australian Government Bureau of Meteorology
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 | -6,253,423,111,683,674,000 | 31.097561 | 76 | 0.737842 | false |
quattor/aquilon | tests/broker/test_update_cluster_systemlist.py | 1 | 6721 | #!/usr/bin/env python
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2016,2017 Contributor
#
# 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 co... | apache-2.0 | 2,963,062,521,860,804,000 | 43.509934 | 98 | 0.517929 | false |
albertjan/pypyjs | website/js/pypy.js-0.2.0/lib/modules/timeit.py | 8 | 12671 | #! /usr/bin/env python
"""Tool for measuring execution time of small code snippets.
This module avoids a number of common traps for measuring execution
times. See also Tim Peters' introduction to the Algorithms chapter in
the Python Cookbook, published by O'Reilly.
Library usage: see the Timer class.
Command line ... | mit | -1,968,192,794,205,038,600 | 36.71131 | 78 | 0.59869 | false |
microcom/odoo | addons/project_issue/project_issue.py | 12 | 30631 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import calendar
from datetime import datetime,date
from dateutil import relativedelta
import json
import time
from openerp import api
from openerp import SUPERUSER_ID
from openerp import tools
from openerp.osv import fie... | agpl-3.0 | -3,037,596,079,041,426,400 | 52.826011 | 238 | 0.595847 | false |
etherkit/OpenBeacon2 | client/linux-x86/venv/lib/python3.8/site-packages/cmd2/command_definition.py | 3 | 2466 | # coding=utf-8
"""
Supports the definition of commands in separate classes to be composed into cmd2.Cmd
"""
from typing import Optional, Type
from .constants import COMMAND_FUNC_PREFIX
from .exceptions import CommandSetRegistrationError
# Allows IDEs to resolve types without impacting imports at runtime, breaking cir... | gpl-3.0 | -1,791,453,780,194,463,500 | 31.447368 | 118 | 0.659367 | false |
slayerjain/servo | tests/wpt/update/fetchlogs.py | 222 | 3183 | # 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/.
import argparse
import cStringIO
import gzip
import json
import os
import requests
import urlparse
treeherder_base = "h... | mpl-2.0 | 1,855,721,078,666,554,000 | 31.151515 | 158 | 0.592837 | false |
Trult/youtube-dl | youtube_dl/extractor/sztvhu.py | 148 | 1679 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .common import InfoExtractor
class SztvHuIE(InfoExtractor):
_VALID_URL = r'http://(?:(?:www\.)?sztv\.hu|www\.tvszombathely\.hu)/(?:[^/]+)/.+-(?P<id>[0-9]+)'
_TEST = {
'url': 'http://sztv.hu/hirek/cserkeszek-nepszerusitettek-a-kornye... | unlicense | -1,115,151,017,165,476,100 | 39.341463 | 193 | 0.565296 | false |
ppries/tensorflow | tensorflow/contrib/learn/python/learn/estimators/estimator_test_utils.py | 11 | 2081 | # 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 | 2,549,918,881,813,955,000 | 35.508772 | 80 | 0.713119 | false |
leb2dg/osf.io | addons/onedrive/models.py | 4 | 9726 | # -*- coding: utf-8 -*-
import os
import urllib
import logging
from django.db import models
from addons.base import exceptions
from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings,
BaseStorageAddon)
from addons.onedrive import settings
from addons.onedrive.clien... | apache-2.0 | -8,988,914,336,222,152,000 | 33.367491 | 111 | 0.577421 | false |
ensemblr/llvm-project-boilerplate | include/llvm/projects/libcxx/utils/google-benchmark/tools/gbench/report.py | 50 | 5098 | """report.py - Utilities for reporting statistics about benchmark results
"""
import os
class BenchmarkColor(object):
def __init__(self, name, code):
self.name = name
self.code = code
def __repr__(self):
return '%s%r' % (self.__class__.__name__,
(self.name, sel... | mit | 7,436,510,353,008,525,000 | 35.156028 | 106 | 0.567085 | false |
bmotlaghFLT/FLT_PhantomJS | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py | 124 | 4953 | # Copyright (c) 2013 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 ... | bsd-3-clause | 3,189,180,397,700,258,000 | 50.061856 | 123 | 0.713709 | false |
jturney/psi4 | psi4/driver/inputparser.py | 6 | 28874 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 | 6,839,499,052,170,089,000 | 36.256774 | 128 | 0.578998 | false |
baojie/pydatalog | pyDatalog/examples/console.py | 1 | 1673 | """
pyDatalog
Copyright (C) 2012 Pierre Carbonnelle
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This lib... | lgpl-2.1 | 2,365,867,189,894,512,000 | 27.875 | 79 | 0.702331 | false |
alexjc/pylearn2 | pylearn2/sandbox/cuda_convnet/convnet_compile.py | 44 | 6654 | import errno
import logging
import os
import shutil
import stat
import sys
from theano import config
from theano.gof.cmodule import get_lib_extension
from theano.gof.compilelock import get_lock, release_lock
from theano.sandbox import cuda
from theano.sandbox.cuda import nvcc_compiler
from .shared_code import this_di... | bsd-3-clause | -798,570,316,755,578,000 | 33.476684 | 154 | 0.591674 | false |
ayshrimali/Appium-UIAutomation | automation/mobile/uicomponents.py | 1 | 2002 | #!/usr/bin/env python
# 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 | 4,160,703,084,245,401,600 | 53.135135 | 169 | 0.711289 | false |
jabeerahmed/testrepo | term1/Lessons/LaneDetection/finding_lane_lines_color_region.py | 1 | 2342 | import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
# Read in the image and print out some stats
# Note: in the previous example we were reading a .jpg
# Here we read a .png and convert to 0,255 bytescale
image = mpimg.imread('../images/test.jpg')
# Grab the x and y size and make a co... | gpl-2.0 | 8,384,427,815,955,899,000 | 37.393443 | 96 | 0.667805 | false |
axinging/chromium-crosswalk | tools/auto_bisect/source_control_test.py | 45 | 3231 | # 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.
"""Unit tests for the source_control module."""
import unittest
import mock
import source_control
class SourceControlTest(unittest.TestCase):
@mock.pa... | bsd-3-clause | -3,721,270,182,205,729,000 | 37.927711 | 78 | 0.667595 | false |
rabipanda/tensorflow | tensorflow/contrib/lite/schema/upgrade_schema.py | 19 | 12877 | # ==============================================================================
# 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
... | apache-2.0 | -1,252,365,343,965,451,300 | 36.002874 | 80 | 0.646502 | false |
yati-sagade/incubator-airflow | tests/contrib/operators/test_pubsub_operator.py | 5 | 6123 | # -*- 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 | 3,088,506,783,241,233,400 | 39.282895 | 75 | 0.652948 | false |
Datera/cinder | cinder/tests/unit/volume/drivers/disco/test_create_snapshot.py | 3 | 5947 | # (c) Copyright 2015 Industrial Technology Research Institute.
#
# 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 re... | apache-2.0 | 4,924,241,050,930,115,000 | 37.869281 | 78 | 0.617454 | false |
44px/redash | redash/permissions.py | 7 | 2344 | import functools
from flask_login import current_user
from flask_restful import abort
from funcy import flatten
view_only = True
not_view_only = False
ACCESS_TYPE_VIEW = 'view'
ACCESS_TYPE_MODIFY = 'modify'
ACCESS_TYPE_DELETE = 'delete'
ACCESS_TYPES = (ACCESS_TYPE_VIEW, ACCESS_TYPE_MODIFY, ACCESS_TYPE_DELETE)
def... | bsd-2-clause | -8,500,147,361,864,385,000 | 24.758242 | 95 | 0.68558 | false |
willcodefortea/wagtail | wagtail/wagtailimages/wagtail_hooks.py | 4 | 3778 | from django.conf import settings
from django.conf.urls import include, url
from django.core import urlresolvers
from django.core.exceptions import ImproperlyConfigured
from django.utils.html import format_html, format_html_join
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore import hoo... | bsd-3-clause | -2,854,248,337,226,514,000 | 41.449438 | 146 | 0.72234 | false |
khkaminska/bokeh | bokeh/validation/decorators.py | 41 | 2911 | ''' Provide decorators help with define Bokeh validation checks.
'''
from __future__ import absolute_import
from functools import partial
from six import string_types
def _validator(code_or_name, validator_type):
if validator_type == "error":
from .errors import codes
from .errors import EXT
... | bsd-3-clause | -3,753,854,446,099,929,600 | 26.72381 | 108 | 0.682583 | false |
nanolearning/edx-platform | lms/djangoapps/open_ended_grading/utils.py | 40 | 7381 | import logging
from xmodule.modulestore import search
from xmodule.modulestore.django import modulestore, ModuleI18nService
from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem
from xmodule.open_ended_grading_classes.controller_query_service import ControllerQueryService
from xmodule.open_ended_g... | agpl-3.0 | 4,841,636,078,843,068,000 | 40.005556 | 125 | 0.642867 | false |
implus/jieba | test/test.py | 62 | 4973 | #encoding=utf-8
import sys
sys.path.append("../")
import jieba
def cuttest(test_sent):
result = jieba.cut(test_sent)
print(" / ".join(result))
if __name__ == "__main__":
cuttest("这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。")
cuttest("我不喜欢日本和服。")
cuttest("雷猴回归人间。")
cuttest("工信处女干事每月经过下属科室都要亲口交代24口... | mit | -2,687,407,020,817,160,000 | 27.23 | 128 | 0.669146 | false |
xingh/jaikuengine | common/decorator.py | 33 | 1652 | # Copyright 2009 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 agreed to in writing, ... | apache-2.0 | -1,498,465,530,970,717,000 | 30.769231 | 74 | 0.720944 | false |
minghuascode/pyj | examples/gwtcanvas/__main__.py | 7 | 1088 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
TARGETS = [
'GWTCanvasDemo.py',
'SVGCanvasDemo.py',
]
PACKAGE = {
'title': 'GWT Canvas',
'desc': 'Port of GWTCanvas Example',
}
def setup(targets):
'''Setup example for translation, MUST call util.setup(targets).'''
util.setup(targets)
def tr... | apache-2.0 | -7,834,019,655,503,155,000 | 19.148148 | 77 | 0.596507 | false |
pyconca/2017-web | pyconca2017/tests/test_views.py | 1 | 1467 | from test_plus.test import TestCase
from datetime import date
from pyconca2017.pycon_schedule.models import Schedule
class WebPagesTests(TestCase):
def test_homepage(self):
response = self.client.get(self.reverse('home'))
self.assertEqual(response.status_code, 200)
def test_about(self):
... | mit | 2,420,748,132,383,408,600 | 34.780488 | 95 | 0.683027 | false |
matrixise/epcon | p3/management/commands/users_with_unassigned_tickets.py | 4 | 3569 | # -*- coding: utf-8 -*-
""" Print information of the users who got unassigned tickets."""
from django.core.management.base import BaseCommand, CommandError
from django.core import urlresolvers
from django.conf import settings
from conference import models
from conference import utils
from p3 import models as p3_model... | bsd-2-clause | 4,528,127,100,797,748,700 | 28.495868 | 96 | 0.613897 | false |
krkhan/azure-linux-extensions | VMEncryption/main/ConfigUtil.py | 8 | 3221 | #!/usr/bin/env python
#
# VMEncryption extension
#
# Copyright 2015 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | apache-2.0 | -5,778,936,834,478,284,000 | 39.78481 | 112 | 0.650419 | false |
pytorn/hackr | hackr/Graphs.py | 1 | 2839 | import matplotlib.pyplot as plt
# Matplotlib module has been used for plotting
# Class plot1 has been made to plot given coordinates in different graph styles
# For each graph style a function has been defined
# For saving the figure a function has been defined , You have to provide the full path
# For example in Ubunt... | apache-2.0 | 3,889,748,853,349,664,300 | 34.049383 | 118 | 0.584361 | false |
PW-Sat2/PWSat2OBC | integration_tests/tests/test_experiment_detumbling.py | 1 | 2259 | import logging
from datetime import timedelta, datetime
import telecommand
from obc.experiments import ExperimentType
from response_frames.common import ExperimentSuccessFrame
from system import auto_power_on, runlevel
from tests.base import RestartPerTest
from utils import TestEvent
class TestExperimentD... | agpl-3.0 | -5,492,011,059,468,271,000 | 33.857143 | 162 | 0.660027 | false |
jwlawson/tensorflow | tensorflow/python/keras/_impl/keras/layers/normalization.py | 28 | 5754 | # 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,593,175,644,376,472,000 | 41.940299 | 80 | 0.677616 | false |
datsfosure/ansible | lib/ansible/playbook/playbook_include.py | 37 | 5458 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | 4,244,574,948,270,083,600 | 41.976378 | 137 | 0.643093 | false |
mickem/json-protobuf | json_protobuf/generator.py | 1 | 14445 | # Copyright 2014 Michael Medin
#
# 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 w... | apache-2.0 | -5,846,875,919,628,494,000 | 43.446154 | 276 | 0.594808 | false |
francisc0garcia/autonomous_bicycle | test/convert_csv_files.py | 1 | 1323 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri May 26 10:24:07 2017
@author: pach0
"""
import os
from fnmatch import fnmatch
import pandas as pd
root = '/home/pach0/Documents/autonomous_bicycle/code/'
pattern = "*.csv"
filenames = []
files = []
for path, subdirs, files in os.walk(root):
for n... | apache-2.0 | -2,606,509,473,777,682,400 | 22.210526 | 83 | 0.661376 | false |
Clyde-fare/scikit-learn | sklearn/metrics/scorer.py | 211 | 13141 | """
The :mod:`sklearn.metrics.scorer` submodule implements a flexible
interface for model selection and evaluation using
arbitrary score functions.
A scorer object is a callable that can be passed to
:class:`sklearn.grid_search.GridSearchCV` or
:func:`sklearn.cross_validation.cross_val_score` as the ``scoring`` parame... | bsd-3-clause | 1,355,513,126,478,622,500 | 35.706704 | 79 | 0.596454 | false |
huguesv/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/ruamel_yaml/scalarint.py | 5 | 3069 | # coding: utf-8
from __future__ import print_function, absolute_import, division, unicode_literals
if False: # MYPY
from typing import Text, Any, Dict, List # NOQA
__all__ = ["ScalarInt", "BinaryInt", "OctalInt", "HexInt", "HexCapsInt"]
from .compat import no_limit_int # NOQA
class ScalarInt(no_limit_int):... | apache-2.0 | 8,346,683,100,515,702,000 | 35.105882 | 109 | 0.578364 | false |
amimoto-ami/amimoto-amazon-alexa | amimoto_alexa/dispatchers.py | 1 | 6974 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
for amimoto_alexa
"""
from helpers import *
from debugger import *
import yaml
import random
def dispatch_question(intent, session):
"""Dispatch questions and return answer.
"""
session_attributes = build_session_attributes(session)
should_end_sessi... | mit | -7,153,590,622,554,145,000 | 46.067568 | 166 | 0.627333 | false |
mostlygeek/splice | tests/base.py | 3 | 2317 | import os
import csv
from splice.environment import Environment
from splice.webapp import create_webapp
from flask.ext.testing import TestCase
db_uri = os.environ.get('TEST_DB_URI') or 'postgres://localhost/splice_test'
env = Environment.instance(test=True, test_db_uri=db_uri)
class BaseTestCase(TestCase):
def ... | mpl-2.0 | 4,912,339,572,060,205,000 | 30.739726 | 123 | 0.548554 | false |
superna9999/pyfdt | samples/python-generate.py | 2 | 2194 | #!/usr/bin/env python
from pyfdt.pyfdt import *
phandle = 1
root = FdtNode("/")
chosen = FdtNode("chosen")
aliases = FdtNode("aliases")
memory = FdtNode("memory")
cpus = FdtNode("cpus")
clocks = FdtNode("clocks")
soc = FdtNode("soc")
soc_intc = FdtNode("interrupt-controller")
soc_uart = FdtNode("uart@0xF000E000")
ro... | apache-2.0 | 51,313,833,717,833,870 | 36.186441 | 71 | 0.73382 | false |
dtroyer/python-openstacksdk | openstack/identity/v3/group.py | 1 | 1542 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | 290,964,686,591,207,400 | 34.045455 | 75 | 0.704929 | false |
espadrine/opera | chromium/src/third_party/scons-2.0.1/engine/SCons/Tool/mingw.py | 61 | 5886 | """SCons.Tool.gcc
Tool-specific initialization for MinGW (http://www.mingw.org/)
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 T... | bsd-3-clause | 8,980,469,653,721,930,000 | 36.253165 | 135 | 0.656133 | false |
MartijnBraam/CouchPotatoServer | couchpotato/core/media/_base/providers/torrent/ilovetorrents.py | 5 | 7153 | import re
import traceback
from bs4 import BeautifulSoup
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode
from couchpotato.core.helpers.variable import tryInt, splitString
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.torrent.base import TorrentProvider
lo... | gpl-3.0 | -3,858,139,562,041,288,700 | 36.062176 | 136 | 0.442611 | false |
Galexrt/zulip | zerver/tests/test_user_groups.py | 2 | 2288 | # -*- coding: utf-8 -*-
from typing import Any, List, Optional, Text
import django
import mock
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.user_groups import (
check_add_user_to_user_group,
check_remove_user_from_user_group,
create_user_group,
get_user_groups,
user_groups_in_... | apache-2.0 | -5,925,163,735,393,091,000 | 39.140351 | 84 | 0.644231 | false |
mambelli/osg-bosco-marco | src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/Languages/fr.py | 10 | 7460 | apiAttachAvailable = u'API disponible'
apiAttachNotAvailable = u'Indisponible'
apiAttachPendingAuthorization = u'Autorisation en attente'
apiAttachRefused = u'Refus\xe9'
apiAttachSuccess = u'Connexion r\xe9ussie'
apiAttachUnknown = u'Inconnu'
budDeletedFriend = u'Supprim\xe9 de la liste d\u2019amis'
budFriend = ... | apache-2.0 | 6,142,571,942,599,656,000 | 37.893048 | 87 | 0.775737 | false |
linuxium/ubuntu-yakkety | scripts/gdb/linux/proc.py | 265 | 5905 | #
# gdb helper commands and functions for Linux kernel debugging
#
# Kernel proc information reader
#
# Copyright (c) 2016 Linaro Ltd
#
# Authors:
# Kieran Bingham <kieran.bingham@linaro.org>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import constants
from linux impor... | gpl-2.0 | 6,703,615,393,273,718,000 | 28.974619 | 76 | 0.57392 | false |
alu042/edx-platform | lms/djangoapps/commerce/api/v1/tests/test_models.py | 127 | 1169 | """ Tests for models. """
import ddt
from django.test import TestCase
from commerce.api.v1.models import Course
from course_modes.models import CourseMode
@ddt.ddt
class CourseTests(TestCase):
""" Tests for Course model. """
def setUp(self):
super(CourseTests, self).setUp()
self.course = Cour... | agpl-3.0 | -6,728,835,195,685,870,000 | 34.424242 | 88 | 0.64414 | false |
daler/Pharmacogenomics_Prediction_Pipeline_P3 | doc/custom_dot.py | 4 | 3743 | #!/usr/bin/env python
"""
This script is used to create color-coded sub-DAGs for the documentation. It
is intended to be run from the "doc" directory, and can be triggered by running
the Makefile target "dags".
The "Snakefile" is run with each set of targets defined by the
config.yaml file to create a DAG just for th... | cc0-1.0 | 5,550,019,353,935,272,000 | 32.419643 | 79 | 0.636922 | false |
eadgarchen/tensorflow | tensorflow/python/keras/_impl/keras/applications/vgg16_test.py | 34 | 1854 | # 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 | 5,378,636,519,997,943,000 | 36.08 | 80 | 0.653182 | false |
Goldmund-Wyldebeast-Wunderliebe/django-diazo | django_diazo/migrations/0006_auto__del_field_theme_rules.py | 1 | 1188 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Theme.rules'
db.delete_column(u'django_diazo_theme', 'rules')
def backwards(self, or... | gpl-2.0 | -3,635,442,617,813,358,600 | 35.030303 | 107 | 0.570707 | false |
TRox1972/youtube-dl | youtube_dl/extractor/tmz.py | 65 | 2138 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class TMZIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?tmz\.com/videos/(?P<id>[^/?#]+)'
_TESTS = [{
'url': 'http://www.tmz.com/videos/0_okj015ty/',
'md5': '4d22a51ef205b6c06395d8394f72d560',
... | unlicense | 3,327,143,484,497,251,300 | 37.178571 | 158 | 0.556127 | false |
molobrakos/home-assistant | homeassistant/components/tts/__init__.py | 5 | 18394 | """Provide functionality to TTS."""
import asyncio
import ctypes
import functools as ft
import hashlib
import io
import logging
import mimetypes
import os
import re
from aiohttp import web
import voluptuous as vol
from homeassistant.components.http import HomeAssistantView
from homeassistant.components.media_player.c... | apache-2.0 | -8,622,812,412,565,154,000 | 32.262206 | 79 | 0.589703 | false |
pattisdr/osf.io | api_tests/base/test_throttling.py | 12 | 4553 | import pytest
import mock
from nose.tools import * # noqa:
from api.base.settings.defaults import API_BASE
from tests.base import ApiTestCase
from osf_tests.factories import AuthUserFactory, ProjectFactory
pytestmark = pytest.mark.skip(
'Unskip when throttling no longer fails on travis'
)
class TestDefaultTh... | apache-2.0 | -4,538,266,719,362,038,000 | 34.570313 | 78 | 0.635625 | false |
MER-GROUP/intellij-community | python/helpers/pydev/pydevd_attach_to_process/winappdbg/win32/shlwapi.py | 102 | 25807 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Mario Vilas
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above... | apache-2.0 | 4,083,409,140,656,396,300 | 33.136243 | 130 | 0.716899 | false |
DiptoDas8/Biponi | lib/python2.7/site-packages/braintree/customer.py | 4 | 8252 | import warnings
from braintree.util.http import Http
from braintree.successful_result import SuccessfulResult
from braintree.error_result import ErrorResult
from braintree.resource import Resource
from braintree.apple_pay_card import ApplePayCard
from braintree.android_pay_card import AndroidPayCard
from braintree.cred... | mit | 3,906,334,837,939,841,500 | 36.680365 | 172 | 0.623364 | false |
ptthiem/nose2 | nose2/plugins/loader/discovery.py | 2 | 9459 | """
Discovery-based test loader.
This plugin implements nose2's automatic test module discovery. It
looks for test modules in packages and directories whose names start
with ``test``, then fires the :func:`loadTestsFromModule` hook for each
one to allow other plugins to load the actual tests.
It also fires :func:`han... | bsd-2-clause | 5,086,451,804,364,445,000 | 36.685259 | 91 | 0.598266 | false |
watonyweng/nova | nova/tests/functional/v3/test_assisted_volume_snapshots.py | 3 | 2837 | # Copyright 2014 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 | -23,076,938,101,291,212 | 39.528571 | 78 | 0.638703 | false |
magnunor/hyperspy | hyperspy/drawing/_markers/vertical_line.py | 2 | 2501 | # -*- coding: utf-8 -*-
# Copyright 2007-2016 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | gpl-3.0 | 2,010,444,586,523,815,200 | 33.260274 | 78 | 0.62415 | false |
sagar30051991/ozsmart-erp | erpnext/accounts/doctype/sales_invoice/pos.py | 11 | 2008 | # 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
@frappe.whitelist()
def get_items(price_list, sales_or_purchase, item=None):
condition = ""
order_by = ""
args = {"price_list": price_... | agpl-3.0 | 1,180,276,323,803,452,700 | 34.857143 | 131 | 0.655378 | false |
elkingtonmcb/pattern | pattern/text/en/__init__.py | 21 | 7122 | #### PATTERN | EN ##################################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2010 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
############... | bsd-3-clause | -7,759,941,430,803,032,000 | 32.441315 | 103 | 0.594496 | false |
DerekSelander/LLDB | lldb_commands/ddp.py | 1 | 5995 | # MIT License
# Copyright (c) 2020 Derik Ramirez
# 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 Software without restriction, including without limitation the rights
# to use, copy, modify, merge, ... | gpl-2.0 | 2,620,899,044,712,962,000 | 40.061644 | 147 | 0.682902 | false |
bpsinc-native/src_third_party_scons-2.0.1 | engine/SCons/Script/Interactive.py | 61 | 14083 | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# 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 Software without restriction, including
# without li... | mit | 7,539,678,498,714,765,000 | 35.674479 | 95 | 0.564652 | false |
kvikshaug/pitcoin | pitcoin/script_opcodes.py | 1 | 1964 | # push value
OP_0 = 0x00
OP_FALSE = OP_0
OP_PUSHDATA1 = 0x4c
OP_PUSHDATA2 = 0x4d
OP_PUSHDATA4 = 0x4e
OP_1NEGATE = 0x4f
OP_RESERVED = 0x50
OP_1 = 0x51
OP_TRUE = OP_1
OP_2 = 0x52
OP_3 = 0x53
OP_4 = 0x54
OP_5 = 0x55
OP_6 = 0x56
OP_7 = 0x57
OP_8 = 0x58
OP_9 = 0x59
OP_10 = 0x5a
OP_11 = 0x5b
OP_12 = 0x5c
OP_13 = 0x5d
OP_14 =... | bsd-3-clause | -6,319,670,180,739,713,000 | 14.224806 | 29 | 0.690937 | false |
gojira/tensorflow | tensorflow/contrib/learn/python/learn/preprocessing/__init__.py | 42 | 1263 | # 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 | -5,239,401,738,080,608,000 | 41.1 | 93 | 0.731591 | false |
ravello/ansible-modules-extras | system/filesystem.py | 38 | 3422 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Alexander Bulimov <lazywolf0@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of t... | gpl-3.0 | 4,540,582,482,095,232,000 | 27.756303 | 111 | 0.62595 | false |
pycket/pycket | pycket/test/test_impersonators.py | 4 | 23872 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from pycket.test.testhelper import *
from pycket.values import *
from pycket.impersonators import *
from pycket.values_struct import *
import pytest
import sys
sys.setrecursionlimit(10000)
def test_impersonator_properties():
m = run_mod(
"""
#lang pycket
... | mit | -187,810,844,133,613,220 | 33.887427 | 146 | 0.568747 | false |
schryer/schryer_pelican_blog | add_links.py | 1 | 6919 | # -*- coding: utf-8 -*-
import os
import glob
import argparse
def make_argument_parser():
'''Returns argument parser for this script.
'''
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
description='''
This script adds links to e... | cc0-1.0 | 5,644,336,812,752,436,000 | 40.431138 | 142 | 0.602977 | false |
kpi-petitions/project-y | kpiedemocracy/settings.py | 1 | 4892 | """
Django settings for kpiedemocracy project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Buil... | apache-2.0 | 7,561,111,616,836,103,000 | 23.707071 | 82 | 0.657195 | false |
dennybaa/st2 | st2actions/st2actions/runners/httprunner.py | 2 | 9655 | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | apache-2.0 | -6,296,131,690,829,538,000 | 33.855596 | 95 | 0.606422 | false |
StuartLittlefair/astropy | astropy/coordinates/tests/test_solar_system.py | 1 | 19799 | import os
import pytest
import numpy as np
from urllib.error import HTTPError
from astropy.time import Time
from astropy import units as u
from astropy.constants import c
from astropy.coordinates.builtin_frames import GCRS, TETE
from astropy.coordinates.earth import EarthLocation
from astropy.coordinates.sky_coordina... | bsd-3-clause | 6,908,687,975,415,543,000 | 41.854978 | 100 | 0.634982 | false |
google/firmata.py | tests/test_io.py | 1 | 14001 | # Copyright 2013 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 a... | apache-2.0 | 4,546,545,956,532,802,000 | 43.447619 | 160 | 0.664595 | false |
elmer/smart-gitosis | gitosis/serve.py | 2 | 8691 | """
Enforce git-shell to only serve allowed by access control policy.
directory. The client should refer to them without any extra directory
prefix. Repository names are forced to match ALLOW_RE.
"""
import logging
import sys, os, re
from gitosis import access
from gitosis import repository
from gitosis import gitwe... | gpl-2.0 | -1,873,621,729,972,391,700 | 27.778146 | 128 | 0.584052 | false |
jhoenicke/python-trezor | trezorlib/tests/device_tests/test_msg_verifymessage_segwit.py | 3 | 4567 | # This file is part of the Trezor project.
#
# Copyright (C) 2012-2018 SatoshiLabs and contributors
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software Foundation.
#
# This library is distrib... | lgpl-3.0 | 7,067,159,919,425,738,000 | 38.713043 | 265 | 0.66455 | false |
ankurankan/scikit-learn | sklearn/manifold/tests/test_locally_linear.py | 41 | 4827 | from itertools import product
from nose.tools import assert_true
import numpy as np
from numpy.testing import assert_almost_equal, assert_array_almost_equal
from scipy import linalg
from sklearn import neighbors, manifold
from sklearn.manifold.locally_linear import barycenter_kneighbors_graph
from sklearn.utils.testi... | bsd-3-clause | -3,720,272,111,138,387,500 | 36.710938 | 76 | 0.597265 | false |
finik/git-repo | pager.py | 86 | 2051 | #
# Copyright (C) 2008 The Android Open Source 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -6,577,236,019,227,000,000 | 23.129412 | 74 | 0.666504 | false |
40223119/2015cda | static/Brython3.1.1-20150328-091302/Lib/html/parser.py | 737 | 19605 | """A parser for HTML and XHTML."""
# This file is based on sgmllib.py, but the API is slightly different.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are special)
# and CDAT... | gpl-3.0 | 9,076,539,070,056,990,000 | 35.851504 | 80 | 0.486458 | false |
schlueter/ansible | test/units/vars/test_variable_manager.py | 73 | 11541 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | 1,353,306,367,697,591,600 | 36.839344 | 98 | 0.616238 | false |
wathsalav/xos | xos/importer/plclassic/site_importer.py | 1 | 1266 | from core.models import Site
class SiteImporter:
def __init__(self, api):
self.api = api
self.remote_sites = {}
self.local_sites = {}
def run(self):
db_sites = Site.objects.all()
for db_site in db_sites:
self.local_sites[db_site.login_base] = db_site
... | apache-2.0 | 4,263,458,648,080,934,000 | 37.363636 | 74 | 0.468404 | false |
bootandy/sqlalchemy | test/aaa_profiling/test_resultset.py | 23 | 4577 | from sqlalchemy import MetaData, Table, Column, String, Unicode, Integer, \
create_engine
from sqlalchemy.testing import fixtures, AssertsExecutionResults, profiling
from sqlalchemy import testing
from sqlalchemy.testing import eq_
from sqlalchemy.util import u
from sqlalchemy.engine.result import RowProxy
import s... | mit | -6,199,389,195,100,990,000 | 29.311258 | 77 | 0.556915 | false |
dannyperry571/theapprentice | script.module.liveresolver/lib/liveresolver/resolvers/castamp.py | 10 | 1405 | # -*- coding: utf-8 -*-
import re,urllib,urlparse,base64
from liveresolver.modules import client,constants
from liveresolver.modules.log_utils import log
def resolve(url):
try:
id = urlparse.parse_qs(urlparse.urlparse(url).query)['c'][0]
try:
referer = urlparse.parse_qs(urlparse.urlp... | gpl-2.0 | -4,966,119,015,298,726,000 | 39.142857 | 178 | 0.535943 | false |
craffel/mir_eval | tests/mpl_ic.py | 3 | 12171 | # CREATED:2015-02-17 14:41:28 by Brian McFee <brian.mcfee@nyu.edu>
# this function is lifted wholesale from matploblib v1.4.2,
# and modified so that images are stored explicitly under the tests path
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import si... | mit | -5,841,376,158,784,029,000 | 33.478754 | 79 | 0.582943 | false |
zheguang/voltdb | src/catgen/catalog_utils/__init__.py | 2 | 1341 | #!/usr/bin/env python
# This file is part of VoltDB.
# Copyright (C) 2008-2014 VoltDB 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 you... | agpl-3.0 | -8,746,882,225,997,521,000 | 35.243243 | 74 | 0.683072 | false |
rupace10/mysql-connector-python | tests/test_setup.py | 12 | 5048 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... | gpl-2.0 | -676,337,209,126,697,600 | 34.801418 | 78 | 0.625198 | false |
mattcongy/itshop | docker-images/taigav2/taiga-back/taiga/projects/custom_attributes/migrations/0003_triggers_on_delete_customattribute.py | 28 | 4785 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('custom_attributes', '0002_issuecustomattributesvalues_taskcustomattributesvalues_userstorycustomattributesvalues'),
]
operations = [... | mit | -4,439,169,307,883,134,500 | 48.84375 | 125 | 0.498851 | 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.