title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
New Time Series Forecasting with PyCaret! | Towards Data Science
IntroductionSetting Up, Comparing, Tuning, and Blending ModelsProductionalize ModelSummaryReferences Introduction Setting Up, Comparing, Tuning, and Blending Models Productionalize Model Summary References To be frank, even though it seems simple, time-series algorithms are usually difficult to deal with. PyCaret [2] a...
[ { "code": null, "e": 273, "s": 172, "text": "IntroductionSetting Up, Comparing, Tuning, and Blending ModelsProductionalize ModelSummaryReferences" }, { "code": null, "e": 286, "s": 273, "text": "Introduction" }, { "code": null, "e": 337, "s": 286, "text": "Set...
Debugging Jupyter Notebooks Will Boost Your Productivity | by Eyal Trabelsi | Towards Data Science
We all encounter bugs in our code while developing programs, logging is a great way to debug our code and probably the most intuitive one. A normal way to do that is to add the print statement in your code which helps us track down the source of many issues. import randomdef find_max (values): max = 0 print(f”Initi...
[ { "code": null, "e": 431, "s": 172, "text": "We all encounter bugs in our code while developing programs, logging is a great way to debug our code and probably the most intuitive one. A normal way to do that is to add the print statement in your code which helps us track down the source of many issu...
How to remove rows that contains all zeros in an R data frame?
Often, we get missing data and sometimes missing data is filled with zeros if zero is not the actual range for a variable. In this type of situations, we can remove the rows where all the values are zero. For this purpose, we can use rowSums function and if the sum is greater than zero then keep the row otherwise negle...
[ { "code": null, "e": 1389, "s": 1062, "text": "Often, we get missing data and sometimes missing data is filled with zeros if zero is not the actual range for a variable. In this type of situations, we can remove the rows where all the values are zero. For this purpose, we can use rowSums function an...
C++ program to generate random number - GeeksforGeeks
03 Jan, 2018 The below implementation is to generate random number from 1 to given limit. The below function produces behavior similar to srand() function. Prerequisite : random header in C++ | Set 1(Generators) // C++ program to generate random number#include <bits/stdc++.h>using namespace std; // Function with retur...
[ { "code": null, "e": 24122, "s": 24094, "text": "\n03 Jan, 2018" }, { "code": null, "e": 24265, "s": 24122, "text": "The below implementation is to generate random number from 1 to given limit. The below function produces behavior similar to srand() function." }, { "code"...
How to Predict Imbalanced Classes in Python | Towards Data Science
By a curious twist of fate, the amount of time I generally spend on classification problems is much more than that on regression problems. And as luck would have it, I get to work with imbalanced datasets more often than not. Perhaps this is because my day job involves prediction and analysis of credit risk, probabilit...
[ { "code": null, "e": 529, "s": 172, "text": "By a curious twist of fate, the amount of time I generally spend on classification problems is much more than that on regression problems. And as luck would have it, I get to work with imbalanced datasets more often than not. Perhaps this is because my da...
C++ Program for dot product and cross product of two vectors
We are given two vectors let’s say vector A and vector B containing x, y, and directions, and the task is to find the cross product and dot product of the two given vector arrays. What is a vector? In mathematics, a quantity that has a magnitude and a direction is known as a vector whereas a quantity that has only one ...
[ { "code": null, "e": 1242, "s": 1062, "text": "We are given two vectors let’s say vector A and vector B containing x, y, and directions, and the task is to find the cross product and dot product of the two given vector arrays." }, { "code": null, "e": 1260, "s": 1242, "text": "Wh...
Artificial Neural Network Using PySpark | by Somesh Routray | Towards Data Science
Introduction:This is a continuation of the Pyspark blog series. Previously I’ve shared the implementation of a basic Linear Regression using PySpark.In this blog, I’ll be showing another interesting implementation of a neural network using PySpark for a binary class prediction use-case. This blog will not be having lot...
[ { "code": null, "e": 1010, "s": 172, "text": "Introduction:This is a continuation of the Pyspark blog series. Previously I’ve shared the implementation of a basic Linear Regression using PySpark.In this blog, I’ll be showing another interesting implementation of a neural network using PySpark for a ...
LinkedList addFirst() Method in Java - GeeksforGeeks
10 Dec, 2018 The java.util.LinkedList.addFirst() method in Java is used to insert a specific element at the beginning of a LinkedList. Syntax: void addFirst(Object element) Parameters: This function accepts a single parameter element as shown in the above syntax. The element specified by this parameter is appended at ...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n10 Dec, 2018" }, { "code": null, "e": 23679, "s": 23557, "text": "The java.util.LinkedList.addFirst() method in Java is used to insert a specific element at the beginning of a LinkedList." }, { "code": null, "e": 2368...
C program to find sum, max and min with Variadic functions
Suppose we want to make some functions that can take multiple arguments, there are no fixed number of arguments. We want to make three functions sum(), max() and min(), they can calculate sum of the numbers, maximum of numbers and minimum of given numbers respectively. Each of these functions will take number of argume...
[ { "code": null, "e": 1711, "s": 1062, "text": "Suppose we want to make some functions that can take multiple arguments, there are no fixed number of arguments. We want to make three functions sum(), max() and min(), they can calculate sum of the numbers, maximum of numbers and minimum of given numbe...
Compute cartesian product of elements in an array in JavaScript
The Cartesian product of two sets (arrays) A and B, denoted A × B, is the set (array) of all ordered pairs (a, b) where a is in A and b is in B. In simpler terms, a cartesian product of two arrays is a permutation of all possible arrays of two elements whose first element belongs to the first array and the second eleme...
[ { "code": null, "e": 1207, "s": 1062, "text": "The Cartesian product of two sets (arrays) A and B, denoted A × B, is the set (array) of all ordered pairs (a, b) where a is in A and b is in B." }, { "code": null, "e": 1414, "s": 1207, "text": "In simpler terms, a cartesian product...
Error Handling in Perl - GeeksforGeeks
11 Nov, 2021 Error Handling in Perl is the process of taking appropriate action against a program that causes difficulty in execution because of some error in the code or the compiler. Processes are prone to errors. For example, if opening a file that does not exist raises an error, or accessing a variable that has not...
[ { "code": null, "e": 23679, "s": 23651, "text": "\n11 Nov, 2021" }, { "code": null, "e": 24239, "s": 23679, "text": "Error Handling in Perl is the process of taking appropriate action against a program that causes difficulty in execution because of some error in the code or the c...
Digit recognizer using CNN. I build a simple Convolutional Neural... | by Nischal Madiraju | Towards Data Science
Dataset: MNIST (“Modified National Institute of Standards and Technology”) is the de facto “Hello World” dataset of computer vision. Since its release in 1999, this classic dataset of handwritten images has served as the basis for benchmarking classification algorithms. As new machine learning techniques emerge, MNIST ...
[ { "code": null, "e": 181, "s": 172, "text": "Dataset:" }, { "code": null, "e": 556, "s": 181, "text": "MNIST (“Modified National Institute of Standards and Technology”) is the de facto “Hello World” dataset of computer vision. Since its release in 1999, this classic dataset of ha...
Substring Matching of Test Names
To execute the tests containing a string in its name we can use the following syntax − pytest -k <substring> -v -k <substring> represents the substring to search for in the test names. Now, run the following command − pytest -k great -v This will execute all the test names having the word ‘great’ in its name. In this...
[ { "code": null, "e": 2129, "s": 2042, "text": "To execute the tests containing a string in its name we can use the following syntax −" }, { "code": null, "e": 2155, "s": 2129, "text": "pytest -k <substring> -v\n" }, { "code": null, "e": 2228, "s": 2155, "text"...
Find and return array positions of multiple values JavaScript
We have to write a function, say findPositions() that takes in two arrays as argument. And it should return an array of the indices of all the elements of the second array present in the first array. For example − If the first array is [‘john’, ‘doe’, ‘chris’, ‘snow’, ‘john’, ‘chris’], And the second array is [‘john’, ...
[ { "code": null, "e": 1262, "s": 1062, "text": "We have to write a function, say findPositions() that takes in two arrays as argument.\nAnd it should return an array of the indices of all the elements of the second array present in the\nfirst array." }, { "code": null, "e": 1276, "s":...
JSP - Security
JavaServer Pages and servlets make several mechanisms available to Web developers to secure applications. Resources are protected declaratively by identifying them in the application deployment descriptor and assigning a role to them. Several levels of authentication are available, ranging from basic authentication usi...
[ { "code": null, "e": 2474, "s": 2239, "text": "JavaServer Pages and servlets make several mechanisms available to Web developers to secure applications. Resources are protected declaratively by identifying them in the application deployment descriptor and assigning a role to them." }, { "cod...
JDBC - Create Table Example
This chapter provides an example on how to create a table using JDBC application. Before executing the following example, make sure you have the following in place − To execute the following example you can replace the username and password with your actual user name and password. To execute the following example you c...
[ { "code": null, "e": 2328, "s": 2162, "text": "This chapter provides an example on how to create a table using JDBC application. Before executing the following example, make sure you have the following in place −" }, { "code": null, "e": 2444, "s": 2328, "text": "To execute the f...
How to Connect to JupyterLab Remotely | by Luke Gloege, Ph.D. | Towards Data Science
Jupyterlab is a web-based interactive development environment (IDE) for Jupyter notebooks, code, and data. Connecting and running Jupyterlab from a laptop is straightforward. You simply type jupyter lab into your terminal and Jupyterlab will open in your browser, with the Notebook server running in your terminal. What ...
[ { "code": null, "e": 486, "s": 171, "text": "Jupyterlab is a web-based interactive development environment (IDE) for Jupyter notebooks, code, and data. Connecting and running Jupyterlab from a laptop is straightforward. You simply type jupyter lab into your terminal and Jupyterlab will open in your ...
Convert array into Zig-Zag fashion | Practice | GeeksforGeeks
Given an array Arr (distinct elements) of size N. Rearrange the elements of array in zig-zag fashion. The converted array should be in form a < b > c < d > e < f. The relative order of elements is same in the output i.e you have to iterate on the original array only. Example 1: Input: N = 7 Arr[] = {4, 3, 7, 8, 6, 2, 1...
[ { "code": null, "e": 506, "s": 238, "text": "Given an array Arr (distinct elements) of size N. Rearrange the elements of array in zig-zag fashion. The converted array should be in form a < b > c < d > e < f. The relative order of elements is same in the output i.e you have to iterate on the original...
Euler Method for solving differential equation in C++
In this problem, we are given a differential equation f(x, y) = dy/dx with initial value y(x0) = y0. Our task is to find the solution of the equation using the Euler method for solving differential equations. Euler method also known as forward euler Method is a first order numerical procedure to find the solution of th...
[ { "code": null, "e": 1271, "s": 1062, "text": "In this problem, we are given a differential equation f(x, y) = dy/dx with initial value y(x0) = y0. Our task is to find the solution of the equation using the Euler method for solving differential equations." }, { "code": null, "e": 1443, ...
Microsoft Expression Web - Video
In this chapter, we will learn how to add videos to the website and which formats are supported in Expression Web. With the help of videos, you can easily attract the attention of potential customers to your company's products or services. Microsoft Expression Web is a web design tool that simplifies the process of add...
[ { "code": null, "e": 2436, "s": 2196, "text": "In this chapter, we will learn how to add videos to the website and which formats are supported in Expression Web. With the help of videos, you can easily attract the attention of potential customers to your company's products or services." }, { ...
Modifying prototypes in JavaScript
Following is the code for modifying prototypes in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif...
[ { "code": null, "e": 1125, "s": 1062, "text": "Following is the code for modifying prototypes in JavaScript −" }, { "code": null, "e": 1136, "s": 1125, "text": " Live Demo" }, { "code": null, "e": 2651, "s": 1136, "text": "<!DOCTYPE html>\n<html lang=\"en\">\n...
PHP - Loop Types
Loops in PHP are used to execute the same block of code a specified number of times. PHP supports following four loop types. for − loops through a block of code a specified number of times. for − loops through a block of code a specified number of times. while − loops through a block of code if and as long as a specifi...
[ { "code": null, "e": 2882, "s": 2757, "text": "Loops in PHP are used to execute the same block of code a specified number of times. PHP supports following four loop types." }, { "code": null, "e": 2947, "s": 2882, "text": "for − loops through a block of code a specified number of...
What is the difference between method hiding and method overriding in Java?
When super class and the sub class contains same instance methods including parameters, when called, the super class method is overridden by the method of the sub class. WIn this example super class and sub class have methods with same signature (method name and parameters) and when we try to invoke this method from th...
[ { "code": null, "e": 1232, "s": 1062, "text": "When super class and the sub class contains same instance methods including parameters, when called, the super class method is overridden by the method of the sub class." }, { "code": null, "e": 1470, "s": 1232, "text": "WIn this exa...
How to plot a Pandas Dataframe with Matplotlib?
We can plot Line Graph, Pie Chart, Histogram, etc. with a Pandas DataFrame using Matplotlib. For this, we need to import Pandas and Matplotlib libraries − import pandas as pd import matplotlib.pyplot as plt Let us begin plotting − Following is the code − import pandas as pd import matplotlib.pyplot as plt # creating a...
[ { "code": null, "e": 1217, "s": 1062, "text": "We can plot Line Graph, Pie Chart, Histogram, etc. with a Pandas DataFrame using Matplotlib. For this, we need to import Pandas and Matplotlib libraries −" }, { "code": null, "e": 1269, "s": 1217, "text": "import pandas as pd\nimport...
Print anagrams together in Python using List and Dictionary
In this tutorial, we are going to write a program which finds and prints anagrams using list and dictionary. We have different approaches to every problem. Try to write code without following the tutorial. If you are not able to generate any ideas to write logic, follow the below steps. 1. Initialize a list of strings....
[ { "code": null, "e": 1350, "s": 1062, "text": "In this tutorial, we are going to write a program which finds and prints anagrams using list and dictionary. We have different approaches to every problem. Try to write code without following the tutorial. If you are not able to generate any ideas to wr...
JAVA Character Class \p{javaWhitespace}
The character class \p{javaWhitespace} matches any whitespace character. The following example shows the usage of JAVA character class matching. package com.tutorialspoint; import java.util.regex.Matcher; import java.util.regex.Pattern; public class JavaCharacterClassDemo { private static final String REGEX = "\\p...
[ { "code": null, "e": 2197, "s": 2124, "text": "The character class \\p{javaWhitespace} matches any whitespace character." }, { "code": null, "e": 2269, "s": 2197, "text": "The following example shows the usage of JAVA character class matching." }, { "code": null, "e":...
How to get file extension of file as a result of MySQL query?
In order to get file extension of file as a result of SQL query, you can use SUBSTRING_INDEX(). The syntax is as follows select substring_index(yourColumnName,'.',-1) as anyAliasName from yourTableName; To understand the above syntax, let us create a table. The query to create a table is as follows mysql> create table ...
[ { "code": null, "e": 1158, "s": 1062, "text": "In order to get file extension of file as a result of SQL query, you can use SUBSTRING_INDEX()." }, { "code": null, "e": 1183, "s": 1158, "text": "The syntax is as follows" }, { "code": null, "e": 1265, "s": 1183, ...
How to send data from one Fragment to another Fragment in Android?
This example demonstrates how do I set the Android permission on a folder/file on SD Card to be able to write to it. 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 ver...
[ { "code": null, "e": 1179, "s": 1062, "text": "This example demonstrates how do I set the Android permission on a folder/file on SD Card to be able to write to it." }, { "code": null, "e": 1308, "s": 1179, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New...
Web - Basic Concepts
The Internet is essentially a global network of computing resources. You can think of the Internet as a physical collection of routers and circuits as a set of shared resources. Some common definitions given in the past include − A network of networks based on the TCP/IP communications protocol. A community of people w...
[ { "code": null, "e": 2095, "s": 1917, "text": "The Internet is essentially a global network of computing resources. You can think of the Internet as a physical collection of routers and circuits as a set of shared resources." }, { "code": null, "e": 2147, "s": 2095, "text": "Some...
Can LSTM be used to Forecast the Number of Sunspots? | by Ethan Johnson-Skinner, MSc | Towards Data Science
Firstly: what is a sunspot? Sunspots are a temporary phenomena on the Sun’s photosphere that appear darker than the surrounding areas. The reason why I have selected the sunspots dataset for time series analysis is sunspots appear on an 11-year solar cycle, meaning we should expect to see a seasonality component to the...
[ { "code": null, "e": 475, "s": 46, "text": "Firstly: what is a sunspot? Sunspots are a temporary phenomena on the Sun’s photosphere that appear darker than the surrounding areas. The reason why I have selected the sunspots dataset for time series analysis is sunspots appear on an 11-year solar cycle...
Rexx - Subroutines
In any programming language, the entire program is broken into logical modules. This makes it easier to write code that can be maintained easily. This is a basic requirement for any programming language. In Rexx, modules can be written using Subroutines and functions. Let’s look at the subroutines in detail. The syntax...
[ { "code": null, "e": 2543, "s": 2339, "text": "In any programming language, the entire program is broken into logical modules. This makes it easier to write code that can be maintained easily. This is a basic requirement for any programming language." }, { "code": null, "e": 2649, "s...
D3.js | Path.rect() Function - GeeksforGeeks
16 Jun, 2020 D3.js is a library in Javascript, this library is mostly used for making of graph and visualizing data on the HTML SVG elements. D3 stands for Data Driven Documents and mostly used for data visualization. The Path.rect() is used to make a rectangle in a svg element. Syntax: Path.rect(x, y, w, h); Parameter...
[ { "code": null, "e": 24290, "s": 24262, "text": "\n16 Jun, 2020" }, { "code": null, "e": 24557, "s": 24290, "text": "D3.js is a library in Javascript, this library is mostly used for making of graph and visualizing data on the HTML SVG elements. D3 stands for Data Driven Document...
Linear Discriminant Analysis In Python | by Cory Maklin | Towards Data Science
Linear Discriminant Analysis (LDA) is a dimensionality reduction technique. As the name implies dimensionality reduction techniques reduce the number of dimensions (i.e. variables) in a dataset while retaining as much information as possible. For instance, suppose that we plotted the relationship between two variables ...
[ { "code": null, "e": 537, "s": 171, "text": "Linear Discriminant Analysis (LDA) is a dimensionality reduction technique. As the name implies dimensionality reduction techniques reduce the number of dimensions (i.e. variables) in a dataset while retaining as much information as possible. For instance...
Difference between "grid" and "pack" geometry managers in Tkinter
In order to view the widgets on the screen, we have to first associate each and every widget with the geometry manager. There are three ways in which we can view our widgets in the application. The Grid and Pack geometry manager are mostly used in many applications. The Pack geometry manager is one of the simplest geom...
[ { "code": null, "e": 1329, "s": 1062, "text": "In order to view the widgets on the screen, we have to first associate each and every widget with the geometry manager. There are three ways in which we can view our widgets in the application. The Grid and Pack geometry manager are mostly used in many ...
Recursive Program to find Factorial of a large number - GeeksforGeeks
22 Dec, 2021 Given a large number N, task is to find the factorial of N using recursion. Factorial of a non-negative integer is the multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is 720. Examples: Input : N = 100Output : 933262154439441526816992388562667004-9...
[ { "code": null, "e": 24766, "s": 24735, "text": " \n22 Dec, 2021\n" }, { "code": null, "e": 24842, "s": 24766, "text": "Given a large number N, task is to find the factorial of N using recursion." }, { "code": null, "e": 25000, "s": 24842, "text": "Factorial o...
Write a C program to convert uppercase to lowercase letters without using string convert function
Before going to know about how to convert upper case to lower case letters without string convert function. Let us have a look on program to convert upper to lower using convert function, then you will get a clarity on what we are doing in the program − #include <stdio.h> #include <string.h> int main(){ char string[...
[ { "code": null, "e": 1170, "s": 1062, "text": "Before going to know about how to convert upper case to lower case letters without string convert function." }, { "code": null, "e": 1316, "s": 1170, "text": "Let us have a look on program to convert upper to lower using convert func...
DAX Text - SUBSTITUTE function
Replaces the existing text with a new text in a text string. SUBSTITUTE (<text>, <old_text>, <new_text>, <instance_num>) text The text in which you want to substitute the existing text with a new text, or a reference to a column containing text. old_text The existing text that you want to replace. new_text The text y...
[ { "code": null, "e": 2062, "s": 2001, "text": "Replaces the existing text with a new text in a text string." }, { "code": null, "e": 2124, "s": 2062, "text": "SUBSTITUTE (<text>, <old_text>, <new_text>, <instance_num>) \n" }, { "code": null, "e": 2129, "s": 2124, ...
C++ program to print all Even and Odd numbers from 1 to N - GeeksforGeeks
16 Dec, 2019 Given a number N, the task is to print N even numbers and N odd numbers from 1. Examples: Input: N = 5 Output: Even: 2 4 6 8 10 Odd: 1 3 5 7 9 Input: N = 3 Output: Even: 2 4 6 Odd: 1 3 5 Approach: For Even numbers:Even number are numbers that are divisible by 2.To print even numbers from 1 to N, traver...
[ { "code": null, "e": 24122, "s": 24094, "text": "\n16 Dec, 2019" }, { "code": null, "e": 24202, "s": 24122, "text": "Given a number N, the task is to print N even numbers and N odd numbers from 1." }, { "code": null, "e": 24212, "s": 24202, "text": "Examples:"...
TensorFlow - Optimizers
Optimizers are the extended class, which include added information to train a specific model. The optimizer class is initialized with given parameters but it is important to remember that no Tensor is needed. The optimizers are used for improving speed and performance for training a specific model. The basic optimizer ...
[ { "code": null, "e": 2615, "s": 2315, "text": "Optimizers are the extended class, which include added information to train a specific model. The optimizer class is initialized with given parameters but it is important to remember that no Tensor is needed. The optimizers are used for improving speed ...
Sorting collection of String and StringBuffer in Java - GeeksforGeeks
09 Nov, 2020 Sorting a collection of objects can be done in two ways: By implementing Comparable (Natural Order) e.g. Strings are sorted ASCIIbetically. meaning B comes before A and 10 is before 2. By implementing Comparator (Custom order) and it can be in any order. Using Collections.sort() method of Collections util...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n09 Nov, 2020" }, { "code": null, "e": 24006, "s": 23948, "text": "Sorting a collection of objects can be done in two ways: " }, { "code": null, "e": 24134, "s": 24006, "text": "By implementing Comparable (Natu...
Is it possible to create static constructor in java?
A constructor is used to initialize an object when it is created. It is syntactically similar to a method. The difference is that the constructors have same name as their class and, have no return type. There is no need to invoke constructors explicitly these are automatically invoked at the time of instantiation. No, ...
[ { "code": null, "e": 1265, "s": 1062, "text": "A constructor is used to initialize an object when it is created. It is syntactically similar to a method. The difference is that the constructors have same name as their class and, have no return type." }, { "code": null, "e": 1378, "s"...
JavaScript Math random() Method - GeeksforGeeks
09 Feb, 2022 Below is the example of the Math random() Method. Example: For getting a random number between 0(inclusive) and 1(exclusive).<script type="text/javascript"> var random = Math.random( ); document.write("Random Number Generated : " + random ); </script> <script type="text/javascript"> var random = M...
[ { "code": null, "e": 30084, "s": 30056, "text": "\n09 Feb, 2022" }, { "code": null, "e": 30134, "s": 30084, "text": "Below is the example of the Math random() Method." }, { "code": null, "e": 30342, "s": 30134, "text": "Example: For getting a random number bet...
Python Tweepy – Getting the description of a user - GeeksforGeeks
18 Jun, 2020 In this article we will see how we can get the description of a user. The description of the describes a user account. The description attribute is optional and is Nullable. Identifying the description in the GUI : In the above mentioned profile the description is : Your one-stop destination to attain Codi...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n18 Jun, 2020" }, { "code": null, "e": 24466, "s": 24292, "text": "In this article we will see how we can get the description of a user. The description of the describes a user account. The description attribute is optional and is...
SQLAlchemy Core - Using Functions
Some of the important functions used in SQLAlchemy are discussed in this chapter. Standard SQL has recommended many functions which are implemented by most dialects. They return a single value based on the arguments passed to it. Some SQL functions take columns as arguments whereas some are generic. Thefunc keyword in ...
[ { "code": null, "e": 2422, "s": 2340, "text": "Some of the important functions used in SQLAlchemy are discussed in this chapter." }, { "code": null, "e": 2712, "s": 2422, "text": "Standard SQL has recommended many functions which are implemented by most dialects. They return a si...
Take screenshot of full page with Selenium Python with chromedriver.
We can take a screenshot of a full page with Selenium webdriver in Python with chromedriver. First of all, we shall obtain the original window size with the get_window_size method. Then with the help of JavaScript Executor we shall fetch the complete height and width of the page which is opened on the browser. Then set...
[ { "code": null, "e": 1243, "s": 1062, "text": "We can take a screenshot of a full page with Selenium webdriver in Python with chromedriver. First of all, we shall obtain the original window size with the get_window_size method." }, { "code": null, "e": 1450, "s": 1243, "text": "T...
How to implement MySQL CASE with OR condition?
Here is the syntax of MySQL CASE OR condition SELECT yourColumnName1,.....N , CASE WHEN yourColumnName2=0 or yourColumnName2IS NULL THEN 'yourMessage1' ELSE 'yourMessage2' END AS yourAliasName FROM yourTableName; To understand the above syntax, let us create a table. The query to create a table is as follows mysql> ...
[ { "code": null, "e": 1108, "s": 1062, "text": "Here is the syntax of MySQL CASE OR condition" }, { "code": null, "e": 1278, "s": 1108, "text": "SELECT yourColumnName1,.....N ,\n CASE WHEN yourColumnName2=0 or yourColumnName2IS NULL THEN 'yourMessage1'\nELSE 'yourMessage2'\nEND ...
Date.valueOf() function in JavaScript
The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below. Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields ...
[ { "code": null, "e": 1191, "s": 1062, "text": "The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below." }, { "code": null, "e": 1454, "s": 1191, "text": "Once a Date object is created, a number of methods al...
Find if two people ever meet after same number of jumps - GeeksforGeeks
29 Apr, 2021 Two people start races from two different points p1 and p2. They cover s1 and s2 meters in a jump. Find if they will ever meet at a point after the same number of jumps.Examples: Input : p1 = 6, s1 = 3, p2 = 8, s2 = 2 Output : Yes Explanation: 6->9->12 8->10->12 They meet after two ...
[ { "code": null, "e": 24820, "s": 24792, "text": "\n29 Apr, 2021" }, { "code": null, "e": 25001, "s": 24820, "text": "Two people start races from two different points p1 and p2. They cover s1 and s2 meters in a jump. Find if they will ever meet at a point after the same number of ...
Basics of Ternary plots with Python’s Plotly | by Thiago Carvalho | Towards Data Science
There are plenty of ways to display three variables in a single visualization. Heatmaps and Colormaps rely on encoding the third variable in the color. Bubble charts are Scatter Plots with the third variable encoded in size, and other solutions may introduce a Z-axis and rely on 3-dimensional representations. Ternary p...
[ { "code": null, "e": 483, "s": 172, "text": "There are plenty of ways to display three variables in a single visualization. Heatmaps and Colormaps rely on encoding the third variable in the color. Bubble charts are Scatter Plots with the third variable encoded in size, and other solutions may introd...
Kubernetes - Kubectl Commands
Kubectl controls the Kubernetes Cluster. It is one of the key components of Kubernetes which runs on the workstation on any machine when the setup is done. It has the capability to manage the nodes in the cluster. Kubectl commands are used to interact and manage Kubernetes objects and the cluster. In this chapter, we w...
[ { "code": null, "e": 2409, "s": 2195, "text": "Kubectl controls the Kubernetes Cluster. It is one of the key components of Kubernetes which runs on the workstation on any machine when the setup is done. It has the capability to manage the nodes in the cluster." }, { "code": null, "e": 25...
Convert an Unordered Factor to an Ordered Factor in R Programming - as.ordered() Function - GeeksforGeeks
04 Jun, 2020 as.ordered() function in R Language takes an unordered factor as argument and converts it into an ordered factor. Syntax: as.ordered(factor) Parameters:factor: Unordered Factor to be converted Example 1: # Creating a vector x<-c("North", "North", "East", "West") # Converting vector into factorDirections ...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n04 Jun, 2020" }, { "code": null, "e": 26601, "s": 26487, "text": "as.ordered() function in R Language takes an unordered factor as argument and converts it into an ordered factor." }, { "code": null, "e": 26628, "...
Difference between Multiprocessing and Multithreading - GeeksforGeeks
08 Jun, 2020 Both Multiprocessing and Multithreading are used to increase the computing power of a system. Multiprocessing:Multiprocessing is a system that has more than one or two processors. In Multiprocessing, CPUs are added for increasing computing speed of the system. Because of Multiprocessing, There are many pro...
[ { "code": null, "e": 26141, "s": 26113, "text": "\n08 Jun, 2020" }, { "code": null, "e": 26235, "s": 26141, "text": "Both Multiprocessing and Multithreading are used to increase the computing power of a system." }, { "code": null, "e": 26536, "s": 26235, "text...
How to display the value of each bar in a bar chart using Matplotlib? - GeeksforGeeks
14 Feb, 2022 In this article, we are going to see how to display the value of each bar in a bar chart using Matplotlib. There are two different ways to display the values of each bar in a bar chart in matplotlib – Using matplotlib.axes.Axes.text() function. Use matplotlib.pyplot.text() function. Example 1: Using matplo...
[ { "code": null, "e": 31571, "s": 31543, "text": "\n14 Feb, 2022" }, { "code": null, "e": 31772, "s": 31571, "text": "In this article, we are going to see how to display the value of each bar in a bar chart using Matplotlib. There are two different ways to display the values of ea...
java.nio.Buffer Class in Java - GeeksforGeeks
03 Feb, 2022 The Buffer class provides a buffer or a container for data chunks of specific primitive types. A finite sequence of elements is stored linearly in a buffer. Important properties of a buffer that make it convenient to perform read and write operations in the data are: Capacity: This property determines the ...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n03 Feb, 2022" }, { "code": null, "e": 25382, "s": 25225, "text": "The Buffer class provides a buffer or a container for data chunks of specific primitive types. A finite sequence of elements is stored linearly in a buffer." }, ...
File.GetAttributes() Method in C# with Examples - GeeksforGeeks
26 Feb, 2021 File.GetAttributes(String) is an inbuilt File class method that is used to get the file attributes of the file on the path. File attributes are those certain rights that are either granted or denied. These rights are for a user or for an operating system that accesses the file. These attributes are such as...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n26 Feb, 2021" }, { "code": null, "e": 25896, "s": 25547, "text": "File.GetAttributes(String) is an inbuilt File class method that is used to get the file attributes of the file on the path. File attributes are those certain right...
Sort the given Array after sorting each number individually - GeeksforGeeks
17 Jan, 2022 Given an array arr of size N, the task is to sort the digits of each element in the array and then sort the array in non-decreasing order. Print the array after sorting. Examples: Input: arr[] = {514, 34, 41, 39}Output: 41 43 93 541Explanation: Sorting each element of the array: arr[] = {145, 34, 14, 39}So...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n17 Jan, 2022" }, { "code": null, "e": 26211, "s": 26041, "text": "Given an array arr of size N, the task is to sort the digits of each element in the array and then sort the array in non-decreasing order. Print the array after so...
DateTime.ToUniversalTime() Method in C# - GeeksforGeeks
04 Feb, 2019 This method is used to convert the value of the current DateTime object to Coordinated Universal Time (UTC). Syntax: public DateTime ToUniversalTime (); Return Value: This method returns an object whose Kind property is Utc, and whose value is the UTC equivalent to the value of the current DateTime object,...
[ { "code": null, "e": 25179, "s": 25151, "text": "\n04 Feb, 2019" }, { "code": null, "e": 25288, "s": 25179, "text": "This method is used to convert the value of the current DateTime object to Coordinated Universal Time (UTC)." }, { "code": null, "e": 25332, "s": 2...
Sorting strings from the text file - GeeksforGeeks
24 Nov, 2020 Given a text file “file.txt” that consists of strings, the task is to sort all the strings in alphabetical order in that text file. Approach: The idea is to use the concept of File Handling and a text file(say file.txt) that contains all the strings. Below are the steps: Create the file using fopen() and i...
[ { "code": null, "e": 25877, "s": 25849, "text": "\n24 Nov, 2020" }, { "code": null, "e": 26009, "s": 25877, "text": "Given a text file “file.txt” that consists of strings, the task is to sort all the strings in alphabetical order in that text file." }, { "code": null, ...
Python | Pandas Series.replace() - GeeksforGeeks
10 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.replace() function is used to replac...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n10 Feb, 2019" }, { "code": null, "e": 25794, "s": 25537, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label...
Visitor design pattern - GeeksforGeeks
12 Mar, 2019 Visitor design pattern is one of the behavioral design patterns. It is used when we have to perform an operation on a group of similar kind of Objects. With the help of visitor pattern, we can move the operational logic from the objects to another class. The visitor pattern consists of two parts: a method ...
[ { "code": null, "e": 25567, "s": 25539, "text": "\n12 Mar, 2019" }, { "code": null, "e": 25822, "s": 25567, "text": "Visitor design pattern is one of the behavioral design patterns. It is used when we have to perform an operation on a group of similar kind of Objects. With the he...
Create a Credential file using Python - GeeksforGeeks
07 Oct, 2021 A credential file is nothing but just a configuration file with a tad bit of encryption and an unseen security structure in the backend. There might be a situation where you might come across these kinds of files while using some kind of cloud platforms. All you do to login to the instance or give the scri...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n07 Oct, 2021" }, { "code": null, "e": 26485, "s": 25537, "text": "A credential file is nothing but just a configuration file with a tad bit of encryption and an unseen security structure in the backend. There might be a situation...
Minimum increments or decrements by 1 required to make all array elements in AP - GeeksforGeeks
07 Sep, 2021 Given an array arr[] consisting of N integers, the task is to find the minimum number of increment/decrement by 1 required to be performed on array elements to make all the elements of the given array arr[] in AP. If it is not possible to make the array in AP, then print “-1”. Examples: Input: arr[] = {19,...
[ { "code": null, "e": 26067, "s": 26039, "text": "\n07 Sep, 2021" }, { "code": null, "e": 26345, "s": 26067, "text": "Given an array arr[] consisting of N integers, the task is to find the minimum number of increment/decrement by 1 required to be performed on array elements to mak...
Python | Play a video in reverse mode using OpenCV - GeeksforGeeks
21 Nov, 2021 OpenCV (Open Source Computer Vision) is a computer vision library that contains various functions to perform operations on Images or videos. OpenCV's application areas include : 1) Facial recognition system 2) motion tracking 3) Artificial neural network 4) Deep neural network 5) video streaming etc. ...
[ { "code": null, "e": 25561, "s": 25533, "text": "\n21 Nov, 2021" }, { "code": null, "e": 25704, "s": 25561, "text": "OpenCV (Open Source Computer Vision) is a computer vision library that contains various functions to perform operations on Images or videos. " }, { "code"...
jQuery | contains() Method
14 May, 2020 This contains() method in jQuery is used to check whether a DOM element is a descendant of another DOM element or not. Syntax: jQuery.contains( container, contained ) Parameters: This method accepts two parameters as mentioned above and described below: container: This parameter holds the DOM element that...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 May, 2020" }, { "code": null, "e": 147, "s": 28, "text": "This contains() method in jQuery is used to check whether a DOM element is a descendant of another DOM element or not." }, { "code": null, "e": 155, "s": 147, ...
Value of Pi(Π) up to 50 decimal places
10 Jun, 2021 Given a number N(where N <= 50), the task is to find the value of Pi (Π) up to N decimals places.Examples: Input: N = 2 Output: 3.14Input: N = 10 Output: 3.1415926536 Approach: 1. The value of Π is calculated using acos() function which returns a numeric value between [-Π, Π]. 2. Since using acos(0.0)...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jun, 2021" }, { "code": null, "e": 136, "s": 28, "text": "Given a number N(where N <= 50), the task is to find the value of Pi (Π) up to N decimals places.Examples: " }, { "code": null, "e": 198, "s": 136, "text":...
How to Reverse a String in Golang?
04 May, 2020 Given a string and the task is to reverse the string. Here are a few examples. Approach 1: Reverse the string by swapping the letters, like first with last and second with second last and so on. Example: // Golang program to reverse a stringpackage main // importing fmtimport "fmt" // function, which tak...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 May, 2020" }, { "code": null, "e": 107, "s": 28, "text": "Given a string and the task is to reverse the string. Here are a few examples." }, { "code": null, "e": 223, "s": 107, "text": "Approach 1: Reverse the str...
Timer cancel() method in Java with Examples
29 May, 2019 The cancel() method of Timer class is used to terminate this timer and remove any currently scheduled tasks. Syntax: public void cancel() Parameters: The function does not accepts any parameter. Return Value: The method has no return value. Exception: The function does not throws any exception. Program be...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2019" }, { "code": null, "e": 137, "s": 28, "text": "The cancel() method of Timer class is used to terminate this timer and remove any currently scheduled tasks." }, { "code": null, "e": 145, "s": 137, "text"...
How to find common elements between two Arrays using STL in C++?
26 Apr, 2019 Given two arrays, find common elements between these two arrays using STL in C++. Example: Input: arr1[] = {1, 45, 54, 71, 76, 12}, arr2[] = {1, 7, 5, 4, 6, 12} Output: {1, 12} Input: arr1[] = {1, 7, 5, 4, 6, 12}, arr2[] = {10, 12, 11} Output: {1, 4, 12} Approach: Common elements can be found with th...
[ { "code": null, "e": 54, "s": 26, "text": "\n26 Apr, 2019" }, { "code": null, "e": 136, "s": 54, "text": "Given two arrays, find common elements between these two arrays using STL in C++." }, { "code": null, "e": 145, "s": 136, "text": "Example:" }, { ...
Serialize and Deserialize an N-ary Tree
29 Sep, 2021 Given an N-ary tree where every node has at-most N children. How to serialize and deserialize it? Serialization is to store tree in a file so that it can be later restored. The structure of tree must be maintained. Deserialization is reading tree back from file.This post is mainly an extension of below pos...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Sep, 2021" }, { "code": null, "e": 402, "s": 52, "text": "Given an N-ary tree where every node has at-most N children. How to serialize and deserialize it? Serialization is to store tree in a file so that it can be later restored. T...
lsblk Command in Linux with Examples
27 Sep, 2021 Lsblk is used to display details about block devices and these block devices(Except ram disk) are basically those files that represent devices connected to the pc. It queries /sys virtual file system and udev db to obtain information that it displays. And it basically displays output in a tree-like structu...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 Sep, 2021" }, { "code": null, "e": 427, "s": 53, "text": "Lsblk is used to display details about block devices and these block devices(Except ram disk) are basically those files that represent devices connected to the pc. It queries...
Segmentation Fault (SIGSEGV) vs Bus Error (SIGBUS)
16 Dec, 2021 Segmentation fault(SIGSEGV) and Bus error(SIGBUS) are signals generated when serious program error is detected by the operating system and there is no way the program could continue to execute because of these errors.1) Segmentation Fault (also known as SIGSEGV and is usually signal 11) occur when the prog...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Dec, 2021" }, { "code": null, "e": 2102, "s": 52, "text": "Segmentation fault(SIGSEGV) and Bus error(SIGBUS) are signals generated when serious program error is detected by the operating system and there is no way the program could ...
How to merge the duplicate value in multidimensional array in PHP ?
11 Feb, 2021 To merge the duplicate value in a multidimensional array in PHP, first, create an empty array that will contain the final result. Then we iterate through each element in the array and check for its duplicity by comparing it with other elements. If duplicity is found then first merge the duplicate elements ...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Feb, 2021" }, { "code": null, "e": 544, "s": 28, "text": "To merge the duplicate value in a multidimensional array in PHP, first, create an empty array that will contain the final result. Then we iterate through each element in the a...
Palindrome Partitioning | DP-17
07 Jul, 2022 Given a string, a partitioning of the string is a palindrome partitioning if every substring of the partition is a palindrome. For example, “aba|b|bbabb|a|b|aba” is a palindrome partitioning of “ababbbabbababa”. Determine the fewest cuts needed for a palindrome partitioning of a given string. For example, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 607, "s": 52, "text": "Given a string, a partitioning of the string is a palindrome partitioning if every substring of the partition is a palindrome. For example, “aba|b|bbabb|a|b|aba” is a palindr...
Microsoft Azure – Check Resource Owner in Azure using KQL
29 Dec, 2021 In this article, we will see how we can find the creation date of resources by using the Kusto Query Language. Azure KQL Queries helps in finding the resource creation date, time, created user email,...etc. Note: You cannot retrieve log data if it is more than 90 days using KQL. In this case store log data...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2021" }, { "code": null, "e": 235, "s": 28, "text": "In this article, we will see how we can find the creation date of resources by using the Kusto Query Language. Azure KQL Queries helps in finding the resource creation date, t...
Python Program for Coin Change
22 Jun, 2022 Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the change? The order of coins doesn\’t matter. For example, for N = 4 and S = {1,2,3}, there are four solutions: {1,1,1,1},{1,1,2},{2,2},{1,3}. So o...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 517, "s": 52, "text": "Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the change? The ...
How do I get the height and width of the Android Navigation Bar programmatically using Kotlin?
This example demonstrates how to get the height and width of the Android Navigation Bar programmatically using Kotlin. 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 v...
[ { "code": null, "e": 1181, "s": 1062, "text": "This example demonstrates how to get the height and width of the Android Navigation Bar programmatically using Kotlin." }, { "code": null, "e": 1310, "s": 1181, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ N...
Preprocessing with sklearn: a complete and comprehensive guide | by Steven Van Dorpe | Towards Data Science
For aspiring data scientist it might sometimes be difficult to find their way through the forest of preprocessing techniques. Sklearn its preprocessing library forms a solid foundation to guide you through this important task in the data science pipeline. Although Sklearn a has pretty solid documentation, it often miss...
[ { "code": null, "e": 548, "s": 172, "text": "For aspiring data scientist it might sometimes be difficult to find their way through the forest of preprocessing techniques. Sklearn its preprocessing library forms a solid foundation to guide you through this important task in the data science pipeline....
Grouping words with their anagrams in JavaScript
Two words or phrases which can be made by arranging the letters of each other in a different order are called anagrams of each other, like rat and tar. We are required to write a JavaScript function that takes in an array of strings that might contain some anagram strings. The function should group all the anagrams int...
[ { "code": null, "e": 1214, "s": 1062, "text": "Two words or phrases which can be made by arranging the letters of each other in a different\norder are called anagrams of each other, like rat and tar." }, { "code": null, "e": 1441, "s": 1214, "text": "We are required to write a Ja...
Clearing the confusion: fig, ax = plt.subplots() | Towards Data Science
By reading this article, you will learn the two core objects in Maptlolib plots: figure and axes. You will finally understand the difference between simple plotting (plt.plot) and creating subplots with plt.subplots(). When you begin your journey into Data Science, you are introduced to Matplotlib as your first library...
[ { "code": null, "e": 391, "s": 172, "text": "By reading this article, you will learn the two core objects in Maptlolib plots: figure and axes. You will finally understand the difference between simple plotting (plt.plot) and creating subplots with plt.subplots()." }, { "code": null, "e":...
SVN - Update Process
Jerry had committed the first version of the code. But he thinks that he should write two functions to accept input and to display array contents. After modification, array.c looks as follows. #include <stdio.h> #define MAX 16 void accept_input(int *arr, int n) { int i; for (i = 0; i < n; ++i) scanf("%d", &a...
[ { "code": null, "e": 1969, "s": 1776, "text": "Jerry had committed the first version of the code. But he thinks that he should write two functions to accept input and to display array contents. After modification, array.c looks as follows." }, { "code": null, "e": 2485, "s": 1969, ...
How to add a colorbar for a hist2d plot in Matplotlib?
To add a colorbar for hist2d plot, we can pass a scalar mappable object to colorbar() method's argument. Create x and y data points using numpy. Create x and y data points using numpy. Create a figure and a set of subplots using subplots() method. Create a figure and a set of subplots using subplots() method. Make a 2D...
[ { "code": null, "e": 1167, "s": 1062, "text": "To add a colorbar for hist2d plot, we can pass a scalar mappable object to colorbar() method's argument." }, { "code": null, "e": 1207, "s": 1167, "text": "Create x and y data points using numpy." }, { "code": null, "e": ...
Practical Image Process with OpenCV | by Adem Akdogan | Towards Data Science
Image processing is basically the process that provides us to achieve the features from images. Image processing is applied for both images and videos. These are the procedures used frequently in order to make training more successful in deep learning structures. The image processing begins with the recognition of data...
[ { "code": null, "e": 436, "s": 172, "text": "Image processing is basically the process that provides us to achieve the features from images. Image processing is applied for both images and videos. These are the procedures used frequently in order to make training more successful in deep learning str...
Lua - If statement
An if statement consists of a Boolean expression followed by one or more statements. The syntax of an if statement in Lua programming language is − if(boolean_expression) then --[ statement(s) will execute if the boolean expression is true --] end If the Boolean expression evaluates to true, then the block of code ...
[ { "code": null, "e": 2188, "s": 2103, "text": "An if statement consists of a Boolean expression followed by one or more statements." }, { "code": null, "e": 2251, "s": 2188, "text": "The syntax of an if statement in Lua programming language is −" }, { "code": null, "e...
Parsing PDFs in Python with Tika - GeeksforGeeks
17 Aug, 2020 Apache Tika is a library that is used for document type detection and content extraction from various file formats. Using this, one can develop a universal type detector and content extractor to extract both structured text and metadata from different types of documents such as spreadsheets, text documents...
[ { "code": null, "e": 23926, "s": 23898, "text": "\n17 Aug, 2020" }, { "code": null, "e": 24426, "s": 23926, "text": "Apache Tika is a library that is used for document type detection and content extraction from various file formats. Using this, one can develop a universal type de...
Playing Blackjack using Model-free Reinforcement Learning in Google Colab! | by Pranav Mahajan | Towards Data Science
I felt compelled to write this article because I noticed not many articles explained Monte Carlo methods in detail whereas just jumped straight to Deep Q-learning applications. In this article you’ll get to learn about The motivation behind model-free algorithms in RL (Reinforcement Learning)Inner workings of those alg...
[ { "code": null, "e": 224, "s": 47, "text": "I felt compelled to write this article because I noticed not many articles explained Monte Carlo methods in detail whereas just jumped straight to Deep Q-learning applications." }, { "code": null, "e": 266, "s": 224, "text": "In this ar...
Can we declare constructor as final in java?
A constructor is used to initialize an object when it is created. It is syntactically similar to a method. The difference is that the constructors have the same name as their class and, have no return type. There is no need to invoke constructors explicitly these are automatically invoked at the time of instantiation. ...
[ { "code": null, "e": 1269, "s": 1062, "text": "A constructor is used to initialize an object when it is created. It is syntactically similar to a method. The difference is that the constructors have the same name as their class and, have no return type." }, { "code": null, "e": 1382, ...
GATE | GATE CS 1996 | Question 20 - GeeksforGeeks
31 Oct, 2017 A critical section is a program segment (A) which should run in a certain specified amount of time(B) which avoids deadlocks(C) where shared resources are accessed(D) which must be enclosed by a pair of semaphore operations, P and VAnswer: (C)Explanation:Quiz of this QuestionPlease comment below if you fin...
[ { "code": null, "e": 24546, "s": 24518, "text": "\n31 Oct, 2017" }, { "code": null, "e": 24586, "s": 24546, "text": "A critical section is a program segment" }, { "code": null, "e": 24888, "s": 24586, "text": "(A) which should run in a certain specified amount...
Arrange given numbers to form the biggest number?
Here we will see how to generate the biggest number by rearranging the given numbers. Suppose there are {45, 74, 23} is given, the program will find the largest number, that is 744523. So each digit will not be arranged. but the whole number will be placed to make largest number. To solve this problem, we will use the ...
[ { "code": null, "e": 1343, "s": 1062, "text": "Here we will see how to generate the biggest number by rearranging the given numbers. Suppose there are {45, 74, 23} is given, the program will find the largest number, that is 744523. So each digit will not be arranged. but the whole number will be pla...
React Native - View
View is the most common element in React Native. You can consider it as an equivalent of the div element used in web development. Let us now see a few common use cases. When you need to wrap your elements inside the container, you can use View as a container element. When you need to wrap your elements inside the conta...
[ { "code": null, "e": 2474, "s": 2344, "text": "View is the most common element in React Native. You can consider it as an equivalent of the div element used in web development." }, { "code": null, "e": 2513, "s": 2474, "text": "Let us now see a few common use cases." }, { ...
Git Push Branch to GitHub
Let's try to create a new local branch, and push that to GitHub. Start by creating a branch, like we did earlier: git checkout -b update-readme Switched to a new branch 'update-readme' And we make some changes to the README.md file. Just add a new line. So now we check the status of the current branch. git status On br...
[ { "code": null, "e": 65, "s": 0, "text": "Let's try to create a new local branch, and push that to GitHub." }, { "code": null, "e": 114, "s": 65, "text": "Start by creating a branch, like we did earlier:" }, { "code": null, "e": 185, "s": 114, "text": "git che...
Keras - Backend Configuration
This chapter explains Keras backend implementations TensorFlow and Theano in detail. Let us go through each implementation one by one. TensorFlow is an open source machine learning library used for numerical computational tasks developed by Google. Keras is a high level API built on top of TensorFlow or Theano. We know...
[ { "code": null, "e": 2186, "s": 2051, "text": "This chapter explains Keras backend implementations TensorFlow and Theano in detail. Let us go through each implementation one by one." }, { "code": null, "e": 2417, "s": 2186, "text": "TensorFlow is an open source machine learning l...
How to get the IP Address of local computer using C/C++?
In this section we will see how to see the Host name and IP address of the local system in an easier way. We will write a C program to find the host name and IP. Some of the following functions are used. These functions have different task. Let us see the functions and their tasks. #include <stdio.h> #include <stdlib.h...
[ { "code": null, "e": 1224, "s": 1062, "text": "In this section we will see how to see the Host name and IP address of the local system in an easier way. We will write a C program to find the host name and IP." }, { "code": null, "e": 1345, "s": 1224, "text": "Some of the followin...
MYSQL - SHOW SCHEMAS statement
The SHOW SCHEMAS is a synonym for the SHOW DATABASES statement so, you can also use this statement to list out databases. Assume we have created the deleted databases again, using the CREATE DATABASE statement as − mysql> CREATE DATABASE testDB1; Query OK, 1 row affected (0.34 sec) mysql> CREATE DATABASE testDB2; Quer...
[ { "code": null, "e": 2455, "s": 2333, "text": "The SHOW SCHEMAS is a synonym for the SHOW DATABASES statement so, you can also use this statement to list out databases." }, { "code": null, "e": 2548, "s": 2455, "text": "Assume we have created the deleted databases again, using th...
Find a number X such that (X XOR A) is minimum and the count of set bits in X and B are equal - GeeksforGeeks
01 Mar, 2022 Given two integers A and B, the task is to find an integer X such that (X XOR A) is minimum possible and the count of set bit in X is equal to the count of set bits in B.Examples: Input: A = 3, B = 5 Output: 3 Binary(A) = Binary(3) = 011 Binary(B) = Binary(5) = 101 The XOR will be minimum when M = 3 i.e....
[ { "code": null, "e": 25616, "s": 25588, "text": "\n01 Mar, 2022" }, { "code": null, "e": 25798, "s": 25616, "text": "Given two integers A and B, the task is to find an integer X such that (X XOR A) is minimum possible and the count of set bit in X is equal to the count of set bit...
How to Visualize a Decision Tree from a Random Forest in Python using Scikit-Learn | by Will Koehrsen | Towards Data Science
Here’s the complete code: just copy and paste into a Jupyter Notebook or Python script, replace with your data and run: The final result is a complete decision tree as an image. Create a model train and extract: we could use a single decision tree, but since I often employ the random forest for modeling it’s used in th...
[ { "code": null, "e": 292, "s": 172, "text": "Here’s the complete code: just copy and paste into a Jupyter Notebook or Python script, replace with your data and run:" }, { "code": null, "e": 350, "s": 292, "text": "The final result is a complete decision tree as an image." }, ...
Scrape Data and Build a Webapp in R Using Rvest and Shiny | by Brad Lindblad | Towards Data Science
Sharing your analyses and data science findings via traditional methods is cool and all, but what if you wanted to share with a larger audience? What if you want to share an analysis of some data set in real-time? With a few dozen lines of code, you can create such a tool in an afternoon. I’m going to share how I built...
[ { "code": null, "e": 462, "s": 172, "text": "Sharing your analyses and data science findings via traditional methods is cool and all, but what if you wanted to share with a larger audience? What if you want to share an analysis of some data set in real-time? With a few dozen lines of code, you can c...
Tk - Grid Widget
The grid widget used to layout widgets in specific rows and columns. The syntax for grid widget is shown below − grid gridName options The options available for the grid widget are listed below in the following table − -column number Sets the column position for widget. -row number Sets the row position for widget. -c...
[ { "code": null, "e": 2314, "s": 2201, "text": "The grid widget used to layout widgets in specific rows and columns. The syntax for grid widget is shown below −" }, { "code": null, "e": 2337, "s": 2314, "text": "grid gridName options\n" }, { "code": null, "e": 2421, ...
Program for Preemptive Priority CPU Scheduling - GeeksforGeeks
05 Apr, 2022 Implementing priority CPU scheduling. In this problem, we are using Min Heap as the data structure for implementing priority scheduling. In this problem smaller numbers denote higher priority. The following functions are used in the given code below: struct process { processID, burst time, respon...
[ { "code": null, "e": 26537, "s": 26509, "text": "\n05 Apr, 2022" }, { "code": null, "e": 26789, "s": 26537, "text": "Implementing priority CPU scheduling. In this problem, we are using Min Heap as the data structure for implementing priority scheduling. In this problem smaller nu...
Tom and Jerry | Practice | GeeksforGeeks
Tom and Jerry being bored in this pandemic, decides to play a game. Given an integer N. On each player’s turn, that player makes a move by subtracting a divisor of current N (which is less than N) from current N, thus forming a new N for the next turn. The player who does not have any divisor left to subtract loses the...
[ { "code": null, "e": 565, "s": 238, "text": "Tom and Jerry being bored in this pandemic, decides to play a game. Given an integer N. On each player’s turn, that player makes a move by subtracting a divisor of current N (which is less than N) from current N, thus forming a new N for the next turn. Th...
Difference between char, varchar and VARCHAR2 in Oracle
09 Aug, 2021 1. CHAR :The char data type is used to store the character values. It is a fixed-length data type i.e once initialized we cannot change the size at execution time. Hence, it is also called a Static datatype.It is used to store normal characters and alphanumeric characters too. The char data type can store ...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Aug, 2021" }, { "code": null, "e": 805, "s": 28, "text": "1. CHAR :The char data type is used to store the character values. It is a fixed-length data type i.e once initialized we cannot change the size at execution time. Hence, it i...