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 |
|---|---|---|---|---|---|---|---|---|---|---|
ml-lab/neon | neon/diagnostics/visualize_rnn.py | 4 | 6174 | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems 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.o... | apache-2.0 | 4,156,699,950,637,713,000 | 39.090909 | 79 | 0.535471 | false |
takis/django | tests/resolve_url/tests.py | 199 | 3167 | from __future__ import unicode_literals
from django.contrib.auth.views import logout
from django.core.urlresolvers import NoReverseMatch, reverse_lazy
from django.shortcuts import resolve_url
from django.test import SimpleTestCase, ignore_warnings, override_settings
from django.utils import six
from django.utils.depre... | bsd-3-clause | -2,160,599,311,070,732,500 | 34.188889 | 79 | 0.628355 | false |
stimpsonsg/moose | gui/gui/CommentEditor.py | 8 | 1534 | #!/usr/bin/python
try:
from PyQt4 import QtCore, QtGui
QtCore.Signal = QtCore.pyqtSignal
QtCore.Slot = QtCore.pyqtSlot
except ImportError:
try:
from PySide import QtCore, QtGui
QtCore.QString = str
except ImportError:
raise ImportError("Cannot load either PyQt or PySide")
... | lgpl-2.1 | 2,651,596,455,769,878,000 | 26.392857 | 95 | 0.65189 | false |
ratschlab/RGAN | eICU_tstr_evaluation.py | 1 | 8268 | import data_utils
import pandas as pd
import numpy as np
import tensorflow as tf
import math, random, itertools
import pickle
import time
import json
import os
import math
import data_utils
import pickle
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, precision_score, rec... | mit | 184,687,565,268,853,280 | 32.75102 | 144 | 0.697388 | false |
cyisfor/Python-Markdown | markdown/extensions/extra.py | 122 | 5547 | """
Python-Markdown Extra Extension
===============================
A compilation of various Python-Markdown extensions that imitates
[PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/).
Note that each of the individual extensions still need to be available
on your PYTHONPATH. This extension simply ... | bsd-3-clause | -4,391,257,087,335,375,400 | 41.022727 | 78 | 0.632414 | false |
360youlun/cmsplugin-bootstrap-carousel | cmsplugin_bootstrap_carousel/migrations/0002_auto__add_field_carouselitem_button_title__add_field_carouselitem_butt.py | 1 | 4403 | # -*- 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 'CarouselItem.button_title'
db.add_column(u'cmsplugin_boot... | bsd-3-clause | 4,345,188,735,798,274,000 | 61.914286 | 157 | 0.583239 | false |
aperigault/ansible | lib/ansible/module_utils/network/f5/urls.py | 60 | 4623 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
try:
from library.module_utils.network.f5.common import F5M... | gpl-3.0 | 2,141,585,248,126,525,400 | 36.893443 | 97 | 0.522388 | false |
geminateCoder/Character-Archive-Website | Lib/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py | 2801 | 1782 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | cc0-1.0 | 7,990,987,862,373,303,000 | 39.5 | 76 | 0.709877 | false |
markflorisson/blaze-core | blaze/compute/air/frontend/ckernel_impls.py | 6 | 1562 | # -*- coding: utf-8 -*-
"""
Lift ckernels to their appropriate rank so they always consume the full array
arguments.
"""
from __future__ import absolute_import, division, print_function
from pykit.ir import transform, Op
#------------------------------------------------------------------------
# Run
#--------------... | bsd-3-clause | -5,970,998,405,474,794,000 | 31.541667 | 77 | 0.482074 | false |
zzicewind/nova | nova/tests/unit/pci/test_utils.py | 44 | 7119 | # Copyright (c) 2013 Intel, Inc.
# Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/li... | apache-2.0 | -1,701,311,397,965,207,300 | 35.88601 | 78 | 0.638292 | false |
komsas/OpenUpgrade | addons/stock_landed_costs/product.py | 364 | 1611 | # -*- 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 | -2,926,539,192,814,421,000 | 34.8 | 78 | 0.60211 | false |
jhcepas/ete | ete3/tools/ete_build_lib/task/trimal.py | 4 | 4158 | # -*- coding: utf-8 -*-
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public Licen... | gpl-3.0 | 2,918,170,234,741,428,700 | 36.459459 | 125 | 0.600289 | false |
kangkot/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/Demos/security/set_file_owner.py | 34 | 2045 | fname=r'h:\tmp.txt'
import win32security,win32file,win32api,ntsecuritycon,win32con
new_privs = ((win32security.LookupPrivilegeValue('',ntsecuritycon.SE_SECURITY_NAME),win32con.SE_PRIVILEGE_ENABLED),
(win32security.LookupPrivilegeValue('',ntsecuritycon.SE_SHUTDOWN_NAME),win32con.SE_PRIVILEGE_ENABLED),
... | apache-2.0 | 8,461,893,031,772,759,000 | 52.815789 | 156 | 0.785819 | false |
ltilve/chromium | media/PRESUBMIT.py | 21 | 6977 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for Chromium media component.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details abo... | bsd-3-clause | -5,019,829,396,670,538,000 | 38.868571 | 80 | 0.670632 | false |
jim-thisplace/exercises-in-programming-style | 29-dataspaces/tf-29.py | 17 | 1558 | #!/usr/bin/env python
import re, sys, operator, Queue, threading
# Two data spaces
word_space = Queue.Queue()
freq_space = Queue.Queue()
stopwords = set(open('../stop_words.txt').read().split(','))
# Worker function that consumes words from the word space
# and sends partial results to the frequency space
def proces... | mit | 8,532,222,993,943,636,000 | 28.961538 | 92 | 0.621309 | false |
miyosuda/intro-to-dl-android | ImageClassification/jni-build/jni/include/tensorflow/python/kernel_tests/fifo_queue_test.py | 3 | 39552 | # 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 a... | apache-2.0 | 8,018,380,447,867,938,000 | 34.032772 | 80 | 0.603181 | false |
kemaswill/keras | keras/regularizers.py | 5 | 4694 | from __future__ import absolute_import
from . import backend as K
class Regularizer(object):
def set_param(self, p):
self.p = p
def set_layer(self, layer):
self.layer = layer
def __call__(self, loss):
return loss
def get_config(self):
return {'name': self.__class__._... | mit | -5,540,997,221,737,474,000 | 30.931973 | 116 | 0.566894 | false |
Batterfii/django | tests/auth_tests/test_templates.py | 328 | 2785 | from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.contrib.auth.views import (
password_change, password_change_done, password_reset,
password_reset_complete, password_reset_confirm, password_res... | bsd-3-clause | 6,447,871,748,114,101,000 | 47.859649 | 107 | 0.711311 | false |
jondo/shogun | examples/undocumented/python_modular/graphical/converter_jade_bss.py | 26 | 1089 | """
Blind Source Separation using the Jade Algorithm with Shogun
Based on the example from scikit-learn
http://scikit-learn.org/
Kevin Hughes 2013
"""
import numpy as np
import pylab as pl
from modshogun import RealFeatures
from modshogun import Jade
# Generate sample data
np.random.seed(0)
n_samples = 2000
time... | gpl-3.0 | -7,365,081,487,775,130,000 | 18.105263 | 60 | 0.677686 | false |
LarsFronius/ansible | lib/ansible/plugins/callback/foreman.py | 20 | 7129 | # -*- coding: utf-8 -*-
# (C) 2015, 2016 Daniel Lobato <elobatocs@gmail.com>
# 2016 Guido Günther <agx@sigxcpu.org>
#
# 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 Foundati... | gpl-3.0 | 2,600,363,873,120,758,000 | 35 | 83 | 0.574214 | false |
fanghuaqi/mbed | tools/flash_algo/extract.py | 31 | 3546 | #!/usr/bin/env python
"""
mbed
Copyright (c) 2017-2017 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 applicab... | apache-2.0 | 2,842,470,524,662,760,000 | 32.140187 | 77 | 0.625776 | false |
ralphtheninja/compose | tests/integration/cli_test.py | 9 | 20973 | from __future__ import absolute_import
from operator import attrgetter
import sys
import os
import shlex
from six import StringIO
from mock import patch
from .testcases import DockerClientTestCase
from compose.cli.main import TopLevelCommand
from compose.project import NoSuchService
class CLITestCase(DockerClientTe... | apache-2.0 | 1,343,260,207,027,971,800 | 40.043053 | 101 | 0.626377 | false |
HydrelioxGitHub/home-assistant | homeassistant/components/meteo_france/__init__.py | 3 | 4108 | """Support for Meteo-France weather data."""
import datetime
import logging
import voluptuous as vol
from homeassistant.const import CONF_MONITORED_CONDITIONS, TEMP_CELSIUS
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.discovery import load_platform
from homeassistant.util import Thr... | apache-2.0 | 505,188,131,546,163,800 | 30.274809 | 77 | 0.619234 | false |
lashwang/pyspider | tests/test_database.py | 5 | 23410 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-02-08 22:37:13
from __future__ import unicode_literals, division
import os
import six
import time
import unittest2 as unittest
from pyspider import ... | apache-2.0 | 517,360,827,569,604,400 | 33.96861 | 125 | 0.634564 | false |
directorlive/oppia | core/controllers/recent_commits.py | 33 | 2031 | # Copyright 2014 The Oppia 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 applicable ... | apache-2.0 | -5,916,595,727,925,072,000 | 37.320755 | 76 | 0.669621 | false |
sandipbgt/nodeshot | setup.py | 8 | 1542 | #!/usr/bin/env python
from setuptools import setup, find_packages
from nodeshot import get_version
def get_install_requires():
"""
parse requirements.txt, ignore links, exclude comments
"""
requirements = []
for line in open('requirements.txt').readlines():
# skip to next iteration if comm... | gpl-3.0 | -6,299,887,426,704,017,000 | 33.266667 | 104 | 0.648508 | false |
aznashwan/heat2arm | heat2arm/translators/instances/nova_server.py | 1 | 2931 | # Copyright 2015 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | 1,305,231,403,946,624,800 | 33.892857 | 78 | 0.655067 | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/express_route_circuit_stats.py | 8 | 1682 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -6,749,520,567,871,143,000 | 41.05 | 117 | 0.634364 | false |
dulems/hue | desktop/core/ext-py/tablib-develop/tablib/packages/odf3/number.py | 56 | 3137 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# 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.1 of the License, or (at you... | apache-2.0 | 5,794,709,919,981,279,000 | 29.153846 | 80 | 0.69037 | false |
JFriel/honours_project | networkx/networkx/algorithms/approximation/vertex_cover.py | 63 | 2088 | # -*- coding: utf-8 -*-
"""
************
Vertex Cover
************
Given an undirected graph `G = (V, E)` and a function w assigning nonnegative
weights to its vertices, find a minimum weight subset of V such that each edge
in E is incident to at least one vertex in the subset.
http://en.wikipedia.org/wiki/Vertex_cov... | gpl-3.0 | 7,610,989,381,500,838,000 | 31.092308 | 78 | 0.643816 | false |
home-assistant/home-assistant | tests/testing_config/custom_components/test/light.py | 2 | 1589 | """
Provide a mock light platform.
Call init before using it in your tests to ensure clean test data.
"""
from homeassistant.components.light import LightEntity
from homeassistant.const import STATE_OFF, STATE_ON
from tests.common import MockToggleEntity
ENTITIES = []
def init(empty=False):
"""Initialize the p... | apache-2.0 | 417,064,470,412,643,000 | 22.367647 | 66 | 0.565765 | false |
corpnewt/CorpBot.py | Cogs/Errors.py | 1 | 1559 | import asyncio
import discord
import sys
import traceback
from discord.ext import commands
from discord import errors
from Cogs import Message
def setup(bot):
bot.add_cog(Errors())
class Errors(commands.Cog):
def __init__(self):
pass
@commands.Cog.listener()
async def on_command_error(s... | mit | -8,464,887,185,722,327,000 | 35.02381 | 210 | 0.695177 | false |
the-gigi/project-euler | 3/003_largest_prime_factor.py | 1 | 1075 | """Largest Prime Factor
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
"""
from collections import OrderedDict
def find_next_prime(primes):
last = primes[-1]
candidates = OrderedDict((k, 1) for k in range(last + 1, last * 2 + 1))
for p in ... | mit | -3,654,798,669,728,008,700 | 20.5 | 75 | 0.547907 | false |
badock/nova | nova/tests/api/openstack/compute/contrib/test_deferred_delete.py | 4 | 5504 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -4,010,344,135,201,649,000 | 39.77037 | 78 | 0.628452 | false |
verilylifesciences/classifaedes | classifaedes/export.py | 1 | 3902 | # Copyright 2019 Verily Life Sciences LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -154,210,633,739,482,460 | 34.798165 | 77 | 0.705023 | false |
data-exp-lab/girder | plugins/oauth/server/rest.py | 4 | 5537 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | apache-2.0 | 5,318,905,734,232,105,000 | 34.722581 | 85 | 0.603937 | false |
yoelk/kivy | kivy/tests/test_audio.py | 51 | 1744 | '''
Audio tests
===========
'''
import unittest
import os
SAMPLE_FILE = os.path.join(os.path.dirname(__file__), 'sample1.ogg')
SAMPLE_LENGTH = 1.402
DELTA = SAMPLE_LENGTH * 0.01
DELAY = 0.2
class AudioTestCase(unittest.TestCase):
def get_sound(self):
import os
assert os.path.exists(SAMPLE_FILE)... | mit | 1,381,781,630,533,834,800 | 25.424242 | 72 | 0.630161 | false |
clk8908/pymc3 | pymc3/distributions/special.py | 13 | 3420 | '''
Created on Mar 17, 2011
@author: jsalvatier
'''
from theano import scalar, tensor
import numpy
from scipy import special, misc
from .dist_math import *
__all__ = ['gammaln', 'multigammaln', 'psi', 'trigamma', 'factln']
class GammaLn(scalar.UnaryScalarOp):
"""
Compute gammaln(x)
"""
@staticmethod... | apache-2.0 | 8,468,932,575,345,364,000 | 21.207792 | 106 | 0.554386 | false |
experiencecoin/experiencecoin | contrib/devtools/check-doc.py | 53 | 1820 | #!/usr/bin/env python
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
This checks if all command line args are documented.
Return value is 0 to indicate no error.
Author: @Marc... | mit | -7,233,065,859,771,911,000 | 39.444444 | 213 | 0.654945 | false |
stackforge/cloudbase-init | cloudbaseinit/utils/windows/ws2_32.py | 12 | 1708 | # Copyright 2014 Cloudbase Solutions Srl
#
# 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 l... | apache-2.0 | -5,368,393,975,414,180,000 | 27 | 78 | 0.724239 | false |
samarthmed/emacs-config | .python-environments/default/lib/python2.7/site.py | 784 | 27543 | """Append module search paths for third-party packages to sys.path.
****************************************************************
* This module is automatically imported during initialization. *
****************************************************************
In earlier versions of Python (up to 1.5a3), scripts or... | gpl-2.0 | 7,201,976,940,374,427,000 | 35.336412 | 117 | 0.570163 | false |
dwagon/pymoo | moo/game/models.py | 1 | 3173 | from django.db import models
import random
import math
from race.models import Race
class GameSize(models.Model):
name = models.CharField(max_length=50)
numsystems = models.IntegerField(default=10)
max_x = models.IntegerField(default=20)
max_y = models.IntegerField(default=20)
class Game(models.Mode... | gpl-2.0 | 447,984,862,592,508,740 | 27.330357 | 60 | 0.552474 | false |
kiyoto/statsmodels | statsmodels/examples/t_est_rlm.py | 33 | 1127 | # -*- coding: utf-8 -*-
"""
Example from robust test_rlm, fails on Mac
Created on Sun Mar 27 14:36:40 2011
"""
from __future__ import print_function
import numpy as np
import statsmodels.api as sm
RLM = sm.RLM
DECIMAL_4 = 4
DECIMAL_3 = 3
DECIMAL_2 = 2
DECIMAL_1 = 1
from statsmodels.datasets.stackloss import load
d... | bsd-3-clause | 4,487,683,363,733,108,700 | 24.044444 | 65 | 0.704525 | false |
finfish/scrapy | tests/test_downloadermiddleware_httpproxy.py | 2 | 6474 | import os
import sys
from functools import partial
from twisted.trial.unittest import TestCase, SkipTest
from scrapy.downloadermiddlewares.httpproxy import HttpProxyMiddleware
from scrapy.exceptions import NotConfigured
from scrapy.http import Response, Request
from scrapy.spiders import Spider
from scrapy.crawler imp... | bsd-3-clause | -2,924,879,498,070,886,000 | 43.648276 | 102 | 0.637319 | false |
sebfung/yellowpillowcase | vendor/cache/gems/pygments.rb-0.6.3/vendor/simplejson/simplejson/tests/test_tuple.py | 71 | 1842 | import unittest
from StringIO import StringIO
import simplejson as json
class TestTuples(unittest.TestCase):
def test_tuple_array_dumps(self):
t = (1, 2, 3)
expect = json.dumps(list(t))
# Default is True
self.assertEqual(expect, json.dumps(t))
self.assertEqual(expect, json.... | mit | 4,666,317,458,899,060,000 | 36.612245 | 84 | 0.616178 | false |
howepeng/cat | cat-agent/src/main/webapp/paas-monitor.py | 22 | 7135 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
import json
import re
import urllib2
from datetime import datetime
COMMAND_PATTERN = "nsenter --target %s --mount --uts --ipc --net --pid -- %s"
def execute(command):
p = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIP... | apache-2.0 | -6,752,788,449,244,952,000 | 33.138756 | 119 | 0.603083 | false |
wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/IPython/html/terminal/api_handlers.py | 6 | 1298 | import json
from tornado import web, gen
from ..base.handlers import APIHandler, json_errors
from ..utils import url_path_join
class TerminalRootHandler(APIHandler):
@web.authenticated
@json_errors
def get(self):
tm = self.terminal_manager
terms = [{'name': name} for name in tm.terminals]
... | mit | 3,813,568,690,844,094,500 | 28.5 | 72 | 0.617874 | false |
munyirik/python | cpython/Lib/email/message.py | 9 | 45765 | # Copyright (C) 2001-2007 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Basic message object for the email package object model."""
__all__ = ['Message']
import re
import uu
import quopri
import warnings
from io import BytesIO, StringIO
# Intrapackage imports
from email import... | bsd-3-clause | -1,807,882,591,881,800,200 | 38.897995 | 96 | 0.585233 | false |
SwagColoredKitteh/servo | tests/wpt/css-tests/css-text-decor-3_dev/xhtml1print/reference/support/generate-text-emphasis-ruby-tests.py | 829 | 3042 | #!/usr/bin/env python
# - * - coding: UTF-8 - * -
"""
This script generates tests text-emphasis-ruby-001 ~ 004 which tests
emphasis marks with ruby in four directions. It outputs a list of all
tests it generated in the format of Mozilla reftest.list to the stdout.
"""
from __future__ import unicode_literals
TEST_FIL... | mpl-2.0 | 7,033,308,974,888,286,000 | 42.391304 | 201 | 0.633601 | false |
zmike/servo | components/script/dom/bindings/codegen/parser/tests/test_putForwards.py | 142 | 2341 | def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
interface I {
[PutForwards=B] readonly attribute long A;
};
""")
results = parser.finish()
except:
threw = True
harness.ok(threw, "Should have thrown.")
parse... | mpl-2.0 | 8,253,913,350,364,618,000 | 20.878505 | 60 | 0.465186 | false |
web30s/odoo-9.0c-20160402 | hello/templates/openerp/addons/account/wizard/account_report_aged_partner_balance.py | 24 | 1763 | # -*- coding: utf-8 -*-
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
from openerp import api, fields, models, _
from openerp.exceptions import UserError
class AccountAgedTrialBalance(models.TransientModel):
_name = 'account.aged.trial.balance'
_inherit = 'accoun... | gpl-3.0 | 8,760,537,449,349,430,000 | 42 | 135 | 0.609756 | false |
impromptuartist/impromptuartist.github.io | node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/dotnet.py | 94 | 26751 | # -*- coding: utf-8 -*-
"""
pygments.lexers.dotnet
~~~~~~~~~~~~~~~~~~~~~~
Lexers for .net languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, ... | mit | 1,984,150,438,384,094,200 | 38.867362 | 90 | 0.447572 | false |
cortedeltimo/SickRage | lib/mako/pygen.py | 61 | 9952 | # mako/pygen.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""utilities for generating and formatting literal Python code."""
import re
from mako import excep... | gpl-3.0 | 4,617,808,127,890,937,000 | 31.844884 | 79 | 0.548432 | false |
sushantgoel/Flask | Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/_vendor/requests/packages/chardet/compat.py | 2943 | 1157 | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Ian Cordasco - port to Python
#
# 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
# versio... | apache-2.0 | -3,122,168,218,244,358,700 | 33.029412 | 69 | 0.656007 | false |
ping/youtube-dl | youtube_dl/extractor/ynet.py | 64 | 1807 | # coding: utf-8
from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote_plus
class YnetIE(InfoExtractor):
_VALID_URL = r'https?://(?:.+?\.)?ynet\.co\.il/(?:.+?/)?0,7340,(?P<id>L(?:-[0-9]+)+),00\.html'
_TESTS = [
... | unlicense | 6,232,628,829,191,414,000 | 32.730769 | 98 | 0.497719 | false |
ossdemura/django-miniblog | Lib/site-packages/django/contrib/postgres/fields/ranges.py | 109 | 6308 | import json
from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange, Range
from django.contrib.postgres import forms, lookups
from django.db import models
from django.utils import six
from .utils import AttributeSetter
__all__ = [
'RangeField', 'IntegerRangeField', 'BigIntegerRangeField',
'Floa... | mit | 5,687,126,680,121,333,000 | 27.542986 | 98 | 0.653932 | false |
aptivate/ihpresultsweb | ihp/submissions/migrations/0018_auto__add_agencyprofile__add_unique_agencyprofile_agency_language.py | 1 | 20882 | # 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 model 'AgencyProfile'
db.create_table('submissions_agencyprofile', (
('id', self.gf('... | gpl-3.0 | -7,729,627,572,642,085,000 | 75.772059 | 145 | 0.543387 | false |
agaldona/odoomrp-wip-1 | mrp_project_link_mto/__openerp__.py | 10 | 1266 | # -*- coding: utf-8 -*-
##############################################################################
#
# 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 L... | agpl-3.0 | -7,804,172,982,593,342,000 | 36.235294 | 78 | 0.563981 | false |
wenxer/peewee | playhouse/tests/test_apis.py | 19 | 1170 | from peewee import Node
from peewee import *
from playhouse.tests.base import PeeweeTestCase
class TestNodeAPI(PeeweeTestCase):
def test_extend(self):
@Node.extend()
def add(self, lhs, rhs):
return lhs + rhs
n = Node()
self.assertEqual(n.add(4, 2), 6)
delattr(N... | mit | -7,561,303,767,391,358,000 | 28.25 | 72 | 0.596581 | false |
Towerthousand/tvhack | server.py | 1 | 2475 | #!/usr/bin/env python3
from flask import Flask
from flask import jsonify
from flask import render_template
from flask.ext.cors import CORS
from firebase import firebase
app = Flask(__name__)
CORS(app)
firebase = firebase.FirebaseApplication('https://tvhack.firebaseio.com', None)
_calling = False
@app.route('/')
... | mit | -7,619,877,272,132,671,000 | 22.130841 | 78 | 0.632727 | false |
foone/7gen | code/basictexture.py | 1 | 1894 | #!/usr/env python
from error import SaveError,LoadError,CompressedError
from zipfs import fsopen,isZip,GetFileNameInZip
import os
import pygame
class TextureConverter:
def __init__(self,palette=None):
if palette is not None:
self.palette_surf=palette
else:
self.palette_surf=pygame.image.load('code/palette.bm... | gpl-2.0 | 5,942,606,552,221,485,000 | 30.566667 | 75 | 0.722281 | false |
cytec/SickRage | lib/chardet/euckrfreq.py | 342 | 13546 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 | 416,433,358,791,484,700 | 68.466667 | 92 | 0.696663 | false |
haihabi/simpy | simpy/core/tests_configuration.py | 1 | 3303 | from .base_function import read_enum, build_function_input_dict
from simpy.core.result.container import ResultContainer, Result
class TestConfiguration(object):
def __init__(self, name, enable, config_name, overwrite):
if not isinstance(enable, bool):
raise Exception('enable must be a boolean'... | mit | -3,384,892,642,855,937,500 | 34.138298 | 88 | 0.611262 | false |
pataquets/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/web_mock.py | 184 | 2241 | # 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... | bsd-3-clause | -4,405,033,378,034,579,500 | 37.637931 | 78 | 0.727354 | false |
fawazn/Resume-Viewer | ResumeViewer/settings.py | 1 | 2237 | """
Django settings for ResumeView project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE... | mit | 5,723,165,481,105,619,000 | 23.712644 | 71 | 0.691104 | false |
okfn/ofs | setup.py | 1 | 1171 | from setuptools import setup, find_packages
try:
fo = open('README.rst')
long_description = fo.read()
except:
long_description="""OFS - provides plugin-orientated low-level blobstore. """,
finally:
fo.close()
setup(
name="ofs",
version="0.4.3",
description="OFS - provides plugin-orientated... | mit | 53,485,295,088,569,420 | 30.648649 | 82 | 0.684885 | false |
goyalankit/po-compiler | object_files/networkx-1.8.1/networkx/algorithms/connectivity/connectivity.py | 21 | 20381 | # -*- coding: utf-8 -*-
"""
Flow based connectivity algorithms
"""
import itertools
import networkx as nx
__author__ = '\n'.join(['Jordi Torrents <jtorrents@milnou.net>'])
__all__ = [ 'average_node_connectivity',
'local_node_connectivity',
'node_connectivity',
'local_edge_connectiv... | apache-2.0 | -8,427,922,534,663,341,000 | 32.576606 | 88 | 0.618959 | false |
RJVB/audacity | lib-src/lv2/sord/waflib/Logs.py | 134 | 4714 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os,re,traceback,sys
try:
import threading
except ImportError:
pass
else:
wlock=threading.Lock()
class sync_stream(object):
def __init__(self,stream):
self.stre... | gpl-2.0 | -7,297,165,476,239,302,000 | 25.784091 | 228 | 0.68286 | false |
xyyangkun/git-repo | subcmds/help.py | 23 | 5249 | #
# 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 | 8,828,714,842,065,362,000 | 28.488764 | 94 | 0.596685 | false |
keedio/hue | desktop/core/ext-py/python-openid-2.2.5/openid/test/test_association.py | 85 | 6439 | from openid.test import datadriven
import unittest
from openid.message import Message, BARE_NS, OPENID_NS, OPENID2_NS
from openid import association
import time
from openid import cryptutil
import warnings
class AssociationSerializationTest(unittest.TestCase):
def test_roundTrip(self):
issued = int(time.... | apache-2.0 | -2,020,375,773,662,696,000 | 34.185792 | 75 | 0.601802 | false |
jonparrott/gcloud-python | dlp/docs/conf.py | 3 | 10194 | # -*- coding: utf-8 -*-
#
# google-cloud-dlp documentation build configuration file
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that ... | apache-2.0 | -548,096,411,997,857,200 | 31.883871 | 79 | 0.706494 | false |
korrosivesec/crits | crits/core/management/commands/get_duplicate_targets.py | 23 | 2145 | from bson import Code
from django.core.management.base import BaseCommand
from optparse import make_option
from crits.emails.email import Email
from crits.targets.target import Target
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--delete',
'-d',
... | mit | -734,066,303,281,574,500 | 29.211268 | 87 | 0.456876 | false |
dims/heat | heat/engine/constraint/common_constraints.py | 3 | 2856 | #
# 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 | 2,391,320,653,362,171,000 | 27.277228 | 78 | 0.645308 | false |
midori1/midorinoblog | site-packages/django/contrib/gis/measure.py | 93 | 12310 | # Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
# 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,
#... | apache-2.0 | -5,187,531,898,122,543,000 | 35.966967 | 112 | 0.584484 | false |
tensorflow/models | official/recommendation/ncf_common.py | 1 | 12278 | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,756,908,630,323,899,000 | 33.880682 | 80 | 0.662812 | false |
Salandora/OctoPrint | tests/server/util/test_webassets.py | 3 | 1112 | # coding=utf-8
"""
Unit tests for ``octoprint.server.util.flask``.
"""
from __future__ import absolute_import
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2016 The OctoPrint Project - Released under t... | agpl-3.0 | -3,710,204,959,848,737,300 | 36 | 132 | 0.696396 | false |
Vvucinic/Wander | venv_2_7/lib/python2.7/site-packages/pandas/core/indexing.py | 9 | 64500 | # pylint: disable=W0223
from pandas.core.index import Index, MultiIndex
from pandas.compat import range, zip
import pandas.compat as compat
import pandas.core.common as com
from pandas.core.common import (is_bool_indexer, is_integer_dtype,
_asarray_tuplesafe, is_list_like, isnull,
... | artistic-2.0 | -3,756,945,072,343,831,000 | 33.733441 | 120 | 0.523101 | false |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/sympy/physics/vector/frame.py | 1 | 27712 | from sympy import (diff, trigsimp, expand, sin, cos, solve, Symbol, sympify,
eye, ImmutableMatrix as Matrix)
from sympy.core.compatibility import string_types, u
from sympy.physics.vector.vector import Vector, _check_vector
__all__ = ['CoordinateSym', 'ReferenceFrame']
class CoordinateSym(Symbol):... | gpl-3.0 | 1,754,418,600,326,618,600 | 36.347709 | 90 | 0.530456 | false |
yosshy/nova | nova/virt/driver.py | 29 | 58892 | # Copyright 2011 Justin Santa Barbara
# 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 | 5,705,245,557,200,438,000 | 39.281806 | 79 | 0.636249 | false |
zsjohny/jumpserver | apps/perms/utils/database_app_permission.py | 1 | 2832 | # coding: utf-8
#
from django.utils.translation import ugettext as _
from django.db.models import Q
from orgs.utils import set_to_root_org
from ..models import DatabaseAppPermission
from common.tree import TreeNode
from applications.models import DatabaseApp
from assets.models import SystemUser
__all__ = [
'Dat... | gpl-2.0 | -8,469,248,723,224,852,000 | 27.32 | 74 | 0.626059 | false |
dongjoon-hyun/spark | python/pyspark/tests/test_daemon.py | 23 | 2950 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 4,872,231,066,018,637,000 | 34.542169 | 87 | 0.679322 | false |
nirzari18/Query-Analysis-Application-on-Google-App-Engine_Extension | lib/simplejson/tests/test_bigint_as_string.py | 122 | 2238 | from unittest import TestCase
import simplejson as json
class TestBigintAsString(TestCase):
# Python 2.5, at least the one that ships on Mac OS X, calculates
# 2 ** 53 as 0! It manages to calculate 1 << 53 correctly.
values = [(200, 200),
((1 << 53) - 1, 9007199254740991),
((1... | apache-2.0 | -6,286,807,250,610,201,000 | 32.402985 | 69 | 0.447274 | false |
curiosityio/taiga-docker | taiga-back/taiga-back/taiga/projects/notifications/mixins.py | 2 | 10277 | # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can redistribute it and/or mo... | mit | -4,441,189,852,457,946,600 | 34.926573 | 103 | 0.667835 | false |
shi2wei3/virt-test | virttest/storage.py | 6 | 21105 | """
Classes and functions to handle storage devices.
This exports:
- two functions for get image/blkdebug filename
- class for image operates and basic parameters
"""
import logging
import os
import shutil
import re
from autotest.client import utils
try:
from virttest import iscsi
except ImportError:
from ... | gpl-2.0 | -7,251,056,142,510,471,000 | 38.228625 | 79 | 0.56399 | false |
iMyon/imageFilter | includes/uiControl.py | 1 | 2301 | #!/usr/bin/python
#coding:utf-8
#Filename: test.py
#Created: 2014-01-02 02:45:15
#Author: Myon, myon.cn@gmail.com
from PyQt4 import QtGui,QtCore
from mainwindow import Ui_MainWindow
from PyQt4.QtCore import *
from filter import filterImages
class Widget(QtGui.QMainWindow, Ui_MainWindow):
"""QtGui.QWidget和界面设计时选择的类型... | gpl-2.0 | -3,002,598,958,445,188,000 | 28.785714 | 112 | 0.751559 | false |
home-assistant/home-assistant | homeassistant/components/hue/sensor.py | 2 | 4083 | """Hue sensor entities."""
from aiohue.sensors import (
TYPE_ZLL_LIGHTLEVEL,
TYPE_ZLL_ROTARY,
TYPE_ZLL_SWITCH,
TYPE_ZLL_TEMPERATURE,
)
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorEntity
from homeassistant.const import (
DEVICE_CLASS_BATTERY,
DEVICE_CLASS_ILLUMINAN... | apache-2.0 | -2,351,362,010,555,407,000 | 29.699248 | 95 | 0.638256 | false |
dragon/dr_months_calendar | drCalendar.py | 1 | 4598 | import sublime, sublime_plugin, locale, datetime
import calendar,locale,sys
# view.run_command("dr_calendar_insert_month")
def add_month(y,m,x):
r_m = m + x
r_y = y
if (r_m < 1):
r_y -= 1
r_m = 12
if (r_m > 12):
r_m = 1
r_y += 1
r... | mit | -655,033,843,156,563,300 | 32.318841 | 100 | 0.571988 | false |
sicily/qt4.8.4 | src/3rdparty/webkit/Source/ThirdParty/gyp/pylib/gyp/MSVSSettings_test.py | 12 | 65283 | #!/usr/bin/python
# Copyright (c) 2011 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.
""" Unit tests for the MSVSSettings.py file. """
import sys
import unittest
import MSVSSettings
import StringIO
class TestSequenceFunctions(... | lgpl-2.1 | -7,910,920,124,600,184,000 | 43.169147 | 80 | 0.558095 | false |
buildbot/buildbot | worker/buildbot_worker/test/util/sourcecommand.py | 17 | 3389 | # This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | 5,717,326,681,975,649,000 | 37.511364 | 83 | 0.629979 | false |
schlueter/ansible | lib/ansible/modules/network/avi/avi_cluster.py | 15 | 3916 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
ANSIB... | gpl-3.0 | -30,702,878,865,125,536 | 30.837398 | 113 | 0.611083 | false |
jelly/calibre | src/calibre/gui2/device.py | 2 | 88912 | from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
# Imports {{{
import os, traceback, Queue, time, cStringIO, re, sys, weakref
from threading import Thread, Event
from PyQt5.Qt import (
QMenu, QAction, QActionGroup, QIcon, Qt, pyqtSignal, ... | gpl-3.0 | -3,446,028,992,551,313,000 | 43.190855 | 120 | 0.538229 | false |
sonaht/ansible | lib/ansible/plugins/connection/iocage.py | 44 | 2394 | # based on jail.py (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2016, Stephan Lohse <dev-github@ploek.org>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU Ge... | gpl-3.0 | 4,721,034,647,374,134,000 | 34.731343 | 86 | 0.662072 | false |
youprofit/NewsBlur | apps/analyzer/tfidf.py | 17 | 1878 | #!/usr/bin/env python
"""
The simplest TF-IDF library imaginable.
Add your documents as two-element lists `[docname, [list_of_words_in_the_document]]` with `addDocument(docname, list_of_words)`. Get a list of all the `[docname, similarity_score]` pairs relative to a document by calling `similarities([list_of_words])`.... | mit | 9,063,353,552,194,863,000 | 32.553571 | 253 | 0.57934 | false |
maxadamski/swift-corelibs-foundation | lib/product.py | 5 | 7497 | # 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 | 387,776,829,725,781,440 | 32.77027 | 236 | 0.632786 | false |
NeCTAR-RC/nova | nova/api/openstack/compute/legacy_v2/ips.py | 78 | 1929 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | 5,100,317,228,942,981,000 | 36.096154 | 78 | 0.699326 | false |
J861449197/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py | 91 | 7866 | """
Tests to verify correct number of MongoDB calls during course import/export and traversal
when using the Split modulestore.
"""
from tempfile import mkdtemp
from shutil import rmtree
from unittest import TestCase, skip
import ddt
from xmodule.modulestore.xml_importer import import_course_from_xml
from xmodule.mod... | agpl-3.0 | 5,422,810,240,244,577,000 | 48.1625 | 119 | 0.597635 | false |
minlexx/pyevemon | esi_client/models/get_universe_moons_moon_id_internal_server_error.py | 1 | 3107 | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.4.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class GetUniverseMoonsMoonIdInternalServerError(object):
"""... | gpl-3.0 | -3,285,205,257,044,549,000 | 25.555556 | 82 | 0.539749 | false |
knnniggett/weewx | bin/weewx/test/test_templates.py | 6 | 5670 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2009-2015 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
"""Test tag notation for template generation."""
from __future__ import with_statement
import os.path
import shutil
import sys
import syslog
import unittest
import configobj
os... | gpl-3.0 | 1,907,654,356,138,092,000 | 34.660377 | 133 | 0.608818 | false |
becm/meson | run_project_tests.py | 1 | 52296 | #!/usr/bin/env python3
# Copyright 2012-2019 The Meson development team
# 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 | 4,731,378,599,057,081,000 | 39.85625 | 152 | 0.572147 | false |
jamesblunt/psutil | test/_posix.py | 4 | 9932 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""POSIX specific tests. These are implicitly run by test_psutil.py."""
import datetime
import os
import subprocess
import sys
imp... | bsd-3-clause | -915,559,176,048,948,200 | 37.34749 | 79 | 0.567962 | 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.