Posts

Showing posts with the label Python

Python cheat sheet

Image
Pre-requisite Sounds obvious, but before you start, make sure you have Python installed. You can download it from from here: https://www.python.org/downloads/ I quite like using Notepad++ for testing my Python scripts, you can get it from here: https://notepad-plus-plus.org/downloads/ So in Windows for example, test if you have Python installed by using the '--version' command:

Converting between binary and decimal representations of IEEE 754 floating-point numbers in C++, Java and Python

Image
This post implements a previous post that explains how to convert 32-bit floating point numbers to binary numbers in the IEEE 754 format. What we have is some C++ / Java / Python routines that will allows us to convert a floating point value into it's equivalent binary counterpart, using the standard IEEE 754 representation consisting of the sign bit, exponent and mantissa (fractional part).

Getting Started with Python

Reading and analyzing data from a text file: My gentle introduction to writing a Python script.  A script I needed to read in a log file and extract all inkjet printhead temperature values in Celcius recorded for the duration of the print run. Very simple.

The IDLE Editor for Python

Image
Assuming you have downloaded and installed Python, whichever latest version it is, using the IDLE editor is very simple. For a proverbial "Hello World!" example follow the instructions below: