Skip to content

Run two python instances from one python file in sublime text

Suppose I have a python file which plot a simple sin(a*x) function. In sublime text, when I press command+B, the plot shows. However, suppose I need to change the parameter a and compare the figure with the current one. A simple second press of command+B just close the current plot and generate a new one, whi…

Find median of interval data in python

I am exploring different python libraries and I wondering how to find approximate median value of the grouped data set. Here is a table for a reference. Age frequency 1-10 123 10-20 350 20-30 200 30-40 1700 40-50 360 50-60 60 Is there any function or do I need to hard code the formula and then have a loop goi…

Data type somehow gets converted when appended to a list

I am trying to convert text to binary using ASCII encoding, and then decode the binary back to text as proof of concept for a larger project. The following code works well and does what it is supposed to do: However, as soon as I try to append the given value of output_data to a list within the for loop,