Datagram in Python

Pradeep Elance
Updated on 17-Oct-2019 12:24:35

601 Views

Chunks of data move between the clients and servers using the User Datagram Protocol or UDP protocol. The two communicating endpoints need the IP address and port number to establish communication. One endpoint is known as the sender and the other is known as the receiver. In this protocol, the sender does not keep track of the sent packets and it is up to the receiver to accept or not all the packets.Sender ProgramThe below python program uses the socket module to create the sender’s program. We declare variables for IP address and Port. Then add a message to it. ... Read More

Comprehensions in Python

Pradeep Elance
Updated on 17-Oct-2019 12:10:37

3K+ Views

We can create new sequences using a given python sequence. This is called comprehension. It basically a way of writing a concise code block to generate a sequence which can be a list, dictionary, set or a generator by using another sequence. It may involve multiple steps of conversion between different types of sequences.List ComprehensionIn this method, we create a new list by manipulating the values of an existing list. In the below example we take a list and create a new list by adding 3 to each element of the given list.Examplegiven_list = [x for x in range(5)] print(given_list) ... Read More

Colorsys Module in Python

Pradeep Elance
Updated on 17-Oct-2019 12:07:25

1K+ Views

This module allows bidirectional conversions of color values between colors expressed in the RGB (Red Green Blue) and other color spaces. The three other color spaces it uses are YIQ (Luminance (Y) In-phase Quadrature), HLS (Hue Lightness Saturation) and HSV (Hue Saturation Value). All the coordinates can be between 0 and 1 except the I and Q values in the YIQ color space.The below tables shows the functions and their purpose.FunctionPurposePermitted Valuesrgb_to_yiqfrom RGB coordinates to YIQ coordinates0 to 1rgb_to_hlsfrom RGB coordinates to HLS coordinates0 to 1rgb_to_hsvfrom RGB coordinates to HSV coordinates0 to 1yiq_to_rgbfrom YIQ coordinates to RGB coordinates-1 to 1hls_to_rgbfrom ... Read More

Class Method in Python

Pradeep Elance
Updated on 17-Oct-2019 12:03:20

474 Views

A class method receives the class itself as its first argument. This way we are able to call the method inside a class without first creating an instance from the class. We just use the decorator @classmethod before the declaration of the method contained in the class and then we can directly access the method. Below are the main features of classmethids.A classmethod is bound to a class and does not depend on the instantiation of a class to be used.A classmethod can modify a class which in turn propagates to all instances of the class.Using the classmethodIn the below ... Read More

Join Several Partitions on Linux

Samual Sam
Updated on 17-Oct-2019 11:55:43

467 Views

In this article, we will create a single partition on Linux using 2 drives of 20 GB each to make a 40 GB single mount point so that we can store the data in one place with more space on the volume. Here, we are using a package called ‘mhddfs‘ which is a driver for Linux that combines several mount points into a virtual disk. This is a fuse based driver which provides an easy solution for large data storage that combines many small file systems into a single big virtual file system.Features of MhddfsWe can get System information and ... Read More

Jawbone UP3 vs Fitbit Charge HR

Samual Sam
Updated on 17-Oct-2019 11:55:21

100 Views

Jawbone and Fitbit are the two popular companies that design and develop awesome fitness trackers. More often than not, the products developed by these two companies have the tinge of perfection and look as immaculate as they should be. Having said that, the fitness tracker of Jawbone is the attention grabber and self-proclaimed “world’s most advanced tracker” called UP3. In the case of Fitbit, it is the cynosure of all eyes which is rightly called Charge HR. Approach any individual with average technical acumen, and ask him about the best fitness trackers, he would name either Jawbone UP3 or Fitbit ... Read More

Operating System Resource Management

Arnab Chakraborty
Updated on 17-Oct-2019 11:31:02

7K+ Views

An operating system (OS) is basically a collection of software that manages computer hardware resources and provides common services for computer programs. The operating system is a crucial component of the system software in a computer system.These are some few common services provided by an operating system −Program executionI/O operationsFile System manipulationCommunicationError DetectionResource AllocationProtectionIn the matter of multi-user or multi-tasking environments, resources such as main memory, CPU cycles and files storage are to be allocated to each user or job. Some major activities of an OS with respect to resource management are −The Operating System manages all kinds of resources ... Read More

Operating System Error Handling

Arnab Chakraborty
Updated on 17-Oct-2019 11:29:00

3K+ Views

An operating system (OS) is basically a collection of software that manages computer hardware resources and provides common services for computer programs. Operating system is a crucial component of the system software in a computer system.These are some few common services provided by an operating system −Program executionI/O operationsFile System manipulationCommunicationError DetectionResource AllocationProtectionErrors can occur anytime and anywhere in operating system. An error can occur in CPU, in I/O devices or in the memory hardware. Some major activities of an operating system with respect to error handling are−The Operating System constantly checks for possible errors.The Operating System takes an appropriate ... Read More

Process Communication in Operating System

Arnab Chakraborty
Updated on 17-Oct-2019 11:27:36

6K+ Views

Processes that executing concurrently in the operating system may be either independent processes or cooperating processes. if a process cannot affect or be affected by the other processes executing in the system then the process is said to be independent. So any process that does not share any data with any other process is independent. A process is said to be cooperating if it can affect or be affected by the other processes executing in the system. So it is clear that, any process which shares its data with other processes is a cooperating process.There are many reasons for providing ... Read More

File System Manipulation

Arnab Chakraborty
Updated on 17-Oct-2019 11:22:43

4K+ Views

An operating system (OS) is basically a collection of software that manages computer hardware resources and provides common services for computer programs. Operating system is a crucial component of the system software in a computer system.These are some few common services provided by an operating system −Program executionI/O operationsFile System manipulationCommunicationError DetectionResource AllocationProtectionA file represents a collection of related information. Computers may store files on the disk (secondary storage), for long-term storage purpose. Some Examples: magnetic tape, magnetic disk and optical disk drives like CD, DVD. They have its own properties like speed, capacity, data transfer rate and data access ... Read More

Advertisements