Skip to content

36th Week of 2021

Computer Science

GNULinux

ImageMagick

  • New: Resize and compress a JPG image.

    Resize an image to width 1000 px and compress it with a JPG quality level of 80% in place:

    mogrify -quality 1000 -resize 80 file.jpg
    

uptimed

  • New: Uptimed.

    uptimed is an uptime record daemon keeping track of the highest uptimes a computer system ever had. It uses the system boot time to keep sessions apart from each other. uptimed comes with a console front-end to parse the records, which can also easily be used to show your records on a web page.

    To set up the program just install it with your package manager and it will start running in the background by default and keeping track of your uptime.

    To check the stats run uprecords.

Programming

TDD

  • New: Exploratory coding (spiking).

    When learning a new tool or exploring a new possible solution, it’s often appropriate to leave the rigorous TDD process to one side, and build a little prototype without tests, or perhaps with very few tests. The goat doesn't mind looking the other way for a bit.

    For de-spiking, rewrite your prototype code using TDD.

Decorators

  • New: Overrides decorator.

    overrides is a decorator that verifies that a method that should override an inherited method actually does, and that copies the docstring of the inherited method to the overridden method.

Linters

  • New: Pydocstyle missing docstrings overr.

    To allow missing docstrings when overriding methods you can use the @overrides decorator and the command line option --ignore-decorator=overrides or the setting ignore_decorator = "overrides" in the configuration file.

unittest

  • New: Patch an abstract class.

    To patch an abstract class to be able to instantiate it, without having to create a fake class that inherits from it, you can patch it as follows:

    @patch.object(MyAbcClass, '__abstractmethods__', set())
    

    or if you want to patch some attributes and/or methods at the same time:

    @patch.multiple(MyAbcClass, __abstractmethods__=set())
    

Countries

Turkey

Touristic visa

  • New: Personal experience.

Eskişehir

  • New: Eskişehir travel guide.