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 31 of 2109
Python | Measure similarity between two sentences using cosine similarity
Natural Language Processing for finding the semantic similarity between sentences, words, or text is very common in modern use cases. Cosine similarity is a popular method that measures the cosine of the angle between two non-zero vectors using dot product formula notation. Through this article let us briefly explore cosine similarity and see its implementation using Python. What is Cosine Similarity? Cosine similarity is defined as the cosine of the angle between two vectors in space. A sentence or text can be represented as a vector based on word frequencies. The similarity between two sentences depends upon ...
Read MoreDraw an Arc Using Arcade in Python
Python's Arcade library is a powerful 2D graphics framework for creating games and visual applications. In this article, we'll learn how to draw arcs using two different methods − filled arcs and outlined arcs. What is Arcade Library? Arcade is a modern Python library built on top of Pyglet that provides simple tools for creating 2D games and graphics. It offers cross−platform compatibility and includes features like sprites, shapes, and animation support. Installing Arcade First, install the Arcade library using pip ? pip install arcade Method 1: Using draw_arc_filled() This method ...
Read MoreDraw a Tree Using Arcade Library in Python
Python's Arcade library is a modern graphics library designed for creating 2D games and graphical applications. In this tutorial, we'll learn how to draw a simple tree using Arcade's drawing functions. What is Arcade Library? Arcade is a Python library built on top of Pyglet that provides a simple interface for creating graphics and games. It offers modern features and cleaner syntax compared to older graphics libraries like Pygame. Key features of Arcade include: Shape drawing functions − draw_circle_filled(), draw_rectangle_filled(), draw_polygon_filled() Sprite support − Sprite and SpriteList classes for animations Physics engines − PhysicsEngine for ...
Read MoreDraw a Tic Tac Toe Board Using Python – Turtle
Python's Turtle library provides an excellent way to create graphics using a virtual turtle that moves around the screen. In this article, we'll learn how to draw a tic-tac-toe board using simple turtle commands. What is Tic Tac Toe Board? Tic-tac-toe is a classic game played on a 3×3 grid board with 9 squares. Players take turns placing X and O marks, trying to get three of their marks in a row horizontally, vertically, or diagonally. ...
Read MoreDraw a Sun Using Arcade Library Python
Python's Arcade library is a powerful graphics library built on Pyglet that enables creating 2D games and visual applications. In this article, we'll learn how to draw a sun using different methods with the Arcade library. Installing Arcade Library First, install the Arcade library using pip − pip install arcade Method 1: Simple Circle Sun This method creates a basic sun using a filled circle − import arcade # Window dimensions SCREEN_WIDTH = 500 SCREEN_HEIGHT = 500 def draw_sun(): # Draw a filled circle for ...
Read MoreRemove all duplicates and permutations in a nested list in Python
Removing duplicates and permutations from a nested list in Python is a common task that helps streamline data and avoid redundant or repetitive elements. In this article, we aim to extract a unique set of sublists from the nested list, eliminating any duplicates or permutations. By doing so, we will streamline further operations and ensure data integrity. We will explore three different approaches to achieve this objective with step-by-step explanations, Python code, and output. Approach 1: Flattening and Converting to Set This approach involves flattening the nested list into a single list and then converting it to a ...
Read MoreBar Charts Using Python Vincent
Bar charts are a popular visualization tool for displaying categorical information. They provide a clear and concise way to compare different categories or groups. Vincent is a Python library that offers an easy-to-use interface for creating interactive visualizations. It is built on top of the well-known plotting library, Matplotlib, and provides a more declarative syntax for creating visualizations. With Vincent, you can create bar charts, line plots, scatter plots, and more. In this article, we will explore how to create bar charts using the Python library Vincent. What is Python Vincent? Python Vincent is a Python library that ...
Read MoreBasic Gantt Chart Using Python Matplotlib
Project management requires careful planning, organization, and tracking of tasks and timelines. Gantt charts provide a visual representation of project schedules, task durations, and dependencies, enabling project managers to effectively plan, monitor, and communicate project progress. In this article, we'll create basic Gantt charts using Python's powerful Matplotlib library. By leveraging Matplotlib's plotting capabilities, we can create dynamic and informative Gantt charts for project visualization and decision-making. What is a Gantt Chart? A Gantt chart is a horizontal bar chart that displays project tasks along a timeline. Each task is represented as a horizontal bar, where the ...
Read MoreRandom Password Generator using Python Tkinter
The tkinter module in Python provides a simple and efficient way to create graphical user interfaces (GUI). Using tkinter, you can build a random password generator application with an interactive window. The interface typically includes a button to trigger password generation and a label to display the generated password. Within the password generation function, characters are randomly selected from a defined set of alphanumeric characters and special symbols. The generated password is then displayed in the label widget. Advantages of Using Tkinter for Password Generation User-friendly GUI − tkinter provides a straightforward way to design graphical interfaces, allowing ...
Read MoreReal time currency converter using Python Tkinter
In today's globalized world, currency conversion plays an essential role in various financial transactions and international exchanges. Whether you're planning a trip overseas, managing foreign investments, or running multinational business, having access to real-time currency conversion is crucial. In this article, we'll explore how to build a real-time currency converter using Python Tkinter, a popular GUI toolkit. By leveraging the power of Python and Tkinter, we can create an intuitive and user-friendly application that performs accurate currency conversions with an interactive interface for users to input amounts and select currencies. Currency Converter using Python Tkinter Real-time currency ...
Read More