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 |
|---|---|---|---|---|---|---|---|---|---|---|
IITBinterns13/edx-platform-dev | common/lib/capa/capa/tests/__init__.py | 11 | 1633 | import fs.osfs
import os, os.path
from capa.capa_problem import LoncapaProblem
from mock import Mock, MagicMock
import xml.sax.saxutils as saxutils
TEST_DIR = os.path.dirname(os.path.realpath(__file__))
def tst_render_template(template, context):
"""
A test version of render to template. Renders to the re... | agpl-3.0 | 7,381,787,580,216,814,000 | 32.326531 | 135 | 0.670545 | false |
GHackAnonymous/linux | tools/perf/python/twatch.py | 1565 | 1316 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 | 1,542,886,843,123,924,000 | 31.097561 | 75 | 0.668693 | false |
wangxuan007/flasky | venv/lib/python2.7/site-packages/flask_script/commands.py | 56 | 18544 | # -*- coding: utf-8 -*-
from __future__ import absolute_import,print_function
import os
import sys
import code
import warnings
import string
import inspect
import argparse
from flask import _request_ctx_stack
from .cli import prompt, prompt_pass, prompt_bool, prompt_choices
from ._compat import izip, text_type
cl... | gpl-3.0 | -504,410,521,701,191,500 | 35.289628 | 157 | 0.539258 | false |
RedhawkSDR/throughput | streams/corba/__init__.py | 1 | 2738 | #
# This file is protected by Copyright. Please refer to the COPYRIGHT file
# distributed with this source distribution.
#
# This file is part of REDHAWK throughput.
#
# REDHAWK throughput is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published ... | lgpl-3.0 | -3,613,529,215,171,284,500 | 31.987952 | 85 | 0.67458 | false |
mitchellzen/pops | satchmo/apps/payment/signals.py | 13 | 1911 | import django.dispatch
#: Sent after ensuring that the cart and order are valid.
#:
#: :param sender: The controller which performed the sanity check.
#: :type sender: ``payment.views.confirm.ConfirmController``
#:
#: :param controller: The controller which performed the sanity check.
#: :type controller: ``payment.vi... | bsd-3-clause | -3,336,535,448,128,325,000 | 35.75 | 79 | 0.710623 | false |
PaulStoffregen/micropython | tests/bytecode/pylib-tests/_weakrefset.py | 766 | 5570 | # Access WeakSet through the weakref module.
# This code is separated-out because it is needed
# by abc.py to load everything else at startup.
from _weakref import ref
__all__ = ['WeakSet']
class _IterationGuard:
# This context manager registers itself in the current iterators of the
# weak container, such ... | mit | -6,116,134,440,736,222,000 | 27.71134 | 92 | 0.556553 | false |
steebchen/youtube-dl | youtube_dl/extractor/rtl2.py | 12 | 7153 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..aes import aes_cbc_decrypt
from ..compat import (
compat_b64decode,
compat_ord,
compat_str,
)
from ..utils import (
bytes_to_intlist,
ExtractorError,
intlist_to_bytes,
int_or_none,
... | unlicense | 5,253,002,834,536,831,000 | 33.370192 | 134 | 0.518814 | false |
sanket4373/keystone | keystone/common/sql/migrate_repo/versions/025_add_index_to_valid.py | 4 | 1086 | # Copyright 2013 OpenStack Foundation
#
# 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,564,568,847,724,337,700 | 34.032258 | 78 | 0.706262 | false |
madmongo1/hunter | maintenance/docs_create_missing_stubs.py | 20 | 2271 | import os
import subprocess
# hardcoded paths
HUNTER_DIR='..'
PACKAGES_DIR=os.path.join(HUNTER_DIR, 'cmake/projects')
DOCS_PKG_DIR=os.path.join(HUNTER_DIR, 'docs', 'packages', 'pkg')
# get all wiki entries
docs_filenames = [x for x in os.listdir(DOCS_PKG_DIR) if x.endswith('.rst')]
docs_entries = [x[:-4] for x in doc... | bsd-2-clause | 2,486,476,606,254,693,000 | 28.115385 | 118 | 0.662263 | false |
porduna/weblabdeusto | tools/wcloud/wcloud/test/test_celery_db.py | 4 | 1620 | import os
import unittest
from nose.tools import assert_is_not_none
from sqlalchemy import text
from wcloud.tasks.db_tasks import connect, create_db, destroy_db
# Fix the working directory.
cwd = os.getcwd()
if cwd.endswith(os.path.join("wcloud", "test")):
cwd = cwd[0:len(cwd)-len(os.path.join("wcloud", "test"))]... | bsd-2-clause | 6,419,823,540,202,395,000 | 29 | 90 | 0.604938 | false |
kangkot/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_fileio.py | 48 | 9024 | # Adapted from test_file.py by Daniel Stutzbach
#from __future__ import unicode_literals
import sys
import os
import unittest
from array import array
from weakref import proxy
from test.test_support import (TESTFN, findfile, check_warnings, run_unittest,
make_bad_fd)
from UserList impor... | apache-2.0 | -181,123,358,207,079,000 | 32.546468 | 86 | 0.52449 | false |
ellonweb/merlin | Hooks/user/quits.py | 1 | 1711 | # This file is part of Merlin.
# Merlin is the Copyright (C)2008,2009,2010 of Robin K. Hansen, Elliot Rosemarine, Andreas Jacobsen.
# Individual portions may be copyright by individual contributors, and
# are included in this collective work with permission of the copyright
# owners.
# This program is free software; ... | gpl-2.0 | 2,879,200,428,287,188,500 | 38.790698 | 100 | 0.702513 | false |
solent-eng/solent | solent/draft/demonstrate_line_console.py | 2 | 4403 | # // license
# Copyright 2016, Free Software Foundation.
#
# This file is part of Solent.
#
# Solent is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
... | lgpl-3.0 | 1,559,858,595,241,469,000 | 26.347826 | 78 | 0.565296 | false |
tornadozou/tensorflow | tensorflow/contrib/cluster_resolver/python/training/gce_cluster_resolver_test.py | 64 | 8588 | # 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 applicable ... | apache-2.0 | -3,669,819,024,301,248,500 | 34.783333 | 103 | 0.617373 | false |
BillMills/AutoQC | tests/ICDC_aqc_10_local_climatology_check_validation.py | 3 | 3042 | import qctests.ICDC_aqc_10_local_climatology_check as ICDC
import util.testingProfile
import numpy as np
##### ICDC 10 local climatology check.
##### --------------------------------------------------
class TestClass():
parameters = {
'db': 'iquod.db',
'table': 'unit'
}
def setUp(self):
... | mit | 182,720,600,627,473,100 | 43.735294 | 116 | 0.605851 | false |
zeliard/grpc | src/python/src/grpc/framework/foundation/callable_util.py | 41 | 3953 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | 3,036,772,799,301,910,000 | 35.943925 | 79 | 0.740956 | false |
vinaypost/multiuploader | tests/test_settings.py | 1 | 1057 | # -*- encoding: utf-8 -*-
import os
SECRET_KEY = 'p23jof024jf5-94j3f023jf230=fj234fp34fijo'
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEST_DATA_DIR = os.path.join(BASE_DIR, 'tests', 'test_data')
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
... | mit | -5,673,755,376,928,880,000 | 24.166667 | 70 | 0.598865 | false |
Zanzibar82/pelisalacarta | python/main-ui/plugintools.py | 9 | 37167 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# Plugin Tools
# Copyright 2015 tvalacarta@gmail.com
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
#------------------------------------------------------------
# T... | gpl-3.0 | -5,259,183,125,340,176,000 | 32.923218 | 370 | 0.565262 | false |
ricardogsilva/QGIS | python/plugins/processing/algs/grass7/ext/r_li_mpa_ascii.py | 45 | 1436 | # -*- coding: utf-8 -*-
"""
***************************************************************************
r_li_mpa_ascii.py
-----------------
Date : February 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : medspx at medspx dot fr
************************... | gpl-2.0 | -3,872,383,409,194,873,000 | 38.722222 | 75 | 0.475524 | false |
frugalware/mate | t/fpmjunk.py | 13 | 1462 | #!/usr/bin/env python
try:
import pacman
except ImportError:
import alpm
pacman = alpm
import os, tempfile, shutil, sys, re
remove = False
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print "no longer necessary %s fpms" % sys.argv[2]
sys.exit(0)
elif sys.argv[1] == "--remove":
remove = True
arch = s... | gpl-2.0 | 8,638,624,964,778,665,000 | 29.458333 | 126 | 0.638167 | false |
jalexvig/tensorflow | tensorflow/contrib/nearest_neighbor/python/kernel_tests/hyperplane_lsh_probes_test.py | 51 | 1939 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,669,238,146,575,694,000 | 37.019608 | 101 | 0.626612 | false |
angelapper/edx-platform | openedx/core/djangoapps/credit/api/provider.py | 35 | 16186 | """
API for initiating and tracking requests for credit from a provider.
"""
import datetime
import logging
import uuid
import pytz
from django.db import transaction
from edx_proctoring.api import get_last_exam_completion_date
from openedx.core.djangoapps.credit.exceptions import (
UserIsNotEligible,
CreditP... | agpl-3.0 | 8,264,196,093,959,613,000 | 37.174528 | 115 | 0.646361 | false |
ElunaLuaEngine/ElunaTrinityWotlk | contrib/enumutils_describe.py | 7 | 6656 | from re import compile, MULTILINE
from os import walk, getcwd
notice = ('''/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* 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 th... | gpl-2.0 | -6,389,247,176,896,523,000 | 39.834356 | 148 | 0.5628 | false |
xaxaxa/n7102_kernel | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 | -4,171,467,220,428,953,000 | 25.826446 | 86 | 0.594886 | false |
tracksinspector/papi | setup.py | 1 | 3827 | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.absp... | mit | -8,037,518,635,071,942,000 | 34.435185 | 94 | 0.669715 | false |
sergioska/EvernoteSyntaxHighlight | pygments/scanner.py | 24 | 3114 | # -*- coding: utf-8 -*-
"""
pygments.scanner
~~~~~~~~~~~~~~~~
This library implements a regex based scanner. Some languages
like Pascal are easy to parse but have some keywords that
depend on the context. Because of this it's impossible to lex
that just by using a regular expression lexer like ... | apache-2.0 | 4,551,920,866,530,939,000 | 28.942308 | 70 | 0.57964 | false |
mrichart/ns-3-dev-git | src/point-to-point/bindings/modulegen__gcc_LP64.py | 38 | 407808 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | 7,252,938,109,867,717,000 | 62.819718 | 594 | 0.608809 | false |
skitazaki/jpgridmap | server/geojson/mapping.py | 50 | 1326 |
GEO_INTERFACE_MARKER = "__geo_interface__"
def is_mapping(ob):
return hasattr(ob, "__getitem__")
def to_mapping(ob):
if hasattr(ob, GEO_INTERFACE_MARKER):
candidate = ob.__geo_interface__
candidate = to_mapping(candidate)
else:
candidate = ob
if not is_mapping(candidate):
... | apache-2.0 | 8,614,870,652,750,942,000 | 20.737705 | 74 | 0.554299 | false |
jseabold/statsmodels | statsmodels/tsa/tests/test_adfuller_lag.py | 4 | 1833 | # -*- coding: utf-8 -*-
"""Test for autolag of adfuller
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():
#see i... | bsd-3-clause | -5,679,416,326,921,744,000 | 37.1875 | 79 | 0.597381 | false |
tiagofrepereira2012/tensorflow | tensorflow/examples/learn/text_classification.py | 12 | 6651 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | apache-2.0 | -1,880,937,678,923,456,000 | 34.951351 | 80 | 0.709968 | false |
DataDog/integrations-extras | portworx/datadog_checks/portworx/portworx.py | 1 | 5120 | from datadog_checks.base.checks.prometheus.prometheus_base import PrometheusCheck
from datadog_checks.base.errors import CheckException
EVENT_TYPE = SOURCE_TYPE_NAME = 'portworx'
class PortworxCheck(PrometheusCheck):
"""
Collect px metrics from Portworx
"""
def __init__(self, name, init_config, agen... | bsd-3-clause | -7,744,548,497,032,402,000 | 57.181818 | 94 | 0.632031 | false |
tempbottle/ironpython3 | Tests/test_xrange.py | 2 | 3215 | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of th... | apache-2.0 | 4,730,357,719,193,267,000 | 32.842105 | 96 | 0.51944 | false |
revinate/kubernetes | examples/cluster-dns/images/frontend/client.py | 468 | 1227 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 | 6,798,663,942,849,788,000 | 25.673913 | 74 | 0.756316 | false |
diogovk/ansible | lib/ansible/plugins/lookup/fileglob.py | 176 | 1345 | # (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 | -7,807,047,447,736,959,000 | 35.351351 | 99 | 0.705576 | false |
beiko-lab/gengis | bin/Lib/idlelib/run.py | 3 | 11789 | import sys
import linecache
import time
import socket
import traceback
import thread
import threading
import Queue
from idlelib import CallTips
from idlelib import AutoComplete
from idlelib import RemoteDebugger
from idlelib import RemoteObjectBrowser
from idlelib import StackViewer
from idlelib import... | gpl-3.0 | -5,697,863,883,995,509,000 | 32.370262 | 79 | 0.566969 | false |
pperichon/domoticz | plugins/examples/RAVEn.py | 1 | 11003 | # RAVEn Plugin
#
# Author: Dnpwwo, 2016
#
#
# Plugin parameter definition below will be parsed during startup and copied into Manifest.xml, this will then drive the user interface in the Hardware web page
#
"""
<plugin key="RAVEn" name="RAVEn Zigbee energy monitor" author="dnpwwo" version="1.3... | gpl-3.0 | -5,321,887,876,394,983,000 | 49.705069 | 255 | 0.646824 | false |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/lib/django-0.96/django/views/debug.py | 32 | 23633 | from django.conf import settings
from django.template import Template, Context, TemplateDoesNotExist
from django.utils.html import escape
from django.http import HttpResponseServerError, HttpResponseNotFound
import os, re
HIDDEN_SETTINGS = re.compile('SECRET|PASSWORD|PROFANITIES_LIST')
def linebreak_iter(template_sou... | lgpl-3.0 | 4,778,362,837,143,614,000 | 34.753404 | 240 | 0.570854 | false |
cmisenas/artos | PyARTOS/GUI/CameraWindow.py | 2 | 17193 | """Provides the CameraDetection class which creates a window for detecting objects in a video stream."""
try:
# Python 3
import tkinter as Tkinter
from tkinter import N, E, S, W
from tkinter import ttk
from tkinter import messagebox as tkMessageBox
from tkinter import filedialog as tkFi... | gpl-3.0 | 412,321,297,231,851,140 | 44.720109 | 167 | 0.57506 | false |
J861449197/edx-platform | common/djangoapps/student/migrations/0050_auto__add_manualenrollmentaudit.py | 84 | 17352 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ManualEnrollmentAudit'
db.create_table('student_manualenr... | agpl-3.0 | 1,219,061,024,382,483,200 | 79.333333 | 182 | 0.554806 | false |
byashimov/django-controlcenter | test_project/settings.py | 1 | 1423 | SECRET_KEY = 'test'
DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'controlcenter',
)
MIDDLEWARE_CLASSES = (
'django.contr... | bsd-3-clause | 8,641,059,778,616,735,000 | 26.901961 | 70 | 0.624034 | false |
KamalAwasthi/FullContact | myvenv/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py | 1777 | 19348 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | apache-2.0 | -670,359,274,796,395,800 | 84.23348 | 168 | 0.522535 | false |
dstcontrols/osisoftpy | src/osisoftpy/legacy/_client.py | 1 | 1376 | # -*- coding: utf-8 -*-
"""
osisoft_pi_webapi_python_client.client
~~~~~~~~~~~~~~~~~~~
This module contains the client used to access OSIsoft PI infrastructure and data
"""
from src.osisoftpy import _base, _server
class client(_base):
"""A client to interact with the PI Web WebAPI"""
def __init__(self,
... | apache-2.0 | -7,740,641,953,015,428,000 | 33.35 | 81 | 0.43377 | false |
avati/samba | python/samba/idmap.py | 50 | 3258 | # Unix SMB/CIFS implementation.
# Copyright (C) 2008 Kai Blin <kai@samba.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
# (at your option) any later... | gpl-3.0 | 8,856,327,068,082,266,000 | 32.244898 | 90 | 0.616636 | false |
olasitarska/django | django/contrib/gis/maps/google/zoom.py | 87 | 6678 | from __future__ import unicode_literals
from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point
from django.contrib.gis.maps.google.gmap import GoogleMapException
from django.utils.six.moves import xrange
from math import pi, sin, log, exp, atan
# Constants used for degree to radian conversion, a... | bsd-3-clause | 2,071,700,953,138,934,300 | 39.472727 | 110 | 0.616053 | false |
JoeWoo/grpc | src/python/grpcio_test/grpc_test/beta/test_utilities.py | 8 | 2535 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | -8,056,962,227,434,802,000 | 44.267857 | 75 | 0.765286 | false |
tobegit3hub/once2016 | website/home/models.py | 1 | 1439 | from __future__ import unicode_literals
import datetime
from django.db import models
class UserPhoto(models.Model):
user_name = models.CharField(max_length=128, default="")
user_phone = models.CharField(max_length=128, default="")
access_code = models.CharField(max_length=128)
photo_name = models.CharField(... | apache-2.0 | 6,913,198,302,929,128,000 | 34.975 | 80 | 0.747047 | false |
tmerr/trevornet | trevornet/trevornet/idx.py | 1 | 3888 | #! /usr/bin/env python3
"""
Parse an IDX file like the one used in the MNIST handwritten digit database.
A description of the format is on this page: http://yann.lecun.com/exdb/mnist/
"""
import struct
import array
import sys
def _is_sequence(seq):
return hasattr(seq, '__getitem__') and not hasattr(seq, 'strip')... | mit | -4,683,735,950,809,478,000 | 25.27027 | 81 | 0.596451 | false |
Zopieux/py3status | py3status/modules/external_script.py | 10 | 1913 | # -*- coding: utf-8 -*-
"""
Display output of given script.
Display output of any executable script set by 'script_path'.
Pay attention. The output must be one liner, or will break your i3status !
The script should not have any parameters, but it could work.
Configuration parameters:
- cache_timeout : how often w... | bsd-3-clause | 2,378,076,139,478,936,000 | 27.132353 | 77 | 0.570831 | false |
pipsiscool/audacity | lib-src/lv2/lv2/waflib/ansiterm.py | 149 | 7136 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import sys,os
try:
if not(sys.stderr.isatty()and sys.stdout.isatty()):
raise ValueError('not a tty')
from ctypes import*
class COORD(Structure):
_fields_=[("X",c_short)... | mit | -1,108,224,221,271,131,100 | 39.316384 | 260 | 0.71861 | false |
KohlsTechnology/ansible | lib/ansible/modules/network/dellos9/dellos9_facts.py | 50 | 17592 | #!/usr/bin/python
#
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
# Copyright (c) 2016 Dell Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versio... | gpl-3.0 | -7,225,319,801,512,540,000 | 29.648084 | 92 | 0.574807 | false |
adybbroe/oca_reader | mpef_oca/oca_reader.py | 1 | 8139 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Adam.Dybbroe
# Author(s):
# Adam.Dybbroe <a000680@c20671.ad.smhi.se>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eith... | gpl-3.0 | -5,612,993,188,367,960,000 | 29.483146 | 141 | 0.548225 | false |
ajoaoff/django | django/db/backends/postgresql/client.py | 346 | 2112 | import os
import subprocess
from django.core.files.temp import NamedTemporaryFile
from django.db.backends.base.client import BaseDatabaseClient
from django.utils.six import print_
def _escape_pgpass(txt):
"""
Escape a fragment of a PostgreSQL .pgpass file.
"""
return txt.replace('\\', '\\\\').replace... | bsd-3-clause | -7,972,944,011,235,957,000 | 31 | 73 | 0.491004 | false |
t0in4/django | django/middleware/cache.py | 372 | 7303 | """
Cache middleware. If enabled, each Django-powered page will be cached based on
URL. The canonical way to enable cache middleware is to set
``UpdateCacheMiddleware`` as your first piece of middleware, and
``FetchFromCacheMiddleware`` as the last::
MIDDLEWARE_CLASSES = [
'django.middleware.cache.UpdateCa... | bsd-3-clause | 2,908,804,658,948,484,600 | 39.348066 | 102 | 0.674243 | false |
ajoubert-mitre/geoq | geoq/maps/migrations/0014_add_map_layer_user_remembered_params.py | 5 | 20522 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'MapLayerUserRememberedParams'
db.create_table(u'maps_maplayeruserrememberedparams', (
... | mit | -7,954,730,753,441,322,000 | 87.081545 | 209 | 0.554868 | false |
DONIKAN/django | django/core/serializers/xml_serializer.py | 124 | 15694 | """
XML serializer.
"""
from __future__ import unicode_literals
from collections import OrderedDict
from xml.dom import pulldom
from xml.sax import handler
from xml.sax.expatreader import ExpatParser as _ExpatParser
from django.apps import apps
from django.conf import settings
from django.core.serializers import bas... | bsd-3-clause | -2,967,545,306,360,356,000 | 38.631313 | 126 | 0.591564 | false |
gurneyalex/odoo | addons/payment_test/models/payment_acquirer.py | 4 | 1751 | # coding: utf-8
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
from uuid import uuid4
from odoo import api, exceptions, fields, models, _
class PaymentAcquirerTest(models.Model):
_inherit = 'payment.acquirer'
provider = fields.Selection(selection_ad... | agpl-3.0 | -3,772,211,105,596,820,500 | 39.72093 | 129 | 0.649914 | false |
damdam-s/OCB | openerp/tools/config.py | 10 | 36945 | #openerp.loggers.handlers. -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
#
# This program... | agpl-3.0 | 8,939,062,565,680,768,000 | 51.330028 | 322 | 0.591203 | false |
mindbender-studio/setup | bin/windows/python36/Lib/site-packages/pkg_resources/_vendor/packaging/_structures.py | 1152 | 1416 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
class Infinity(object):
def __repr__(self):
return "Infinity... | mit | -4,021,131,023,649,509,400 | 19.823529 | 79 | 0.582627 | false |
devoid/nova | nova/console/rpcapi.py | 12 | 2746 | # Copyright 2013 Red Hat, 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 agre... | apache-2.0 | -4,637,262,231,690,072,000 | 32.901235 | 79 | 0.648216 | false |
DivineHime/seishirou | lib/requests/packages/chardet/jpcntx.py | 289 | 19643 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 | -5,823,880,284,319,524,000 | 83.304721 | 168 | 0.521102 | false |
fuzeman/plex.py | tests/test_preferences.py | 1 | 1457 | from plex import Plex
from tests.core.helpers import read
import responses
# Set client configuration defaults
Plex.configuration.defaults.server(host='mock')
@responses.activate
def test_get_all():
responses.add(
responses.GET, 'http://mock:32400/:/prefs',
body=read('fixtures/prefs.xml'), statu... | mit | -7,237,747,400,669,962,000 | 22.885246 | 56 | 0.644475 | false |
rouault/pycsw | docs/conf.py | 3 | 10581 | # -*- coding: utf-8 -*-
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2015 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the ... | mit | -356,076,285,356,850,700 | 31.758514 | 97 | 0.700217 | false |
ayoubg/gem5-graphics | gem5/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/reciprocal_estimation.py | 62 | 2158 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# 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 implemen... | bsd-3-clause | 7,181,600,491,676,704,000 | 51.634146 | 72 | 0.793327 | false |
cmeessen/VelocityConversion | test.py | 1 | 1632 | import unittest
import numpy as np
from VelocityConversion import MantleConversion, UnavailableMethodError
def assemblage():
a = {
"ol": 0.617,
"cpx": 0.133,
"opx": 0.052,
"gnt": 0.153,
"jd": 0.045,
"XFe": 0.11
}
return a
class TestVelocityConversion(unittes... | gpl-3.0 | -2,748,515,628,274,917,000 | 27.631579 | 71 | 0.583946 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/models/__init__.py | 4 | 3967 | # 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 | -3,943,179,709,535,812,600 | 29.515385 | 109 | 0.731031 | false |
DrMeers/django | django/contrib/admin/views/main.py | 5 | 17274 | from collections import OrderedDict
import sys
import warnings
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
from django.core.paginator import InvalidPage
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models.fields import FieldDoesNotExist
from ... | bsd-3-clause | -5,120,512,677,998,822,000 | 40.030879 | 99 | 0.590193 | false |
Sumith1896/sympy | sympy/polys/compatibility.py | 96 | 56525 | """Compatibility interface between dense and sparse polys. """
from __future__ import print_function, division
from sympy.polys.densearith import dup_add_term
from sympy.polys.densearith import dmp_add_term
from sympy.polys.densearith import dup_sub_term
from sympy.polys.densearith import dmp_sub_term
from sympy.poly... | bsd-3-clause | 682,765,896,797,165,400 | 49.923423 | 154 | 0.664556 | false |
e-sensing/wtss.py | src/setup.py | 1 | 1272 | #
# Copyright (C) 2014 National Institute For Space Research (INPE) - Brazil.
#
# This file is part of Python Client API for Web Time Series Service.
#
# Web Time Series Service for Python is free software: you can
# redistribute it and/or modify it under the terms of the
# GNU Lesser General Public License as pu... | lgpl-3.0 | 8,105,622,699,207,728,000 | 38.75 | 84 | 0.722484 | false |
kaixinjxq/crosswalk-test-suite | cordova/cordova-sampleapp-android-tests/sampleapp/Eh_build.py | 18 | 1913 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | bsd-3-clause | 6,949,747,598,389,451,000 | 39.702128 | 80 | 0.754313 | false |
adrianschroeter/kiwi | test/unit/tasks_system_prepare_test.py | 1 | 8707 | import sys
import mock
import os
from mock import patch, call
import kiwi
from .test_helper import argv_kiwi_tests
from kiwi.tasks.system_prepare import SystemPrepareTask
class TestSystemPrepareTask(object):
def setup(self):
sys.argv = [
sys.argv[0], '--profile', 'vmxFlavour', 'system', 'p... | gpl-3.0 | -6,035,081,166,376,697,000 | 40.070755 | 107 | 0.638567 | false |
rockstor/rockstor-core | src/rockstor/smart_manager/views/docker_service.py | 2 | 6894 | """
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... | gpl-3.0 | 1,514,318,337,397,474,300 | 39.081395 | 95 | 0.573687 | false |
hwu25/AppPkg | Applications/Python/Python-2.7.2/Lib/rfc822.py | 58 | 34306 | """RFC 2822 message manipulation.
Note: This is only a very rough sketch of a full RFC-822 parser; in particular
the tokenizing of addresses does not adhere to all the quoting rules.
Note: RFC 2822 is a long awaited update to RFC 822. This module should
conform to RFC 2822, and is thus mis-named (it's not wort... | bsd-2-clause | -618,200,777,636,010,100 | 31.93274 | 79 | 0.533289 | false |
voer-platform/vp.web | vpw/migrations/0012_auto__add_settings.py | 1 | 8038 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Settings'
db.create_table(u'vpw_settings', (
... | agpl-3.0 | -2,704,147,163,438,269,000 | 69.517544 | 195 | 0.542548 | false |
alianmohammad/pd-gem5 | src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py | 90 | 4105 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# 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 implemen... | bsd-3-clause | 2,160,104,292,801,846,500 | 36.66055 | 72 | 0.734714 | false |
dset0x/invenio | invenio/base/utils.py | 4 | 11822 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2011, 2012, 2013, 2014, 2015 CERN.
#
# Invenio 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 (a... | gpl-2.0 | 512,292,320,078,226,400 | 32.971264 | 81 | 0.629251 | false |
gibiansky/tensorflow | tensorflow/contrib/learn/python/learn/utils/inspect_checkpoint.py | 19 | 2317 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,824,290,965,036,280,000 | 33.58209 | 80 | 0.681485 | false |
jch1/models | pcl_rl/controller.py | 7 | 16079 | # 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 applicab... | apache-2.0 | -8,634,594,253,756,336,000 | 34.651885 | 92 | 0.633746 | false |
ZeitOnline/zeit.retresco | setup.py | 1 | 1668 | from setuptools import setup, find_packages
import os.path
def project_path(*names):
return os.path.join(os.path.dirname(__file__), *names)
setup(
name='zeit.retresco',
version='1.32.3.dev0',
author='gocept, Zeit Online',
author_email='zon-backend@zeit.de',
url='http://www.zeit.de/',
des... | bsd-3-clause | 8,712,467,527,097,777,000 | 26.344262 | 78 | 0.563549 | false |
mattclark/osf.io | api_tests/nodes/views/test_node_sparse_fieldsets.py | 2 | 10117 | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
ProjectFactory,
AuthUserFactory,
PrivateLinkFactory,
)
from osf.utils import permissions
@pytest.fixture()
def user():
return AuthUserFactory()
@pytest.mark.django_db
@pytest.mark.enable_quickfiles_creat... | apache-2.0 | -1,339,366,922,294,383,000 | 35.003559 | 117 | 0.565187 | false |
hail-is/hail | hail/python/hail/ir/table_ir.py | 1 | 25125 | import json
import hail as hl
from hail.expr.types import dtype
from hail.ir.base_ir import BaseIR, TableIR
from hail.utils.java import Env
from hail.utils.misc import escape_str, parsable_strings, dump_json, escape_id
class MatrixRowsTable(TableIR):
def __init__(self, child):
super().__init__(child)
... | mit | 4,234,160,188,946,369,500 | 32.952703 | 221 | 0.562269 | false |
grnet/snf-image-creator | image_creator/distro/unsupported.py | 2 | 1326 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2018 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.
#
# Thi... | gpl-3.0 | -4,711,321,517,761,788,000 | 34.837838 | 73 | 0.699849 | false |
pymedusa/Medusa | ext/github/Project.py | 2 | 7975 | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2018 bbi-yggy <yossarian@blackbirdinteractive.com> #
# ... | gpl-3.0 | -316,527,913,663,277,600 | 35.415525 | 125 | 0.544828 | false |
jordotech/sherri_satchmo | satchmo/apps/satchmo_store/shop/listeners.py | 4 | 3503 | from livesettings import config_value
from payment.listeners import capture_on_ship_listener
from product.models import Product
from product.listeners import default_product_search_listener, discount_used_listener
from satchmo_store.contact import signals as contact_signals
from satchmo_store.mail import send_html_emai... | bsd-3-clause | -8,501,409,782,428,735,000 | 44.493506 | 105 | 0.725949 | false |
neerajvashistha/pa-dude | lib/python2.7/site-packages/numpy/core/tests/test_numeric.py | 18 | 83788 | from __future__ import division, absolute_import, print_function
import sys
import warnings
import itertools
import platform
from decimal import Decimal
import numpy as np
from numpy.core import umath
from numpy.random import rand, randint, randn
from numpy.testing import (
TestCase, run_module_suite, assert_, as... | mit | -7,154,282,108,693,107,000 | 36.844625 | 91 | 0.521566 | false |
eval1749/elang | build/android/devil/android/sdk/aapt.py | 7 | 1152 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module wraps the Android Asset Packaging Tool."""
import os
from devil.utils import cmd_helper
from pylib import constants
_AAPT_PATH = os.path.jo... | apache-2.0 | -541,278,507,878,602,600 | 27.097561 | 75 | 0.679688 | false |
wawtechnologies/linux-kernel-3.14.51-catchwire-kalitap | Documentation/target/tcm_mod_builder.py | 868 | 40692 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... | gpl-2.0 | -7,870,367,578,192,494,000 | 37.828244 | 162 | 0.572766 | false |
scramblingbalam/Alta_Real | tweet_dumper.py | 1 | 2119 | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 28 15:18:19 2017
@author: yanofsky
from https://gist.github.com/yanofsky/5436496
"""
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = "hGqgNKnozGGUZB3IyW6Noheky"
consumer_secret =... | mit | -6,709,036,552,475,723,000 | 28.859155 | 98 | 0.732893 | false |
vmrob/needy | tests/unit/test_process.py | 3 | 1049 | import os
import subprocess
import sys
import unittest
import needy.process
class ProcessTest(unittest.TestCase):
def test_list_command_output(self):
self.assertEqual('hello', needy.process.command_output([sys.executable, '-c', 'print(\'hello\')']).strip())
def test_shell_command_output(self):
... | mit | -6,417,488,826,518,101,000 | 36.464286 | 115 | 0.666349 | false |
tmimori/frappe | frappe/email/doctype/auto_email_report/test_auto_email_report.py | 17 | 1091 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest, json
# test_records = frappe.get_test_records('Auto Email Report')
class TestAutoEmailReport(unittest.TestCase):
def test_auto_email(self):
fr... | mit | -6,535,197,625,848,977,000 | 26.974359 | 72 | 0.706691 | false |
deeice/bunjalloo | waf_tools/devkitarm.py | 5 | 2313 | #!/usr/bin/python
import os
def get_devkitarm_bin():
try:
return os.path.join(os.environ['DEVKITARM'], 'bin')
except KeyError:
return ''
def detect(conf):
from Logs import warn
if 'DEVKITARM' not in os.environ:
warn("`DEVKITARM' variable is not set, compiler may not be found")
... | gpl-3.0 | -1,090,394,632,504,269,800 | 29.434211 | 75 | 0.571552 | false |
horance-liu/tensorflow | tensorflow/contrib/learn/python/learn/datasets/synthetic.py | 120 | 6827 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 3,598,779,362,384,867,000 | 32.79703 | 115 | 0.670719 | false |
nivertech/libsnark | src/reductions/tbcs_to_uscs/get_tbcs_reduction.py | 6 | 1708 | #!/usr/bin/env python
##
# @author This file is part of libsnark, developed by SCIPR Lab
# and contributors (see AUTHORS).
# @copyright MIT license (see LICENSE file)
from __future__ import division
import itertools
def valid_formula(truth_table, x_coeff, y_coeff, z_coeff, offset):
for x in [0,1]... | mit | -8,820,019,865,581,060,000 | 52.375 | 143 | 0.601874 | false |
RobertABT/heightmap | build/scipy/scipy/linalg/decomp_cholesky.py | 16 | 9462 | """Cholesky decomposition functions."""
from __future__ import division, print_function, absolute_import
from numpy import asarray_chkfinite, asarray
# Local imports
from .misc import LinAlgError, _datacopied
from .lapack import get_lapack_funcs
__all__ = ['cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded',
... | mit | -9,039,717,865,091,579,000 | 31.740484 | 81 | 0.597865 | false |
certik/hermes1d | hermes_common/convert_api.py | 9 | 1932 | #! /usr/bin/env python
from time import strftime, localtime
def convert_h():
f = open("_hermes_common_api_new.h", "w")
f.write("/* Generated by convert_api.py on %s */\n\n" % \
strftime("%a %b %d %H:%M:%S %Y", localtime()));
lines = open("_hermes_common_api.h").readlines()
line = lines[0];... | bsd-3-clause | 8,636,415,770,789,122,000 | 25.108108 | 73 | 0.549172 | false |
PaulWay/spacewalk | client/debian/packages-already-in-debian/rhn-client-tools/src/firstboot/rhn_start_gui.py | 21 | 4456 | # Copyright 2006--2010 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; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT... | gpl-2.0 | 7,659,283,958,288,227,000 | 31.289855 | 79 | 0.645871 | false |
Qalthos/ansible | lib/ansible/plugins/connection/winrm.py | 5 | 30875 | # (c) 2014, Chris Church <chris@ninemoreminutes.com>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
author: Ansible Core Te... | gpl-3.0 | 2,438,951,929,974,082,600 | 43.488473 | 156 | 0.580275 | false |
perimosocordiae/scipy | scipy/interpolate/_pade.py | 18 | 1798 | from numpy import zeros, asarray, eye, poly1d, hstack, r_
from scipy import linalg
__all__ = ["pade"]
def pade(an, m, n=None):
"""
Return Pade approximation to a polynomial as the ratio of two polynomials.
Parameters
----------
an : (N,) array_like
Taylor series coefficients.
m : int
... | bsd-3-clause | 737,753,354,120,810,800 | 26.242424 | 78 | 0.530033 | false |
RelentlessCoffee/tea2 | product.py | 1 | 1495 | import requests
import bs4
import json
class NoMaxQuantity(Exception):
pass
def load_single_page(url):
response = requests.get(url)
soup = bs4.BeautifulSoup(response.text, 'html.parser')
return soup
def _find_options_from_form(soup):
form = soup.find("form", class_="variations_form cart")
... | mit | 360,570,946,561,625,800 | 25.22807 | 67 | 0.635452 | false |
onitake/ansible | lib/ansible/modules/system/cronvar.py | 73 | 13521 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Cronvar Plugin: The goal of this plugin is to provide an idempotent
# method for set cron variable values. It should play well with the
# exi... | gpl-3.0 | 7,934,493,713,895,310,000 | 31.11639 | 155 | 0.564973 | false |
DavidAndreev/indico | indico/modules/events/timetable/blueprint.py | 1 | 6179 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 | -1,738,179,928,122,999,000 | 73.445783 | 120 | 0.611102 | 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.