repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
adamewing/tebreak | scripts/picklereads.py | 1 | 2261 | #!/usr/bin/env python
import os
import pickle
import argparse
import logging
from uuid import uuid4
from collections import defaultdict as dd
logger = logging.getLogger(__name__)
def output_fastq(ins, pickle, uuid):
out_sr_fn = '.'.join(pickle.strip().split('.')[:-1]) + '.' + uuid + '.SR.fastq'
out_dr_fn =... | mit | 6,442,492,667,076,628,000 | 29.146667 | 118 | 0.580716 | false |
webcomics/dosage | dosagelib/plugins/rhjunior.py | 1 | 1471 | # SPDX-License-Identifier: MIT
# Copyright (C) 2019-2020 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring
from ..scraper import _ParserScraper
class RHJunior(_ParserScraper):
stripUrl = 'https://www.rhjunior.com/%s/'
imageSearch = '//div[contains(@class, "entry-content")]//img'
multipleImagesPerS... | mit | -8,525,481,723,409,454,000 | 38.756757 | 83 | 0.558804 | false |
zingale/hydro_examples | advection/weno.py | 1 | 15253 | import numpy
from matplotlib import pyplot
import advection
import weno_coefficients
from scipy.integrate import ode
def weno(order, q):
"""
Do WENO reconstruction
Parameters
----------
order : int
The stencil width
q : numpy array
Scalar data to reconstruct
... | bsd-3-clause | -1,032,854,415,870,718,300 | 29.386454 | 81 | 0.485872 | false |
maikelwever/autoaurbuilder | autoaurbuilder/build/management/commands/schedule.py | 1 | 1383 | from django.core.management.base import BaseCommand
from package.models import Package
class Command(BaseCommand):
args = 'None'
help = 'Checks for updates on packages and schedules rebuilds if needed.'
def handle(self, *args, **kwargs):
self.stdout.write("Checking for updates on packages...")
... | gpl-3.0 | 53,555,113,558,810,240 | 35.394737 | 85 | 0.550253 | false |
gpoulter/pydedupe | dedupe/sim.py | 1 | 14909 | """Compare values, fields, and records for similarity"""
import collections
import logging
from dedupe.dale import similarity as dale
from dedupe.levenshtein import similarity as levenshtein
from dedupe.compat import OrderedDict as _OrderedDict
LOG = logging.getLogger('dedupe.sim')
class Convert(object):
"""Ge... | gpl-3.0 | -7,948,967,772,968,339,000 | 36.744304 | 79 | 0.592058 | false |
jromang/retina-old | distinclude/spyderlib/widgets/externalshell/baseshell.py | 1 | 12772 | # -*- coding: utf-8 -*-
#
# Copyright © 2010 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
# pylint: disable=C0103
# pylint: disable=R0903
# pylint: disable=R0911
# pylint: disable=R0201
import sys
import os
import os.path as osp
from time import ... | gpl-3.0 | 7,928,487,626,756,879,000 | 37.791277 | 82 | 0.548743 | false |
rosenbrockc/fortpy | fortpy/interop/converter.py | 1 | 19280 | import os
from .. import msg
import re
import xml.etree.ElementTree as ET
from fortpy.testing.comparer import FileComparer
class TemplateLine(object):
"""Represents a single line in the template file and how to format it.
:arg element: the XML element that defines this line in the file.
:arg group: the [g... | mit | -2,943,328,751,953,272,000 | 39.504202 | 110 | 0.578631 | false |
room77/py77 | pylib/util/singleton.py | 1 | 2390 | """
Singleton implementation.
Usage:
class A(singleton.Singleton): pass
Please NOTE:
id(A.Instance()), id(A))
"""
__copyright__ = '2013, Room 77, Inc.'
__author__ = 'Pramod Gupta'
import threading
# with_metaclass method from Six compatibility library.
# https://github.com/benjaminp/six/blob/1.11.0/six.py#L819
def... | mit | 9,167,899,862,102,201,000 | 28.875 | 98 | 0.648536 | false |
caktus/django-treenav | treenav/tests/test_views.py | 1 | 17704 | from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.core.cache import cache
from django.http import HttpRequest
from django.template import Template
from django.template.context import Context
from django.test import override_settings
from django.urls impor... | bsd-3-clause | 514,541,756,168,908,400 | 35.278689 | 89 | 0.546091 | false |
NarlikarLab/DIVERSITY | weblogoMod/weblogolib/__init__.py | 1 | 41331 | #!/usr/bin/env python
# -------------------------------- WebLogo --------------------------------
# Copyright (c) 2003-2004 The Regents of the University of California.
# Copyright (c) 2005 Gavin E. Crooks
# Copyright (c) 2006-2011, The Regents of the University of California, through
# Lawrence Berkeley Nationa... | gpl-3.0 | 6,209,968,925,322,337,000 | 34.265358 | 137 | 0.570637 | false |
EduPepperPDTesting/pepper2013-testing | lms/djangoapps/djangosaml2/unit_tests/settings.py | 1 | 5559 | # Django settings for tests2 project.
import django
import sys
sys.path.append("../..")
sys.path.append("../../../../..")
from siteconf import *
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'djan... | agpl-3.0 | 6,175,133,029,150,552,000 | 29.377049 | 88 | 0.681597 | false |
Yelp/paasta | tests/api/test_autoscaler.py | 1 | 3640 | # Copyright 2015-2016 Yelp 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 writin... | apache-2.0 | 6,430,667,032,950,880,000 | 38.565217 | 88 | 0.721429 | false |
lizardsystem/lizard-reportgenerator | lizard_reportgenerator/testsettings.py | 1 | 3058 | import os
from lizard_ui.settingshelper import setup_logging
from lizard_ui.settingshelper import STATICFILES_FINDERS
DEBUG = True
TEMPLATE_DEBUG = True
# SETTINGS_DIR allows media paths and so to be relative to this settings file
# instead of hardcoded to c:\only\on\my\computer.
SETTINGS_DIR = os.path.dirname(os.pa... | gpl-3.0 | -2,051,839,275,009,533,400 | 34.55814 | 79 | 0.701766 | false |
mredar/ucldc_oai_harvest | oai_harvester/oai_harvester.py | 1 | 6784 | #! /usr/bin/env python
'''UCLDC OAI Harvester: Collects records from OAI interfaces and inputs to
basic solr schema. Driven off the collection registry'''
'''
imagining right now that this will be woken by a crontab. It then looks at the
incoming queue and processes any "READY" msgs (maybe only ready ones there)
shoul... | bsd-3-clause | -3,734,049,030,187,922,000 | 38.672515 | 167 | 0.630159 | false |
egitto/parchment-and-copper | scratch/cryptopals/ctr.py | 1 | 1530 | from cbc import CBC_encrypt
from ecb import ECB_encrypt
from bytestring_tools import xor, data
from math import ceil
def counter_function(n):
return int.to_bytes(n,9,'big')+b'\x00'*7
def CTR_keystream(key,counter_function,length,start):
# start = nonce = first byte we haven't generated keystream for yet
# I hav... | gpl-3.0 | 8,308,754,510,609,592,000 | 33 | 107 | 0.713725 | false |
siconos/siconos-deb | examples/Control/Zhuravlev/ZhuravlevIvanovMCP_C.py | 1 | 4846 | import siconos.numerics as SN
import numpy as np
import matplotlib.pyplot as plt
try:
from cffi import FFI
except:
import sys
print('no cffi module installed, exiting')
sys.exit(0)
withPlot = False
if __name__ == '__main__':
xk = np.array((1., 10.))
T = 10.0
t = 0.0
h = 1e-3
z... | apache-2.0 | 1,840,833,609,540,054,800 | 26.072626 | 108 | 0.470491 | false |
tinyms/ArchiveX | tinyms/bpm/entity.py | 1 | 2197 | __author__ = 'tinyms'
#coding=UTF8
from sqlalchemy import Column, Integer, String, Text, LargeBinary, DateTime
from tinyms.core.orm import Simplify, Entity, many_to_one, many_to_many
#通知引擎处理节点
@many_to_one("BPMProcessInstance")
class BPMWorkflow(Entity, Simplify):
node_id = Column(Integer(), nullable=False)
#行... | bsd-3-clause | 3,168,598,971,852,385,300 | 28.028986 | 75 | 0.695457 | false |
simonsdave/yar | yar/key_service/async_creds_retriever.py | 1 | 2387 | """This module contains functionality to async'ly retrieve
credentials from the key store."""
import httplib
import logging
from ks_util import filter_out_non_model_creds_properties
from ks_util import AsyncAction
_logger = logging.getLogger("KEYSERVICE.%s" % __name__)
class AsyncCredsRetriever(AsyncAction):
... | mit | 6,111,016,473,754,680,000 | 30.826667 | 75 | 0.516967 | false |
j-dasilva/COMP4350 | apartment/rest/serializers.py | 1 | 1201 | from rest_framework import serializers
class MessageSerializer(serializers.Serializer):
sender = serializers.CharField(max_length=32)
recipient = serializers.CharField(max_length=32)
urgency = serializers.IntegerField()
content = serializers.CharField(max_length=256)
timestamp = serializers.Intege... | gpl-2.0 | 6,784,690,892,494,369,000 | 36.5625 | 62 | 0.766861 | false |
bowen0701/algorithms_data_structures | lc0419_battleships_in_a_board.py | 1 | 3508 | """Leetcode 419. Battleships in a Board
Medium
Given an 2D board, count how many battleships are in it.
The battleships are represented with 'X's, empty slots are represented with '.'s.
You may assume the following rules:
- You receive a valid board, made of only battleships or empty slots.
- Battleships can only be p... | bsd-2-clause | -7,352,669,705,755,854,000 | 26.622047 | 81 | 0.531357 | false |
firulais/snap-RPi | RPiGPIO.py | 1 | 3629 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Snap! extension to support Raspberry Pi -- server component.
Copyright (C) 2014 Paul C. Brown <p_brown@gmx.com>.
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 F... | gpl-3.0 | -8,815,553,636,177,159,000 | 29.225 | 114 | 0.587538 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/network_interface_ip_configuration.py | 1 | 5689 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -2,864,916,992,377,040,400 | 55.89 | 163 | 0.687291 | false |
gaccardo/buxfer_api | api/buxfer.py | 1 | 3631 | import requests
import settings
from pybles import pybles
from account import Account
from transaction import Transaction
from budget import Budget
from reminder import Reminder
requests.packages.urllib3.disable_warnings()
class ErrorWithBuxferAPI( Exception ): pass
class BuxferAPIUnauthorized( Exception ): pass
... | gpl-2.0 | 1,461,001,327,499,848,700 | 30.850877 | 80 | 0.590746 | false |
willkg/socorro-collector | collector/app/for_application_defaults.py | 1 | 3980 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""This is an extension to configman for Socorro. It creates a ValueSource
object that is also a 'from_string_converter... | mpl-2.0 | 5,234,856,872,957,514,000 | 45.27907 | 107 | 0.609548 | false |
jhford/picsort | picsort/sort.py | 1 | 8858 | import os
import optparse
import hashlib
import json
import shutil
from xml.dom import minidom
import multiprocessing # Only for CPU Count
import Queue
import threading
import time
import re
try:
import exifread
except ImportError:
print 'You are missing the exifread module. Try installing it'
print 'with... | gpl-2.0 | -670,674,206,479,652,600 | 29.335616 | 103 | 0.581847 | false |
BrandonLMorris/ml-examples | linear_regression/linear_regression.py | 1 | 5643 | #!/usr/local/env python3
"""
Simple linear regression with gradient descent. No optimization attempts have
been made, this is purely for example and educational purposes.
Data is randomly generated and saved to a file in the current directory for
reproduceability. To regenerate the data, simply delete the
'linear_regr... | apache-2.0 | -3,545,554,035,035,114,000 | 30.176796 | 79 | 0.600744 | false |
karstenw/nodebox-pyobjc | examples/Extended Application/matplotlib/examples/recipes/transparent_legends.py | 1 | 1700 | """
Transparent, fancy legends
==========================
Sometimes you know what your data looks like before you plot it, and
may know for instance that there won't be much data in the upper right
hand corner. Then you can safely create a legend that doesn't overlay
your data:
ax.legend(loc='upper right')
Other ... | mit | 154,122,098,309,639,550 | 25.169231 | 82 | 0.641765 | false |
lcy-seso/models | fluid/image_classification/caffe2fluid/kaffe/shapes.py | 1 | 5047 | import math
from collections import namedtuple
from .errors import KaffeError
Tensor4DShape = namedtuple('Tensor4DShape',
['batch_size', 'channels', 'height', 'width'])
Tensor3DShape = namedtuple('Tensor3DShape', ['batch_size', 'data1', 'data2'])
Tensor2DShape = namedtuple('Tensor2DShape'... | apache-2.0 | -4,642,686,649,229,181,000 | 31.772727 | 81 | 0.632059 | false |
adamfast/django-slowpoke | slowpoke/tests.py | 1 | 1096 | import time
from django.conf import settings
from django.test import TestCase
from slowpoke.decorator import time_my_test
from slowpoke.models import *
class SlowPokeDecoratorTests(TestCase):
@time_my_test('setup')
def setUp(self):
self._old_time_standards = getattr(settings, 'TIME_STANDARDS', Fals... | bsd-3-clause | 6,152,065,789,078,622,000 | 25.731707 | 133 | 0.64781 | false |
vponomaryov/manila | manila/tests/share/drivers/ibm/test_gpfs.py | 1 | 76891 | # Copyright (c) 2014 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | 8,466,903,491,964,898,000 | 45.970678 | 219 | 0.5632 | false |
underloki/Cyprium | app/cli/root/crypto/text/atomicdigits.py | 1 | 12349 | #! /usr/bin/python3
########################################################################
# #
# Cyprium is a multifunction cryptographic, steganographic and #
# cryptanalysis tool developped by members of The Hackademy. #
# Fre... | gpl-3.0 | -3,187,348,069,849,674,000 | 44.881041 | 123 | 0.458273 | false |
patrickfuller/imolecule | imolecule/format_converter.py | 1 | 7752 | """
Methods to interconvert between json and other (cif, mol, smi, etc.) files
"""
import imolecule.json_formatter as json
from collections import Counter
from fractions import gcd
from functools import reduce
# Open Babel <= '2.4.1'
try:
import pybel
ob = pybel.ob
table = ob.OBElementTable()
GetAtomi... | mit | -2,810,372,494,749,063,700 | 33.14978 | 79 | 0.611326 | false |
Dangetsu/vnr | Frameworks/Sakura/py/apps/browser/core/network.py | 1 | 6136 | # coding: utf8
# network.py
# 12/13/2012 jichi
__all__ = 'WbNetworkAccessManager',
import os
from PySide.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkDiskCache
from sakurakit import skfileio, sknetwork
from sakurakit.skdebug import dprint
import proxy, rc
## Cookie ##
class WbNetworkCookieJar(sk... | gpl-3.0 | -7,939,426,695,941,175,000 | 33.088889 | 119 | 0.683833 | false |
strange/django-simple-comments | simple_comments/views.py | 1 | 1442 | from django import http
from simple_comments import comments
def get_configuration_or_404(configuration_key):
try:
return comments.get_configuration(configuration_key)
except comments.CommentConfigurationNotRegistered:
raise http.Http404
def create_comment(request, configuration_key, target_i... | bsd-3-clause | -7,282,391,726,829,976,000 | 40.2 | 78 | 0.702497 | false |
jpvmm/DLearningExp | fuzzy.py | 1 | 4518 |
#Fuzzy Algorithm to mark calcifications in mammography
#I'm using Mandani Defuzzification
#FutureBox Analytics
from __future__ import division
import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as p
from skimage.io import imread
from skimage.measure import label, regionprops
from skimage.exposure i... | gpl-3.0 | 8,367,580,780,083,394,000 | 27.77707 | 99 | 0.542939 | false |
RaVenHelm/SortingClass | SortingClass.py | 1 | 9012 | from copy import copy
class SortingUtilClass:
@staticmethod
def list_to_string(values):
count = len(values) - 1
res = ''
for n in values:
fmt_string = '{:<3}'
res += fmt_string.format(n)
return res
@staticmethod
def print_results(comparisons, swaps):
print()
print('Analysis: ')
print('\t{0:<... | mit | 2,211,133,984,667,170,600 | 26.063063 | 114 | 0.642255 | false |
dgouldin/myspaceid-python-sdk | src/openid/fetchers.py | 1 | 14001 | # -*- test-case-name: openid.test.test_fetchers -*-
"""
This module contains the HTTP fetcher interface and several implementations.
"""
__all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse',
'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError',
'HTTPError']
import urll... | apache-2.0 | -4,169,098,957,301,690,000 | 31.560465 | 79 | 0.592029 | false |
g-weatherill/oq-risklib | openquake/commonlib/tests/_utils.py | 1 | 1745 | # Copyright (c) 2010-2014, GEM Foundation.
#
# NRML 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.
#
# NRML is distributed in t... | agpl-3.0 | -301,822,622,540,493,440 | 35.354167 | 74 | 0.699713 | false |
tuxlifan/moneyguru | core/model/currency.py | 1 | 17254 | # Copyright 2017 Virgil Dupras
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
"""This module facilitates currencies management. It exposes :class:`Currenc... | gpl-3.0 | 8,473,458,377,083,210,000 | 41.707921 | 118 | 0.596789 | false |
resolutedreamer/IR-Transmit-Receive | scripts/etc/init.d/notify_ip.py | 1 | 6098 | import smtplib
import subprocess
import sys
import time
import threading
import datetime
from email.mime.text import MIMEText
# Please Fill in with Correct Information to use
SMTP_SERVER = "smtp.gmail.com:587"
SMTP_UNAME = "email@email.com"
SMTP_PASSWD = "incorrect_password"
DEFAULT_NOTIFY_PAUSE = 3600
DEFAULT_CHECK_... | apache-2.0 | 7,988,192,192,993,335,000 | 33.067039 | 108 | 0.61594 | false |
marvinpinto/charlesbot-rundeck | tests/test_set_channel_topic.py | 1 | 3082 | import asynctest
import json
from asynctest.mock import patch
from asynctest.mock import call
class TestSetChannelTopic(asynctest.TestCase):
def setUp(self):
patcher1 = patch('charlesbot_rundeck.rundeck_lock.RundeckLock.seed_job_list') # NOQA
self.addCleanup(patcher1.stop)
self.mock_seed... | mit | 7,809,130,937,788,622,000 | 32.139785 | 94 | 0.490591 | false |
shreesundara/netsnmp | pysmi/compiler.py | 1 | 21084 | import sys
import os
import time
try:
from pwd import getpwuid
except ImportError:
getpwuid = lambda x: ['<unknown>']
from pysmi import __name__ as packageName
from pysmi import __version__ as packageVersion
from pysmi.mibinfo import MibInfo
from pysmi.codegen.symtable import SymtableCodeGen
from pys... | bsd-2-clause | 2,209,945,687,160,253,700 | 42.955224 | 266 | 0.572282 | false |
ST-Data-Mining/crater | george/klazzifiers.py | 1 | 5539 | from __future__ import division,print_function
from os import environ
import sys
HOME=environ['HOME']
PROJECT_ROOT=HOME+'/Panzer/NCSU/Spatial and Temporal/crater'
EXPTS = PROJECT_ROOT+'/expts'
sys.path.extend([PROJECT_ROOT,EXPTS])
sys.dont_write_bytecode = True
from george.lib import *
from expts.csvParser import parse... | mit | -4,664,917,264,122,412,000 | 28.462766 | 97 | 0.625925 | false |
rosarior/django-sabot | setup.py | 1 | 1301 | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
with open('README.rst') as f:
readme = f.read()
with open('HISTORY.rst') as f:
... | mit | 5,138,860,737,166,539,000 | 26.104167 | 70 | 0.624135 | false |
YoungKwonJo/mlxtend | mlxtend/data/iris.py | 1 | 6046 | # Sebastian Raschka 2015
# mlxtend Machine Learning Library Extensions
import numpy as np
def iris_data():
"""Iris flower dataset.
Returns
--------
X, y : [n_samples, n_features], [n_class_labels]
X is the feature matrix with 150 flower samples as rows,
and the 3 feature columns sepal len... | bsd-3-clause | -8,277,334,933,845,212,000 | 32.588889 | 86 | 0.275885 | false |
isb-cgc/ISB-CGC-data-proc | bigquery_etl/extract/utils.py | 1 | 2377 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
# Copyright 2015, Institute for Systems Biology.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | apache-2.0 | 8,472,730,164,494,883,000 | 33.449275 | 118 | 0.6504 | false |
jambonrose/roman-numerals | tests/test_to_numeral.py | 1 | 1683 | """
Test conversion from integer to Roman numeral
"""
from typing import Any
import pytest
from roman_numerals import LOWERCASE, convert_to_numeral
from .parameters import LOWERCASE_PARAMETERS, STANDARD_PARAMETERS
@pytest.mark.parametrize(
"decimal_integer, expected_numeral",
STANDARD_PARAMETERS)
def test_... | bsd-2-clause | 6,595,135,498,576,320,000 | 23.391304 | 79 | 0.672014 | false |
sargm/selenium-py-traning-barancev | php4dvd/model/application.py | 1 | 4501 | from selenium.common.exceptions import *
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from php4dvd.pages.page import Page
from php4dvd.pages.login_page import LoginPage
... | apache-2.0 | -5,599,819,519,281,207,000 | 36.508333 | 103 | 0.647856 | false |
pkilambi/ceilometer | ceilometer/storage/impl_mongodb.py | 1 | 35357 | #
# Copyright 2012 New Dream Network, LLC (DreamHost)
# Copyright 2013 eNovance
# Copyright 2014 Red Hat, Inc
#
# Authors: Doug Hellmann <doug.hellmann@dreamhost.com>
# Julien Danjou <julien@danjou.info>
# Eoghan Glynn <eglynn@redhat.com>
#
# Licensed under the Apache License, Version 2.0 (the "Licens... | apache-2.0 | 8,195,262,560,355,288,000 | 39.454233 | 79 | 0.535735 | false |
ebakan/Python | urler.py | 1 | 1086 | #!/usr/bin/env python
import urllib.request
def genterm(inp):
def foo(x):
if x.isalpha():
return x
else:
return '%{0}'.format(hex(ord(x))[2:])
return ''.join(map(foo,inp))
def genresults(inp):
page=urllib.request.urlopen('http://ajax.googleapis.com/ajax/services/sea... | gpl-3.0 | -8,417,570,026,628,726,000 | 25.487805 | 99 | 0.571823 | false |
grakiss888/testapi | update/templates/update_mongodb.py | 1 | 2865 | ##############################################################################
# Copyright (c) 2016 ZTE Corporation
# feng.xiaowei@zte.com.cn
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, ... | apache-2.0 | -7,486,893,034,568,809,000 | 30.833333 | 78 | 0.597208 | false |
jonanv/Data-Mining | kNN.py | 1 | 2152 | # Example of kNN implemented from Scratch in Python
import csv
import random
import math
import operator
def loadDataset(filename, split, trainingSet=[] , testSet=[]):
with open(filename, 'rb') as csvfile:
lines = csv.reader(csvfile)
dataset = list(lines)
for x in range(len(dataset)-1):
for y... | gpl-3.0 | 3,967,955,662,638,029,000 | 27.328947 | 87 | 0.681227 | false |
Prev/jikji | tests/test_generator.py | 1 | 1600 | """
tests.generator
---------------
Test generator of application
:author: Prev(prevdev@gmail.com)
"""
import pytest
import os
import shutil
from jikji import Jikji
def test_generate1() :
""" Testing for generating of testapp1
"""
jikji = Jikji('tests/testapp1', options=['sclear'])
OUTPUT_ROOT = jikji.set... | mit | -1,156,732,441,587,812,000 | 18.277108 | 74 | 0.63375 | false |
fffonion/xeHentai | xeHentai/i18n/__init__.py | 1 | 1102 | #!/usr/bin/env python
# coding:utf-8
# Contributor:
# fffonion <fffonion@gmail.com>
import importlib
from ..const import *
from . import en_us as lng_fallback
try:
_locale = LOCALE.lower() if LOCALE else 'en_us'
if _locale in ('zh_cn', 'zh_sg'):
_locale = 'zh_hans'
elif _locale in ('zh... | gpl-3.0 | -3,419,455,272,191,152,000 | 28.783784 | 97 | 0.549002 | false |
hubert667/AIR | src/scripts/kmeansScipy.py | 1 | 3802 | import random, pickle, os, sys
import numpy as np
from clusterData import *
from scipy.cluster.vq import kmeans,vq,whiten
class KMeans:
def __init__(self, fK, tK, filename, typeDataset):
self.queryRankerList = []
self.bestKClusterGroup = []
self.queryRankerDict = {}
se... | gpl-3.0 | -3,934,938,312,269,193,000 | 41.701149 | 150 | 0.593898 | false |
nuagenetworks/tempest | tempest/common/dynamic_creds.py | 1 | 17614 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -7,163,394,698,792,381,000 | 43.933673 | 79 | 0.56756 | false |
whiteShtef/BlobStore | blobstore/app/app.py | 1 | 2467 | import os
import io
import flask
import flask_restful
from flask_cors import CORS, cross_origin
import flask_cache
import blobstorecore
import tools
import json
app = flask.Flask(__name__)
app.config["CACHE_DEFAULT_TIMEOUT"] = int(os.environ.get("CACHE_DEFAULT_TIMEOUT", 50))
app.config["CACHE_THRESHOLD"] = int(os.envi... | mit | -2,466,128,191,824,501,000 | 29.8375 | 91 | 0.645318 | false |
denmojo/pygrow | grow/commands/filter.py | 1 | 2992 | from grow.pods import pods
from grow.pods import storage
import click
import os
@click.command()
@click.argument('pod_path', default='.')
@click.option('--include-obsolete/--no-include-obsolete', default=False,
is_flag=True,
help='Whether to include obsolete messages. If false, obsolete'
... | mit | 5,153,167,556,879,288,000 | 53.4 | 79 | 0.621658 | false |
alex4108/scLikesDownloader | scLikesDownloader.py | 1 | 12232 | import soundcloud as sc
from soundcloud.resource import Resource
import sys
import os
import urllib2
import re
class downloader:
def __init__(self, UserURL, PATH):
try:
self.client = sc.Client(client_id='',
client_secret='',
)
self.user = self.c... | gpl-2.0 | 3,850,365,799,363,366,400 | 36.179331 | 172 | 0.435988 | false |
rbas/simocollector | simocollector/bin/install-simocollection.py | 1 | 8054 | #!/usr/bin/env python
import os
import argparse
import json
import subprocess
import urllib2
import getpass
import socket
import psutil
from simocollector.sender import BaseObjectSender, BaseMultiObjectSender
from simocollector.collectors import system_info_collector
from simocollector.utils import slugify
CRON_JOB_... | mit | 6,288,456,403,123,903,000 | 29.976923 | 108 | 0.604048 | false |
ksmit799/Toontown-Source | toontown/safezone/DistributedCheckers.py | 1 | 29924 | from pandac.PandaModules import *
from direct.distributed.ClockDelta import *
from direct.task.Task import Task
from direct.interval.IntervalGlobal import *
from TrolleyConstants import *
from direct.gui.DirectGui import *
from toontown.toonbase import TTLocalizer
from direct.distributed import DistributedNode
from dir... | mit | 4,444,623,332,312,362,000 | 39.547425 | 363 | 0.554471 | false |
ilona-asa/LDSAproject | email_counter.py | 1 | 2018 | #!/usr/bin/env python
import os
rootdir ='enron_mail_20110402/maildir'
for user in os.listdir(rootdir):
sent_items = 0
sent = 0
_sent_mail = 0
inbox = 0
total = 0
for folder in os.listdir(rootdir+'/'+user):
# print '%s\t%s' % ((folder, os.path.isdir(folde... | mit | 7,093,846,238,697,374,000 | 41.957447 | 76 | 0.387017 | false |
graik/biskit | biskit/core/pdbparsePickle.py | 1 | 4284 | ## numpy-oldnumeric calls replaced by custom script; 09/06/2016
## Automatically adapted for numpy-oldnumeric Mar 26, 2007 by alter_code1.py
##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner
##
## This program is free software; you can r... | gpl-3.0 | 1,253,569,983,927,946,800 | 32.732283 | 78 | 0.628385 | false |
jolyonb/edx-platform | lms/djangoapps/lti_provider/tests/test_signature_validator.py | 1 | 3845 | """
Tests for the SignatureValidator class.
"""
from __future__ import absolute_import
import ddt
from django.test import TestCase
from django.test.client import RequestFactory
from mock import patch
from lti_provider.models import LtiConsumer
from lti_provider.signature_validator import SignatureValidator
def get... | agpl-3.0 | -1,902,899,896,321,596,400 | 31.041667 | 85 | 0.66788 | false |
tdickers/mitmproxy | test/netlib/http/test_cookies.py | 1 | 6365 | from netlib.http import cookies
from netlib.tutils import raises
def test_read_token():
tokens = [
[("foo", 0), ("foo", 3)],
[("foo", 1), ("oo", 3)],
[(" foo", 1), ("foo", 4)],
[(" foo;", 1), ("foo", 4)],
[(" foo=", 1), ("foo", 4)],
[(" foo=bar", 1), ("foo", 4)],
... | mit | -1,637,221,477,777,298,200 | 24.769231 | 84 | 0.394973 | false |
jevinw/rec_utilities | babel_util/parsers/tree.py | 1 | 4791 | #!/usr/bin/env python
import logging
class TreeFile(object):
"""Handling functions for tree files, as produced by Infomap.
The file should be a plain text file with the following format:
<cluster_id> <score> <paper_id>
1:1:1:1 0.000021 "123456"
1:1:1:2 0.023122 "8675309"
"""
def __init__(... | agpl-3.0 | 51,877,899,420,969,890 | 31.591837 | 98 | 0.540388 | false |
evilchili/shiptrak | mmsn/settings/__init__.py | 1 | 4072 | """
Django settings for mmsn project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
import socket
import dj_database_url
from django.utils.crypto import get_rando... | mit | -5,726,247,871,517,285,000 | 26.513514 | 100 | 0.658644 | false |
igemsoftware/HFUT-China_2015 | design/search_part.py | 1 | 5122 | """
search_part.py realize the part search
@author: Bowen
"""
from elasticsearch import Elasticsearch
from design.models import parts, teams, team_parts, part_papers, paper
import traceback
def getPart(partName):
"""
find the part with part name
@param partName: name of a part
@type partName: str
... | apache-2.0 | 1,825,477,763,711,557,600 | 28.606936 | 85 | 0.545881 | false |
ruipgil/TrackToTrip | scripts/test/test_t_mode_changepoint.py | 1 | 2236 | from tracktotrip import Track
import tracktotrip.transportation_mode as tm
from changepy import pelt
from changepy.costs import normal_mean
import numpy as np
import matplotlib.pyplot as plt
temp_trk = [
Track.from_gpx('/Users/ruipgil/tracks/backup/2015-07-23_1.gpx')[0],
Track.from_gpx('/Users/ruipgil/tracks/... | mit | -9,132,506,782,880,904,000 | 24.123596 | 97 | 0.647138 | false |
pybel/pybel-tools | src/pybel_tools/analysis/neurommsig/export.py | 1 | 8861 | # -*- coding: utf-8 -*-
"""This module contains the functions needed to process the NeuroMMSig excel sheets as well as export as BEL.
To run, type :code:`python3 -m pybel_tools.analysis.neurommsig` in the command line
"""
import itertools as itt
import logging
import os
import re
import time
from functools import pa... | mit | 6,785,736,960,564,687,000 | 33.341085 | 112 | 0.611174 | false |
bloomberg/bqplot | tests/marks_test.py | 1 | 1593 | import bqplot
import numpy as np
import pytest
def test_scatter(figure):
x = np.arange(10, dtype=np.float64)
y = (x**2).astype(np.int32)
scatter = bqplot.Scatter(x=x, y=y)
assert scatter.x.dtype == np.float64
assert scatter.y.dtype == np.int32
assert scatter.x.shape == (10,)
assert scatte... | apache-2.0 | -216,256,783,966,949,120 | 30.235294 | 90 | 0.599498 | false |
ilya-epifanov/ansible | lib/ansible/cli/doc.py | 1 | 11138 | # (c) 2014, James Tanner <tanner.jc@gmail.com>
#
# 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 i... | gpl-3.0 | -8,255,860,300,840,190,000 | 35.638158 | 158 | 0.532412 | false |
linktlh/Toontown-journey | otp/uberdog/GlobalOtpObjectUD.py | 1 | 1956 | from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
MANAGER_CLASS = ''
class GlobalOtpObjectUD(DistributedObjectGlobalUD):
notify = directNotify.newCategory('GlobalOtpObjectUD')
def announceGenerate(self):
DistributedObjectGlobalUD.announceGenerate(self)
self.s... | apache-2.0 | -1,745,958,492,094,661,600 | 37.352941 | 97 | 0.685072 | false |
xiangke/pycopia | mibs/pycopia/mibs/UCD_SNMP_MIB.py | 1 | 28770 | # python
# This file is generated by a program (mib2py). Any edits will be lost.
from pycopia.aid import Enum
import pycopia.SMI.Basetypes
Range = pycopia.SMI.Basetypes.Range
Ranges = pycopia.SMI.Basetypes.Ranges
from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N... | lgpl-2.1 | 7,706,995,773,191,167,000 | 27.97281 | 525 | 0.714599 | false |
CFDEMproject/LAMMPS | tools/moltemplate/src/ltemplify.py | 1 | 94070 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Andrew Jewett (jewett.aij at g mail)
# http://www.chem.ucsb.edu/~sheagroup
# License: 3-clause BSD License (See LICENSE.TXT)
# Copyright (c) 2012, Regents of the University of California
# All rights reserved.
"""
ltemplify.py
The "ltemplify.py" script... | gpl-2.0 | -8,459,022,808,084,960,000 | 45.248771 | 148 | 0.452418 | false |
axptwig/CSCI-2963--Intro-to-Open-Source | files/Lab7/words5unordered.py | 1 | 2890 | """
Words/Ladder Graph
------------------
Generate an undirected graph over the 5757 5-letter words in the
datafile words_dat.txt.gz. Two words are connected by an edge
if they differ in one letter, resulting in 14,135 edges. This example
is described in Section 1.1 in Knuth's book [1]_,[2]_.
References
----------
..... | mit | 7,894,361,437,417,402,000 | 35.125 | 100 | 0.582699 | false |
ph1l/ocemr | ocemr/modelviz.7.py | 1 | 6810 | #!/usr/bin/env python
"""Django model to DOT (Graphviz) converter
by Antonio Cavedoni <antonio@cavedoni.org>
Make sure your DJANGO_SETTINGS_MODULE is set to your project or
place this script in the same directory of the project and call
the script like this:
$ python modelviz.py [-h] [-d] [-i <model_names>] [-e <mode... | gpl-3.0 | -5,578,806,056,656,196,000 | 29.538117 | 114 | 0.5442 | false |
dimara/synnefo | snf-pithos-app/pithos/api/test/__init__.py | 1 | 26757 | #!/usr/bin/env python
#coding=utf8
# Copyright (C) 2010-2014 GRNET S.A.
#
# 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
# (at your option) any later version... | gpl-3.0 | -1,280,235,108,467,557,400 | 37.947598 | 79 | 0.569982 | false |
mkrapp/pystable | src/pystable.py | 1 | 11946 | from ConfigParser import SafeConfigParser
import sys, os
from string import Template
import markdown2
import shutil
import glob
from dateutil.parser import parse
import calendar
def parse_config(posts_directory):
global site_title, site_subtitle, site_author, \
site_aboutme, site_info, site_syntax, \
... | gpl-2.0 | 7,100,139,526,058,622,000 | 38.556291 | 194 | 0.597438 | false |
Jackson-Y/Machine-Learning | text/classification_logistic_regression.py | 1 | 3574 | #-*- coding: utf-8 -*-
'''
Description:
Text Classification Based on Logistic Regression.
Version:
python3
'''
import scipy as sp
import numpy as np
from matplotlib import pyplot
from matplotlib import pylab
from sklearn.datasets import load_files
from sklearn.model_selection import train_test_split
from sklear... | mit | -1,780,801,201,349,490,200 | 28.158879 | 86 | 0.696474 | false |
pmeier82/django-spikeval | djspikeval/views/algorithm.py | 1 | 2234 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import apps
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse_lazy
from django.db.models import Q
from django.shortcuts import redirect
from django.v... | bsd-3-clause | -5,051,124,523,755,810,000 | 29.60274 | 117 | 0.703671 | false |
FlowBoat/Flow-Tech-NeurAlgae | Versions/v2/v2.0/NeurAlgae2.0.py | 1 | 15860 | # FlowTech | NeurAlgae
## 2017 CWSF Science Fair | NeurAlgae: HAB Prediction Using Machine Learning Algorithms
#Describes and trains a neural network for the analysis and prediction of algal bloom data
#Copyright (C) 2017 Zachary Trefler and Atif Mahmud
#This program is free software: you can redistribute it and/or m... | gpl-3.0 | -8,447,979,558,048,298,000 | 41.98103 | 123 | 0.674149 | false |
openstack/kuryr | kuryr/tests/unit/binding/drivers/test_macvlan.py | 1 | 3091 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -4,145,377,892,585,740,000 | 43.157143 | 77 | 0.657392 | false |
temnoregg/django-muzo | muzo/ws.py | 1 | 7137 | from SOAPpy import WSDL
from django.utils.translation import gettext_lazy as _
from django.conf import settings
from os.path import dirname
from signature import CSignature
from models import MERCHANT_NUM
MUZO_ORDER_STATES = {
0: _('UNKNOWN'),
1: _('REQUESTED'),
2: _('PENDING'),
3: _('CREATED'),
4: _('APPROVE... | mit | -1,142,081,912,268,378,500 | 34.507463 | 136 | 0.676475 | false |
IntelLabsEurope/infrastructure-repository | monitoring_service/epa_database/hw_reources.py | 1 | 12910 | # Copyright 2015 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | 8,347,671,430,936,619,000 | 32.273196 | 114 | 0.608521 | false |
anhiga/poliastro | src/poliastro/tests/tests_twobody/test_sample.py | 1 | 3519 | import pytest
from astropy.tests.helper import assert_quantity_allclose
from astropy import units as u
from astropy.time import Time
from poliastro.bodies import Earth, Sun
from poliastro.twobody import Orbit
from poliastro.twobody.propagation import kepler, mean_motion, cowell
import numpy as np
from poliastro.util... | mit | -3,945,005,692,256,854,000 | 30.702703 | 82 | 0.651037 | false |
GrahamDumpleton/ispyd | ispyd/manager.py | 1 | 2308 | import atexit
import cmd
import ConfigParser
import os
import socket
import threading
import traceback
import sys
from ispyd.shell import RootShell
class ShellManager(object):
def __init__(self, config_file):
self.__config_file = config_file
self.__config_object = ConfigParser.RawConfigParser()
... | apache-2.0 | -6,454,305,951,312,017,000 | 27.85 | 78 | 0.555893 | false |
jart/tensorflow | tensorflow/python/eager/backprop.py | 1 | 29803 | # 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 | 6,596,691,934,725,755,000 | 33.494213 | 108 | 0.664497 | false |
waytai/pytracemalloctext | tests/python_memleak.py | 1 | 3305 | """
Memory usage of Python < 3.3 grows between some function calls, randomly,
whereas it should stay stable. The final memory usage should be close to the
initial memory usage.
Example with Python 2.6:
Initial memory:
VmRSS: 3176 kB
After call #1:
VmRSS: 4996 kB
After call #2... | mit | -3,558,270,381,872,102,400 | 27.247863 | 103 | 0.645386 | false |
cburschka/NBT | examples/block_analysis.py | 1 | 8106 | #!/usr/bin/env python
"""
Finds the contents of the different blocks in a level, taking different data values (sub block types) into account.
"""
import locale, os, sys
import glob
# local module
try:
import nbt
except ImportError:
# nbt not in search path. Let's see if it can be found in the parent folder
... | mit | -2,987,137,642,103,406,600 | 45.855491 | 152 | 0.596348 | false |
takeshitakenji/wikiserv | src/config.py | 1 | 6694 | #!/usr/bin/env python3
import sys
if sys.version_info < (3, 3):
raise RuntimeError('At least Python 3.3 is required')
from lxml import etree
from datetime import timedelta
import hashers, processors
from os.path import join as path_join, dirname, normpath, isabs, abspath
import logging
LOGGER = logging.getLogger(__n... | apache-2.0 | 403,927,196,099,338,050 | 34.231579 | 144 | 0.717956 | false |
rockfruit/bika.lims | bika/lims/browser/batch/analysisrequests.py | 1 | 2111 | # This file is part of Bika LIMS
#
# Copyright 2011-2016 by it's authors.
# Some rights reserved. See LICENSE.txt, AUTHORS.txt.
from operator import itemgetter
from bika.lims import bikaMessageFactory as _
from bika.lims.utils import t
from bika.lims.browser.analysisrequest import AnalysisRequestAddView as _ARAV
from ... | agpl-3.0 | 2,410,436,482,305,657,300 | 39.596154 | 77 | 0.71009 | false |
09zwcbupt/ryu | ryu/lib/packet/udp.py | 1 | 2010 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | -6,886,356,583,741,292,000 | 34.892857 | 72 | 0.612438 | false |
stephanie-wang/ray | python/ray/autoscaler/gcp/config.py | 1 | 14384 | import os
import logging
import time
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.backends import default_backend
from googleapiclient import discovery, errors
logger = logging.getLogger(__name__)
crm = discovery.build("cl... | apache-2.0 | -4,714,851,947,882,477,000 | 31.107143 | 79 | 0.621593 | false |
iandees/all-the-places | locations/spiders/ljsilvers.py | 1 | 1524 | # -*- coding: utf-8 -*-
import scrapy
import json
import re
from locations.items import GeojsonPointItem
class LjsilversSpider(scrapy.Spider):
name = "ljsilvers"
allowed_domains = ["ljsilvers.com"]
start_urls = (
'http://www.ljsilvers.com/locator?postalcode=76010',
)
def parse(self, resp... | mit | -8,044,704,276,494,561,000 | 32.130435 | 115 | 0.467192 | false |
twhyntie/tasl-data-management | wrappers/test_nod.py | 1 | 1166 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#...the usual suspects.
import os, inspect
#...for the unit testing.
import unittest
#...for the logging.
import logging as lg
# The wrapper class to test.
from nod import NOD
class TestNOD(unittest.TestCase):
def setUp(self):
pass
def tearDown(self)... | mit | -4,170,661,468,903,382,500 | 21 | 77 | 0.559177 | false |
certik/hermes-gui | hermesgui/core/handle_hermes.py | 1 | 1543 | from hermes2d import Mesh, H1Shapeset, PrecalcShapeset, H1Space, \
WeakForm, Solution, ScalarView, LinSystem, DummySolver, \
MeshView, set_verbose, plot_mesh_mpl_simple
from hermes2d.forms import set_forms
from hermes2d.mesh import read_hermes_format
def read_mesh(filename):
nodes, ... | bsd-3-clause | 3,263,927,270,197,432,300 | 28.113208 | 73 | 0.657161 | false |
nkoep/blaplay | blaplay/blagui/blaqueue.py | 1 | 13341 | # blaplay, Copyright (C) 2014 Niklas Koep
# 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 distribut... | gpl-2.0 | 1,768,491,662,655,170,000 | 33.562176 | 78 | 0.58174 | false |
juliantaylor/scipy | scipy/optimize/cobyla.py | 2 | 9434 | """
Interface to Constrained Optimization By Linear Approximation
Functions
---------
.. autosummary::
:toctree: generated/
fmin_cobyla
"""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy.lib.six import callable
from scipy.optimize import _cobyla
from .optimize... | bsd-3-clause | -2,557,425,230,123,296,300 | 32.572954 | 79 | 0.587662 | false |
dcsch/pyif | pyif/util.py | 1 | 1607 |
def is_whitespace(c):
if c == " " or c == "\t" or c == "\n":
return True
return False
def compress_whitespace(s):
"""
Remove extraneous whitespace from the string, that being all whitespace at the beginning
and end of the string and anything beyond a single space within the string.
"""... | mit | -8,638,453,769,667,749,000 | 25.783333 | 92 | 0.481643 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.