title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
A Guide to Mining and Analysing Tweets with R | by Céline Van den Rul | Towards Data Science | Twitter provides us with vast amounts of user-generated language data — a dream for anyone wanting to conduct textual analysis. More than that, tweets allow us to gain insights into the online public behaviour. As such, analysing Twitter has become a crucial source of information for brands and agencies.
Several factor... | [
{
"code": null,
"e": 478,
"s": 172,
"text": "Twitter provides us with vast amounts of user-generated language data — a dream for anyone wanting to conduct textual analysis. More than that, tweets allow us to gain insights into the online public behaviour. As such, analysing Twitter has become a cruc... |
Node.js Exercises With Solutions | Theory of Computation
It is often necessary for a network application to make external HTTP calls. HTTP servers are also often called upon to perform HTTP services for clients making requests. Node.js provides an easy interface for making external HTTP calls. For example, the following code will fetch the front page of... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 425,
"s": 112,
"text": "It is often necessary for a network application to make external HTTP calls. HTTP servers are also often called upon to perform HTTP services for clients making requ... |
Baseball and Machine Learning: A Data Science Approach to 2021 Hitting Projections | by John Pette | Towards Data Science | Sports world personalities love to bash analytics these days. It’s hard to go five minutes listening to baseball talk on sports radio without hearing someone make a derogatory comment about “the nerds taking over.” Ironically, they then immediately launch into sports betting ads, and guess what, folks...any time you pl... | [
{
"code": null,
"e": 1169,
"s": 171,
"text": "Sports world personalities love to bash analytics these days. It’s hard to go five minutes listening to baseball talk on sports radio without hearing someone make a derogatory comment about “the nerds taking over.” Ironically, they then immediately launc... |
Matplotlib.axis.Axis.get_major_locator() function in Python - GeeksforGeeks | 03 Jun, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack.
The Axis.get_major_locator() function in axis module of matplotlib library is used to ... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 25868,
"s": 25647,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of ... |
How to Use MultiIndex in Pandas to Level Up Your Analysis | by Byron Dolon | Towards Data Science | What if you could have more than one column as in your DataFrame’s index?
The multi-level index feature in Pandas allows you to do just that. A regular Pandas DataFrame has a single column that acts as a unique row identifier, or in other words, an “index”. These index values can be numbers, from 0 to infinity. They ca... | [
{
"code": null,
"e": 121,
"s": 47,
"text": "What if you could have more than one column as in your DataFrame’s index?"
},
{
"code": null,
"e": 490,
"s": 121,
"text": "The multi-level index feature in Pandas allows you to do just that. A regular Pandas DataFrame has a single colum... |
Are Deeper Networks Better? —A Case Study | by Timothy Tan | Towards Data Science | Have you ever wondered about the effects of building deeper networks and what the changes entail?
I know I have.
I’m talking about the added complexity in terms of additional layers to your model and scrutinizing what downstream changes occur.
Ceteris paribus:
What effects (if any) does an additional layers have on you... | [
{
"code": null,
"e": 144,
"s": 46,
"text": "Have you ever wondered about the effects of building deeper networks and what the changes entail?"
},
{
"code": null,
"e": 159,
"s": 144,
"text": "I know I have."
},
{
"code": null,
"e": 290,
"s": 159,
"text": "I’m t... |
Difference between structured and unstructured programming - GeeksforGeeks | 13 Jul, 2021
Structured Programming
Structured Programming is a type of programming that generally converts large or complex programs into more manageable and small pieces of code.
These small pieces of codes are usually known as functions or modules or sub-programs of large complex programs.
It is known as modular pro... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 24881,
"s": 24858,
"text": "Structured Programming"
},
{
"code": null,
"e": 25026,
"s": 24881,
"text": "Structured Programming is a type of programming that generally conv... |
How to programmatically take a screenshot in android? | This example demonstrate about how to programmatically take a screenshot in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<L... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "This example demonstrate about how to programmatically take a screenshot in android."
},
{
"code": null,
"e": 1276,
"s": 1147,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required d... |
Java Math abs() Method | ❮ Math Methods
Return the absolute (positive) value of different numbers:
System.out.println(Math.abs(-4.7));
System.out.println(Math.abs(4.7));
System.out.println(Math.abs(3));
Try it Yourself »
The abs() method returns the absolute (positive) value of a number.
One of the following:
public static double abs(doubl... | [
{
"code": null,
"e": 17,
"s": 0,
"text": "\n❮ Math Methods\n"
},
{
"code": null,
"e": 76,
"s": 17,
"text": "Return the absolute (positive) value of different numbers:"
},
{
"code": null,
"e": 181,
"s": 76,
"text": "System.out.println(Math.abs(-4.7));\nSystem.o... |
Difference between Applets and Servlets in Java. | In java, both Applets and servlets are the programs or applications that run in a java environment. The main difference in both the programs is in their processing is done in different environments.
The following are the important differences between Applets and Servlets.
AppletDemo.java
import java.applet.Applet;
impo... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "In java, both Applets and servlets are the programs or applications that run in a java environment. The main difference in both the programs is in their processing is done in different environments."
},
{
"code": null,
"e": 1335,
"s": 12... |
How to add unique Id to each record in your local/custom database in Node.js ? - GeeksforGeeks | 18 Jul, 2020
The custom database signifies the local database in your file system. There are two types of database ‘SQL’ and ‘NoSQL’. In SQL database data are stored as table manner and in Nosql database data are stored independently with some particular way to identify each record independently. We can also create our... | [
{
"code": null,
"e": 24235,
"s": 24207,
"text": "\n18 Jul, 2020"
},
{
"code": null,
"e": 24733,
"s": 24235,
"text": "The custom database signifies the local database in your file system. There are two types of database ‘SQL’ and ‘NoSQL’. In SQL database data are stored as table m... |
How can we return multiple values from a function in C#? | In c# multiple values can be returned using the below approaches −
Reference parameters
Reference parameters
Output parameters
Output parameters
Returning an Array
Returning an Array
Returning a Tuple
Returning a Tuple
class Program{
static int ReturnMultipleValuesUsingRef(int firstNumber, ref int secondNumber){
... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "In c# multiple values can be returned using the below approaches −"
},
{
"code": null,
"e": 1150,
"s": 1129,
"text": "Reference parameters"
},
{
"code": null,
"e": 1171,
"s": 1150,
"text": "Reference parameters"
... |
How to detect device is Android phone or Android tablet? | This example demonstrates how do I detect the device is an Android phone or Android tablet.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "This example demonstrates how do I detect the device is an Android phone or Android tablet."
},
{
"code": null,
"e": 1283,
"s": 1154,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all req... |
Program to convert Centimeter to Feet and Inches - GeeksforGeeks | 04 Feb, 2022
In this article, we will learn how to convert Height, given in centimeter to Height in feet and inches. Examples:
Input : centimeter = 10
Output : inches = 3.94
feet = 0.33
Input : centimeter = 85
Output : inches = 33.46
feet = 2.79
We know that 1 inch is equal to 2.54 centimeters, s... | [
{
"code": null,
"e": 23837,
"s": 23809,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 23953,
"s": 23837,
"text": "In this article, we will learn how to convert Height, given in centimeter to Height in feet and inches. Examples: "
},
{
"code": null,
"e": 24091,
... |
IDE | GeeksforGeeks | A computer science portal for geeks | Please enter your email address or userHandle.
12345678910111213141516171819202122232425262728293031323334353637https://c.mi.com/thread-3967156-1-1.html https://forums.ubisoft.com/showthread.php/2371427-44-Free-Cookie-Run-Cookies-Generator-2022iwd?p=15523073#post15523073https://netflix-free-account-generator.tumblr.com... | [
{
"code": null,
"e": 164,
"s": 117,
"text": "Please enter your email address or userHandle."
},
{
"code": null,
"e": 2352,
"s": 164,
"text": "12345678910111213141516171819202122232425262728293031323334353637https://c.mi.com/thread-3967156-1-1.html https://forums.ubisoft.com/showt... |
Julia - Tuples | Similar to an array, tuple is also an ordered set of elements. Tuples work in almost the same way as arrays but there are following important differences between them −
An array is represented by square brackets whereas a tuple is represented by parentheses and commas.
An array is represented by square brackets whereas... | [
{
"code": null,
"e": 2247,
"s": 2078,
"text": "Similar to an array, tuple is also an ordered set of elements. Tuples work in almost the same way as arrays but there are following important differences between them −"
},
{
"code": null,
"e": 2348,
"s": 2247,
"text": "An array is r... |
Building A Custom Model in Scikit-Learn | by Tim Book | Towards Data Science | Scikit-Learn is incredible. It allows its users to fit almost any machine learning model you can think of, plus many you may never have even heard of! All in just two lines of code!
However, it doesn’t have everything. For example, ordinal regression is nowhere to be found. And its deep learning capabilities are... lac... | [
{
"code": null,
"e": 354,
"s": 172,
"text": "Scikit-Learn is incredible. It allows its users to fit almost any machine learning model you can think of, plus many you may never have even heard of! All in just two lines of code!"
},
{
"code": null,
"e": 555,
"s": 354,
"text": "Howe... |
JavaScript for...in loop | The for...in loop is used to loop through an object's properties. As we have not discussed Objects yet, you may not feel comfortable with this loop. But once you understand how objects behave in JavaScript, you will find this loop very useful.
for (variablename in object) {
statement or block to execute
}
In each i... | [
{
"code": null,
"e": 2710,
"s": 2466,
"text": "The for...in loop is used to loop through an object's properties. As we have not discussed Objects yet, you may not feel comfortable with this loop. But once you understand how objects behave in JavaScript, you will find this loop very useful."
},
{... |
No labels? No problem!. Machine learning without labels using... | by Josh Taylor | Towards Data Science | There is a certain irony that machine learning, a tool used for the automation of tasks and processes, often starts with the highly manual process of data labelling.
The task of creating labels to teach computers new tasks is quickly becoming the blue collar job of the 21st century.
It has created complex supply chains... | [
{
"code": null,
"e": 337,
"s": 171,
"text": "There is a certain irony that machine learning, a tool used for the automation of tasks and processes, often starts with the highly manual process of data labelling."
},
{
"code": null,
"e": 455,
"s": 337,
"text": "The task of creating... |
A Beginners Introduction into MapReduce | by Dima Shulga | Towards Data Science | Many times, as Data Scientists, we have to deal with huge amount of data. In those cases, many approaches won’t work or won’t be feasible. A massive amount of data is good, it’s very good, and we want to utilize as much as possible.
Here I want to introduce the MapReduce technique, which is a broad technique that is us... | [
{
"code": null,
"e": 404,
"s": 171,
"text": "Many times, as Data Scientists, we have to deal with huge amount of data. In those cases, many approaches won’t work or won’t be feasible. A massive amount of data is good, it’s very good, and we want to utilize as much as possible."
},
{
"code": ... |
Introduction to hierarchical time series forecasting — part II | by Eryk Lewinson | Towards Data Science | In the first part of this article, I provided an introduction to hierarchical time series forecasting, described different types of hierarchical structures, and went over the most popular approaches to forecasting such time series. In the second part, I present an example of how to approach such a task in Python using ... | [
{
"code": null,
"e": 516,
"s": 172,
"text": "In the first part of this article, I provided an introduction to hierarchical time series forecasting, described different types of hierarchical structures, and went over the most popular approaches to forecasting such time series. In the second part, I p... |
Set variable point size in Matplotlib | To set the variable point size in matplotlib, we can take the following steps−
Initialize the coordinates of the point.
Make a variable to store the point size.
Plot the point using scatter method, with marker=o, color=red, s=point_size.To display the figure, use show() method.
from matplotlib import pyplot as plt
plt.... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "To set the variable point size in matplotlib, we can take the following steps−"
},
{
"code": null,
"e": 1182,
"s": 1141,
"text": "Initialize the coordinates of the point."
},
{
"code": null,
"e": 1223,
"s": 1182,
... |
A Step-by-Step Guide to Speech Recognition and Audio Signal Processing in Python | by Rahulraj Singh | Towards Data Science | Speech is the primary form of human communication and is also a vital part of understanding behavior and cognition. Speech Recognition in Artificial Intelligence is a technique deployed on computer programs that enables them in understanding spoken words.
As images and videos, sound is also an analog signal that humans... | [
{
"code": null,
"e": 428,
"s": 172,
"text": "Speech is the primary form of human communication and is also a vital part of understanding behavior and cognition. Speech Recognition in Artificial Intelligence is a technique deployed on computer programs that enables them in understanding spoken words.... |
How to find the mean of multiple columns based on a character column in R? | If we have a character column that means we are more likely to have duplicated values in that column hence finding the mean of numerical columns based on the values in character column cannot be done directly. For this purpose, we can use aggregate function as shown in the below examples.
Consider the below data frame ... | [
{
"code": null,
"e": 1352,
"s": 1062,
"text": "If we have a character column that means we are more likely to have duplicated values in that column hence finding the mean of numerical columns based on the values in character column cannot be done directly. For this purpose, we can use aggregate func... |
Kotlin - Operators | An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. Kotlin is rich in built-in operators and provide the following types of operators:
Arithmetic Operators
Arithmetic Operators
Relational Operators
Relational Operators
Assignment Operators
Assignment Operators
Unar... | [
{
"code": null,
"e": 2615,
"s": 2425,
"text": "An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. Kotlin is rich in built-in operators and provide the following types of operators:"
},
{
"code": null,
"e": 2636,
"s": 2615,
"... |
Tree-Boosted Mixed Effects Models | by Fabio Sigrist | Towards Data Science | This article shows how tree-boosting (sometimes also referred to as “gradient tree-boosting”) can be combined with mixed effects models using the GPBoost algorithm. Background is provided on both the methodology as well as on how to apply the GPBoost library using Python. We show how (i) models are trained, (ii) parame... | [
{
"code": null,
"e": 627,
"s": 172,
"text": "This article shows how tree-boosting (sometimes also referred to as “gradient tree-boosting”) can be combined with mixed effects models using the GPBoost algorithm. Background is provided on both the methodology as well as on how to apply the GPBoost libr... |
How can I create a stored procedure to delete values from a MySQL table? | We can create a stored procedure with IN operator to delete values from a MySQL table. To make it understand we are taking an example of a table named ‘student_info’ having the following data −
mysql> Select * from student_info;
+------+---------+------------+------------+
| id | Name | Address | Subject |
+... | [
{
"code": null,
"e": 1256,
"s": 1062,
"text": "We can create a stored procedure with IN operator to delete values from a MySQL table. To make it understand we are taking an example of a table named ‘student_info’ having the following data −"
},
{
"code": null,
"e": 1676,
"s": 1256,
... |
Spectral Graph Convolution Explained and Implemented Step By Step | by Boris Knyazev | Towards Data Science | First, let’s recall what is a graph. A graph G is a set of nodes (vertices) connected by directed/undirected edges. In this post, I will assume an undirected graph G with N nodes. Each node in this graph has a C-dimensional feature vector, and features of all nodes are represented as an N×C dimensional matrix X(l). Edg... | [
{
"code": null,
"e": 660,
"s": 172,
"text": "First, let’s recall what is a graph. A graph G is a set of nodes (vertices) connected by directed/undirected edges. In this post, I will assume an undirected graph G with N nodes. Each node in this graph has a C-dimensional feature vector, and features of... |
Getters and Setters in Scala - GeeksforGeeks | 20 Jun, 2019
Getter and Setter in Scala are methods that helps us to get the value of variables and instantiate variables of class/trait respectively. Scala generates a class for the JVM with a private variable field and getter and setter methods. In Scala, the getters and setters are not named getXxx and setXxx, but t... | [
{
"code": null,
"e": 23455,
"s": 23427,
"text": "\n20 Jun, 2019"
},
{
"code": null,
"e": 23865,
"s": 23455,
"text": "Getter and Setter in Scala are methods that helps us to get the value of variables and instantiate variables of class/trait respectively. Scala generates a class f... |
An Approach Towards Convolutional Recurrent Neural Networks | by Chandra Churh Chatterjee | Towards Data Science | The Convolutional Recurrent Neural Networks is the combination of two of the most prominent neural networks. The CRNN (convolutional recurrent neural network) involves CNN(convolutional neural network) followed by the RNN(Recurrent neural networks). The proposed network is similar to the CRNN but generates better or op... | [
{
"code": null,
"e": 425,
"s": 47,
"text": "The Convolutional Recurrent Neural Networks is the combination of two of the most prominent neural networks. The CRNN (convolutional recurrent neural network) involves CNN(convolutional neural network) followed by the RNN(Recurrent neural networks). The pr... |
Array of Strings in C++ (5 Different Ways to Create) - GeeksforGeeks | 20 Oct, 2021
In C and C++, a string is a 1-dimensional array of characters and an array of strings in C is a 2-dimensional array of characters. There are many ways to declare them, and a selection of useful ways are given here.
We create an array of string literals by creating an array of pointers.
This is supported by... | [
{
"code": null,
"e": 26647,
"s": 26619,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 26862,
"s": 26647,
"text": "In C and C++, a string is a 1-dimensional array of characters and an array of strings in C is a 2-dimensional array of characters. There are many ways to declare t... |
C++ String Library - find_first_not_of | It searches the string for the first character that does not match any of the characters specified in its arguments.
Following is the declaration for std::string::find_first_not_of.
size_t find_first_not_of (const string& str, size_t pos = 0) const;
size_t find_first_not_of (const string& str, size_t pos = 0) const noe... | [
{
"code": null,
"e": 2720,
"s": 2603,
"text": "It searches the string for the first character that does not match any of the characters specified in its arguments."
},
{
"code": null,
"e": 2785,
"s": 2720,
"text": "Following is the declaration for std::string::find_first_not_of."... |
Python Project To Improve Your Productivity For The New Year | by Bharath K | Towards Data Science | The new year is approaching very soon, and I think most people are glad that 2020 is almost over! Most people are excited and are welcoming the next year of 2021. Hence, this upcoming New Year presents all of us an opportunity to build an incredible Python project that will be useful for the rest of the year.
With ever... | [
{
"code": null,
"e": 358,
"s": 47,
"text": "The new year is approaching very soon, and I think most people are glad that 2020 is almost over! Most people are excited and are welcoming the next year of 2021. Hence, this upcoming New Year presents all of us an opportunity to build an incredible Python... |
Shortest possible combination of two strings - GeeksforGeeks | 14 Mar, 2022
Compute the shortest string for a combination of two given strings such that the new string consist of both the strings as its subsequences.Examples:
Input : a = "pear"
b = "peach"
Output : pearch
pearch is the shorted string such that both
pear and peach are its subsequences.
Input : a = "geek... | [
{
"code": null,
"e": 24305,
"s": 24277,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 24457,
"s": 24305,
"text": "Compute the shortest string for a combination of two given strings such that the new string consist of both the strings as its subsequences.Examples: "
},
{
... |
How to Multiply Two Matrices using Python? | Multiplication of two matrices is possible only when number of columns in first matrix equals number of rows in second matrix.
Multiplication can be done using nested loops. Following program has two matrices x and y each with 3 rows and 3 columns. The resultant z matrix will also have 3X3 structure. Element of each ro... | [
{
"code": null,
"e": 1189,
"s": 1062,
"text": "Multiplication of two matrices is possible only when number of columns in first matrix equals number of rows in second matrix."
},
{
"code": null,
"e": 1467,
"s": 1189,
"text": "Multiplication can be done using nested loops. Followin... |
Select last day of current year in MySQL? | In order to get last day of current year, you can use LAST_DAY() from MySQL. The syntax is as follows−
SELECT LAST_DAY(DATE_ADD(CURDATE(), INTERVAL 12-MONTH(CURDATE()) MONTH));
Let us implement the above syntax to know the last day of current year−
mysql> SELECT LAST_DAY(DATE_ADD(CURDATE(), INTERVAL 12-MONTH(CURDATE())... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "In order to get last day of current year, you can use LAST_DAY() from MySQL. The syntax is as follows−"
},
{
"code": null,
"e": 1239,
"s": 1165,
"text": "SELECT LAST_DAY(DATE_ADD(CURDATE(), INTERVAL 12-MONTH(CURDATE()) MONTH));"
},... |
Spring JDBC - ResultSetExtractor Interface | The org.springframework.jdbc.core.ResultSetExtractor interface is a callback interface used by JdbcTemplate's query methods. Implementations of this interface perform the actual work of extracting results from a ResultSet, but don't need to worry about exception handling.
SQLExceptions will be caught and handled by the... | [
{
"code": null,
"e": 2669,
"s": 2396,
"text": "The org.springframework.jdbc.core.ResultSetExtractor interface is a callback interface used by JdbcTemplate's query methods. Implementations of this interface perform the actual work of extracting results from a ResultSet, but don't need to worry about ... |
Python Program for 0-1 Knapsack Problem | In this article, we will learn about the solution to the problem statement given below.
Problem statement − We are given weights and values of n items, we need to put these items in a bag of capacity W up to the maximum capacity w. We need to carry a maximum number of items and return its value.
Now let’s observe the s... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this article, we will learn about the solution to the problem statement given below."
},
{
"code": null,
"e": 1359,
"s": 1150,
"text": "Problem statement − We are given weights and values of n items, we need to put these items in ... |
How to find the length of an array in JavaScript? | To find the length of an array, use the JavaScript length property. JavaScript array length property returns an unsigned, 32-bit integer that specifies the number of elements in an array.
You can try to run the following code to find the length of an array −
Live Demo
<html>
<head>
<title>JavaScript Array leng... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "To find the length of an array, use the JavaScript length property. JavaScript array length property returns an unsigned, 32-bit integer that specifies the number of elements in an array."
},
{
"code": null,
"e": 1321,
"s": 1250,
"te... |
SIP - Messaging | SIP messages are of two types − requests and responses.
The opening line of a request contains a method that defines the request, and a Request-URI that defines where the request is to be sent.
The opening line of a request contains a method that defines the request, and a Request-URI that defines where the request is ... | [
{
"code": null,
"e": 1906,
"s": 1850,
"text": "SIP messages are of two types − requests and responses."
},
{
"code": null,
"e": 2044,
"s": 1906,
"text": "The opening line of a request contains a method that defines the request, and a Request-URI that defines where the request is ... |
A simple intro to Regex with Python | by Tirthajyoti Sarkar | Towards Data Science | Text mining is a hot topic in data science these days. The volume, variety, and complexity of textual data are increasing at an astounding space.
As per this article, the global text analytics market was valued at USD 5.46 billion in 2019 and is expected to reach a value of USD 14.84 billion by 2025.
Regular expression... | [
{
"code": null,
"e": 318,
"s": 172,
"text": "Text mining is a hot topic in data science these days. The volume, variety, and complexity of textual data are increasing at an astounding space."
},
{
"code": null,
"e": 474,
"s": 318,
"text": "As per this article, the global text ana... |
Minimum element in BST | Practice | GeeksforGeeks | Given a Binary Search Tree. The task is to find the minimum element in this given BST.
Example 1:
Input:
5
/ \
4 6
/ \
3 7
/
1
Output: 1
Example 2:
Input:
9
\
10
\
11
Ou... | [
{
"code": null,
"e": 326,
"s": 238,
"text": "Given a Binary Search Tree. The task is to find the minimum element in this given BST. "
},
{
"code": null,
"e": 337,
"s": 326,
"text": "Example 1:"
},
{
"code": null,
"e": 451,
"s": 337,
"text": "Input:\n ... |
C program to generate an electricity bill | Based on the units consumed by the user, the electricity bill is generated. If number of units consumed are more then, the rate of a unit charge will also increase.
The logic applied if minimum units are consumed by the user is as follows −
if (units < 50){
amt = units * 3.50;
unitcharg = 25;
}
The logic applied ... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "Based on the units consumed by the user, the electricity bill is generated. If number of units consumed are more then, the rate of a unit charge will also increase."
},
{
"code": null,
"e": 1303,
"s": 1227,
"text": "The logic applied... |
C# - Namespaces | A namespace is designed for providing a way to keep one set of names separate from another. The class names declared in one namespace does not conflict with the same class names declared in another.
A namespace definition begins with the keyword namespace followed by the namespace name as follows −
namespace namespace_... | [
{
"code": null,
"e": 2469,
"s": 2270,
"text": "A namespace is designed for providing a way to keep one set of names separate from another. The class names declared in one namespace does not conflict with the same class names declared in another."
},
{
"code": null,
"e": 2570,
"s": 24... |
AWT Arc2D Class | The Arc2D class is the superclass for all objects that store a 2D arc defined by a framing rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE).
Following is the declaration for java.awt.Arc2D class:
public abstract class Arc2D
extends RectangularShape
Following are th... | [
{
"code": null,
"e": 1940,
"s": 1747,
"text": "The Arc2D class is the superclass for all objects that store a 2D arc defined by a framing rectangle, start angle, angular extent (length of the arc), and a closure type (OPEN, CHORD, or PIE)."
},
{
"code": null,
"e": 1995,
"s": 1940,
... |
Regression Analysis for Beginners — Part 2 | by Gurami Keretchashvili | Towards Data Science | · Introduction· Part 2.1 Build Machine learning Pipeline ∘ Step 1: Collect the data ∘ Step 2: Visualize the data (Ask yourself these questions and answer) ∘ Step 3: Clean the data ∘ Step 4: Train the model ∘ Step 5: Evaluate ∘ Step 6: Hyperparameter tuning using hyperopt ∘ Step 7: Choose the best model and prediction· ... | [
{
"code": null,
"e": 716,
"s": 172,
"text": "· Introduction· Part 2.1 Build Machine learning Pipeline ∘ Step 1: Collect the data ∘ Step 2: Visualize the data (Ask yourself these questions and answer) ∘ Step 3: Clean the data ∘ Step 4: Train the model ∘ Step 5: Evaluate ∘ Step 6: Hyperparameter tunin... |
Overloading in Java | 17 Feb, 2021
Overloading allows different methods to have the same name, but different signatures where the signature can differ by the number of input parameters or type of input parameters or both. Overloading is related to compile-time (or static) polymorphism.
// Java program to demonstrate working of method// over... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 304,
"s": 52,
"text": "Overloading allows different methods to have the same name, but different signatures where the signature can differ by the number of input parameters or type of input paramet... |
Visualisation in Julia | 04 Mar, 2021
Data visualization is the process of representing the available data diagrammatically. There are packages that can be installed to visualize the data in languages like Python and Julia. Some of the reasons that make the visualization of data important are listed below:
Larger data can be analyzed easily.
T... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Mar, 2021"
},
{
"code": null,
"e": 298,
"s": 28,
"text": "Data visualization is the process of representing the available data diagrammatically. There are packages that can be installed to visualize the data in languages like Python ... |
Perl | substr() function | 25 Jun, 2019
substr() in Perl returns a substring out of the string passed to the function starting from a given index up to the length specified. This function by default returns the remaining part of the string starting from the given index if the length is not specified. A replacement string can also be passed to th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 772,
"s": 28,
"text": "substr() in Perl returns a substring out of the string passed to the function starting from a given index up to the length specified. This function by default returns the rema... |
Remove repeated elements from ArrayList in Java | 11 Dec, 2018
Prerequisite: ArrayList in Java
Given an ArrayList, the task is to remove repeated elements of the ArrayList in Java.
Examples:
Input: ArrayList = [1, 2, 2, 3, 4, 4, 4]
Output: [1, 2, 3, 4]
Input: ArrayList = [12, 23, 23, 34, 45, 45, 45, 45, 57, 67, 89]
Output: [12, 23, 34, 45, 57, 67, 89]
Below are t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 60,
"s": 28,
"text": "Prerequisite: ArrayList in Java"
},
{
"code": null,
"e": 146,
"s": 60,
"text": "Given an ArrayList, the task is to remove repeated elements of the ArrayList... |
Zoho Interview | Set 2 (On-Campus) | 22 Jul, 2019
Recently Zoho visited for the campus placement. I would like to share my experience to geeksforgeeks because of which I got this offer. Thank you geekforgeeks
Zoho On Campus Placement Process
1) First Round : Written
40 C output questions. 2 Hours.30 1Mark and 10 2Mark questions. IT WAS NOT MCQ. The quest... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jul, 2019"
},
{
"code": null,
"e": 214,
"s": 54,
"text": "Recently Zoho visited for the campus placement. I would like to share my experience to geeksforgeeks because of which I got this offer. Thank you geekforgeeks "
},
{
... |
Convert DataFrame Column to Numeric in R | 16 May, 2021
In this article, we are going to see how to convert DataFrame Column to Numeric in R Programming Language.
All dataframe column is associated with a class which is an indicator of the data type to which the elements of that column belong to. Therefore, in order to simulate the data type conversion, the da... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 136,
"s": 28,
"text": "In this article, we are going to see how to convert DataFrame Column to Numeric in R Programming Language. "
},
{
"code": null,
"e": 495,
"s": 136,
"text":... |
Hilbert Matrix | 09 Nov, 2020
A Hilbert Matrix is a square matrix whose each element is a unit fraction.Properties:
It is a symmetric matrix.Its determinant value is always positive.Examples:Input : N = 2
Output : 1 0.5
0.5 0.33
Input : N = 3
Output : 1.0000 0.5000 0.3333
0.5000 0.3333... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Nov, 2020"
},
{
"code": null,
"e": 138,
"s": 52,
"text": "A Hilbert Matrix is a square matrix whose each element is a unit fraction.Properties:"
},
{
"code": null,
"e": 3207,
"s": 138,
"text": "It is a symmetric ... |
How to Use Go With MongoDB? | 21 Apr, 2022
MongoDB is an open-source NoSQL database. It is a document-oriented database, uses a JSON-like structure called BSON to store documents(i.e. key-value pairs). MongoDB provides the concept of collection to group documents. In this article, we will discuss who connects MongoDB with Golang.
Prerequisite: You... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Apr, 2022"
},
{
"code": null,
"e": 342,
"s": 52,
"text": "MongoDB is an open-source NoSQL database. It is a document-oriented database, uses a JSON-like structure called BSON to store documents(i.e. key-value pairs). MongoDB provide... |
re.MatchObject.span() Method in Python – regex | 02 Sep, 2020
re.MatchObject.span() method returns a tuple containing starting and ending index of the matched string. If group did not contribute to the match it returns(-1,-1).
Syntax: re.MatchObject.span()
Parameters: group (optional) By default this is 0.
Return: A tuple containing starting and ending index of the m... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 218,
"s": 53,
"text": "re.MatchObject.span() method returns a tuple containing starting and ending index of the matched string. If group did not contribute to the match it returns(-1,-1)."
},
{... |
How to read the XML file in PowerShell? | Reading the XML file in PowerShell is easy. We have the below XML file for our example,
<Animals>
<Animal Name="Elephant" Type="Wild">
<Residence>Forest</Residence>
<Color>Brown</Color>
</Animal>
<Animal Name="Dog" Type="Pet">
<Residence>Street</Residence>
... | [
{
"code": null,
"e": 1275,
"s": 1187,
"text": "Reading the XML file in PowerShell is easy. We have the below XML file for our example,"
},
{
"code": null,
"e": 1687,
"s": 1275,
"text": "<Animals>\n <Animal Name=\"Elephant\" Type=\"Wild\">\n <Residence>Forest</Resid... |
Transpose a matrix in Java | A transpose of a matrix is the matrix flipped over its diagonal i.e. the row and column indices of the matrix are switched. An example of this is given as follows −
Matrix =
1 2 3
4 5 6
7 8 9
Transpose =
1 4 7
2 5 8
3 6 9
A program that demonstrates this is given as follows.
Live Demo
public class Example {
publi... | [
{
"code": null,
"e": 1352,
"s": 1187,
"text": "A transpose of a matrix is the matrix flipped over its diagonal i.e. the row and column indices of the matrix are switched. An example of this is given as follows −"
},
{
"code": null,
"e": 1411,
"s": 1352,
"text": "Matrix = \n1 2 3\... |
Java Program For Array Rotation | 03 Mar, 2021
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.
Rotation of the above array by 2 will make array
METHOD 1 (Using temp array)
Input arr[] = [1, 2, 3, 4, 5, 6, 7], d = 2, n =7
1) Store d elements in a temp array
temp[] = [1, 2]
2) Shift rest of the arr[]
arr[] = [3, 4, 5... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements."
},
{
"code": null,
"e": 157,
"s": 108,
"text": "Rotation of the above arra... |
A Complete Machine Learning Project Walk-Through in Python: Part One | by Will Koehrsen | Towards Data Science | Reading through a data science book or taking a course, it can feel like you have the individual pieces, but don’t quite know how to put them together. Taking the next step and solving a complete machine learning problem can be daunting, but preserving and completing a first project will give you the confidence to tack... | [
{
"code": null,
"e": 675,
"s": 172,
"text": "Reading through a data science book or taking a course, it can feel like you have the individual pieces, but don’t quite know how to put them together. Taking the next step and solving a complete machine learning problem can be daunting, but preserving an... |
Detectron2 & Python Wheels Cache. Building a Detectron2 wheel package on... | by Ian Ormesher | Towards Data Science | I’ve been recently doing some work with a custom Detectron2 model. I’ve been training my model on a Linux VM in the cloud, but I wanted to use this trained model in a Windows environment. The official line from Facebook Research about Detectron2 is that it isn’t supported on Windows. But I wasn’t going to let that stop... | [
{
"code": null,
"e": 593,
"s": 172,
"text": "I’ve been recently doing some work with a custom Detectron2 model. I’ve been training my model on a Linux VM in the cloud, but I wanted to use this trained model in a Windows environment. The official line from Facebook Research about Detectron2 is that i... |
GATE | GATE-CS-2015 (Set 3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
Consider a software project with the following information domain characteristic for calculation of function point metric.
Number of external inputs (I) = 30
Number of external output (O) = 60
Number of external inquiries (E) = 23
Number of files (F) = 08
Number of external interfaces (N) = 02
I... | [
{
"code": null,
"e": 24085,
"s": 24057,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24208,
"s": 24085,
"text": "Consider a software project with the following information domain characteristic for calculation of function point metric."
},
{
"code": null,
"e": 243... |
Matplotlib - 3D Wireframe plot | Wireframe plot takes a grid of values and projects it onto the specified three-dimensional surface, and can make the resulting three-dimensional forms quite easy to visualize. The plot_wireframe() function is used for the purpose −
from mpl_toolkits import mplot3d
import numpy as np
import matplotlib.pyplot as plt
def ... | [
{
"code": null,
"e": 2748,
"s": 2516,
"text": "Wireframe plot takes a grid of values and projects it onto the specified three-dimensional surface, and can make the resulting three-dimensional forms quite easy to visualize. The plot_wireframe() function is used for the purpose −"
},
{
"code":... |
Deploying Models to Flask. A walk-through on how to deploy machine... | by Jeremy Chow | Towards Data Science | Code for this project can be found here.
You’ve built a model using Pandas, Sci-kit Learn, and Jupyter Notebooks. The results look great in your notebooks, but how do you share what you’ve made with others?
To share models, we need to deploy them, ideally to some website, or at minimum using Python files. Today I will ... | [
{
"code": null,
"e": 212,
"s": 171,
"text": "Code for this project can be found here."
},
{
"code": null,
"e": 378,
"s": 212,
"text": "You’ve built a model using Pandas, Sci-kit Learn, and Jupyter Notebooks. The results look great in your notebooks, but how do you share what you’... |
dmesg command in Linux for driver messages - GeeksforGeeks | 15 May, 2019
dmesg command also called as “driver message” or “display message” is used to examine the kernel ring buffer and print the message buffer of kernel. The output of this command contains the messages produced by the device drivers.
Usage of dmesg :
When the computer boots up, there are lot of messages(log) g... | [
{
"code": null,
"e": 24014,
"s": 23986,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 24244,
"s": 24014,
"text": "dmesg command also called as “driver message” or “display message” is used to examine the kernel ring buffer and print the message buffer of kernel. The output of ... |
Curve Navigation Drawer in Android using ArcNavigationView - GeeksforGeeks | 14 Oct, 2020
The Navigation Drawer is a layout that can be seen in certain applications, that consists of some other activity shortcuts (Intents). This drawer generally can be seen at the left edge of the screen, which is by default. A Button to access the Navigation Drawer is by default provided at the action bar.
UI... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 25030,
"s": 24725,
"text": "The Navigation Drawer is a layout that can be seen in certain applications, that consists of some other activity shortcuts (Intents). This drawer generally can be ... |
How can we convert subqueries to INNER JOIN? | To make it understand we are using the data from the following tables −
mysql> Select * from customers;
+-------------+----------+
| Customer_Id | Name |
+-------------+----------+
| 1 | Rahul |
| 2 | Yashpal |
| 3 | Gaurav |
| 4 | Virender |
+-------------+----------+
... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "To make it understand we are using the data from the following tables −"
},
{
"code": null,
"e": 1661,
"s": 1134,
"text": "mysql> Select * from customers;\n+-------------+----------+\n| Customer_Id | Name |\n+-------------+------... |
Count N-digits numbers made up of even and prime digits at odd and even positions respectively - GeeksforGeeks | 13 Sep, 2021
Given a positive integer N, the task is to find the number of integers of N digits having even digits at odd indices and prime digits at even indices.
Examples:
Input: N = 2Output: 20Explanation:Following are the possible number of 2-digits satisfying the given criteria {20, 22, 24, 26, 28, 30, 32, 34, 36,... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 24867,
"s": 24716,
"text": "Given a positive integer N, the task is to find the number of integers of N digits having even digits at odd indices and prime digits at even indices."
},
{
... |
Python - Log Gamma Distribution in Statistics - GeeksforGeeks | 10 Jan, 2020
scipy.stats.loggamma() is a log gamma continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It completes the methods with details specific for this particular distribution.
Parameters :
q : lower and upper tail probabilityx : quantilesloc : [opti... | [
{
"code": null,
"e": 24233,
"s": 24205,
"text": "\n10 Jan, 2020"
},
{
"code": null,
"e": 24467,
"s": 24233,
"text": "scipy.stats.loggamma() is a log gamma continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It complet... |
What is the size of void pointer in C/C++? | The size of void pointer varies system to system. If the system is 16-bit, size of void pointer is 2 bytes. If the system is 32-bit, size of void pointer is 4 bytes. If the system is 64-bit, size of void pointer is 8 bytes.
Here is an example to find the size of void pointer in C language,
Live Demo
#include <stdio.h>... | [
{
"code": null,
"e": 1286,
"s": 1062,
"text": "The size of void pointer varies system to system. If the system is 16-bit, size of void pointer is 2 bytes. If the system is 32-bit, size of void pointer is 4 bytes. If the system is 64-bit, size of void pointer is 8 bytes."
},
{
"code": null,
... |
Array Subset of another array | Practice | GeeksforGeeks | Given two arrays: a1[0..n-1] of size n and a2[0..m-1] of size m. Task is to check whether a2[] is a subset of a1[] or not. Both the arrays can be sorted or unsorted. It may be assumed that elements in both array are distinct.
Example 1:
Input:
a1[] = {11, 1, 13, 21, 3, 7}
a2[] = {11, 3, 7, 1}
Output:
Yes
Explanation:... | [
{
"code": null,
"e": 466,
"s": 238,
"text": "Given two arrays: a1[0..n-1] of size n and a2[0..m-1] of size m. Task is to check whether a2[] is a subset of a1[] or not. Both the arrays can be sorted or unsorted. It may be assumed that elements in both array are distinct.\n "
},
{
"code": null... |
Save the plots into a PDF in matplotlib | Using plt.savefig("myImagePDF.pdf", format="pdf", bbox_inches="tight") method, we can save a figure in PDF format.
Create a dictionary with Column 1 and Column 2 as the keys and Values are like i and i*i, where i is from 0 to 10, respectively.
Create a dictionary with Column 1 and Column 2 as the keys and Values are li... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "Using plt.savefig(\"myImagePDF.pdf\", format=\"pdf\", bbox_inches=\"tight\") method, we can save a figure in PDF format."
},
{
"code": null,
"e": 1306,
"s": 1177,
"text": "Create a dictionary with Column 1 and Column 2 as the keys an... |
Check if a string contains two non overlapping sub-strings "geek" and "keeg" - GeeksforGeeks | 21 May, 2021
Given a string str, the task is to check whether the string contains two non-overlapping sub-strings s1 = “geek” and s2 = “keeg” such that s2 starts after s1 ends.Examples:
Input: str = “geekeekeeg” Output: Yes “geek” and “keeg” both are present in the given string without overlapping.Input: str = “geeke... | [
{
"code": null,
"e": 26624,
"s": 26596,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 26799,
"s": 26624,
"text": "Given a string str, the task is to check whether the string contains two non-overlapping sub-strings s1 = “geek” and s2 = “keeg” such that s2 starts after s1 ends.... |
numpy.ndarray.size() method | Python - GeeksforGeeks | 26 Mar, 2020
numpy.ndarray.size() function return the number of elements in the array. it equal to np.prod(a.shape), i.e., the product of the array’s dimensions.
Syntax : numpy.ndarray.size(arr)
Parameters :arr : [array_like] Input array.
Return : [int] The number of elements in the array.
Code #1 :
# Python program ex... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 24441,
"s": 24292,
"text": "numpy.ndarray.size() function return the number of elements in the array. it equal to np.prod(a.shape), i.e., the product of the array’s dimensions."
},
{
... |
How to create a rectangle with rounded corners in HTML5 SVG? | SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.
To draw a rectangle in HTML SVG, use the SVG <rect> element. For ro... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG."... |
Auto adjust font size in Seaborn heatmap using Matplotlib | To adjust font size in Seaborn, we can take followig steps−
Create a dictionary with some mathematical expressions
Create a dataframe using Pandas data frame.
Create a heatmap using heatmap() method.
To adjust the font size in Seaborn heatmap, change the fontsize value.
To display the figure, use show() method.
import ... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "To adjust font size in Seaborn, we can take followig steps−"
},
{
"code": null,
"e": 1177,
"s": 1122,
"text": "Create a dictionary with some mathematical expressions"
},
{
"code": null,
"e": 1221,
"s": 1177,
"text... |
Is the Point Inside the Polygon?. “In computational geometry, the... | by Anirudh Topiwala | Towards Data Science | “In computational geometry, the point-in-polygon (PIP) problem asks whether a given point in the plane lies inside, outside, or on the boundary of a polygon.” Wikipedia.
A quick and simple algorithm to find whether a point lies inside, on or outside a polygon is very useful in various applications like computer graphic... | [
{
"code": null,
"e": 341,
"s": 171,
"text": "“In computational geometry, the point-in-polygon (PIP) problem asks whether a given point in the plane lies inside, outside, or on the boundary of a polygon.” Wikipedia."
},
{
"code": null,
"e": 578,
"s": 341,
"text": "A quick and simp... |
Powershell - Alias | PowerShell alias is another name for the cmdlet or for any command element.
Use New-Alias cmdlet to create a alias. In the below example, we've created an alias help for Get-Help cmdlet.
New-Alias -Name help -Value Get-Help
Now invoke the alias.
help Get-WmiObject -Detailed
You will see the following output.
NAME
... | [
{
"code": null,
"e": 2110,
"s": 2034,
"text": "PowerShell alias is another name for the cmdlet or for any command element."
},
{
"code": null,
"e": 2221,
"s": 2110,
"text": "Use New-Alias cmdlet to create a alias. In the below example, we've created an alias help for Get-Help cmd... |
strrchr() function in C/C++ - GeeksforGeeks | 12 Oct, 2021
strrchr() function In C++, strrchr() is a predefined function used for string handling. cstring is the header file required for string functions.This function returns a pointer to the last occurrence of a character in a string. The character whose last occurrence we want to find is passed as the second arg... | [
{
"code": null,
"e": 26962,
"s": 26934,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 27403,
"s": 26962,
"text": "strrchr() function In C++, strrchr() is a predefined function used for string handling. cstring is the header file required for string functions.This function retu... |
Building a Logistic Regression in Python | by Animesh Agarwal | Towards Data Science | Suppose you are given the scores of two exams for various applicants and the objective is to classify the applicants into two categories based on their scores i.e, into Class-1 if the applicant can be admitted to the university or into Class-0 if the candidate can’t be given admission. Can this problem be solved using ... | [
{
"code": null,
"e": 524,
"s": 172,
"text": "Suppose you are given the scores of two exams for various applicants and the objective is to classify the applicants into two categories based on their scores i.e, into Class-1 if the applicant can be admitted to the university or into Class-0 if the cand... |
Rexx - left String | This method returns a certain number of characters from the left of the string.
left(str,count)
str − The source string.
str − The source string.
count − The number of characters to return from the left of the string.
count − The number of characters to return from the left of the string.
This method returns a certai... | [
{
"code": null,
"e": 2419,
"s": 2339,
"text": "This method returns a certain number of characters from the left of the string."
},
{
"code": null,
"e": 2437,
"s": 2419,
"text": "left(str,count) \n"
},
{
"code": null,
"e": 2462,
"s": 2437,
"text": "str − The so... |
Prettifying pandas DataFrames. Enhance your DataFrames by... | by Zolzaya Luvsandorj | Towards Data Science | Did you know that we can prettify pandas DataFrames by accessing the .style attribute? Here’s an example where we styled a DataFrame such that it resembles a heatmap:
After styling, it looks more obvious and intuitive to see positive and negative correlations as well as the strength of correlations. By colour-coding, w... | [
{
"code": null,
"e": 338,
"s": 171,
"text": "Did you know that we can prettify pandas DataFrames by accessing the .style attribute? Here’s an example where we styled a DataFrame such that it resembles a heatmap:"
},
{
"code": null,
"e": 620,
"s": 338,
"text": "After styling, it l... |
Clustering the US population: observation-weighted k-means | by Carl Anderson | Towards Data Science | Thanks to Chris Decker who provided the following info:
For anyone discovering this post in recent years: scikit learn implemented a ‘sample_weight’ parameter into KMeans as of 0.20.0 in 2018. No need to roll your own anymore.
— — — — — -In this post, I detail a form of k-means clustering in which weights are associate... | [
{
"code": null,
"e": 228,
"s": 172,
"text": "Thanks to Chris Decker who provided the following info:"
},
{
"code": null,
"e": 399,
"s": 228,
"text": "For anyone discovering this post in recent years: scikit learn implemented a ‘sample_weight’ parameter into KMeans as of 0.20.0 in... |
AWS SageMaker. Build, Train, Tune, and Deploy a ML... | by Vysakh Nair | Towards Data Science | Let’s start with a short and simple introduction to SageMaker and understand what it is that we are working with and later we’ll dive into the ML tutorial!
Amazon SageMaker is a cloud machine-learning platform{just like your jupyter notebook environment :) but on the cloud} that helps users in building, training, tunin... | [
{
"code": null,
"e": 328,
"s": 172,
"text": "Let’s start with a short and simple introduction to SageMaker and understand what it is that we are working with and later we’ll dive into the ML tutorial!"
},
{
"code": null,
"e": 574,
"s": 328,
"text": "Amazon SageMaker is a cloud ma... |
How to Update multiple documents in a MongoDB collection using Java? | Using the updateMany() method you can update all the documents of a collection.
db.COLLECTION_NAME.update(<filter>, <update>)
In Java the com.mongodb.client.MongoCollection interface provides you a method with the same name. Using this method you can update multiple documents in a
collection at once, to this method you... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "Using the updateMany() method you can update all the documents of a collection."
},
{
"code": null,
"e": 1188,
"s": 1142,
"text": "db.COLLECTION_NAME.update(<filter>, <update>)"
},
{
"code": null,
"e": 1434,
"s": 1188... |
React Native - ListView | In this chapter, we will show you how to create a list in React Native. We will import List in our Home component and show it on screen.
App.js
import React from 'react'
import List from './List.js'
const App = () => {
return (
<List />
)
}
export default App
To create a list, we will use the map() method.... | [
{
"code": null,
"e": 2481,
"s": 2344,
"text": "In this chapter, we will show you how to create a list in React Native. We will import List in our Home component and show it on screen."
},
{
"code": null,
"e": 2488,
"s": 2481,
"text": "App.js"
},
{
"code": null,
"e": 2... |
Predicting Battery Lifetime with CNNs | by Hannes Knobloch | Towards Data Science | This article was written by Hannes Knobloch, Adem Frenk, and Wendy Chang.You can find the source code of this project on GitHub:
github.com
Lithium-ion batteries power almost every electronic device in our lives, including phones and laptops. They’re at the heart of renewable energy and e-mobility. For years companies ... | [
{
"code": null,
"e": 301,
"s": 172,
"text": "This article was written by Hannes Knobloch, Adem Frenk, and Wendy Chang.You can find the source code of this project on GitHub:"
},
{
"code": null,
"e": 312,
"s": 301,
"text": "github.com"
},
{
"code": null,
"e": 672,
... |
Count of only repeated element in a sorted array of consecutive elements in C++ | We are given an array of consecutive numbers of length n. The array has only one number which is repeated more than once. The goal is to get the number of times that element is repeated in the array. Or we can say find the length of a repeated element in the array.
We will traverse the array from i=0 to i<n. If any arr... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "We are given an array of consecutive numbers of length n. The array has only one number which is repeated more than once. The goal is to get the number of times that element is repeated in the array. Or we can say find the length of a repeated element i... |
Scaffold in Android using Jetpack Compose | 28 Jul, 2021
There are a lot of apps that contain TopAppBar, Drawer, Floating Action Button, BottomAppBar (in the form of bottom navigation), Snackbar. While you can individually set up all of these in an app but takes a lot of setups. Jetpack Compose provides Scaffold Composable which can save a lot of time. It’s like... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 579,
"s": 53,
"text": "There are a lot of apps that contain TopAppBar, Drawer, Floating Action Button, BottomAppBar (in the form of bottom navigation), Snackbar. While you can individually set up a... |
Convert Date to XMLGregorianCalendar in Java | 30 Jun, 2021
XML Gregorian Calendar: The rules for specifying dates in XML format are defined in the XML Schema standard. The Java XMLGregorianCalendar class, introduced in Java 1.5, is a representation of the W3C XML Schema 1.0 date/time datatypes and is required to use the XML format.
In this approach, we have first... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 304,
"s": 28,
"text": "XML Gregorian Calendar: The rules for specifying dates in XML format are defined in the XML Schema standard. The Java XMLGregorianCalendar class, introduced in Java 1.5, is a ... |
Python | Empty String to None Conversion | 30 Jan, 2020
Sometimes, while working with Machine Learning, we can encounter empty strings and we wish to convert to the None 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 task c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 300,
"s": 28,
"text": "Sometimes, while working with Machine Learning, we can encounter empty strings and we wish to convert to the None for data consistency. This and many other utilities can requi... |
How to select an element by its class name in AngularJS ? | 14 Oct, 2020
Given an HTML document and the task is to select an element by its className using AngularJS.
Approach: The approach is to use the document.querySelector() method to get the element of a particular className. In the first example the element of className class1 is selected and its background color is chang... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 122,
"s": 28,
"text": "Given an HTML document and the task is to select an element by its className using AngularJS."
},
{
"code": null,
"e": 441,
"s": 122,
"text": "Approach: Th... |
PyTorch – How to compute the inverse of a square matrix? | To compute the inverse of a square matrix, we could apply torch.linalg.inv() method. It returns a new tensor with inverse of the given matrix. It accepts a square matrix, a batch of square matrices, and also batches of square matrices.
A matrix is a 2D torch Tensor. It supports input of float, double, cfloat, and cdoub... | [
{
"code": null,
"e": 1423,
"s": 1187,
"text": "To compute the inverse of a square matrix, we could apply torch.linalg.inv() method. It returns a new tensor with inverse of the given matrix. It accepts a square matrix, a batch of square matrices, and also batches of square matrices."
},
{
"co... |
Moment.js isMoment() Function | 29 Jul, 2020
It is used to check whether a variable is a particular moment or not in Moment.js using the isMoment() function that checks if a variable is a moment object, use moment.isMoment().
Syntax:
moment.isMoment(obj);
Parameter: Object
Returns: True or False
Installation of moment module:
You can visit the link t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2020"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "It is used to check whether a variable is a particular moment or not in Moment.js using the isMoment() function that checks if a variable is a moment object, use moment.isMome... |
How to switch between multiple CSS stylesheets using JavaScript ? | 21 Jul, 2020
Many websites on the internet are available in multiple themes. One can obtain any feature by making multiple stylesheets into the HTML code and enabling one at a time. A CSS file is included into the HTML in the <head> tag using the <link> tag.
<link id="theme" rel="stylesheet" type="text/css" href="light... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jul, 2020"
},
{
"code": null,
"e": 298,
"s": 52,
"text": "Many websites on the internet are available in multiple themes. One can obtain any feature by making multiple stylesheets into the HTML code and enabling one at a time. A CSS... |
Program to check Strong Number | 12 Jun, 2022
Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number, check if it is a Strong Number or not.Examples:
Input : n = 145
Output : Yes
Sum of digit factorials = 1! + 4! + 5!
= 1 + 24 + 120
= 145
Input... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 215,
"s": 52,
"text": "Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number, check if it is a Strong Number or not.Examples: "
},
{
... |
Stack setSize() method in Java with Example | 24 Dec, 2018
The setSize() method of Java.util.Stack class changes the size of this Stack instance to the size passed as the parameter.
Syntax:
public void setSize(int size)
Parameters: This method takes the new size as a parameter.
Exception: This method throws ArrayIndexOutOfBoundsException if the new size is negativ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 151,
"s": 28,
"text": "The setSize() method of Java.util.Stack class changes the size of this Stack instance to the size passed as the parameter."
},
{
"code": null,
"e": 159,
"s": 1... |
Python program to find the sum of Characters ascii values in String List | 11 Dec, 2020
Given the string list, the task is to write a Python program to compute the summation value of each character’s ASCII value.
Examples:
Input : test_list = [“geeksforgeeks”, “teaches”, “discipline”] Output : [133, 61, 100] Explanation : Positional character summed to get required values.
Input : test_list =... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 153,
"s": 28,
"text": "Given the string list, the task is to write a Python program to compute the summation value of each character’s ASCII value."
},
{
"code": null,
"e": 163,
"s":... |
Java.util.Random class in Java | 07 May, 2019
Random class is used to generate pseudo-random numbers in java. An instance of this class is thread-safe. The instance of this class is however cryptographically insecure. This class provides various method calls to generate different random data types such as float, double, int.
Constructors:
Random(): Cr... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 May, 2019"
},
{
"code": null,
"e": 333,
"s": 52,
"text": "Random class is used to generate pseudo-random numbers in java. An instance of this class is thread-safe. The instance of this class is however cryptographically insecure. Th... |
How to get the powers of an array values element-wise in Python-Pandas? | 18 Aug, 2020
Let’s see how to get the powers of an array values element-wise. Dataframe/Series.pow() is used to calculate the power of elements either with itself or with other Series provided. This function is applicable for real numbers only, and doesn’t give results for complex numbers. So let’s see the programs:
Ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "Let’s see how to get the powers of an array values element-wise. Dataframe/Series.pow() is used to calculate the power of elements either with itself or with other Series prov... |
Sqoop - Export | This chapter describes how to export data back from the HDFS to the RDBMS database. The target table must exist in the target database. The files which are given as input to the Sqoop contain records, which are called rows in table. Those are read and parsed into a set of records and delimited with user-specified delim... | [
{
"code": null,
"e": 2247,
"s": 1921,
"text": "This chapter describes how to export data back from the HDFS to the RDBMS database. The target table must exist in the target database. The files which are given as input to the Sqoop contain records, which are called rows in table. Those are read and p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.