text stringlengths 0 1.05M | meta dict |
|---|---|
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import os
import shutil
with open('README.rst', encoding='utf-8') as fobj:
LONG_DESCRIPTION = fobj.read()
this_dir = os.getcwd()
root_dir = os.path.dirname(this_dir)
src_dir = os.path.join(root_dir, "www", "src")
data_dir = os.... | {
"repo_name": "jonathanverner/brython",
"path": "setup/setup.py",
"copies": "1",
"size": "2571",
"license": "bsd-3-clause",
"hash": 993681513990764300,
"line_mean": 26.0736842105,
"line_max": 82,
"alpha_frac": 0.6196032672,
"autogenerated": false,
"ratio": 3.479025710419486,
"config_test": fals... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
setup(
name='neoapi',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version... | {
"repo_name": "buckmaxwell/neoapi",
"path": "setup.py",
"copies": "1",
"size": "2529",
"license": "mit",
"hash": -5274118811599405000,
"line_mean": 35.6666666667,
"line_max": 103,
"alpha_frac": 0.6599446422,
"autogenerated": false,
"ratio": 4.222036727879799,
"config_test": false,
"has_no_key... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
setup(
name='pyjection',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_vers... | {
"repo_name": "Darkheir/pyjection",
"path": "setup.py",
"copies": "1",
"size": "1744",
"license": "mit",
"hash": 553665499728181250,
"line_mean": 31.9056603774,
"line_max": 81,
"alpha_frac": 0.6599770642,
"autogenerated": false,
"ratio": 4.2227602905569,
"config_test": false,
"has_no_keywords... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# Read in long_description from README.rst. By using a separate file, instead
# of translating README.md, we can use different content on PyPI than on
# GitHub.
with open('README.rst') as readme_file:
long_description = readme_f... | {
"repo_name": "XD-embedded/xd-docker",
"path": "setup.py",
"copies": "2",
"size": "2512",
"license": "mit",
"hash": 8508460761858989000,
"line_mean": 35.4057971014,
"line_max": 78,
"alpha_frac": 0.6652070064,
"autogenerated": false,
"ratio": 4.158940397350993,
"config_test": false,
"has_no_ke... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
scripts = [
'scripts/upho_weights',
'scripts/upho_sf',
'scripts/upho_qpoints',
'scripts/upho_fit',
]
setup(
# This is the name of your project. The first time you publish this
# package, this name will be regi... | {
"repo_name": "yuzie007/ph_unfolder",
"path": "setup.py",
"copies": "1",
"size": "2437",
"license": "mit",
"hash": -7936882558794953000,
"line_mean": 36.4923076923,
"line_max": 83,
"alpha_frac": 0.6860894542,
"autogenerated": false,
"ratio": 3.8805732484076434,
"config_test": false,
"has_no_k... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
setup(
name='drone-bci',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_versi... | {
"repo_name": "Frijol/Drone-BCI",
"path": "setup.py",
"copies": "1",
"size": "1583",
"license": "apache-2.0",
"hash": 2413394663587194400,
"line_mean": 30.66,
"line_max": 79,
"alpha_frac": 0.6582438408,
"autogenerated": false,
"ratio": 4.069408740359897,
"config_test": false,
"has_no_keywords... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import re
here = path.abspath(path.dirname(__file__))
def get_version():
return re.search("__version__ = \"([\d\.]+)\"", open("gdvfs.py").read()).groups()... | {
"repo_name": "wnielson/gdvfs",
"path": "setup.py",
"copies": "1",
"size": "1370",
"license": "mit",
"hash": -1747037791063200000,
"line_mean": 27.5416666667,
"line_max": 86,
"alpha_frac": 0.6153284672,
"autogenerated": false,
"ratio": 3.816155988857939,
"config_test": false,
"has_no_keywords... |
# 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.abspath(path.dirname(__file__))
exec(open(path.join(here, 'esper_tool/version.py')).read())
def readme():
with open('README.rst') as f:
... | {
"repo_name": "bryerton/esper-tool",
"path": "setup.py",
"copies": "1",
"size": "3884",
"license": "mit",
"hash": -1073234486347852800,
"line_mean": 33.6785714286,
"line_max": 94,
"alpha_frac": 0.6503604531,
"autogenerated": false,
"ratio": 4.054279749478079,
"config_test": false,
"has_no_key... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open as opn
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with opn(path.join(here, 'README.rst'), encoding='utf-8') ... | {
"repo_name": "Le-Bot/cerebro",
"path": "setup.py",
"copies": "1",
"size": "1272",
"license": "mit",
"hash": 2795401668090283500,
"line_mean": 30.8,
"line_max": 71,
"alpha_frac": 0.6139937107,
"autogenerated": false,
"ratio": 3.7633136094674557,
"config_test": false,
"has_no_keywords": false,... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import fnmatch
import os
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'),... | {
"repo_name": "hchsiao/python-svlog",
"path": "setup.py",
"copies": "1",
"size": "3448",
"license": "mit",
"hash": 5882951908140390000,
"line_mean": 32.8039215686,
"line_max": 81,
"alpha_frac": 0.6931554524,
"autogenerated": false,
"ratio": 3.7115177610333694,
"config_test": false,
"has_no_ke... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import re
here = path.abspath(path.dirname(__file__))
def get_version(filename):
with open(filename) as fh:
metadata = dict(re.findall("__([a-z]... | {
"repo_name": "matleses/Transilien-Domoticz",
"path": "setup.py",
"copies": "1",
"size": "4080",
"license": "mit",
"hash": -2763012461098788000,
"line_mean": 34.7894736842,
"line_max": 94,
"alpha_frac": 0.6605392157,
"autogenerated": false,
"ratio": 3.870967741935484,
"config_test": false,
"h... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import sys
if sys.version_info < (3,5,0):
sys.exit('It requires Python version 3.5.0 or higher.')
here = path.abspath(path.dirname(__file__))
setup(
... | {
"repo_name": "lablup/logger",
"path": "setup.py",
"copies": "1",
"size": "1173",
"license": "apache-2.0",
"hash": 4337000819698303000,
"line_mean": 28.325,
"line_max": 86,
"alpha_frac": 0.6589940324,
"autogenerated": false,
"ratio": 3.576219512195122,
"config_test": false,
"has_no_keywords":... |
# 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.abspath(path.dirname(__file__))
# configure plugin name here
PLUGIN_NAME = "son-mano-example-plugin-1"
# generate a name without dashes
PLUGIN_N... | {
"repo_name": "sonata-nfv/son-tests",
"path": "int-slm-infrabstractV1/test-trigger/setup/setup.py",
"copies": "4",
"size": "1568",
"license": "apache-2.0",
"hash": -5376673813529458000,
"line_mean": 29.1730769231,
"line_max": 79,
"alpha_frac": 0.6926020408,
"autogenerated": false,
"ratio": 3.7692... |
# 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.abspath(path.dirname(__file__))
# Get the long description from the README file
# with open(path.join(here, 'README.rst'), encoding='utf-8')... | {
"repo_name": "masushin/extrom",
"path": "setup.py",
"copies": "1",
"size": "3788",
"license": "mit",
"hash": 2764636454554167000,
"line_mean": 35.0761904762,
"line_max": 94,
"alpha_frac": 0.653907075,
"autogenerated": false,
"ratio": 4.029787234042553,
"config_test": false,
"has_no_keywords"... |
# 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.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
... | {
"repo_name": "hikaruAi/FacebookBot",
"path": "setup.py",
"copies": "1",
"size": "3574",
"license": "apache-2.0",
"hash": -8821103810973147000,
"line_mean": 34.73,
"line_max": 94,
"alpha_frac": 0.6593898685,
"autogenerated": false,
"ratio": 4.032731376975169,
"config_test": false,
"has_no_key... |
# 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.abspath(path.dirname(__file__))
# Get the long description from the README file
#with open(path.join(here, 'README.rst'), encoding='utf-8') as f... | {
"repo_name": "balihoo/humanid",
"path": "setup.py",
"copies": "1",
"size": "3698",
"license": "mit",
"hash": -8262746004217430000,
"line_mean": 35.2549019608,
"line_max": 97,
"alpha_frac": 0.6454840454,
"autogenerated": false,
"ratio": 4.108888888888889,
"config_test": false,
"has_no_keyword... |
# 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.abspath(path.dirname(__file__))
# Get the long description from the README file
# with open(path.join(here, 'README.rst'), encoding='utf-8') as f... | {
"repo_name": "ryanmeasel/PenPen",
"path": "setup.py",
"copies": "1",
"size": "2535",
"license": "mit",
"hash": -9014105094449220000,
"line_mean": 33.2567567568,
"line_max": 79,
"alpha_frac": 0.659566075,
"autogenerated": false,
"ratio": 4.128664495114006,
"config_test": false,
"has_no_keywor... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
# https://packaging.python.org/distributing/
# to deploy:
# rm -r dist
# python setup.py sdist
# python setup.py bdist_wheel
# twine upload dist/*
here = pat... | {
"repo_name": "InvestmentSystems/function-pipe",
"path": "setup.py",
"copies": "1",
"size": "1228",
"license": "mit",
"hash": -3733816882065328000,
"line_mean": 28.2380952381,
"line_max": 72,
"alpha_frac": 0.6758957655,
"autogenerated": false,
"ratio": 3.8984126984126983,
"config_test": false,
... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import agentserver
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), enco... | {
"repo_name": "silverfernsys/agentserver",
"path": "setup.py",
"copies": "1",
"size": "3442",
"license": "bsd-3-clause",
"hash": -6075785901645630000,
"line_mean": 31.780952381,
"line_max": 88,
"alpha_frac": 0.6481696688,
"autogenerated": false,
"ratio": 4.122155688622755,
"config_test": false,... |
# 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.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8'... | {
"repo_name": "daniboy/django-render-as-template",
"path": "setup.py",
"copies": "1",
"size": "1534",
"license": "isc",
"hash": 5979723805815791000,
"line_mean": 36.4146341463,
"line_max": 104,
"alpha_frac": 0.6531942634,
"autogenerated": false,
"ratio": 4.112600536193029,
"config_test": false,... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
setup(
name='nnClassify',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py an... | {
"repo_name": "PatrickgHayes/nnClassify",
"path": "setup.py",
"copies": "1",
"size": "3809",
"license": "mit",
"hash": -6471363577573850000,
"line_mean": 37.4747474747,
"line_max": 94,
"alpha_frac": 0.6308742452,
"autogenerated": false,
"ratio": 4.1949339207048455,
"config_test": true,
"has_n... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
import os
import sys
# file read helper
def read_from_file(path):
if os.path.exists(path):
with open(path,"rb","utf-8") as input:
return input.read()
set... | {
"repo_name": "k4cg/k4cglicht",
"path": "setup.py",
"copies": "1",
"size": "1387",
"license": "mit",
"hash": 8948515488006077000,
"line_mean": 24.6851851852,
"line_max": 78,
"alpha_frac": 0.6344628695,
"autogenerated": false,
"ratio": 3.5655526992287916,
"config_test": false,
"has_no_keywords... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
import os
here = os.path.abspath(os.path.dirname(__file__))
# I really prefer Markdown to reStructuredText. PyPi does not. This allows me
# to have things how I'd like, but no... | {
"repo_name": "tsantor/python-lorem-pixel",
"path": "setup.py",
"copies": "1",
"size": "2922",
"license": "mit",
"hash": -4827068054326789000,
"line_mean": 33.7857142857,
"line_max": 96,
"alpha_frac": 0.6718001369,
"autogenerated": false,
"ratio": 3.9327052489905787,
"config_test": false,
"ha... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
def readme():
with open('README.rst') as f:
return f.read()
# Get the long description from the relevant file
setup(
name='finist',
# Versions should compl... | {
"repo_name": "sumanau7/finist",
"path": "setup.py",
"copies": "1",
"size": "1410",
"license": "mit",
"hash": -2754534214494015000,
"line_mean": 29,
"line_max": 79,
"alpha_frac": 0.6971631206,
"autogenerated": false,
"ratio": 3.983050847457627,
"config_test": false,
"has_no_keywords": false,
... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
import os, codecs
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF... | {
"repo_name": "zhiyzuo/python-modularity-maximization",
"path": "setup.py",
"copies": "1",
"size": "2540",
"license": "mit",
"hash": 6785861369839281000,
"line_mean": 32.4210526316,
"line_max": 96,
"alpha_frac": 0.6653543307,
"autogenerated": false,
"ratio": 4.116693679092383,
"config_test": fa... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
import os
from codecs import open
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'requirements.txt')) as f:
dependencies = [dep.strip() for dep in f.readlines()]
se... | {
"repo_name": "Keda87/python-quran-odoa",
"path": "setup.py",
"copies": "1",
"size": "2096",
"license": "mit",
"hash": -1893078951657442000,
"line_mean": 32.8064516129,
"line_max": 90,
"alpha_frac": 0.6750954198,
"autogenerated": false,
"ratio": 4.069902912621359,
"config_test": false,
"has_n... |
# Always prefer setuptools over distutils
from setuptools import setup
from os import path
from swg_python import __version__ as VERSION
here = path.abspath(path.dirname(__file__))
long_description = "For more information see https://github.com/Furkanzmc/swg-python"
setup(
name='swg_python',
# Versions shou... | {
"repo_name": "Furkanzmc/swg-python",
"path": "setup.py",
"copies": "1",
"size": "3382",
"license": "unlicense",
"hash": 7511045476678401000,
"line_mean": 34.9787234043,
"line_max": 85,
"alpha_frac": 0.6638083974,
"autogenerated": false,
"ratio": 4.119366626065774,
"config_test": false,
"has_... |
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import meta
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
... | {
"repo_name": "jmarkowski/codeviz",
"path": "setup.py",
"copies": "1",
"size": "1162",
"license": "mit",
"hash": -3441716293013922300,
"line_mean": 27.3414634146,
"line_max": 63,
"alpha_frac": 0.6084337349,
"autogenerated": false,
"ratio": 4.120567375886525,
"config_test": false,
"has_no_keyw... |
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import unittest
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as ... | {
"repo_name": "buluba89/football-data-api",
"path": "setup.py",
"copies": "2",
"size": "1166",
"license": "mit",
"hash": -3688850069875862500,
"line_mean": 21.4423076923,
"line_max": 66,
"alpha_frac": 0.6380789022,
"autogenerated": false,
"ratio": 3.993150684931507,
"config_test": false,
"has... |
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_descrip... | {
"repo_name": "rbeagrie/wrapit",
"path": "setup.py",
"copies": "1",
"size": "1117",
"license": "mit",
"hash": -8557699232787390000,
"line_mean": 27.641025641,
"line_max": 80,
"alpha_frac": 0.6553267681,
"autogenerated": false,
"ratio": 4.076642335766423,
"config_test": false,
"has_no_keywords... |
# Always prefer setuptools over distutils
import os
# To use a consistent encoding
from codecs import open
from os import path
from pathlib import Path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'RE... | {
"repo_name": "maxisoft/Freenom-dns-updater",
"path": "setup.py",
"copies": "1",
"size": "4284",
"license": "mit",
"hash": -3073776578736529400,
"line_mean": 33.272,
"line_max": 94,
"alpha_frac": 0.660130719,
"autogenerated": false,
"ratio": 4.007483629560337,
"config_test": true,
"has_no_key... |
"""
Copyright (c) 2015 Michael Bright and Bamboo HR LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | {
"repo_name": "BambooHR/rapid",
"path": "setup.py",
"copies": "1",
"size": "3813",
"license": "apache-2.0",
"hash": 336355787799194200,
"line_mean": 33.3513513514,
"line_max": 123,
"alpha_frac": 0.6378179911,
"autogenerated": false,
"ratio": 4.171772428884026,
"config_test": false,
"has_no_ke... |
# Always prefer setuptools over distutils
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'VERSION')) as f:
__version__ = f.read().strip()
with open(os.path.join(here, 'requirements.txt')) as f:
required = f.read().spli... | {
"repo_name": "betatim/osf-cli",
"path": "setup.py",
"copies": "1",
"size": "2524",
"license": "bsd-3-clause",
"hash": -288202240842566850,
"line_mean": 29.4096385542,
"line_max": 79,
"alpha_frac": 0.6442155309,
"autogenerated": false,
"ratio": 3.931464174454829,
"config_test": false,
"has_no... |
# Always prefer setuptools over distutils
# To use a consistent encoding
from codecs import open
from os import path
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:... | {
"repo_name": "di-unipi-socc/TosKeriser",
"path": "setup.py",
"copies": "1",
"size": "4019",
"license": "mit",
"hash": 6266797282398120000,
"line_mean": 35.2072072072,
"line_max": 94,
"alpha_frac": 0.6412042797,
"autogenerated": false,
"ratio": 3.9209756097560975,
"config_test": true,
"has_no... |
# Always prefer setuptools over distutils
# To use a consistent encoding
from codecs import open
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:... | {
"repo_name": "yfpeng/pengyifan-pybioc",
"path": "setup.py",
"copies": "2",
"size": "2050",
"license": "bsd-3-clause",
"hash": 1284863610772812300,
"line_mean": 30.5384615385,
"line_max": 79,
"alpha_frac": 0.6497560976,
"autogenerated": false,
"ratio": 4.011741682974559,
"config_test": false,
... |
# Always prefer setuptools over distutils
# To use a consistent encoding
from codecs import open
from os import path
from setuptools import setup
HERE = path.abspath(path.dirname(__file__))
# Get version info
ABOUT = {}
with open(path.join(HERE, "datadog_checks", "network", "__about__.py")) as f:
exec(f.read(), ... | {
"repo_name": "DataDog/integrations-core",
"path": "network/setup.py",
"copies": "1",
"size": "1887",
"license": "bsd-3-clause",
"hash": 4173498260335015400,
"line_mean": 29.435483871,
"line_max": 77,
"alpha_frac": 0.6592474828,
"autogenerated": false,
"ratio": 3.781563126252505,
"config_test":... |
# Always prefer setuptools over distutils
# To use a consistent encoding
from codecs import open
from os import path
from setuptools import setup
here = path.abspath(path.dirname(__file__))
HERE = path.dirname(path.abspath(__file__))
# Get version info
ABOUT = {}
with open(path.join(HERE, 'datadog_checks', 'active_... | {
"repo_name": "DataDog/integrations-core",
"path": "active_directory/setup.py",
"copies": "1",
"size": "1977",
"license": "bsd-3-clause",
"hash": 7033551444175229000,
"line_mean": 29.890625,
"line_max": 86,
"alpha_frac": 0.6646433991,
"autogenerated": false,
"ratio": 3.7946257197696736,
"config... |
# Always prefer setuptools over distutils
# To use a consistent encoding
from codecs import open
from os import path
from setuptools import setup
HERE = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(HERE, 'README.md'), encoding='utf-8') as f:
long_descr... | {
"repo_name": "DataDog/integrations-core",
"path": "powerdns_recursor/setup.py",
"copies": "1",
"size": "1930",
"license": "bsd-3-clause",
"hash": -4905890024011347000,
"line_mean": 29.15625,
"line_max": 87,
"alpha_frac": 0.6637305699,
"autogenerated": false,
"ratio": 3.74031007751938,
"config_... |
# Always prefer setuptools over distutils
# To use a consistent encoding
from os import path
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
setup(
name='sushi-bargain',
version='0.1',
description='Extract your OS X Photos images',
long_description='',
u... | {
"repo_name": "nlindblad/sushi-bargain",
"path": "setup.py",
"copies": "1",
"size": "2896",
"license": "mit",
"hash": 7376780679470149000,
"line_mean": 30.8241758242,
"line_max": 79,
"alpha_frac": 0.6339779006,
"autogenerated": false,
"ratio": 4.178932178932179,
"config_test": false,
"has_no_... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from setuptools.dist import Distribution
# To use a consistent encoding
from codecs import open
import os
from os import path
import platform
import subprocess
# Trick setuptools in order to get correct binary wheel tag nam... | {
"repo_name": "anlambert/python_manylinux_cmake_test_project",
"path": "setup.py",
"copies": "1",
"size": "2981",
"license": "mit",
"hash": -6316462861965750000,
"line_mean": 33.0705882353,
"line_max": 94,
"alpha_frac": 0.6803086213,
"autogenerated": false,
"ratio": 4.186797752808989,
"config_t... |
# 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.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8'... | {
"repo_name": "uroni/urbackup-server-python-web-api-wrapper",
"path": "setup.py",
"copies": "1",
"size": "2821",
"license": "apache-2.0",
"hash": 5076168998352716000,
"line_mean": 33.2875,
"line_max": 79,
"alpha_frac": 0.6497695853,
"autogenerated": false,
"ratio": 4.185459940652819,
"config_te... |
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
VERSION = '0.2'
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst... | {
"repo_name": "sdeleon28/clapperboard",
"path": "setup.py",
"copies": "1",
"size": "2980",
"license": "mit",
"hash": -6116750041912340000,
"line_mean": 33.5,
"line_max": 88,
"alpha_frac": 0.6476510067,
"autogenerated": false,
"ratio": 4.203102961918194,
"config_test": false,
"has_no_keywords"... |
always_safe = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz'
'0123456789' '_.-')
_safemaps = {}
def quote(s, safe = '/'):
"""quote('abc def') -> 'abc%20def'
Each part of a URL, e.g. the path info, the query, etc., has a
different set of reserved characters that mu... | {
"repo_name": "gagoel/freebase-python",
"path": "appengine_stubs/urllib_stub.py",
"copies": "5",
"size": "2514",
"license": "bsd-2-clause",
"hash": 5208830030131932000,
"line_mean": 30.037037037,
"line_max": 69,
"alpha_frac": 0.5600636436,
"autogenerated": false,
"ratio": 3.5609065155807365,
"c... |
#Alwin Mao's Iterator for grtrans as of June 23, 2015
#Added Secant method to the iterator, no longer producing 3 per iteration
#Factor of 4 speedup from before
#When using, look at the power law dependence of the flux on mdot or whatever, and use appropriately.
#note iterator can be turned off by finding 33 + tries... | {
"repo_name": "jadexter/grtrans",
"path": "pgriter.py",
"copies": "1",
"size": "14240",
"license": "mit",
"hash": -7619757921282133000,
"line_mean": 36.180156658,
"line_max": 600,
"alpha_frac": 0.6063904494,
"autogenerated": false,
"ratio": 3.103072564828939,
"config_test": false,
"has_no_key... |
"""ama_app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | {
"repo_name": "ifkite/ama",
"path": "src/ama_app/exercise/urls.py",
"copies": "1",
"size": "1128",
"license": "mit",
"hash": 7377562084411762000,
"line_mean": 37.8965517241,
"line_max": 84,
"alpha_frac": 0.6835106383,
"autogenerated": false,
"ratio": 3.337278106508876,
"config_test": false,
"... |
# amachine.py
# a tiny stack machine for our new language A, nothing special.
import math, os, re, operator, sys
end=[]
def run(l):
stack=[[]]
for i in l:
if i is end:
f=stack.pop()
i=f[0](*f[1:])
if callable(i):
stack.append([i])
else:
sta... | {
"repo_name": "ActiveState/code",
"path": "recipes/Python/546539_Use_PEP_263_for_metaprogramming/recipe-546539.py",
"copies": "1",
"size": "2459",
"license": "mit",
"hash": 150918235732482,
"line_mean": 31.7866666667,
"line_max": 82,
"alpha_frac": 0.612444083,
"autogenerated": false,
"ratio": 3.1... |
# A magic index in an array A[0...n-1] is defined to be an indexe such that
# A[i] = i. Given a sorted array of distinct integers, write a method to find a
# magic index, if one exists, in array A.
# Assumes distinct
def find(sorted_array):
i = 0
while i < len(sorted_array):
difference = sorted_array[i] - i
... | {
"repo_name": "jdf3/CtCI",
"path": "python/8-recursion-and-dynamic-programming/magicindex.py",
"copies": "1",
"size": "1393",
"license": "apache-2.0",
"hash": -7985987812029290000,
"line_mean": 25.2830188679,
"line_max": 79,
"alpha_frac": 0.5994256999,
"autogenerated": false,
"ratio": 3.061538461... |
"""A Mailman newsletter subscription interface.
To use this plugin, enable the newsletter module and set the newsletter module and name settings
in the admin settings page.
"""
from django.utils.translation import ugettext as _
from Mailman import MailList, Errors
from models import Subscription
from livesettings imp... | {
"repo_name": "thoreg/satchmo",
"path": "satchmo/apps/satchmo_ext/newsletter/mailman.py",
"copies": "12",
"size": "5119",
"license": "bsd-3-clause",
"hash": -7601279049806313000,
"line_mean": 33.8231292517,
"line_max": 119,
"alpha_frac": 0.6098847431,
"autogenerated": false,
"ratio": 4.0307086614... |
"""A mail sender that just stores mail to make testing easier."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# phlmail_mocksender
#
# Public Classes:
# MailSender
# .send
# .mailboxes
... | {
"repo_name": "kjedruczyk/phabricator-tools",
"path": "py/phl/phlmail_mocksender.py",
"copies": "4",
"size": "2574",
"license": "apache-2.0",
"hash": -3689176662564958700,
"line_mean": 32,
"line_max": 79,
"alpha_frac": 0.5563325563,
"autogenerated": false,
"ratio": 4.5638297872340425,
"config_t... |
"""A mail sender that sends mail via a configured sendmail."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# phlmail_sender
#
# Public Classes:
# MailSender
# .send
#
# -------------------... | {
"repo_name": "cs-shadow/phabricator-tools",
"path": "py/phl/phlmail_sender.py",
"copies": "4",
"size": "2042",
"license": "apache-2.0",
"hash": 7042024307359520000,
"line_mean": 35.4642857143,
"line_max": 79,
"alpha_frac": 0.5391772772,
"autogenerated": false,
"ratio": 4.662100456621005,
"conf... |
"""Amalgamate Arbiter library sources into a single source and header file.
Works with python2.6+ and python3.4+.
A near carbon copy of:
https://github.com/open-source-parsers/jsoncpp/blob/master/amalgamate.py
Example of invocation (must be invoked from top directory):
python amalgamate.py
"""
import os
import o... | {
"repo_name": "connormanning/arbiter",
"path": "amalgamate.py",
"copies": "1",
"size": "8811",
"license": "mit",
"hash": -7022648606222290000,
"line_mean": 34.244,
"line_max": 125,
"alpha_frac": 0.6054931336,
"autogenerated": false,
"ratio": 3.4607227022780833,
"config_test": false,
"has_no_k... |
"""Amalgamate json-cpp library sources into a single source and header file.
Works with python2.6+ and python3.4+.
Example of invocation (must be invoked from json-cpp top directory):
python amalgamate.py
"""
import os
import os.path
import sys
class AmalgamationFile:
def __init__(self, top_dir):
self.to... | {
"repo_name": "endlessm/chromium-browser",
"path": "third_party/jsoncpp/source/amalgamate.py",
"copies": "5",
"size": "6832",
"license": "bsd-3-clause",
"hash": 621245006358010100,
"line_mean": 43.0774193548,
"line_max": 121,
"alpha_frac": 0.6451990632,
"autogenerated": false,
"ratio": 3.39225422... |
"""Amalgate cppunit library sources into a single source file
(headers are not amalgated for backward compatibility).
Requires Python 2.6
Example of invocation (must be invoked from cppunit top directory):
python amalgate.py
This will generate file ${CPPUNIT_ROOT}/dist/amalgated-src/cppunit_lib.cpp
that contains ... | {
"repo_name": "wojwal/msiext",
"path": "externals/cppunit/amalgamate.py",
"copies": "5",
"size": "3939",
"license": "epl-1.0",
"hash": -1573388011841632000,
"line_mean": 36.5142857143,
"line_max": 128,
"alpha_frac": 0.603960396,
"autogenerated": false,
"ratio": 3.404494382022472,
"config_test":... |
"""Amalgate json-cpp library sources into a single source and header file.
Requires Python 2.6
Example of invocation (must be invoked from json-cpp top directory):
python amalgate.py
"""
import os
import os.path
import sys
class AmalgamationFile:
def __init__( self, top_dir ):
self.top_dir = top_dir
... | {
"repo_name": "zhongzw/skia-sdl",
"path": "third_party/externals/jsoncpp/amalgamate.py",
"copies": "13",
"size": "6708",
"license": "bsd-3-clause",
"hash": 8797351350017247000,
"line_mean": 44.3243243243,
"line_max": 119,
"alpha_frac": 0.6271615981,
"autogenerated": false,
"ratio": 3.325731284085... |
"""Amalgate json-cpp library sources into a single source and header file.
Works with python2.6+ and python3.4+.
Example of invocation (must be invoked from json-cpp top directory):
python amalgate.py
"""
import os
import os.path
import sys
class AmalgamationFile:
def __init__(self, top_dir):
self.top_di... | {
"repo_name": "herocodemaster/opencvr",
"path": "3rdparty/jsoncpp/amalgamate.py",
"copies": "14",
"size": "6738",
"license": "mit",
"hash": -1304566166640478700,
"line_mean": 42.7532467532,
"line_max": 119,
"alpha_frac": 0.6423271,
"autogenerated": false,
"ratio": 3.3825301204819276,
"config_te... |
"""A management command to apply mailbox operations."""
from __future__ import unicode_literals, print_function
import logging
import os
import shutil
from django.core.management.base import BaseCommand
from modoboa.parameters import tools as param_tools
from modoboa.lib.sysutils import exec_cmd
from modoboa.lib.ex... | {
"repo_name": "bearstech/modoboa",
"path": "modoboa/admin/management/commands/handle_mailbox_operations.py",
"copies": "1",
"size": "3420",
"license": "isc",
"hash": -2555186251974463000,
"line_mean": 30.9626168224,
"line_max": 77,
"alpha_frac": 0.5798245614,
"autogenerated": false,
"ratio": 4.33... |
"""A management command to apply mailbox operations."""
import logging
from optparse import make_option
import os
from django.core.management.base import BaseCommand
from param_tools import tools as param_tools
from modoboa.lib.sysutils import exec_cmd
from modoboa.lib.exceptions import InternalError
from ...app_se... | {
"repo_name": "carragom/modoboa",
"path": "modoboa/admin/management/commands/handle_mailbox_operations.py",
"copies": "1",
"size": "3197",
"license": "isc",
"hash": -5050249760159960000,
"line_mean": 30.3431372549,
"line_max": 77,
"alpha_frac": 0.5680325305,
"autogenerated": false,
"ratio": 4.314... |
"""A management command to apply mailbox operations."""
import logging
import os
import shutil
from django.core.management.base import BaseCommand
from modoboa.lib.exceptions import InternalError
from modoboa.lib.sysutils import exec_cmd
from modoboa.parameters import tools as param_tools
from ...app_settings import... | {
"repo_name": "modoboa/modoboa",
"path": "modoboa/admin/management/commands/handle_mailbox_operations.py",
"copies": "1",
"size": "3375",
"license": "isc",
"hash": -5150002537135292000,
"line_mean": 31.4519230769,
"line_max": 77,
"alpha_frac": 0.5768888889,
"autogenerated": false,
"ratio": 4.3269... |
"""A management command to load Modoboa initial data:
* Create a default super admin if none exists
* Create groups and permissions
"""
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from modoboa.core import load_core_settings, PERMISSIONS
from modoboa.core.extensio... | {
"repo_name": "RavenB/modoboa",
"path": "modoboa/core/management/commands/load_initial_data.py",
"copies": "2",
"size": "1896",
"license": "isc",
"hash": -1339274210248851500,
"line_mean": 32.8571428571,
"line_max": 76,
"alpha_frac": 0.6524261603,
"autogenerated": false,
"ratio": 4.14879649890590... |
"""A management command to load Modoboa initial data:
* Create a default super admin if none exists
* Create groups and permissions
"""
from functools import reduce
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from modoboa.lib.permissions import add_permissions_t... | {
"repo_name": "modoboa/modoboa",
"path": "modoboa/core/management/commands/load_initial_data.py",
"copies": "1",
"size": "2672",
"license": "isc",
"hash": 4869360091223776000,
"line_mean": 34.6266666667,
"line_max": 74,
"alpha_frac": 0.5845808383,
"autogenerated": false,
"ratio": 4.58319039451114... |
"""A management command to load Modoboa initial data:
* Create a default super admin if none exists
* Create groups and permissions
"""
from __future__ import unicode_literals
from functools import reduce
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from modoboa... | {
"repo_name": "bearstech/modoboa",
"path": "modoboa/core/management/commands/load_initial_data.py",
"copies": "1",
"size": "2931",
"license": "isc",
"hash": -568213284367465200,
"line_mean": 33.4823529412,
"line_max": 77,
"alpha_frac": 0.6206073013,
"autogenerated": false,
"ratio": 4.329394387001... |
# A manager for files - this will record temporary and output files from
# xia2, which can be used for composing a dump of "useful" files at the end
# if processing.
#
# This will also be responsible for migrating the data - that is, when
# the .xinfo file is parsed the directories referred to therein may be
# migrated... | {
"repo_name": "xia2/xia2",
"path": "src/xia2/Handlers/Files.py",
"copies": "1",
"size": "4358",
"license": "bsd-3-clause",
"hash": 2896722256271531000,
"line_mean": 33.5873015873,
"line_max": 84,
"alpha_frac": 0.6023405232,
"autogenerated": false,
"ratio": 3.9332129963898916,
"config_test": fal... |
# A managing class (like database) for color and style of lines of all the G(r) and thus S(q) that are loaded and/or
# calculated.
from __future__ import (absolute_import, division, print_function)
LineColorBase = ['black', 'red', 'blue', 'green', 'brown', 'orange']
LineStyleBase = ['-', '--', '-.']
LineMarkerBase = [... | {
"repo_name": "neutrons/FastGR",
"path": "addie/calculate_gr/pdf_lines_manager.py",
"copies": "1",
"size": "3913",
"license": "mit",
"hash": 6837063794193675000,
"line_mean": 33.0260869565,
"line_max": 116,
"alpha_frac": 0.5770508561,
"autogenerated": false,
"ratio": 3.6638576779026217,
"config... |
# A mapping between model field internal datatypes and sensible
# client-friendly datatypes. In virtually all cases, client programs
# only need to differentiate between high-level types like number, string,
# and boolean. More granular separation be may desired to alter the
# allowed operators or may infer a different... | {
"repo_name": "murphyke/avocado",
"path": "avocado/conf/global_settings.py",
"copies": "3",
"size": "4830",
"license": "bsd-2-clause",
"hash": -5710483870511314000,
"line_mean": 37.64,
"line_max": 77,
"alpha_frac": 0.6937888199,
"autogenerated": false,
"ratio": 3.806146572104019,
"config_test":... |
#: A mapping of group names to import paths to renderer instances
RENDERERS = {
"js": "require_media.renderers.javascript_requirement_renderer",
"css": "require_media.renderers.css_requirement_renderer"
}
#: The list of all recognized groups
GROUPS = ["css", "js"]
#: The name of the requirement attribute on t... | {
"repo_name": "jeffkistler/django-require-media",
"path": "src/require_media/defaults.py",
"copies": "1",
"size": "1120",
"license": "bsd-3-clause",
"hash": -3088532816050489000,
"line_mean": 34,
"line_max": 75,
"alpha_frac": 0.7517857143,
"autogenerated": false,
"ratio": 3.98576512455516,
"con... |
"""
Utilities for managing data inputs for Amara
Copyright 2008-2015 Uche Ogbuji
"""
import zipfile
import functools
from enum import Enum
from io import StringIO, BytesIO
from amara3 import iri
from urllib.request import urlopen
class inputsourcetype(Enum):
unknown = 0
stream = 1
string = 2
iri = 3... | {
"repo_name": "uogbuji/amara3-iri",
"path": "pylib/inputsource.py",
"copies": "1",
"size": "5762",
"license": "apache-2.0",
"hash": -942931378717529700,
"line_mean": 40.4388489209,
"line_max": 356,
"alpha_frac": 0.6274305556,
"autogenerated": false,
"ratio": 3.891891891891892,
"config_test": fa... |
"""
Some utilities for general use in Amara
Copyright 2008-2015 Uche Ogbuji
"""
def coroutine(func):
'''
Decorator: Eliminate the need to call next() to kick-start a co-routine
From David Beazley: http://www.dabeaz.com/generators/index.html
'''
def start(*args,**kwargs):
coro = func(*args,... | {
"repo_name": "uogbuji/amara3-iri",
"path": "pylib/util.py",
"copies": "1",
"size": "1724",
"license": "apache-2.0",
"hash": 4384398852093323300,
"line_mean": 25.1212121212,
"line_max": 107,
"alpha_frac": 0.5609048724,
"autogenerated": false,
"ratio": 3.2284644194756553,
"config_test": false,
... |
# amara3.uxml.treeutil
'''
Various utilities related to amara3's lightweight tree implementation, includes
some operations widely associated with DOM, but in the form of utility functions
rather than methods.
'''
import itertools
from amara3.uxml.tree import *
__all__ = ['descendants', 'select_elements', 'select_name... | {
"repo_name": "uogbuji/amara3-xml",
"path": "pylib/uxml/treeutil.py",
"copies": "1",
"size": "9050",
"license": "apache-2.0",
"hash": -692721633668344600,
"line_mean": 37.025210084,
"line_max": 173,
"alpha_frac": 0.6232044199,
"autogenerated": false,
"ratio": 3.859275053304904,
"config_test": t... |
# amara3.uxml.uxpath.functions
'''Built-in functions for MicroXPath
'''
__all__ = [
'BUILTIN_FUNCTIONS',
]
#import operator
from functools import wraps
from amara3.uxml.tree import node, element, strval
from .ast import root_node, attribute_node, index_docorder, to_string, to_number, to_boolean
def boolean... | {
"repo_name": "uogbuji/amara3-xml",
"path": "pylib/uxml/uxpath/functions.py",
"copies": "1",
"size": "9907",
"license": "apache-2.0",
"hash": 1780393990239518200,
"line_mean": 26.8286516854,
"line_max": 606,
"alpha_frac": 0.654688604,
"autogenerated": false,
"ratio": 3.829532276768458,
"config_... |
# amara3.uxml.uxpath.lexrules
'''
Heavy debt to: https://github.com/emory-libraries/eulxml/blob/master/eulxml/xpath/lexrules.py
'''
import re
from ply.lex import TOKEN
OPERATOR_NAMES = {
'or': 'OR_OP',
'and': 'AND_OP',
'div': 'DIV_OP',
'mod': 'MOD_OP',
}
tokens = [
'PATH_SEP',
'ABBR... | {
"repo_name": "uogbuji/amara3-xml",
"path": "pylib/uxml/uxpath/lexrules.py",
"copies": "1",
"size": "2289",
"license": "apache-2.0",
"hash": -145919353355869820,
"line_mean": 20.5943396226,
"line_max": 93,
"alpha_frac": 0.5181301879,
"autogenerated": false,
"ratio": 2.4612903225806453,
"config_... |
# amara3.uxml.uxpath
'''
from amara3.uxml.uxpath import qquery
results = qquery(b'<a>1<b>2</b>3</a>', 'a/text()'))
next(results).xml_value
next(results).xml_value
from amara3.uxml import tree
DOC = '<a><b><x>1</x></b><c><x>2</x><d><x>3</x></d></c><x>4</x><y>5</y></a>'
tb = tree.treebuilder()
root = tb.parse(DOC)
fro... | {
"repo_name": "uogbuji/amara3-xml",
"path": "pylib/uxml/uxpath/__init__.py",
"copies": "1",
"size": "4653",
"license": "apache-2.0",
"hash": 1192621488595666700,
"line_mean": 33.2132352941,
"line_max": 154,
"alpha_frac": 0.6701053084,
"autogenerated": false,
"ratio": 3.4364844903988185,
"config... |
# amara3.uxml.writer
'''
Raw XML writer
'''
from enum import Enum #https://docs.python.org/3.4/library/enum.html
from xml.sax.saxutils import escape, quoteattr
from amara3.uxml import tree, xml
class token(Enum):
start_open = 1
start_close = 2
end_open = 3
end_close = 4
empty_close = 5
attr_q... | {
"repo_name": "uogbuji/amara3-xml",
"path": "pylib/uxml/writer.py",
"copies": "1",
"size": "6770",
"license": "apache-2.0",
"hash": 8972212698489540000,
"line_mean": 33.3654822335,
"line_max": 124,
"alpha_frac": 0.582127031,
"autogenerated": false,
"ratio": 3.7444690265486726,
"config_test": fa... |
#amara.lib._inputsource
#Named with _ to avoid clash with amara.lib.inputsource class
from __future__ import with_statement
import os
import urllib, urllib2
from cStringIO import StringIO
from uuid import uuid4
from amara.lib import IriError
from amara._expat import InputSource
from amara.lib.xmlstring import isxml
... | {
"repo_name": "zepheira/amara",
"path": "lib/lib/_inputsource.py",
"copies": "1",
"size": "5849",
"license": "apache-2.0",
"hash": 9148567260729239000,
"line_mean": 39.9020979021,
"line_max": 154,
"alpha_frac": 0.65156437,
"autogenerated": false,
"ratio": 4.119014084507042,
"config_test": false... |
#amara.lib
__all__ = ['IriError', 'inputsource']
from amara import Error
class IriError(Error):
"""
Exception related to URI/IRI processing
"""
RESOURCE_ERROR = 1
INVALID_BASE_URI = 100
#RELATIVE_DOCUMENT_URI = 110
RELATIVE_BASE_URI = 111
OPAQUE_BASE_URI = 112
NON_FILE_URI = 12... | {
"repo_name": "zepheira/amara",
"path": "lib/lib/__init__.py",
"copies": "1",
"size": "2942",
"license": "apache-2.0",
"hash": -8803132206975633000,
"line_mean": 34.8780487805,
"line_max": 84,
"alpha_frac": 0.5819170632,
"autogenerated": false,
"ratio": 3.954301075268817,
"config_test": false,
... |
"""amara.writers.node
Internal module containing the logic for traversing an Amara tree in order to
serialize it.
"""
from amara import tree
from amara.namespaces import XML_NAMESPACE, XMLNS_NAMESPACE
class _Visitor:
"""
Provides functions to recursively walk a DOM or Domlette object and
generate SAX-li... | {
"repo_name": "zepheira/amara",
"path": "lib/writers/node.py",
"copies": "1",
"size": "6501",
"license": "apache-2.0",
"hash": 152214737752704770,
"line_mean": 35.3184357542,
"line_max": 102,
"alpha_frac": 0.5923704046,
"autogenerated": false,
"ratio": 4.4345156889495225,
"config_test": false,
... |
# amara.xpath.compiler.assembler
"""
A flow graph representation for Python bytecode.
Useful background at: http://eli.thegreenplace.net/2009/11/28/python-internals-working-with-python-asts/
"""
import dis
import new
import array
import itertools
from compiler.consts import CO_OPTIMIZED, CO_NEWLOCALS
class assembler:... | {
"repo_name": "zepheira/amara",
"path": "lib/xpath/compiler/assembler.py",
"copies": "1",
"size": "13567",
"license": "apache-2.0",
"hash": -6857354518096972000,
"line_mean": 32.0097323601,
"line_max": 104,
"alpha_frac": 0.4636986806,
"autogenerated": false,
"ratio": 4.101269649334945,
"config_... |
'''A margin widget designed to augment the DynamicTableEditor
This displays line numbers and has some bindings for selecting whole rows
'''
import Tkinter as tk
import sys
class DteMargin(tk.Canvas):
'''A widget to display line numbers and markers for a DynamicTableEditor widget'''
def __init__(self, *args,... | {
"repo_name": "boakley/robotframework-workbench",
"path": "rwb/editor/dte_margin.py",
"copies": "1",
"size": "5461",
"license": "apache-2.0",
"hash": 1952703703674852600,
"line_mean": 43.0403225806,
"line_max": 105,
"alpha_frac": 0.5795641824,
"autogenerated": false,
"ratio": 3.3647566235366604,
... |
""" A *Marker* is a proxy class which wraps some schema.
Immediately, the example is:
```python
from good import Schema, Required
Schema({
'name': str, # required key
Optional('age'): int, # optional key
}, default_keys=Required)
```
This way, keys marked with `Required()` will report errors if no value i... | {
"repo_name": "kolypto/py-good",
"path": "good/schema/markers.py",
"copies": "1",
"size": "16658",
"license": "bsd-2-clause",
"hash": -7437623635556347000,
"line_mean": 32.7890466531,
"line_max": 122,
"alpha_frac": 0.6260055229,
"autogenerated": false,
"ratio": 4.099926162933793,
"config_test":... |
"""A Market is all the market streets that have been added to the board.
A Market Street is a line of merchants that strech across the board giving
adjacency bonuses to nearby buildings.
Each merchant has a location so a market street is saved as a set of locations.
Not two merchants can occupy the same locatio... | {
"repo_name": "nicholas-maltbie/Medina",
"path": "Market.py",
"copies": "1",
"size": "5376",
"license": "mit",
"hash": 5123091925725307000,
"line_mean": 39.3538461538,
"line_max": 89,
"alpha_frac": 0.6705729167,
"autogenerated": false,
"ratio": 3.921225382932166,
"config_test": false,
"has_no... |
"""A Martel format to parse the output from transfac.
Formats:
format Format for a whole file.
"""
import warnings
warnings.warn("Bio.expressions was deprecated, as it does not work with recent versions of mxTextTools. If you want to continue to use this module, please get in contact with the Biopython d... | {
"repo_name": "dbmi-pitt/DIKB-Micropublication",
"path": "scripts/mp-scripts/Bio/expressions/transfac.py",
"copies": "1",
"size": "2579",
"license": "apache-2.0",
"hash": -943715152453956100,
"line_mean": 33.3866666667,
"line_max": 309,
"alpha_frac": 0.5684373788,
"autogenerated": false,
"ratio":... |
# A. match_ends
def match_ends(words):
n=len (words)
i=0
count=0
while i<n:
if len(words[i])>=2 and words[i][0]==words[i][-1]:
count = count+1
i = i+1
return count
# B. front_x
def front_x(words):
s=[]
s1=[]
for i in words:
if i.startswith('x'):
... | {
"repo_name": "dimir2/hse12pi2-scripts",
"path": "BaydakovaE/list1.py",
"copies": "1",
"size": "1565",
"license": "mit",
"hash": 2354050790572468700,
"line_mean": 22.7121212121,
"line_max": 73,
"alpha_frac": 0.4587859425,
"autogenerated": false,
"ratio": 2.5953565505804312,
"config_test": true,... |
"""A matplotlib backend for publishing figures via display_data"""
#-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part ... | {
"repo_name": "poojavade/Genomics_Docker",
"path": "Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython-2.2.0-py2.7.egg/IPython/kernel/zmq/pylab/backend_inline.py",
"copies": "8",
"size": "5498",
"license": "apache-2.0",
"hash": -3073908146283557400,
"line_mean": 35.4105960265,
... |
"""A matplotlib backend for publishing figures via display_data"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
import matplotlib
# analysis: ignore
from matplotlib.backends.backend_agg import new_figure_manager, FigureCanv... | {
"repo_name": "mattvonrocketstein/smash",
"path": "smashlib/ipy3x/kernel/zmq/pylab/backend_inline.py",
"copies": "1",
"size": "4994",
"license": "mit",
"hash": 509267559390923460,
"line_mean": 34.1690140845,
"line_max": 81,
"alpha_frac": 0.6525830997,
"autogenerated": false,
"ratio": 4.3200692041... |
# a_matrix.py
# Construct the parameters for the linear optimisation
#
# Import external packages
import networkx as nx
import numpy as np
__all__ = ["a_matrix",
"build_coupled_edges",
"couple_node_sets",
"reduce_to_coupled",
"adjust_capacity_edges"]
def a_matrix(g):
... | {
"repo_name": "alanaberdeen/coupled-minimum-cost-flow-track",
"path": "cmcft/tools/params/a_matrix.py",
"copies": "1",
"size": "5231",
"license": "mit",
"hash": -2161424848631343000,
"line_mean": 26.103626943,
"line_max": 76,
"alpha_frac": 0.5909004015,
"autogenerated": false,
"ratio": 3.57308743... |
"""Amavis related functions."""
import os
import platform
from .. import package
from .. import utils
from . import base
from . import install
class Amavis(base.Installer):
"""Amavis installer."""
appname = "amavis"
packages = {
"deb": [
"libdbi-perl", "amavisd-new", "arc", "arj",... | {
"repo_name": "modoboa/modoboa-installer",
"path": "modoboa_installer/scripts/amavis.py",
"copies": "1",
"size": "2863",
"license": "mit",
"hash": 3145732697487889400,
"line_mean": 31.1685393258,
"line_max": 78,
"alpha_frac": 0.5452322738,
"autogenerated": false,
"ratio": 3.694193548387097,
"co... |
"""A max heap is a complete binary tree [CBT] (implemented using array)
in which each node has a value larger than its sub-trees"""
from math import ceil
class MaxHeap:
def __init__(self, arr=None):
self.heap = []
self.heap_size = 0
if arr is not None:
self.create_max_heap(arr... | {
"repo_name": "anubhavshrimal/Data_Structures_Algorithms_In_Python",
"path": "Heaps/MaxHeap.py",
"copies": "1",
"size": "3359",
"license": "mit",
"hash": -8156910757316596000,
"line_mean": 30.6886792453,
"line_max": 103,
"alpha_frac": 0.5754688896,
"autogenerated": false,
"ratio": 3.8476517754868... |
"""A MayaVi example of how to generate an unstructured grid dataset
using numpy arrays. Also shown is a way to visualize this data with
mayavi2. The script can be run like so:
$ mayavi2 -x unstructured_grid.py
Alternatively, it can be run as:
$ python unstructured_grid.py
Author: Prabhu Ramachandran <prabhu a... | {
"repo_name": "liulion/mayavi",
"path": "docs/source/mayavi/auto/unstructured_grid.py",
"copies": "10",
"size": "3670",
"license": "bsd-3-clause",
"hash": 1778426549892307500,
"line_mean": 32.0630630631,
"line_max": 72,
"alpha_frac": 0.6079019074,
"autogenerated": false,
"ratio": 3.04817275747508... |
""" Amazon Access Challenge Code for ensemble
Marios Michaildis script for Amazon .
Uses counts as features and 3way interactions and xgboost
based on Paul Duan's Script.
"""
from __future__ import division
import numpy as np
from sklearn import preprocessing
from sklearn.metrics import roc_auc_score
import XGBo... | {
"repo_name": "kaz-Anova/ensemble_amazon",
"path": "amazon_main_xgboost_count_3D.py",
"copies": "1",
"size": "7087",
"license": "apache-2.0",
"hash": 5954560332607227000,
"line_mean": 36.4973544974,
"line_max": 142,
"alpha_frac": 0.5809228164,
"autogenerated": false,
"ratio": 3.4121328839672604,
... |
""" Amazon Access Challenge Code for ensemble
Marios Michaildis script for Amazon .
Uses counts as features and xgboost
based on Paul Duan's Script.
"""
from __future__ import division
import numpy as np
from sklearn import preprocessing
from sklearn.metrics import roc_auc_score
import XGBoostClassifier as xg
... | {
"repo_name": "kaz-Anova/ensemble_amazon",
"path": "amazon_main_xgboost_count.py",
"copies": "1",
"size": "5957",
"license": "apache-2.0",
"hash": 8938056276628725000,
"line_mean": 33.8362573099,
"line_max": 133,
"alpha_frac": 0.6091992614,
"autogenerated": false,
"ratio": 3.429476108232585,
"c... |
""" Amazon Access Challenge Code for ensemble
Marios Michaildis script for Amazon .
xgboost on input data
based on Paul Duan's Script.
"""
from __future_
_ import division
import numpy as np
from sklearn import preprocessing
from sklearn.metrics import roc_auc_score
import XGBoostClassifier as xg
from sklearn.cros... | {
"repo_name": "kaz-Anova/ensemble_amazon",
"path": "amazon_main_xgboost.py",
"copies": "1",
"size": "5579",
"license": "apache-2.0",
"hash": 8209580502970843000,
"line_mean": 34.7628205128,
"line_max": 133,
"alpha_frac": 0.6226922388,
"autogenerated": false,
"ratio": 3.493425172197871,
"config_... |
"""Amazon AWS Connection."""
from vine import promise, transform
from kombu.asynchronous.aws.ext import AWSRequest, get_response
from kombu.asynchronous.http import Headers, Request, get_client
from email import message_from_bytes
from email.mime.message import MIMEMessage
def message_from_headers(hdr): # noqa
... | {
"repo_name": "celery/kombu",
"path": "kombu/asynchronous/aws/connection.py",
"copies": "1",
"size": "8572",
"license": "bsd-3-clause",
"hash": 2413738820337896000,
"line_mean": 30.7481481481,
"line_max": 110,
"alpha_frac": 0.5965935604,
"autogenerated": false,
"ratio": 4.197845249755142,
"conf... |
"""Amazon AWS Connection."""
from vine import promise, transform
from kombu.asynchronous.aws.ext import AWSRequest, get_response
from kombu.asynchronous.http import Headers, Request, get_client
import io
try: # pragma: no cover
from email import message_from_bytes
from email.mime.message import MIMEMessag... | {
"repo_name": "ZoranPavlovic/kombu",
"path": "kombu/asynchronous/aws/connection.py",
"copies": "1",
"size": "8886",
"license": "bsd-3-clause",
"hash": -1419252259747600100,
"line_mean": 30.5106382979,
"line_max": 110,
"alpha_frac": 0.5946432591,
"autogenerated": false,
"ratio": 4.1757518796992485... |
""" Amazon CD cover source. """
import collections
import urllib.parse
import lxml.cssselect
import lxml.etree
from sacad.cover import CoverImageFormat, CoverImageMetadata, CoverSourceQuality, CoverSourceResult
from sacad.sources.amazonbase import AmazonBaseCoverSource
class AmazonCdCoverSourceResult(CoverSourceRe... | {
"repo_name": "desbma/sacad",
"path": "sacad/sources/amazoncd.py",
"copies": "1",
"size": "6412",
"license": "mpl-2.0",
"hash": -8713921416673725000,
"line_mean": 44.475177305,
"line_max": 119,
"alpha_frac": 0.5564566438,
"autogenerated": false,
"ratio": 4.185378590078329,
"config_test": false,... |
import sys
import time
import httplib
import random
from datetime import datetime
from logging import debug, info, warning, error
try:
import xml.etree.ElementTree as ET
except ImportError:
import elementtree.ElementTree as ET
from Config import Config
from Exceptions import *
from Utils import getTreeFromXm... | {
"repo_name": "sharethis-github/OpenSource",
"path": "s3cmd/S3/CloudFront.py",
"copies": "1",
"size": "32703",
"license": "apache-2.0",
"hash": -5924886026421761000,
"line_mean": 41.3065976714,
"line_max": 143,
"alpha_frac": 0.5661560102,
"autogenerated": false,
"ratio": 3.962078992003877,
"con... |
""" Amazon digital cover source. """
import collections
import operator
import urllib.parse
import lxml.cssselect
import lxml.etree
from sacad.cover import CoverImageFormat, CoverImageMetadata, CoverSourceQuality, CoverSourceResult
from sacad.sources.amazonbase import AmazonBaseCoverSource
AmazonDigitalImageFormat ... | {
"repo_name": "desbma/sacad",
"path": "sacad/sources/amazondigital.py",
"copies": "1",
"size": "6368",
"license": "mpl-2.0",
"hash": -8256985584239818000,
"line_mean": 39.3037974684,
"line_max": 113,
"alpha_frac": 0.5643844221,
"autogenerated": false,
"ratio": 3.5735129068462403,
"config_test":... |
""" AmazonDriver for Network
based on BaseDriver
"""
import boto3
from calplus.v1.network.drivers.base import BaseDriver, BaseQuota
PROVIDER = "AMAZON"
class AmazonDriver(BaseDriver):
"""docstring for AmazonDriver"""
def __init__(self, cloud_config):
super(AmazonDriver, self).__init__()
... | {
"repo_name": "cloudcomputinghust/CAL",
"path": "calplus/v1/network/drivers/amazon.py",
"copies": "1",
"size": "5007",
"license": "apache-2.0",
"hash": 1859905737522317000,
"line_mean": 27.2881355932,
"line_max": 76,
"alpha_frac": 0.527062113,
"autogenerated": false,
"ratio": 4.151741293532338,
... |
"""amazon module is a jungle containing different plants and creatures,
for instance the boa which is a reptile like the turtle,
however it may not moved around freely and can be constricted,
hence boa constrictor"""
import turtle
from random import shuffle, randrange
from math import radians, cos, sin
def even(numbe... | {
"repo_name": "wittrup/crap",
"path": "TUMAGA/amazon.py",
"copies": "1",
"size": "16145",
"license": "mit",
"hash": 8032932315415495000,
"line_mean": 38.8666666667,
"line_max": 221,
"alpha_frac": 0.5134097244,
"autogenerated": false,
"ratio": 3.5577346848832083,
"config_test": false,
"has_no_... |
"Amazon Payments Gateway"
import urllib
from datetime import datetime
from decimal import Decimal
from django.utils.safestring import mark_safe
from hiicart.gateway.amazon import fps, ipn
from hiicart.gateway.amazon.settings import SETTINGS as default_settings
from hiicart.gateway.base import PaymentGatewayBase, Submi... | {
"repo_name": "kbourgoin/hiicart",
"path": "hiicart/gateway/amazon/gateway.py",
"copies": "1",
"size": "5059",
"license": "mit",
"hash": 3208039891129814500,
"line_mean": 41.1583333333,
"line_max": 102,
"alpha_frac": 0.6015022732,
"autogenerated": false,
"ratio": 3.888547271329746,
"config_test... |
from Utils import getTreeFromXml
try:
import xml.etree.ElementTree as ET
except ImportError:
import elementtree.ElementTree as ET
class Grantee(object):
ALL_USERS_URI = "http://acs.amazonaws.com/groups/global/AllUsers"
LOG_DELIVERY_URI = "http://acs.amazonaws.com/groups/s3/LogDelivery"
def __ini... | {
"repo_name": "sharethis-github/OpenSource",
"path": "s3cmd/S3/ACL.py",
"copies": "2",
"size": "7197",
"license": "apache-2.0",
"hash": 6612952104233416000,
"line_mean": 30.5657894737,
"line_max": 126,
"alpha_frac": 0.5742670557,
"autogenerated": false,
"ratio": 3.5967016491754125,
"config_test... |
#Amazon S3 Bucket to Zendesk Import Process
from __future__ import print_function
import sys
from zdesk import Zendesk
from zdesk import get_id_from_url
import boto3
import json
import collections
from time import sleep
#Define S3 Bucket
bucket = "<BUCKET_NAME>"
#Define ZenDesk API Information
config = {
'zdesk_... | {
"repo_name": "thigley986/Lambda-AD-Zendesk-Sync",
"path": "Lambda/Lambda-2-Zendesk.py",
"copies": "1",
"size": "2392",
"license": "apache-2.0",
"hash": 585132563475042600,
"line_mean": 25.5777777778,
"line_max": 83,
"alpha_frac": 0.5664715719,
"autogenerated": false,
"ratio": 3.839486356340289,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.