title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
[Learning Note] Single Shot MultiBox Detector with Pytorch — Part 3 | by Ceshine Lee | Towards Data Science | (Reminder: The SSD paper and the Pytorch implementation used in this post. Also, the first and second part of the series.)
Every deep learning / neural network needs a differentiable objective function to learn from. After pairing ground truths and default boxes, and marking the remaining default boxes as background, w... | [
{
"code": null,
"e": 295,
"s": 172,
"text": "(Reminder: The SSD paper and the Pytorch implementation used in this post. Also, the first and second part of the series.)"
},
{
"code": null,
"e": 547,
"s": 295,
"text": "Every deep learning / neural network needs a differentiable obj... |
PostgreSQL- CONCAT Function - GeeksforGeeks | 08 Feb, 2021
In PostgreSQL, the CONCAT function is used to concatenate two or more strings into one.
Syntax: CONCAT(string_1, string_2, ...)
Let’s analyze the above syntax:
The CONCAT function accepts a list of string convertible arguments. A string in this context means any of the following data types: char, varchar, ... | [
{
"code": null,
"e": 24138,
"s": 24110,
"text": "\n08 Feb, 2021"
},
{
"code": null,
"e": 24226,
"s": 24138,
"text": "In PostgreSQL, the CONCAT function is used to concatenate two or more strings into one."
},
{
"code": null,
"e": 24266,
"s": 24226,
"text": "Sy... |
Python List extend() Method | Python list method extend() appends the contents of seq to list.
Following is the syntax for extend() method −
list.extend(seq)
seq − This is the list of elements
seq − This is the list of elements
This method does not return any value but add the content to existing list.
The following example shows the usage of ex... | [
{
"code": null,
"e": 2309,
"s": 2244,
"text": "Python list method extend() appends the contents of seq to list."
},
{
"code": null,
"e": 2355,
"s": 2309,
"text": "Following is the syntax for extend() method −"
},
{
"code": null,
"e": 2373,
"s": 2355,
"text": "... |
Lucene - Query | Query is an abstract class and contains various utility methods and is the parent of all types of queries that Lucene uses during search process.
Following is the declaration for org.apache.lucene.search.Query class −
public abstract class Query
extends Object
implements Serializable, Cloneable
The following ... | [
{
"code": null,
"e": 1989,
"s": 1843,
"text": "Query is an abstract class and contains various utility methods and is the parent of all types of queries that Lucene uses during search process."
},
{
"code": null,
"e": 2061,
"s": 1989,
"text": "Following is the declaration for org... |
Flutter - Flexible Widget - GeeksforGeeks | 21 Feb, 2022
Flexible is a built-in widget in flutter which controls how a child of base flex widgets that are Row, Column, and Flex will fill the space available to it. The Expanded widget in flutter is shorthand of Flexible with the default fit of FlexFit.tight. Flexible widget plays a very important part in making a... | [
{
"code": null,
"e": 23964,
"s": 23936,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 24457,
"s": 23964,
"text": "Flexible is a built-in widget in flutter which controls how a child of base flex widgets that are Row, Column, and Flex will fill the space available to it. The Ex... |
Practice | GeeksforGeeks | A computer science portal for geeks | Popular Company Tags
Amazon
Microsoft
Oracle
Samsung
Adobe
Synopsys
Infosys
Cisco
Wipro
Ola-Cabs
Morgan-Stanley
Goldman-Sachs
show more
Amazon
Microsoft
Oracle
Samsung
Adobe
Synopsys
Infosys
Cisco
Wipro
Ola-Cabs
Morgan-Stanley
Goldman-Sachs
Popular Topic Tags
Maths
Array
Dynamic-Programming
Greedy-Algorithm
Hashi... | [
{
"code": null,
"e": 310,
"s": 169,
"text": "\nPopular Company Tags\n\nAmazon\nMicrosoft\nOracle\nSamsung\nAdobe\nSynopsys\nInfosys\nCisco\nWipro\nOla-Cabs\nMorgan-Stanley\nGoldman-Sachs\nshow more\n\n"
},
{
"code": null,
"e": 317,
"s": 310,
"text": "Amazon"
},
{
"code": ... |
Python - Successive Characters Frequency - GeeksforGeeks | 03 Jul, 2020
Sometimes, while working with Python strings, we can have a problem in which we need to find the frequency of next character of a particular word in string. This is quite unique problem and has the potential for application in day-day programming and web development. Let’s discuss certain ways in which thi... | [
{
"code": null,
"e": 24846,
"s": 24818,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 25178,
"s": 24846,
"text": "Sometimes, while working with Python strings, we can have a problem in which we need to find the frequency of next character of a particular word in string. This i... |
Polymorphism in Python - GeeksforGeeks | 04 Aug, 2021
What is Polymorphism: The word polymorphism means having many forms. In programming, polymorphism means the same function name (but different signatures) being used for different types.Example of inbuilt polymorphic functions :
Python3
# Python program to demonstrate in-built poly-# morphic functions # l... | [
{
"code": null,
"e": 41552,
"s": 41524,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 41782,
"s": 41552,
"text": "What is Polymorphism: The word polymorphism means having many forms. In programming, polymorphism means the same function name (but different signatures) being use... |
Set active state for Bootstrap Buttons | To set the active state for Bootstrap Buttons, use the .active class.
The button will appear pressed as in the following code
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/scripts/jquery.m... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "To set the active state for Bootstrap Buttons, use the .active class."
},
{
"code": null,
"e": 1188,
"s": 1132,
"text": "The button will appear pressed as in the following code"
},
{
"code": null,
"e": 1198,
"s": 1188... |
How to read a Pandas CSV file with no header? | To read a CSV file with no header, we can use headers in read_csv() method.
Initialize a variable file_path, i,e., CSV file path.
Use read_csv method to get the DataFrame with tab separator and with headers.
Print the DataFrame with headers.
Use read_csv method to get the DataFrame with tab separator and without header... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To read a CSV file with no header, we can use headers in read_csv() method."
},
{
"code": null,
"e": 1192,
"s": 1138,
"text": "Initialize a variable file_path, i,e., CSV file path."
},
{
"code": null,
"e": 1270,
"s": ... |
Coroutines in C/C++ | 17 May, 2022
Coroutines are general control structures where flow control is cooperatively passed between two different routines without returning. If you have used Python or C#, you may know that there is a keyword called yield that allows a loop back and forth between the caller and the called function until the call... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 May, 2022"
},
{
"code": null,
"e": 456,
"s": 54,
"text": "Coroutines are general control structures where flow control is cooperatively passed between two different routines without returning. If you have used Python or C#, you may ... |
Handling timezone in Python | 06 Jun, 2021
There are some standard libraries we can use for timezones, here we’ll use pytz. This library has a timezone class for handling arbitrary fixed offsets from UTC and timezones.
pytz is a third-party package that you have to install. To install pytz use the following command –
pip install pytz
After installa... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 228,
"s": 52,
"text": "There are some standard libraries we can use for timezones, here we’ll use pytz. This library has a timezone class for handling arbitrary fixed offsets from UTC and timezones... |
Python – Opening links using Selenium | 27 Feb, 2020
Selenium is a powerful tool for controlling the web browser through the program. It is functional for all browsers, works on all major OS and its scripts are written in various languages i.e Python, Java, C#, etc, we will be working with Python.
Selenium Python bindings provide a convenient API to access S... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 274,
"s": 28,
"text": "Selenium is a powerful tool for controlling the web browser through the program. It is functional for all browsers, works on all major OS and its scripts are written in variou... |
Maximum area of rectangle inscribed in an equilateral triangle | 24 Mar, 2021
Given an integer A, which denotes the side of an equilateral triangle, the task is to find the maximum area of the rectangle that can be inscribed in the triangle.Examples:
Input: A = 10 Output: 21.65 Explanation: Maximum area of rectangle inscribed in an equilateral triangle of side 10 is 21.65.Input: A... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Mar, 2021"
},
{
"code": null,
"e": 203,
"s": 28,
"text": "Given an integer A, which denotes the side of an equilateral triangle, the task is to find the maximum area of the rectangle that can be inscribed in the triangle.Examples: "... |
Insert data from one table to another table using PHP | 07 Apr, 2021
In this article, we are going to insert data into another table from the existing table using PHP.
Requirements:
XAMPP Webserver
PHP stands for Hypertext preprocessor. MySQL is a database query language for performing database operations. We are going to insert data from one table into another table by usi... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 152,
"s": 53,
"text": "In this article, we are going to insert data into another table from the existing table using PHP."
},
{
"code": null,
"e": 166,
"s": 152,
"text": "Requir... |
Menu-Driven program for Phone Directory | 17 Jul, 2020
Problem Statement: Write a menu-driven program for using switch-case with following features:
Store Contact numbers of people
Search for the Contact numbers using their names
Search for the Contact numbers using their number
Delete a Contact number
Update a Contact number
Examples:
Approach: The idea is to... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 146,
"s": 52,
"text": "Problem Statement: Write a menu-driven program for using switch-case with following features:"
},
{
"code": null,
"e": 178,
"s": 146,
"text": "Store Conta... |
Largest palindromic number in an array | 11 Mar, 2022
Given an array of non-negative integers arr[]. The task is to find the largest number in the array which is palindrome. If no such number exits then print -1.
Examples:
Input: arr[] = {1, 232, 54545, 999991}; Output: 54545
Input: arr[] = {1, 2, 3, 4, 5, 50}; Output: 5
Method 1:
Sort the array in ascen... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 211,
"s": 52,
"text": "Given an array of non-negative integers arr[]. The task is to find the largest number in the array which is palindrome. If no such number exits then print -1."
},
{
"... |
Collectors toList() method in Java with Examples | 06 Dec, 2018
The toList() method of Collectors Class is a static (class) method. It returns a Collector Interface that gathers the input data onto a new list. This method never guarantees type, mutability, serializability, or thread-safety of the returned list but for more control toCollection(Supplier) method can be u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 373,
"s": 28,
"text": "The toList() method of Collectors Class is a static (class) method. It returns a Collector Interface that gathers the input data onto a new list. This method never guarantees ... |
Python | Sort and store files with same extension | 29 Dec, 2020
Have you ever wanted to find any particular file in a folder, but then completely freak out when you find that folder to be a hell of a mess? Well, Python is a rescue here.Using Python OS-module and shutil module, we can organize the files with same extensions and store in separate folders.
Look at the ima... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 346,
"s": 54,
"text": "Have you ever wanted to find any particular file in a folder, but then completely freak out when you find that folder to be a hell of a mess? Well, Python is a rescue here.Us... |
How to get JavaScript stack trace when throw an exception ? - GeeksforGeeks | 02 Mar, 2020
The stack trace is a stable method to identify the error that comes into the program when the function of that program is called. It helps programmers to check where the particular error/exception comes and what is the reason behind it. Depending upon the time trace data is collected, the file size for the... | [
{
"code": null,
"e": 26109,
"s": 26081,
"text": "\n02 Mar, 2020"
},
{
"code": null,
"e": 26527,
"s": 26109,
"text": "The stack trace is a stable method to identify the error that comes into the program when the function of that program is called. It helps programmers to check whe... |
CSS border Property - GeeksforGeeks | 02 Nov, 2021
The border property in CSS is used to style the border of an element. This property is a combination of three other properties border-width, border-style, and border-color as can be used as a shorthand notation for these three properties. It sets or returns the border-width, border-style, border-color Prop... | [
{
"code": null,
"e": 29291,
"s": 29263,
"text": "\n02 Nov, 2021"
},
{
"code": null,
"e": 29616,
"s": 29291,
"text": "The border property in CSS is used to style the border of an element. This property is a combination of three other properties border-width, border-style, and bord... |
Python - Move and overwrite files and folders - GeeksforGeeks | 31 Aug, 2021
In this article, we will be learning on moving a collection of files and folders where there may be files/folders with the same name as in the source name in the destination. So that we may need to overwrite the existing destination file with the source file.
The shutil.move() method is used to move a file... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 25821,
"s": 25561,
"text": "In this article, we will be learning on moving a collection of files and folders where there may be files/folders with the same name as in the source name in the d... |
Design an Animated Toggle Switch Button using framer-motion & React - GeeksforGeeks | 12 Mar, 2021
In this article, we are going to learn how to create an animated toggle switch button using
framer-motion
React.js
Prerequisites:
NodeJS should be installedKnowledge of JavaScript (ES6).Arrow function (ES6)Ternary operatordocument.body.style.backgroundColorKnowledge of HTML/CSS.Basic knowledge of ReactJS.R... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 26163,
"s": 26071,
"text": "In this article, we are going to learn how to create an animated toggle switch button using"
},
{
"code": null,
"e": 26177,
"s": 26163,
"text":... |
ascii() in Python - GeeksforGeeks | 13 Sep, 2021
Python ascii() function returns a string containing a printable representation of an object and escapes the non-ASCII characters in the string using \x, \u or \U escapes.
Syntax: ascii(object)
The method can take only one parameter, an object that can be a list, strings, etc. As already discussed, it retu... | [
{
"code": null,
"e": 26305,
"s": 26277,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 26477,
"s": 26305,
"text": "Python ascii() function returns a string containing a printable representation of an object and escapes the non-ASCII characters in the string using \\x, \\u or \\... |
How to Get a Total Number of Days in a Month using built in Functions in C#? - GeeksforGeeks | 28 May, 2020
Given a year Y and month M, the task is to get a total number of days in a month in C#.
Examples:
Input: Y = 2020 N = 02
Output: 29
Input: Y = 1996 N = 06
Output: 30
Method 1: Using DateTime.DaysInMonth(year, month) Method: This method is used to get the number of days in the specified month and year.
... | [
{
"code": null,
"e": 25515,
"s": 25487,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 25603,
"s": 25515,
"text": "Given a year Y and month M, the task is to get a total number of days in a month in C#."
},
{
"code": null,
"e": 25613,
"s": 25603,
"text": "Ex... |
Python | Pandas DatetimeIndex.inferred_freq - GeeksforGeeks | 24 Dec, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas DatetimeIndex.inferred_freq attribute tries to return a string representing a frequenc... | [
{
"code": null,
"e": 26069,
"s": 26041,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 26283,
"s": 26069,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
Understanding Cosine Similarity And Its Application | by Richmond Alake | Towards Data Science | Learn the basics of AI and Deep Learning with TensorFlow and Keras in this Live Training Session hosted by Me.
A specific requirement within a project I’m currently undertaking required me to explore methods of quantifying the similarity between two or more objects.
The objects in this project were two images that cont... | [
{
"code": null,
"e": 283,
"s": 172,
"text": "Learn the basics of AI and Deep Learning with TensorFlow and Keras in this Live Training Session hosted by Me."
},
{
"code": null,
"e": 439,
"s": 283,
"text": "A specific requirement within a project I’m currently undertaking required ... |
How to get a variable name as a string in Python? | This isn't really something you do in Python as variables are actually name mappings to objects. The only objects in Python that have canonical names are modules, functions, and classes, and of course there is no guarantee that this canonical name has any meaning in any namespace after the function or class has been de... | [
{
"code": null,
"e": 1527,
"s": 1062,
"text": "This isn't really something you do in Python as variables are actually name mappings to objects. The only objects in Python that have canonical names are modules, functions, and classes, and of course there is no guarantee that this canonical name has a... |
A matrix probability question - GeeksforGeeks | 27 Apr, 2021
Given a rectangular matrix, we can move from current cell in 4 directions with equal probability. The 4 directions are right, left, top or bottom. Calculate the Probability that after N moves from a given position (i, j) in the matrix, we will not cross boundaries of the matrix at any point.We strongly rec... | [
{
"code": null,
"e": 24725,
"s": 24697,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 25578,
"s": 24725,
"text": "Given a rectangular matrix, we can move from current cell in 4 directions with equal probability. The 4 directions are right, left, top or bottom. Calculate the Pr... |
HTML DOM Input Password maxLength Property | The HTML DOM Input Password maxlength property is used for setting or returning the maxlength attribute of the input password field. The maxLength property specifies the maximum number of characters you can type in a password field.
Following is the syntax for −
Setting the maxLength property −
passwordObject.maxLength... | [
{
"code": null,
"e": 1295,
"s": 1062,
"text": "The HTML DOM Input Password maxlength property is used for setting or returning the maxlength attribute of the input password field. The maxLength property specifies the maximum number of characters you can type in a password field."
},
{
"code"... |
C++17 If statement with initializer | C++17 has extended existing if statement’s syntax. Now it is possible to provide initial condition within if statement itself. This new syntax is called "if statement with initializer". This enhancement simplifies common code patterns and helps users keep scopes tight. Which in turn avoids variable leaking outside the ... | [
{
"code": null,
"e": 1389,
"s": 1062,
"text": "C++17 has extended existing if statement’s syntax. Now it is possible to provide initial condition within if statement itself. This new syntax is called \"if statement with initializer\". This enhancement simplifies common code patterns and helps users ... |
Absolute difference between the first X and last X Digits of N - GeeksforGeeks | 01 Oct, 2021
Given two integers N and X. The task is to print the absolute difference between the first X and last X digits in N. Considering the number of digits is atleast 2*x.
Examples:
Input: N = 21546, X = 2
Output: 25
The first two digit in 21546 is 21.
The last two digit in 21546 is 46.
The absolute difference ... | [
{
"code": null,
"e": 24723,
"s": 24695,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 24889,
"s": 24723,
"text": "Given two integers N and X. The task is to print the absolute difference between the first X and last X digits in N. Considering the number of digits is atleast 2*... |
SQL Cheat Sheet. Starter guide for standard SQL syntax... | by Jason Lee | Towards Data Science | SQL is the most important coding language to learn for data analysis. Some might argue Python and R are equally important, but when it comes to the most common tool an Analyst must have it is SQL.
According to Dataquest.io almost all of the biggest names in tech use SQL. Uber, Netflix, Airbnb — the list goes on. Even w... | [
{
"code": null,
"e": 369,
"s": 172,
"text": "SQL is the most important coding language to learn for data analysis. Some might argue Python and R are equally important, but when it comes to the most common tool an Analyst must have it is SQL."
},
{
"code": null,
"e": 660,
"s": 369,
... |
MATLAB - Data Types - GeeksforGeeks | 04 Jul, 2021
MATLAB is a platform which provides millions of Engineers and Scientists to analyze data using programming and numerical computing algorithm and also help in creating models. Data types are particular types of data items defined by the values they can store in them, generally, in programming languages they... | [
{
"code": null,
"e": 23837,
"s": 23809,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 24155,
"s": 23837,
"text": "MATLAB is a platform which provides millions of Engineers and Scientists to analyze data using programming and numerical computing algorithm and also help in creat... |
Firebase - Write Data | In this chapter, we will show you how to save your data to Firebase.
The set method will write or replace data on a specified path. Let us create a reference to the player’s collection and set two players.
var playersRef = firebase.database().ref("players/");
playersRef.set ({
John: {
number: 1,
age: 30... | [
{
"code": null,
"e": 2235,
"s": 2166,
"text": "In this chapter, we will show you how to save your data to Firebase."
},
{
"code": null,
"e": 2372,
"s": 2235,
"text": "The set method will write or replace data on a specified path. Let us create a reference to the player’s collecti... |
Duplicate Subtrees | Practice | GeeksforGeeks | Given a binary tree of size N, your task is to that find all duplicate subtrees from the given binary tree.
Example:
Input :
Output : 2 4
4
Explanation: Above Trees are two
duplicate subtrees.i.e and
Therefore,you need to return above trees
root in the form of a list.
Your Task:
You don't need to take i... | [
{
"code": null,
"e": 356,
"s": 238,
"text": "Given a binary tree of size N, your task is to that find all duplicate subtrees from the given binary tree.\n\nExample:"
},
{
"code": null,
"e": 523,
"s": 356,
"text": "Input : \n\nOutput : 2 4\n 4\nExplanation: Above Trees are... |
How to get server_id in MySQL? | To get the server_id, use the system defined variable @@server_id. You cannot use only a single @ as user defined variable for server_id.
The syntax is as follows
SELECT@@ server_id
As an alternate, you can use SHOW VARIABLES command.
The syntax is as follows
SHOW VARIABLES LIKE ‘server_id’;
Case 1The query is as follo... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "To get the server_id, use the system defined variable @@server_id. You cannot use only a single @ as user defined variable for server_id."
},
{
"code": null,
"e": 1225,
"s": 1200,
"text": "The syntax is as follows"
},
{
"code... |
Forecasting Stock Prices using Prophet | by Yibin Ng | Towards Data Science | Forecasting is a hard science and requires substantial expertise. For these reasons Facebook open-sourced Prophet, which allows anyone with Python programming skills to implement forecasts on time series easily. You can read more about Prophet on Facebook’s blog or in the paper.
In this article, we will experiment with... | [
{
"code": null,
"e": 452,
"s": 172,
"text": "Forecasting is a hard science and requires substantial expertise. For these reasons Facebook open-sourced Prophet, which allows anyone with Python programming skills to implement forecasts on time series easily. You can read more about Prophet on Facebook... |
How to Use Amazon Textract to Read Invoices and Receipts | Towards Data Science | Getting started with AWS and Amazon Textract.
Today, we will venture out into the AWS world and have a little fun with Amazon Textract. We’ll take a scanned image of an invoice and extract information from it. Mainly, we will:
Create an AWS UserInstall the AWS CLIInstall and configure the AWS SDKUpload to S3Code!
Creat... | [
{
"code": null,
"e": 217,
"s": 171,
"text": "Getting started with AWS and Amazon Textract."
},
{
"code": null,
"e": 398,
"s": 217,
"text": "Today, we will venture out into the AWS world and have a little fun with Amazon Textract. We’ll take a scanned image of an invoice and extra... |
Top 5 Issues with Prescriptive Analytics and how to Overcome Them | by Martin Schmitz, PhD | Towards Data Science | Prescriptive analytics is somewhat like predictive analytics on steroids. As pointed out in an earlier post on this topic, prescriptive analytics is a powerful addition to your usual predictive analytics. You don’t just predict future events, but leverage this prediction to optimize your decisions. Prescriptive analyti... | [
{
"code": null,
"e": 824,
"s": 171,
"text": "Prescriptive analytics is somewhat like predictive analytics on steroids. As pointed out in an earlier post on this topic, prescriptive analytics is a powerful addition to your usual predictive analytics. You don’t just predict future events, but leverage... |
Network Programming Python - HTTP Clients - GeeksforGeeks | 25 Oct, 2020
The request from the client in HTTP protocol reaches the server and fetches some data assuming it to be a valid request. This response from the server can be analyzed by using various methods provided by the requests module. Some of the ways below provide information about the response sent from the server... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n25 Oct, 2020"
},
{
"code": null,
"e": 24260,
"s": 23901,
"text": "The request from the client in HTTP protocol reaches the server and fetches some data assuming it to be a valid request. This response from the server can be analy... |
Testing PySpark DataFrame transformations | by Eriks Dombrovskis | Towards Data Science | If you like tests — not writing a lot of them and their usefulness then you have come to the right place. I mostly write Spark code using Scala but I see that PySpark is becoming more and more dominant. Unfortunately I often see less tests when it comes to developing Spark code with Python. I think unit testing PySpark... | [
{
"code": null,
"e": 650,
"s": 171,
"text": "If you like tests — not writing a lot of them and their usefulness then you have come to the right place. I mostly write Spark code using Scala but I see that PySpark is becoming more and more dominant. Unfortunately I often see less tests when it comes t... |
Python program to find the length of the largest consecutive 1's in Binary Representation of a given string. | Given the number, find length of the longest consecutive 1's in its binary representation.
Input: n = 15
Output: 4
The binary representation of 14 is 1111.
Step 1: input the number.
Step 2: use one counter variable c=0.
Step 3: Count the number of iterations to reach i = 0.
Step 4: This operation reduces length of eve... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "Given the number, find length of the longest consecutive 1's in its binary representation."
},
{
"code": null,
"e": 1219,
"s": 1153,
"text": "Input: n = 15\nOutput: 4\nThe binary representation of 14 is 1111.\n"
},
{
"code": ... |
Creating Socket.IO Server using Express Generator - GeeksforGeeks | 12 Jun, 2020
Socket.IO is a library for real-time communication between the server and the client. In Socket.IO, the headers are shared only once and it also works on the top of the TCP layer. Web Sockets are the base of the Socket.IO library. It is easier to implement the Socket.IO in the express applications that are... | [
{
"code": null,
"e": 25470,
"s": 25442,
"text": "\n12 Jun, 2020"
},
{
"code": null,
"e": 25813,
"s": 25470,
"text": "Socket.IO is a library for real-time communication between the server and the client. In Socket.IO, the headers are shared only once and it also works on the top o... |
Aptitude | GATE CS 1998 | Question 49 - GeeksforGeeks | 12 Oct, 2017
Let A be a two dimensional array declared as follows:
A: array [1 ... 10] [1 ... 15] of integer;
Assuming that each integer takes one memory location, the array is stored in row-major order and the first element of the array is stored at location 100, what is the address of the element a[i][j] ?(A) 15i+ j+... | [
{
"code": null,
"e": 25473,
"s": 25445,
"text": "\n12 Oct, 2017"
},
{
"code": null,
"e": 25527,
"s": 25473,
"text": "Let A be a two dimensional array declared as follows:"
},
{
"code": null,
"e": 25570,
"s": 25527,
"text": "A: array [1 ... 10] [1 ... 15] of in... |
Add top rounded corners to an element in Bootstrap 4 | To add top rounded corners to an element, use the rounded-top class in Bootstrap 4.
I have taken div as the element −
<div class="new rounded-top"></div>
Let us learn how to add top rounded corners to an element −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To add top rounded corners to an element, use the rounded-top class in Bootstrap 4."
},
{
"code": null,
"e": 1180,
"s": 1146,
"text": "I have taken div as the element −"
},
{
"code": null,
"e": 1216,
"s": 1180,
"t... |
Alternate Odd and Even Nodes in a Singly Linked List - GeeksforGeeks | 21 May, 2021
Given a singly linked list, rearrange the list so that even and odd nodes are alternate in the list.There are two possible forms of this rearrangement. If the first data is odd, then the second node must be even. The third node must be odd and so on. Notice that another arrangement is possible where the fi... | [
{
"code": null,
"e": 24624,
"s": 24596,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 24995,
"s": 24624,
"text": "Given a singly linked list, rearrange the list so that even and odd nodes are alternate in the list.There are two possible forms of this rearrangement. If the firs... |
Control DJI Tello drone with Hand gestures | by Nikita Kiselov | Towards Data Science | Controlling UAVs using Hand Gestures is a pretty common theme. But most of that solutions are focused on the good old OpenCV. Hence, that is the fast solution (in case you want to run it directly on the drone), but it's pretty hard to add custom gestures or even motion one. In this article, I want to introduce the solu... | [
{
"code": null,
"e": 612,
"s": 171,
"text": "Controlling UAVs using Hand Gestures is a pretty common theme. But most of that solutions are focused on the good old OpenCV. Hence, that is the fast solution (in case you want to run it directly on the drone), but it's pretty hard to add custom gestures ... |
6 Pandas Display Options You Should Memorise | by Christopher Tao | Towards Data Science | As a Data Scientist, a Data Analyst or a Data Engineer, Pandas must be one of the most commonly used libraries in Python. It can print the Data Frame in a pretty HTML styled format for us, which is one of its major features if you’re using Jupyter Notebook/Lab or Google Colab like me.
Because Pandas use pre-defined HTM... | [
{
"code": null,
"e": 458,
"s": 172,
"text": "As a Data Scientist, a Data Analyst or a Data Engineer, Pandas must be one of the most commonly used libraries in Python. It can print the Data Frame in a pretty HTML styled format for us, which is one of its major features if you’re using Jupyter Noteboo... |
An overview of topics extraction in Python with LDA | by Félix Revert | Towards Data Science | A recurring subject in NLP is to understand large corpus of texts through topics extraction. Whether you analyze users’ online reviews, products’ descriptions, or text entered in search bars, understanding key topics will always come in handy.
Before going into the LDA method, let me remind you that not reinventing the... | [
{
"code": null,
"e": 291,
"s": 47,
"text": "A recurring subject in NLP is to understand large corpus of texts through topics extraction. Whether you analyze users’ online reviews, products’ descriptions, or text entered in search bars, understanding key topics will always come in handy."
},
{
... |
YOLOv2 Object Detection from ONNX Model in MATLAB | by Neha Goel | Towards Data Science | RoboSub is a competition run by RoboNation where students build an autonomous underwater vehicle to perform simulated search & rescue tasks. The basic task is to identify and avoid the Autonomous Underwater Vehicle (AUV) through the objects under water.
The image data used for this story is provided by Robotics Associa... | [
{
"code": null,
"e": 426,
"s": 172,
"text": "RoboSub is a competition run by RoboNation where students build an autonomous underwater vehicle to perform simulated search & rescue tasks. The basic task is to identify and avoid the Autonomous Underwater Vehicle (AUV) through the objects under water."
... |
Circuit Rank | Let 'G' be a connected graph with 'n' vertices and 'm' edges. A spanning tree 'T' of G contains (n-1) edges.
Therefore, the number of edges you need to delete from 'G' in order to get a spanning tree = m-(n-1), which is called the circuit rank of G.
This formula is true, because in a spanning tree you need to have 'n-1... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "Let 'G' be a connected graph with 'n' vertices and 'm' edges. A spanning tree 'T' of G contains (n-1) edges."
},
{
"code": null,
"e": 1312,
"s": 1171,
"text": "Therefore, the number of edges you need to delete from 'G' in order to ge... |
Count substrings with same first and last characters in C++ | We are given a string str. The goal is to count the number of substrings in str that have the same starting and ending character. For example, if input is “baca” substrings will be “b”, “a”, “c”, “a”, “aca”. Total 5.
Let us understand with examples.
Input − str=”abaefgf”
Output −Count of substrings with same first and ... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "We are given a string str. The goal is to count the number of substrings in str that have the same starting and ending character. For example, if input is “baca” substrings will be “b”, “a”, “c”, “a”, “aca”. Total 5."
},
{
"code": null,
"e":... |
How to find the row-wise frequency of zeros in an R data frame? | In data analysis, we need to be very cautious about repeated values because they might be inputted purposely to create bias in the data and this value could be a zero as well. It happens in situations when we have missing data and the data collector replaces missing values with zeros which is a wrong practice. To find ... | [
{
"code": null,
"e": 1500,
"s": 1062,
"text": "In data analysis, we need to be very cautious about repeated values because they might be inputted purposely to create bias in the data and this value could be a zero as well. It happens in situations when we have missing data and the data collector rep... |
Group MySQL rows in an array by column value? | To group rows in an array, use GROUP_CONCAT() along with the ORDER BY clause. Let us first create a table −
mysql> create table DemoTable
-> (
-> Id int,
-> FirstName varchar(20)
-> );
Query OK, 0 rows affected (0.78 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable v... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "To group rows in an array, use GROUP_CONCAT() along with the ORDER BY clause. Let us first create a table −"
},
{
"code": null,
"e": 1296,
"s": 1170,
"text": "mysql> create table DemoTable\n -> (\n -> Id int,\n -> FirstName var... |
Transform to Chessboard in C++ | Suppose we have one N x N board contains only 0s and 1s. Now in each move, we can swap any 2 rows, or any 2 columns. We have to find the minimum number of moves to transform the board into a "chessboard". If the solution does not exist, then return -1.
So if the input is like −
Then the output will be 2, as first two c... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "Suppose we have one N x N board contains only 0s and 1s. Now in each move, we can swap any 2 rows, or any 2 columns. We have to find the minimum number of moves to transform the board into a \"chessboard\". If the solution does not exist, then return -1... |
Convert.ToBoolean(String, IFormatProvider) Method in C# | The Convert.ToBoolean() method in C# is used to convert a specified value to an equivalent Boolean value.
Following is the syntax −
public static bool ToBoolean (string val, IFormatProvider provider);
Above, Val is a string that contains the value of either TrueString or FalseString, whereas the provider is an object t... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "The Convert.ToBoolean() method in C# is used to convert a specified value to an equivalent Boolean value."
},
{
"code": null,
"e": 1194,
"s": 1168,
"text": "Following is the syntax −"
},
{
"code": null,
"e": 1263,
"s"... |
How to find records with a null value in a set of columns with MySQL | For this, use the concept of GREATEST(). Let us first create a table −
mysql> create table DemoTable1862
(
Value1 int,
Value2 int,
Value3 int,
Value4 int
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1862 values(... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "For this, use the concept of GREATEST(). Let us first create a table −"
},
{
"code": null,
"e": 1286,
"s": 1133,
"text": "mysql> create table DemoTable1862\n (\n Value1 int,\n Value2 int,\n Value3 int,\n Value4 in... |
Python Map, Filter, and Reduce | by Kantajit Shaw | Towards Data Science | In Python, a function can be defined using def. Another way to write small functionality is to use lambda. Lambda functions are inline anonymous functions. It contains only one expression has no explicit return statement. Let’s see some examples.
from time import time_nsdef cubed(x): return x**3lambda_cubed = la... | [
{
"code": null,
"e": 419,
"s": 172,
"text": "In Python, a function can be defined using def. Another way to write small functionality is to use lambda. Lambda functions are inline anonymous functions. It contains only one expression has no explicit return statement. Let’s see some examples."
},
... |
Starting Point | Practice | GeeksforGeeks | You are a traveler, lost in a jungle. Backtrack your steps and find the starting point.
Currently, you are at coordinates (x,y). You are also given an array pathCoordinates [ ] where each element is a (a,b) pair.
The ith pair (a,b), in the array, denotes that in the ith move you moved your X co-ordinate by a and Y co... | [
{
"code": null,
"e": 315,
"s": 226,
"text": "You are a traveler, lost in a jungle. Backtrack your steps and find the starting point. "
},
{
"code": null,
"e": 441,
"s": 315,
"text": "Currently, you are at coordinates (x,y). You are also given an array pathCoordinates [ ] where ea... |
Matrix in R - Arithmetic Operations - GeeksforGeeks | 10 Feb, 2022
Arithmetic operations include addition (+), subtraction (-), multiplication(*), division (/) and modulus(%). In this article we are going to see the matrix creation and arithmetic operations on the matrices in R programming language.
Create first matrix
Syntax:
matrix_name <- matrix(data , nrow = value, nc... | [
{
"code": null,
"e": 25162,
"s": 25134,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 25396,
"s": 25162,
"text": "Arithmetic operations include addition (+), subtraction (-), multiplication(*), division (/) and modulus(%). In this article we are going to see the matrix creatio... |
Python | Pandas Timestamp.dayofweek - GeeksforGeeks | 08 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Timestamp.dayofweek attribute return the value of day of the week in the given Timesta... | [
{
"code": null,
"e": 24215,
"s": 24187,
"text": "\n08 Jan, 2019"
},
{
"code": null,
"e": 24429,
"s": 24215,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
PHP - Function openssl_pkey_export_to_file() | The openssl_pkey_export_to_file() function will export the key to a file.
The openssl_pkey_export_to_file() function saves the key in a PEM format.PEM stands for Privacy-Enhanced Mail and it mainly stores cryptographic keys and certificates.
openssl_pkey_export_to_file ( mixed $key , string $outfilename [, string $pas... | [
{
"code": null,
"e": 2831,
"s": 2757,
"text": "The openssl_pkey_export_to_file() function will export the key to a file."
},
{
"code": null,
"e": 3000,
"s": 2831,
"text": "The openssl_pkey_export_to_file() function saves the key in a PEM format.PEM stands for Privacy-Enhanced Mai... |
C# Enum GetNames Method | The GetNames() returns the array of names of the constants in the Enumeration.
The following is the enum.
enum Stock { Watches, Books, Grocery };
To get the array of names, use the GetNames() and loop through as shown below −
foreach(string s in Enum.GetNames(typeof(Stock))) {
}
Let us see the complete example now.
Li... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "The GetNames() returns the array of names of the constants in the Enumeration."
},
{
"code": null,
"e": 1168,
"s": 1141,
"text": "The following is the enum."
},
{
"code": null,
"e": 1208,
"s": 1168,
"text": "enum ... |
Kth element in Matrix | Practice | GeeksforGeeks | Given a N x N matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the matrix.
Input:
N = 4
mat[][] = {{16, 28, 60, 64},
{22, 41, 63, 91},
{27, 50, 87, 93},
{36, 78, 87, 94 }}
K = 3
Output: 27
Explanation: 27 ... | [
{
"code": null,
"e": 367,
"s": 238,
"text": "Given a N x N matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the matrix."
},
{
"code": null,
"e": 587,
"s": 367,
"text": "Input:\nN = 4\nmat[][] = {{16, 28, 60, 64},\n ... |
Visualizing Multiple Linear Regression with Heatmaps | by Robert Wood | Towards Data Science | No matter your exposure to data science & the world of statistics, it’s likely that at some point, you’ve at the very least heard of regression. As a precursor to this quick lesson on multiple regression, you should have some familiarity with simple linear regression. If you aren’t, you can start here! Otherwise, let’s... | [
{
"code": null,
"e": 534,
"s": 172,
"text": "No matter your exposure to data science & the world of statistics, it’s likely that at some point, you’ve at the very least heard of regression. As a precursor to this quick lesson on multiple regression, you should have some familiarity with simple linea... |
Structs in Arduino program | A struct is simply a collection of different types of variable. Structs in Arduino mimic the structs in C language. So, if you are familiar with C structs, Arduino structs shouldn’t be an issue. The struct declaration syntax is as follows −
Syntax
struct structName{
item1_type item1_name;
item2_type item2_name;
... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "A struct is simply a collection of different types of variable. Structs in Arduino mimic the structs in C language. So, if you are familiar with C structs, Arduino structs shouldn’t be an issue. The struct declaration syntax is as follows −"
},
{
... |
ios manipulators fixed() function in C++ - GeeksforGeeks | 02 Sep, 2019
The fixed() method of stream manipulators in C++ is used to set the floatfield format flag for the specified str stream. This flag sets the floatfield to fixed. It means that the floating-point values will be written in fixed point notations.
Syntax:
ios_base& fixed (ios_base& str)
Parameters: This method... | [
{
"code": null,
"e": 24353,
"s": 24325,
"text": "\n02 Sep, 2019"
},
{
"code": null,
"e": 24596,
"s": 24353,
"text": "The fixed() method of stream manipulators in C++ is used to set the floatfield format flag for the specified str stream. This flag sets the floatfield to fixed. It... |
WSDL - Example | Given below is a WSDL file that is provided to demonstrate a simple WSDL program.
Let us assume the service provides a single publicly available function, called sayHello. This function expects a single string parameter and returns a single string greeting. For example, if you pass the parameter world then service func... | [
{
"code": null,
"e": 1886,
"s": 1804,
"text": "Given below is a WSDL file that is provided to demonstrate a simple WSDL program."
},
{
"code": null,
"e": 2177,
"s": 1886,
"text": "Let us assume the service provides a single publicly available function, called sayHello. This funct... |
JQueryUI | dialog - GeeksforGeeks | 31 Oct, 2019
The Dialog box is the way to inform the user about something. It is a nice way to popup on the user window to show the information that will happen in the next or any kind of information developer wants to clarify to the user should know. jQueryUI dialog method is used to create a basic dialog window insid... | [
{
"code": null,
"e": 25099,
"s": 25071,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 25523,
"s": 25099,
"text": "The Dialog box is the way to inform the user about something. It is a nice way to popup on the user window to show the information that will happen in the next or ... |
Number of sub-sequences of non-zero length of a binary string divisible by 3 - GeeksforGeeks | 13 May, 2021
Given a binary string S of length N, the task is to find the number of sub-sequences of non-zero length which are divisible by 3. Leading zeros in the sub-sequences are allowed.Examples:
Input: S = “1001” Output: 5 “11”, “1001”, “0”, “0” and “00” are the only subsequences divisible by 3.Input: S = “1” Ou... | [
{
"code": null,
"e": 24672,
"s": 24644,
"text": "\n13 May, 2021"
},
{
"code": null,
"e": 24861,
"s": 24672,
"text": "Given a binary string S of length N, the task is to find the number of sub-sequences of non-zero length which are divisible by 3. Leading zeros in the sub-sequence... |
A Real-Time Product Recommender in Python | by Abhijit Roy | Towards Data Science | We probably can agree, those of us who are familiar with E-Shopping, have experience of shopping at Amazon. Over the years it has undoubtedly become one of the largest E-Shopping hubs. So, when we search for something, we can rely on Amazon’s Search Algorithms to provide us with several best choices, available based on... | [
{
"code": null,
"e": 647,
"s": 172,
"text": "We probably can agree, those of us who are familiar with E-Shopping, have experience of shopping at Amazon. Over the years it has undoubtedly become one of the largest E-Shopping hubs. So, when we search for something, we can rely on Amazon’s Search Algor... |
JavaFX - CSS | Cascading Style Sheets, also referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable.
CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, style of fonts, spacing between paragraphs, size of columns and layout. Apart... | [
{
"code": null,
"e": 2043,
"s": 1900,
"text": "Cascading Style Sheets, also referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable."
},
{
"code": null,
"e": 2417,
"s": 2043,
"text": "CSS handles the look and feel part of a... |
enum in Python - GeeksforGeeks | 22 Jan, 2022
Enumerations in Python are implemented by using the module named “enum“.Enumerations are created using classes. Enums have names and values associated with them.Properties of enum:1. Enums can be displayed as string or repr.2. Enums can be checked for their types using type().3. “name” keyword is used to d... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n22 Jan, 2022"
},
{
"code": null,
"e": 24271,
"s": 23927,
"text": "Enumerations in Python are implemented by using the module named “enum“.Enumerations are created using classes. Enums have names and values associated with them.Pr... |
VBA - Switch Statement | When a user wants to execute a group of statements depending upon a value of an Expression, then Switch Case is used. Each value is called a Case, and the variable is being switched ON based on each case. Case Else statement is executed if the test expression doesn't match any of the Case specified by the user.
Case El... | [
{
"code": null,
"e": 2248,
"s": 1935,
"text": "When a user wants to execute a group of statements depending upon a value of an Expression, then Switch Case is used. Each value is called a Case, and the variable is being switched ON based on each case. Case Else statement is executed if the test expr... |
How to plot two histograms side by side using Matplotlib? | To plot two histograms side by side using matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Make two dataframes, df1 and df2, of two-dimensional, size-mutable, potentially ... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To plot two histograms side by side using matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1226,
"s": 1150,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"cod... |
Export WhatsApp Chat History to Excel Using Python - GeeksforGeeks | 18 Nov, 2021
In this article, we will discuss how to export a specific user’s chats to an Excel sheet. To export the chats, we will use several Python modules and libraries.
In the Excel file, we will create four columns: Date, Time, Name, and Message. We’ll create these columns through Pandas, export all the chat det... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 24089,
"s": 23927,
"text": "In this article, we will discuss how to export a specific user’s chats to an Excel sheet. To export the chats, we will use several Python modules and libraries. "
... |
Java Program to Sort Names in an Alphabetical Order - GeeksforGeeks | 04 Jan, 2021
For, sorting names in an Alphabetical order there are multiple ways to sort the array, like using inbuilt Arrays.sort() method or using normal sorting algorithms like the bubble sort, merge sort. Here let’s use the bubble sort and inbuilt sort.
Example:
Input : Array[] = {"Sourabh", "Anoop, "Harsh", "Alok"... | [
{
"code": null,
"e": 23893,
"s": 23865,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 24138,
"s": 23893,
"text": "For, sorting names in an Alphabetical order there are multiple ways to sort the array, like using inbuilt Arrays.sort() method or using normal sorting algorithms l... |
Creating an interactive dashboard with Dash Plotly using crime data | by Xiao Wang | Towards Data Science | My previous article briefly introduced how to develop a simple dashboard with Dash. As a big fan of visualisation, a dashboard like that wouldn’t make me happy. I explored a bit further this week and would like to make an interactive dashboard like what we can usually do with PowerBI or Tableau.
Acknowledgement: This w... | [
{
"code": null,
"e": 468,
"s": 171,
"text": "My previous article briefly introduced how to develop a simple dashboard with Dash. As a big fan of visualisation, a dashboard like that wouldn’t make me happy. I explored a bit further this week and would like to make an interactive dashboard like what w... |
SAS : How to Display Current Date? - GeeksforGeeks | 30 Jul, 2019
The today() function of SAS programming is basically used to generate current date. The format() function is used to display the format of the date in the specified format.
In DD-MMM-YYYY format:Example:data _null_; dt=today(); format dt yymmdd10.; put dt ;run;Output:In DDMMMYYYY format:Example:da... | [
{
"code": null,
"e": 24744,
"s": 24716,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 24917,
"s": 24744,
"text": "The today() function of SAS programming is basically used to generate current date. The format() function is used to display the format of the date in the specifie... |
How to use TorchText for neural machine translation, plus hack to make it 5x faster | by Samuel Lynn-Evans | Towards Data Science | Processing text is the first step toward any successful project in NLP, and fortunately the tools to help us here are growing evermore sophisticated.
For my first deep-learning project, I built a high-functioning English-French translator and wouldn’t have been able to do so without the TorchText library. Ok, maybe tha... | [
{
"code": null,
"e": 322,
"s": 172,
"text": "Processing text is the first step toward any successful project in NLP, and fortunately the tools to help us here are growing evermore sophisticated."
},
{
"code": null,
"e": 589,
"s": 322,
"text": "For my first deep-learning project, ... |
Data Structures and Algorithms | Set 16 - GeeksforGeeks | 27 Mar, 2017
Following questions have been asked in GATE CS 2009 exam.
1. Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap?(A) 25,12,16,13,10,8,14(B) 25,14,13,16,10,8,12(C) 25,14,16,13,10,8,12(D) 25,14,12,13,10,8,16
Answer (C)
A tree is max-heap if dat... | [
{
"code": null,
"e": 24408,
"s": 24380,
"text": "\n27 Mar, 2017"
},
{
"code": null,
"e": 24466,
"s": 24408,
"text": "Following questions have been asked in GATE CS 2009 exam."
},
{
"code": null,
"e": 24679,
"s": 24466,
"text": "1. Consider a binary max-heap im... |
Retention and Daily Active Users Explained. | by 💡Mike Shakhomirov | Towards Data Science | Have you ever wondered how to reduce user churn and save money spent on user acquisition? This article is about how to count those users who stay in your App in order to understand what makes them stay.
Marketers who have been tasked to create custom user retention dashboards.
Analysts who might want to create better r... | [
{
"code": null,
"e": 374,
"s": 171,
"text": "Have you ever wondered how to reduce user churn and save money spent on user acquisition? This article is about how to count those users who stay in your App in order to understand what makes them stay."
},
{
"code": null,
"e": 449,
"s": 3... |
Formik for form handling in React.js | Purpose of formic is to remove the complexity of form handling in react and make form submission simpler.
Formic uses yup to validate the form fields which is very simple to use
First install the formic library
npm install –save formic
import React, { Component} from 'react';
import { Formik, FormikProps, Form, Field, ... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "Purpose of formic is to remove the complexity of form handling in react and make form submission simpler."
},
{
"code": null,
"e": 1240,
"s": 1168,
"text": "Formic uses yup to validate the form fields which is very simple to use"
}... |
How to close the pop up window in selenium running? | We can close the pop up window with Selenium. The getWindowHandles and getWindowHandle methods are used for the pop up window. To store all the window handles opened in a Set data structure, the getWindowHandles method is used.
To store the window handle of the pop up in focus, the getWindowHandle method is used. To it... | [
{
"code": null,
"e": 1290,
"s": 1062,
"text": "We can close the pop up window with Selenium. The getWindowHandles and getWindowHandle methods are used for the pop up window. To store all the window handles opened in a Set data structure, the getWindowHandles method is used."
},
{
"code": nul... |
Brownian motion with Python. We show how to emulate Brownian motion... | by Tirthajyoti Sarkar | Towards Data Science | Disclaimer: The inspiration for this article stemmed from Georgia Tech’s Online Masters in Analytics (OMSA) program study material. I am proud to pursue this excellent Online MS program. You can also check the details here.
Brownian motion, or pedesis, is the randomized motion of molecular-sized particles suspended in ... | [
{
"code": null,
"e": 396,
"s": 172,
"text": "Disclaimer: The inspiration for this article stemmed from Georgia Tech’s Online Masters in Analytics (OMSA) program study material. I am proud to pursue this excellent Online MS program. You can also check the details here."
},
{
"code": null,
... |
JSF - Display DataTable | h:dataTable tag is used to display data in a tabular fashion.
<h:dataTable value = "#{userData.employees}" var = "employee"
styleClass = "employeeTable"
headerClass = "employeeTableHeader"
rowClasses = "employeeTableOddRow,employeeTableEvenRow">
<h:column>
<f:facet name = "header">Name</f:... | [
{
"code": null,
"e": 2014,
"s": 1952,
"text": "h:dataTable tag is used to display data in a tabular fashion."
},
{
"code": null,
"e": 2660,
"s": 2014,
"text": "<h:dataTable value = \"#{userData.employees}\" var = \"employee\"\n styleClass = \"employeeTable\"\n headerClass = \... |
How I integrated the Instagram Private API in React Native | by Jeff Flynt | Towards Data Science | Being a developer, I always try to automate tasks wherever I can. One such place that seemed interesting to automate was Instagram. I stumbled across this repo on Github: https://github.com/dilame/instagram-private-api. It provides a NodeJS Instagram private API client. I created a new npm project with this library loc... | [
{
"code": null,
"e": 603,
"s": 172,
"text": "Being a developer, I always try to automate tasks wherever I can. One such place that seemed interesting to automate was Instagram. I stumbled across this repo on Github: https://github.com/dilame/instagram-private-api. It provides a NodeJS Instagram priv... |
Number of ways to write N as a sum of K non-negative integers - GeeksforGeeks | 12 Jul, 2021
Given two positive integers N and K, the task is to count the number of ways to write N as a sum of K non-negative integers.
Examples:
Input: N = 2, K = 3 Output: 6 Explanation: The total ways in which 2 can be split into K non-negative integers are: 1. (0, 0, 2) 2. (0, 2, 0) 3. (2, 0, 0) 4. (0, 1, 1) 5. ... | [
{
"code": null,
"e": 25181,
"s": 25153,
"text": "\n12 Jul, 2021"
},
{
"code": null,
"e": 25306,
"s": 25181,
"text": "Given two positive integers N and K, the task is to count the number of ways to write N as a sum of K non-negative integers."
},
{
"code": null,
"e": 2... |
Mobile Angular UI - Creating APK File | In this chapter, we will create an apk file of the Mobile Angular UI app. We are going to make use of app setup done using cordova and phonegap in the previous chapter. So please check the previous chapter about App Setup using PhoneGap and Cordova where we have already installed cordova, phonegap and created Mobile An... | [
{
"code": null,
"e": 2656,
"s": 2311,
"text": "In this chapter, we will create an apk file of the Mobile Angular UI app. We are going to make use of app setup done using cordova and phonegap in the previous chapter. So please check the previous chapter about App Setup using PhoneGap and Cordova wher... |
HTML | datetime Attribute - GeeksforGeeks | 15 Jul, 2021
The HTML datetime Attribute is used to specify the date and time of the inserted and the deleted text. It also represents the date and time of the <time> element. Syntax:
<element datetime="YYYY-MM-DDThh:mm:ssTZD">
Attribute Values: This attribute contains single value YYYY-MM-DDThh:mm:ssTZD which is us... | [
{
"code": null,
"e": 24307,
"s": 24279,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 24480,
"s": 24307,
"text": "The HTML datetime Attribute is used to specify the date and time of the inserted and the deleted text. It also represents the date and time of the <time> element. ... |
Palindrome numbers | Practice | GeeksforGeeks | Check if the binary representation of a number is palindrome or not.
Example 1:
Input:
N = 17
Output:
1
Explanation:
(17)10 = (10001)2
Which is pallindrome hence
output is 1.
Example 2:
Input:
N = 16
Output:
0
Explanation:
(16)10 = (10000)2
Which is not pallindrome
hence output is 0.
Your Task:
You don't need to... | [
{
"code": null,
"e": 309,
"s": 238,
"text": "Check if the binary representation of a number is palindrome or not.\n "
},
{
"code": null,
"e": 320,
"s": 309,
"text": "Example 1:"
},
{
"code": null,
"e": 417,
"s": 320,
"text": "Input:\nN = 17\nOutput:\n1\nExplan... |
Power of 2 | Practice | GeeksforGeeks | Given a non-negative integer N. The task is to check if N is a power of 2. More formally, check if N can be expressed as 2x for some x.
Example 1:
Input: N = 1
Output: YES
Explanation:1 is equal to 2
raised to 0 (20 = 1).
Example 2:
Input: N = 98
Output: NO
Explanation: 98 cannot be obtained
by any power of 2.
Your T... | [
{
"code": null,
"e": 374,
"s": 238,
"text": "Given a non-negative integer N. The task is to check if N is a power of 2. More formally, check if N can be expressed as 2x for some x."
},
{
"code": null,
"e": 385,
"s": 374,
"text": "Example 1:"
},
{
"code": null,
"e": 46... |
HTML | rows Attribute - GeeksforGeeks | 06 Dec, 2021
The rows attribute in HTML is used to specify the number of visible text lines for the control i.e the number of rows to display.Note: This attribute is only applicable on <textarea>.Syntax:
<textarea rows = "value">Text content...</textarea>
Attribute Values: It’s default value is 2. It contains a numer... | [
{
"code": null,
"e": 23210,
"s": 23182,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 23403,
"s": 23210,
"text": "The rows attribute in HTML is used to specify the number of visible text lines for the control i.e the number of rows to display.Note: This attribute is only appli... |
Designing a Machine Learning model and deploying it using Flask on Heroku | by Ritvik Khanna | Towards Data Science | We build a prediction model on historic data using different machine learning algorithms and classifiers, plot the results and calculate the accuracy of the model on the testing data. Now what? To put it to use in order to predict the new data we have to deploy it over the internet so that the outside world can use it.... | [
{
"code": null,
"e": 636,
"s": 172,
"text": "We build a prediction model on historic data using different machine learning algorithms and classifiers, plot the results and calculate the accuracy of the model on the testing data. Now what? To put it to use in order to predict the new data we have to ... |
Extracting data from various sheets with Python | by Fabian Bosler | Towards Data Science | Python is often called a glue language. This is due to the fact that a plethora of interface libraries and features have been developed over time — driven by its widespread usage and an amazing, extensive open-source community. Those libraries and features give straightforward access to different file formats, but also... | [
{
"code": null,
"e": 539,
"s": 172,
"text": "Python is often called a glue language. This is due to the fact that a plethora of interface libraries and features have been developed over time — driven by its widespread usage and an amazing, extensive open-source community. Those libraries and feature... |
Using Pandas pipe function to improve code readability | by B. Chen | Towards Data Science | In Data Processing, it is often necessary to write a function to perform operations (such as statistical calculations, splitting, or substituting value) on a certain row or column to obtain new data.
Instead of writing
# f(), g(), and h() are user-defined function# df is a Pandas DataFramef(g(h(df), arg1=a), arg2=b, ar... | [
{
"code": null,
"e": 371,
"s": 171,
"text": "In Data Processing, it is often necessary to write a function to perform operations (such as statistical calculations, splitting, or substituting value) on a certain row or column to obtain new data."
},
{
"code": null,
"e": 390,
"s": 371,... |
An Insertion Sort time complexity question in C++ | Time complexity is the amount of time taken by a set of codes or algorithms to process or run as a function of the amount of input.
For insertion sort, the time complexity is of the order O(n) i.e. big O of n in best case scenario. And in the average or worst case scenario the complexity is of the order O(n2).
The time... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "Time complexity is the amount of time taken by a set of codes or algorithms to process or run as a function of the amount of input."
},
{
"code": null,
"e": 1374,
"s": 1194,
"text": "For insertion sort, the time complexity is of the ... |
Program to count digits in an integer (4 Different Methods) - GeeksforGeeks | 20 Aug, 2021
Count the number of digits in a long integer entered by a user.
Simple Iterative Solution The integer entered by the user is stored in the variable n. Then the while loop is iterated until the test expression n != 0 is evaluated to 0 (false).
After the first iteration, the value of n will be 345 and the c... | [
{
"code": null,
"e": 25100,
"s": 25072,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 25164,
"s": 25100,
"text": "Count the number of digits in a long integer entered by a user."
},
{
"code": null,
"e": 25344,
"s": 25164,
"text": "Simple Iterative Solution ... |
8 Bash Script Tips for Automation Projects | by Shinichi Okada | Towards Data Science | Using Bash script, I have automated Backpack for Laravel modules for installation/uninstallation. From this project, I selected eight practical tips that you can apply to any Bash scripting project.
Laravel is the most popular PHP framework. Backpack for Laravel is a collection of Laravel packages that help you build c... | [
{
"code": null,
"e": 371,
"s": 172,
"text": "Using Bash script, I have automated Backpack for Laravel modules for installation/uninstallation. From this project, I selected eight practical tips that you can apply to any Bash scripting project."
},
{
"code": null,
"e": 616,
"s": 371,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.