repo_name stringlengths 5 100 | path stringlengths 4 254 | copies stringlengths 1 5 | size stringlengths 4 7 | content stringlengths 681 1M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,298,349B | line_mean float64 3.5 100 | line_max int64 15 1k | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class | ratio float64 1.5 8.15 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Grarak/grakernel-msm8930 | scripts/gcc-wrapper.py | 364 | 3936 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. 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 th... | gpl-2.0 | -4,037,045,619,782,924,300 | 32.355932 | 97 | 0.663872 | false | 3.77373 | false | false | false |
landryb/QGIS | python/plugins/processing/algs/exampleprovider/ProcessingExampleProviderPlugin.py | 26 | 1655 | # -*- coding: utf-8 -*-
"""
***************************************************************************
__init__.py
---------------------
Date : July 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
********************************... | gpl-2.0 | 6,290,126,447,250,553,000 | 32.1 | 77 | 0.49426 | false | 4.811047 | false | false | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.6/Lib/curses/has_key.py | 81 | 5633 |
#
# Emulation of has_key() function for platforms that don't use ncurses
#
import _curses
# Table mapping curses keys to the terminfo capability name
_capability_names = {
_curses.KEY_A1: 'ka1',
_curses.KEY_A3: 'ka3',
_curses.KEY_B2: 'kb2',
_curses.KEY_BACKSPACE: 'kbs',
_curses.KEY_BEG: 'kbeg',
... | mit | -3,731,281,184,704,951,300 | 28.338542 | 72 | 0.571987 | false | 2.509131 | false | false | false |
PySide/Shiboken | tests/samplebinding/multi_cpp_inheritance_test.py | 6 | 3178 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of the Shiboken Python Bindings Generator project.
#
# Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
#
# Contact: PySide team <contact@pyside.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms... | gpl-2.0 | 8,331,902,494,146,692,000 | 30.78 | 70 | 0.662052 | false | 3.640321 | true | false | false |
bazitur/brackets-python-tools | pythonfiles/parso/python/token.py | 2 | 1777 | from __future__ import absolute_import
from itertools import count
from token import *
from parso._compatibility import py_version
_counter = count(N_TOKENS)
# Never want to see this thing again.
del N_TOKENS
COMMENT = next(_counter)
tok_name[COMMENT] = 'COMMENT'
NL = next(_counter)
tok_name[NL] = 'NL'
# Sets the... | mit | -2,425,001,939,370,699,300 | 16.086538 | 79 | 0.665729 | false | 2.889431 | false | false | false |
glaubitz/fs-uae-debian | arcade/launcher/settings/settings_header.py | 2 | 1384 | import fsui
from fsbc.util import unused
from launcher.ui.skin import Skin
class SettingsHeader(fsui.Group):
ICON_LEFT = 0
ICON_RIGHT = 1
def __init__(
self, parent, icon, title, subtitle="", icon_position=ICON_RIGHT
):
unused(subtitle)
fsui.Group.__init__(self, parent)
... | gpl-2.0 | -7,743,135,693,777,367,000 | 30.454545 | 72 | 0.567197 | false | 3.51269 | false | false | false |
djw8605/htcondor | src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/find_chat.py | 10 | 4722 | #! /usr/bin/python
#
# Displays all multi-chats and allows to open them.
#
# (c) Copyright 2007, Vincent Oberle, vincent@oberle.org
#
# This software may be used and distributed according to the terms
# of the GNU Public License, incorporated herein by reference.
import sys
import re
from optparse import OptionParser... | apache-2.0 | 1,836,465,713,021,663,000 | 28.5125 | 121 | 0.623041 | false | 2.879268 | false | false | false |
dangtrinhnt/django-saml2 | djangosaml2/templatetags/idplist.py | 8 | 1419 | # Copyright (C) 2011-2012 Yaco Sistemas (http://www.yaco.es)
#
# 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 a... | apache-2.0 | -4,295,575,218,021,276,700 | 31.25 | 74 | 0.696265 | false | 3.952646 | false | false | false |
nevir/plexability | extern/depot_tools/third_party/boto/mashups/server.py | 91 | 14043 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | gpl-2.0 | 551,411,079,860,995,260 | 34.551899 | 103 | 0.588407 | false | 3.941342 | true | false | false |
kalahbrown/HueBigSQL | desktop/core/ext-py/django-extensions-1.5.0/docs/conf.py | 33 | 6439 | # -*- coding: utf-8 -*-
#
# django-extensions documentation build configuration file, created by
# sphinx-quickstart on Wed Apr 1 20:39:40 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | apache-2.0 | 4,065,926,971,494,356,000 | 32.190722 | 87 | 0.714397 | false | 3.756709 | true | false | false |
kriswuollett/grpc | examples/python/multiplex/route_guide_resources.py | 115 | 2221 | # Copyright 2015, 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 | 145,743,123,724,359,040 | 40.90566 | 72 | 0.742909 | false | 4.442 | false | false | false |
leiferikb/bitpop | src/third_party/pyftpdlib/src/demo/basic_ftpd.py | 4 | 2796 | #!/usr/bin/env python
# $Id: basic_ftpd.py 977 2012-01-22 23:05:09Z g.rodola $
# pyftpdlib is released under the MIT license, reproduced below:
# ======================================================================
# Copyright (C) 2007-2012 Giampaolo Rodola' <g.rodola@gmail.com>
#
# All Ri... | gpl-3.0 | -593,978,601,895,551,600 | 36.28 | 76 | 0.683834 | false | 4.005731 | false | false | false |
joachimmetz/plaso | plaso/parsers/asl.py | 2 | 11003 | # -*- coding: utf-8 -*-
"""The Apple System Log (ASL) file parser."""
import os
from dfdatetime import posix_time as dfdatetime_posix_time
from dfdatetime import semantic_time as dfdatetime_semantic_time
from plaso.containers import events
from plaso.containers import time_events
from plaso.lib import definitions
fr... | apache-2.0 | 137,836,419,511,823,490 | 31.943114 | 80 | 0.669908 | false | 3.860702 | false | false | false |
SamReha/Concepts-Game | languages/pt-br.py | 88 | 7249 | # -*- coding: utf-8 -*-
{
'!langcode!': 'pt-br',
'!langname!': 'Português (do Brasil)',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de u... | gpl-2.0 | 7,410,207,669,485,902,000 | 39.693182 | 290 | 0.683608 | false | 2.711852 | false | false | false |
ubic135/odoo-design | addons/auth_signup/__openerp__.py | 313 | 1571 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 9,124,591,899,266,322,000 | 33.152174 | 78 | 0.552514 | false | 4.257453 | false | false | false |
dlazz/ansible | lib/ansible/plugins/connection/funcd.py | 59 | 3533 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# Copyright (c) 2013, Michael Scherer <misc@zarb.org>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.tx... | gpl-3.0 | 8,316,919,214,908,818,000 | 33.300971 | 110 | 0.638834 | false | 3.70724 | false | false | false |
titasakgm/brc-stock | openerp/addons/report_geraldo/lib/geraldo/site/newsite/django_1_0/tests/regressiontests/null_queries/models.py | 16 | 1789 | from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
def __unicode__(self):
return u"Q: %s " % self.question
class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
def __unicode__(self):
r... | agpl-3.0 | -7,627,443,570,640,662,000 | 29.322034 | 90 | 0.681386 | false | 3.325279 | false | false | false |
snnn/tensorflow | tensorflow/contrib/losses/python/losses/loss_ops.py | 19 | 28132 | # 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 | -8,104,154,935,110,994,000 | 40.738872 | 80 | 0.688789 | false | 3.864286 | false | false | false |
TaylorOshan/pysal | pysal/contrib/glm/links.py | 35 | 20123 | '''
Defines the link functions to be used with GLM and GEE families.
'''
import numpy as np
import scipy.stats
FLOAT_EPS = np.finfo(float).eps
class Link(object):
"""
A generic link function for one-parameter exponential family.
`Link` does nothing, but lays out the methods expected of any subclass.
... | bsd-3-clause | -4,901,116,892,870,221,000 | 20.115425 | 77 | 0.476917 | false | 4.201921 | false | false | false |
athena-voice/athena-voice-client | athena/modules/active/athena_control.py | 1 | 1425 | """
Finds and returns the latest bitcoin price
Usage Examples:
- "What is the price of bitcoin?"
- "How much is a bitcoin worth?"
"""
from athena.classes.module import Module
from athena.classes.task import ActiveTask
from athena import brain
class QuitTask(ActiveTask):
d... | gpl-3.0 | 8,207,512,318,211,203,000 | 24.886792 | 79 | 0.582456 | false | 3.67268 | false | false | false |
TimBuckley/effective_django | tests/custom_pk/fields.py | 33 | 1629 | import random
import string
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class MyWrapper(object):
def __init__(self, value):
self.value = value
def __repr__(self):
return "<%s: %s>" % (sel... | bsd-3-clause | 3,720,848,702,035,211,300 | 27.086207 | 81 | 0.601596 | false | 4.103275 | false | false | false |
CeltonMcGrath/TACTIC | 3rd_party/CherryPy/cherrypy/test/modfcgid.py | 6 | 4258 | """Wrapper for mod_fcgid, for use as a CherryPy HTTP server when testing.
To autostart fcgid, the "apache" executable or script must be
on your system path, or you must override the global APACHE_PATH.
On some platforms, "apache" may be called "apachectl", "apache2ctl",
or "httpd"--create a symlink to them if needed.
... | epl-1.0 | -2,568,828,127,213,745,700 | 33.33871 | 77 | 0.662987 | false | 3.651801 | true | false | false |
FrankTsui/robust_rescaled_svm | common.py | 1 | 1636 | import numpy as np
import matplotlib.pyplot as plt
def plot_decision_function(classifier, fea, gnd, title):
'''
plot the decision function in 2-d plane
classifiers: the svm models
fea: array like, shape = (smp_num, fea_num)
gnd: array like, shape = (smp_num,)
title: title ... | apache-2.0 | -7,288,017,175,188,139,000 | 39.925 | 124 | 0.579462 | false | 2.806175 | false | false | false |
barryHub20/ServerAss2 | lib/itsdangerous.py | 626 | 31840 | # -*- coding: utf-8 -*-
"""
itsdangerous
~~~~~~~~~~~~
A module that implements various functions to deal with untrusted
sources. Mainly useful for web applications.
:copyright: (c) 2014 by Armin Ronacher and the Django Software Foundation.
:license: BSD, see LICENSE for more details.
"""
imp... | apache-2.0 | -2,543,009,830,124,408,300 | 35.513761 | 81 | 0.632004 | false | 4.258392 | false | false | false |
felixbb/forseti-security | tests/common/gcp_api/bigquery_test.py | 1 | 5019 | # Copyright 2017 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, s... | apache-2.0 | 1,886,433,124,228,149,000 | 37.906977 | 78 | 0.664873 | false | 3.615994 | true | false | false |
slohse/ansible | setup.py | 34 | 11028 |
from __future__ import print_function
import json
import os
import os.path
import re
import sys
import warnings
from collections import defaultdict
from distutils.command.build_scripts import build_scripts as BuildScripts
from distutils.command.sdist import sdist as SDist
try:
from setuptools import setup, find... | gpl-3.0 | -3,264,189,986,342,779,400 | 33.35514 | 121 | 0.609993 | false | 4.13964 | false | false | false |
clumsy/intellij-community | python/lib/Lib/encodings/cp866.py | 593 | 34652 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP866.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | apache-2.0 | 4,318,136,999,309,368,000 | 48.644699 | 97 | 0.611278 | false | 2.941596 | false | false | false |
Simran-B/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/numbers.py | 59 | 10271 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for numbers, according to PEP 3141.
TODO: Fill out more detailed documentation on the operators."""
from __future__ import division
from abc import ABCMeta, abstractmethod, abstractprop... | apache-2.0 | 3,724,814,421,603,377,700 | 25.268542 | 80 | 0.595852 | false | 4.700686 | false | false | false |
mgracer48/panda3d | direct/src/distributed/MsgTypes.py | 5 | 5594 | """MsgTypes module: contains distributed object message types"""
from direct.showbase.PythonUtil import invertDictLossless
MsgName2Id = {
# 2 new params: passwd, char bool 0/1 1 = new account
# 2 new return values: 129 = not found, 12 = bad passwd,
'CLIENT_LOGIN': 1,
'... | bsd-3-clause | -4,714,705,701,539,997,000 | 41.70229 | 102 | 0.499821 | false | 3.958953 | false | false | false |
Bulochkin/tensorflow_pack | tensorflow/python/kernel_tests/distributions/multinomial_test.py | 48 | 13141 | # 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 | -627,194,293,295,146,100 | 37.311953 | 80 | 0.602542 | false | 3.263223 | true | false | false |
sebmarchand/syzygy | third_party/numpy/files/numpy/distutils/fcompiler/gnu.py | 85 | 14383 | import re
import os
import sys
import warnings
import platform
import tempfile
from subprocess import Popen, PIPE, STDOUT
from numpy.distutils.cpuinfo import cpu
from numpy.distutils.fcompiler import FCompiler
from numpy.distutils.exec_command import exec_command
from numpy.distutils.misc_util import msvc_runtime_libr... | apache-2.0 | -6,499,297,468,068,734,000 | 36.455729 | 109 | 0.538761 | false | 3.750456 | false | false | false |
KirtoXX/Security_Camera | ssd_mobilenet/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py | 13 | 9042 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,878,342,389,594,409,500 | 42.263158 | 80 | 0.641009 | false | 3.844388 | false | false | false |
jkyeung/XlsxWriter | xlsxwriter/test/comparison/test_fit_to_pages01.py | 1 | 1354 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause | 7,276,973,820,359,425,000 | 28.434783 | 91 | 0.581241 | false | 3.835694 | true | false | false |
est31/godot | tools/translations/extract.py | 4 | 3162 | #!/bin/python
import fnmatch
import os
import shutil
import subprocess
import sys
line_nb = False
for arg in sys.argv[1:]:
if (arg == "--with-line-nb"):
print("Enabling line numbers in the context locations.")
line_nb = True
else:
os.sys.exit("Non supported argument '" + arg + "'. Aborting.")
if (not os.p... | mit | -9,170,374,170,648,537,000 | 25.571429 | 114 | 0.629981 | false | 2.927778 | false | false | false |
feroda/django | django/contrib/postgres/fields/hstore.py | 45 | 2945 | import json
from django.contrib.postgres import forms, lookups
from django.contrib.postgres.fields.array import ArrayField
from django.core import exceptions
from django.db.models import Field, TextField, Transform
from django.utils import six
from django.utils.translation import ugettext_lazy as _
__all__ = ['HStore... | bsd-3-clause | 6,559,330,261,788,073,000 | 27.317308 | 69 | 0.647878 | false | 3.864829 | false | false | false |
pratikmallya/hue | desktop/core/ext-py/Django-1.6.10/django/views/decorators/cache.py | 129 | 2286 | from functools import wraps
from django.utils.decorators import decorator_from_middleware_with_args, available_attrs
from django.utils.cache import patch_cache_control, add_never_cache_headers
from django.middleware.cache import CacheMiddleware
def cache_page(*args, **kwargs):
"""
Decorator for views that tri... | apache-2.0 | -3,524,898,767,110,126,000 | 40.563636 | 140 | 0.704724 | false | 4.126354 | false | false | false |
tody411/ImageViewerFramework | ivf/cmds/save_depth.py | 1 | 1284 |
# -*- coding: utf-8 -*-
## @package ivf.cmds.save_depth
#
# ivf.cmds.save_depth utility package.
# @author tody
# @date 2016/02/02
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import os
from ivf.cmds.base_cmds import BaseCommand
from ivf.scene.gl3d.image_plane import ImagePlane
from ivf.io_u... | mit | -5,482,225,773,421,896,000 | 26.934783 | 124 | 0.614486 | false | 3.34375 | false | false | false |
kisel/trex-core | scripts/astf/param_mss_err.py | 2 | 1056 | from trex_astf_lib.api import *
# IPV6 tunable example
#
# ipv6.src_msb
# ipv6.dst_msb
# ipv6.enable
#
class Prof1():
def __init__(self):
pass
def get_profile(self, **kwargs):
# ip generator
ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.0", "16.0.0.255"], distribution="seq")
... | apache-2.0 | 7,100,825,590,404,855,000 | 28.333333 | 100 | 0.484848 | false | 3.259259 | false | false | false |
vschs007/buck | third-party/py/pex/pex/interpreter.py | 52 | 12996 | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""pex support for interacting with interpreters."""
from __future__ import absolute_import
import os
import re
import subprocess
import sys
from collections import defaultdict
from pkg... | apache-2.0 | -4,550,507,036,375,673,300 | 29.578824 | 99 | 0.657433 | false | 3.805564 | false | false | false |
AOKP/external_chromium_org | tools/python/google/gethash_timer.py | 182 | 4366 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Issue a series of GetHash requests to the SafeBrowsing servers and measure
the response times.
Usage:
$ ./gethash_timer.py -... | bsd-3-clause | -2,610,213,376,318,876,000 | 28.302013 | 78 | 0.653 | false | 3.703138 | false | false | false |
srinathv/vispy | vispy/visuals/isocurve.py | 18 | 7809 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .line import LineVisual
from ..color import ColorArray
from ..color.colormap import _normalize, get_colormap
from ..g... | bsd-3-clause | 4,437,686,698,291,279,000 | 33.25 | 77 | 0.560891 | false | 3.963959 | false | false | false |
cbare/Etudes | python/strings.py | 1 | 1543 | """
String algorithms
"""
def balanced_parens(s: str) -> bool:
open = 0
for c in s:
if c=='(': open += 1
if c==')':
if open > 0:
open -= 1
else:
return False
return open==0
assert balanced_parens('')
assert balanced_parens('()')
asser... | apache-2.0 | 6,885,814,736,535,310,000 | 23.492063 | 78 | 0.473104 | false | 3.339827 | false | false | false |
lorenzo-desantis/mne-python | mne/preprocessing/eog.py | 6 | 7587 | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
from .peak_finder import peak_finder
from .. import pick_types, pick_channels
from ..utils import... | bsd-3-clause | -1,182,136,550,195,087,600 | 35.475962 | 79 | 0.568604 | false | 3.670537 | false | false | false |
ttrifonov/EventBrain | src/eventbrain/bin/launcher.py | 1 | 9958 | #!/usr/bin/env python
# file: launcher.py
import os
import sys
import logging
from optparse import OptionParser, OptionGroup
from eventbrain.util.daemon import Daemon
FORMAT = '%(asctime)-15s:%(name)s:%(process)d:%(levelname)s === %(message)s'
logging.basicConfig(format=FORMAT, level=logging.INFO, stream=sys.stdout)
... | apache-2.0 | -816,246,304,667,039,600 | 31.864686 | 78 | 0.527214 | false | 4.177013 | true | false | false |
BraveSirRobbo/steam-scraper | test.py | 1 | 4225 | import unittest
from bs4 import BeautifulSoup
import re
def justOne(ls):
assert(len(ls) == 1)
return ls[0]
def scrapePage(html_doc):
soup = BeautifulSoup(html_doc, 'html.parser')
ratings = [s.get_text() for s in soup.find_all("span",attrs={ "class": re.compile(r"game_review_summary .*")})]
assert(len(ratin... | apache-2.0 | 8,001,148,401,895,838,000 | 35.73913 | 351 | 0.624615 | false | 3.38 | true | false | false |
eljost/pysisyphus | deprecated/tests/test_dynamics/test_dynamics.py | 1 | 2531 | from matplotlib.patches import Circle
import matplotlib.pyplot as plt
import numpy as np
import pytest
from pysisyphus.calculators.AnaPot import AnaPot
from pysisyphus.dynamics.velocity_verlet import md
def test_velocity_verlet():
geom = AnaPot.get_geom((0.52, 1.80, 0))
x0 = geom.coords.copy()
v0 = .1 * ... | gpl-3.0 | -5,884,419,591,824,381,000 | 26.51087 | 83 | 0.591861 | false | 2.831096 | false | false | false |
yashsharan/sympy | sympy/calculus/euler.py | 16 | 3263 | """
This module implements a method to find
Euler-Lagrange Equations for given Lagrangian.
"""
from itertools import combinations_with_replacement
from sympy import Function, sympify, diff, Eq, S, Symbol, Derivative
from sympy.core.compatibility import (iterable, range)
def euler_equations(L, funcs=(), vars=()):
... | bsd-3-clause | 1,317,070,981,513,880,300 | 30.679612 | 78 | 0.579835 | false | 3.478678 | false | false | false |
adit-chandra/tensorflow | tensorflow/python/keras/applications/imagenet_utils.py | 5 | 1439 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,496,285,182,079,640,000 | 38.972222 | 80 | 0.737318 | false | 4.195335 | false | false | false |
fibbo/DIRAC | Interfaces/scripts/dirac-wms-job-attributes.py | 8 | 1197 | #!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-wms-job-attributes
# Author : Stuart Paterson
########################################################################
"""
Retrieve attributes associated with the given DIRAC job
"""
__RCSID__... | gpl-3.0 | 6,073,621,364,408,975,000 | 28.925 | 95 | 0.482038 | false | 4.043919 | false | false | false |
nikhil93uf/Qemu | scripts/tracetool/backend/simple.py | 97 | 2669 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simple built-in backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"... | gpl-2.0 | -3,565,729,492,435,361,000 | 25.939394 | 103 | 0.493063 | false | 3.350503 | false | false | false |
tod31/pyload | module/plugins/hoster/RPNetBiz.py | 5 | 3545 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.MultiHoster import MultiHoster
from module.plugins.internal.misc import json
class RPNetBiz(MultiHoster):
__name__ = "RPNetBiz"
__type__ = "hoster"
__version__ = "0.20"
__status__ = "testing"
__pattern__ = r'https?://.+rpnet\... | gpl-3.0 | 5,885,631,327,325,925,000 | 42.765432 | 105 | 0.490268 | false | 4.151054 | false | false | false |
Hellowlol/HTPC-Manager | libs/mako/_ast_util.py | 60 | 25652 | # mako/_ast_util.py
# Copyright (C) 2006-2015 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
"""
ast
~~~
The `ast` module helps Python applications to process trees of the Pyth... | mit | 607,937,448,600,968,600 | 29.357396 | 79 | 0.555668 | false | 4.031432 | false | false | false |
40223117cda/cda | static/Brython3.1.1-20150328-091302/Lib/test/test_int.py | 765 | 12587 | import sys
import unittest
from test.support import run_unittest
L = [
('0', 0),
('1', 1),
('9', 9),
('10', 10),
('99', 99),
('100', 100),
('314', 314),
(' 314', 314),
('314 ', 314),
(' \t\t 314 \t\t ', 314),
(repr(sys.maxsize... | gpl-3.0 | -2,974,264,190,853,167,600 | 38.090062 | 81 | 0.561373 | false | 3.752832 | true | false | false |
kashev/kashev.rocks | manage.py | 1 | 1238 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# kashev.rocks
# Kashev Dalmia - kashev.dalmia@gmail.com
from flask.ext.script import Manager
from flask.ext.assets import ManageAssets
from src.kashevrocks import app
from src.assets import register_assets
manager = Manager(app)
assets_env = register_assets(app)
manag... | mit | -2,425,773,170,606,357,000 | 22.807692 | 79 | 0.642973 | false | 3.598837 | false | false | false |
brayden2544/Mystuff-final | account/cached_templates/templates/password_reset.html.py | 1 | 1886 | # -*- coding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 9
_modified_time = 1397087641.387625
_enable_loop = True
_template_filename = 'C:\\app\\account\\templates/password_reset.html'
_template_uri = 'password_rese... | apache-2.0 | 1,488,263,980,460,247,600 | 30.966102 | 143 | 0.626723 | false | 3.585551 | false | false | false |
nathanial/lettuce | tests/integration/lib/Django-1.3/tests/modeltests/model_inheritance/models.py | 118 | 3888 | """
XX. Model inheritance
Model inheritance exists in two varieties:
- abstract base classes which are a way of specifying common
information inherited by the subclasses. They don't exist as a separate
model.
- non-abstract base classes (the default), which are models in their own
right with ... | gpl-3.0 | -5,259,749,329,917,326,000 | 24.411765 | 89 | 0.675154 | false | 3.830542 | false | false | false |
steenzout/python-barcode | docs/conf.py | 1 | 11075 | # -*- coding: utf-8 -*-
#
# Copyright 2010-2013, Thorsten Weimann; 2014, Alexander Shorin; 2016 Pedro Salgado
#
# 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/lic... | mit | 4,455,014,411,438,905,000 | 26.413366 | 85 | 0.68614 | false | 3.49921 | false | false | false |
SpredfastLegacy/JsBeautify | jsbeautifier/unpackers/packer.py | 76 | 3302 | #
# Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier
# by Einar Lielmanis <einar@jsbeautifier.org>
#
# written by Stefano Sanfilippo <a.little.coder@gmail.com>
#
# usage:
#
# if detect(some_string):
# unpacked = unpack(some_string)
#
"""Unpacker for Dean Edward's p.a.c.k.e.r"""
import r... | bsd-3-clause | -3,147,354,450,630,264,000 | 30.75 | 78 | 0.586917 | false | 3.475789 | false | false | false |
midma101/AndIWasJustGoingToBed | .venv/lib/python2.7/site-packages/markupsafe/__init__.py | 371 | 8205 | # -*- coding: utf-8 -*-
"""
markupsafe
~~~~~~~~~~
Implements a Markup string.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import re
from markupsafe._compat import text_type, string_types, int_types, \
unichr, PY2
__all__ = ['Markup', 'soft_unicod... | mit | 1,277,062,579,156,340,500 | 34.064103 | 85 | 0.577331 | false | 3.848499 | false | false | false |
denfromufa/pythonnet | demo/helloform.py | 8 | 1769 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import clr
SWF = clr.AddReference("System.Windows.Forms")
print (SWF.Location)
import System.Windows.Forms as WinForms
from System.Drawing import Size, Point
class HelloApp(WinForms.Form):
"""A simple hello world app that demonstrates the essentials of
winfor... | mit | -985,810,494,902,420,700 | 27.079365 | 74 | 0.626343 | false | 3.76383 | false | false | false |
SpOOnman/claws | tools/vcard2xml.py | 11 | 8810 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
"""
Copyright © 2003 Bogdan Sumanariu <zarrok@yahoo.com>
This file 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 | 1,002,031,994,638,320,500 | 27.419355 | 197 | 0.56084 | false | 2.838273 | false | false | false |
overtherain/scriptfile | software/googleAppEngine/lib/django_1_4/django/contrib/localflavor/za/forms.py | 89 | 1940 | """
South Africa-specific Form helpers
"""
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField
from django.utils.checksums import luhn
from django.utils.translation import gettext as _
import re
from datetime import date
id_re ... | mit | 3,290,177,538,023,332,400 | 31.333333 | 88 | 0.624742 | false | 3.796477 | false | false | false |
gomiero/PTVS | Python/Product/Pyvot/Pyvot/xl/__init__.py | 18 | 4494 | # Copyright (c) Microsoft Corporation.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the LICENSE.txt file at the root of this distribution. If
# you cannot locate the Apache License, Version 2.0, please send an email to
# vsp... | apache-2.0 | -5,316,928,215,186,286,000 | 56.38961 | 133 | 0.683133 | false | 3.533019 | false | false | false |
odootr/odoo | addons/account/wizard/account_tax_chart.py | 385 | 3247 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 1,979,491,283,107,187,200 | 41.116883 | 110 | 0.55905 | false | 4.157692 | false | false | false |
blitzmann/Pyfa | eos/saveddata/fighterAbility.py | 1 | 5887 | # ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos 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, ... | gpl-3.0 | -2,150,383,331,423,504,100 | 36.737179 | 134 | 0.625786 | false | 3.6702 | false | false | false |
davidwaroquiers/pymatgen | pymatgen/io/abinit/tests/test_inputs.py | 5 | 10923 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import tempfile
import unittest
import numpy as np
from pymatgen.core.structure import Structure
from pymatgen.io.abinit.inputs import (
BasicAbinitInput,
BasicMultiDataset,
ShiftMode,
... | mit | -6,020,666,609,939,037,000 | 34.349515 | 107 | 0.590955 | false | 3.317036 | true | false | false |
yasoob/youtube-dl-GUI | youtube_dl/extractor/glide.py | 64 | 1543 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class GlideIE(InfoExtractor):
IE_DESC = 'Glide mobile video messages (glide.me)'
_VALID_URL = r'https?://share\.glide\.me/(?P<id>[A-Za-z0-9\-=_+]+)'
_TEST = {
'url': 'http://share.glide.me/UZF8zlmuQbe4mr+7dC... | mit | 8,006,231,734,576,173,000 | 34.883721 | 83 | 0.52884 | false | 3.262156 | false | false | false |
daafgo/Server_LRS | lrs/util/retrieve_statement.py | 1 | 11615 | import bencode
import hashlib
import json
from datetime import datetime
from itertools import chain
from django.core.cache import cache
from django.conf import settings
from django.core.paginator import Paginator
from django.db.models import Q
from util import convert_to_utc, convert_to_dict
from ..models import Stat... | apache-2.0 | 5,895,940,552,125,944,000 | 39.190311 | 137 | 0.624193 | false | 3.771104 | false | false | false |
RAtechntukan/CouchPotatoServer | libs/subliminal/services/tvsubtitles.py | 106 | 6240 | # -*- coding: utf-8 -*-
# Copyright 2012 Nicolas Wack <wackou@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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 3 of the Licen... | gpl-3.0 | 3,814,871,655,794,799,000 | 42.943662 | 145 | 0.604487 | false | 3.861386 | false | false | false |
ds-hwang/chromium-crosswalk | remoting/tools/zip2msi.py | 89 | 8691 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Generates .msi from a .zip archive or an unpacked directory.
The structure of the input archive or directory should look like t... | bsd-3-clause | 7,209,941,797,004,164,000 | 30.952206 | 80 | 0.682085 | false | 3.79354 | false | false | false |
rolobio/DictORM | dictorm/pg.py | 1 | 10974 | """
This module is used to build queries for Postgresql. You shouldn't really need
to import anything from this file because they can all be built using
dictorm.Table.
Sqlite queries are slightly different, but use these methods as their base.
"""
from copy import copy
from typing import Union
global sort_keys
sort_... | apache-2.0 | -8,272,285,528,467,006,000 | 27.80315 | 91 | 0.558958 | false | 3.755647 | false | false | false |
megraf/asuswrt-merlin | release/src/router/libxml2/python/tests/xpath.py | 87 | 1188 | #!/usr/bin/python -u
#
# this test exercise the XPath basic engine, parser, etc, and
# allows to detect memory leaks
#
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
doc = libxml2.parseFile("tst.xml")
if doc.name != "tst.xml":
print "doc.name error"
sys.exit(1);
ctxt = doc.xpathNewC... | gpl-2.0 | -4,336,757,916,907,250,000 | 22.294118 | 61 | 0.654882 | false | 2.933333 | false | false | false |
mmatyas/skia | tools/misc_utils.py | 68 | 7711 | # Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Module to host the VerboseSubprocess, ChangeDir, and ReSearch classes.
"""
import os
import re
import subprocess
def print_subprocess_args(prefix, *args, **kwargs):
"""Print o... | bsd-3-clause | -5,381,130,281,967,364,000 | 33.424107 | 77 | 0.59253 | false | 4.452079 | false | false | false |
mbauskar/helpdesk-frappe | frappe/patches/v5_2/change_checks_to_not_null.py | 58 | 1267 | from __future__ import unicode_literals
import frappe
from frappe.utils import cint
from frappe.model import default_fields
def execute():
for table in frappe.db.get_tables():
doctype = table[3:]
if frappe.db.exists("DocType", doctype):
fieldnames = [df["fieldname"] for df in
frappe.get_all("DocField", fie... | mit | 7,124,992,491,837,945,000 | 36.264706 | 102 | 0.671665 | false | 3.480769 | false | false | false |
wiltonlazary/arangodb | 3rdParty/V8/V8-5.0.71.39/tools/swarming_client/tests/lru_test.py | 6 | 6265 | #!/usr/bin/env python
# Copyright 2013 The Swarming Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0 that
# can be found in the LICENSE file.
import json
import logging
import os
import sys
import tempfile
import unittest
ROOT_DIR = os.path.dirname(os.path.dirn... | apache-2.0 | -7,147,157,685,968,510,000 | 26.47807 | 80 | 0.622666 | false | 3.060576 | true | false | false |
kkampardi/Plinth | plinth/modules/matrixsynapse/views.py | 2 | 2670 | #
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | agpl-3.0 | 345,140,781,094,044,350 | 34.131579 | 75 | 0.695506 | false | 4.076336 | false | false | false |
ZihengJiang/mxnet | python/mxnet/profiler.py | 31 | 2161 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 7,532,587,623,368,357,000 | 36.258621 | 90 | 0.698751 | false | 3.972426 | false | false | false |
maciekcc/tensorflow | tensorflow/python/ops/linalg_grad.py | 23 | 9040 | # 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 | -1,518,084,748,407,574,500 | 37.468085 | 80 | 0.645796 | false | 3.150924 | false | false | false |
Fireblend/chromium-crosswalk | tools/cygprofile/cyglog_to_orderfile.py | 6 | 8358 | #!/usr/bin/python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Symbolizes a log file produced by cyprofile instrumentation.
Given a log file and the binary being profiled, creates an orderfile.
"""
... | bsd-3-clause | -5,208,371,290,180,285,000 | 31.395349 | 90 | 0.684015 | false | 3.635494 | false | false | false |
igor-rangel7l/novoigorrangel.repository | plugin.video.SportsDevil/service/asn1crypto/keys.py | 13 | 35048 | # coding: utf-8
"""
ASN.1 type classes for public and private keys. Exports the following items:
- DSAPrivateKey()
- ECPrivateKey()
- EncryptedPrivateKeyInfo()
- PrivateKeyInfo()
- PublicKeyInfo()
- RSAPrivateKey()
- RSAPublicKey()
Other type classes are defined that help compose the types listed above.
"""
... | gpl-2.0 | -8,525,391,529,607,395,000 | 27.151004 | 107 | 0.524738 | false | 3.824531 | false | false | false |
bhansa/fireball | pyvenv/Lib/site-packages/pip/vcs/bazaar.py | 514 | 3803 | from __future__ import absolute_import
import logging
import os
import tempfile
# TODO: Get this into six.moves.urllib.parse
try:
from urllib import parse as urllib_parse
except ImportError:
import urlparse as urllib_parse
from pip.utils import rmtree, display_path
from pip.vcs import vcs, VersionControl
fro... | gpl-3.0 | 5,999,897,277,662,634,000 | 31.784483 | 77 | 0.55614 | false | 3.825956 | false | false | false |
noroutine/ansible | lib/ansible/playbook/role_include.py | 23 | 5507 |
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope th... | gpl-3.0 | -1,847,802,811,969,058,000 | 36.209459 | 130 | 0.654803 | false | 3.976173 | false | false | false |
hnousiainen/pghoard | pghoard/pgutil.py | 2 | 3543 | # Copied from https://github.com/ohmu/ohmu_common_py ohmu_common_py/pgutil.py version 0.0.1-0-unknown-fa54b44
"""
pghoard - postgresql utility functions
Copyright (c) 2015 Ohmu Ltd
See LICENSE for details
"""
try:
from urllib.parse import urlparse, parse_qs # pylint: disable=no-name-in-module, import-error
excep... | apache-2.0 | 4,727,380,614,604,684,000 | 34.43 | 119 | 0.594129 | false | 3.851087 | false | false | false |
vgkholla/ambry | ambry-tools/scripts/layout-analyzer.py | 7 | 7025 | #!/usr/bin/python2.7
import argparse
import json
import sys
from collections import defaultdict
class Node(object):
def __init__(self, node, datacenter):
self.node = node
self.datacenter = datacenter
self.partitions = set()
@property
def hostname(self):
return self.node["... | apache-2.0 | -2,986,022,109,325,995,000 | 36.768817 | 119 | 0.560142 | false | 4.081929 | false | false | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/topi/python/topi/testing/roi_align_python.py | 2 | 3126 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 9,151,436,490,313,603,000 | 38.56962 | 94 | 0.559181 | false | 3.043817 | false | false | false |
zhouxiao-coder/Paddle | demo/introduction/trainer_config.py | 3 | 1344 | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 | 7,014,155,936,608,804,000 | 31.780488 | 80 | 0.720238 | false | 3.428571 | false | false | false |
caesar2164/edx-platform | common/djangoapps/track/transformers.py | 51 | 16677 | """
EventTransformers are data structures that represents events, and modify those
events to match the format desired for the tracking logs. They are registered
by name (or name prefix) in the EventTransformerRegistry, which is used to
apply them to the appropriate events.
"""
import json
import logging
from opaque_... | agpl-3.0 | -4,993,183,082,950,215,000 | 32.089286 | 118 | 0.611261 | false | 4.273962 | false | false | false |
luci/luci-py | appengine/swarming/server/task_request_test.py | 2 | 86434 | #!/usr/bin/env vpython
# Copyright 2014 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import datetime
import logging
import random
import string
import sys
import unittest
import test_env
test_env.setup_test_... | apache-2.0 | -3,309,384,925,261,021,000 | 36.843257 | 80 | 0.60541 | false | 3.539186 | true | false | false |
Clemson-DPA/dpa-pipe | dpa/app/session.py | 1 | 9786 |
from abc import ABCMeta, abstractmethod, abstractproperty
import importlib
import os
import shlex
import subprocess
import socket
import time
import rpyc
from dpa.app.entity import EntityRegistry
from dpa.env.vars import DpaVars
from dpa.ptask.area import PTaskArea
from dpa.ptask import PTaskError, PTask
from dpa.si... | mit | 835,993,178,283,954,700 | 30.365385 | 80 | 0.41263 | false | 5.856373 | false | false | false |
h2non/paco | paco/wait.py | 1 | 3118 | # -*- coding: utf-8 -*-
import asyncio
from .assertions import isiter
from .concurrent import ConcurrentExecutor
@asyncio.coroutine
def wait(*coros_or_futures, limit=0, timeout=None, loop=None,
return_exceptions=False, return_when='ALL_COMPLETED'):
"""
Wait for the Futures and coroutine objects given... | mit | 1,045,240,907,255,369,900 | 36.119048 | 79 | 0.650096 | false | 4.479885 | false | false | false |
akopich/spark | python/pyspark/java_gateway.py | 56 | 5851 | #
# 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 | 2,350,691,943,521,753,000 | 45.070866 | 100 | 0.655785 | false | 4.002052 | false | false | false |
MatriX-Coder/wsploit | modules/wjoomlacomponents.py | 1 | 8322 | #!/usr/bin/python
# Wsploit Project
'''
this is simple joomla
components scanner
'''
try:
import urllib2, Queue
except:
print 'You need urllib2 and Queue librarys installed.'
try:
from threading import Thread
except:
print 'You need threading library installed.'
try:
from time import sleep
except:
print 'You ... | artistic-2.0 | 5,440,260,959,330,500,000 | 24.685185 | 55 | 0.727469 | false | 2.923077 | false | false | false |
anentropic/django-oscar | tests/integration/offer/availability_tests.py | 40 | 1143 | from django.test import TestCase
from oscar.apps.offer import models
from oscar.test.factories import (
create_order, OrderDiscountFactory, UserFactory)
class TestAPerUserConditionalOffer(TestCase):
def setUp(self):
self.offer = models.ConditionalOffer(max_user_applications=1)
self.user = Us... | bsd-3-clause | -853,793,773,920,993,200 | 37.1 | 71 | 0.712161 | false | 3.675241 | true | false | false |
uskudnik/ggrc-core | src/ggrc/migrations/versions/20130910232450_53ef72c8a867_remove_old_audit_tab.py | 2 | 13296 | """Remove old audit tables
Revision ID: 53ef72c8a867
Revises: 526117e15ce4
Create Date: 2013-09-10 23:24:50.751098
"""
# revision identifiers, used by Alembic.
revision = '53ef72c8a867'
down_revision = '526117e15ce4'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
NOT_NULL_COLS... | apache-2.0 | -4,135,967,233,158,390,000 | 54.865546 | 116 | 0.675842 | false | 3.203084 | false | false | false |
ryokochang/Slab-GCS | ExtLibs/Mavlink/pymavlink/generator/lib/genxmlif/xmlifApi.py | 12 | 54395 | #
# genxmlif, Release 0.9.0
# file: xmlifapi.py
#
# API (interface) classes for generic interface package
#
# history:
# 2007-06-29 rl created, classes extracted from xmlifbase.py
#
# Copyright (c) 2005-2008 by Roland Leuthe. All rights reserved.
#
# ------------------------------------------------------------------... | gpl-3.0 | 7,730,973,759,348,299,000 | 41.134005 | 144 | 0.616803 | false | 4.911069 | false | false | false |
stefelisabeth/dplace | dplace_app/api_views.py | 1 | 21716 | import json
import re
import datetime
from itertools import groupby
import logging
from django.db import connection
from django.db.models import Prefetch, Q, Count
from django.shortcuts import get_object_or_404
from django.http import Http404
from rest_framework import viewsets
from rest_framework.pagination import P... | mit | 6,217,632,777,301,787,000 | 39.819549 | 536 | 0.611945 | false | 3.708967 | false | false | false |
vjmac15/Lyilis | lib/youtube_dl/extractor/aparat.py | 15 | 2195 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
mimetype2ext,
)
class AparatIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?aparat\.com/(?:v/|video/video/embed/videohash/)(?P<id>[a-zA-Z0-9]+)'
_TEST = {
'url': ... | gpl-3.0 | -1,589,022,954,366,422,800 | 30.623188 | 106 | 0.499542 | false | 3.4912 | false | false | false |
denys-duchier/django | tests/file_uploads/tests.py | 45 | 23742 | import base64
import hashlib
import os
import shutil
import sys
import tempfile as sys_tempfile
import unittest
from io import BytesIO, StringIO
from urllib.parse import quote
from django.core.files import temp as tempfile
from django.core.files.uploadedfile import SimpleUploadedFile
from django.http.multipartparser i... | bsd-3-clause | -218,260,698,169,522,560 | 38.558333 | 115 | 0.554624 | false | 3.972385 | true | false | false |
onyxfish/agate | agate/table/bar_chart.py | 3 | 1303 | #!/usr/bin/env python
# pylint: disable=W0212
import leather
from agate import utils
def bar_chart(self, label=0, value=1, path=None, width=None, height=None):
"""
Render a bar chart using :class:`leather.Chart`.
:param label:
The name or index of a column to plot as the labels of the chart.
... | mit | 4,765,904,349,357,894,000 | 29.302326 | 74 | 0.646201 | false | 3.670423 | false | false | false |
heiscsy/evolutus_ros_src | evolutus_filter/build/catkin_generated/installspace/_setup_util.py | 4 | 12275 | #!/usr/bin/python
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code mu... | gpl-2.0 | 4,278,920,657,189,255,000 | 41.770035 | 213 | 0.657515 | false | 3.812112 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.