Found 26504 Articles for Server Side Programming

Accessor and Mutator Methods in Python

Rohan Singh
Updated on 13-Apr-2023 12:05:38

5K+ Views

Accessor and mutator methods in Python are used to access the private data of a class which cannot be accessed from outside the class. In object oriented programming the class object data is encapsulated i.e the object data is kept private and cannot be accessed from outside the object. The access to these private data from outside the object is provided using the Accessor and mutator method in python. These methods are also known as getter and setter methods in python. In this article we will understand Accessor and mutator methods with help of examples. Accessor Methods Accessor method ... Read More

Accessing Data Along Multiple Dimensions Arrays in Python Numpy

Rohan Singh
Updated on 13-Apr-2023 12:04:40

585 Views

Numpy is a python library used for scientific and mathematical computations. Numpy provides functionality to work with one dimensional arrays and multidimensional arrays. Multidimensional arrays consist of multiple rows and columns. Numpy provides multiple built in functions to interact with multidimensional arrays. In this article we will explore how to access data along multiple dimensions arrays in python numpy. Creating Multidimensional Array in Python Numpy To create a multidimensional array in python we need to pass a list of lists to numpy.array() method of numpy. The list will contain multiple lists each of which represents the rows of the ... Read More

Access Modifiers in Python : Public, Private and Protected

Rohan Singh
Updated on 13-Apr-2023 16:09:50

26K+ Views

Access modifiers are used by object oriented programming languages like C++, java, python etc. to restrict the access of the class member variable and methods from outside the class. Encapsulation is an OOPs principle which protects the internal data of the class using Access modifiers like Public, Private and Protected. Python supports three types of access modifiers which are public, private and protected. These access modifiers provide restrictions on the access of member variables and methods of the class from any object outside the class. Public Access Modifier By default the member variables and methods are public which means they ... Read More

Access meta data of various audio and video files using Python

Rohan Singh
Updated on 17-Apr-2023 09:39:36

4K+ Views

We can access the metadata of audio files using Mutagen and the eyeD3 module in Python. For video metadata, we can use movies and the OpenCV library in Python. Metadata is the data that provides information about other data like audio and video data. Metadata of audio and video files include the format of the file, resolution of the file, file size, duration, bit rate, etc. By accessing these metadata we can manage the media more efficiently as well as analyze the metadata to get some useful information. In this article, we will look at some of the libraries or ... Read More

Access Index of Last Element in pandas DataFrame in Python

Rohan Singh
Updated on 13-Apr-2023 11:26:49

11K+ Views

To access the index of the last element in the pandas dataframe we can use the index attribute or the tail() method. Pandas is a Python library used for data manipulation and analysis. Data frame is a data structure provided by pandas which is used to work with large datasets effectively. In this article we will understand how we can access the index of the last element in pandas data frame. What is a Data Frame? Data frame is a two-dimensional, tabular data structure which has rows and columns just like a matrix or spreadsheet or a ... Read More

Access files of a devices in the same network using Python

Rohan Singh
Updated on 17-Apr-2023 09:37:17

3K+ Views

If multiple devices are connected over the same network i.e LAN or wifi then Python provides a way to access the files of the devices sharing the same network. Python built-in http.server module allows us to easily access the files of the devices connected over the same network. Http.server is a simple server that serves devices from the current directory or the chosen directory of the device when a request on the server is done. In this article, we will discuss the steps involved in accessing the files of a device in the same network using Python. Step 1 : ... Read More

Access environment variable values in Python

Rohan Singh
Updated on 17-Apr-2023 09:33:06

8K+ Views

Environment variables in Python are configuration values stored outside the code and are used at runtime by the application. These variables are present in the form of key-value pairs just like dictionaries in Python. These variables can be set, updated, or removed from the configuration file without changing the application code. Python gives many operating systems functions to access environment variables without affecting the code of the application. In this article, we will learn the ways in which we can access environment variables in Python. Using the OS Module In order to interact with the operating system python has an ... Read More

A simple News app with Tkinter and Newsapi

Rohan Singh
Updated on 17-Apr-2023 09:30:27

799 Views

Tkinter is a Python library that is used to make desktop applications for Windows and UNIX-based Operating systems. Tkinter gives many choices to make a widget for the application. The same widget can be made in different ways using Tkinter. Today there are vast sources of information available on the internet. News is constantly coming from global sources to local sources. Keeping track of the latest news is a daunting task. In this article, we will build a simple News app with Tkinter and Newsapi. What is Newsapi? News API is an (Application programming interface) that provides access to news ... Read More

8-bit game using pygame

Rohan Singh
Updated on 17-Apr-2023 09:27:06

1K+ Views

Pygame is an open-source Python library used for making games. Pygame library provides various functions and tools for creating games, sound processing, and graphics.pygame library can be used to create games on any operating system like Windows, Linux, and macOS as pygame is a cross-platform library. What is an 8-bit Game? The 8-bit game was very popular in the 1980s. The 8-bit video games included graphics and sound that were created using 8-bit technology i.e a limited color palette and sound range that fall within the 8-bit range were used to create such video games. In this article, we will ... Read More

8 Tips For Object-Oriented Programming in Python

Rohan Singh
Updated on 17-Apr-2023 09:22:44

1K+ Views

Object-oriented programming language is a programming paradigm that is widely used in software design as it makes the code reusable and reduces code redundancy. It uses classes and objects to implement real-world objects in programming. Python and other languages like C++, java, javascript, etc support object-oriented programming. In this article, we will understand the characteristics of object-oriented programming and some tips to use object-oriented programming in Python. In object-oriented programming, objects are created from their class blueprint. These objects represent real-world objects as they have some properties called attributes and methods just like real-world objects have their own properties and ... Read More

Advertisements