Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Server Side Programming Articles
Page 116 of 2109
Facts App Using Tkinter module
In Python, we can use the Tkinter module and randfacts module to create a Facts generator App. Tkinter is Python's built-in GUI toolkit that allows you to create graphical applications with buttons, labels, text boxes, and other widgets. The randfacts module generates random interesting facts. In this article, we will implement a Fact App Generator GUI application using Tkinter and the randfacts module. Installing Required Dependencies To create the facts generator app, we first need to install the randfacts module using pip. Type the following command in your terminal or command prompt ⤦ pip install randfacts ...
Read MoreFacts about Cython Programming Language
Cython is a programming language that is a superset of Python and can be compiled into C code for improved performance. Cython is developed to improve the execution speed and make the code faster compared to Python. In this article, we will look at some interesting facts about Cython Programming Language. Cython can be used to speed up Python code As the name suggests Cython is Python-like code that can be converted to C code for faster and improved execution speed. Developers can write code in Python which is then compiled into C code and makes the language ...
Read MoreExtracting locations from text using Python
In Python, we can extract locations from text using NLP libraries such as NLTK, spaCy, and TextBlob. Extracting locations from text is crucial for various Natural Language Processing tasks such as sentiment analysis, information retrieval, and social media analysis. In this article, we will discuss how to extract locations from text using the spaCy library. Prerequisites Installing spaCy Library Before using the spaCy library for location extraction, you need to install it using the pip command. Type the following command in your terminal or command prompt ? pip install spacy Download the Pre-trained ...
Read MoreExtracting an attribute value with beautiful soup in Python
To extract an attribute value with the help of Beautiful Soup we need to parse the HTML document and then extract the required attribute value. Beautiful Soup is a Python library that is used to parse HTML and XML documents. BeautifulSoup provides several methods to search and navigate the parse tree, making it easy to extract data from the documents. In this article, we will extract attribute values with the help of Beautiful Soup in Python. Algorithm You can follow the below-given algorithm to extract attribute values with beautiful soup in Python: Parse ...
Read MoreExtract the title from a webpage using Python
In Python, we can extract the title from a webpage using web scraping. Web scraping is the process of extracting data from a website or webpage. In this article, we will scrape the title of a webpage using various Python libraries including Requests, BeautifulSoup, urllib, Selenium, and regular expressions. Method 1: Using Requests and BeautifulSoup The most common approach uses the requests library to send HTTP requests and BeautifulSoup to parse HTML content. The requests library fetches the webpage, and BeautifulSoup extracts the title tag. Example In the below example, we extract the title of the ...
Read MoreDraw a circle using Arcade in Python3
Arcade is a Python library used to create 2D games and applications. It provides easy-to-use functionality for drawing shapes and images on the screen. In this article, we will learn how to draw circles using Arcade in Python3. Installing Arcade Before drawing circles, install the Arcade library using pip ? pip install arcade Method 1: Using arcade.draw_circle_filled() The most straightforward way to draw a circle is using the draw_circle_filled() method. Syntax arcade.draw_circle_filled(x, y, radius, color) Parameters x − The x-coordinate of the circle's center point y ...
Read Moredrag_and_drop_by_offset method – Action Chains in Selenium Python
The drag_and_drop_by_offset() method in Selenium's Action Chains allows you to drag an element to a new position using pixel coordinates. This method is particularly useful for interacting with sliders, draggable widgets, and custom UI elements. What is drag_and_drop_by_offset? The drag_and_drop_by_offset() method drags an element from its current position to a new location specified by x and y offset values. The method takes three parameters: the element to drag, x-offset (horizontal pixels), and y-offset (vertical pixels). Syntax drag_and_drop_by_offset(source, xoffset, yoffset) Parameters source − The element to drag xoffset − Horizontal distance in ...
Read MoreDownloading PDFs with Python using Requests and BeautifulSoup
Requests and BeautifulSoup are Python libraries that can download PDFs from web pages. The requests library sends HTTP requests and receives responses, while BeautifulSoup parses HTML to extract PDF links. In this article, we will understand how to download PDFs using these libraries in Python. Installing Dependencies Before using the BeautifulSoup and Requests libraries, we need to install them using pip commands − pip install requests pip install beautifulsoup4 Method 1: Direct PDF Download If you have a direct PDF URL, you can download it directly using requests − import requests ...
Read MoreDownload XKCD Comics using Python
XKCD is a popular webcomic that features humor, science, and geek culture. The comic is famous for its witty jokes as well as references to culture and science. We can download comics using the XKCD API with Python's requests and Pillow libraries. In this article, we will download XKCD comics using Python. Understanding XKCD API XKCD provides an open API that allows developers to access comics programmatically. To use the API, we send an HTTP GET request to the URL https://xkcd.com/{comic_id}/info.0.json. The request returns a JSON object containing information about the specified XKCD comic, including the image URL. ...
Read MoreDownload Instagram profile pic using Python
Instagram is one of the most popular social media platforms that allows users to share photos and videos with their followers. As an Instagram user, you might come across some interesting profile pictures that you may want to save or download. In this article, we will download Instagram profile pics using Beautiful Soup and the Instaloader library in Python. Method 1: Using Beautiful Soup and Requests Module In this method, we send a GET request to the user's Instagram profile URL using the requests module and it returns the HTML response. We need to parse the HTML response ...
Read More