Tag Archives: python

Extracting numbers using regular expression

It took hours to understand how the regular expression works. I briefly explains the symbols in the codes. . any single character ? zero or one of the previous character + one or more of the previous character * zero … Continue reading

Posted in Python | Tagged , , , | Leave a comment

Python code to produce print surface from the level probe data

probe_0315.dat 20.00, 60.00, -0.630 0.00, 60.00, -0.690 -20.00, 60.00, -0.830 -40.00, 40.00, -0.290 -20.00, 40.00, -0.440 0.00, 40.00, -0.600 20.00, 40.00, -0.730 40.00, 40.00, -0.820 60.00, 20.00, 0.160 40.00, 20.00, -0.050 20.00, 20.00, -0.260 0.00, 20.00, -0.460 -20.00, 20.00, -0.620 … Continue reading

Posted in Reprap 3D Printer | Tagged , , , , , , | Leave a comment

ztouch – create empty files

Out of necessity I built a simple program that create many empty files. I put few examples how to use it in the code. Below command create exactly 1,000 empty files which mimic Nikon D200’s image files. The first file … Continue reading

Posted in GNU/Linux, Python | Tagged , , , , , , | 1 Comment

sympy – find equations for the lines that are tagent and normal to the curve at (1, 2).

Chapter 2 Practice Exercises, p183

Posted in Python | Tagged , , , , , | Leave a comment

sympy – changing graph color of plot()

plot() handles color names for RGB color codes. SymPy document doesn’t explain it clearly or sample codes don’t exit. Here is another example.

Posted in Python | Tagged , , , , , , | 1 Comment

sympy – an example of implicit differentiation

Posted in Python | Tagged , , , | Leave a comment

sympy – sawtooth function

Calculus and Analytic Geometry, George B. Thomas and Ross L. Finney Exercises 2.5 81, p163 s = 0.78540 – 0.63662*cos(2*t) – 0.07074*cos(6*t) – 0.02546*cos(10*t) – \ 0.01299*cos(14*t) plot(s, (t, -pi, pi)) dsdt = 1.27324*sin(2*t) + 0.42444*sin(6*t) + 0.2546*sin(10*t) + 0.18186*sin(14*t) … Continue reading

Posted in Python, Science and technologies | Tagged , , , , , , , , | Leave a comment