Roland's homepage

My random knot in the Web

Articles tagged with "python3"

  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. TeXcalc

    As an engineer, I often do diverse calculations that I want to save in my logbooks which I write in LaTeX. Up to now I’ve either formatted those by hand or used the listings package to include calculations made in IPython.

  3. Stltools

    From the release of version 3.2, the py-stl software has been renamed to stltools. The reason I made this change mostly has to do with how FreeBSD handles packages. Programs that require an interpreter are prefixed with its name and version. So py-stl would become py27-py-stl, which would be ...

  4. Generate random passwords

    One way of making hard to guess passwords is to take random data and encode it with base64 to make it readable. This is what I’ve done in the genpw.py script.

    This is mainly useful for passwords that you can store in a secure manner (like in an ...

  5. Keyword expansion with git

    One of the things I liked about the old rcs revision control system was that it supported keyword expansion in files. Unlike systems like rcs, cvs and subversion, the git revision control system cannot provide keyword expansion. The cause for this is that you can’t modify a file with ...

  6. Python number conversions

    Sometimes one has to convert numbers from and to different formats. Below are some examples in Python 3 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 ...

←  Page 1 Page 2 / 4 Page 3 →