title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Send mail with attachment from your Gmail account using Python
22 Oct, 2017 In last article, we have discussed the basics of sending a mail from a Gmail account without any subject as well as without any attachment. Today, we will learn how to send mail with attachment and subject using Python. Before moving on, it is highly recommended to learn how to send a simple mail using Pyt...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Oct, 2017" }, { "code": null, "e": 734, "s": 52, "text": "In last article, we have discussed the basics of sending a mail from a Gmail account without any subject as well as without any attachment. Today, we will learn how to send m...
How to create an unique id in ReactJS ?
11 Nov, 2021 In this article, we will see the simple steps to create a unique reference ID in react JS. This has many uses such as giving a user uploaded image a unique name for saving in a database. Approach: We will be using Uuid V4 in this tutorial. Uuid v4 is a React library or package that creates a universally un...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Nov, 2021" }, { "code": null, "e": 215, "s": 28, "text": "In this article, we will see the simple steps to create a unique reference ID in react JS. This has many uses such as giving a user uploaded image a unique name for saving in ...
Python | sympy.divisor_sigma() method
17 Sep, 2019 With the help of sympy.divisor_sigma() method, we can find the divisor function for positive integer n. divisor_sigma(n, k) is equal to the sum of all the divisors of n raised to the power of k or sum([x**k for x in divisors(n)]). Syntax: divisor_sigma(n, k) Parameter:n – It denotes an integer.k – It deno...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Sep, 2019" }, { "code": null, "e": 260, "s": 28, "text": "With the help of sympy.divisor_sigma() method, we can find the divisor function for positive integer n. divisor_sigma(n, k) is equal to the sum of all the divisors of n raise...
Dynamically Execute JavaScript in ElectronJS
25 Aug, 2021 ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable of running on Windows, macOS, and Linux operating systems. It combines the Chromium engine and NodeJS into a Single Runtime.In Elect...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Aug, 2021" }, { "code": null, "e": 1220, "s": 28, "text": "ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable...
How to convert array to string in PHP ?
31 Jul, 2021 We have given an array and the task is to convert the array elements into string. In this article, we are using two methods to convert array to string. Method 1: Using implode() function: The implode() method is an inbuilt function in PHP and is used to join the elements of an array. The implode() method i...
[ { "code": null, "e": 53, "s": 25, "text": "\n31 Jul, 2021" }, { "code": null, "e": 205, "s": 53, "text": "We have given an array and the task is to convert the array elements into string. In this article, we are using two methods to convert array to string." }, { "code": ...
Python Program to Find the Area of a Rectangle Using Classes
When it is required to find the area of a rectangle using classes, object oriented method is used. Here, a class is defined, attributes are defined. Functions are defined within the class that perform certain operations. An instance of the class is created, and the functions are used to find the area of rectangle. Belo...
[ { "code": null, "e": 1503, "s": 1187, "text": "When it is required to find the area of a rectangle using classes, object oriented method is used. Here, a class is defined, attributes are defined. Functions are defined within the class that perform certain operations. An instance of the class is crea...
Extract Values from Matrix by Column and Row Names in R
23 May, 2021 In this article, we will discuss how to extract values from the matrix by column and row names in R Programming Language. A row subset matrix can be extracted from the original matrix using a filter for the selected row names. Since a matrix’s elements are accessed in a dual index format, particular row se...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2021" }, { "code": null, "e": 150, "s": 28, "text": "In this article, we will discuss how to extract values from the matrix by column and row names in R Programming Language." }, { "code": null, "e": 363, "s": 15...
Find the smallest and second smallest elements in an array in C++
Suppose we have an array of n elements. We have to find the first, second smallest elements in the array. First smallest is the minimum of the array, second smallest is minimum but larger than the first smallest number. Scan through each element, then check the element, and relate the condition for first, and second sm...
[ { "code": null, "e": 1407, "s": 1187, "text": "Suppose we have an array of n elements. We have to find the first, second smallest elements in the array. First smallest is the minimum of the array, second smallest is minimum but larger than the first smallest number." }, { "code": null, "...
Move Axis Labels in ggplot in R
17 Jun, 2021 In this article, we are going to see how to move the axis labels using ggplot2 bar plot in the R programming language. First, you need to install the ggplot2 package if it is not previously installed in R Studio. For creating a simple bar plot we will use the function geom_bar( ). Syntax: geom_bar(stat, fi...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jun, 2021" }, { "code": null, "e": 147, "s": 28, "text": "In this article, we are going to see how to move the axis labels using ggplot2 bar plot in the R programming language." }, { "code": null, "e": 310, "s": 147, ...
How to Print Multiple Arguments in Python?
29 Dec, 2020 An argument is a value that is passed within a function when it is called.They are independent items, or variables, that contain data or codes. During the time of call each argument is always assigned to the parameter in the function definition. Example: Simple argument Python3 def GFG(name, num): print...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Dec, 2020" }, { "code": null, "e": 300, "s": 54, "text": "An argument is a value that is passed within a function when it is called.They are independent items, or variables, that contain data or codes. During the time of call each a...
Minimum number of bracket reversals needed to make an expression balanced | Set - 2 - GeeksforGeeks
21 Apr, 2021 Given an expression with only ‘}’ and ‘{‘. The expression may not be balanced. The task is to find minimum number of bracket reversals to make the expression balanced.Examples: Input : exp = "}{" Output : 2 We need to change '}' to '{' and '{' to '}' so that the expression becomes balanced, the balanced...
[ { "code": null, "e": 25090, "s": 25062, "text": "\n21 Apr, 2021" }, { "code": null, "e": 25269, "s": 25090, "text": "Given an expression with only ‘}’ and ‘{‘. The expression may not be balanced. The task is to find minimum number of bracket reversals to make the expression balan...
DateTimeOffset.AddMonths() Method in C# - GeeksforGeeks
21 Feb, 2019 This method is used to return a new DateTimeOffset object that adds a specified number of months to the value of the current instance. Syntax: public DateTimeOffset AddMonths (int months);Here, it takes a number of whole months. The number can be negative or positive. Return Value: This method returns an o...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n21 Feb, 2019" }, { "code": null, "e": 25682, "s": 25547, "text": "This method is used to return a new DateTimeOffset object that adds a specified number of months to the value of the current instance." }, { "code": null, ...
Firebase - Deploying
In this chapter, we will show you how to host your app on the Firebase server. Before we begin, let us just add some text to index.html body tag. In this example, we will add the following text. <h1>WELCOME TO FIREBASE TUTORIALS APP</h1> We need to install firebase tools globally in the command prompt window. npm insta...
[ { "code": null, "e": 2245, "s": 2166, "text": "In this chapter, we will show you how to host your app on the Firebase server." }, { "code": null, "e": 2361, "s": 2245, "text": "Before we begin, let us just add some text to index.html body tag. In this example, we will add the fol...
Algorithms | Analysis of Algorithms | Question 3 - GeeksforGeeks
06 Feb, 2013 The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n discs is. (GATE CS 2012)(A) T(n) = 2T(n – 2) + 2(B) T(n) = 2T(n – 1) + n (C) T(n) = 2T(n/2) + 1(D) T(n) = 2T(n – 1) + 1Answer: (D)Explanation: Following are the steps to follow to solve Tower of Hanoi problem recursivel...
[ { "code": null, "e": 25012, "s": 24984, "text": "\n06 Feb, 2013" }, { "code": null, "e": 25173, "s": 25012, "text": "The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n discs is. (GATE CS 2012)(A) T(n) = 2T(n – 2) + 2(B) T(n) = 2T(n – 1) + n" ...
Kotlin - Booleans
Many times we come across a situation where we need to take decision in Yes or No, or may be we can say True or False. To handle such situation Kotlin has a Boolean data type, which can take the values either true or false. Kotlin also has a nullable counterpart Boolean? that can have the null value. A boolean variable...
[ { "code": null, "e": 2649, "s": 2425, "text": "Many times we come across a situation where we need to take decision in Yes or No, or may be we can say True or False. To handle such situation Kotlin has a Boolean data type, which can take the values either true or false." }, { "code": null, ...
Lolcode - Variables
As in any other programming language, LOLCODE allows you to define variables of various types. This chapter will make you familiar with working with variables in LOLCODE. The scope of a variable is local to the function or to the program block, i.e. a variable defined in one scope cannot be called in any other scope of...
[ { "code": null, "e": 2011, "s": 1840, "text": "As in any other programming language, LOLCODE allows you to define variables of various types. This chapter will make you familiar with working with variables in LOLCODE." }, { "code": null, "e": 2234, "s": 2011, "text": "The scope o...
GATE | GATE-CS-2000 | Question 49 - GeeksforGeeks
12 Sep, 2019 Given the following expression grammar: E -> E * F | F + E | F F -> F - F | id which of the following is true?(A) * has higher precedence than +(B) – has higher precedence than *(C) + and — have same precedence(D) + has higher precedence than *Answer: (B)Explanation: Let say i/p is 3*4-5 when we draw pars...
[ { "code": null, "e": 24456, "s": 24428, "text": "\n12 Sep, 2019" }, { "code": null, "e": 24496, "s": 24456, "text": "Given the following expression grammar:" }, { "code": null, "e": 24536, "s": 24496, "text": "E -> E * F | F + E | F\nF -> F - F | id " }, {...
Neo4j vs Grakn | Towards Data Science
Dear readers, in this series of articles I compared two popular knowledge bases: Neo4j and Grakn. I decided to write this comparison long time ago upon your requests, however kismet is for now 😊 This is a detailed comparison in 3 parts: first part is devoted to technical details, the second part dives into details of ...
[ { "code": null, "e": 367, "s": 172, "text": "Dear readers, in this series of articles I compared two popular knowledge bases: Neo4j and Grakn. I decided to write this comparison long time ago upon your requests, however kismet is for now 😊" }, { "code": null, "e": 949, "s": 367, ...
How to write an empty function in Java
Let us see how to write an empty function in Java − Live Demo import java.util.Vector; public class Demo{ public static void my_empty_fun(){ } public static void main(String[] args){ System.out.println("In the main function"); my_empty_fun(); } } In the main function An empty function is basi...
[ { "code": null, "e": 1114, "s": 1062, "text": "Let us see how to write an empty function in Java −" }, { "code": null, "e": 1125, "s": 1114, "text": " Live Demo" }, { "code": null, "e": 1336, "s": 1125, "text": "import java.util.Vector;\npublic class Demo{\n ...
How to create a Expandable listView using Kotlin?
This example demonstrates how to create a Expandable listView 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. <RelativeLayout xmlns:android="http://schemas.andro...
[ { "code": null, "e": 1138, "s": 1062, "text": "This example demonstrates how to create a Expandable listView using Kotlin." }, { "code": null, "e": 1266, "s": 1138, "text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to ...
Initialization of variable sized arrays in C
Variable sized arrays are data structures whose length is determined at runtime rather than compile time. These arrays are useful in simplifying numerical algorithm programming. The C99 is a C programming standard that allows variable sized arrays. A program that demonstrates variable sized arrays in C is given as foll...
[ { "code": null, "e": 1311, "s": 1062, "text": "Variable sized arrays are data structures whose length is determined at runtime rather than compile time. These arrays are useful in simplifying numerical algorithm programming. The C99 is a C programming standard that allows variable sized arrays." }...
Plotly - Dot Plots and Table
Here, we will learn about dot plots and table function in Plotly. Firstly, let us start with dot plots. A dot plot displays points on a very simple scale. It is only suitable for a small amount of data as a large number of points will make it look very cluttered. Dot plots are also known as Cleveland dot plots. They sh...
[ { "code": null, "e": 2464, "s": 2360, "text": "Here, we will learn about dot plots and table function in Plotly. Firstly, let us start with dot plots." }, { "code": null, "e": 2765, "s": 2464, "text": "A dot plot displays points on a very simple scale. It is only suitable for a s...
Bool Array in C#
In a bool array, you can store true and false values. To set a bool array, use the new operator − bool[] arr = new bool[5]; To add elements in the array − arr[0] = true; arr[1] = true; arr[2] = false; arr[3] = true; arr[4] = true; Let us see the complete code − Live Demo using System; public class Demo { public st...
[ { "code": null, "e": 1160, "s": 1062, "text": "In a bool array, you can store true and false values. To set a bool array, use the new operator −" }, { "code": null, "e": 1186, "s": 1160, "text": "bool[] arr = new bool[5];" }, { "code": null, "e": 1217, "s": 1186, ...
NativeScript - Angular Application
Let us create a simple bare bone application to understand the work flow of the NativeScript application. Let us learn how to create simple application using NativeScript CLI, tns. tns provides a command create to used to create a new project in NativeScript. The basic syntax to create a new application is as below − t...
[ { "code": null, "e": 2211, "s": 2105, "text": "Let us create a simple bare bone application to understand the work flow of the NativeScript application." }, { "code": null, "e": 2365, "s": 2211, "text": "Let us learn how to create simple application using NativeScript CLI, tns. t...
Convert dataframe to list of vectors in R - GeeksforGeeks
25 Aug, 2021 In this article, we will learn how to convert a dataframe into a list of vectors, such that we can use columns of the dataframes as vectors in the R Programming language. as.list() function in R Language is used to convert an object to a list. These objects can be Vectors, Matrices, Factors, and data frame...
[ { "code": null, "e": 24561, "s": 24533, "text": "\n25 Aug, 2021" }, { "code": null, "e": 24732, "s": 24561, "text": "In this article, we will learn how to convert a dataframe into a list of vectors, such that we can use columns of the dataframes as vectors in the R Programming la...
Python | Decimal is_zero() method - GeeksforGeeks
05 Sep, 2019 Decimal#is_zero() : is_zero() is a Decimal class method which checks whether the Decimal value is zero value. Syntax: Decimal.is_zero() Parameter: Decimal values Return: true - if the Decimal value is zero value; otherwise false Code #1 : Example for is_zero() method # Python Program explaining # is...
[ { "code": null, "e": 24290, "s": 24262, "text": "\n05 Sep, 2019" }, { "code": null, "e": 24400, "s": 24290, "text": "Decimal#is_zero() : is_zero() is a Decimal class method which checks whether the Decimal value is zero value." }, { "code": null, "e": 24526, "s": ...
Tryit Editor v3.7
HTML Form elements Tryit: HTML output element
[ { "code": null, "e": 29, "s": 10, "text": "HTML Form elements" } ]
Create and write on excel file using xlsxwriter module in Python
Python’s wide availability of libraries enables it to interact with Microsoft excel which is a very widely used data processing tool. In this article we will see how we can use the module named xlsxwriter to create and write into a excel file. It cannot write into existing excel file. We can write to each cell of an ex...
[ { "code": null, "e": 1348, "s": 1062, "text": "Python’s wide availability of libraries enables it to interact with Microsoft excel which is a very widely used data processing tool. In this article we will see how we can use the module named xlsxwriter to create and write into a excel file. It cannot...
Data Slicing using PyQtGraph - GeeksforGeeks
13 Jan, 2022 In this article, we will see how we can perform data slicing using PyQtGraph module in Python. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactive graphics for d...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n13 Jan, 2022" }, { "code": null, "e": 24685, "s": 24212, "text": "In this article, we will see how we can perform data slicing using PyQtGraph module in Python. PyQtGraph is a graphics and user interface library for Python that p...
Chrono library in C++
In this section we will see what is the Chrono library in C++. This Chrono library is used for date and time. Timers and clocks are different in different systems. So if we want to improve time over precision we can use this library. In this library, it provides precision-neutral concept, by separating the durations an...
[ { "code": null, "e": 1296, "s": 1062, "text": "In this section we will see what is the Chrono library in C++. This Chrono library is used for date and time. Timers and clocks are different in different systems. So if we want to improve time over precision we can use this library." }, { "code...
jQuery | change() with Examples - GeeksforGeeks
03 Aug, 2021 The change() is an inbuilt method in jQuery that is used to detect the change in value of input fields. This method works only on the “<input>, <textarea> and <select>” elements. Syntax : $(selector).change(function) Parameter: It accepts an optional parameter “function”.Return Value: It returns the eleme...
[ { "code": null, "e": 40643, "s": 40615, "text": "\n03 Aug, 2021" }, { "code": null, "e": 40822, "s": 40643, "text": "The change() is an inbuilt method in jQuery that is used to detect the change in value of input fields. This method works only on the “<input>, <textarea> and <sel...
C# program to return an array from methods
Call a method under Join method to join words − string.Join(" ", display()) Now set a string array − string[] str = new string[5]; Add individual elements − str[0] = "My"; str[1] = "name"; str[2] = "is"; str[3] = "Brad"; str[4] = "Pitt"; And return the same string array from method − return str; The following is the co...
[ { "code": null, "e": 1110, "s": 1062, "text": "Call a method under Join method to join words −" }, { "code": null, "e": 1138, "s": 1110, "text": "string.Join(\" \", display())" }, { "code": null, "e": 1163, "s": 1138, "text": "Now set a string array −" }, ...
2D Transformation in Computer Graphics | Set 1 (Scaling of Objects) - GeeksforGeeks
09 Feb, 2018 A scaling transformation alters size of an object. In the scaling process, we either compress or expand the dimension of the object.Scaling operation can be achieved by multiplying each vertex coordinate (x, y) of the polygon by scaling factor sx and sy to produce the transformed coordinates as (x’, y’).So...
[ { "code": null, "e": 24234, "s": 24206, "text": "\n09 Feb, 2018" }, { "code": null, "e": 24901, "s": 24234, "text": "A scaling transformation alters size of an object. In the scaling process, we either compress or expand the dimension of the object.Scaling operation can be achiev...
Snake case of a given sentence - GeeksforGeeks
27 Dec, 2021 Given a sentence, task is to remove spaces from the sentence and rewrite in Snake case. It is a style of writing where we replace spaces with underscore and all words begin with small letters.Examples : Input : I got intern at geeksforgeeks Output : i_got_intern_at_geeksforgeeks Input : Here comes the ...
[ { "code": null, "e": 24772, "s": 24744, "text": "\n27 Dec, 2021" }, { "code": null, "e": 24977, "s": 24772, "text": "Given a sentence, task is to remove spaces from the sentence and rewrite in Snake case. It is a style of writing where we replace spaces with underscore and all wo...
Get Current Time in different Timezone using Python - GeeksforGeeks
29 Dec, 2020 Timezone is defined as a geographical area or region throughout which standard time is observed. It basically refers to the local time of a region or country. Most of the time zones are offset from Coordinated Universal Time (UTC), the world’s standard for time zone.In order to get the current time of diff...
[ { "code": null, "e": 24774, "s": 24746, "text": "\n29 Dec, 2020" }, { "code": null, "e": 25141, "s": 24774, "text": "Timezone is defined as a geographical area or region throughout which standard time is observed. It basically refers to the local time of a region or country. Most...
HTML Window innerWidth Property
The HTML Window innerWidth property returns the width of the content area of a window in an HTML document. Following is the syntax − window.innerWidth Let us see an example of HTML Window innerWidth Property − Live Demo <!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-c...
[ { "code": null, "e": 1169, "s": 1062, "text": "The HTML Window innerWidth property returns the width of the content area of a window in an HTML document." }, { "code": null, "e": 1195, "s": 1169, "text": "Following is the syntax −" }, { "code": null, "e": 1213, "s...
How to set border width, border style, and border color in one declaration with JavaScript?
To set the border width, style, and color in a single declaration, use the border property in JavaScript. You can try to run the following code to learn how to set border in JavaScript − Live Demo <!DOCTYPE html> <html> <body> <button onclick="display()">Set border</button> <div id="box"> <p>Dem...
[ { "code": null, "e": 1168, "s": 1062, "text": "To set the border width, style, and color in a single declaration, use the border property in JavaScript." }, { "code": null, "e": 1249, "s": 1168, "text": "You can try to run the following code to learn how to set border in JavaScri...
Difference between Runnable and Callable interface in java
Runnable and Callable both functional interface. Classes which are implementing these interfaces are designed to be executed by another thread. Thread can be started with Ruunable and they are two ways to start a new thread: one is by subclassing Thread class and another is implementing Runnable interface. Thread class...
[ { "code": null, "e": 1206, "s": 1062, "text": "Runnable and Callable both functional interface. Classes which are implementing these interfaces are designed to be executed by another thread." }, { "code": null, "e": 1370, "s": 1206, "text": "Thread can be started with Ruunable an...
Unity - Introduction to Audio
There is a reason games put emphasis on audio; it is quite crucial to add aesthetic value to the game. From the very first Pong, one can hear beeps and boops from the ball hitting the paddles alternatingly. It was a really simple short square wave sample at the time, but what more could you want from the grandfather of...
[ { "code": null, "e": 2553, "s": 2215, "text": "There is a reason games put emphasis on audio; it is quite crucial to add aesthetic value to the game. From the very first Pong, one can hear beeps and boops from the ball hitting the paddles alternatingly. It was a really simple short square wave sampl...
Find the smallest window in a string containing all characters of another string - GeeksforGeeks
12 Oct, 2021 Given two strings, string1 and string2, the task is to find the smallest substring in string1 containing all characters of string2 efficiently. Examples: Input: string = “this is a test string”, pattern = “tist” Output: Minimum window is “t stri” Explanation: “t stri” contains all the characters of patte...
[ { "code": null, "e": 25140, "s": 25112, "text": "\n12 Oct, 2021" }, { "code": null, "e": 25285, "s": 25140, "text": "Given two strings, string1 and string2, the task is to find the smallest substring in string1 containing all characters of string2 efficiently. " }, { "cod...
Count of elements that are Kth powers of their indices in given Array - GeeksforGeeks
02 Feb, 2022 Given an array arr[] with N non-negative integers, the task is to find the number of elements that are Kth powers of their indices, where K is a non-negative number. arr[i] = iK Example: Input: arr = [1, 1, 4, 3, 16, 125, 1], K = 0Output: 3Explanation: 3 elements are Kth powers of their indices:00 is 1, 1...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n02 Feb, 2022" }, { "code": null, "e": 24962, "s": 24796, "text": "Given an array arr[] with N non-negative integers, the task is to find the number of elements that are Kth powers of their indices, where K is a non-negative numbe...
Jackson - JsonParser Class
JsonParser is the base class to define public API for reading Json content. Instances are created using factory methods of a JsonFactory instance. Following is the declaration for com.fasterxml.jackson.core.JsonParser class: public abstract class JsonParser extends Object implements Closeable, Versioned protec...
[ { "code": null, "e": 1900, "s": 1753, "text": "JsonParser is the base class to define public API for reading Json content. Instances are created using factory methods of a JsonFactory instance." }, { "code": null, "e": 1978, "s": 1900, "text": "Following is the declaration for co...
Excel Macros - Quick Guide
An Excel macro is an action or a set of actions that you can record, give a name, save and run as many times as you want and whenever you want. When you create a macro, you are recording your mouse clicks and keystrokes. When you run a saved macro, the recorded mouse clicks and keystrokes will be executed in the same s...
[ { "code": null, "e": 2393, "s": 2043, "text": "An Excel macro is an action or a set of actions that you can record, give a name, save and run as many times as you want and whenever you want. When you create a macro, you are recording your mouse clicks and keystrokes. When you run a saved macro, the ...
Difference between Transfer Time and Disk Access Time in Disk Scheduling - GeeksforGeeks
28 Apr, 2020 1. Transfer Time :Time required to transfer the required amount of data. It can be calculated by the given formula Transfer time, = Data to be transfer / transfer rate Data to be transfer is given in the question and transfer rate is sometimes given and sometimes it may not be given. It can be calculated ...
[ { "code": null, "e": 24858, "s": 24830, "text": "\n28 Apr, 2020" }, { "code": null, "e": 24973, "s": 24858, "text": "1. Transfer Time :Time required to transfer the required amount of data. It can be calculated by the given formula" }, { "code": null, "e": 25027, ...
Output of C++ programs | Set 46 (If-else statements) - GeeksforGeeks
11 Sep, 2017 Prerequisite : Decision Making in C++ Question 1. What is the output of following program? #include <iostream>#include <stdio.h>int main(){ if (!(std::cout << "hello")) std::cout << "world"; else std::cout << " else part"; return 0;} Output: hello else part Explanation : Since if-e...
[ { "code": null, "e": 24340, "s": 24312, "text": "\n11 Sep, 2017" }, { "code": null, "e": 24378, "s": 24340, "text": "Prerequisite : Decision Making in C++" }, { "code": null, "e": 24431, "s": 24378, "text": "Question 1. What is the output of following program?...
Automate the Conversion from Python2 to Python3 - GeeksforGeeks
16 Jul, 2020 We can convert Python2 scripts to Python3 scripts by using 2to3 module. It changes Python2 syntax to Python3 syntax. We can change all the files in a particular folder from python2 to python3. This module does not come built-in with Python. To install this type the below command in the terminal. pip instal...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n16 Jul, 2020" }, { "code": null, "e": 24485, "s": 24292, "text": "We can convert Python2 scripts to Python3 scripts by using 2to3 module. It changes Python2 syntax to Python3 syntax. We can change all the files in a particular fo...
How to validate decimal numbers in JavaScript?
To validate decimal numbers in JavaScript, use the match() method. It retrieves the matches when matching a string against a regular expression. You can try to run the following code to validate decimal numbers − <html> <body> <script> var str = "1.5"; var re = /^[-+]?[0-9]+\.[0-9]+$/; ...
[ { "code": null, "e": 1207, "s": 1062, "text": "To validate decimal numbers in JavaScript, use the match() method. It retrieves the matches when matching a string against a regular expression." }, { "code": null, "e": 1275, "s": 1207, "text": "You can try to run the following code...
How to create a pie chart with percentage labels using ggplot2 in R ? - GeeksforGeeks
24 Oct, 2021 In this article, we are going to see how to create a pie chart with percentage labels using ggplot2 in R Programming Language. The dplyr package in R programming can be used to perform data manipulations and statistics. The package can be downloaded and installed using the following command in R. install.p...
[ { "code": null, "e": 24851, "s": 24823, "text": "\n24 Oct, 2021" }, { "code": null, "e": 24978, "s": 24851, "text": "In this article, we are going to see how to create a pie chart with percentage labels using ggplot2 in R Programming Language." }, { "code": null, "e":...
Angular PrimeNG SlideMenu Component - GeeksforGeeks
08 Sep, 2021 Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see how to use the SlideMenu component in Angular PrimeNG. We will also learn abou...
[ { "code": null, "e": 25029, "s": 25001, "text": "\n08 Sep, 2021" }, { "code": null, "e": 25429, "s": 25029, "text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp...
Guide to Advanced CNNs in tensorflow | Towards Data Science
The first ConvNet model I built was to identify dogs or cats and had a basic structure of a sequential model having Conv2d layers along with a mix of batch normalization and max-pooling layers here and there and not to forget a dropout layer to counter overfitting😏. All this was followed by a flattening layer which ul...
[ { "code": null, "e": 1023, "s": 172, "text": "The first ConvNet model I built was to identify dogs or cats and had a basic structure of a sequential model having Conv2d layers along with a mix of batch normalization and max-pooling layers here and there and not to forget a dropout layer to counter o...
How to change the color of a plot frame in Matplotlib?
To change the color of a plot frame, we can set axes ticklines and spine value into a specific color. Create a figure and add a set of subplots, using subplots method with value 4. Create a figure and add a set of subplots, using subplots method with value 4. Zip colors with axes and iterate them together. Zip colors w...
[ { "code": null, "e": 1164, "s": 1062, "text": "To change the color of a plot frame, we can set axes ticklines and spine value into a specific color." }, { "code": null, "e": 1243, "s": 1164, "text": "Create a figure and add a set of subplots, using subplots method with value 4." ...
Default values of static variables in C
When static keyword is used, variable or data members or functions can not be modified again. It is allocated for the lifetime of program. Static functions can be called directly by using class name. Static variables are initialized only once. Compiler persist the variable till the end of the program. Static variable c...
[ { "code": null, "e": 1262, "s": 1062, "text": "When static keyword is used, variable or data members or functions can not be modified again. It is allocated for the lifetime of program. Static functions can be called directly by using class name." }, { "code": null, "e": 1569, "s": 1...
Python How to sort a list of strings
In this tutorial, we are going to see how to sort a list of strings. We'll sort the given list of strings with sort method and sorted function. And then we'll see how to sort the list of strings based on different criteria like length, value, etc., Let's see how to sort a list of strings using list.sort() method. The s...
[ { "code": null, "e": 1311, "s": 1062, "text": "In this tutorial, we are going to see how to sort a list of strings. We'll sort the given list of strings with sort method and sorted function. And then we'll see how to sort the list of strings based on different criteria like length, value, etc.," }...
CSS Responsive Table
A responsive table will display a horizontal scroll bar if the screen is too small to display the full content: Add a container element (like <div>) with overflow-x:auto around the <table> element to make it responsive: Note: In OS X Lion (on Mac), scrollbars are hidden by default and only shown when being used (even ...
[ { "code": null, "e": 113, "s": 0, "text": "A responsive table will display a horizontal scroll bar if the screen is too \nsmall to display the full content:" }, { "code": null, "e": 221, "s": 113, "text": "Add a container element (like <div>) with overflow-x:auto around the <tabl...
\raise - Tex Command
\raise - Used to raises the argument by the amount specified in <dimen> { \raise <dimen> #1 } \raise command is used to raises the argument by the amount specified in <dimen> h\raise 2pt {ighe} r higher h\raise 2pt {ighe} r higher h\raise 2pt {ighe} r 14 Lectures 52 mins Ashraf Said 11 Lecture...
[ { "code": null, "e": 8058, "s": 7986, "text": "\\raise - Used to raises the argument by the amount specified in <dimen>" }, { "code": null, "e": 8080, "s": 8058, "text": "{ \\raise <dimen> #1 }" }, { "code": null, "e": 8161, "s": 8080, "text": "\\raise command...
Kotlin While Loop
Loops can execute a block of code as long as a specified condition is reached. Loops are handy because they save time, reduce errors, and they make code more readable. The while loop loops through a block of code as long as a specified condition is true: while (condition) { // code block to be executed } In the examp...
[ { "code": null, "e": 79, "s": 0, "text": "Loops can execute a block of code as long as a specified condition is reached." }, { "code": null, "e": 168, "s": 79, "text": "Loops are handy because they save time, reduce errors, and they make code more readable." }, { "code": ...
How to prepare for eLitmus Hiring Potential Test (pH Test) - GeeksforGeeks
23 Aug, 2021 eLitmus is one of the biggest online hiring platforms and a national level assessment for all those out there looking out for entry level engineering jobs. eLitmus pH test Score card is used by companies to shortlist students for Interviews in Off Campus and On Campus Placements. Candidates can also use th...
[ { "code": null, "e": 24762, "s": 24734, "text": "\n23 Aug, 2021" }, { "code": null, "e": 25216, "s": 24762, "text": "eLitmus is one of the biggest online hiring platforms and a national level assessment for all those out there looking out for entry level engineering jobs. eLitmus...
Behind The Models: Dirichlet — How Does It Add To 1? | by Guido Vivaldi | Towards Data Science
In a previous article I presented the Dirichlet distribution as a combination of many Beta-distributed variables which add to 1.0 — this can be useful for applications where you need a “random” classifier, which is the subject of an article still in the works. Sebastian Bruijns asked the obvious question I skirted arou...
[ { "code": null, "e": 520, "s": 172, "text": "In a previous article I presented the Dirichlet distribution as a combination of many Beta-distributed variables which add to 1.0 — this can be useful for applications where you need a “random” classifier, which is the subject of an article still in the w...
Go - Quick Guide
Go is a general-purpose language designed with systems programming in mind. It was initially developed at Google in the year 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is strongly and statically typed, provides inbuilt support for garbage collection, and supports concurrent programming. Programs are const...
[ { "code": null, "e": 2239, "s": 1937, "text": "Go is a general-purpose language designed with systems programming in mind. It was initially developed at Google in the year 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is strongly and statically typed, provides inbuilt support for garbage ...
Comparing enum members in C#
To compare enum members, use the Enum.CompareTo() method. Firstly, set the values for students. enum StudentRank { Tom = 3, Henry = 2, Amit = 1 }; Now use the compareTo() method to compare one enum value with another. Console.WriteLine( "{0}{1}", student1.CompareTo(student2) > 0 ? "Yes" : "No", Environment.NewLine ); T...
[ { "code": null, "e": 1120, "s": 1062, "text": "To compare enum members, use the Enum.CompareTo() method." }, { "code": null, "e": 1158, "s": 1120, "text": "Firstly, set the values for students." }, { "code": null, "e": 1209, "s": 1158, "text": "enum StudentRan...
Search in a matrix | Practice | GeeksforGeeks
Given a matrix mat[][] of size N x M, where every row and column is sorted in increasing order, and a number X is given. The task is to find whether element X is present in the matrix or not. Example 1: Input: N = 3, M = 3 mat[][] = 3 30 38 44 52 54 57 60 69 X = 62 Output: 0 Explanation: 62 is not ...
[ { "code": null, "e": 430, "s": 238, "text": "Given a matrix mat[][] of size N x M, where every row and column is sorted in increasing order, and a number X is given. The task is to find whether element X is present in the matrix or not." }, { "code": null, "e": 442, "s": 430, "te...
The Best Way to Generate Indices in BigQuery | by Jye Sawtell-Rickson | Towards Data Science
When you stumble upon your first task of creating a histogram within BigQuery you might approach it with a simple GROUP BY, something like: SELECT hour, COUNT(*) AS num_accessesFROM accessesGROUP BY hourORDER BY hour This is fine, it does a decent job and would earn you a pat on the back from your friend...
[ { "code": null, "e": 312, "s": 172, "text": "When you stumble upon your first task of creating a histogram within BigQuery you might approach it with a simple GROUP BY, something like:" }, { "code": null, "e": 404, "s": 312, "text": "SELECT hour, COUNT(*) AS num_accessesFRO...
PDF Viewer for Python Tkinter
Python is well known for its large set of libraries and extensions, each for different features, properties and use-cases. To handle PDF files, Python provides PyPDF2 toolkit which is capable of processing, extracting, merging multiple pages, encrypting PDF files, and many more. It is a very useful Package for managing...
[ { "code": null, "e": 1578, "s": 1062, "text": "Python is well known for its large set of libraries and extensions, each for different features, properties and use-cases. To handle PDF files, Python provides PyPDF2 toolkit which is capable of processing, extracting, merging multiple pages, encrypting...
DAX Filter - CALCULATE function
Evaluates an expression in a context that is modified by the specified filters. CALCULATE (<expression>, [<filter1>], [<filter2>] ...) expression The expression to be evaluated. filter1, filter2, ... Optional. A comma separated list of Boolean expressions or a table expression that defines a filter. The value that is...
[ { "code": null, "e": 2081, "s": 2001, "text": "Evaluates an expression in a context that is modified by the specified filters." }, { "code": null, "e": 2138, "s": 2081, "text": "CALCULATE (<expression>, [<filter1>], [<filter2>] ...) \n" }, { "code": null, "e": 2149, ...
remainder() in C++
Here we will see the functionality of remainder() method of C++. The remainder() function is used to compute the floating point remainder of numerator/denominator. So the remainder(x, y) will be like below. remainder(x, y) = x – rquote * y The rquote is the value of x/y. This is rounded towards the nearest integral val...
[ { "code": null, "e": 1226, "s": 1062, "text": "Here we will see the functionality of remainder() method of C++. The remainder() function is used to compute the floating point remainder of numerator/denominator." }, { "code": null, "e": 1269, "s": 1226, "text": "So the remainder(x...
NumPy Basics Cheat Sheet (2021), Python for Data Science | by Chris Zaire | Towards Data Science
The NumPy library is the core library for scientific computation in Python. It provides a high-performance multidimensional array object and tools for working with arrays. Check out the different sections below to learn the various array functions and tools NumPy offers. Sections:1. Creating Arrays2. Inspecting Your Ar...
[ { "code": null, "e": 344, "s": 172, "text": "The NumPy library is the core library for scientific computation in Python. It provides a high-performance multidimensional array object and tools for working with arrays." }, { "code": null, "e": 444, "s": 344, "text": "Check out the ...
Detecting Credit Card Fraud using Tensorflow | by Sarah Beshr | Towards Data Science
In this article, we’ll be leveraging the power of deep learning to solve a key issue that credit card companies often have to address, namely detecting fraudulent transactions. For this task, a Deep Neural Network (DNN) will be trained in order to do exactly that. We’ll walk through the following steps: Data OverviewDa...
[ { "code": null, "e": 476, "s": 171, "text": "In this article, we’ll be leveraging the power of deep learning to solve a key issue that credit card companies often have to address, namely detecting fraudulent transactions. For this task, a Deep Neural Network (DNN) will be trained in order to do exac...
How to create GridView Layout in an Android App using Kotlin?
This example demonstrates how to create GridView Layout in an Android App 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 version="1.0" encoding="utf-8"?> ...
[ { "code": null, "e": 1150, "s": 1062, "text": "This example demonstrates how to create GridView Layout in an Android App using Kotlin." }, { "code": null, "e": 1278, "s": 1150, "text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required...
Find longest length number in a string - GeeksforGeeks
12 May, 2021 Given a string of digits and characters. Write a program to find the number with the maximum number of digits in a string. Note: The number may not be the greatest number in the string. For example, if the string is “a123bc321” then the answer can be 123 or 321 as the problem is to find the number with the...
[ { "code": null, "e": 25799, "s": 25771, "text": "\n12 May, 2021" }, { "code": null, "e": 26160, "s": 25799, "text": "Given a string of digits and characters. Write a program to find the number with the maximum number of digits in a string. Note: The number may not be the greatest...
How to check an element is exists in array or not in PHP ? - GeeksforGeeks
31 Oct, 2021 An array may contain elements belonging to different data types, integer, character, or logical type. The values can then be inspected in the array using various in-built methods : Approach 1 (Using in_array() method): The array() method can be used to declare an array. The in_array() method in PHP is used...
[ { "code": null, "e": 26217, "s": 26189, "text": "\n31 Oct, 2021" }, { "code": null, "e": 26398, "s": 26217, "text": "An array may contain elements belonging to different data types, integer, character, or logical type. The values can then be inspected in the array using various i...
Enumeration hasMoreElements() Method in Java with Examples - GeeksforGeeks
27 Jun, 2019 An object that implements the Enumeration interface generates a series of elements, one at a time. hasMoreElements() method of Enumeration used to tests if this enumeration contains more elements. If enumeration contains more element then it will return true else false. Syntax: boolean hasMoreElements() P...
[ { "code": null, "e": 25347, "s": 25319, "text": "\n27 Jun, 2019" }, { "code": null, "e": 25618, "s": 25347, "text": "An object that implements the Enumeration interface generates a series of elements, one at a time. hasMoreElements() method of Enumeration used to tests if this en...
Boyer-Moore Majority Voting Algorithm - GeeksforGeeks
24 Feb, 2022 The Boyer-Moore voting algorithm is one of the popular optimal algorithms which is used to find the majority element among the given elements that have more than N/ 2 occurrences. This works perfectly fine for finding the majority element which takes 2 traversals over the given elements, which works in O(N...
[ { "code": null, "e": 24984, "s": 24956, "text": "\n24 Feb, 2022" }, { "code": null, "e": 25336, "s": 24984, "text": "The Boyer-Moore voting algorithm is one of the popular optimal algorithms which is used to find the majority element among the given elements that have more than N...
Product of all Subarrays of an Array - GeeksforGeeks
24 Nov, 2021 Given an array of integers arr of size N, the task is to print products of all subarrays of the array. Examples: Input: arr[] = {2, 4} Output: 64 Here, subarrays are [2], [2, 4], [4] Products are 2, 8, 4 Product of all Subarrays = 64 Input : arr[] = {10, 3, 7} Output : 27783000 Here, subarrays are [10], [1...
[ { "code": null, "e": 26531, "s": 26503, "text": "\n24 Nov, 2021" }, { "code": null, "e": 26634, "s": 26531, "text": "Given an array of integers arr of size N, the task is to print products of all subarrays of the array." }, { "code": null, "e": 26644, "s": 26634, ...
C++ Program to Find Transpose of a Matrix
A matrix is a rectangular array of numbers that is arranged in the form of rows and columns. A transpose of a matrix is a new matrix in which the rows of the original are the columns now and vice versa. For example. A matrix is given below − 1 2 3 4 5 6 7 8 9 The transpose of the above matrix is as follows. 1 4 7 2 5 8...
[ { "code": null, "e": 1278, "s": 1062, "text": "A matrix is a rectangular array of numbers that is arranged in the form of rows and columns. A transpose of a matrix is a new matrix in which the rows of the original are the columns now and vice versa. For example." }, { "code": null, "e": ...
fread() function in C++ - GeeksforGeeks
16 Feb, 2021 The fread() function in C++ reads the block of data from the stream. This function first, reads the count number of objects, each one with a size of size bytes from the given input stream. The total amount of bytes reads if successful is (size*count). According to the no. of characters read, the indicator ...
[ { "code": null, "e": 23975, "s": 23947, "text": "\n16 Feb, 2021" }, { "code": null, "e": 24494, "s": 23975, "text": "The fread() function in C++ reads the block of data from the stream. This function first, reads the count number of objects, each one with a size of size bytes fro...
Learn how to master groupby function in Python now | by WY Fok | Towards Data Science
One popular feature in the Pandas package is groupby function. I believe that almost everyone using Pandas before must use groupby function also. It is so popular because it provides summarized but detailed results efficiently. As described by the doc of Pandas package, By “group by” we are referring to a process invol...
[ { "code": null, "e": 442, "s": 171, "text": "One popular feature in the Pandas package is groupby function. I believe that almost everyone using Pandas before must use groupby function also. It is so popular because it provides summarized but detailed results efficiently. As described by the doc of ...
Kernel Regression from Scratch | Kunj Mehta | Towards Data Science
Every beginner in Machine Learning starts by studying what regression means and how the linear regression algorithm works. In fact, the ease of understanding, explainability and the vast effective real-world use cases of linear regression is what makes the algorithm so famous. However, there are some situations to whic...
[ { "code": null, "e": 820, "s": 172, "text": "Every beginner in Machine Learning starts by studying what regression means and how the linear regression algorithm works. In fact, the ease of understanding, explainability and the vast effective real-world use cases of linear regression is what makes th...
Putting ML in production I: using Apache Kafka in Python. | by Javier Rodriguez Zaurin | Towards Data Science
This is the first of 2 posts where we will illustrate how one could use a series of tools (mostly Kafka and MLFlow) to help productionising ML. To that aim we will set a simple scenario that we hope resembles some real-word use-cases, and then describe a potential solution. The companion repo with all the code can be f...
[ { "code": null, "e": 502, "s": 171, "text": "This is the first of 2 posts where we will illustrate how one could use a series of tools (mostly Kafka and MLFlow) to help productionising ML. To that aim we will set a simple scenario that we hope resembles some real-word use-cases, and then describe a ...
Build Log Analytics Application using Apache Spark | by Raman Ahuja | Towards Data Science
Step by step process of developing a real world application using Apache Spark, along with main focus on explaining the architecture of Spark. Why Apache Spark Architecture if we have Hadoop? The Hadoop Distributed File System (HDFS), which stores files in a Hadoop-native format and parallelizes them across a cluster, ...
[ { "code": null, "e": 315, "s": 172, "text": "Step by step process of developing a real world application using Apache Spark, along with main focus on explaining the architecture of Spark." }, { "code": null, "e": 364, "s": 315, "text": "Why Apache Spark Architecture if we have Ha...
How to Create Query Parameters in JavaScript ? - GeeksforGeeks
18 Mar, 2020 The task is to create a query URL for GET request given a JSON object using javaScript. GET query parameters in an URL are just a string of key-value pairs connected with the symbol &. To convert a JSON object into a GET query parameter we can use the following approach. Make a variable query. Loop through...
[ { "code": null, "e": 24985, "s": 24957, "text": "\n18 Mar, 2020" }, { "code": null, "e": 25257, "s": 24985, "text": "The task is to create a query URL for GET request given a JSON object using javaScript. GET query parameters in an URL are just a string of key-value pairs connect...
HTML | DOM Window opener Properties - GeeksforGeeks
26 Jul, 2019 The Window opener property in HTML DOM is used to return the reference of newly created windows. This property is used to return the details of the source (parent) window. A window is opened using the window.open() method and closed using the window.opener.close() method. Syntax: window.opener Return Value...
[ { "code": null, "e": 25357, "s": 25329, "text": "\n26 Jul, 2019" }, { "code": null, "e": 25630, "s": 25357, "text": "The Window opener property in HTML DOM is used to return the reference of newly created windows. This property is used to return the details of the source (parent)...
PostgreSQL - Copy a Table - GeeksforGeeks
24 Jan, 2021 This article will be focusing on copying an existing table to a new table in PostgreSQL. This might come in handy while creating new tables that would either have the same data or data of the same table with certain operations performed on them. We will discuss the following 3 cases: Copy Table with the sa...
[ { "code": null, "e": 28000, "s": 27972, "text": "\n24 Jan, 2021" }, { "code": null, "e": 28246, "s": 28000, "text": "This article will be focusing on copying an existing table to a new table in PostgreSQL. This might come in handy while creating new tables that would either have ...
Get super class of an object in Java
The immediate superclass of any entity such as an object, class, primitive type, interface etc. can be obtained using the method java.lang.Class.getSuperclass(). This method contains no parameters. A program that demonstrates this is given as follows − Live Demo public class Main { public static void main(String[] ...
[ { "code": null, "e": 1260, "s": 1062, "text": "The immediate superclass of any entity such as an object, class, primitive type, interface etc. can be obtained using the method java.lang.Class.getSuperclass(). This method contains no parameters." }, { "code": null, "e": 1315, "s": 126...
Java program to swap first and last characters of words in a sentence
Following is the Java program to swap first and last characters of word in a sentence − Live Demo public class Demo { static String swap_chars(String my_str) { char[] my_ch = my_str.toCharArray(); for (int i = 0; i < my_ch.length; i++) { int k = i; while (i < my_ch.length && my_ch[i] !...
[ { "code": null, "e": 1150, "s": 1062, "text": "Following is the Java program to swap first and last characters of word in a sentence −" }, { "code": null, "e": 1161, "s": 1150, "text": " Live Demo" }, { "code": null, "e": 1789, "s": 1161, "text": "public class...
Single Number in Python
Suppose we have an array A. In this array there are many numbers that occur twice. Only one element can be found a single time. We have to find that element from that array. Suppose A = [1, 1, 5, 3, 2, 5, 2], then the output will be 3. As there is each number twice, we can perform XOR to cancel out that element. becaus...
[ { "code": null, "e": 1404, "s": 1062, "text": "Suppose we have an array A. In this array there are many numbers that occur twice. Only one element can be found a single time. We have to find that element from that array. Suppose A = [1, 1, 5, 3, 2, 5, 2], then the output will be 3. As there is each ...
Matplotlib - Working with Images
The image module in Matplotlib package provides functionalities required for loading, rescaling and displaying image. Loading image data is supported by the Pillow library. Natively, Matplotlib only supports PNG images. The commands shown below fall back on Pillow if the native read fails. The image used in this exampl...
[ { "code": null, "e": 2634, "s": 2516, "text": "The image module in Matplotlib package provides functionalities required for loading, rescaling and displaying image." }, { "code": null, "e": 2807, "s": 2634, "text": "Loading image data is supported by the Pillow library. Natively,...
Several Model Validation Techniques in Python | by Terence Shin | Towards Data Science
I wanted to write this article because I think a lot of people tend to overlook the validation and testing stage of machine learning. Similar to experimental design, it’s important that you spend enough time and use the right technique(s) to validate your ML models. Model validation goes far beyond train_test_split(), ...
[ { "code": null, "e": 540, "s": 172, "text": "I wanted to write this article because I think a lot of people tend to overlook the validation and testing stage of machine learning. Similar to experimental design, it’s important that you spend enough time and use the right technique(s) to validate your...
Number of Distinct Islands in C++
Suppose we have a binary 2D array grid, here an island is a group of 1's (land) connected 4- directionally (horizontal or vertical.) We can assume all four edges of the grid are surrounded by water. We have to count the number of distinct islands. An island is considered to be the same as another when one island can be...
[ { "code": null, "e": 1310, "s": 1062, "text": "Suppose we have a binary 2D array grid, here an island is a group of 1's (land) connected 4- directionally (horizontal or vertical.) We can assume all four edges of the grid are surrounded by water. We have to count the number of distinct islands." },...
C++ Switch Case Statement | Practice | GeeksforGeeks
Given a number N, if the number is between 1 and 10 both inclusive then return the number in words (Lower case English Alphabets) otherwise return "not in range". Example 1: Input: 5 Output: five Example 2: Input: 11 Output: not in range Your Task: You don't need to read input or print anything. Your task is to...
[ { "code": null, "e": 401, "s": 238, "text": "Given a number N, if the number is between 1 and 10 both inclusive then return the number in words (Lower case English Alphabets) otherwise return \"not in range\"." }, { "code": null, "e": 414, "s": 403, "text": "Example 1:" }, { ...
Space Science with Python — Around the Sun | Towards Data Science
This is the 6th part of my Python tutorial series “Space Science with Python”. All codes that are shown here are uploaded on GitHub. Enjoy! Space can be violent. You have probably heard of Supernovae, Black Holes with an everlasting appetite, or collisions of celestial bodies on a huge scale (even a small asteroid can ...
[ { "code": null, "e": 311, "s": 171, "text": "This is the 6th part of my Python tutorial series “Space Science with Python”. All codes that are shown here are uploaded on GitHub. Enjoy!" }, { "code": null, "e": 551, "s": 311, "text": "Space can be violent. You have probably heard ...
Extracting MAC address using Python
We know that the MAC address is a hardware address which means it is unique for the network card installed on our PC. It is always unique that means no two devices on a local network could have the same MAC addresses. The main purpose of MAC address is to provide a unique hardware address or physical address for every ...
[ { "code": null, "e": 1280, "s": 1062, "text": "We know that the MAC address is a hardware address which means it is unique for the network card installed on our PC. It is always unique that means no two devices on a local network could have the same MAC addresses." }, { "code": null, "e"...
A Graphic Guide to Implementing PPO for Atari Games | by DarylRodrigo | Towards Data Science
Written by Daryl and Daniel Learning how Proximal Policy Optimisation (PPO) works and writing a functioning version is hard. There are many places where this can go wrong — from misunderstanding the maths and mismatching tensors to having a logical error in the implementation. It took a friend and me around a month of ...
[ { "code": null, "e": 199, "s": 171, "text": "Written by Daryl and Daniel" }, { "code": null, "e": 946, "s": 199, "text": "Learning how Proximal Policy Optimisation (PPO) works and writing a functioning version is hard. There are many places where this can go wrong — from misunder...
Display flex items horizontally on a specific screen size in Bootstrap
To set flex item horizontally in different screen size, use the flex-*-row class. The varied screen sizes is set for small, medium, large and extra large screen size. Let us see how to align flex items horizontally for small screen size − <h2>Flex Row (Small Screen)</h2> <div class="d-sm-flex flex-sm-row bg-primary mb-...
[ { "code": null, "e": 1144, "s": 1062, "text": "To set flex item horizontally in different screen size, use the flex-*-row class." }, { "code": null, "e": 1301, "s": 1144, "text": "The varied screen sizes is set for small, medium, large and extra large screen size. Let us see how ...
Build and deploy your first machine learning web app | by Moez Ali | Towards Data Science
In our last post we demonstrated how to train and deploy machine learning models in Power BI using PyCaret. If you haven’t heard about PyCaret before, please read our announcement to get a quick start. In this tutorial we will use PyCaret to develop a machine learning pipeline, that will include preprocessing transform...
[ { "code": null, "e": 374, "s": 172, "text": "In our last post we demonstrated how to train and deploy machine learning models in Power BI using PyCaret. If you haven’t heard about PyCaret before, please read our announcement to get a quick start." }, { "code": null, "e": 662, "s": 37...
Drag and Drop a File feature in React JS
Drag and Drop interfaces enable web applications to allow users to drag and drop files on a web page. In this article, we will see how an application can accept one or more files that are dragged from the underlying platform's file manager and dropped on a web page. Here, we will be using the react-dropzone package. Le...
[ { "code": null, "e": 1399, "s": 1062, "text": "Drag and Drop interfaces enable web applications to allow users to drag and drop files on a web page. In this article, we will see how an application can accept one or more files that are dragged from the underlying platform's file manager and dropped o...
Program to calculate the value of nPr - GeeksforGeeks
07 May, 2021 Given two numbers n and r, the task is to find the value of nPr. nPr represents n permutation r which is calculated as n!/(n-k)!. Permutation refers to the process of arranging all the members of a given set to form a sequence. The number of permutations on a set of n elements is given by n! where “!” repr...
[ { "code": null, "e": 26179, "s": 26151, "text": "\n07 May, 2021" }, { "code": null, "e": 26505, "s": 26179, "text": "Given two numbers n and r, the task is to find the value of nPr. nPr represents n permutation r which is calculated as n!/(n-k)!. Permutation refers to the process...
Python2 vs Python3 | Syntax and performance Comparison - GeeksforGeeks
28 Oct, 2019 Python 2.x has been the most popular version for over a decade and a half. But now more and more people are switching to Python 3.x. Python3 is a lot better than Python2 and comes with many additional features. Also, Python 2.x is becoming obsolete this year. So, it is now recommended to start using Python...
[ { "code": null, "e": 25687, "s": 25659, "text": "\n28 Oct, 2019" }, { "code": null, "e": 26017, "s": 25687, "text": "Python 2.x has been the most popular version for over a decade and a half. But now more and more people are switching to Python 3.x. Python3 is a lot better than P...
Weird Number - GeeksforGeeks
08 Sep, 2021 In number theory, a weird number is a natural number that is abundant but not semiperfect. In other words, the sum of the proper divisors (divisors including 1 but not itself) of the number is greater than the number, but no subset of those divisors sums to the number itself. Given a number N, the task is ...
[ { "code": null, "e": 25979, "s": 25951, "text": "\n08 Sep, 2021" }, { "code": null, "e": 26327, "s": 25979, "text": "In number theory, a weird number is a natural number that is abundant but not semiperfect. In other words, the sum of the proper divisors (divisors including 1 but...
Python | Sorting URL on basis of Top Level Domain - GeeksforGeeks
11 May, 2020 Given a list of URL, the task is to sort the URL in the list based on the top-level domain.A top-level domain (TLD) is one of the domains at the highest level in the hierarchical Domain Name System of the Internet. Example – org, com, edu.This is mostly used in a case where we have to scrap the pages and s...
[ { "code": null, "e": 26471, "s": 26443, "text": "\n11 May, 2020" }, { "code": null, "e": 26896, "s": 26471, "text": "Given a list of URL, the task is to sort the URL in the list based on the top-level domain.A top-level domain (TLD) is one of the domains at the highest level in t...
Chain Multiple Decorators in Python - GeeksforGeeks
08 Jun, 2020 Decorator is a function which can take a function as argument and extend its functionality and returns modified function with extended functionality. So, here in this post we are going to learn about Decorator Chaining. Chaining decorators means applying more than one decorator inside a function. Python al...
[ { "code": null, "e": 25673, "s": 25645, "text": "\n08 Jun, 2020" }, { "code": null, "e": 25823, "s": 25673, "text": "Decorator is a function which can take a function as argument and extend its functionality and returns modified function with extended functionality." }, { ...