Giter Club home page Giter Club logo

dlnpyutils's Introduction

David Nidever's Python Utility Functions

This package has a bunch of small functions that I find useful while working in python. Most of the functions are in a module called "dlnpyutils".

Installation

Until I get this in pypi the best way is the usual git clone and setup install:

git clone https://github.com/dnidever/dlnpyutils.git
cd dlnpyutils
python setup.py install

Using the package

To import all of the package functions into the namespace do:

from dlnpyutils.dlnpyutils import *

Some of the functions

dlnpyutils:

  • mad: median absolute deviation of array
  • minmax: minimum and maximum of an array
  • stat: many useful statistics of an array
  • strlen: number of characters in a string array or list
  • strip: strip whitespace from string array or list
  • strjoin: combine string arrays or scalars
  • strsplit: split string arrays
  • pathjoin: join two pathname components
  • first_el: return the first element of an array or list
  • grep: grep on a string array
  • readlines: read a file into a string array
  • writelines: write a string array to a file
  • remove_indices: remove certain indices from an array
  • numlines: return the number of lines in a file
  • basiclogger: return a basic logger to the screen and optionally a file
  • remove: delete multiple files and allow for non-existence
  • lt: takes the lesser of x or limit
  • gt: takes the greater of x or limit
  • limit: require x to be within upper and lower limits
  • gaussian: return Gaussian plus constant
  • gaussfit: fit a 1-D Gaussian to X/Y data
  • poly: evaluate a polynomial function of a variable
  • slope: derivative or slope of an array

job_daemon: This is a simple batch job manager.

dlnpyutils's People

Contributors

holtzmanjon avatar dnidever avatar

Forkers

sdss

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.