Terminator won’t start

I ran into a stupid error.

My terminal client Terminator wouldn’t start on ubuntu and I didn’t get any no error either.

I started it via terminal. Here I got the following error:

/usr/bin/terminator
except (KeyError,ValueError), ex

I found the problem and solution
python3 was changed to my default system python

=> changed it back to 2.7, everything works again

I use update-alternatives

you can set up things easily. eg. python

check if it’s maybe already set up for python

# CHECK if setup for python
update-alternatives --list python

otherwise set up the alternatives

# SETUP ALTERNATIVE 1
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

# SETUP ALTERNATIVE 2
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2

and configure the version you want to be used by default

# CONFIGURE
update-alternatives --config python

There are 2 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
0 /usr/bin/python3.6 2 auto mode
1 /usr/bin/python2.7 1 manual mode
2 /usr/bin/python3.6 2 manual mode
Press to keep the current choice[*], or type selection number:

Jupyter Notebooks for “Python Data Science Handbook”

I've found a GitHub Repo which offers the content from O'Reilly's Python Data Science Handbook – Essential Tools for Working with data (Released Nov 2016).

The following content in form of Jupyter Notebooks is to be found:

  1. IPython: Beyond Normal Python
  2. Introduction to NumPy
  3. Data Manipulation with Pandas
  4. Visualization with Matplotlib
  5. Machine Learning 
    Appendix: Figure Code

If you want to learn more about Data Science, this is certainly a good way.

https://github.com/dunovank/PythonDataScienceHandbook

Multi-threaded 7-Zip with Zstandard, Brotli, Lz4, Lz5 and Lizard Compression support

Great compression performance now available for use in windows and more
https://github.com/mcmilk/7-Zip-zstd

You can also get there the multithreading c library for Brotli, Lizard, LZ4, LZ5 and ZStandard used in it
https://github.com/mcmilk/zstdmt


Python LZ4 lib

I've also found a good python multi-threaded lib for LZ4
https://github.com/Iotic-Labs/py-lz4framed

Easy to use

import lz4framed

compressed = lz4framed.compress(b'my normal text')

uncompressed = lz4framed.decompress(compressed)

file compression

with open('somefile.csv', 'wb') as f:
    # Context automatically finalises frame on completion, unless an exception occurs
    with Compressor(f) as c:
        try:
            while (...):
               c.update(moreData)
        except Lz4FramedNoDataError:
            pass

file decompression

with open('somefile.csv.lz4', 'rb') as f:
    try:
        for chunk in Decompressor(f):
           decoded.append(chunk)
    except Lz4FramedNoDataError:
        # Compress frame data incomplete - error case

command line utility

python3 -mlz4framed
USAGE: lz4framed (compress|decompress) (INFILE|-) [OUTFILE]

(De)compresses an lz4 frame. Input is read from INFILE unless set to '-', in
which case stdin is used. If OUTFILE is not specified, output goes to stdout.

Some benchmarks

Quick Benchmark: Gzip vs Bzip2 vs LZMA vs XZ vs LZ4 vs LZO

Tested were: Compression ratio, Compression time, Decompression time, Memory requirements on compression, Memory requirements on decompression, Time to compress, Time to decompress, Memory used, Compression ratio

https://catchchallenger.first-world.info/wiki/QuickBenchmark:GzipvsBzip2vsLZMAvsXZvsLZ4vsLZO