I have created a program on github to answer this question with examples and code samples: https://github.com/jlinoff/ztables. It shows how to generate z-tables for Standard Normal Distributions and Student-t Distributions. It also shows how to generate the z-values for specific probabilities from those distributions without using any special libraries.
The program has been tested using Python 2.7.10 and 3.5.
I created a simple python based web server to demonstrate how to use SimpleHTTPServer.SimpleHTTPRequestHandler for handling GET/POST requests. It also demonstrates how to build a system that supports embedded python, templates, create custom URLs, execute local scripts and a number of other things.
It is a single script that acts like a web server, a web server gateway interface and server code so the solution is completely self contained.
Continue reading Simple python web server to demonstrate GET/POST handling and support for embedded Python- round 2
This example shows how to create a bash function that will accept white space arguments. This doesn’t come up often but when it does I have to re-discover how to do it. This little reminder will make that rediscovery process unnecessary.
Continue reading Bash function that accepts white space arguments
The bld.sh script provided installs gcc 4.8.4 and boost 1.57.0 on CentOS and Mac OS X for testing. It is another entry in my continuing series of releases for different versions of g++. Hopefully this will make it easier for folks that want to experiment with this version of the GNU C++ compiler to use C++-11 constructs.
Continue reading Bash script to install gcc 4.8.4 and boost 1.57 on CentOS and Mac OS X
This blog describes a simple open source (MIT licensed) web server that demonstrates how browser/server interactions work for GET and POST requests using the python BaseHTTPServer package. It was updated to version 1.2 on 20-May-2015. This software is licensed under the term of the MIT license. Feel free to use it however you wish.
Use it as a starting point to understand the package when creating your own custom web server for handling specific types of requests but recognize that it is not suitable for a production environment. To use it in such an environment you would, at the very least, want to add improve the error handling and add threading support. You would probably also want to add SSL/TLS support.
Continue reading Simple python web server to demonstrate GET/POST handling
This script (p4-whodunit.py) will analyze a perforce depot file to determine and report who changed each line of code. It is useful for tracking down recent changes that might have caused a problem. It is covered by the MIT license. You can download it here.
Continue reading p4-whodunit.py – a python script to display who changed each line of code in a perforce depot file
This example shows how to use the forge package to encrypt and decrypt objects. It also shows how to define a number of useful prototypes and other utility functions.
This week I created a script to install the gcc-4.9.3 compiler and linker with boost 1.5.7. A very simple Makefile is also available. Both files are based on scripts I have created for earlier versions of the compiler. This version also includes tcmalloc for linux platforms.
Continue reading Bash script to install gcc-4.9.2 with boost 1.57 on CentOS 5.x, CentOS 6.x and Mac OS X
Valgrind must have fixed memory limits so that it can accurately track the memory allocations of the program under test. On 64 bit architectures it is limited to 64GB. This script will download, modify and build valgrind for larger memory configurations.
Continue reading Bash script to build and install valgrind 3.9.0 with memory limits of 128GB, 256GB and 512GB on linux-x86_64
The bld.sh script provided installs gcc 4.9.1 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X for testing. It is another entry in my continuing series of releases for different versions of g++. Hopefully this will make it easier for folks that want to experiment with this version of the GNU C++ compiler.
Continue reading Bash script to install gcc 4.9.1 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X 10.9
The bld.sh script provided installs gcc 4.8.3 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X for testing. It is another entry in my continuing series of releases for different versions of g++. Hopefully this will make it easier for folks that want to experiment with this version of the GNU C++ compiler.
Continue reading Bash script to install gcc 4.8.3 and boost 1.55.0 on CentOS 6.x, CentOS 5.x and Mac OS X 10.9
Continue reading Automatically install a webserver based on django, nginx and gunicorn on a CentOS 6.5 VPS
Continue reading Simple algorithm to insert commas (commaize) in 9 languages
The mkwebsite package allows you to install multiple completely self contained production quality websites on a single server for development and debugging without root privileges. I have used it for web development on linux and Mac OS X. The sites generated can also be used in production.
I developed it because I wanted to be able to completely remove my development sites without leaving any system wide packages around that I didn’t need and because I wanted to compare security settings side by side for sites that were otherwise identical.
It is very easy to use, simply download the package, extract it and run the associated install script for each website that you want to create. It takes care of all the system administration details (like database and server configuration) so that you can concentrate on development.
Continue reading How to support multiple self-contained production quality web sites based on django, postgres and nginx on a single server using mkwebsite
This python script shows how to add a super user and display all super users in your Django 1.6 installation from the command line. I wrote it to support automated configuration of my django installations.
Continue reading How to add a superuser in Django 1.6 from the command line
I have written a public domain remote control tool call rctl.py that runs remote commands on one or more hosts to automate all sorts of different administration tasks. It consists of a single python script that does not require any configuration and does not require client side daemons (sometimes called minions) so no tool based client side installation is needed which makes it much simpler to setup and use compared to tools such as Puppet, Chef or salt. Of course it is not as powerful as those tools but it has met my modest needs for small networks (<100 hosts). I hope that you find it as useful as I have.
Continue reading Simple remote control command execution tool (rctl.py)
Continue reading PassMan – Browser Based Password Manager Released
I recently installed gcc 4.8.2 and boost 1.55.0 on CentOS 6.4 to take advantage of the improved support for C++-11. It was painful to do manually so I automated the process with this script: http://projects.joelinoff.com/gcc-4.8.2/bld.sh. Hopefully this will make it easier for folks that want to experiment with the latest version of the GNU C++ compiler.
If you are interested in a more recent version, I recently added a post
that provides a script to install gcc-4.8.3 and boost 1.55.0.
Continue reading Bash script to install gcc 4.8.2 and boost 1.55.0 on CentOS 6.4, CentOS 5.5 and Mac OS X 10.9
This blog contains two python implementations of the SELECT algorithm to select the k-th ordered item from an unsorted array of N items in O(N) time. They derive from the discussion of RANDOM-SELECT and SELECT in the CLRS “Introduction to Algorithms, 3rd Edition” on pages 215-222 and from Professor David Eppstein’s lecture notes entitled “ICS 161: Design and Analysis of Algorithms” from January 30th, 1996.
Continue reading Select the k-th smallest item from an unordered array in O(n) in python