text stringlengths 0 1.05M | meta dict |
|---|---|
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c
import copy
import operator
from Meanings import *
from ViewCache import ViewCache
from CompoundAction import Thing
from Options import Options
from Utility import append_flat, logger
class CompoundRecognizer(object):
Recognizers = {}
def cou... | {
"repo_name": "ronaldahmed/SLAM-for-ugv",
"path": "neural-navigation-with-lstm/MARCO/Robot/Recognizers_Compound.py",
"copies": "2",
"size": "56307",
"license": "mit",
"hash": 3935779100886217700,
"line_mean": 72.5078328982,
"line_max": 723,
"alpha_frac": 0.6053243824,
"autogenerated": false,
"rat... |
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c
import math, random, sys
import MarkovLoc
sys.path.append('..')
from Robot import Meanings
from Utility import logger
from Topology import *
class observation:
def __init__(self,view):
if type(view) is tuple: self.view = [view]
elif ... | {
"repo_name": "ronaldahmed/robot-navigation",
"path": "neural-navigation-with-lstm/MARCO/POMDP/MarkovLoc_Antie.py",
"copies": "2",
"size": "12912",
"license": "mit",
"hash": -1905391254150956000,
"line_mean": 38.8518518519,
"line_max": 121,
"alpha_frac": 0.573807311,
"autogenerated": false,
"rati... |
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c
import numpy.oldnumeric as Numeric
def dot(array1, array2):
try: return array1.dot(array2)
except AttributeError:
try: return array2.dot(array1)
except AttributeError:
return Numeric.dot(array1, array2)
def sum(array... | {
"repo_name": "ronaldahmed/robot-navigation",
"path": "neural-navigation-with-lstm/MARCO/nltk_contrib/unimelb/tacohn/sparsearray.py",
"copies": "2",
"size": "14515",
"license": "mit",
"hash": -8009925732134216000,
"line_mean": 36.4097938144,
"line_max": 78,
"alpha_frac": 0.5160179125,
"autogenerate... |
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c
import os, sys, re, types
from nltk.chktype import chktype as _chktype
from nltk.chktype import classeq as _classeq
from nltk.corpus import SimpleCorpusReader,set_basedir
from nltk.token import Token
from nltk.tokenizer import TokenizerI, RegexpTokenizer... | {
"repo_name": "ronaldahmed/robot-navigation",
"path": "neural-navigation-with-lstm/MARCO/DirectionCorpus.py",
"copies": "2",
"size": "13442",
"license": "mit",
"hash": 7140341539068956000,
"line_mean": 39.8571428571,
"line_max": 119,
"alpha_frac": 0.5857759262,
"autogenerated": false,
"ratio": 3.... |
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c
import re,string,os,sys
debug = False
class Topology(dict):
'''Database modeling a topological map.'''
Line = {}
Content = {}
RouteInstructions = []
TopoAttrib = []
def __init__(self, **kwargs):
dict.__init__(self, ... | {
"repo_name": "ronaldahmed/SLAM-for-ugv",
"path": "neural-navigation-with-lstm/MARCO/POMDP/Topology.py",
"copies": "2",
"size": "30805",
"license": "mit",
"hash": -6886253751126390000,
"line_mean": 42.5098870056,
"line_max": 127,
"alpha_frac": 0.592209057,
"autogenerated": false,
"ratio": 3.46551... |
# Natural Language Toolkit: Classifiers
#
# Copyright (C) 2001 University of Pennsylvania
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
#
# $Id: __init__.py,v 1.1.1.2 2004/09/29 21:58:27 adastra Exp $
"""
Processing classes and interface... | {
"repo_name": "ronaldahmed/robot-navigation",
"path": "neural-navigation-with-lstm/MARCO/nltk/classifier/__init__.py",
"copies": "2",
"size": "10804",
"license": "mit",
"hash": 572146687597283300,
"line_mean": 34.3071895425,
"line_max": 71,
"alpha_frac": 0.6292114032,
"autogenerated": false,
"rat... |
# Natural Language Toolkit: Clusterers
#
# Copyright (C) 2004 University of Melbourne
# Author: Trevor Cohn <tacohn@cs.mu.oz.au>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
#
# $Id: __init__.py,v 1.1.1.1 2004/09/29 21:58:25 adastra Exp $
"""
This module contains a number of basic clustering... | {
"repo_name": "ronaldahmed/robot-navigation",
"path": "neural-navigation-with-lstm/MARCO/nltk/clusterer/__init__.py",
"copies": "2",
"size": "39218",
"license": "mit",
"hash": 4521569951890300000,
"line_mean": 38.2965931864,
"line_max": 96,
"alpha_frac": 0.5919475751,
"autogenerated": false,
"rat... |
# Natural Language Toolkit: Feature-Based Classifiers
#
# Copyright (C) 2001 University of Pennsylvania
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>,
# Trevor Cohn <tacohn@cs.mu.oz.au>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
#
# $Id: feature.py,v 1.4 2003/11/04 11:35:2... | {
"repo_name": "ronaldahmed/SLAM-for-ugv",
"path": "neural-navigation-with-lstm/MARCO/nltk_contrib/unimelb/tacohn/classifier/feature.py",
"copies": "2",
"size": "63124",
"license": "mit",
"hash": 1814843324114061300,
"line_mean": 36.6185935638,
"line_max": 78,
"alpha_frac": 0.6020531018,
"autogenera... |
# Natural Language Toolkit: Feature-Based Classifiers
#
# Copyright (C) 2001 University of Pennsylvania
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
#
# $Id: feature.py,v 1.1.1.1 2004/02/25 17:16:43 adastra Exp $
"""
Basic data classes... | {
"repo_name": "ronaldahmed/SLAM-for-ugv",
"path": "neural-navigation-with-lstm/MARCO/nltk/classifier/feature.py",
"copies": "2",
"size": "49895",
"license": "mit",
"hash": 6004406652812382000,
"line_mean": 38.0109460516,
"line_max": 75,
"alpha_frac": 0.6203427197,
"autogenerated": false,
"ratio":... |
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c
"""
Python module for computing Logistic Regression.
Requires numarray or Numeric.
Version: 20050711
Contact: Jeffrey Whitaker <jeffrey.s.whitaker@noaa.gov>
This code is released into the Public Domain as is.
No support or warrantee is prov... | {
"repo_name": "ronaldahmed/SLAM-for-ugv",
"path": "neural-navigation-with-lstm/MARCO/Utility/logistic_regression.py",
"copies": "2",
"size": "9820",
"license": "mit",
"hash": 3656052055232820700,
"line_mean": 39.2459016393,
"line_max": 109,
"alpha_frac": 0.6232179226,
"autogenerated": false,
"rat... |
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c
# Warning: hackish and not properly tested ripped out bit of code ahead
# so no guarantees whatsoever
# Anyway, it should at least sort of give you the idea
# try pca(X); if that doesn't do what you want try pca(t(X))
from numpy.oldnumeric import take, ... | {
"repo_name": "ronaldahmed/SLAM-for-ugv",
"path": "neural-navigation-with-lstm/MARCO/Utility/pca.py",
"copies": "2",
"size": "1130",
"license": "mit",
"hash": -4146413905135606000,
"line_mean": 36.6666666667,
"line_max": 83,
"alpha_frac": 0.6548672566,
"autogenerated": false,
"ratio": 3.383233532... |
## Automatically adapted for numpy Sep 19, 2005 by convertcode.py
__all__ = ['iscomplexobj','isrealobj','imag','iscomplex',
'isreal','nan_to_num','real','real_if_close',
'typename','asfarray','mintypecode','asscalar',
'common_type', 'datetime_data']
import numpy.core.numeric as _nx
fr... | {
"repo_name": "wangming28/syzygy",
"path": "third_party/numpy/files/numpy/lib/type_check.py",
"copies": "24",
"size": "17513",
"license": "apache-2.0",
"hash": 3573367952356314600,
"line_mean": 26.0262345679,
"line_max": 89,
"alpha_frac": 0.5510763433,
"autogenerated": false,
"ratio": 3.728550138... |
## Automatically adapted for numpy Sep 19, 2005 by convertcode.py
__all__ = ['unravel_index',
'mgrid',
'ogrid',
'r_', 'c_', 's_',
'index_exp', 'ix_',
'ndenumerate','ndindex']
import sys
import numpy.core.numeric as _nx
from numpy.core.numeric import asarray, Scal... | {
"repo_name": "santisiri/popego",
"path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/lib/index_tricks.py",
"copies": "1",
"size": "14297",
"license": "bsd-3-clause",
"hash": -8445793540039266000,
"line_mean": 30.284463895,
"line_max": 80,
"alpha_frac": 0.4... |
"""Automatically adapted for numpy Sep 19, 2005 by convertcode.py
"""
from __future__ import division, absolute_import, print_function
import functools
import warnings
__all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',
'isreal', 'nan_to_num', 'real', 'real_if_close',
'typename', 'asfar... | {
"repo_name": "gfyoung/numpy",
"path": "numpy/lib/type_check.py",
"copies": "2",
"size": "17923",
"license": "bsd-3-clause",
"hash": 7563293153298184000,
"line_mean": 24.9002890173,
"line_max": 80,
"alpha_frac": 0.5606204318,
"autogenerated": false,
"ratio": 3.678021752513852,
"config_test": fa... |
"""Automatically adapted for numpy Sep 19, 2005 by convertcode.py
"""
from __future__ import division, absolute_import, print_function
__all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',
'isreal', 'nan_to_num', 'real', 'real_if_close',
'typename', 'asfarray', 'mintypecode', 'asscalar',
... | {
"repo_name": "rmcgibbo/numpy",
"path": "numpy/lib/type_check.py",
"copies": "41",
"size": "15907",
"license": "bsd-3-clause",
"hash": -551308621479788400,
"line_mean": 25.2925619835,
"line_max": 79,
"alpha_frac": 0.5445401396,
"autogenerated": false,
"ratio": 3.7596312928385722,
"config_test":... |
"""Automatically adapted for numpy Sep 19, 2005 by convertcode.py
"""
import functools
import warnings
__all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',
'isreal', 'nan_to_num', 'real', 'real_if_close',
'typename', 'asfarray', 'mintypecode', 'asscalar',
'common_type']
impor... | {
"repo_name": "rgommers/numpy",
"path": "numpy/lib/type_check.py",
"copies": "11",
"size": "19768",
"license": "bsd-3-clause",
"hash": -210275237972785800,
"line_mean": 26.0054644809,
"line_max": 80,
"alpha_frac": 0.568646297,
"autogenerated": false,
"ratio": 3.6391752577319587,
"config_test": ... |
# Author: Travis Oliphant
import struct
import sys
import types
from numpy import *
import numpyio
import warnings
warnings.warn('fopen module is deprecated, please use npfile instead',
DeprecationWarning, stacklevel=2)
LittleEndian = (sys.byteorder == 'little')
__all__ = ['fopen']
def getsize_type... | {
"repo_name": "huard/scipy-work",
"path": "scipy/io/fopen.py",
"copies": "2",
"size": "13269",
"license": "bsd-3-clause",
"hash": 4583937431437114400,
"line_mean": 36.0642458101,
"line_max": 128,
"alpha_frac": 0.5265656794,
"autogenerated": false,
"ratio": 4.10677808727948,
"config_test": false... |
#
# Author: Travis Oliphant, 2002
#
from numpy import *
from _cephes import *
import types
import specfun
def sinc(x):
"""Returns sin(pi*x)/(pi*x) at all points of array x.
"""
w = asarray(asarray(x)*pi)
return where(x==0, 1.0, sin(w)/w)
def diric(x,n):
"""Returns the periodic sinc function als... | {
"repo_name": "huard/scipy-work",
"path": "scipy/special/basic.py",
"copies": "2",
"size": "25086",
"license": "bsd-3-clause",
"hash": -7328336800919231000,
"line_mean": 29.89408867,
"line_max": 80,
"alpha_frac": 0.5780913657,
"autogenerated": false,
"ratio": 2.7922974176313446,
"config_test": ... |
## Automatically adapted for scipy Oct 07, 2005 by convertcode.py
from scipy.optimize import minpack2
import numpy
import __builtin__
pymin = __builtin__.min
def line_search(f, myfprime, xk, pk, gfk, old_fval, old_old_fval,
args=(), c1=1e-4, c2=0.9, amax=50):
fc = 0
gc = 0
phi0 = old_fva... | {
"repo_name": "huard/scipy-work",
"path": "scipy/optimize/linesearch.py",
"copies": "2",
"size": "1442",
"license": "bsd-3-clause",
"hash": -1155113040135162600,
"line_mean": 25.7037037037,
"line_max": 82,
"alpha_frac": 0.5159500693,
"autogenerated": false,
"ratio": 2.9670781893004117,
"config_... |
## Automatically adapted for scipy Oct 07, 2005 by convertcode.py
import _zeros
from numpy import finfo
_iter = 100
_xtol = 1e-12
# not actually used at the moment
_rtol = finfo(float).eps * 2
__all__ = ['bisect','ridder','brentq','brenth']
CONVERGED = 'converged'
SIGNERR = 'sign error'
CONVERR = 'convergence error... | {
"repo_name": "huard/scipy-work",
"path": "scipy/optimize/zeros.py",
"copies": "2",
"size": "12560",
"license": "bsd-3-clause",
"hash": 6456372353677569000,
"line_mean": 36.380952381,
"line_max": 80,
"alpha_frac": 0.6313694268,
"autogenerated": false,
"ratio": 3.7729047762090717,
"config_test":... |
## License for the Python wrapper
## ==============================
## Copyright (c) 2004 David M. Cooke <cookedm@physics.mcmaster.ca>
## Permission is hereby granted, free of charge, to any person obtaining a copy of
## this software and associated documentation files (the "Software"), to deal in
## the Software w... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/optimize/lbfgsb.py",
"copies": "2",
"size": "9104",
"license": "bsd-3-clause",
"hash": -6276634064524701000,
"line_mean": 32.594095941,
"line_max": 85,
"alpha_frac": 0.575900703,
"autogenerated": false,
"ratio": 3.53279006596818,
"config_test": fal... |
## Automatically adapted for scipy Oct 18, 2005 by
#
# Author: Pearu Peterson, March 2002
#
# w/ additions by Travis Oliphant, March 2002
__all__ = ['solve','inv','det','lstsq','norm','pinv','pinv2',
'tri','tril','triu','toeplitz','hankel','block_diag','lu_solve',
'cho_solve','solve_banded','Li... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/linalg/basic.py",
"copies": "1",
"size": "28755",
"license": "bsd-3-clause",
"hash": 586703083330918300,
"line_mean": 28.8598130841,
"line_max": 92,
"alpha_frac": 0.5375412972,
"autogenerated": false,
"ratio": 3.3066927322907085,
"config_test": fal... |
#
# Author: Pearu Peterson, March 2002
#
# additions by Travis Oliphant, March 2002
# additions by Eric Jones, June 2002
# additions by Johannes Loehnert, June 2006
# additions by Bart Vandereycken, June 2006
# additions by Andrew D Straw, May 2007
# additions by Tiziano Zito, November 2008
__all__ = ['eig','eig... | {
"repo_name": "huard/scipy-work",
"path": "scipy/linalg/decomp.py",
"copies": "2",
"size": "53555",
"license": "bsd-3-clause",
"hash": -4792962517098076000,
"line_mean": 32.492808005,
"line_max": 89,
"alpha_frac": 0.5716179628,
"autogenerated": false,
"ratio": 3.4688127469395686,
"config_test":... |
#
# Author: Pearu Peterson, March 2002
#
__all__ = ['get_blas_funcs']
# The following ensures that possibly missing flavor (C or Fortran) is
# replaced with the available one. If none is available, exception
# is raised at the first attempt to use the resources.
from scipy.linalg import fblas
from scipy.linalg imp... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/linalg/blas.py",
"copies": "2",
"size": "2066",
"license": "bsd-3-clause",
"hash": -2811485374054142000,
"line_mean": 29.8358208955,
"line_max": 82,
"alpha_frac": 0.6040658277,
"autogenerated": false,
"ratio": 3.5195911413969334,
"config_test": fal... |
#
# Author: Pearu Peterson, March 2002
#
__all__ = ['get_flinalg_funcs']
# The following ensures that possibly missing flavor (C or Fortran) is
# replaced with the available one. If none is available, exception
# is raised at the first attempt to use the resources.
try:
import _flinalg
except ImportError:
_f... | {
"repo_name": "huard/scipy-work",
"path": "scipy/linalg/flinalg.py",
"copies": "2",
"size": "1703",
"license": "bsd-3-clause",
"hash": 3832391624699615000,
"line_mean": 29.9636363636,
"line_max": 82,
"alpha_frac": 0.6300645919,
"autogenerated": false,
"ratio": 3.5479166666666666,
"config_test":... |
#
# Author: Pearu Peterson, March 2002
#
__all__ = ['get_lapack_funcs']
import new
# The following ensures that possibly missing flavor (C or Fortran) is
# replaced with the available one. If none is available, exception
# is raised at the first attempt to use the resources.
import numpy
from scipy.linalg import ... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/linalg/lapack.py",
"copies": "2",
"size": "3826",
"license": "bsd-3-clause",
"hash": -2828299191062359000,
"line_mean": 31.9827586207,
"line_max": 75,
"alpha_frac": 0.5982749608,
"autogenerated": false,
"ratio": 3.619678334910123,
"config_test": fa... |
#
# Author: Travis Oliphant, March 2002
#
__all__ = ['expm','expm2','expm3','cosm','sinm','tanm','coshm','sinhm',
'tanhm','logm','funm','signm','sqrtm']
from numpy import asarray, Inf, dot, floor, eye, diag, exp, \
product, logical_not, ravel, transpose, conjugate, \
cast, log, ogrid, imag, real... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/linalg/matfuncs.py",
"copies": "2",
"size": "13498",
"license": "bsd-3-clause",
"hash": -6579207386591226000,
"line_mean": 24.4679245283,
"line_max": 74,
"alpha_frac": 0.5374870351,
"autogenerated": false,
"ratio": 3.1238139319601945,
"config_test"... |
## Automatically adapted for scipy Oct 18, 2005 by
#!/usr/bin/env python
import os
import sys
import re
from distutils.dep_util import newer_group, newer
from glob import glob
from os.path import join
#-------------------
# To skip wrapping single precision atlas/lapack/blas routines, set
# the following flag to Tru... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/linalg/setup.py",
"copies": "2",
"size": "7021",
"license": "bsd-3-clause",
"hash": 5602426327400436000,
"line_mean": 35.0051282051,
"line_max": 79,
"alpha_frac": 0.5197265347,
"autogenerated": false,
"ratio": 3.891906873614191,
"config_test": true... |
## Automatically adapted for scipy Oct 18, 2005 by
#!/usr/bin/env python
import os
import sys
if sys.version[:3]>='2.3':
import re
else:
import pre as re
from distutils.dir_util import mkpath
def all_subroutines(interface_in):
# remove comments
comment_block_exp = re.compile(r'/\*(?:\s|.)*?\*/')
... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/linalg/interface_gen.py",
"copies": "2",
"size": "6925",
"license": "bsd-3-clause",
"hash": -2597006350767339000,
"line_mean": 39.9763313609,
"line_max": 80,
"alpha_frac": 0.5527797834,
"autogenerated": false,
"ratio": 3.8708775852431527,
"config_t... |
## Automatically adapted for scipy Oct 21, 2005 by convertcode.py
import scipy.special
from numpy import logical_and, asarray, pi, zeros_like, \
piecewise, array, arctan2, tan, zeros, arange, floor
from numpy.core.umath import sqrt, exp, greater, less, cos, add, sin, \
less_equal, greater_equal
from spline i... | {
"repo_name": "huard/scipy-work",
"path": "scipy/signal/bsplines.py",
"copies": "2",
"size": "11363",
"license": "bsd-3-clause",
"hash": 2845218441823970000,
"line_mean": 29.7940379404,
"line_max": 102,
"alpha_frac": 0.5855847927,
"autogenerated": false,
"ratio": 2.961428199113891,
"config_test... |
# Author: Travis Oliphant 2001
__all__ = ['quad', 'dblquad', 'tplquad', 'quad_explain', 'Inf','inf']
import _quadpack
import sys
import numpy
from numpy import inf, Inf
error = _quadpack.error
def quad_explain(output=sys.stdout):
output.write("""
Extra information for quad() inputs and outputs:
If full_outpu... | {
"repo_name": "huard/scipy-work",
"path": "scipy/integrate/quadpack.py",
"copies": "1",
"size": "19471",
"license": "bsd-3-clause",
"hash": 8422108464880041000,
"line_mean": 48.0453400504,
"line_max": 468,
"alpha_frac": 0.6423398901,
"autogenerated": false,
"ratio": 3.777109602327837,
"config_t... |
# Author: Travis Oliphant
__all__ = ['odeint']
import _odepack
from copy import copy
_msgs = {2: "Integration successful.",
-1: "Excess work done on this call (perhaps wrong Dfun type).",
-2: "Excess accuracy requested (tolerances too small).",
-3: "Illegal input detected (internal error)... | {
"repo_name": "huard/scipy-work",
"path": "scipy/integrate/odepack.py",
"copies": "1",
"size": "6623",
"license": "bsd-3-clause",
"hash": -5584512949279789000,
"line_mean": 40.6540880503,
"line_max": 83,
"alpha_frac": 0.6047108561,
"autogenerated": false,
"ratio": 4.168030207677785,
"config_tes... |
# Author: Travis Oliphant
from scipy.special.orthogonal import p_roots as p_roots_orig
from numpy import sum, isinf, isscalar, asarray, real, empty
_cache = {}
#@profile
def p_roots(n):
try:
return _cache[n]
except KeyError:
_cache[n] = p_roots_orig(n)
return _cache[n]
#@profile
def ... | {
"repo_name": "certik/hermes1-dev",
"path": "hermes1d/quadrature.py",
"copies": "1",
"size": "2865",
"license": "bsd-3-clause",
"hash": 3335295593975741400,
"line_mean": 28.84375,
"line_max": 77,
"alpha_frac": 0.6537521815,
"autogenerated": false,
"ratio": 3.81491344873502,
"config_test": false... |
## Automatically adapted for scipy Oct 21, 2005 by
"""
Discrete Fourier Transforms - basic.py
"""
# Created by Pearu Peterson, August,September 2002
__all__ = ['fft','ifft','fftn','ifftn','rfft','irfft',
'fft2','ifft2', 'rfftfreq']
from numpy import asarray, zeros, swapaxes, integer, array
import numpy
im... | {
"repo_name": "huard/scipy-work",
"path": "scipy/fftpack/basic.py",
"copies": "1",
"size": "13482",
"license": "bsd-3-clause",
"hash": 7227440285081045000,
"line_mean": 31.486746988,
"line_max": 79,
"alpha_frac": 0.5772140632,
"autogenerated": false,
"ratio": 3.120833333333333,
"config_test": f... |
## Automatically adapted for scipy Oct 21, 2005 by
"""
Integration routines
====================
Methods for Integrating Functions given function object.
quad -- General purpose integration.
dblquad -- General purpose double integration.
tplquad -- General purpose triple integration.
... | {
"repo_name": "stefanv/scipy3",
"path": "scipy/integrate/info.py",
"copies": "2",
"size": "1311",
"license": "bsd-3-clause",
"hash": -5143107586728989000,
"line_mean": 37.5588235294,
"line_max": 77,
"alpha_frac": 0.6933638444,
"autogenerated": false,
"ratio": 4.56794425087108,
"config_test": fa... |
## Automatically adapted for scipy Oct 21, 2005 by
"""
ODE and DAE routines
====================
dae -- Solve DAE systems
ode -- Solve ODE systems, an extension to the scipy.integrate API
Interface to numerical integrators of DAE/ODE systems.
* Via the dae class:
ida -- The sun... | {
"repo_name": "logicabrity/odes",
"path": "scikits/odes/info.py",
"copies": "1",
"size": "1121",
"license": "bsd-3-clause",
"hash": -6792306670185031000,
"line_mean": 31.9705882353,
"line_max": 78,
"alpha_frac": 0.6057091882,
"autogenerated": false,
"ratio": 4.182835820895522,
"config_test": fa... |
"""Automatically apply overlays to field senescence data based on file
properties."""
import os
import time
import argparse
import datetime
from collections import defaultdict
from dtool import DataSet
def path_to_date(dataset, entry):
date = entry["path"].split(' ')[0]
try:
time.strptime(date, '... | {
"repo_name": "JIC-Image-Analysis/senescence-in-field",
"path": "scripts/auto_overlay.py",
"copies": "1",
"size": "3593",
"license": "mit",
"hash": -744417497238215300,
"line_mean": 24.8489208633,
"line_max": 84,
"alpha_frac": 0.658502644,
"autogenerated": false,
"ratio": 3.859291084854995,
"co... |
# Automatically associate sweeps with timestreams
import os
import time
import numpy as np
from kid_readout.measurement.io.readoutnc import ReadoutNetCDF
from kid_readout.analysis.noise_measurement import SweepNoiseMeasurement, save_noise_pkl
import cPickle
from kid_readout.roach.tools import ntone_power_correction
cr... | {
"repo_name": "ColumbiaCMB/kid_readout",
"path": "apps/data_analysis_scripts/custom_fix_atten_2015_06_hpd_pickle_sweep_noise_measurements.py",
"copies": "1",
"size": "4967",
"license": "bsd-2-clause",
"hash": 4829899007322888000,
"line_mean": 44.9907407407,
"line_max": 120,
"alpha_frac": 0.5560700624... |
"""Automatically convert and resize images to fit an E-Paper Display.
This utility takes an image, automatically resizes and centers it, and changes
the color depth to fit on Paperback. The output file contains an array which
can be copied and pasted directly into a header file in the static image
greyscale firmware.... | {
"repo_name": "dqydj/PaperBack_EPaper_Display",
"path": "software/image_converter/convert.py",
"copies": "1",
"size": "3514",
"license": "mit",
"hash": 6559084164598446000,
"line_mean": 27.8032786885,
"line_max": 78,
"alpha_frac": 0.5885031303,
"autogenerated": false,
"ratio": 3.5459132189707367,... |
"""Automatically converts hashes (#) followed by numbers (#123) in your commit
messages to URL's pointing to your issue tracker with the respective ID.
Add this to your global .hgrc file:
[extensions]
autoissue = path/to/autoissue.py
And to your repository's .hg/hgrc file:
[autoissue]
issuetracker =... | {
"repo_name": "vaikava/hg-autoissue",
"path": "autoissue.py",
"copies": "1",
"size": "1688",
"license": "mit",
"hash": 7084506659567583000,
"line_mean": 28.6140350877,
"line_max": 87,
"alpha_frac": 0.683056872,
"autogenerated": false,
"ratio": 3.7017543859649122,
"config_test": false,
"has_no... |
"""Automatically create python package version info based on git date and hash
This simple little module is intended to be included as a git
submodule by other python packages, and used by setup.py on
installation. See the README at
<https://github.com/moble/auto_version> for more details and
instructions on how to u... | {
"repo_name": "moble/auto_version",
"path": "__init__.py",
"copies": "1",
"size": "5728",
"license": "mit",
"hash": 7958896815308302000,
"line_mean": 44.824,
"line_max": 130,
"alpha_frac": 0.6143505587,
"autogenerated": false,
"ratio": 4.246108228317272,
"config_test": false,
"has_no_keywords... |
""" Automatically document Bokeh Jinja2 templates.
The ``bokeh-jinja`` directive generates useful type information
for the property attribute, including cross links to the relevant
property types. Additionally, any per-attribute docstrings are
also displayed.
This directive takes the path to an attribute on a Bokeh
m... | {
"repo_name": "KasperPRasmussen/bokeh",
"path": "bokeh/sphinxext/bokeh_jinja.py",
"copies": "8",
"size": "2978",
"license": "bsd-3-clause",
"hash": 9055995584434832000,
"line_mean": 27.6346153846,
"line_max": 76,
"alpha_frac": 0.6145063801,
"autogenerated": false,
"ratio": 3.991957104557641,
"c... |
"""Automatically download MLdata datasets."""
# Copyright (c) 2011 Pietro Berkes
# License: BSD 3 clause
import os
from os.path import join, exists
import re
import numbers
try:
# Python 2
from urllib2 import HTTPError
from urllib2 import quote
from urllib2 import urlopen
except ImportError:
# Pyt... | {
"repo_name": "hrjn/scikit-learn",
"path": "sklearn/datasets/mldata.py",
"copies": "31",
"size": "7856",
"license": "bsd-3-clause",
"hash": 2382257264012776400,
"line_mean": 31.7333333333,
"line_max": 79,
"alpha_frac": 0.6227087576,
"autogenerated": false,
"ratio": 3.850980392156863,
"config_te... |
"""Automatically download MLdata datasets."""
# Copyright (c) 2011 Pietro Berkes
# License: Simplified BSD
from __future__ import with_statement
import os
from os.path import join, exists
import re
from scipy import io
from shutil import copyfileobj
import urllib2
from .base import get_data_home, Bunch
MLDATA_BASE_... | {
"repo_name": "joshbohde/scikit-learn",
"path": "sklearn/datasets/mldata.py",
"copies": "1",
"size": "6543",
"license": "bsd-3-clause",
"hash": 3376042408928976000,
"line_mean": 33.4368421053,
"line_max": 79,
"alpha_frac": 0.6276937185,
"autogenerated": false,
"ratio": 3.799651567944251,
"confi... |
"""Automatically download MLdata datasets."""
# Copyright (c) 2011 Pietro Berkes
# License: Simplified BSD
import os
from os.path import join, exists
import re
from scipy import io
from shutil import copyfileobj
import urllib2
from .base import get_data_home, Bunch
MLDATA_BASE_URL = "http://mldata.org/repository/da... | {
"repo_name": "cdegroc/scikit-learn",
"path": "sklearn/datasets/mldata.py",
"copies": "2",
"size": "6501",
"license": "bsd-3-clause",
"hash": 3036361230366459000,
"line_mean": 33.3968253968,
"line_max": 79,
"alpha_frac": 0.6268266421,
"autogenerated": false,
"ratio": 3.7973130841121496,
"config... |
"""Automatically download MLdata datasets."""
# Copyright (c) 2011 Pietro Berkes
# License: Simplified BSD
import os
from os.path import join, exists
import re
import numbers
import urllib2
import scipy as sp
from scipy import io
from shutil import copyfileobj
from .base import get_data_home, Bunch
MLDATA_BASE_URL... | {
"repo_name": "lucidfrontier45/scikit-learn",
"path": "sklearn/datasets/mldata.py",
"copies": "5",
"size": "6646",
"license": "bsd-3-clause",
"hash": -7112509586115943000,
"line_mean": 33.2577319588,
"line_max": 79,
"alpha_frac": 0.6287992778,
"autogenerated": false,
"ratio": 3.808595988538682,
... |
"""Automatically download MLdata datasets."""
# Copyright (c) 2011 Pietro Berkes
# License: Simplified BSD
import os
from os.path import join, exists
import re
import numbers
try:
# Python 2
from urllib2 import HTTPError
from urllib2 import quote
from urllib2 import urlopen
except ImportError:
# P... | {
"repo_name": "kmike/scikit-learn",
"path": "sklearn/datasets/mldata.py",
"copies": "3",
"size": "6872",
"license": "bsd-3-clause",
"hash": -6007807189632258000,
"line_mean": 32.8522167488,
"line_max": 79,
"alpha_frac": 0.6311117579,
"autogenerated": false,
"ratio": 3.8455512031337435,
"config_... |
"""Automatically download MLdata datasets."""
# Copyright (c) 2011 Pietro Berkes
# License: Simplified BSD
import os
from os.path import join, exists
import re
import scipy as sp
from scipy import io
from shutil import copyfileobj
import urllib2
from .base import get_data_home, Bunch
MLDATA_BASE_URL = "http://mldat... | {
"repo_name": "sgenoud/scikit-learn",
"path": "sklearn/datasets/mldata.py",
"copies": "1",
"size": "6603",
"license": "bsd-3-clause",
"hash": -5413000696016507000,
"line_mean": 33.5706806283,
"line_max": 79,
"alpha_frac": 0.6272906255,
"autogenerated": false,
"ratio": 3.8013816925734023,
"confi... |
"""Automatically format references in a LaTeX file."""
import argparse
from multiprocessing import Pool
from reference_utils import Reference, extract_bibtex_items
from latex_utils import read_latex_file, write_latex_file
class ReferenceFormatter:
def __init__(self, add_arxiv):
self.add_arxiv = add_arxi... | {
"repo_name": "teunzwart/latex-production-tools",
"path": "reference_formatter.py",
"copies": "1",
"size": "1870",
"license": "mit",
"hash": 1140331940446446600,
"line_mean": 43.5238095238,
"line_max": 192,
"alpha_frac": 0.7,
"autogenerated": false,
"ratio": 3.9451476793248945,
"config_test": f... |
""""Automatically generate documentation from module docstrings."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# genmoddoc
#
# Public Functions:
# main
#
# ----------------------------------... | {
"repo_name": "aevri/phabricator-tools",
"path": "meta/docgen/genmoddoc.py",
"copies": "5",
"size": "2056",
"license": "apache-2.0",
"hash": -8789018789277969000,
"line_mean": 31.6349206349,
"line_max": 79,
"alpha_frac": 0.5058365759,
"autogenerated": false,
"ratio": 4.599552572706935,
"config_... |
"""Automatically generates Open Graph tags for Sphinx html docs.
Based on https://sphinx-users.jp/cookbook/ogp/index.html
"""
from docutils import nodes
from sphinx import addnodes
from urllib.parse import urljoin
class Visitor:
def __init__(self, document):
self.document = document
s... | {
"repo_name": "hanneshapke/pyzillow",
"path": "docs/_ext/ogtag.py",
"copies": "1",
"size": "3347",
"license": "mit",
"hash": -8859081519941072000,
"line_mean": 29.5754716981,
"line_max": 82,
"alpha_frac": 0.5927696445,
"autogenerated": false,
"ratio": 3.781920903954802,
"config_test": true,
"... |
# automatically generates sentences based on source words
# from output_shortlist.txt
# with a=action (verb), d=descriptor (adjective/adverb), t=thing (noun/pronoun), c=connector (preposition)
import random
filename1 = 'output_shortlist.txt'
# get lines of file into a list:
with open(filename1,'r') as f1:
data =... | {
"repo_name": "hchiam/cognateLanguage",
"path": "cognateLanguage_AutoSentence.py",
"copies": "1",
"size": "4130",
"license": "mit",
"hash": 5031577493000205000,
"line_mean": 32.3064516129,
"line_max": 132,
"alpha_frac": 0.6213075061,
"autogenerated": false,
"ratio": 3.6940966010733454,
"config_... |
"""Automatically get author names of references in a tex file."""
import argparse
import re
import webbrowser
from multiprocessing import Pool
from reference_utils import Reference, extract_bibtex_items, abbreviate_authors
from latex_utils import read_latex_file, remove_accented_characters
def get_unique_names(name... | {
"repo_name": "teunzwart/latex-production-tools",
"path": "reference_scraper.py",
"copies": "1",
"size": "3603",
"license": "mit",
"hash": -248311188560901730,
"line_mean": 42.4096385542,
"line_max": 129,
"alpha_frac": 0.6336386345,
"autogenerated": false,
"ratio": 3.796628029504742,
"config_te... |
"""Automatically making flask webservices from python objects"""
from numpy import ndarray
from pandas import Series, DataFrame
import re
import json
from ut.others.lru_cache import lru_cache
# from werkzeug.exceptions import InternalServerError
import ut.wserv.errors as err
# args_info = defaultdict(lambda: {'type'... | {
"repo_name": "thorwhalen/ut",
"path": "wserv/flask_wrap.py",
"copies": "1",
"size": "16329",
"license": "mit",
"hash": 7691991720804811000,
"line_mean": 44.6117318436,
"line_max": 120,
"alpha_frac": 0.6052422071,
"autogenerated": false,
"ratio": 3.9017921146953407,
"config_test": false,
"has... |
#Automatically manage international numbers
#Assign a number that each phone can use dynamically, based on what is listed in nipc list registered
import os
import sys
from time import sleep
import telnetlib
from flowroutenumbersandmessaging.flowroutenumbersandmessaging_client import FlowroutenumbersandmessagingClient a... | {
"repo_name": "Ironarcher/portable-cell-initiative",
"path": "software/flowroute/autoassign.py",
"copies": "1",
"size": "10244",
"license": "mpl-2.0",
"hash": -1138360536769010600,
"line_mean": 38.4,
"line_max": 159,
"alpha_frac": 0.7294025771,
"autogenerated": false,
"ratio": 3.4044533067464275,... |
"""Automatically mark moles on rotomap images."""
import copy
import numpy
import mel.lib.image
import mel.rotomap.detectmoles
import mel.rotomap.moles
def merge_in_radiuses(targets, radii_sources, error_distance, only_merge):
match_uuids, _, added_uuids = match_moles_by_pos(
targets, radii_sources, e... | {
"repo_name": "aevri/mel",
"path": "mel/rotomap/automark.py",
"copies": "1",
"size": "4419",
"license": "apache-2.0",
"hash": 5357655906206523000,
"line_mean": 30.7913669065,
"line_max": 79,
"alpha_frac": 0.6103190767,
"autogenerated": false,
"ratio": 3.302690582959641,
"config_test": false,
... |
"""Automatically mark moles on rotomap images."""
import mel.lib.image
import mel.rotomap.automark
import mel.rotomap.detectmoles
import mel.rotomap.mask
import mel.rotomap.moles
def setup_parser(parser):
parser.add_argument(
"IMAGES", nargs="+", help="A list of paths to images to automark."
)
pa... | {
"repo_name": "aevri/mel",
"path": "mel/cmd/rotomapautomark.py",
"copies": "1",
"size": "2121",
"license": "apache-2.0",
"hash": -8584142437156923000,
"line_mean": 31.1363636364,
"line_max": 79,
"alpha_frac": 0.6105610561,
"autogenerated": false,
"ratio": 3.6951219512195124,
"config_test": fals... |
"""Automatically mask rotomap images."""
import mel.lib.common
import mel.lib.fs
import mel.lib.image
import mel.rotomap.mask
def setup_parser(parser):
parser.add_argument(
"TARGET", nargs="+", help="Paths to images to automask."
)
parser.add_argument(
"--verbose",
"-v",
a... | {
"repo_name": "aevri/mel",
"path": "mel/cmd/rotomapautomask.py",
"copies": "1",
"size": "1434",
"license": "apache-2.0",
"hash": 3183889264019295000,
"line_mean": 31.5909090909,
"line_max": 79,
"alpha_frac": 0.6129707113,
"autogenerated": false,
"ratio": 3.9287671232876713,
"config_test": false... |
# Automatically reload all of the modules in the current directory
# or its subdirectories every time you enter a command in IPython.
# Usage: from the IPython toplevel, do
# In [1]: import autoreload
# autoreload enabled
# Very similar to %autoreload.
import os, sys, traceback
def relative_module(m):
return hasat... | {
"repo_name": "andrewowens/camo",
"path": "src/areload.py",
"copies": "1",
"size": "2838",
"license": "mit",
"hash": -9202606719510748000,
"line_mean": 31.6206896552,
"line_max": 101,
"alpha_frac": 0.6272022551,
"autogenerated": false,
"ratio": 3.512376237623762,
"config_test": false,
"has_no... |
"""Automatically reload chalice app when files change.
How It Works
============
This approach borrow from what django, flask, and other frameworks do.
Essentially, with reloading enabled ``chalice local`` will start up
a worker process that runs the dev http server. This means there will
be a total of two processes... | {
"repo_name": "awslabs/chalice",
"path": "chalice/cli/reloader.py",
"copies": "1",
"size": "4475",
"license": "apache-2.0",
"hash": -7586982085883587000,
"line_mean": 38.2543859649,
"line_max": 79,
"alpha_frac": 0.6759776536,
"autogenerated": false,
"ratio": 4.1396854764107305,
"config_test": f... |
"""Automatically reloading modules when their source has been updated.
This also allows for some state retention in reloaded modules, for modules
to specify dependencies that must be checked for being outdated as well, and to
unload those dependencies on reload.
There are two ways that we use to track if something sh... | {
"repo_name": "westernx/metatools",
"path": "metatools/imports/reload.py",
"copies": "1",
"size": "10048",
"license": "bsd-3-clause",
"hash": 2228924728936358700,
"line_mean": 31.5177993528,
"line_max": 124,
"alpha_frac": 0.6352507962,
"autogenerated": false,
"ratio": 4.191906549853984,
"config... |
"""Automatically remove marked regions that are probably not moles."""
import collections
import contextlib
import os
import pickle
import cv2
import numpy
from tqdm import tqdm
import mel.lib.fs
import mel.rotomap.automark
import mel.rotomap.mask
import mel.rotomap.moles
# The architecture we are using is 'resnet'... | {
"repo_name": "aevri/mel",
"path": "mel/rotomap/filtermarks.py",
"copies": "1",
"size": "15891",
"license": "apache-2.0",
"hash": 6582999357912239000,
"line_mean": 29.9766081871,
"line_max": 79,
"alpha_frac": 0.6222390032,
"autogenerated": false,
"ratio": 3.7076528231451236,
"config_test": fals... |
"""Automatically remove marked regions that are probably not moles."""
import sys
import mel.lib.fs
import mel.rotomap.filtermarks
import mel.rotomap.moles
def setup_parser(parser):
parser.add_argument(
"FRAMES",
type=mel.rotomap.moles.make_argparse_image_moles,
nargs="+",
help=... | {
"repo_name": "aevri/mel",
"path": "mel/cmd/rotomapfiltermarks.py",
"copies": "1",
"size": "4075",
"license": "apache-2.0",
"hash": -1270520726193666000,
"line_mean": 31.0866141732,
"line_max": 79,
"alpha_frac": 0.5852760736,
"autogenerated": false,
"ratio": 3.8995215311004783,
"config_test": f... |
# Automatically restart when the source code changes.
# From http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
import os
import sys
import time
import signal
import threading
import atexit
import Queue
_interval = 1.0
_times = {}
_files = []
_running = False
_queue = Queue.Queue()
_lock = threading.Lock()
d... | {
"repo_name": "hzdg/django-wsgitools",
"path": "wsgitools/monitor.py",
"copies": "1",
"size": "3058",
"license": "mit",
"hash": -6513927737500456000,
"line_mean": 24.2727272727,
"line_max": 73,
"alpha_frac": 0.5902550687,
"autogenerated": false,
"ratio": 4.143631436314363,
"config_test": false,... |
""""Automatically rewrite files with the correct legal footer."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# fixlegal
#
# Public Functions:
# main
# should_process_file
# get_first_yea... | {
"repo_name": "valhallasw/phabricator-tools",
"path": "meta/autofix/fixlegal.py",
"copies": "1",
"size": "7166",
"license": "apache-2.0",
"hash": 8787020352835852000,
"line_mean": 27.4365079365,
"line_max": 79,
"alpha_frac": 0.5785654479,
"autogenerated": false,
"ratio": 3.765633210719916,
"con... |
""""Automatically rewrite modules with a generated 'CONTENTS' section.
In addition to module docstrings that detail the purpose and some intended
usage of a module, it can be useful to have a short inventory of the salient
contents.
The Python built-in function 'help' does a great job of this, e.g.
FUNCTIONS
... | {
"repo_name": "kjedruczyk/phabricator-tools",
"path": "meta/docgen/updatemodcontents.py",
"copies": "4",
"size": "7323",
"license": "apache-2.0",
"hash": -327143508332555200,
"line_mean": 30.9781659389,
"line_max": 79,
"alpha_frac": 0.5755837771,
"autogenerated": false,
"ratio": 4.141968325791855... |
""""Automatically rewrite modules with the import blocks sorted."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# fiximports
#
# Public Classes:
# ProcessingException
#
# Public Functions:
# ... | {
"repo_name": "valhallasw/phabricator-tools",
"path": "meta/autofix/fiximports.py",
"copies": "1",
"size": "6011",
"license": "apache-2.0",
"hash": 987567741251811000,
"line_mean": 29.5126903553,
"line_max": 79,
"alpha_frac": 0.5816003993,
"autogenerated": false,
"ratio": 4.034228187919463,
"co... |
"""Automatically setup docs for a project
Call from command line:
bench frappe --setup_docs app docs_app path
"""
import os, json, frappe, markdown2, shutil
class setup_docs(object):
def __init__(self):
"""Generate source templates for models reference and module API
and templates at `templates/autodoc`
"... | {
"repo_name": "MaxMorais/frappe",
"path": "frappe/utils/setup_docs.py",
"copies": "4",
"size": "5310",
"license": "mit",
"hash": 4052660507825109000,
"line_mean": 30.9879518072,
"line_max": 92,
"alpha_frac": 0.6532956685,
"autogenerated": false,
"ratio": 2.9483620210993893,
"config_test": false... |
"""Automatically setup docs for a project
Call from command line:
bench frappe --setup_docs app docs_app path
"""
import os, json, frappe
class setup_docs(object):
def __init__(self, app, docs_app, path):
"""Generate source templates for models reference and module API.
Must set globals `self.models_base_pa... | {
"repo_name": "indictranstech/internal-frappe",
"path": "frappe/utils/setup_docs.py",
"copies": "13",
"size": "4284",
"license": "mit",
"hash": -1352690417482568000,
"line_mean": 30.2700729927,
"line_max": 92,
"alpha_frac": 0.6346872082,
"autogenerated": false,
"ratio": 2.8389662027833,
"config... |
"""Automatically setup docs for a project
Call from command line:
bench setup-docs app docs_app path
"""
import os, json, frappe, markdown2, shutil
class setup_docs(object):
def __init__(self):
"""Generate source templates for models reference and module API
and templates at `templates/autodoc`
"""
self... | {
"repo_name": "mbauskar/omnitech-frappe",
"path": "frappe/utils/setup_docs.py",
"copies": "15",
"size": "5301",
"license": "mit",
"hash": 5223795709909788000,
"line_mean": 30.9337349398,
"line_max": 92,
"alpha_frac": 0.6532729674,
"autogenerated": false,
"ratio": 2.946637020566982,
"config_test... |
"""Automatically setup docs for a project
Call from command line:
bench setup-docs app path
"""
from __future__ import unicode_literals
import os, json, frappe, shutil, re
from frappe.website.context import get_context
from frappe.utils import markdown
class setup_docs(object):
def __init__(self, app):
"""Gene... | {
"repo_name": "rohitwaghchaure/frappe",
"path": "frappe/utils/setup_docs.py",
"copies": "2",
"size": "15007",
"license": "mit",
"hash": -732148051049903900,
"line_mean": 31.6949891068,
"line_max": 102,
"alpha_frac": 0.6580262544,
"autogenerated": false,
"ratio": 2.9253411306042887,
"config_test... |
"""Automatically setup docs for a project
Call from command line:
bench setup-docs app path
"""
from __future__ import unicode_literals, print_function
import os, json, frappe, shutil
from frappe.utils import markdown
class setup_docs(object):
def __init__(self, app, target_app):
"""Generate source templates f... | {
"repo_name": "ESS-LLP/frappe",
"path": "frappe/utils/setup_docs.py",
"copies": "7",
"size": "10368",
"license": "mit",
"hash": 3990681891989332000,
"line_mean": 32.6623376623,
"line_max": 102,
"alpha_frac": 0.6576003086,
"autogenerated": false,
"ratio": 2.913177858949143,
"config_test": false,... |
"""Automatically setup docs for a project
Call from command line:
bench setup-docs app path
"""
import os, json, frappe, markdown2, shutil
import frappe.website.statics
from frappe.website.context import get_context
from markdown2 import markdown
class setup_docs(object):
def __init__(self, app):
"""Generate s... | {
"repo_name": "gangadhar-kadam/helpdesk-frappe",
"path": "frappe/utils/setup_docs.py",
"copies": "1",
"size": "14239",
"license": "mit",
"hash": -5335856779081564000,
"line_mean": 31.7333333333,
"line_max": 102,
"alpha_frac": 0.6580518295,
"autogenerated": false,
"ratio": 2.9232190515294603,
"c... |
"""Automatically setup docs for a project"""
import os, json
models_base_path = "apps/frappe_io/frappe_io/www/docs/models"
api_base_path = "apps/frappe_io/frappe_io/www/docs/api"
app_path = "apps/frappe/frappe"
app_name = "frappe"
def make_docs():
"""Generate source templates for models reference and module API.
... | {
"repo_name": "gangadharkadam/v5_frappe",
"path": "frappe/utils/setup_docs.py",
"copies": "4",
"size": "3664",
"license": "mit",
"hash": 4080585224223258000,
"line_mean": 29.2809917355,
"line_max": 89,
"alpha_frac": 0.6533842795,
"autogenerated": false,
"ratio": 2.8119723714504987,
"config_test... |
""" Automatic AWS EBS snapshot handling """
import logging
import logging.config
import time
import sys
from automated_ebs_snapshots.command_line_options import args
from automated_ebs_snapshots import config_file_parser
from automated_ebs_snapshots import connection_manager
from automated_ebs_snapshots import snapsho... | {
"repo_name": "bkarakashev/automated-ebs-snapshots",
"path": "automated_ebs_snapshots/__init__.py",
"copies": "1",
"size": "4944",
"license": "apache-2.0",
"hash": -145497727405873150,
"line_mean": 27.9122807018,
"line_max": 75,
"alpha_frac": 0.5661407767,
"autogenerated": false,
"ratio": 4.16512... |
""" Automatic backend selection. """
from .main import ProxyMixer
from . import _compat as _
class MixerProxy(object):
""" Load mixer for class automaticly.
::
from mixer.auto import mixer
django_model_instance = mixer.blend('django.app.models.Model')
sqlalchemy_model_instance = m... | {
"repo_name": "suriya/mixer",
"path": "mixer/auto.py",
"copies": "4",
"size": "2161",
"license": "bsd-3-clause",
"hash": 1555150955704747800,
"line_mean": 24.1279069767,
"line_max": 78,
"alpha_frac": 0.5863026377,
"autogenerated": false,
"ratio": 4.212475633528265,
"config_test": false,
"has_... |
"""Automatic derivation of different CC working equations.
The purpose of this sample script is to demonstrate that tensors can be created
by programming when it is impossible, or less desirable, to create them
statically with the mathematical notation. Drudge is a Python library. Users
have the full power of Python... | {
"repo_name": "tschijnmo/drudge",
"path": "docs/examples/gencc.py",
"copies": "1",
"size": "3060",
"license": "mit",
"hash": 9076274924600396000,
"line_mean": 22.7209302326,
"line_max": 79,
"alpha_frac": 0.6519607843,
"autogenerated": false,
"ratio": 2.8465116279069766,
"config_test": false,
... |
"""Automatic derivation of resitrict CCDF theory.
This script serves as an example of using drudge for complex symbolic
manipulations. The derivation here is going to be based on the approach in GE
Scuseria et al, J Chem Phys 89 (1988) 7382 (10.1063/1.455269).
"""
from pyspark import SparkConf, SparkContext
from sy... | {
"repo_name": "tschijnmo/drudge",
"path": "docs/examples/rccsd.py",
"copies": "1",
"size": "2146",
"license": "mit",
"hash": 4917445379820964000,
"line_mean": 22.5824175824,
"line_max": 78,
"alpha_frac": 0.6719478099,
"autogenerated": false,
"ratio": 2.812581913499345,
"config_test": false,
"... |
# automatic distinguish fileds type.
# writed by sunhuachuang #
# descs
# name => str
# key => str (pri or other)
# type => tuple (typename, params) int str float datetime date bool text enum
# default => str
# nullable => bool (True or False)
# extra => str
#results
# name => str
# type ... | {
"repo_name": "sunhuachuang/pytestdata",
"path": "main/automatic.py",
"copies": "1",
"size": "2798",
"license": "mit",
"hash": 5559741533468959000,
"line_mean": 23.3304347826,
"line_max": 83,
"alpha_frac": 0.5167977127,
"autogenerated": false,
"ratio": 3.4671623296158613,
"config_test": false,
... |
"""Automatic error checking for GL calls.
"""
import re
class GLError(Exception):
"""Exception representing an error within OpenGL.
"""
def __init__(self, error, result, func, arguments):
self.error = error
self.result = result
self.func = func
self.arguments = arguments
... | {
"repo_name": "swenger/glitter",
"path": "glitter/raw/errcheck.py",
"copies": "1",
"size": "2234",
"license": "mit",
"hash": 8594074397235406000,
"line_mean": 30.9142857143,
"line_max": 141,
"alpha_frac": 0.6226499552,
"autogenerated": false,
"ratio": 3.674342105263158,
"config_test": false,
... |
# Automatic first-order derivatives
#
# Written by Konrad Hinsen <hinsen@cnrs-orleans.fr>
# last revision: 2002-6-13
#
# Adapted slightly to work independently and use numpy - bgoli
# Brett Olivier 20070308
"""This module provides automatic differentiation for functions with
any number of variables. Instances of the ... | {
"repo_name": "bgoli/pysces",
"path": "pysces/lib/FirstDerivatives.py",
"copies": "2",
"size": "9861",
"license": "bsd-3-clause",
"hash": -7877258494797576000,
"line_mean": 30.3047619048,
"line_max": 82,
"alpha_frac": 0.5951729034,
"autogenerated": false,
"ratio": 3.3506625891946995,
"config_te... |
# Automatic first-order derivatives
#
# Written by Konrad Hinsen <hinsen@cnrs-orleans.fr>
# last revision: 2006-6-12
#
"""
Automatic differentiation for functions with any number of variables
Instances of the class DerivVar represent the values of a function and
its partial X{derivatives} with respect to a list of va... | {
"repo_name": "ForschungszentrumJuelich/phenoVein",
"path": "General/Modules/Macros/FZJveinThickness/least_sqr/FirstDerivatives.py",
"copies": "1",
"size": "10613",
"license": "bsd-3-clause",
"hash": -4023033422280351000,
"line_mean": 30.8708708709,
"line_max": 79,
"alpha_frac": 0.5832469613,
"auto... |
# Automatic first-order derivatives
#
# Written by Konrad Hinsen <hinsen@cnrs-orleans.fr>
# last revision: 2002-6-13
#
# Adapted slightly to work independently and use numpy - bgoli
# Brett Olivier 20070308
"""This module provides automatic differentiation for functions with
any number of variables. Instanc... | {
"repo_name": "asttra/pysces",
"path": "pysces/lib/FirstDerivatives.py",
"copies": "1",
"size": "9908",
"license": "bsd-3-clause",
"hash": 6110641836112236000,
"line_mean": 29.7564102564,
"line_max": 81,
"alpha_frac": 0.5732741219,
"autogenerated": false,
"ratio": 3.410671256454389,
"config_tes... |
"""Automatic grading script for the Trends project.
Expects the following files in the current directory:
trends.py
data.py
geo.py
maps.py
ucb.py
autograder.py
This file uses features of Python not yet covered in the course.
"""
__version__ = '1.4'
from autograder import test, run_tests, check_func, check_doctest,... | {
"repo_name": "candu/composing-programs",
"path": "trends/trends_grader.py",
"copies": "1",
"size": "15876",
"license": "mit",
"hash": -8575684918872506000,
"line_mean": 34.7567567568,
"line_max": 233,
"alpha_frac": 0.5761526833,
"autogenerated": false,
"ratio": 3.114773396115362,
"config_test"... |
# Automatic Grayscale Color Tracking Example
#
# This example shows off single color automatic grayscale color tracking using the OpenMV Cam.
import sensor, image, time
print("Letting auto algorithms run. Don't put anything in front of the camera!")
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_fra... | {
"repo_name": "openmv/openmv",
"path": "scripts/examples/Arduino/Portenta-H7/10-Color-Tracking/automatic_grayscale_color_tracking.py",
"copies": "2",
"size": "1957",
"license": "mit",
"hash": -7158679458497831000,
"line_mean": 39.7708333333,
"line_max": 109,
"alpha_frac": 0.6918753194,
"autogenerat... |
"""Automatic keyboard layout switcher"""
import functools
import logging
import subprocess
from typing import Iterable
from typing import Set
import xkbgroup
import swytcher.settings as settings
import swytcher.xwindow as xwindow
from swytcher.util import suppress_err
log = logging.getLogger(__name__) # pylint: dis... | {
"repo_name": "eddie-dunn/swytcher",
"path": "swytcher/swytcher.py",
"copies": "1",
"size": "3436",
"license": "mit",
"hash": 1164806468381413600,
"line_mean": 32.6862745098,
"line_max": 79,
"alpha_frac": 0.6536670547,
"autogenerated": false,
"ratio": 3.7145945945945944,
"config_test": false,
... |
"""Automatic mechanism to make sure code style of PRs is checked."""
import logging
import json
import threading
import os
import sys
import subprocess
import shlex
import github
import Queue
import errno
import shutil
from requests import Session, get
from time import sleep
from styleguard_config import cfg
from stat... | {
"repo_name": "bilderbuchi/ofCodeStyleGuard",
"path": "styleguard.py",
"copies": "1",
"size": "22424",
"license": "mit",
"hash": -3341660078598371300,
"line_mean": 36.1873963516,
"line_max": 79,
"alpha_frac": 0.6780235462,
"autogenerated": false,
"ratio": 3.228332853440829,
"config_test": false... |
"""automatic ner
Revision ID: cbd285d713b4
Revises: 8d8c050d3eca
Create Date: 2016-05-18 12:06:31.545249
"""
# revision identifiers, used by Alembic.
revision = 'cbd285d713b4'
down_revision = '8d8c050d3eca'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_column('entity', 'biography')
... | {
"repo_name": "pudo/aleph",
"path": "aleph/migrate/versions/cbd285d713b4_automatic_ner.py",
"copies": "5",
"size": "1094",
"license": "mit",
"hash": -4181792074370708000,
"line_mean": 30.2571428571,
"line_max": 101,
"alpha_frac": 0.6992687386,
"autogenerated": false,
"ratio": 3.265671641791045,
... |
# Automatic nth-order derivatives
#
# Written by Konrad Hinsen <hinsen@cnrs-orleans.fr>
# last revision: 2002-6-13
#
"""This module provides automatic differentiation for functions with
any number of variables up to any order. An instance of the class
DerivVar represents the value of a function and the values of its p... | {
"repo_name": "OS2World/DEV-PYTHON-UTIL-ScientificPython",
"path": "src/Lib/site-packages/Scientific/Functions/Derivatives.py",
"copies": "3",
"size": "10807",
"license": "isc",
"hash": -7149261216090134000,
"line_mean": 26.7102564103,
"line_max": 78,
"alpha_frac": 0.6477283242,
"autogenerated": fa... |
'''Automatic numbering script
This script does the following:
1. Updates the anchor tags to have the correct figure or table reference.
2. Updates the figure and table caption tags to
have a prefix of table x: or figure x:.
3. Updates chapter titles, section titles and subsection titles.
Chapter titles need ch... | {
"repo_name": "Siyavula/bookbuilder",
"path": "scripts/number_html5.py",
"copies": "1",
"size": "9273",
"license": "mit",
"hash": 721568792960117900,
"line_mean": 43.7971014493,
"line_max": 113,
"alpha_frac": 0.5205435134,
"autogenerated": false,
"ratio": 4.29504400185271,
"config_test": false,... |
"""Automatic placement of labels for features in a plot.
Depends on Numpy and Matplotlib.
"""
from __future__ import division, print_function
import warnings
import numpy as np
from matplotlib import pyplot as plt
__all__ = ['plot_line_ids', 'initial_annotate_kwargs', 'initial_plot_kwargs',
'unique_labels... | {
"repo_name": "phn/lineid_plot",
"path": "lineid_plot/lineid_plot.py",
"copies": "1",
"size": "19118",
"license": "bsd-2-clause",
"hash": 8224254017535992000,
"line_mean": 38.5817805383,
"line_max": 92,
"alpha_frac": 0.6149701852,
"autogenerated": false,
"ratio": 3.924055829228243,
"config_test... |
# Automatic RGB565 Color Tracking Example
#
# This example shows off single color automatic RGB565 color tracking using the OpenMV Cam.
import sensor, image, time
print("Letting auto algorithms run. Don't put anything in front of the camera!")
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize... | {
"repo_name": "openmv/openmv",
"path": "scripts/examples/Arduino/Portenta-H7/10-Color-Tracking/automatic_rgb565_color_tracking.py",
"copies": "2",
"size": "2179",
"license": "mit",
"hash": 803391204436785500,
"line_mean": 40.9038461538,
"line_max": 109,
"alpha_frac": 0.6709499771,
"autogenerated": ... |
"""Automatic ROI search."""
import numpy as np
from .types import AlgParams
ADCM_MIN = 0.00050680935535585281
ADCM_MAX = 0.0017784125828491648
def get_score_param(img, param):
"""Return parameter score of given ROI."""
if param.startswith('ADC'):
# return 1 - np.mean(img)
# return 1 / (np.m... | {
"repo_name": "jupito/dwilib",
"path": "dwi/autoroi.py",
"copies": "2",
"size": "3796",
"license": "mit",
"hash": 261026344786223000,
"line_mean": 33.1981981982,
"line_max": 78,
"alpha_frac": 0.5985247629,
"autogenerated": false,
"ratio": 3.1633333333333336,
"config_test": false,
"has_no_keyw... |
"""Automatic testing of all functions in `mochi_test_*.mochi files.
"""
import itertools as it
import pathlib
import pytest
from mochi.utils.pycloader import get_module
from conftest import auto_test
def find_mod_names(file_path=__file__):
"""Find Mochi module names that start with 'mochi_test_'.
The ret... | {
"repo_name": "slideclick/mochi",
"path": "tests/mochi_auto_test.py",
"copies": "3",
"size": "1736",
"license": "mit",
"hash": -8483620126795939000,
"line_mean": 32.3846153846,
"line_max": 73,
"alpha_frac": 0.6779953917,
"autogenerated": false,
"ratio": 3.7413793103448274,
"config_test": true,
... |
'''Automation of Game TicTacToe
on android device Moto G3 for
Game on Google play store (https://play.google.com/store/apps/details?id=com.pinkpointer.tictactoe)
Environments
Opencv for python
adb tool for debugging
Author: Rajmani Arya
'''
class Game:
def __init__(self):
self.board = [ 0 for i in ra... | {
"repo_name": "rajmani1995/TicTacToe-Automated",
"path": "tictactoe.py",
"copies": "1",
"size": "3660",
"license": "mit",
"hash": -780884852230621800,
"line_mean": 27.3720930233,
"line_max": 117,
"alpha_frac": 0.5786885246,
"autogenerated": false,
"ratio": 2.911694510739857,
"config_test": fals... |
"""Automation of moving files to kodi-scanned directories."""
import os
import sys
import argparse
import Queue
def ScanDir(dirpath, exts=None):
"""Scans direcotry and returns files."""
# exts == None - return all
queue = Queue.Queue()
queue.put(dirpath)
result = []
while not queue.empty():
dirpat... | {
"repo_name": "HawkMachine/kodi_automation",
"path": "kodi_automation.py",
"copies": "1",
"size": "2326",
"license": "mit",
"hash": 1583561554962997000,
"line_mean": 27.3658536585,
"line_max": 119,
"alpha_frac": 0.6629406707,
"autogenerated": false,
"ratio": 3.445925925925926,
"config_test": fa... |
# Automation Tests for SQLShare
# - Matt Stone
import os
import re
import unittest
import getpass
import time
from datetime import datetime
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expect... | {
"repo_name": "mattventura/sqlshare-tests",
"path": "sqlshare_tests_c.py",
"copies": "1",
"size": "13603",
"license": "apache-2.0",
"hash": -2144108580272959500,
"line_mean": 31.543062201,
"line_max": 127,
"alpha_frac": 0.5828861281,
"autogenerated": false,
"ratio": 4.202347852950263,
"config_t... |
"""Automation using nox.
"""
import nox
nox.options.sessions = ["dev"]
nox.options.reuse_existing_virtualenvs = True
nox.options.error_on_external_run = True
@nox.session(python="3")
def dev(session):
session.install("-r", "requirements.txt")
session.run("python", "manage.py", *session.posargs)
@nox.sess... | {
"repo_name": "pythonindia/junction",
"path": "noxfile.py",
"copies": "1",
"size": "1178",
"license": "mit",
"hash": -2901824178284940000,
"line_mean": 23.0408163265,
"line_max": 56,
"alpha_frac": 0.5696095076,
"autogenerated": false,
"ratio": 3.0757180156657964,
"config_test": false,
"has_no... |
"""Automation using nox.
"""
# The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
import io
import os
import shutil
import subprocess
import nox
nox.options.reuse_existing_virtualenvs = True
nox.options.sessions = ["lint"]
LOCATIONS = {
"common-wheels": "te... | {
"repo_name": "rouge8/pip",
"path": "noxfile.py",
"copies": "1",
"size": "5917",
"license": "mit",
"hash": -4466334008489071600,
"line_mean": 30.4734042553,
"line_max": 79,
"alpha_frac": 0.6001352037,
"autogenerated": false,
"ratio": 3.800256904303147,
"config_test": true,
"has_no_keywords": ... |
"""Auto-migration of sql alchemy models with alembic. Use with care"""
import copy
import io
import sys
import typing
import sqlalchemy.engine
import sqlalchemy.sql.schema
from sqlalchemy import * # unfortunately needed to get the eval part further down working
# noinspection PyUnresolvedReferences
from sqlalchemy.d... | {
"repo_name": "mara/mara-db",
"path": "mara_db/auto_migration.py",
"copies": "1",
"size": "6544",
"license": "mit",
"hash": 7980265481250647000,
"line_mean": 37.269005848,
"line_max": 121,
"alpha_frac": 0.6318765281,
"autogenerated": false,
"ratio": 4.197562540089801,
"config_test": false,
"h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.