Other articles

  1. Timeout a function in python

    Sat 02 June 2018 | tags: Python

    You can use signals and a context manager to acheive this. The idea is to register a function that will raise an exeption when the alarm signal is received and schedule the alarm signal for the timeout.

    import signal
    from contextlib import contextmanager
    def timeout(time):
        # Register a function …
    read more
  2. Run multiple docker daemons on the same host

    Today I am going to explain how you can run multiple docker daemons on the same host. This can be useful if you want several users to use docker and want each of them to be isolated from one another (ie don't see images, containers, … of other users). The solution …

    read more
  3. How to cache Python module in Gitlab CI

    By default, pip cache will be in ~/.pip. However, this folder cannot be cached by Gitlab. The trick is to force pip to use a folder located in the build directory with the --cache-dir option. You can then cache this folder.

    For instance, you can use .pip as in the …

    read more

Page 1 / 10 »