'Master' & 'Slave' Words to be Removed From Python

These service words will be removed from one of the most popular programming languages for political correctness
13 September 2018   1422

The creator of the Python programming language, Guido van Rossum, announced that Python 3.8 will remove designs with the words "master" and "slave" for reasons of political correctness. This proposal was made by a Red Hat employee and one of the key developers of Python Victor Stinner. He believes that words are associated with slavery and inequality.

The proposal caused discussion in the circles of developers. In the opinion of opponents of change, Stinner mixes politics and programming, and "master" and "slave" are just terms whose meaning has nothing to do with the approval of slavery. In addition, their replacement can lead to violation of backward compatibility, community members are sure.

Guido van Rossum accepted four out of five commits. Among them:

  • master process is replaced by the parent process;
  • master option mappings replaced by main option mappings;
  • master pattern object replaced by main pattern object;
  • in the ssl module, the word master is replaced by server;
  • in pty.spawn () the parameter master_read is replaced with parent_read;
  • the pty.slave_open () method is renamed to pty.child_open (), but thepty.slave_open call is still left for backward compatibility;
  • in os.openpty () and os.forkpty (), the parameters of master_fd / slave_fd are renamed to parent_fd / child_fd;
  • internal variables master_fd, slave_fd and slave_name are renamed to parent_fd, child_fd and child_name respectively;
  • the --slaveargs option is replaced by --worker-args;
  • the function run_tests_slave () is renamed to run_tests_worker ()

The creator of the Redis database, Salvatore Sanfilippo, also suggested to get rid of it from the terms "master" and "slave". Participants want to rename SLAVEOF operations to REPLICAOF and slaveof settings in replicaof. At the same time, SLAVEOF support will remain as an option for maintaining compatibility. For the same purpose, the slave feature in the INFO and ROLE commands remains. In the future, community members want to come up with an alternative to INFO and replace the slave with a replica in the ROLE.

Nvidia to Open SPADE Source Code

SPADE machine learning system creates realistic landscapes based on rough human sketches
15 April 2019   673

NVIDIA has released the source code for the SPADE machine learning system (GauGAN), which allows for the synthesis of realistic landscapes based on rough sketches, as well as training models associated with the project. The system was demonstrated in March at the GTC 2019 conference, but the code was published only yesterday. The developments are open under the non-free license CC BY-NC-SA 4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0), allowing use only for non-commercial purposes. The code is written in Python using the PyTorch framework.

Sketches are drawn up in the form of a segmented map that determines the placement of exemplary objects on the scene. The nature of the generated objects is set using color labels. For example, a blue fill turns into sky, blue into water, dark green into trees, light green into grass, light brown into stones, dark brown into mountains, gray into snow, a brown line into a road, and a blue line into the river. Additionally, based on the choice of reference images, the overall style of the composition and the time of day are determined. The proposed tool for creating virtual worlds can be useful to a wide range of specialists, from architects and urban planners to game developers and landscape designers.

Objects are synthesized by a generative-adversarial neural network (GAN), which, based on a schematic segmented map, creates realistic images by borrowing parts from a model previously trained on several million photographs. In contrast to the previously developed systems of image synthesis, the proposed method is based on the use of adaptive spatial transformation followed by transformation based on machine learning. Processing a segmented map instead of semantic markup allows you to achieve an exact match of the result and control the style.

To achieve realism, two competing neural networks are used: the generator and the discriminator (Discriminator). The generator generates images based on mixing elements of real photos, and the discriminator identifies possible deviations from real images. As a result, a feedback is formed, on the basis of which the generator begins to assemble more and more qualitative samples, until the discriminator ceases to distinguish them from the real ones.