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 |
|---|---|---|---|---|---|---|---|---|---|---|
huard/scipy-work | scipy/io/matlab/byteordercodes.py | 2 | 1780 | ''' Byteorder utilities for system - numpy byteorder encoding
Converts a variety of string codes for little endian, big endian,
native byte order and swapped byte order to explicit numpy endian
codes - one of '<' (little endian) or '>' (big endian)
'''
import sys
sys_is_le = sys.byteorder == 'little'
native_code = ... | bsd-3-clause | -7,523,489,223,941,686,000 | 26.384615 | 65 | 0.524719 | false |
sopoforic/cgrr-mariospicross | marios_picross_puzzle_editor_gui.py | 1 | 6904 | # Classic Game Resource Reader (CGRR): Parse resources from classic games.
# Copyright (C) 2014-2015 Tracy Poff
#
# This file is part of CGRR.
#
# CGRR 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, e... | gpl-3.0 | 3,956,064,887,759,260,700 | 34.919786 | 82 | 0.540701 | false |
nandhp/youtube-dl | youtube_dl/extractor/naver.py | 11 | 3766 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_urlencode,
compat_urlparse,
)
from ..utils import (
ExtractorError,
)
class NaverIE(InfoExtractor):
_VALID_URL = r'https?://(?:m\.)?tvcast\.naver\.com/v/(?... | unlicense | -8,815,060,308,708,217,000 | 35.714286 | 138 | 0.511117 | false |
evildmp/arkestra-clinical-studies | setup.py | 1 | 1220 | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='arkestra-clinical-studies',
version='0.1',
packages=['ark... | bsd-2-clause | 255,867,232,613,774,080 | 35.969697 | 78 | 0.64918 | false |
alphacsc/alphacsc | alphacsc/utils/tests/test_constants.py | 1 | 1832 | import pytest
import numpy as np
from alphacsc.utils import check_random_state, get_D
from alphacsc.utils.whitening import whitening, apply_whitening
from alphacsc.utils.compute_constants import compute_DtD, compute_ztz
from alphacsc.utils.convolution import tensordot_convolve, construct_X_multi
def test_DtD():
... | bsd-3-clause | 8,862,984,482,780,215,000 | 29.533333 | 76 | 0.592795 | false |
flo-compbio/gopca | gopca/gopca.py | 1 | 28600 | # Copyright (c) 2015, 2016 Florian Wagner
#
# This file is part of GO-PCA.
#
# GO-PCA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License, Version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be use... | gpl-3.0 | -7,564,558,166,781,087,000 | 36.094682 | 88 | 0.584755 | false |
nebw/keras | tests/keras/layers/test_wrappers.py | 3 | 4618 | import pytest
import numpy as np
from numpy.testing import assert_allclose
from keras.utils.test_utils import keras_test
from keras.layers import wrappers, Input
from keras.layers import core, convolutional, recurrent
from keras.models import Sequential, Model, model_from_json
@keras_test
def test_TimeDistributed():
... | mit | -8,808,156,948,719,307,000 | 37.483333 | 123 | 0.651581 | false |
viblo/pymunk | pymunk/space_debug_draw_options.py | 1 | 13059 | __docformat__ = "reStructuredText"
from typing import TYPE_CHECKING, List, NamedTuple, Optional, Sequence, Tuple, Type
if TYPE_CHECKING:
from .shapes import Shape
from types import TracebackType
import math
from ._chipmunk_cffi import ffi, lib
from .body import Body
from .vec2d import Vec2d
_DrawFlags = in... | mit | -2,421,067,693,768,553,000 | 35.682584 | 151 | 0.581974 | false |
lucasmaystre/choix | choix/convergence.py | 1 | 2338 | import abc
import numpy as np
class ConvergenceTest(metaclass=abc.ABCMeta):
"""Abstract base class for convergence tests.
Convergence tests should implement a single function, `__call__`, which
takes a parameter vector and returns a boolean indicating whether or not
the convergence criterion is met.... | mit | 8,561,715,781,193,549,000 | 30.173333 | 77 | 0.634731 | false |
guanxi55nba/db-improvement | pylib/cqlshlib/cql3handling.py | 1 | 44570 | # 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 | 6,892,606,226,889,685,000 | 36.141667 | 141 | 0.553511 | false |
klmitch/glance | glance/db/sqlalchemy/migrate_repo/versions/042_add_changes_to_reinstall_unique_metadef_constraints.py | 6 | 24462 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | 3,555,000,250,370,857,500 | 39.5 | 79 | 0.576036 | false |
RefugeeMatchmaking/HackZurich | GAE_Playground/libs/networkx/tests/test_convert_numpy.py | 29 | 8642 | from nose import SkipTest
from nose.tools import assert_raises, assert_true, assert_equal
import networkx as nx
from networkx.generators.classic import barbell_graph,cycle_graph,path_graph
from networkx.testing.utils import assert_graphs_equal
class TestConvertNumpy(object):
numpy=1 # nosetests attribute, use no... | mit | -7,473,892,593,940,159,000 | 38.281818 | 82 | 0.595233 | false |
samrussell/ryu | tools/install_venv.py | 56 | 4160 | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2010 OpenStack LLC.
#
# Licensed under the Apache License, Version 2.0 (the "Li... | apache-2.0 | 6,134,830,222,872,332,000 | 29.588235 | 78 | 0.651923 | false |
LCAS/ros_web_apis | ms_face_api/src/ms_face_api/person_group.py | 1 | 4140 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
File: person_group.py
Description: Person Group section of the Cognitive Face API.
"""
from . import util
def create(person_group_id, name=None, user_data=None):
"""Create a new person group with specified `person_group_id`, `name` and
user-provided `user_data... | mit | 2,872,815,642,897,212,400 | 28.15493 | 79 | 0.63913 | false |
akarki15/mozillians | vendor-local/lib/python/celery/tests/test_events/__init__.py | 14 | 6064 | from __future__ import absolute_import
from __future__ import with_statement
import socket
from celery import events
from celery.app import app_or_default
from celery.tests.utils import Case
class MockProducer(object):
raise_on_publish = False
def __init__(self, *args, **kwargs):
self.sent = []
... | bsd-3-clause | -134,159,240,186,236,400 | 30.748691 | 76 | 0.54535 | false |
robwebset/script.sonos | service.py | 1 | 22409 | # -*- coding: utf-8 -*-
import sys
import os
import traceback
import xbmc
import xbmcaddon
import xbmcgui
import xbmcvfs
# Add JSON support for queries
if sys.version_info < (2, 7):
import simplejson
else:
import json as simplejson
# Import the common settings
from resources.lib.settings import Settings
from ... | gpl-2.0 | 6,117,928,737,935,665,000 | 43.112205 | 166 | 0.573564 | false |
lgarren/spack | var/spack/repos/builtin/packages/r-bh/package.py | 3 | 2628 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -8,498,819,118,847,006,000 | 53.75 | 79 | 0.689878 | false |
marcoantoniooliveira/labweb | oscar/lib/python2.7/site-packages/IPython/parallel/tests/test_db.py | 2 | 11884 | """Tests for db backends
Authors:
* Min RK
"""
#-------------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#... | bsd-3-clause | -7,777,586,069,748,819,000 | 36.847134 | 94 | 0.565382 | false |
WeeFeeSuite/WeeFee | core/WeeMon.py | 1 | 2472 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import sys
import time
# Add Parent Directory to path
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.sys.path.insert(0, parentdir)
from modules import devices
from modules import arguments
from modules import taskkill
__VE... | mit | -2,827,570,646,675,135,000 | 22.542857 | 76 | 0.586974 | false |
pombredanne/tahoe-lafs | src/allmydata/web/filenode.py | 7 | 21540 |
import simplejson
from twisted.web import http, static
from twisted.internet import defer
from nevow import url, rend
from nevow.inevow import IRequest
from allmydata.interfaces import ExistingChildError
from allmydata.monitor import Monitor
from allmydata.immutable.upload import FileHandle
from allmydata.mutable.pu... | gpl-2.0 | 1,709,505,461,712,602,400 | 40.10687 | 102 | 0.571681 | false |
hgl888/chromium-crosswalk-efl | tools/perf/page_sets/top_10.py | 33 | 4115 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SimpleScrollPage(page_module.Page):
def __init... | bsd-3-clause | 2,987,099,994,312,314,400 | 31.401575 | 78 | 0.675334 | false |
alpeware/gcms | common.py | 1 | 5675 | """
GCMS
(c) 2017 Alpeware LLC
"""
import logging
import re
import string
from google.appengine.api import taskqueue
from google.appengine.api import memcache
TAGS_RE = re.compile('(<p[^>]+>)<span([^>]*)>[Tt]ags:([^<]+)</span></p>')
TITLE_RE = re.compile('<p class="title"([^>]+)><span([^>]+)>([^<]+)')
COMMENTS_RE = r... | mit | 4,333,174,895,365,929,500 | 34.46875 | 176 | 0.606872 | false |
jumpstarter-io/neutron | neutron/tests/unit/vmware/test_nsx_sync.py | 9 | 33065 | # Copyright 2013 VMware, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 | 5,512,301,682,407,519,000 | 45.051532 | 79 | 0.583275 | false |
mPowering/django-orb | orb/courses/export.py | 1 | 3124 | # -*- coding: utf-8 -*-
"""
Base course export functionality
"""
from __future__ import unicode_literals
import hashlib
import time
import markdown
from autoslugged.settings import slugify
from django.utils.functional import cached_property
from six import text_type
from typing import Dict # noqa
from typing impo... | gpl-3.0 | -4,556,169,896,410,257,000 | 27.144144 | 86 | 0.618118 | false |
b-randon/gImage | Python/settings_window.py | 1 | 15481 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\B\Desktop\git\gImage\UI\settings_window.ui'
#
# Created: Fri Dec 02 22:57:01 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class... | gpl-3.0 | -8,510,505,441,863,688,000 | 62.187755 | 160 | 0.692526 | false |
Kjili/analysis-preservation.cern.ch | cap/modules/cache/__init__.py | 9 | 1269 | # -*- coding: utf-8 -*-
#
# This file is part of CERN Analysis Preservation Framework.
# Copyright (C) 2016 CERN.
#
# CERN Analysis Preservation Framework 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... | gpl-2.0 | -4,389,507,737,048,496,000 | 37.454545 | 78 | 0.760441 | false |
palisadoes/switchmap-ng | switchmap/test/_do_all_tests.py | 1 | 3884 | #!/usr/bin/env python3
"""Script to test all the switchmap-ng unittests.
1) This script runs each unittest script in switchmap-ng's
switchmap.test module.
2) The only scripts run in the module are those whose names
start with 'test_'
3) The unittests will only run on a test database whose name
starts ... | apache-2.0 | -4,210,289,437,080,702,000 | 26.160839 | 78 | 0.607106 | false |
jmmartinez84/yowsup | yowsup/demos/cli/stack.py | 28 | 1038 | from yowsup.stacks import YowStackBuilder
from .layer import YowsupCliLayer
from yowsup.layers.auth import AuthError
from yowsup.layers import YowLayerEvent
from yowsup.layers.auth import YowAuthenticationProtocolLayer
import sys
class YowsupCliStack(object):
def __init__(self, credentials, encryptionEnabled = Tr... | gpl-3.0 | -3,670,054,124,775,979,500 | 33.6 | 91 | 0.659923 | false |
40223108/w18 | body.py | 15 | 11491 |
import cherrypy
# 這是 MAN 類別的定義
'''
# 在 application 中導入子模組
import programs.cdag30.man as cdag30_man
# 加入 cdag30 模組下的 man.py 且以子模組 man 對應其 MAN() 類別
root.cdag30.man = cdag30_man.MAN()
# 完成設定後, 可以利用
/cdag30/man/assembly
# 呼叫 man.py 中 MAN 類別的 assembly 方法
'''
class MAN(object):
# 各組利用 index 引導隨後的程式執行
@cherrypy.exp... | gpl-3.0 | 9,147,876,049,154,187,000 | 38.57529 | 149 | 0.66104 | false |
algorhythms/LeetCode | 385 Mini Parser Nested Integer.py | 1 | 3279 | """
Given a nested list of integers represented as a string, implement a parser to deserialize it.
Each element is either an integer, or a list -- whose elements may also be integers or other lists.
Note: You may assume that the string is well-formed:
String is non-empty.
String does not contain white spaces.
String... | mit | 815,430,519,940,870,300 | 25.658537 | 99 | 0.571211 | false |
guangxingli/python-neo | neo/test/iotest/test_exampleio.py | 13 | 1973 | # -*- coding: utf-8 -*-
"""
Tests of neo.io.exampleio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
try:
import unittest2 as unittest
except ImportError:
import unittest
from neo.io.exampleio import ExampleIO, HAVE_SCIPY
from neo.test.iotest.common_io_test import Ba... | bsd-3-clause | 455,342,504,990,647,400 | 29.828125 | 73 | 0.641156 | false |
diversys/wubi | src/openpgp/sap/pkt/ModificationDetectionCode.py | 9 | 1180 | """Modification detection code RFC 2440.5.14
The modification detection code contains a SHA-1 hash of the plaintext
in a decrypted symmetrically encrypted integrity protected packet.
"""
from Packet import Packet
class ModificationDetectionCode(Packet):
__doc__ = """Modification Detection Code Packet
""" + P... | gpl-2.0 | 7,156,879,438,752,994,000 | 25.818182 | 102 | 0.60339 | false |
akretion/l10n-brazil | l10n_br_hr_contract/models/hr_contract.py | 1 | 3113 | # -*- coding: utf-8 -*-
# Copyright (C) 2016 Daniel Sadamo - KMEE Informática
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import models, fields, api
from odoo.addons.l10n_br_base.tools import fiscal
from odoo.exceptions import ValidationError
MONTHS = [
('1', 'January'),
('2',... | agpl-3.0 | 2,626,488,130,563,757,600 | 32.44086 | 72 | 0.609968 | false |
bigfatpaulyj/py-airfoil | scons-local-2.2.0/SCons/Tool/SCCS.py | 14 | 2415 | """SCons.Tool.SCCS.py
Tool-specific initialization for SCCS.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons F... | gpl-3.0 | -4,677,073,048,198,365,000 | 36.734375 | 114 | 0.72381 | false |
bavardage/statsmodels | statsmodels/tsa/tests/test_adfuller_lag.py | 3 | 1836 | # -*- coding: utf-8 -*-
"""Test for autolag of adfuller, unitroot_adf
Created on Wed May 30 21:39:46 2012
Author: Josef Perktold
"""
import numpy as np
from numpy.testing import assert_equal, assert_almost_equal
import statsmodels.tsa.stattools as tsast
from statsmodels.datasets import macrodata
def test_adf_autolag... | bsd-3-clause | -5,684,089,984,794,177,000 | 36.469388 | 79 | 0.598039 | false |
blueboxgroup/nova | nova/db/sqlalchemy/migrate_repo/versions/247_nullable_mismatch.py | 32 | 1560 | # Copyright 2014 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 requi... | apache-2.0 | 7,505,489,582,137,865,000 | 35.27907 | 78 | 0.728846 | false |
eepalms/gem5-newcache | src/arch/arm/ArmTLB.py | 10 | 2852 | # -*- mode:python -*-
# Copyright (c) 2009 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementatio... | bsd-3-clause | 2,232,287,449,664,401,000 | 47.338983 | 77 | 0.768934 | false |
realsobek/freeipa | ipaclient/remote_plugins/2_114/sudocmdgroup.py | 8 | 14955 | #
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
# pylint: disable=unused-import
import six
from . import Command, Method, Object
from ipalib import api, parameters, output
from ipalib.parameters import DefaultFrom
from ipalib.plugable import Registry
from ipalib.text import _
from ipapython.dn ... | gpl-3.0 | 2,376,423,638,030,372,400 | 26.694444 | 162 | 0.494751 | false |
SWENG500-Team1/FitnessForSplunk | fitness_for_splunk/bin/oauth2client/contrib/django_util/__init__.py | 9 | 11139 | # 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 agre... | mit | 4,711,334,333,327,672,000 | 35.283388 | 113 | 0.679235 | false |
MattWellie/PAGE_MPO | match_and_filter.py | 1 | 1983 | # Scratchy script to rematch all the variants I can find in the VCFs with the
# corresponding PP numbers, and peel out all the annotations present
import re
allele_freq = re.compile(";(?P<AF>[A-Z_35]*?_AF)=(?P<value>0\..*?);")
filtered_in = 'filtered_variant_results.txt'
unfiltered_in = 'all_variant_results.txt'
det... | apache-2.0 | -8,445,689,372,967,776,000 | 34.428571 | 94 | 0.543116 | false |
h4ck3rm1k3/ansible | v2/ansible/module_utils/facts.py | 1 | 106530 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 | 2,309,983,008,177,889,300 | 41.27381 | 165 | 0.506271 | false |
XiaoxiaoLiu/morphology_analysis | bigneuron/median_compare_to_consensus.py | 1 | 13289 | __author__ = 'xiaoxiaol'
import sys
import os
import platform
import matplotlib.pyplot as plt
import seaborn as sb
if (platform.system() == "Linux"):
WORK_PATH = "/local1/xiaoxiaol/work"
else:
WORK_PATH = "/Users/xiaoxiaoliu/work"
p = WORK_PATH + '/src/morphology_analysis'
sys.path.append(p)
import bign... | gpl-3.0 | 7,909,675,514,826,220,000 | 37.29683 | 188 | 0.591843 | false |
mfellner/maximilianfellner.eu | app/shared/models/__init__.py | 1 | 2730 | # -*- coding: utf-8 -*-
from abc import abstractmethod, ABCMeta
from flask.json import jsonify
from flask.ext.sqlalchemy import SQLAlchemy
import serialize
db = SQLAlchemy()
class JSendResponse(serialize.SerializableMixin):
"""Base class for restful JSON responses according to the JSend specification (http://... | bsd-3-clause | -1,181,844,369,541,499,600 | 25.25 | 118 | 0.624908 | false |
nextgis-extra/tests | lib_gdal/gdrivers/ers.py | 1 | 11795 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id: ers.py 33129 2016-01-23 21:10:49Z rouault $
#
# Project: GDAL/OGR Test Suite
# Purpose: Test ERS format driver.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
#####################... | gpl-2.0 | -2,559,820,417,308,844,000 | 29.796345 | 600 | 0.56295 | false |
ddy88958620/lib | Python/scrapy/scentiments/fragrancenet.py | 2 | 3201 | import re
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
from product_spiders.items import Product, ProductLoaderWithNameStrip as ProductLoader
fro... | apache-2.0 | -4,551,588,988,013,990,000 | 39.0125 | 109 | 0.578882 | false |
aldebaran/qibuild | python/qibuild/test/test_qibuild_make_host_tools.py | 1 | 2206 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Test QiBuild Make Host Tools """
from __future__ import absolute_import
from __future__ import unicode_literals
from __... | bsd-3-clause | 4,113,590,440,546,380,000 | 38.392857 | 84 | 0.706256 | false |
quark-mcu/qm-bootloader | tools/sysupdate/qmfmlib/dfu.py | 2 | 4542 | #!/usr/bin/python -tt
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Intel Corporation
# 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 co... | bsd-3-clause | 6,072,804,549,549,071,000 | 32.644444 | 79 | 0.653236 | false |
eayunstack/rally | tests/unit/plugins/common/sla/test_max_average_duration.py | 6 | 3022 | # Copyright 2014: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 1,555,456,327,963,673,300 | 36.775 | 78 | 0.619788 | false |
JioCloud/keystone | keystone/openstack/common/versionutils.py | 7 | 4958 | # Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | -1,415,123,992,306,960,100 | 32.5 | 78 | 0.639774 | false |
baleboy/crosswalk-app-tools | lint.py | 2 | 6253 | #!/usr/bin/env python
import os
import sys
import commands
import shutil
from optparse import OptionParser
import urllib2
import re
from bs4 import BeautifulSoup
import platform
os.system("node -v")
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
crosswalk_test_suite = os.path.join(SCRIPT_PATH, "crosswalk-te... | apache-2.0 | 3,776,121,237,849,668,600 | 46.732824 | 226 | 0.618743 | false |
fintech-circle/edx-platform | cms/djangoapps/contentstore/tests/test_libraries.py | 11 | 43471 | """
Content library unit tests that require the CMS runtime.
"""
import ddt
from django.test.utils import override_settings
from mock import Mock, patch
from opaque_keys.edx.locator import CourseKey, LibraryLocator
from contentstore.tests.utils import AjaxEnabledTestClient, parse_json
from contentstore.utils import re... | agpl-3.0 | 6,542,055,603,930,049,000 | 41.744346 | 118 | 0.640013 | false |
qtekfun/htcDesire820Kernel | external/chromium_org/tools/telemetry/telemetry/core/backends/form_based_credentials_backend_unittest_base.py | 24 | 4466 | # 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.
import logging
import os
import unittest
from telemetry.core import browser_finder
from telemetry.core import util
from telemetry.unittest import simple_mock... | gpl-2.0 | -3,466,527,188,530,815,000 | 33.890625 | 72 | 0.70936 | false |
AvsPmod/AvsPmod | macros/Examples/[3] Manual Telecide.py | 1 | 7720 | # This is an advanced macro designed to aid in the process of manual
# deinterlacing. In order to use this macro, you must first have a general
# understanding of the Telecide AviSynth filter, otherwise most of the stuff
# the macro does (and most of the description here) will be meaningless to
# you. You can learn e... | gpl-2.0 | -3,162,405,519,899,438,600 | 48.178344 | 104 | 0.635622 | false |
stimpsonsg/moose | python/MooseDocs/commands/generate.py | 4 | 1841 | import os
import MooseDocs
import mooseutils
import logging
log = logging.getLogger(__name__)
def generate_options(parser, subparser):
"""
Command-line options for generate command.
"""
generate_parser = subparser.add_parser('generate', help="Check that documentation exists for your application and gen... | lgpl-2.1 | 5,474,276,869,488,271,000 | 40.840909 | 190 | 0.677892 | false |
jeromecc/doctoctocbot | src/conversation/tree/descendant.py | 1 | 7925 | import logging
from typing import Optional
import queue
import threading
import sys
import pytz
from datetime import datetime, timedelta
import time
from constance import config
from bot.lib.statusdb import Addstatus
from conversation.models import Treedj, Tweetdj
from conversation.models import create_leaf, create_t... | mpl-2.0 | -4,849,885,340,449,427,000 | 30.959677 | 82 | 0.571483 | false |
buildbot/buildbot | master/buildbot/test/fake/botmaster.py | 5 | 1742 | # 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 | 204,329,116,648,731,100 | 34.55102 | 79 | 0.725603 | false |
OCHA-DAP/hdx-python-api | src/hdx/data/showcase.py | 1 | 14611 | # -*- coding: utf-8 -*-
"""Showcase class containing all logic for creating, checking, and updating showcases."""
import logging
import sys
from os.path import join
from typing import List, Union, Optional, Dict, Any, Tuple
from hdx.utilities import is_valid_uuid
from hdx.utilities.dictandlist import merge_two_diction... | mit | 3,910,999,517,759,824,400 | 40.86533 | 142 | 0.616659 | false |
NikNitro/Python-iBeacon-Scan | sympy/parsing/sympy_parser.py | 29 | 32979 | """Transform a string with Python-like source code into SymPy expression. """
from __future__ import print_function, division
from .sympy_tokenize import \
generate_tokens, untokenize, TokenError, \
NUMBER, STRING, NAME, OP, ENDMARKER
from keyword import iskeyword
import ast
import re
import unicodedata
im... | gpl-3.0 | 2,117,810,750,432,121,900 | 32.929012 | 125 | 0.543558 | false |
xuzhao1211/OnlineExam | misago/forums/models.py | 8 | 6732 | from urlparse import urlparse
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
from mptt.managers import TreeManager
from mptt.models import MPTTModel, TreeForeignKey
from misago.acl import version as acl_version
from misago.acl.models ... | gpl-2.0 | -3,858,689,910,301,039,600 | 34.246073 | 79 | 0.637849 | false |
systers/mailman | src/mailman/handlers/mime_delete.py | 7 | 11156 | # Copyright (C) 2002-2015 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... | gpl-3.0 | -6,272,591,452,590,293,000 | 35.338762 | 78 | 0.653101 | false |
germanovm/vdsm | tests/functional/virtTests.py | 3 | 20332 | #
# Copyright 2012 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in th... | gpl-2.0 | -3,675,394,720,704,090,000 | 40.663934 | 79 | 0.521837 | false |
tchx84/social-sugar | src/jarabe/controlpanel/toolbar.py | 2 | 5122 | # Copyright (C) 2007, 2008 One Laptop Per Child
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is di... | gpl-2.0 | 2,124,579,432,949,650,700 | 30.617284 | 78 | 0.602109 | false |
technologiescollege/s2a_fr | s2a/Python/Lib/lib2to3/tests/test_fixers.py | 8 | 120124 | """ Test suite for the fixer modules """
# Python imports
import os
import unittest
from itertools import chain
from operator import itemgetter
# Local imports
from lib2to3 import pygram, pytree, refactor, fixer_util
from lib2to3.tests import support
class FixerTestCase(support.TestCase):
# Other test cases ca... | gpl-3.0 | -3,671,492,013,689,923,000 | 25.239406 | 90 | 0.425036 | false |
Princu7/open-event-orga-server | app/helpers/data.py | 2 | 42967 | import json
import logging
import os.path
import random
import shutil
import traceback
from datetime import datetime, timedelta
from os import path
from urllib2 import urlopen
from uuid import uuid4
import PIL
import oauth2
from PIL import Image
from flask import flash, url_for, g, current_app
from flask.ext import lo... | gpl-3.0 | 4,234,962,103,604,400,600 | 39.804368 | 118 | 0.575535 | false |
johnnadratowski/examples | python/three_diamonds/three_diamonds.py | 2 | 1968 | import os
import requests
import googlemaps
from geopy.geocoders import Nominatim
from pyicloud import PyiCloudService
def get_icloud_device(cloud, device_id):
if device_id in cloud.devices:
return cloud.devices[device_id]
else:
return next(device for device in cloud.devices
... | mit | 7,761,675,304,604,290,000 | 34.142857 | 116 | 0.683943 | false |
charlesccychen/beam | sdks/python/apache_beam/runners/direct/helper_transforms.py | 5 | 3879 | #
# 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 | -5,541,005,732,885,359,000 | 35.252336 | 79 | 0.681103 | false |
Cinntax/home-assistant | tests/components/daikin/test_config_flow.py | 3 | 3176 | # pylint: disable=W0621
"""Tests for the Daikin config flow."""
import asyncio
import pytest
from homeassistant import data_entry_flow
from homeassistant.components.daikin import config_flow
from homeassistant.components.daikin.const import KEY_IP, KEY_MAC
from homeassistant.const import CONF_HOST
from tests.common ... | apache-2.0 | 2,297,188,636,298,029,600 | 30.445545 | 75 | 0.674748 | false |
rmcgibbo/scipy | scipy/spatial/kdtree.py | 23 | 37353 | # Copyright Anne M. Archibald 2008
# Released under the scipy license
from __future__ import division, print_function, absolute_import
import sys
import numpy as np
from heapq import heappush, heappop
import scipy.sparse
__all__ = ['minkowski_distance_p', 'minkowski_distance',
'distance_matrix',
... | bsd-3-clause | 49,220,198,291,345,260 | 37.58781 | 137 | 0.524135 | false |
epuzanov/ZenPacks.community.HPMon | ZenPacks/community/HPMon/modeler/plugins/community/snmp/HPDaLogDrvMap.py | 1 | 2623 | ################################################################################
#
# This program is part of the HPMon Zenpack for Zenoss.
# Copyright (C) 2008-2012 Egor Puzanov.
#
# This program can be used under the GNU General Public License version 2
# You can find full information here: http://www.zenoss.com/oss
#... | gpl-2.0 | 4,412,742,039,139,107,000 | 35.430556 | 80 | 0.487228 | false |
singleswitch/ticker | ticker.py | 1 | 31018 | #! /usr/bin/env python
import sys, os,time, shutil, copy
import numpy as np
from PyQt4 import QtCore, QtGui,QtNetwork
from ticker_layout import Ui_MainWindow
from ticker_widgets import ChannelVisualisation, AlphabetLabel, ClickGraphScene
from ticker_widgets import DictionaryDisplay,InstructionsDisplay,SentenceDispla... | mit | -7,585,681,300,317,747,000 | 45.157738 | 155 | 0.611903 | false |
redhat-openstack/ceilometer | ceilometer/tests/unit/test_messaging.py | 10 | 2520 | # Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | 4,521,507,094,438,750,700 | 37.769231 | 75 | 0.676587 | false |
angr/angr | angr/storage/memory_mixins/size_resolution_mixin.py | 1 | 5667 | from typing import Optional
import logging
from . import MemoryMixin
from ...errors import SimMemoryLimitError, SimMemoryError, SimUnsatError
l = logging.getLogger(__name__)
class SizeNormalizationMixin(MemoryMixin):
"""
Provides basic services related to normalizing sizes. After this mixin, sizes will alwa... | bsd-2-clause | 4,801,087,622,439,213,000 | 40.669118 | 141 | 0.602965 | false |
fake-name/ReadableWebProxy | WebMirror/management/rss_parser_funcs/feed_parse_extract33Fdtlx44WordpressCom.py | 1 | 1146 | def extract33Fdtlx44WordpressCom(item):
'''
Parser for '33fdtlx44.wordpress.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('PRC', 'PRC', 'translated'),
('Loiter... | bsd-3-clause | 694,607,589,493,561,900 | 33.757576 | 105 | 0.611693 | false |
0daylabs/WebXploiter-Docs | conf.py | 4 | 9255 | # -*- coding: utf-8 -*-
#
# WebXploit documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 2 12:35:07 2015.
#
# 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.
#
#... | gpl-3.0 | 5,449,078,688,407,971,000 | 31.247387 | 79 | 0.707401 | false |
ellkae/win-pkg-manager | wpm_db.py | 1 | 14196 | ########################################################################
# Group: Windows Package Manager #2
# Name: Joshua Stein
# Group Members: Sebastian Imlay and Timothy James Telan
# Date: October 3, 2011
# Class that takes care of all database queries
#############################################################... | mit | -6,396,381,771,849,262,000 | 35.214286 | 257 | 0.669062 | false |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/mkldnn/test_layer_norm_bf16_mkldnn_op.py | 2 | 5371 | # Copyright (c) 2020 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 app... | apache-2.0 | 7,962,912,321,997,282,000 | 35.787671 | 101 | 0.559858 | false |
vladyslav2/django-shop | shop/models_bases/managers.py | 8 | 5878 | # -*- coding: utf-8 -*-
from django.contrib.auth.models import AnonymousUser
from django.db import models, transaction
from django.db.models.aggregates import Count
from polymorphic.manager import PolymorphicManager
from shop.order_signals import processing
#==========================================================... | bsd-3-clause | -4,261,975,137,767,838,700 | 35.271605 | 79 | 0.576753 | false |
marrow/web.blueprint | setup.py | 1 | 3701 | #!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
import os
import sys
import codecs
try:
from setuptools.core import setup, find_packages
except ImportError:
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
if sys.version_info < (2... | mit | 8,587,443,514,297,042,000 | 28.141732 | 95 | 0.68468 | false |
rlutes/volttron-applications | pnnl/deprecated/AFDDAgent/afdd/Archive/agent_mt.py | 5 | 11161 | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
# Copyright (c) 2015, Battelle Memorial Institute
# 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. Redistri... | bsd-3-clause | 7,253,712,923,699,842,000 | 38.996416 | 82 | 0.629537 | false |
alexgleith/Quantum-GIS | cmake/FindQsci.py | 3 | 2183 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2012, Larry Shaffer <larry@dakotacarto.com>
# 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 reta... | gpl-2.0 | -3,858,368,333,479,964,700 | 47.511111 | 90 | 0.731104 | false |
sanguinariojoe/FreeCAD | src/Mod/Fem/femobjects/result_mechanical.py | 12 | 9806 | # ***************************************************************************
# * Copyright (c) 2016 Qingfeng Xia <qingfeng.xia()eng.ox.ac.uk> *
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... | lgpl-2.1 | -7,060,192,863,758,567,000 | 29.548287 | 87 | 0.456557 | false |
danforthcenter/plantcv | plantcv/plantcv/visualize/auto_threshold_methods.py | 2 | 3946 | # Compare auto threshold methods for a grayscale image
import os
import cv2
import numpy as np
from plantcv.plantcv import params
from plantcv.plantcv.transform import resize_factor
from plantcv.plantcv import plot_image
from plantcv.plantcv import print_image
from plantcv.plantcv import fatal_error
from plantcv.plant... | mit | -6,447,388,510,589,562,000 | 40.536842 | 120 | 0.65256 | false |
tstenner/bleachbit | bleachbit/RecognizeCleanerML.py | 1 | 5998 | # vim: ts=4:sw=4:expandtab
# BleachBit
# Copyright (C) 2008-2020 Andrew Ziem
# https://www.bleachbit.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... | gpl-3.0 | 905,560,385,984,819,800 | 32.50838 | 177 | 0.642714 | false |
henriquebastos/googlegroupexporter | googlegroupexporter/exporters/mbox.py | 1 | 1241 | from mailbox import mbox, Message
from googlegroupexporter.exporters import Exporter
class MailExporter(Exporter):
def __init__(self, *args, **kwargs):
super(MailExporter, self).__init__(*args, **kwargs)
self.mbox = None
self.summary = {}
def before_export(self, group_name):
... | mit | -6,006,324,279,972,019,000 | 24.854167 | 111 | 0.551974 | false |
PluribusNetworks/pluribus_neutron | neutron-plugin-pluribus/setup.py | 1 | 1360 | #!/usr/bin/env python
# COPYRIGHT 2014 Pluribus Networks 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 applic... | apache-2.0 | -4,210,123,063,918,219,300 | 33.871795 | 75 | 0.681618 | false |
mmgrant73/zeitcoin | zeitcoinamp.py | 1 | 73609 | #!/usr/bin/env python
#########################################
# Zeitcoin AMP Class
#########################################
import sys, os, time, threading, hashlib, random
from zeitcoindb import hashtable
from zeitcoinutility import utility,encyption
from zeitcointrans import transactions
from twisted.protocols im... | mit | -1,211,593,257,560,641,300 | 35.476214 | 223 | 0.71134 | false |
annoviko/pyclustering | pyclustering/cluster/examples/somsc_examples.py | 1 | 2482 | """!
@brief Examples of usage and demonstration of abilities of SOM-SC algorithm in cluster analysis.
@authors Andrei Novikov (pyclustering@yandex.ru)
@date 2014-2020
@copyright BSD-3-Clause
"""
from pyclustering.samples.definitions import SIMPLE_SAMPLES, FCPS_SAMPLES;
from pyclustering.cluster impor... | gpl-3.0 | -6,543,249,870,102,792,000 | 25.296703 | 96 | 0.696213 | false |
Spiderlover/Toontown | toontown/estate/DistributedAnimatedStatuary.py | 6 | 1976 | from pandac.PandaModules import NodePath
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
from toontown.estate import DistributedStatuary
from toontown.estate import GardenGlobals
from direct.actor import Actor
class DistributedAnimatedStatuary(DistributedStatuary.Distri... | mit | 1,556,222,840,028,331,500 | 42.911111 | 95 | 0.693826 | false |
tempbottle/Nuitka | nuitka/nodes/ConstantRefNodes.py | 1 | 8791 | # Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | apache-2.0 | 5,454,924,322,633,401,000 | 28.599327 | 109 | 0.579911 | false |
fabriziodemaria/luigi | luigi/postgres.py | 13 | 13451 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -2,892,266,080,129,253,000 | 33.489744 | 142 | 0.582782 | false |
tianocore/buildtools-BaseTools | Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py | 2 | 37721 | ## @file
# This file is used to parse a Module file of .PKG file
#
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
# distribution. ... | bsd-2-clause | 1,149,584,609,138,463,200 | 35.645709 | 120 | 0.589141 | false |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive2/structured/labs/serving/application/lib/pyasn1_modules/rfc5990.py | 13 | 5505 | #
# This file is part of pyasn1-modules software.
#
# Created by Russ Housley with assistance from asn1ate v.0.6.0.
#
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
# Use of the RSA-KEM Key Transport Algorithm in the CMS
#
# ASN.1 source from:
# https://www.rfc-editor.org... | apache-2.0 | -8,169,353,605,028,463,000 | 22.227848 | 76 | 0.711898 | false |
phrawzty/pelican-plugins | liquid_tags/mdx_liquid_tags.py | 11 | 3236 | """
Markdown Extension for Liquid-style Tags
----------------------------------------
A markdown extension to allow user-defined tags of the form::
{% tag arg1 arg2 ... argn %}
Where "tag" is associated with some user-defined extension.
These result in a preprocess step within markdown that produces
either markdo... | agpl-3.0 | 3,961,652,124,342,269,400 | 33.425532 | 77 | 0.596106 | false |
sserrot/champion_relationships | venv/Lib/site-packages/jinja2/nodes.py | 7 | 31095 | # -*- coding: utf-8 -*-
"""AST nodes generated by the parser for the compiler. Also provides
some node tree helper functions used by the parser and compiler in order
to normalize nodes.
"""
import operator
from collections import deque
from markupsafe import Markup
from ._compat import izip
from ._compat import PY2
f... | mit | -4,534,974,667,471,050,000 | 27.579963 | 88 | 0.598135 | false |
zstackio/zstack-woodpecker | integrationtest/vm/vpc_ha/suite_teardown.py | 2 | 1332 | '''
Integration Test Teardown case
@author: Youyk
'''
import zstacklib.utils.linux as linux
import zstacklib.utils.http as http
import zstackwoodpecker.setup_actions as setup_actions
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.clean_util as clean_util
import zstackwoodpecker.test_lib as te... | apache-2.0 | 1,106,873,221,679,088,500 | 33.153846 | 116 | 0.725225 | false |
cylc/cylc | cylc/flow/cycling/util.py | 1 | 1605 | # THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,... | gpl-3.0 | -738,610,313,434,172,500 | 35.477273 | 71 | 0.684735 | false |
AlgoLab/pygfa | test/test_dovetails_all_simple_paths.py | 1 | 6256 | import sys
sys.path.insert(0, '../')
import copy
import unittest
import pygfa
gfa_file = "H\tVN:Z:1.0\n" + "S\t1\t*\tLN:i:6871\tRC:i:2200067\n" \
+ "S\t10\t*\tLN:i:251\tRC:i:82006\n" + "S\t11\t*\tLN:i:208\tRC:i:39533\n" \
+ "S\t12\t*\tLN:i:186\tRC:i:34457\n" + "S\t16\t*\tLN:i:157\tRC:i:15334\n" \
+ "S\t18\t*\t... | mit | 5,264,646,996,850,292,000 | 48.650794 | 114 | 0.297315 | false |
paradoxxxzero/pyjade | pyjade/lexer.py | 1 | 23622 | from __future__ import absolute_import
import re
from collections import deque
import six
class Token:
def __init__(self, **kwds):
self.buffer = None
self.__dict__.update(kwds)
def __str__(self):
return self.__dict__.__str__()
def regexec(regex, input):
matches = regex.match(inp... | mit | 8,763,327,623,169,851,000 | 31.899721 | 147 | 0.461731 | false |
Adai0808/pybrain | pybrain/optimization/finitedifference/spsa.py | 25 | 2286 | __author__ = 'Frank Sehnke, sehnke@in.tum.de, Tom Schaul'
from scipy import random
from .fd import FiniteDifferences
class SimpleSPSA(FiniteDifferences):
""" Simultaneous Perturbation Stochastic Approximation.
This class uses SPSA in general, but uses the likelihood gradient and a simpler exploration decay... | bsd-3-clause | 9,036,491,802,210,398,000 | 39.105263 | 131 | 0.650044 | false |
corpusmusic/billboardcorpus | parse.py | 1 | 5825 | from __future__ import division
import os
import re
import csv
from collections import defaultdict, deque
ROOT_DIR = 'McGill-Billboard'
KEYS = [{'A'}, {'A#', 'Bb'}, {'B', 'Cb'}, {'C'}, {'C#', 'Db'}, {'D'}, {'D#', 'Eb'}, {'E', 'Fb'}, {'F'}, {'F#', 'Gb'}, {'G'}, {'G#', 'Ab'}]
RN = ['I', 'bII', 'II', 'bIII', 'III', 'I... | gpl-3.0 | 871,573,351,823,196,700 | 28.568528 | 201 | 0.636223 | 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.