Roland's homepage

My random knot in the Web

Articles tagged with "python"

  1. Switching IPython to Python 3

    More and more, IPython has become my tool of choice as the ultimate calculator and to try out concepts and code for use in my programs.

    While I generally use the terminal-based interactive shell, notebooks offer more capabilities for integrating text, formulas and graphics.

    With Python 2.7 effectively mostly ...

  2. dxftools

    Introduction

    The purpose of the ‘dxfgerber’ program is to generate optimized DXF files for processing on a Gerber cutting machine. The software for this cutter is apparently not very intelligent and doesn’t seem able to sort line and arc entities in a DXF file in a relevant order.

    This ...
  3. Python number conversions

    Sometimes one has to convert numbers from and to different formats. Below are some examples in Python that I picked up over time. What you see are excerpts of IPython sessions.

    To and from hexadecimal (base 16):

    In [1]: hex(100)
    Out[1]: '0x64'
    
    In [2]: int(0xa7)
    Out[2 ...
  4. Filtering a sound recording

    Recently I was listening to an MP3 file of a talk about no-till gardening when I noticed that there was a noticable buzz in the sound. I figured I would try my hand at sound filtering with Python as a learning experience.

    The Python standard library doesn’t have a ...

  5. Evaluating REACH

    One of my responsibilities at work is to act as local expert with regard to chemical substances. One of the tasks is making sure we comply with REACH (“Registration, Evaluation, Authorisation and restriction of CHemical substances”).

    The REACH directive itself is huge, numbering 515 pages in the Dutch version. In ...

  6. A new STL convertor added

    In addition to stl2pov, I’ve now written a program that writes a shaded projection of the STL file (along the z-axis) as a PostScript file. It supports arbitrary rotations of the STL file around x-, y- or z-axis and automatically centers the object in the view, so you can ...

  7. stl2pov rewrite

    Python logo

    On 2011-04-04 I re-wrote my parser for STL files in Python. The original C parser was 411 lines (excluding comments and blank lines). The new parser in Python is 134 lines. This is also without comments. It took me about two hours to write from scratch. But that includes debugging ...

  8. Learning Python

    XKCD python strip

    Over the years I’ve heard a lot about the Python programming language. Now I have decided to start and learn it. I’m already reasonably fluent in languages like Perl, Lua, C and Bourne shell. But each of those feels like it’s lacking somewhat. Building and maintaining versions ...


←  Page 1 Page 2 / 2