Handles arguments for small scripts that need to:
- read some command line options
- read some command line positional arguments
- iterate over all lines of some files given on the command line, or stdin if none given
- give usage message if positional arguments are missing
- give usage message if input files are missing and stdin is not redirected
This is an implementation of the binary search algorithm in (almost) one line. Given a number 'n' and a list 'L', the function returns the index of the number on the list, or -1.
Function to auto-strip indentation and whitespace from triple-quoted multi-line strings in Python code. Useful when you need to emit blocks of HTML/TCL/etc. from Python, but don't want to mess up the visual flow of your Python code.
When working between platforms, it is often necessary to convert the line endings on files for them to work, especially when it comes to code. Pass Unix Python code with \r and it goes nowhere. Same on Mac Python with \n. This code simply and...
READBIN is a Text Console-based program which reads a single Input File specified on the command line one character at a time and prints out a formatted hex "dump" representation of the files contents 16 characters per display line. A...
This code eliminates the need to convert line endings when moving .py modules between OSes. Put in your sitecustomize.py, anywhere on sys.path, and you'll be able to import Python modules with any of Unix, Mac, or Windows line endings, on any OS.
This procedure reads through a file of unknown size once, returning a random line from the file.
DHTML / CSS based line graph script allows you to represent line graphs using only DHTML and CSS.
Unlike an applet based solution, this loads fast and blends in with the rest of the page. You can even use a transparent background for it.
this program evaluates the impedance and phase velocity in the shielded microstrip transmission line. program helps to view the effect of dimension of shielding used.
Lumped Parameter Model of Hydraulic Transmission line
Here is a lumped parameter model of a hydraulic transmission line.
The line is modeled by one, two, three, four and ten lump models.
The simulation program presents the transient...
Based on the Two line elements(TLE) - Input from the user, the program calculates the time and the date of the satellite pass. Prints out Azimuth and Elevation & plots it too.
[M,B] = AG_RECTA(X,Y) finds the the slope M and the y-intercept B of the line that better fits to the X,Y data. X and Y are vectors of the same length.
The problem of fitting a straight line to data with uncertainties in both coordinates is solved using a weighted total least-squares algorithm. The parameters are transformed from the usual slope/y-axis intersection pair to slope angle and...
This is a Line Coding Technique, used for data formating. Different Formating is done with there spectral analysis.
An efficient algorithm for identification of strong polarity-inversion line (SPIL) on Solar Dynamic Observatory (SDO) Helioseismic and Magnetic Imager (HMI) magnetograms.
Detailed description will appear in the paper: Volobuev, D.M....
computes the distance from a given line segment (in 2d) or draws an anti aliased line
see http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html for computation of the orthogonal distance to the line.
dpsimplify uses the recursive Douglas-Peucker line simplification algorithm to reduce the number of vertices in a polyline according to a specified tolerance. The algorithm is also know as Iterative Endpoint Fit algorithm. dpsimplify can handle...
this function provides drag and drop of any line objects in an axes within a figure window;
to use this:
just give the handle of the figure or figures that you want to have D&D functionality associated with it to the...
LINEINMASK determines portions of the line in and out of a mask
[inX inY] = LINEINMASK(XS,YS,BW,XV,YV) computes a the segments of the
line specified by verticies XV and YV that are inside the mask BW.
Points XS and YS...
Model of "Four wire unbalanced Transmission line"