Check Horoscope Using Python

Niharika Aitam
Updated on 09-Aug-2023 16:00:18

249 Views

Checking horoscope using Python Python is used in many applications all over the world. One of the applications is to check the horoscope on that day or day after using the Beautifulsoup of the python language. The following are the steps to be followed to check the horoscope using python. Installing the beautifulsoup Firstly, we have to install the beautifulsoup package in our python working envinornment. The below is the code. pip install bs4 The output of installing the beautifulsoup is as follows. Collecting bs4 Downloading bs4-0.0.1.tar.gz (1.1 kB) Preparing metadata (setup.py): started ... Read More

Implement DFS Traversal Using Adjacency Matrix in C

Pranavnath
Updated on 09-Aug-2023 15:58:59

5K+ Views

Introduction Graph theory allows us to study and visualize relationships between objects or entities. In the current technology of computer science, graph traversal plays a crucial role in exploring and analyzing different types of data structures. One of the crucial operations performed on graphs is traversal - visiting all vertices or nodes, following specific paths. DFS traversal, based on a depth-first approach, allows us to explore the depths of a graph before backtracking and exploring other branches. In this article, we will involve in implementing DFS traversal using an adjacency matrix representation in C. DFS traversal using Adjacency Matrix ... Read More

Iterate Over Words of a String in Python

Sai Mohan Pulamolu
Updated on 09-Aug-2023 15:56:15

2K+ Views

In this article, we will learn various methods to iterate over words of a string in Python. Understanding how to access and manipulate words in a string is a very important skill for any Python programmer, as it allows for efficient text processing and analysis. We will discuss the problem statement and provide solutions using different approaches in Python. Using the split() Method Syntax string.split(separator, maxsplit) The split() method takes two optional parameters: separator and maxsplit. By default, the separator is any whitespace, and maxsplit is −1, which means the method will split the string at every occurrence of ... Read More

Check If PyMongo Cursor Is Empty

Niharika Aitam
Updated on 09-Aug-2023 15:41:50

2K+ Views

PyMongo is one of the libraries in python which provides a way to interact with the MongoDB , the most popular NoSQL document oriented database. It allows the developers to easily connect with the mongoDB instances and interact with the databases and collections, insert and retrieve the documents and other various operations. Cursors in PyMongo A cursor in MongoDB is an object that points to the documents. When we execute the find() method by passing a search query as a parameter, the results of the given query are returned in the form of a cursor object. By iterating ... Read More

Check User's Internet Connection Status Using Python

Niharika Aitam
Updated on 09-Aug-2023 15:40:38

14K+ Views

Generally, if you need to verify whether your current system is connected to the internet or not, we can do so, by simply sending request to any of webserver application using the browser or, using the dos command ping. The ping command is typically used to troubleshoot connectivity, reachability, and name resolution. Similarly, in Python we can verify the user’s internet connectivity status either by sending a request to any web application or by using the ping command. Using the request.get() method In python, the modules request helps us to send HTTP requests using Python. By sending requests ... Read More

Click HREF Link from Bootstrap Tabs Using Python

Niharika Aitam
Updated on 09-Aug-2023 15:32:55

244 Views

Bootstrap is the popular HTML, CSS, JavaScript framework which helps us to develop responsive, mobile first, front end web applications. It provides design templates for forms, typography, navigation, buttons and other interface components. Python is the best language to manipulate the web content. The Selenium Library If we need to click a link using Python programming we should use the selenium library. It is the most popular open source automation testing tool which allows us to make the web browsers automate. Selenium is mainly used for the testing purpose of the automated web applications and also used for other ... Read More

Clone Webpage Using PyWebCopy in Python

Niharika Aitam
Updated on 09-Aug-2023 15:31:44

2K+ Views

Python provides Pywebcopy module, that allows us to download and store the entire website including all the images, HTML pages and other files to our machine. In this module, we have one of the functions namely save_webpage() which allows us to clone the webpage. Installing pywebcopy module Firstly, we have to install the pywebcopy module in the python environment using the following code. pip install pywebcopy On successful installation we will get the following output – Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting pywebcopy Downloading pywebcopy-7.0.2-py2.py3-none-any.whl (46 kB) . . ... Read More

Communicate JSON Data Between Python and Node.js

Niharika Aitam
Updated on 09-Aug-2023 15:30:11

671 Views

JSON  can be abbreviated as JavaScript Object Notation. It is a text-based file used for transferring and storing data in programming languages. It is supported by the python programming language using a built-in package namely JSON, Its text is given in the quoted string format in which contains a key and value within the curly braces{} as same as a dictionary. For using JSON in python, we have to import the JSON package in python script. JSON package provides several methods, among them one of the methods is dumps. This is used to convert the python tuple objects into ... Read More

Check Continuous Blocks of 0s in Binary Matrix

Pranavnath
Updated on 09-Aug-2023 15:24:04

202 Views

Introduction Binary matrices are widely used in computer science and various fields to represent data or solve complex problems efficiently. In some cases, it becomes important to identify whether a given binary matrix contains continuous blocks of zeros. In this article, we will explore an elegant solution using C++ code that allows us to detect if there are T number of continuous blocks of zeroes within a given binary matrix. This approach is both intuitive and efficient, making it suitable for practical implementation. Check if there are T number of continuous of blocks of 0s or not Given ... Read More

Combine GroupBy and Multiple Aggregate Functions in Pandas

Niharika Aitam
Updated on 09-Aug-2023 15:19:57

1K+ Views

The groupby() and aggregate() are the two functions available in the pandas library. The groupby() function The groupby() function allows you to group a DataFrame by one or more columns. It internally performs a combination of operations such as splitting the object, applying a function, and combining the results, on the dataframe object. This function returns DataFrameGroupBy object which contains information about the groups. Once we obtain this object we can perform various operations such as calculating the mean, calculating the sum and average etc… Syntax Following is the syntax of the groupby() function – DataFrame.groupby(by=None, axis=0, level=None, as_index=True, ... Read More

Advertisements