title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Python – Shuffle dictionary Values
24 Jan, 2021 Given a dictionary, the task is to write a python program to shuffle its values to different keys. Examples: Input: test_dict = {“gfg” : 1, “is” : 7, “best” : 8, “for” : 3, “geeks” : 9} Output : {“gfg” : 9, “is” : 8, “best” : 7, “for” : 3, “geeks” : 1} Explanation : Keys are at same position but values are...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2021" }, { "code": null, "e": 127, "s": 28, "text": "Given a dictionary, the task is to write a python program to shuffle its values to different keys." }, { "code": null, "e": 137, "s": 127, "text": "Example...
Methods With Same Name in Golang
26 Aug, 2019 In Go language, it is allowed to create two or more methods with the same name in the same package, but the receiver of these methods must be of different types. This feature does not available in Go function, means you are not allowed to create same name methods in the same package, if you try to do, then...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Aug, 2019" }, { "code": null, "e": 394, "s": 52, "text": "In Go language, it is allowed to create two or more methods with the same name in the same package, but the receiver of these methods must be of different types. This feature...
Shortest Path in Directed Acyclic Graph
21 Jun, 2022 Given a Weighted Directed Acyclic Graph and a source vertex in the graph, find the shortest paths from given source to all other vertices. For a general weighted graph, we can calculate single source shortest distances in O(VE) time using Bellman–Ford Algorithm. For a graph with no negative weights, we can...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jun, 2022" }, { "code": null, "e": 193, "s": 54, "text": "Given a Weighted Directed Acyclic Graph and a source vertex in the graph, find the shortest paths from given source to all other vertices." }, { "code": null, "e"...
Selection Algorithms
18 Mar, 2020 Selection Algorithm is an algorithm for finding the kth smallest (or largest) number in a list or an array. That number is called the kth order statistic. It includes the various cases for finding the minimum, maximum and median elements in a list or an array. For finding the minimum (or maximum) element b...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 Mar, 2020" }, { "code": null, "e": 609, "s": 54, "text": "Selection Algorithm is an algorithm for finding the kth smallest (or largest) number in a list or an array. That number is called the kth order statistic. It includes the var...
Sorting boundary elements of a matrix
30 May, 2022 Given a matrix mat[][] of size M*N, the task is to sort only the border elements of the matrix in the clockwise direction and print the matrix after sorting again. Examples: Input: M = 4, N = 5, Below is the given matrix: 1 2 3 4 0 1 1 1 1 2 1 2 2 2 4 1 9 3 1 7 Output: 0 1 1 1 1 9 1 1 1 1 7 2 2 2 2 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 May, 2022" }, { "code": null, "e": 216, "s": 52, "text": "Given a matrix mat[][] of size M*N, the task is to sort only the border elements of the matrix in the clockwise direction and print the matrix after sorting again." }, { ...
Get Minutes from timestamp in Pandas-Python
17 Aug, 2020 Pandas is an open-source library built for Python language. It offers various data structures and operations for manipulating numerical data and time series. Here, let’s use some methods provided by pandas to extract the minute’s value from a timestamp. Method 1: Use of pandas.Timestamp.minute attribute. T...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Aug, 2020" }, { "code": null, "e": 186, "s": 28, "text": "Pandas is an open-source library built for Python language. It offers various data structures and operations for manipulating numerical data and time series." }, { "co...
ModelSerializer in serializers – Django REST Framework
20 Jul, 2020 ModelSerializer is a layer of abstraction over the default serializer that allows to quickly create a serializer for a model in Django. Django REST Framework is a wrapper over default Django Framework, basically used to create APIs of various kinds. There are three stages before creating a API through REST...
[ { "code": null, "e": 53, "s": 25, "text": "\n20 Jul, 2020" }, { "code": null, "e": 596, "s": 53, "text": "ModelSerializer is a layer of abstraction over the default serializer that allows to quickly create a serializer for a model in Django. Django REST Framework is a wrapper ove...
How to create text-fill animation using CSS ?
21 Jun, 2020 Text-fill animation on hover is a type of text-animation of modern web design concepts. In this animation, the text is filled with a color different from that of the original text-color in a particular direction i.e. left to right, right to left, top to bottom, or bottom to top.This type of animations is n...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2020" }, { "code": null, "e": 517, "s": 52, "text": "Text-fill animation on hover is a type of text-animation of modern web design concepts. In this animation, the text is filled with a color different from that of the original...
Physical and Logical Tags in HTML
25 Feb, 2021 Physical and Logical tags are used in HTML for better visibility and understanding of the text by the user on the web page. However, both tags differ from each other as suggested by their names. Logical Tags :Logical Tags are used in HTML to display the text according to the logical styles. Following are ...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Feb, 2021" }, { "code": null, "e": 223, "s": 28, "text": "Physical and Logical tags are used in HTML for better visibility and understanding of the text by the user on the web page. However, both tags differ from each other as sugges...
Subset with no pair sum divisible by K
08 Jul, 2022 Given an array of integer numbers, we need to find maximum size of a subset such that sum of each pair of this subset is not divisible by K. Examples : Input : arr[] = [3, 7, 2, 9, 1] K = 3 Output : 3 Maximum size subset whose each pair sum is not divisible by K is [3, 7, 1] because, 3...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jul, 2022" }, { "code": null, "e": 194, "s": 52, "text": "Given an array of integer numbers, we need to find maximum size of a subset such that sum of each pair of this subset is not divisible by K. " }, { "code": null, ...
unordered_set count() function in C++ STL
01 Jul, 2021 The unordered_set::count() function is a built-in function in C++ STL which is used to count occurrences of a particular element in an unordered_set container. As the unordered_set container does not allows to store duplicate elements so this function is generally used to check if an element is present in ...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Jul, 2021" }, { "code": null, "e": 480, "s": 52, "text": "The unordered_set::count() function is a built-in function in C++ STL which is used to count occurrences of a particular element in an unordered_set container. As the unorder...
Scala | Ranges
08 Apr, 2019 The Range in Scala can be defined as an organized series of uniformly separated Integers. It is helpful in supplying more strength with less methods so, operations performed here are very quick. Some important points: The Ranges can be utilized by the for loops for iteration. It can be obtained using some ...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Apr, 2019" }, { "code": null, "e": 272, "s": 54, "text": "The Range in Scala can be defined as an organized series of uniformly separated Integers. It is helpful in supplying more strength with less methods so, operations performed ...
Recursive Implementation of atoi()
28 Jun, 2022 The atoi() function takes a string (which represents an integer) as an argument and returns its value. We have discussed iterative implementation of atoi(). How to compute recursively? We strongly recommend you minimize your browser and try this yourself first The idea is to separate the last digit, recur...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2022" }, { "code": null, "e": 237, "s": 52, "text": "The atoi() function takes a string (which represents an integer) as an argument and returns its value. We have discussed iterative implementation of atoi(). How to compute re...
Java Program to Increment All Element of an Array by One
11 Nov, 2020 Given the array, the task is to increment each element of the array by 1. Complete traversal is required for incrementing all the elements of an array. An optimized way to complete a given task is having time complexity as O(N). Examples: Input : arr1[] = {50, 25, 32, 12, 6, 10, 100, 150} Output: arr1[] = ...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Nov, 2020" }, { "code": null, "e": 257, "s": 28, "text": "Given the array, the task is to increment each element of the array by 1. Complete traversal is required for incrementing all the elements of an array. An optimized way to com...
First negative integer in every window of size k
16 May, 2022 Given an array and a positive integer k, find the first negative integer for each window(contiguous subarray) of size k. If a window does not contain a negative integer, then print 0 for that window. Examples: Input : arr[] = {-8, 2, 3, -6, 10}, k = 2 Output : -8 0 -6 -6 First negative integer for each w...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 May, 2022" }, { "code": null, "e": 254, "s": 54, "text": "Given an array and a positive integer k, find the first negative integer for each window(contiguous subarray) of size k. If a window does not contain a negative integer, then...
Python – Test if a list is completely True
29 Dec, 2019 Sometimes, we need to check if a list is completely True, these occurrences come more often in testing purposes after the development phase. Hence, having a knowledge of all this is necessary and useful. Lets discuss certain ways in which this can be performed. Method #1 : Naive MethodIn the naive method, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2019" }, { "code": null, "e": 290, "s": 28, "text": "Sometimes, we need to check if a list is completely True, these occurrences come more often in testing purposes after the development phase. Hence, having a knowledge of all t...
Bitwise AND of all the elements of array - GeeksforGeeks
28 Apr, 2022 Given an array, arr[] of N integers, the task is to find out the bitwise AND(&) of all the elements of the array. Examples: Input: arr[] = {1, 3, 5, 9, 11} Output: 1 Input: arr[] = {3, 7, 11, 19, 11} Output: 3 Approach: The idea is to traverse all the array elements and compute the bitwise AND for all t...
[ { "code": null, "e": 25160, "s": 25132, "text": "\n28 Apr, 2022" }, { "code": null, "e": 25274, "s": 25160, "text": "Given an array, arr[] of N integers, the task is to find out the bitwise AND(&) of all the elements of the array." }, { "code": null, "e": 25285, "...
Changing Class Members in Python?
Python object oriented programming allows variables to be used at the class level or the instance level where variables are simply the symbols denoting value you’re using in the program. At the class level, variables are referred to as class variables whereas variables at the instance level are referred to as instance...
[ { "code": null, "e": 1250, "s": 1062, "text": "Python object oriented programming allows variables to be used at the class level or the instance level where variables are simply the symbols denoting value you’re using in the program. " }, { "code": null, "e": 1479, "s": 1250, "te...
Python 3 - Tkinter Menu
The goal of this widget is to allow us to create all kinds of menus that can be used by our applications. The core functionality provides ways to create three menu types: pop-up, toplevel and pull-down. It is also possible to use other extended widgets to implement new types of menus, such as the OptionMenu widget, wh...
[ { "code": null, "e": 2543, "s": 2340, "text": "The goal of this widget is to allow us to create all kinds of menus that can be used by our applications. The core functionality provides ways to create three menu types: pop-up, toplevel and pull-down." }, { "code": null, "e": 2748, "s"...
Creating a Serverless Python Chatbot API in Microsoft Azure from Scratch in 9 Easy Steps | by Christiano Christakou | Towards Data Science
Chatbots and serverless are two tech trends that have completely dominated the corporate world in 2020: Why not kill two birds with one stone and learn how to build your own serverless chatbot? By the end of this article you will know how to: Deploy a serverless application in Azure and,Build a chatbot that can be embe...
[ { "code": null, "e": 366, "s": 172, "text": "Chatbots and serverless are two tech trends that have completely dominated the corporate world in 2020: Why not kill two birds with one stone and learn how to build your own serverless chatbot?" }, { "code": null, "e": 415, "s": 366, "...
MySQL query to update all records to capitalize only the first letter and set all others in lowercase
Let us first create a table − mysql> create table DemoTable2017 -> ( -> Name text -> ); Query OK, 0 rows affected (0.55 sec) Insert some records in the table using insert command − mysql> insert into DemoTable2017 values('JOHN SMITH,MYSQL'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable2017...
[ { "code": null, "e": 1092, "s": 1062, "text": "Let us first create a table −" }, { "code": null, "e": 1196, "s": 1092, "text": "mysql> create table DemoTable2017\n -> (\n -> Name text\n -> );\nQuery OK, 0 rows affected (0.55 sec)" }, { "code": null, "e": 1252, ...
Primality Test in C++
In this problem, we are given a number N and our task is to check whether it is a prime number or not. Primality test s the algorithm that is used to check whether the given number is prime or not. Prime number is a number which can be divided by itself only. Example : 2, 3, 5, 7. Let’s take an example to understand ou...
[ { "code": null, "e": 1165, "s": 1062, "text": "In this problem, we are given a number N and our task is to check whether it is a prime number or not." }, { "code": null, "e": 1260, "s": 1165, "text": "Primality test s the algorithm that is used to check whether the given number i...
Train a Neural Network on multi-GPU with TensorFlow | by Jordi TORRES.AI | Towards Data Science
[This post will be used in the master course Supercomputers Architecture at UPC Barcelona Tech with the support of the BSC] In the previous post we introduced the basic concepts in distributed and parallel training Deep Learning. We also presented the frameworks and infrastructure that we will use to scale the learning...
[ { "code": null, "e": 296, "s": 172, "text": "[This post will be used in the master course Supercomputers Architecture at UPC Barcelona Tech with the support of the BSC]" }, { "code": null, "e": 575, "s": 296, "text": "In the previous post we introduced the basic concepts in distr...
Beginner’s guide to building Convolutional Neural Networks using TensorFlow’s Keras API in Python | by Dr. Varshita Sher | Towards Data Science
Welcome to Part 2 of the Neural Network series! In Part 1, we worked our way through an Artificial Neural Network (ANNs) using the Keras API. We talked about Sequential network architecture, activation functions, hidden layers, neurons, etc. and finally wrapped it all up in an end-to-end example that predicted whether ...
[ { "code": null, "e": 539, "s": 171, "text": "Welcome to Part 2 of the Neural Network series! In Part 1, we worked our way through an Artificial Neural Network (ANNs) using the Keras API. We talked about Sequential network architecture, activation functions, hidden layers, neurons, etc. and finally w...
How to Use the IN Operator with a SubQuery in SQL? - GeeksforGeeks
19 Oct, 2021 In this article, we will see the use of IN Operator with a SubQuery in SQL. IN operator is used to compare the column values with the list of values. The list of values is defined after IN query in SQL. If we don’t know the exact list of values to be compared, we can generate the list of values using the ...
[ { "code": null, "e": 23877, "s": 23849, "text": "\n19 Oct, 2021" }, { "code": null, "e": 24081, "s": 23877, "text": "In this article, we will see the use of IN Operator with a SubQuery in SQL. IN operator is used to compare the column values with the list of values. The list of v...
Loading and Saving Images in Python | by Renu Khandelwal | Towards Data Science
Install PIL, OpenCV, and matplotlib libraries. Show() loads the image in a new window from PIL import Imageimg_PIL = Image.open(r'\dogs-v-cats\dog.1.jpg')img_PIL.show() display() loads the image inline from IPython.display import displayfrom PIL import Imageimg_PIL = Image.open(r'\dogs-v-cats\dog.1.jpg')display(img_PIL...
[ { "code": null, "e": 219, "s": 172, "text": "Install PIL, OpenCV, and matplotlib libraries." }, { "code": null, "e": 258, "s": 219, "text": "Show() loads the image in a new window" }, { "code": null, "e": 341, "s": 258, "text": "from PIL import Imageimg_PIL = ...
Docker - Setting MongoDB
MongoDB is a famous document-oriented database that is used by many modern-day web applications. Since MongoDB is a popular database for development, Docker has also ensured it has support for MongoDB. We will now see the various steps for getting the Docker container for MongoDB up and running. Step 1 − The first step...
[ { "code": null, "e": 2542, "s": 2340, "text": "MongoDB is a famous document-oriented database that is used by many modern-day web applications. Since MongoDB is a popular database for development, Docker has also ensured it has support for MongoDB." }, { "code": null, "e": 2637, "s":...
How to clear items from a ttk.Treeview widget?
Generally, Tkinter treeview widget is used to draft or construct tables for the given data points in the input. We can even add items in the treeview widget to maintain a nested list in an application. If we want to remove or clear all the items in a given treeview widget, then we have to first select all the items pre...
[ { "code": null, "e": 1439, "s": 1062, "text": "Generally, Tkinter treeview widget is used to draft or construct tables for the given data points in the input. We can even add items in the treeview widget to maintain a nested list in an application. If we want to remove or clear all the items in a gi...
Access and use GPT-J (GPT J ) | Towards Data Science
GPT-J explained and 3 easy ways how you can access it GPT-J is a 6 billion parameter model released by a group called Eleuther AI. The goal of the group is to democratize huge language models, so they relased GPT-J and it is currently publicly available. GPT3 on the other hand, which was released by openAI has 175 bill...
[ { "code": null, "e": 226, "s": 172, "text": "GPT-J explained and 3 easy ways how you can access it" }, { "code": null, "e": 675, "s": 226, "text": "GPT-J is a 6 billion parameter model released by a group called Eleuther AI. The goal of the group is to democratize huge language m...
Program to Input Weekday Number and Print the Weekday in C# - GeeksforGeeks
22 Jun, 2020 C# Program to print weekday name from a given weekday number (0-6). A switch statement allows checking a value with a list of values or cases. Weekday number is the number whose value from 0 to 6. 0 is for “Sunday”, 1 is for “Monday”, 2 is for “Tuesday”, 3 is for “Wednesday”, 4 is for “Thursday”, 5 is for ...
[ { "code": null, "e": 23911, "s": 23883, "text": "\n22 Jun, 2020" }, { "code": null, "e": 24054, "s": 23911, "text": "C# Program to print weekday name from a given weekday number (0-6). A switch statement allows checking a value with a list of values or cases." }, { "code"...
How to calculate a directory size using Python?
To get the size of a directory, you'll have to walk the whole directory tree and add size of each file. To do this you can use the os.walk() and os.path.getsize() functions. import os total_size = 0 start_path = '.' # To get size of current directory for path, dirs, files in os.walk(start_path): for f in files: ...
[ { "code": null, "e": 1236, "s": 1062, "text": "To get the size of a directory, you'll have to walk the whole directory tree and add size of each file. To do this you can use the os.walk() and os.path.getsize() functions." }, { "code": null, "e": 1501, "s": 1236, "text": "import o...
Fuzzy matching people names. I’ve recently had to solve an... | by Vadim Markovtsev | Towards Data Science
I’ve recently had to solve an interesting problem: given two unordered lists with real people names, match identities in between. Looks easy, right? Sort both lists, and you are done. Alas, my problem is about two independent lists of people names taken from separate and independent information sources — GitHub and JIR...
[ { "code": null, "e": 302, "s": 172, "text": "I’ve recently had to solve an interesting problem: given two unordered lists with real people names, match identities in between." }, { "code": null, "e": 600, "s": 302, "text": "Looks easy, right? Sort both lists, and you are done. Al...
AWK - Environment
This chapter describes how to set up the AWK environment on your GNU/Linux system. Generally, AWK is available by default on most GNU/Linux distributions. You can use which command to check whether it is present on your system or not. In case you don’t have AWK, then install it on Debian based GNU/Linux using Advance P...
[ { "code": null, "e": 1940, "s": 1857, "text": "This chapter describes how to set up the AWK environment on your GNU/Linux system." }, { "code": null, "e": 2224, "s": 1940, "text": "Generally, AWK is available by default on most GNU/Linux distributions. You can use which command t...
Full Stack Development Tutorial: Integrate AWS Lambda Serverless Service into Angular SPA | by J Li | Towards Data Science
(this post is also available in my blog) This post is the last post of my Full Stack Development Tutorial Series. In this post, we will integrate the backend Lambda REST API into Angular App we previously developed. Previous posts are Visualize Trading Data on Angular SPA and Serving Trading Data with Serverless REST A...
[ { "code": null, "e": 212, "s": 171, "text": "(this post is also available in my blog)" }, { "code": null, "e": 517, "s": 212, "text": "This post is the last post of my Full Stack Development Tutorial Series. In this post, we will integrate the backend Lambda REST API into Angular...
How to Include Factors in Regression using R Programming? - GeeksforGeeks
10 Nov, 2020 Categorical variables (also known as a factor or qualitative variables) are variables that classify observational values into groups. They are either string or numeric are called factor variables in statistical modeling. Saving normal string variables as factors save a lot of memory. Factors can also be st...
[ { "code": null, "e": 25162, "s": 25134, "text": "\n10 Nov, 2020" }, { "code": null, "e": 25907, "s": 25162, "text": "Categorical variables (also known as a factor or qualitative variables) are variables that classify observational values into groups. They are either string or num...
Web Applications with Django. Working with Templates in Django | by Sadrach Pierre, Ph.D. | Towards Data Science
Django is a powerful python-based web framework that enables the development of database-driven web applications. Today, many technologies use the Django framework including Instagram, Spotify and Youtube. In this post, we will discuss how to build a simple video game reviews application in Django using html and css te...
[ { "code": null, "e": 501, "s": 172, "text": "Django is a powerful python-based web framework that enables the development of database-driven web applications. Today, many technologies use the Django framework including Instagram, Spotify and Youtube. In this post, we will discuss how to build a simp...
How to select only numeric strings in MongoDB?
Let us create a collection with documents − > db.selectOnlyNumericDemo.insertOne({"UserId":"User101"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbdb711de8cc557214c0e16") } > db.selectOnlyNumericDemo.insertOne({"UserId":"102"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbdb716de8cc557214...
[ { "code": null, "e": 1106, "s": 1062, "text": "Let us create a collection with documents −" }, { "code": null, "e": 1678, "s": 1106, "text": "> db.selectOnlyNumericDemo.insertOne({\"UserId\":\"User101\"});\n{\n \"acknowledged\" : true,\n \"insertedId\" : ObjectId(\"5cbdb711de...
Rexx - Databases
Rexx has the ability to work with a variety of databases which are listed below. HSQLDB Oracle SQL Server MySQL MongoDB All the information for Rexx databases can be found once you click on the following link − https://rexxsql.sourceforge.net/ In our example, we are going to use MySQL DB as a sample. So the first step ...
[ { "code": null, "e": 2420, "s": 2339, "text": "Rexx has the ability to work with a variety of databases which are listed below." }, { "code": null, "e": 2427, "s": 2420, "text": "HSQLDB" }, { "code": null, "e": 2434, "s": 2427, "text": "Oracle" }, { "c...
Regular Expression "$" (dollar) Metacharacter in Java
The subexpression/metacharacter “$” matches the end of a line. import java.util.regex.Matcher; import java.util.regex.Pattern; public class EndWith { public static void main( String args[] ) { String regex = "Tutorialspoint$"; String input = "Hi how are you welcome to Tutorialspoint"; Pattern p = P...
[ { "code": null, "e": 1125, "s": 1062, "text": "The subexpression/metacharacter “$” matches the end of a line." }, { "code": null, "e": 1577, "s": 1125, "text": "import java.util.regex.Matcher;\nimport java.util.regex.Pattern;\npublic class EndWith {\n public static void main( S...
Python | Merging two Dictionaries - GeeksforGeeks
16 Nov, 2020 There are various ways in which Dictionaries can be merged by the use of various functions and constructors in Python. In this article, we will discuss a few ways of merging dictionaries. By using the method update() in Python, one list can be merged into another. But in this, the second list is merged in...
[ { "code": null, "e": 24875, "s": 24847, "text": "\n16 Nov, 2020" }, { "code": null, "e": 25064, "s": 24875, "text": "There are various ways in which Dictionaries can be merged by the use of various functions and constructors in Python. In this article, we will discuss a few ways ...
Redis - Configuration
In Redis, there is a configuration file (redis.conf) available at the root directory of Redis. Although you can get and set all Redis configurations by Redis CONFIG command. Following is the basic syntax of Redis CONFIG command. redis 127.0.0.1:6379> CONFIG GET CONFIG_SETTING_NAME redis 127.0.0.1:6379> CONFIG GET logl...
[ { "code": null, "e": 2219, "s": 2045, "text": "In Redis, there is a configuration file (redis.conf) available at the root directory of Redis. Although you can get and set all Redis configurations by Redis CONFIG command." }, { "code": null, "e": 2274, "s": 2219, "text": "Followin...
React Native Flexbox justifyContent Property
12 May, 2021 In this article, We are going to see the justifyContent Property of flexbox in React Native. Flexbox has three main properties. One of them is justifyContent. justifyContent property is used to determine how should children’s components be aligned within the primary axis of their container. It can align ch...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 May, 2021" }, { "code": null, "e": 511, "s": 28, "text": "In this article, We are going to see the justifyContent Property of flexbox in React Native. Flexbox has three main properties. One of them is justifyContent. justifyContent p...
How to solve a Dynamic Programming Problem ?
28 Jun, 2022 Dynamic Programming (DP) is a technique that solves some particular type of problems in Polynomial Time. Dynamic Programming solutions are faster than the exponential brute method and can be easily proved for their correctness. Before we study how to think Dynamically for a problem, we need to learn: Over...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2022" }, { "code": null, "e": 357, "s": 54, "text": "Dynamic Programming (DP) is a technique that solves some particular type of problems in Polynomial Time. Dynamic Programming solutions are faster than the exponential brute m...
Installation and Configuration of Yum in Red Hat Linux 8
15 Jun, 2020 Yellowdog Updater Modifier sums as YUM and this is a PMT (Package Management Tool) for the RedHat Package Manager. YUM has been used for quite a long time. But, now in RHEL 8, we have a modest version of “yum” called “dnf” stands for Dandified YUM. Although both the commands work fine in Redhat 8 Linux but...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jun, 2020" }, { "code": null, "e": 395, "s": 28, "text": "Yellowdog Updater Modifier sums as YUM and this is a PMT (Package Management Tool) for the RedHat Package Manager. YUM has been used for quite a long time. But, now in RHEL 8,...
Calculation in parent and child process using fork()
13 Sep, 2021 Write a program to find sum of even numbers in parent process and sum of odd numbers in child process. Examples: Input : 1, 2, 3, 4, 5 Output : Parent process Sum of even no. is 6 Child process Sum of odd no. is 9 Explanation: Here, we had used fork() function to create two processes one child and on...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Sep, 2021" }, { "code": null, "e": 157, "s": 54, "text": "Write a program to find sum of even numbers in parent process and sum of odd numbers in child process." }, { "code": null, "e": 168, "s": 157, "text": "Ex...
Polygraph to check View Serializability in DBMS
10 Jun, 2022 Prerequisite – Concurrency Control -Introduction, Conflict Serializability, Transaction Isolation Levels in DBMS Serializability: If any transaction (non-serial) produce a outcome which is equal to the outcome of that schedule’s transaction executed serially then we can call that transaction schedule a Ser...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jun, 2022" }, { "code": null, "e": 380, "s": 52, "text": "Prerequisite – Concurrency Control -Introduction, Conflict Serializability, Transaction Isolation Levels in DBMS Serializability: If any transaction (non-serial) produce a ou...
Compile Time Polymorphism in Java
17 Nov, 2021 Polymorphism in Java refers to an object’s capacity to take several forms. Polymorphism allows us to perform the same action in multiple ways in Java. Polymorphism is divided into two types: Compile-time polymorphismRun time polymorphism Compile-time polymorphism Run time polymorphism Note: Run time polymo...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Nov, 2021" }, { "code": null, "e": 179, "s": 28, "text": "Polymorphism in Java refers to an object’s capacity to take several forms. Polymorphism allows us to perform the same action in multiple ways in Java." }, { "code": nu...
Convert Character Array to String in Java
01 May, 2022 Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character “\0”. A character array can be converted to a string and vice versa. In the previous article, we have already discussed how to convert a string to a char...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 May, 2022" }, { "code": null, "e": 428, "s": 28, "text": "Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character “\\0”. A character ar...
Placement new operator in C++
29 Nov, 2021 Placement new is a variation new operator in C++. Normal new operator does two things : (1) Allocates memory (2) Constructs an object in allocated memory. Placement new allows us to separate above two things. In placement new, we can pass a preallocated memory and construct an object in the passed memory. ...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Nov, 2021" }, { "code": null, "e": 361, "s": 52, "text": "Placement new is a variation new operator in C++. Normal new operator does two things : (1) Allocates memory (2) Constructs an object in allocated memory. Placement new allow...
$this keyword in PHP
09 Jul, 2020 $this is a reserved keyword in PHP that refers to the calling object. It is usually the object to which the method belongs, but possibly another object if the method is called statically from the context of a secondary object. This keyword is only applicable to internal methods. Example 1: A simple program...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Jul, 2020" }, { "code": null, "e": 308, "s": 28, "text": "$this is a reserved keyword in PHP that refers to the calling object. It is usually the object to which the method belongs, but possibly another object if the method is called...
coproc Command in Linux with Examples
27 Oct, 2020 coproc command in Linux is a shell command which allows us to create a co-process that is connected to the invoking shell via two pipes. One of the pipes enables us to send the input while the other enables us to read the output without having to resort to named pipes. The co-process is executed asynchrono...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 Oct, 2020" }, { "code": null, "e": 430, "s": 53, "text": "coproc command in Linux is a shell command which allows us to create a co-process that is connected to the invoking shell via two pipes. One of the pipes enables us to send t...
Python – Concatenate consecutive elements in Tuple
29 Dec, 2019 Sometimes, while working with data, we can have a problem in which we need to find cumulative result. This can be of any type, product or summation. Here we are gonna discuss about adjacent element concatenation. Let’s discuss certain ways in which this task can be performed. Method #1 : Using zip() + gene...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2019" }, { "code": null, "e": 305, "s": 28, "text": "Sometimes, while working with data, we can have a problem in which we need to find cumulative result. This can be of any type, product or summation. Here we are gonna discuss ...
Inverse Permutation
20 May, 2022 Given an array of size n of integers in range from 1 to n, we need to find the inverse permutation of that array.An inverse permutation is a permutation which you will get by inserting position of an element at the position specified by the element value in the array. For better understanding, consider the...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 May, 2022" }, { "code": null, "e": 741, "s": 52, "text": "Given an array of size n of integers in range from 1 to n, we need to find the inverse permutation of that array.An inverse permutation is a permutation which you will get by...
Strings in Golang
09 Aug, 2019 In Go language, strings are different from other languages like Java, C++, Python, etc. it is a sequence of variable-width characters where each and every character is represented by one or more bytes using UTF-8 Encoding. Or in other words, strings are the immutable chain of arbitrary bytes(including byte...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Aug, 2019" }, { "code": null, "e": 730, "s": 28, "text": "In Go language, strings are different from other languages like Java, C++, Python, etc. it is a sequence of variable-width characters where each and every character is represe...
Pandas Memory Management
22 Nov, 2021 In this article, we will learn about Memory management in pandas. When we work with pandas there is no doubt that you will always store the big data for better analysis. While dealing with the larger data, we should be more concerned about the memory that we use. There is no problem when you work with smal...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Nov, 2021" }, { "code": null, "e": 94, "s": 28, "text": "In this article, we will learn about Memory management in pandas." }, { "code": null, "e": 451, "s": 94, "text": "When we work with pandas there is no doubt...
JavaScript Logical OR assignment (||=) Operator
25 Feb, 2021 This operator is represented by x ||= y and it is called logical OR assignment operator. If the value of x is falsy then the value of y will be assigned to x. When we divide it into two parts it becomes x || ( x = y ). It checks if x is true or false, if the value of x is falsy then it runs the ( x = y ) ...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Feb, 2021" }, { "code": null, "e": 188, "s": 28, "text": "This operator is represented by x ||= y and it is called logical OR assignment operator. If the value of x is falsy then the value of y will be assigned to x." }, { "...
Format Number as Percentage in R
23 May, 2021 In this article, we are going to see how to format numbers as percentages in R programming language. Method 1: Using formattable package The “formattable” package provides methods to create formattable vectors and data frame objects. This package in R can be installed and loaded into the working space usin...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2021" }, { "code": null, "e": 129, "s": 28, "text": "In this article, we are going to see how to format numbers as percentages in R programming language." }, { "code": null, "e": 165, "s": 129, "text": "Metho...
BinaryOperator Interface in Java
30 Sep, 2021 The BinaryOperator Interface<T> is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a binary operator which takes two operands and operates on them to produce a result. However, what distinguishes it from a normal Bi...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Sep, 2021" }, { "code": null, "e": 404, "s": 28, "text": "The BinaryOperator Interface<T> is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents ...
GATE | GATE CS 2020 | Question 33
11 Aug, 2021 Consider a double hashing scheme in which the primary hash function is h1(k) = k mod 23, and the secondary hash function is h2(k) = 1+(k mod 19). Assume that the table size is 23. Then the address returned by probe 1 in the probe sequence (assume that the probe sequence begins at probe 0) for key value k =...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Aug, 2021" }, { "code": null, "e": 377, "s": 52, "text": "Consider a double hashing scheme in which the primary hash function is h1(k) = k mod 23, and the secondary hash function is h2(k) = 1+(k mod 19). Assume that the table size i...
How to add space between elements ?
13 Dec, 2021 In this article, we will know how to add space between elements in the HTML table, along with understanding its implementation through the examples. We can use normal CSS to make changes in the table, where we will be using border property to give spacing between different tbody elements. No prior and deep...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Dec, 2021" }, { "code": null, "e": 318, "s": 28, "text": "In this article, we will know how to add space between elements in the HTML table, along with understanding its implementation through the examples. We can use normal CSS to m...
Noise addition using in-built Matlab function
17 Aug, 2020 Noise in an image: Digital images are prone to various types of noise that makes the quality of the images worst. Image noise is random variation of brightness or color information in the captured image. Noise is basically the degradation in image signal caused by external sources such as camera. Images co...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Aug, 2020" }, { "code": null, "e": 593, "s": 53, "text": "Noise in an image: Digital images are prone to various types of noise that makes the quality of the images worst. Image noise is random variation of brightness or color infor...
Java IO Tutorial
19 Feb, 2022 Java programming language comes with a variety of APIs that helps the developers to code more efficiently. One of those APIs is Java IO API. Java IO API helps the users to read and write data. In simple words, we can say that the Java IO helps the users to take the input and produce output based on that in...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Feb, 2022" }, { "code": null, "e": 472, "s": 28, "text": "Java programming language comes with a variety of APIs that helps the developers to code more efficiently. One of those APIs is Java IO API. Java IO API helps the users to rea...
Matplotlib.pyplot.matshow() in Python
03 Sep, 2021 Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. It was introduced by John Hunter in the year 2002. matplotlib.pyplot.matshow() function is used...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Sep, 2021" }, { "code": null, "e": 291, "s": 28, "text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t...
Find a common element in all rows of a given row-wise sorted matrix
16 Jun, 2022 Given a matrix where every row is sorted in increasing order. Write a function that finds and returns a common element in all rows. If there is no common element, then returns -1. Example: Input: mat[4][5] = { {1, 2, 3, 4, 5}, {2, 4, 5, 8, 10}, {3, 5, 7, 9, 11}, ...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jun, 2022" }, { "code": null, "e": 245, "s": 54, "text": "Given a matrix where every row is sorted in increasing order. Write a function that finds and returns a common element in all rows. If there is no common element, then return...
GATE | GATE-IT-2004 | Question 80 - GeeksforGeeks
28 Jun, 2021 In a data link protocol, the frame delimiter flag is given by 0111. Assuming that bit stuffing is employed, the transmitter sends the data sequence 01110110 as (A) 01101011(B) 011010110(C) 011101100(D) 0110101100Answer: (D)Explanation: In the above question, if, in the data link layer bits stuffing is emp...
[ { "code": null, "e": 25697, "s": 25669, "text": "\n28 Jun, 2021" }, { "code": null, "e": 25857, "s": 25697, "text": "In a data link protocol, the frame delimiter flag is given by 0111. Assuming that bit stuffing is employed, the transmitter sends the data sequence 01110110 as" ...
BigDecimal pow() method in Java with Examples - GeeksforGeeks
12 Apr, 2019 The java.math.BigDecimal.pow(int n) method is used to calculate a BigDecimal raise to the power of some other positive number passed as parameter (this)n. This method performs raises this BigDecimal number to the power of the positive number passed as the parameter. Syntax: public BigDecimal pow(int n) Pa...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n12 Apr, 2019" }, { "code": null, "e": 25492, "s": 25225, "text": "The java.math.BigDecimal.pow(int n) method is used to calculate a BigDecimal raise to the power of some other positive number passed as parameter (this)n. This met...
C program to sort an array in ascending order - GeeksforGeeks
31 May, 2021 Given an array arr[] of size N, the task is to sort this array in ascending order in C.Examples: Input: arr[] = {0, 23, 14, 12, 9} Output: {0, 9, 12, 14, 23} Input: arr[] = {7, 0, 2} Output: {0, 2, 7} Approach: There are many ways by which the array can be sorted in ascending order, like: Selection Sor...
[ { "code": null, "e": 25517, "s": 25489, "text": "\n31 May, 2021" }, { "code": null, "e": 25615, "s": 25517, "text": "Given an array arr[] of size N, the task is to sort this array in ascending order in C.Examples: " }, { "code": null, "e": 25720, "s": 25615, "...
Generate a matrix with each row and column of given sum - GeeksforGeeks
28 Feb, 2022 Given two arrays row[] and col[] of size N and M respectively, the task is to construct a matrix of dimensions N × M such that the sum of matrix elements in every ith row is row[i] and the sum of matrix elements in every jth column is col[j]. Examples: Input: row[] = {5, 7, 10}, col[] = {8, 6, 8}Output: {{...
[ { "code": null, "e": 26537, "s": 26509, "text": "\n28 Feb, 2022" }, { "code": null, "e": 26780, "s": 26537, "text": "Given two arrays row[] and col[] of size N and M respectively, the task is to construct a matrix of dimensions N × M such that the sum of matrix elements in every ...
Python | Convert None to empty string - GeeksforGeeks
25 Jun, 2019 Sometimes, while working with Machine Learning, we can encounter None values and we wish to convert to the empty string for data consistency. This and many other utilities can require the solution to this problem. Let’s discuss certain ways in which this problem can be solved. Method #1 : Using lambdaThis ...
[ { "code": null, "e": 25375, "s": 25347, "text": "\n25 Jun, 2019" }, { "code": null, "e": 25653, "s": 25375, "text": "Sometimes, while working with Machine Learning, we can encounter None values and we wish to convert to the empty string for data consistency. This and many other u...
Percentage increase in the volume of cuboid if length, breadth and height are increased by fixed percentages - GeeksforGeeks
25 Mar, 2022 Given a cuboid and three integers L, B, and H. If the length of the cuboid is increased by L%, breadth is increased by B% percent, and height is increased by H% percent. The task is to find the percentage increase in the volume of the cuboid.Examples: Input: L = 50, B = 20, H = 10 Output: 98%Input: L = 1...
[ { "code": null, "e": 25917, "s": 25889, "text": "\n25 Mar, 2022" }, { "code": null, "e": 26171, "s": 25917, "text": "Given a cuboid and three integers L, B, and H. If the length of the cuboid is increased by L%, breadth is increased by B% percent, and height is increased by H% pe...
Insert minimum number in array so that sum of array becomes prime - GeeksforGeeks
29 Aug, 2021 Given an array of n integers. Find minimum number to be inserted in array, so that sum of all elements of array becomes prime. If sum is already prime, then return 0.Examples : Input : arr[] = { 2, 4, 6, 8, 12 } Output : 5 Input : arr[] = { 3, 5, 7 } Output : 0 Naive approach: The simplest approach to...
[ { "code": null, "e": 26067, "s": 26039, "text": "\n29 Aug, 2021" }, { "code": null, "e": 26246, "s": 26067, "text": "Given an array of n integers. Find minimum number to be inserted in array, so that sum of all elements of array becomes prime. If sum is already prime, then return...
Java BitSet | cardinality() - GeeksforGeeks
31 Jul, 2021 BitSet is a class defined in the java.util package. It creates an array of bits represented by 0s and 1s. Syntax public int cardinality() Explanation: The method returns the number of 1s in this BitSet. Examples: Input : set1 : {1, 2, 4} set2 : {} Output : 3 0 Java // Java program illustrating Bitse...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n31 Jul, 2021" }, { "code": null, "e": 25331, "s": 25225, "text": "BitSet is a class defined in the java.util package. It creates an array of bits represented by 0s and 1s." }, { "code": null, "e": 25339, "s": 2533...
How to create a 3D groove border using CSS? - GeeksforGeeks
07 Apr, 2021 In CSS border-style property is used to set the line style of the border of an element. The border-style property may have one, two, three, or four values. When the specified value is one, the same style is applied to all four sides. When the specified value is two, the first style is applied to the top a...
[ { "code": null, "e": 26621, "s": 26593, "text": "\n07 Apr, 2021" }, { "code": null, "e": 26710, "s": 26621, "text": "In CSS border-style property is used to set the line style of the border of an element. " }, { "code": null, "e": 27364, "s": 26710, "text": "T...
C# | SortedSet Class - GeeksforGeeks
24 Jan, 2019 SortedSet class represents the collection of objects in sorted order. This class comes under the System.Collections.Generic namespace. Characteristics: In C#, SortedSet class can be used to store, remove or view elements. It maintains ascending order and does not store duplicate elements. It is suggested t...
[ { "code": null, "e": 25863, "s": 25835, "text": "\n24 Jan, 2019" }, { "code": null, "e": 25998, "s": 25863, "text": "SortedSet class represents the collection of objects in sorted order. This class comes under the System.Collections.Generic namespace." }, { "code": null, ...
How to iterate through a nested List in Python? - GeeksforGeeks
08 Dec, 2020 In this article, we are going to see how to iterate through a nested List. A list can be used to store multiple Data types such as Integers, Strings, Objects, and also another List within itself. This sub-list which is within the list is what is commonly known as the Nested List. Lets us see how a typical ...
[ { "code": null, "e": 25581, "s": 25553, "text": "\n08 Dec, 2020" }, { "code": null, "e": 25862, "s": 25581, "text": "In this article, we are going to see how to iterate through a nested List. A list can be used to store multiple Data types such as Integers, Strings, Objects, and ...
Initialization of a multidimensional arrays in C/C++ - GeeksforGeeks
08 Oct, 2020 In C/C++, initialization of a multidimensional arrays can have left most dimension as optional. Except the left most dimension, all other dimensions must be specified. For example, following program fails in compilation because two dimensions are not specified. C C++ #include<stdio.h>int main(){ int a[]...
[ { "code": null, "e": 25899, "s": 25871, "text": "\n08 Oct, 2020" }, { "code": null, "e": 26163, "s": 25899, "text": "In C/C++, initialization of a multidimensional arrays can have left most dimension as optional. Except the left most dimension, all other dimensions must be specif...
Travelling Salesman Problem | Greedy Approach - GeeksforGeeks
05 Jan, 2022 Given a 2D matrix tsp[][], where each row has the array of distances from that indexed city to all the other cities and -1 denotes that there doesn’t exist a path between those two indexed cities. The task is to print minimum cost in TSP cycle.Examples: Input: tsp[][] = {{-1, 10, 15, 20}, {10, -1, 35, 25}...
[ { "code": null, "e": 26323, "s": 26295, "text": "\n05 Jan, 2022" }, { "code": null, "e": 26578, "s": 26323, "text": "Given a 2D matrix tsp[][], where each row has the array of distances from that indexed city to all the other cities and -1 denotes that there doesn’t exist a path ...
TreeSet add() Method in Java - GeeksforGeeks
26 Nov, 2018 The Java.util.TreeSet.add() method in Java TreeSet is used to add a specific element into a TreeSet. The function adds the element only if the specified element is not already present in the set else the function return False if the element is not present in the TreeSet. Syntax: Tree_Set.add(Object element...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n26 Nov, 2018" }, { "code": null, "e": 25497, "s": 25225, "text": "The Java.util.TreeSet.add() method in Java TreeSet is used to add a specific element into a TreeSet. The function adds the element only if the specified element is...
Python | Standard deviation of list - GeeksforGeeks
03 Oct, 2019 Sometimes, while working with Mathematics, we can have a problem in which we intend to compute the standard deviation of a sample. This has many applications in competitive programming as well as school level projects. Let’s discuss certain ways in which this task can be performed. Method #1 : Using sum() ...
[ { "code": null, "e": 25507, "s": 25479, "text": "\n03 Oct, 2019" }, { "code": null, "e": 25790, "s": 25507, "text": "Sometimes, while working with Mathematics, we can have a problem in which we intend to compute the standard deviation of a sample. This has many applications in co...
Alternatives of push() method in JavaScript - GeeksforGeeks
02 Jun, 2020 The task is to perform push operation without using the push() method with the help of JavaScript. There are two approaches that are discussed below. Approach 1: Use the length property to insert the element at the end of the array. Example: This example implements the above approach.<!DOCTYPE html><html> ...
[ { "code": null, "e": 24598, "s": 24570, "text": "\n02 Jun, 2020" }, { "code": null, "e": 24748, "s": 24598, "text": "The task is to perform push operation without using the push() method with the help of JavaScript. There are two approaches that are discussed below." }, { ...
Valuable Data Analysis with Pandas Value Counts | by Rebecca Vickery | Towards Data Science
The value_counts() function in the popular python data science library Pandas is a quick way to count the unique values in a single column otherwise known as a series of data. This function is extremely useful for very quickly performing some basic data analysis on specific columns of data contained in a Pandas DataFra...
[ { "code": null, "e": 347, "s": 171, "text": "The value_counts() function in the popular python data science library Pandas is a quick way to count the unique values in a single column otherwise known as a series of data." }, { "code": null, "e": 588, "s": 347, "text": "This funct...
Power BI and Synapse, Part 2: What Synapse brings to a table? | by Nikola Ilic | Towards Data Science
By introducing Azure Synapse Analytics in late 2019, a whole new perspective was created when it comes to data treatment. Some core concepts, such as traditional data warehousing, came under more scrutiny, while various fresh approaches started to pop up after data nerds became aware of the new capabilities that Synaps...
[ { "code": null, "e": 516, "s": 172, "text": "By introducing Azure Synapse Analytics in late 2019, a whole new perspective was created when it comes to data treatment. Some core concepts, such as traditional data warehousing, came under more scrutiny, while various fresh approaches started to pop up ...
Can we declare an abstract method final or static in java?
A method which does not have body is known as abstract method. It contains only method signature with a semi colon and, an abstract keyword before it. public abstract myMethod(); To use an abstract method, you need to inherit it by extending its class and provide implementation to it. If you declare a method in a class...
[ { "code": null, "e": 1213, "s": 1062, "text": "A method which does not have body is known as abstract method. It contains only method signature with a semi colon and, an abstract keyword before it." }, { "code": null, "e": 1241, "s": 1213, "text": "public abstract myMethod();" ...
Pandas Melt(), Stack() and wide_to_long() For Converting Columns into Rows | Towards Data Science
Reshaping a dataframe usually involves converting columns into rows or vice versa. There are a few reasons to reshape a dataframe; To tidy up a messy dataset so that each variable is in its column and each observation in its row. To prepare part of the dataset for analysis or visualization. I used to mostly Google when...
[ { "code": null, "e": 255, "s": 172, "text": "Reshaping a dataframe usually involves converting columns into rows or vice versa." }, { "code": null, "e": 303, "s": 255, "text": "There are a few reasons to reshape a dataframe;" }, { "code": null, "e": 402, "s": 303,...
Objective-C Error Handling
In Objective-C programming, error handling is provided with NSError class available in Foundation framework. An NSError object encapsulates richer and more extensible error information than is possible using only an error code or error string. The core attributes of an NSError object are an error domain (represented by...
[ { "code": null, "e": 2669, "s": 2560, "text": "In Objective-C programming, error handling is provided with NSError class available in Foundation framework." }, { "code": null, "e": 2993, "s": 2669, "text": "An NSError object encapsulates richer and more extensible error informati...
Deploy TensorFlow models with Istio on Kubernetes | by Masroor Hasan | Towards Data Science
Typical cloud application requirements of deployment, versioning, scaling, monitoring are also among the common operational challenges of Machine Learning (ML) services. This post will focus on building a ML serving infrastructure to continuously update, version and deploy models. In building our ML serving infrastruct...
[ { "code": null, "e": 342, "s": 172, "text": "Typical cloud application requirements of deployment, versioning, scaling, monitoring are also among the common operational challenges of Machine Learning (ML) services." }, { "code": null, "e": 454, "s": 342, "text": "This post will f...
JavaFX - 3D Shape Cylinder
A cylinder is a closed solid that has two parallel (mostly circular) bases connected by a curved surface. It is described by two parameters, namely – the radius of its circular base and the height of the cylinder as shown in the following diagram − In JavaFX, a cylinder is represented by a class named Cylinder. This cl...
[ { "code": null, "e": 2006, "s": 1900, "text": "A cylinder is a closed solid that has two parallel (mostly circular) bases connected by a curved surface." }, { "code": null, "e": 2149, "s": 2006, "text": "It is described by two parameters, namely – the radius of its circular base ...
A Comprehensive Guide to Data Visualisation in R for Beginners | by Parul Pandey | Towards Data Science
Note: The article is old and many not reflect the latest changes in the R package The world today is filled with data and it becomes imperative that we analyze it properly to gain meaningful insights. Data Visualisation is a vital tool that can unearth possible crucial insights from data. If the results of an analysis ...
[ { "code": null, "e": 253, "s": 171, "text": "Note: The article is old and many not reflect the latest changes in the R package" }, { "code": null, "e": 587, "s": 253, "text": "The world today is filled with data and it becomes imperative that we analyze it properly to gain meanin...
Connect to MySQL running in Docker container from a local machine | by Md Kamaruzzaman | Towards Data Science
If you are working in Software Engineering industry or if you are planning to work in Software Engineering field, probably you have heard about Docker. In 2013, Docker introduced the concept of Container and changed the Software Engineering landscape forever. Containers are a standardized unit of software that allows d...
[ { "code": null, "e": 323, "s": 171, "text": "If you are working in Software Engineering industry or if you are planning to work in Software Engineering field, probably you have heard about Docker." }, { "code": null, "e": 431, "s": 323, "text": "In 2013, Docker introduced the con...
Decorator Pattern | Set 3 (Coding the Design) - GeeksforGeeks
25 Apr, 2022 We have discussed Pizza design problem and different naive approaches to solve it in set 1. We have also introduced Decorator pattern in Set 2. In this article, design and implementation of decorator pattern for Pizza problem is discussed. It is highly recommended that you try it yourself first. The new cl...
[ { "code": null, "e": 24478, "s": 24450, "text": "\n25 Apr, 2022" }, { "code": null, "e": 24839, "s": 24478, "text": "We have discussed Pizza design problem and different naive approaches to solve it in set 1. We have also introduced Decorator pattern in Set 2. In this article, de...
Check if a value exists in a DataFrame using in & not in operator in Python-Pandas - GeeksforGeeks
11 Jun, 2021 In this article, Let’s discuss how to check if a given value exists in the dataframe or not.Method 1 : Use in operator to check if an element exists in dataframe. Python3 # import pandas libraryimport pandas as pd # dictionary with list object in valuesdetails = { 'Name' : ['Ankit', 'Aishwarya', 'Shau...
[ { "code": null, "e": 24571, "s": 24543, "text": "\n11 Jun, 2021" }, { "code": null, "e": 24736, "s": 24571, "text": "In this article, Let’s discuss how to check if a given value exists in the dataframe or not.Method 1 : Use in operator to check if an element exists in dataframe. ...
Reindexing in Pandas DataFrame - GeeksforGeeks
03 Aug, 2021 Reindexing in Pandas can be used to change the index of rows and columns of a DataFrame. Indexes can be used with reference to many index DataStructure associated with several pandas series or pandas DataFrame. Let’s see how can we Reindex the columns and rows in Pandas DataFrame. One can reindex a single...
[ { "code": null, "e": 24928, "s": 24900, "text": "\n03 Aug, 2021" }, { "code": null, "e": 25211, "s": 24928, "text": "Reindexing in Pandas can be used to change the index of rows and columns of a DataFrame. Indexes can be used with reference to many index DataStructure associated ...
Add multiple columns to dataframe in Pandas - GeeksforGeeks
01 Aug, 2020 In Pandas, we have the freedom to add columns in the data frame whenever needed. There are multiple ways to add columns to the Pandas data frame. Method 1: Add multiple columns to a data frame using Lists Python3 # importing pandas libraryimport pandas as pd # creating and initializing a nested liststude...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n01 Aug, 2020" }, { "code": null, "e": 25794, "s": 25647, "text": "In Pandas, we have the freedom to add columns in the data frame whenever needed. There are multiple ways to add columns to the Pandas data frame. " }, { "c...
Hawkscan – Reconnaissance and Information Gathering Tool in Kali Linux
27 Apr, 2021 Hawkscan is a free and open-source tool available on Github. Hawkscan is based upon Open Source Intelligence (OSINT). Hawkscan is the easiest and useful tool for reconnaissance. The interface of Hawkscan is very similar to Metasploit 1 and Metasploit 2. Hawkscan provides a command-line interface that you c...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Apr, 2021" }, { "code": null, "e": 968, "s": 28, "text": "Hawkscan is a free and open-source tool available on Github. Hawkscan is based upon Open Source Intelligence (OSINT). Hawkscan is the easiest and useful tool for reconnaissanc...
Rearrange array in alternating positive & negative items with O(1) extra space | Set 2
30 Jun, 2022 Given an array of positive and negative numbers, arrange them in an alternate fashion such that every positive number is followed by negative and vice-versa. Order of elements in output doesn’t matter. Extra positive or negative elements should be moved to end. Examples: Input : arr[] = {-2, 3, 4, -1} Out...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jun, 2022" }, { "code": null, "e": 316, "s": 54, "text": "Given an array of positive and negative numbers, arrange them in an alternate fashion such that every positive number is followed by negative and vice-versa. Order of element...
How to change style of elements on scroll using jQuery ?
11 Jun, 2020 We have given an HTML document containing some CSS properties, and the task is to change the CSS property to a particular element after scrolling the page using jQuery. To change the style of element on scroll, we get the number of pixels by which the content of an element has been scrolled horizontally or...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jun, 2020" }, { "code": null, "e": 349, "s": 28, "text": "We have given an HTML document containing some CSS properties, and the task is to change the CSS property to a particular element after scrolling the page using jQuery. To cha...
Variable Arguments (Varargs) in Java
08 Apr, 2022 Variable Arguments (Varargs) in Java is a method that takes a variable number of arguments. Variable Arguments in Java simplifies the creation of methods that need to take a variable number of arguments. Until JDK 4, we cant declare a method with variable no. of arguments. If there is any change in the num...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Apr, 2022" }, { "code": null, "e": 256, "s": 52, "text": "Variable Arguments (Varargs) in Java is a method that takes a variable number of arguments. Variable Arguments in Java simplifies the creation of methods that need to take a ...
Tailwind CSS Object Fit
23 Mar, 2022 This class accepts more than one value in tailwind CSS. All the properties are covered as in class form. It is the alternative to the CSS object-fit property. This class is used to specify how an image or video should be resized to fit its content box for controlling a replaced element’s content resizing. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Mar, 2022" }, { "code": null, "e": 335, "s": 28, "text": "This class accepts more than one value in tailwind CSS. All the properties are covered as in class form. It is the alternative to the CSS object-fit property. This class is us...
Overview of Dynamic Partition in Hive
31 Aug, 2021 In this article, we will discuss the overview of Hive and will focus on Dynamic Partitioning, and finally, we will conclude with the operations on Dynamic Partition in Hive. Let’s discuss it one by one. Overview :Hive is a storage system which is developed by Facebook, it is basically a data warehouse syst...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Aug, 2021" }, { "code": null, "e": 257, "s": 54, "text": "In this article, we will discuss the overview of Hive and will focus on Dynamic Partitioning, and finally, we will conclude with the operations on Dynamic Partition in Hive. ...
Probability of not getting two consecutive heads together in N tosses of coin
21 Nov, 2021 Given a fair coin that is tossed N times, the task is to determine the probability such that no two heads occur consecutively. Examples: Input: N = 2 Output: 0.75 Explanation: When the coin is tossed 2 times, the possible outcomes are {TH, HT, TT, HH}. Since in 3 out of 4 outcomes, heads don’t occur toge...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Nov, 2021" }, { "code": null, "e": 182, "s": 54, "text": "Given a fair coin that is tossed N times, the task is to determine the probability such that no two heads occur consecutively. " }, { "code": null, "e": 193, ...