title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python - Negative Binomial Discrete Distribution in Statistics - GeeksforGeeks | 10 Jan, 2020
scipy.stats.nbinom() is a Negative binomial discrete random variable. It is inherited from the of generic methods as an instance of the rv_discrete class. It completes the methods with details specific for this particular distribution.
Parameters :
x : quantilesloc : [optional]location parameter. Default =... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n10 Jan, 2020"
},
{
"code": null,
"e": 24137,
"s": 23901,
"text": "scipy.stats.nbinom() is a Negative binomial discrete random variable. It is inherited from the of generic methods as an instance of the rv_discrete class. It compl... |
Machine Learning Web Application Deployment in 5 steps | by Harsh Rana | Towards Data Science | Let me paint you a picture:
You spent 2 months of your life working on a very exciting data science application. It involved advanced data collection, time-consuming data wrangling, hours of training and endless model micro-optimizations. Once you were finished, you had something that you were truly happy with. But tod... | [
{
"code": null,
"e": 199,
"s": 171,
"text": "Let me paint you a picture:"
},
{
"code": null,
"e": 843,
"s": 199,
"text": "You spent 2 months of your life working on a very exciting data science application. It involved advanced data collection, time-consuming data wrangling, hour... |
Progressive Learning and Network Growing in TensorFlow | by Viviane | Towards Data Science | In many real world applications new training data becomes available after a network has already been trained. Especially with big neural networks, it would be very tedious to retrain the complete model every time new information becomes available. It would be much easier to simply add new nodes to the network for each ... | [
{
"code": null,
"e": 719,
"s": 172,
"text": "In many real world applications new training data becomes available after a network has already been trained. Especially with big neural networks, it would be very tedious to retrain the complete model every time new information becomes available. It woul... |
How to repeat a string in JavaScript? | There are two ways to repeat a string in javascript. One way is to use string.repeat() method and the other way is to use the fill() method. Let's discuss them in detail.
string.repeat(number);
This method takes a number as a parameter and repeats the string those many numbers of times.
Array(number).fill(string).join(... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "There are two ways to repeat a string in javascript. One way is to use string.repeat() method and the other way is to use the fill() method. Let's discuss them in detail."
},
{
"code": null,
"e": 1256,
"s": 1233,
"text": "string.repe... |
Grouping Operators in LINQ | The operators put data into some groups based on a common shared attribute.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Operators {
class Program {
static void Main(string[] args) {
List<int> numbers = new List<int>() { 35, 44, 200, 84, 3987,... | [
{
"code": null,
"e": 1812,
"s": 1736,
"text": "The operators put data into some groups based on a common shared attribute."
},
{
"code": null,
"e": 2509,
"s": 1812,
"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Oper... |
How to catch SyntaxError Exception in Python? | A SyntaxError occurs any time the parser finds source code it does not understand. This can be while importing a module, invoking exec, or calling eval(). Attributes of the exception can be used to find exactly what part of the input text caused the exception.
We rewrite the given code to handle the exception and find ... | [
{
"code": null,
"e": 1323,
"s": 1062,
"text": "A SyntaxError occurs any time the parser finds source code it does not understand. This can be while importing a module, invoking exec, or calling eval(). Attributes of the exception can be used to find exactly what part of the input text caused the exc... |
Tensorflow GPU installation made easy: Ubuntu Version | by Harveen Singh Chadha | Towards Data Science | Installing Tensorflow GPU on ubuntu is a challenge with the correct versions of cuda and cudnn. A year back, I wrote an article that discussed about installation of Tensorflow GPU with conda instead of pip with a single line command. Here is a link to that article.
towardsdatascience.com
This article has been read more... | [
{
"code": null,
"e": 437,
"s": 171,
"text": "Installing Tensorflow GPU on ubuntu is a challenge with the correct versions of cuda and cudnn. A year back, I wrote an article that discussed about installation of Tensorflow GPU with conda instead of pip with a single line command. Here is a link to tha... |
How do I find the location of my Python site-packages directory? | You can find the location of Python site-packages directory by using the site module in the following way −
>>> import site
>>> site.getsitepackages()
['/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
If you want the per user site packages directory, then run the following code in your shel... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "You can find the location of Python site-packages directory by using the site module in the following way −"
},
{
"code": null,
"e": 1292,
"s": 1170,
"text": ">>> import site\n>>> site.getsitepackages()\n['/usr/local/lib/python2.7/di... |
Classification of Hotel Cancellations Using KNN and SMOTE | by Michael Grogan | Towards Data Science | In this particular example, the KNN algorithm is used to classify hotel bookings in terms of cancellation risk (1 = model predicts that the customer will cancel their booking, 0 = customer is not predicted to cancel their booking).
Given that this dataset is unbalanced, i.e. there are more 0s (non-cancellations) than 1... | [
{
"code": null,
"e": 404,
"s": 172,
"text": "In this particular example, the KNN algorithm is used to classify hotel bookings in terms of cancellation risk (1 = model predicts that the customer will cancel their booking, 0 = customer is not predicted to cancel their booking)."
},
{
"code": n... |
Python program to find difference between two timestamps | Suppose we have two times in this format "Day dd Mon yyyy hh:mm:ss +/-xxxx", where Day is three letter day whose first letter is in uppercase. Mon is the name of month in three letters and finally + or - xxxx represents the timezone for example +0530 indicates it is 5 hours 30 minutes more than GMT (other formats like ... | [
{
"code": null,
"e": 1491,
"s": 1062,
"text": "Suppose we have two times in this format \"Day dd Mon yyyy hh:mm:ss +/-xxxx\", where Day is three letter day whose first letter is in uppercase. Mon is the name of month in three letters and finally + or - xxxx represents the timezone for example +0530 ... |
Program to find correlation coefficient in C++ | In this tutorial, we will be discussing a program to find correlation coefficient.
For this we will be provided with two arrays. Our task is to find the correlation coefficient denoting the strength of the relation between the given values.
Live Demo
#include<bits/stdc++.h>
using namespace std;
//function returning co... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find correlation coefficient."
},
{
"code": null,
"e": 1303,
"s": 1145,
"text": "For this we will be provided with two arrays. Our task is to find the correlation coefficient denot... |
How to change autopct text color to be white in a pie chart in Matplotlib? | To change the autopct text color to be white in a pie chart in Matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Make a list of hours,
activities, and colors to plot pie chart.
Make a list of '.Text' instances for the numeric labels, while making t... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To change the autopct text color to be white in a pie chart in Matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1247,
"s": 1171,
"text": "Set the figure size and adjust the padding between and around the subplot... |
Kedro — A Python Framework for Reproducible Data Science Project | by Khuyen Tran | Towards Data Science | Have you ever passed your data to a list of functions and classes without knowing for sure how the output is like?
You might try to save the data then check it in your Jupyter Notebook to make sure the output is as you expected. This approach works, but it is cumbersome.
Another common issue is that it’s hard to unders... | [
{
"code": null,
"e": 286,
"s": 171,
"text": "Have you ever passed your data to a list of functions and classes without knowing for sure how the output is like?"
},
{
"code": null,
"e": 443,
"s": 286,
"text": "You might try to save the data then check it in your Jupyter Notebook t... |
How to convert String to StringBuilder and vice versa Java? | The String type is a class in Java, it is used to represent a set of characters. Strings in Java are immutable, you cannot change the value of a String once created.
Since a String is immutable, if you try to reassign the value of a String. The reference of it will be pointed to the new String object leaving an unused ... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "The String type is a class in Java, it is used to represent a set of characters. Strings in Java are immutable, you cannot change the value of a String once created."
},
{
"code": null,
"e": 1404,
"s": 1228,
"text": "Since a String i... |
MySQL Sum Query with IF Condition? | The Sum() is an aggregate function in MySQL. You can use sum query with if condition. To understand the sum query with if condition, let us create a table.
The query to create a table −
mysql> create table SumWithIfCondition
−> (
−> ModeOfPayment varchar(100)
−> ,
−> Amount int
−> );
Query OK, 0 rows aff... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "The Sum() is an aggregate function in MySQL. You can use sum query with if condition. To understand the sum query with if condition, let us create a table."
},
{
"code": null,
"e": 1248,
"s": 1218,
"text": "The query to create a tabl... |
Draw Multiple Overlaid Histograms with ggplot2 Package in R - GeeksforGeeks | 17 Jun, 2021
In this article, we are going to see how to draw multiple overlaid histograms with the ggplot2 package in the R programming language.
We will be drawing multiple overlaid histograms using the alpha argument of the geom_histogram() function from ggplot2 package. In this approach for drawing multiple overlai... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 24985,
"s": 24851,
"text": "In this article, we are going to see how to draw multiple overlaid histograms with the ggplot2 package in the R programming language."
},
{
"code": null,
... |
Web2py - Introduction | web2py is defined as a free, open-source web framework for agile development which involves database-driven web applications; it is written in Python and programmable in Python. It is a full-stack framework; it consists of all the necessary components, a developer needs to build a fully functional web application.
web2... | [
{
"code": null,
"e": 2209,
"s": 1893,
"text": "web2py is defined as a free, open-source web framework for agile development which involves database-driven web applications; it is written in Python and programmable in Python. It is a full-stack framework; it consists of all the necessary components, ... |
Area Calculation - Online Quiz | Following quiz provides Multiple Choice Questions (MCQs) related to Area Calculation. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in ... | [
{
"code": null,
"e": 4222,
"s": 3892,
"text": "Following quiz provides Multiple Choice Questions (MCQs) related to Area Calculation. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer but... |
C# Arrays | Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each
value.
To declare an array, define the variable type with square brackets:
string[] cars;
We have now declared a variable that holds an array of strings.
To insert values to it, we can use an array literal ... | [
{
"code": null,
"e": 120,
"s": 0,
"text": "Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each \nvalue."
},
{
"code": null,
"e": 188,
"s": 120,
"text": "To declare an array, define the variable type with square brackets:... |
Selenium - Drop Down Interaction | In this section, we will understand how to interact with Drop down Boxes. We can select an option using 'selectByVisibleText' or 'selectByIndex' or 'selectByValue' methods.
Let us understand how to interact with a dropdown box using https://www.calculator.net/interest-calculator.html. We can also check if a dropdown bo... | [
{
"code": null,
"e": 2048,
"s": 1875,
"text": "In this section, we will understand how to interact with Drop down Boxes. We can select an option using 'selectByVisibleText' or 'selectByIndex' or 'selectByValue' methods."
},
{
"code": null,
"e": 2226,
"s": 2048,
"text": "Let us un... |
How to check email Address Validation in Android on edit Text | This example demonstrates how to check email Address Validation in Android on edit Text.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "This example demonstrates how to check email Address Validation in Android on edit Text."
},
{
"code": null,
"e": 1280,
"s": 1151,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requir... |
C++ Program to Implement Radix Sort | Radix sort is non-comparative sorting algorithm. This sorting algorithm works on the integer keys by grouping digits which share the same position and value. The radix is the base of a number system. As we know that in decimal system the radix or base is 10. So for sorting some decimal numbers, we need 10 positional bo... | [
{
"code": null,
"e": 1402,
"s": 1062,
"text": "Radix sort is non-comparative sorting algorithm. This sorting algorithm works on the integer keys by grouping digits which share the same position and value. The radix is the base of a number system. As we know that in decimal system the radix or base i... |
How to detect when an OptionMenu or Checkbutton changes in Tkinter? | Let us suppose that in a particular application, we have some fixed set of options or choices for the user in a drop-down list. The Options or Choices can be created using the OptionMenu Widget Constructor.
OptionMenu(window, variable, choice1, choice2, choice3......)
Once the option is created, it can be detected by a... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "Let us suppose that in a particular application, we have some fixed set of options or choices for the user in a drop-down list. The Options or Choices can be created using the OptionMenu Widget Constructor."
},
{
"code": null,
"e": 1331,
... |
Adding Text on Image using Python | by Behic Guven | Towards Data Science | In this post, I will show you how to add text to your images using Python. This will a very simple project where we will use programming to do some design. After this post, you will be able to design your next flyer or business card using some python skills. Doesn’t that sound cool? Maybe not the best way to do the des... | [
{
"code": null,
"e": 516,
"s": 171,
"text": "In this post, I will show you how to add text to your images using Python. This will a very simple project where we will use programming to do some design. After this post, you will be able to design your next flyer or business card using some python skil... |
HTML | DOM Input Text Object - GeeksforGeeks | 22 Feb, 2022
The Input Text Object in HTML DOM is used to represent the HTML <input> element with type=”text” attribute. The <input> element with type=”text” can be accessed by using getElementById() method.
Syntax:
It is used to access input text object.
document.getElementById("id");
It is used to create input ele... | [
{
"code": null,
"e": 23649,
"s": 23621,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 23844,
"s": 23649,
"text": "The Input Text Object in HTML DOM is used to represent the HTML <input> element with type=”text” attribute. The <input> element with type=”text” can be accessed by... |
Kali Linux – Sniffing and Spoofing | 25 Sep, 2020
Sniffing is the process in which all the data packets passing in the network are monitored. Sniffers are usually used by network administrators to monitor and troubleshoot the network traffic. Whereas attackers use Sniffers to monitor and capture data packets to steal sensitive information containing passw... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Sep, 2020"
},
{
"code": null,
"e": 420,
"s": 28,
"text": "Sniffing is the process in which all the data packets passing in the network are monitored. Sniffers are usually used by network administrators to monitor and troubleshoot the... |
How to Change the Transparency of a Graph Plot in Matplotlib with Python? | 25 Nov, 2020
Matplotlib is a library in Python and it is numerical — mathematical extension for NumPy library. Pyplot is a state-based interface to a matplotlib module which provides a MATLAB-like interface. There are various plots that can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc.
In ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Nov, 2020"
},
{
"code": null,
"e": 332,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical — mathematical extension for NumPy library. Pyplot is a state-based interface to a matplotlib module which provides a MAT... |
MongoDB – Insert Single Document Using MongoShell | 27 Feb, 2020
In MongoDB, insert operations are used to add new documents in the collection. If the collection does not exist, then the insert operations create the collection by inserting documents. Or if the collection exists, then insert operations add new documents in the existing collection. You are allowed to add ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 411,
"s": 28,
"text": "In MongoDB, insert operations are used to add new documents in the collection. If the collection does not exist, then the insert operations create the collection by inserting ... |
Python Data Structures and Algorithms | 06 Jul, 2022
This tutorial is a beginner-friendly guide for learning data structures and algorithms using Python. In this article, we will discuss the in-built data structures such as lists, tuples, dictionaries, etc, and some user-defined data structures such as linked lists, trees, graphs, etc, and traversal as well ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 469,
"s": 52,
"text": "This tutorial is a beginner-friendly guide for learning data structures and algorithms using Python. In this article, we will discuss the in-built data structures such as lis... |
Python | Fetch your gmail emails from a particular user | 15 Sep, 2021
If you are ever curious to know how we can fetch Gmail e-mails using Python then this article is for you.As we know Python is a multi-utility language which can be used to do a wide range of tasks. Fetching Gmail emails though is a tedious task but with Python, many things can be done if you are well verse... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 483,
"s": 54,
"text": "If you are ever curious to know how we can fetch Gmail e-mails using Python then this article is for you.As we know Python is a multi-utility language which can be used to do... |
Flask – (Creating first simple application) | 20 Jun, 2022
There are many modules or frameworks which allow building your webpage using python like a bottle, Django, Flask, etc. But the real popular ones are Flask and Django. Django is easy to use as compared to Flask but Flask provides you with the versatility to program with.To understand what Flask is you have ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 395,
"s": 52,
"text": "There are many modules or frameworks which allow building your webpage using python like a bottle, Django, Flask, etc. But the real popular ones are Flask and Django. Django ... |
How to Install Flex on Windows? | 21 Dec, 2021
Flex stands for fast lexical analyzer generator, it is a computer application that is used to generate lexical analyzers for the programs written in lex language. The main work of the lexical analyzer is to convert the program into a sequence of tokens. It is developed by Vern Paxson. It is free software w... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 567,
"s": 28,
"text": "Flex stands for fast lexical analyzer generator, it is a computer application that is used to generate lexical analyzers for the programs written in lex language. The main wor... |
Split string into three palindromic substrings with earliest possible cuts | 24 Nov, 2021
Given string str, the task is to check if it is possible to split the given string S into three palindromic substrings or not. If multiple answers are possible, then print the one where the cuts are made the least indices. If no such possible partition exists, then print “-1”.
Examples:
Input: str = “aabbc... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 332,
"s": 54,
"text": "Given string str, the task is to check if it is possible to split the given string S into three palindromic substrings or not. If multiple answers are possible, then print th... |
Unbounded Binary Search Example (Find the point where a monotonically increasing function becomes positive first time) | 23 Feb, 2022
Given a function ‘int f(unsigned int x)’ which takes a non-negative integer ‘x’ as input and returns an integer as output. The function is monotonically increasing with respect to the value of x, i.e., the value of f(x+1) is greater than f(x) for every input x. Find the value ‘n’ where f() becomes positive... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 614,
"s": 52,
"text": "Given a function ‘int f(unsigned int x)’ which takes a non-negative integer ‘x’ as input and returns an integer as output. The function is monotonically increasing with respe... |
TreeMap get() Method in Java | 28 Jun, 2018
The java.util.TreeMap.get() method of TreeMap class is used to retrieve or fetch the value mapped by a particular key mentioned in the parameter. It returns NULL when the map contains no such mapping for the key.
Syntax:
Tree_Map.get(Object key_element)
Parameter: The method takes one parameter key_element... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2018"
},
{
"code": null,
"e": 265,
"s": 52,
"text": "The java.util.TreeMap.get() method of TreeMap class is used to retrieve or fetch the value mapped by a particular key mentioned in the parameter. It returns NULL when the map... |
Longest subarray whose elements can be made equal by maximum K increments | 22 Jun, 2022
Given an array arr[] of positive integers of size N and a positive integer K, the task is to find the maximum possible length of a subarray which can be made equal by adding some integer value to each element of the sub-array such that the sum of the added elements does not exceed K.
Examples:
Input: N = ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 337,
"s": 52,
"text": "Given an array arr[] of positive integers of size N and a positive integer K, the task is to find the maximum possible length of a subarray which can be made equal by adding ... |
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:"
},
{
... |
HTML Cleaning and Entity Conversion | Python | 02 Aug, 2019
The very important and always ignored task on web is the cleaning of text. Whenever one thinks to parse HTML, embedded Javascript and CSS is always avoided. The users are only interested in tags and text present on the webserver.
lxml installation –It is a Python binding for C libraries – libxslt and libxm... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 258,
"s": 28,
"text": "The very important and always ignored task on web is the cleaning of text. Whenever one thinks to parse HTML, embedded Javascript and CSS is always avoided. The users are only... |
Python – Interleave two lists of different length | 16 May, 2021
Given two lists of different lengths, the task is to write a Python program to get their elements alternatively and repeat the list elements of the smaller list till the larger list elements get exhausted.
Examples:
Input : test_list1 = [‘a’, ‘b’, ‘c’], test_list2 = [5, 7, 3, 0, 1, 8, 4]
Output : [‘a’, 5, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 234,
"s": 28,
"text": "Given two lists of different lengths, the task is to write a Python program to get their elements alternatively and repeat the list elements of the smaller list till the large... |
GATE | GATE-CS-2015 (Set 2) | Question 27 | 28 Jun, 2021
Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is(A) Ω(logn)(B) Ω(n)(C) Ω(nlogn)(D) Ω(n2)Answer: (A)Explanation: The answer to this question is simply max-heapify function. Time comp... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 441,
"s": 53,
"text": "Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is... |
Python | Print list after removing element at given index | 31 Mar, 2020
Given an index, remove the element at that index from the list and print the new list.Examples:
Input : list = [10, 20, 30, 40, 50]
index = 2
Output : [10, 20, 40, 50]
Input : list = [10, 20, 40, 50]
index = 0
Output : [20, 40, 50]
Method 1: Traversal of list
Using traversal in the l... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n31 Mar, 2020"
},
{
"code": null,
"e": 149,
"s": 53,
"text": "Given an index, remove the element at that index from the list and print the new list.Examples:"
},
{
"code": null,
"e": 308,
"s": 149,
"text": "Input : l... |
Python | Lemmatization with TextBlob | 24 Sep, 2021
Lemmatization is the process of grouping together the different inflected forms of a word so they can be analyzed as a single item. Lemmatization is similar to stemming but it brings context to the words. So it links words with similar meanings to one word.Text preprocessing includes both Stemming as well ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 614,
"s": 54,
"text": "Lemmatization is the process of grouping together the different inflected forms of a word so they can be analyzed as a single item. Lemmatization is similar to stemming but i... |
PostgreSQL – Show Databases | 28 Aug, 2020
In PostgreSQL, there are couple of ways to list all the databases present on the server. In this article, we will explore them.
To list all the database present in the current database server use one of the following commands:
Syntax: \l or \l+
Example:
First log into the PostgreSQL server using the pSQL ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 157,
"s": 28,
"text": "In PostgreSQL, there are couple of ways to list all the databases present on the server. In this article, we will explore them."
},
{
"code": null,
"e": 256,
... |
Python program to check if a number is Prime or not | In this, we’ll write a program that will test if the given number which is greater than 1 is prime or not.
A prime number is a positive integer greater than 1 and which has only two factors 1 & the number itself for example number: 2, 3, 5, 7... etc are prime numbers as they have only two factors .i.e. 1 & the number i... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "In this, we’ll write a program that will test if the given number which is greater than 1 is prime or not."
},
{
"code": null,
"e": 1389,
"s": 1169,
"text": "A prime number is a positive integer greater than 1 and which has only two ... |
Tryit Editor v3.7 | Tryit: HTML table - colgroup | [] |
Binary Search Tree - Search and Insertion Operations in C++ | Binary search tree (BST) is a special type of tree which follows the following rules −
left child node’s value is always less than the parent Note
right child node has a greater value than the parent node.
all the nodes individually form a binary search tree.
Example of a binary search tree (BST) −
A binary search tree... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "Binary search tree (BST) is a special type of tree which follows the following rules −"
},
{
"code": null,
"e": 1209,
"s": 1149,
"text": "left child node’s value is always less than the parent Note"
},
{
"code": null,
"e"... |
How to load JSON data using jQuery? | To load JSON data using jQuery, use the getJSON() and ajax() method. The jQuery.getJSON( ) method loads JSON data from the server using a GET HTTP request.
Here is the description of all the parameters used by this method −
url − A string containing the URL to which the request is sent
data − This optional parameter re... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "To load JSON data using jQuery, use the getJSON() and ajax() method. The jQuery.getJSON( ) method loads JSON data from the server using a GET HTTP request."
},
{
"code": null,
"e": 1286,
"s": 1218,
"text": "Here is the description of... |
Output of C++ programs | Set 39 (Pointers) - GeeksforGeeks | 26 Aug, 2017
Prerequisite: Pointers in C/C++
QUE.1 What would be printed from the following C++ program?
#include <iostream>#include <stdlib.h>using namespace std;int main(){ float x = 5.999; float* y, *z; y = &x; z = y; cout << x << ", " << *(&x) << ", " << *y << ", " << *z << "\n"; return 0;}
a) 5.9... | [
{
"code": null,
"e": 24396,
"s": 24368,
"text": "\n26 Aug, 2017"
},
{
"code": null,
"e": 24428,
"s": 24396,
"text": "Prerequisite: Pointers in C/C++"
},
{
"code": null,
"e": 24488,
"s": 24428,
"text": "QUE.1 What would be printed from the following C++ program... |
Foreach loop with two arrays and if-condition evaluation to find matching values PHP? | Let’s say we have the following two arrays
$firstArray=array(10,20,30,40,50);
$secondArray=array(100,80,30,40,90);
We need to find the matching i.e. the output should be
30
40
The PHP code is as follows
Live Demo
<!DOCTYPE html>
<html>
<body>
<?php
$firstArray=array(10,20,30,40,50);
$secondArray=array(100,80,30,40,9... | [
{
"code": null,
"e": 1106,
"s": 1062,
"text": "Let’s say we have the following two arrays "
},
{
"code": null,
"e": 1178,
"s": 1106,
"text": "$firstArray=array(10,20,30,40,50);\n$secondArray=array(100,80,30,40,90);"
},
{
"code": null,
"e": 1234,
"s": 1178,
"te... |
Creating a Hybrid Content-Collaborative Movie Recommender Using Deep Learning | by Adam Lineberry | Towards Data Science | Written by Adam Lineberry and Claire Longo
In this post we’ll describe how we used deep learning models to create a hybrid recommender system that leverages both content and collaborative data. This approach tackles the content and collaborative data separately at first, then combines the efforts to produce a system wi... | [
{
"code": null,
"e": 215,
"s": 172,
"text": "Written by Adam Lineberry and Claire Longo"
},
{
"code": null,
"e": 520,
"s": 215,
"text": "In this post we’ll describe how we used deep learning models to create a hybrid recommender system that leverages both content and collaborativ... |
PHP - Simple XML | The simple XML parser is used to parse Name, attributes and textual content.
The simple XML functions are shown below −
This function accepts file path as a first parameter and it is mandatory.
simplexml_load_file(($fileName,$class,$options,$ns,$is_prefix)
This function accepts the string instead of file reference.
si... | [
{
"code": null,
"e": 2834,
"s": 2757,
"text": "The simple XML parser is used to parse Name, attributes and textual content."
},
{
"code": null,
"e": 2877,
"s": 2834,
"text": "The simple XML functions are shown below −"
},
{
"code": null,
"e": 2951,
"s": 2877,
... |
Future and FutureTask in java - GeeksforGeeks | 25 Jun, 2021
Prerequisite: Future and callable
A Future interface provides methods to check if the computation is complete, to wait for its completion and to retrieve the results of the computation. The result is retrieved using Future’s get() method when the computation has completed, and it blocks until it is complet... | [
{
"code": null,
"e": 24019,
"s": 23991,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 24053,
"s": 24019,
"text": "Prerequisite: Future and callable"
},
{
"code": null,
"e": 24418,
"s": 24053,
"text": "A Future interface provides methods to check if the comp... |
JavaFX - Application | In this chapter, we will discuss the structure of a JavaFX application in detail and also learn to create a JavaFX application with an example.
In general, a JavaFX application will have three major components namely Stage, Scene and Nodes as shown in the following diagram.
A stage (a window) contains all the objects o... | [
{
"code": null,
"e": 2044,
"s": 1900,
"text": "In this chapter, we will discuss the structure of a JavaFX application in detail and also learn to create a JavaFX application with an example."
},
{
"code": null,
"e": 2175,
"s": 2044,
"text": "In general, a JavaFX application will ... |
Is JavaScript a case sensitive language? | JavaScript is a case-sensitive language. This means that the language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.
So the identifiers Time and TIME will convey different meanings in JavaScript.
NOTE − Care should be taken while writing ... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "JavaScript is a case-sensitive language. This means that the language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters."
},
{
"code": null,
"e": 1340,
"s": 12... |
A Practical Approach to Linear Regression in Machine Learning | by Ashwin Raj | Towards Data Science | In the previous blog post, I tried to give you some intuition about the basics of machine learning. In this article, we will be getting started with our first Machine Learning algorithm, that is Linear Regression.
First, we will be going through the mathematical aspects of Linear Regression and then I will try to throw... | [
{
"code": null,
"e": 385,
"s": 171,
"text": "In the previous blog post, I tried to give you some intuition about the basics of machine learning. In this article, we will be getting started with our first Machine Learning algorithm, that is Linear Regression."
},
{
"code": null,
"e": 667,... |
MongoDB - Relationships | Relationships in MongoDB represent how various documents are logically related to each other. Relationships can be modeled via Embedded and Referenced approaches. Such relationships can be either 1:1, 1:N, N:1 or N:N.
Let us consider the case of storing addresses for users. So, one user can have multiple addresses maki... | [
{
"code": null,
"e": 2771,
"s": 2553,
"text": "Relationships in MongoDB represent how various documents are logically related to each other. Relationships can be modeled via Embedded and Referenced approaches. Such relationships can be either 1:1, 1:N, N:1 or N:N."
},
{
"code": null,
"e"... |
Get date format DD/MM/YYYY with MySQL Select Query? | Use the STR_TO_DATE() function from MySQL to set a date format for displaying DD/MM/YYYY date. The syntax is as follows −
SELECT STR_TO_DATE(yourColumnName,’%d/%m/%Y) as anyVariableName from yourTableName.
To understand the above syntax, let us create a table −
mysql> create table DateFormatDemo
−> (
−> IssueD... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "Use the STR_TO_DATE() function from MySQL to set a date format for displaying DD/MM/YYYY date. The syntax is as follows −"
},
{
"code": null,
"e": 1268,
"s": 1184,
"text": "SELECT STR_TO_DATE(yourColumnName,’%d/%m/%Y) as anyVariableN... |
How to get current location in android web view? | This example demonstrate about How to get current location in android web view.
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"?>
<Li... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "This example demonstrate about How to get current location in android web view."
},
{
"code": null,
"e": 1271,
"s": 1142,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required detail... |
Node.js fs.dirent.name Property - GeeksforGeeks | 19 Jan, 2022
The fs.Dirent.name property is an inbuilt application programming interface of class fs.Dirent within File System module which is used to provide the name of the particular dirent.
Syntax:
const dirent.name
Parameter: This property does not accept any parameter.Return Value: This property returns the name... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 24712,
"s": 24531,
"text": "The fs.Dirent.name property is an inbuilt application programming interface of class fs.Dirent within File System module which is used to provide the name of the p... |
Box Blur Algorithm - With Python implementation - GeeksforGeeks | 30 Dec, 2020
The pixels in an image are represented as integers. After blurring each pixel ‘x’ of the resulting image has a value equal to the average of the pixels surrounding ‘x’ including ‘x’. For example, consider a 3 * 3 image as
Then, the resulting image after blur is blurred_image = So, the pixel of blurred imag... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 24434,
"s": 24212,
"text": "The pixels in an image are represented as integers. After blurring each pixel ‘x’ of the resulting image has a value equal to the average of the pixels surrounding... |
Changing ttk Button Height in Python | Ttk adds styles to the tkinter’s standard widget which can be configured through different properties and functions. We can change the height of the ttk button by using the grid(options) method. This method contains various attributes and properties with some different options. If we want to resize the ttk button, we c... | [
{
"code": null,
"e": 1448,
"s": 1062,
"text": "Ttk adds styles to the tkinter’s standard widget which can be configured through different properties and functions. We can change the height of the ttk button by using the grid(options) method. This method contains various attributes and properties wit... |
Part 10: Discovering Multidimensional Time Series Motifs | by Sean Law | Towards Data Science | STUMPY is a powerful and scalable Python library for modern time series analysis and, at its core, efficiently computes something called a matrix profile. The goal of this multi-part series is to explain what the matrix profile is and how you can start leveraging STUMPY for all of your modern time series data mining ta... | [
{
"code": null,
"e": 497,
"s": 172,
"text": "STUMPY is a powerful and scalable Python library for modern time series analysis and, at its core, efficiently computes something called a matrix profile. The goal of this multi-part series is to explain what the matrix profile is and how you can start le... |
Using Lambda Function with Amazon DynamoDB | DynamoDB can trigger AWS Lambda when the data in added to the tables, updated or deleted. In this chapter, we will work on a simple example that will add items to the DynamoDB table and AWS Lambda which will read the data and send mail with the data added.
To use Amazon DB and AWS Lambda, we need to follow the steps as... | [
{
"code": null,
"e": 2663,
"s": 2406,
"text": "DynamoDB can trigger AWS Lambda when the data in added to the tables, updated or deleted. In this chapter, we will work on a simple example that will add items to the DynamoDB table and AWS Lambda which will read the data and send mail with the data add... |
Add two fractions | Practice | GeeksforGeeks | You are given four numbers num1, den1, num2, and den2. You need to find (num1/den1)+(num2/den2) and output the result in the form of (numx/denx).
Input Format:
The first line of input contains an integer T denoting the number of test cases . Then T test cases follow . Each test case contains four integers num1, den1, ... | [
{
"code": null,
"e": 385,
"s": 238,
"text": "You are given four numbers num1, den1, num2, and den2. You need to find (num1/den1)+(num2/den2) and output the result in the form of (numx/denx). "
},
{
"code": null,
"e": 584,
"s": 385,
"text": "Input Format:\nThe first line of input ... |
numpy.random.geometric() in Python - GeeksforGeeks | 15 Jul, 2020
With the help of numpy.random.geometric() method, we can get the random samples of geometric distribution and return the random samples of numpy array by using this method.
geometric distribution
Syntax : numpy.random.geometric(p, size=None)
Return : Return the random samples of numpy array.
Example #1 :
I... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 24074,
"s": 23901,
"text": "With the help of numpy.random.geometric() method, we can get the random samples of geometric distribution and return the random samples of numpy array by using thi... |
Hadoop Tutorial | 02 Mar, 2021
Big Data is a collection of data that is growing exponentially, and it is huge in volume with a lot of complexity as it comes from various resources. This data may be structured data, unstructured or semi-structured. So to handle or manage it efficiently, Hadoop comes into the picture.
Hadoop is a framewor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 315,
"s": 28,
"text": "Big Data is a collection of data that is growing exponentially, and it is huge in volume with a lot of complexity as it comes from various resources. This data may be structur... |
Python – Insert after every Nth element in a list | 10 Dec, 2020
Sometimes we need to perform a single insertion in python, this can be easily done with the help of the insert function. But sometimes, we require to insert in a repeated manner after every n numbers, for that there can be numerous shorthands that can be quite handy. Lets discuss certain ways in which this... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Dec, 2020"
},
{
"code": null,
"e": 349,
"s": 28,
"text": "Sometimes we need to perform a single insertion in python, this can be easily done with the help of the insert function. But sometimes, we require to insert in a repeated mann... |
iomanip setfill() function in C++ with Examples | 11 Oct, 2019
The setfill() method of iomaip library in C++ is used to set the ios library fill character based on the character specified as the parameter to this method.
Syntax:
setfill(char c)
Parameters: This method accepts c as a parameter which is the character argument corresponding to which the fill is to be se... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 186,
"s": 28,
"text": "The setfill() method of iomaip library in C++ is used to set the ios library fill character based on the character specified as the parameter to this method."
},
{
"co... |
React-Bootstrap InputGroup Component - GeeksforGeeks | 30 Apr, 2021
React-Bootstrap is a front-end framework that was designed keeping react in mind. InputGroup Component provides a way to put one add-on or button on either side or both sides of an input. We can use the following approach in ReactJS to use the react-bootstrap InputGroup Component.
InputGroup Props:
As: It ... | [
{
"code": null,
"e": 24924,
"s": 24896,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 25206,
"s": 24924,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. InputGroup Component provides a way to put one add-on or button on either side or... |
C++ Pointer to an Array | It is most likely that you would not understand this chapter until you go through the chapter related C++ Pointers.
So assuming you have bit understanding on pointers in C++, let us start: An array name is a constant pointer to the first element of the array. Therefore, in the declaration −
double balance[50];
balance... | [
{
"code": null,
"e": 2434,
"s": 2318,
"text": "It is most likely that you would not understand this chapter until you go through the chapter related C++ Pointers."
},
{
"code": null,
"e": 2610,
"s": 2434,
"text": "So assuming you have bit understanding on pointers in C++, let us ... |
Binary Search using pthread - GeeksforGeeks | 26 Dec, 2017
Binary search is a popular method of searching in a sorted array or list. It simply divides the list into two halves and discard the half which has zero probability of having the key. On dividing we check the mid point for the key and uses the lower half if key is less than mid point and upper half if key ... | [
{
"code": null,
"e": 26271,
"s": 26243,
"text": "\n26 Dec, 2017"
},
{
"code": null,
"e": 26653,
"s": 26271,
"text": "Binary search is a popular method of searching in a sorted array or list. It simply divides the list into two halves and discard the half which has zero probabilit... |
How to count duplicates in Pandas Dataframe? - GeeksforGeeks | 28 Jul, 2020
Let us see how to count duplicates in a Pandas DataFrame. Our task is to count the number of duplicate entries in a single column and multiple columns.
Under a single column : We will be using the pivot_table() function to count the duplicates in a single column. The column in which the duplicates are to b... | [
{
"code": null,
"e": 25034,
"s": 25006,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 25186,
"s": 25034,
"text": "Let us see how to count duplicates in a Pandas DataFrame. Our task is to count the number of duplicate entries in a single column and multiple columns."
},
{
... |
array::empty() in C++ STL - GeeksforGeeks | 26 Mar, 2018
Array classes are generally more efficient, light-weight and reliable than C-style arrays. The introduction of array class from C++11 has offered a better alternative for C-style arrays.
empty() function is used to check if the array container is empty or not.
Syntax :
arrayname.empty()
Parameters :
No par... | [
{
"code": null,
"e": 24018,
"s": 23990,
"text": "\n26 Mar, 2018"
},
{
"code": null,
"e": 24205,
"s": 24018,
"text": "Array classes are generally more efficient, light-weight and reliable than C-style arrays. The introduction of array class from C++11 has offered a better alternat... |
C++ Library - <complex> | It implements the complex class to contain complex numbers in cartesian form and several functions and overloads to operate with them.
Following is the declaration for std::complex.
template< class T >
class complex;
T − Type of both the real and imaginary components of the complex number.
Print
Add Notes
Bookmark t... | [
{
"code": null,
"e": 2738,
"s": 2603,
"text": "It implements the complex class to contain complex numbers in cartesian form and several functions and overloads to operate with them."
},
{
"code": null,
"e": 2785,
"s": 2738,
"text": "Following is the declaration for std::complex."... |
Difference between Confusion and Diffusion - GeeksforGeeks | 03 Jun, 2019
Confusion and diffusion area unit the properties for creating a secure cipher. Each Confusion and diffusion area unit wont to stop the secret writing key from its deduction or ultimately for preventing the first message.
Confusion is employed for making uninformed cipher text whereas diffusion is employed ... | [
{
"code": null,
"e": 24534,
"s": 24506,
"text": "\n03 Jun, 2019"
},
{
"code": null,
"e": 24755,
"s": 24534,
"text": "Confusion and diffusion area unit the properties for creating a secure cipher. Each Confusion and diffusion area unit wont to stop the secret writing key from its ... |
ASP Server.URLEncode Method - GeeksforGeeks | 02 Mar, 2021
The ASP Server.URLEncode method is used to apply URL encoding rules to convert to a specified string. Below are given the URLEncode converts characters as follows:
Spaces ( ) are converted to plus signs (+).
Non-alphanumeric characters are escaped to their hexadecimal representation.
Syntax:
Server.URLEn... | [
{
"code": null,
"e": 26279,
"s": 26251,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 26444,
"s": 26279,
"text": "The ASP Server.URLEncode method is used to apply URL encoding rules to convert to a specified string. Below are given the URLEncode converts characters as follows:... |
How to iterate through a dictionary in Python? | There are two ways of iterating through a Python dictionary object. One is to fetch associated value for each key in keys() list.
>>> D1 = {1:'a', 2:'b', 3:'c'}
>>> for k in D1.keys():
print (k, D1[k])
1 a
2 b
3 c
There is also items() method of dictionary object which returns list of tuples, each tuple having key ... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "There are two ways of iterating through a Python dictionary object. One is to fetch associated value for each key in keys() list."
},
{
"code": null,
"e": 1280,
"s": 1192,
"text": ">>> D1 = {1:'a', 2:'b', 3:'c'} \n>>> for k in D1.key... |
Java Program for Iterative Merge Sort - GeeksforGeeks | 12 Jan, 2018
Following is a typical recursive implementation of Merge Sort that uses last element as pivot.
// Recursive Java Program for merge sort import java.util.Arrays;public class GFG{ public static void mergeSort(int[] array) { if(array == null) { return; } if(array.... | [
{
"code": null,
"e": 26295,
"s": 26267,
"text": "\n12 Jan, 2018"
},
{
"code": null,
"e": 26390,
"s": 26295,
"text": "Following is a typical recursive implementation of Merge Sort that uses last element as pivot."
},
{
"code": "// Recursive Java Program for merge sort impo... |
Count natural numbers whose all permutation are greater than that number in C++ | We are given a natural number let’s say, num and the task is to calculate the count of all those natural numbers whose all permutations are greater than that number.
We are working with the following conditions −
The data should be natural numbers only
The data should be natural numbers only
All the possible permutatio... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "We are given a natural number let’s say, num and the task is to calculate the count of all those natural numbers whose all permutations are greater than that number."
},
{
"code": null,
"e": 1275,
"s": 1228,
"text": "We are working w... |
Pandas Query for SQL-like Querying | by Matt Przybyla | Towards Data Science | DatasetPandasQueryTutorial CodeSummaryReferences
Dataset
Pandas
Query
Tutorial Code
Summary
References
The dataset used in this analysis and tutorial for pandas query is a dummy dataset created to mimic a dataframe with both text and numeric features. Feel free to use your own .csv file with either or both text and num... | [
{
"code": null,
"e": 220,
"s": 171,
"text": "DatasetPandasQueryTutorial CodeSummaryReferences"
},
{
"code": null,
"e": 228,
"s": 220,
"text": "Dataset"
},
{
"code": null,
"e": 235,
"s": 228,
"text": "Pandas"
},
{
"code": null,
"e": 241,
"s": 23... |
HowTo profile TensorFlow:. Nowadays TensorFlow one of the most... | by Illarion Khlestov | Towards Data Science | Nowadays TensorFlow one of the most used library for machine learning. Sometimes it may be quite useful to profile tensorflow graph and know what operations take more time and what less. This can be done with tensorflow timeline module. Unfortunately, I cannot find any clear tutorial how to use it. So in this blog post... | [
{
"code": null,
"e": 553,
"s": 172,
"text": "Nowadays TensorFlow one of the most used library for machine learning. Sometimes it may be quite useful to profile tensorflow graph and know what operations take more time and what less. This can be done with tensorflow timeline module. Unfortunately, I c... |
Python | Convert string to DateTime and vice-versa - GeeksforGeeks | 30 Jun, 2020
Write a Python program to convert a given string to datetime and vice-versa.
Program to convert string to DateTime using strptime() function.
Examples:
Input : Dec 4 2018 10:07AM
Output : 2018-12-04 10:07:00
Input : Jun 12 2013 5:30PM
Output : 2013-06-12 17:30:00
strptime() is available in datetime and... | [
{
"code": null,
"e": 24441,
"s": 24413,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 24518,
"s": 24441,
"text": "Write a Python program to convert a given string to datetime and vice-versa."
},
{
"code": null,
"e": 24583,
"s": 24518,
"text": "Program to co... |
Check that the String does not contain certain characters in Java | Let’s say the following is our string with special characters.
String str = "test*$demo";
Check for the special characters.
Pattern pattern = Pattern.compile("[^A-Za-z0-9]");
Matcher match = pattern.matcher(str);
boolean val = match.find();
Now, if the bool value “val” is true, that would mean the special characters ar... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "Let’s say the following is our string with special characters."
},
{
"code": null,
"e": 1152,
"s": 1125,
"text": "String str = \"test*$demo\";"
},
{
"code": null,
"e": 1186,
"s": 1152,
"text": "Check for the speci... |
How to display mean inside boxplot created by using boxplot function in R? | A boxplot shows the median as a measure of center along with other values but we might want to compare the means as well. Therefore, showing mean with a point is likely to be preferred if we want to compare many boxplots. This can be done by using points(mean(“Vector_name”)), if we are plotting the columns of an R data... | [
{
"code": null,
"e": 1441,
"s": 1062,
"text": "A boxplot shows the median as a measure of center along with other values but we might want to compare the means as well. Therefore, showing mean with a point is likely to be preferred if we want to compare many boxplots. This can be done by using point... |
map emplace() in C++ STL | In this article we will be discussing the working, syntax and examples of map::emplace() function in C++ STL.
Maps are the associative container, which facilitates to store the elements formed by a combination of key value and mapped value in a specific order. In a map container the data is internally always sorted wit... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "In this article we will be discussing the working, syntax and examples of map::emplace() function in C++ STL."
},
{
"code": null,
"e": 1482,
"s": 1172,
"text": "Maps are the associative container, which facilitates to store the eleme... |
Making Python Packages Part 2: How to Publish & Test Your Package on PyPI with Poetry | by Skylar Kerzner | Towards Data Science | In the last edition of this guide, we published a python package to PyPI using a traditional setup.py.
It required a strange Manifest.in file, didn’t come with any testing, and we didn’t even discuss dependency management with a requirements.txt. Why? Because that is not the way in 2021, my friends.
Dependency manageme... | [
{
"code": null,
"e": 274,
"s": 171,
"text": "In the last edition of this guide, we published a python package to PyPI using a traditional setup.py."
},
{
"code": null,
"e": 472,
"s": 274,
"text": "It required a strange Manifest.in file, didn’t come with any testing, and we didn’t... |
Python 3 - Tkinter Menubutton | A menubutton is the part of a drop-down menu that stays on the screen all the time. Every menubutton is associated with a Menu widget that can display the choices for that menubutton when the user clicks on it.
Here is the simple syntax to create this widget −
w = Menubutton ( master, option, ... )
master − This repre... | [
{
"code": null,
"e": 2551,
"s": 2340,
"text": "A menubutton is the part of a drop-down menu that stays on the screen all the time. Every menubutton is associated with a Menu widget that can display the choices for that menubutton when the user clicks on it."
},
{
"code": null,
"e": 2601,... |
Program to design parking system in Python | Suppose you want to design a parking system. A parking lot has three different kinds of parking spaces − big, medium, and small. And there are fixed number of slots for each size. Make a class called OurParkingSystem with of two methods −
constructor(big, medium, small) − This constructor is taking the number of slots ... | [
{
"code": null,
"e": 1301,
"s": 1062,
"text": "Suppose you want to design a parking system. A parking lot has three different kinds of parking spaces − big, medium, and small. And there are fixed number of slots for each size. Make a class called OurParkingSystem with of two methods −"
},
{
... |
iText - Scaling an Image | In this chapter, we will see how to scale an image in a PDF document using the iText library.
You can create an empty PDF Document by instantiating the Document class. While instantiating this class, you need to pass a PdfDocument object as a parameter to its constructor.
To add image to the PDF, create an object of th... | [
{
"code": null,
"e": 2462,
"s": 2368,
"text": "In this chapter, we will see how to scale an image in a PDF document using the iText library."
},
{
"code": null,
"e": 2641,
"s": 2462,
"text": "You can create an empty PDF Document by instantiating the Document class. While instanti... |
PostgreSQL - SELECT Database | This chapter explains various methods of accessing the database. Assume that we have already created a database in our previous chapter. You can select the database using either of the following methods −
Database SQL Prompt
OS Command Prompt
Assume you have already launched your PostgreSQL client and you have landed a... | [
{
"code": null,
"e": 3030,
"s": 2825,
"text": "This chapter explains various methods of accessing the database. Assume that we have already created a database in our previous chapter. You can select the database using either of the following methods −"
},
{
"code": null,
"e": 3050,
"... |
NHibernate - Caching | In this chapter, we will be covering how the caching works in NHibernate applications. It has built-in support for caching. It looks as a simple feature, but in reality, it is one of the most complex features. We will begin with the First Level Cache.
This cache mechanism is enabled by default in NHibernate and we don’... | [
{
"code": null,
"e": 2585,
"s": 2333,
"text": "In this chapter, we will be covering how the caching works in NHibernate applications. It has built-in support for caching. It looks as a simple feature, but in reality, it is one of the most complex features. We will begin with the First Level Cache."
... |
Leonardo Number - GeeksforGeeks | 28 May, 2021
The Leonardo numbers are a sequence of numbers given by the recurrence: The first few Leonardo Numbers are 1, 1, 3, 5, 9, 15, 25, 41, 67, 109, 177, 287, 465, 753, 1219, 1973, 3193, 5167, 8361, ··· The Leonardo numbers are related to the Fibonacci numbers by below relation:Given a number n, find n-th Leonar... | [
{
"code": null,
"e": 24347,
"s": 24319,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 24666,
"s": 24347,
"text": "The Leonardo numbers are a sequence of numbers given by the recurrence: The first few Leonardo Numbers are 1, 1, 3, 5, 9, 15, 25, 41, 67, 109, 177, 287, 465, 753, ... |
Anomaly Detection : Isolation Forest with Statistical Rules | by adithya krishnan | Towards Data Science | This is a follow up article about anomaly detection with isolation forest . In the previous article we saw about anomaly detection with time series forecasting and classification. With isolation forest we had to deal with the contamination parameter which sets the percentage of points in our data to be anomalous.
While... | [
{
"code": null,
"e": 487,
"s": 172,
"text": "This is a follow up article about anomaly detection with isolation forest . In the previous article we saw about anomaly detection with time series forecasting and classification. With isolation forest we had to deal with the contamination parameter which... |
MongoDB query to sort by the sum of specified object inside inner array? | To sort by the sum of specified object inside inner array, use matchalongwithsort. Let us create a collection with documents −
> db.demo189.insertOne(
... {
... "_id" : 100,
... "List" : [
... {
... "Value" : 10
... },
.. .{
... "Value" : 20
... },
... ... | [
{
"code": null,
"e": 1189,
"s": 1062,
"text": "To sort by the sum of specified object inside inner array, use matchalongwithsort. Let us create a collection with documents −"
},
{
"code": null,
"e": 1819,
"s": 1189,
"text": "> db.demo189.insertOne(\n... {\n... \"_id\" : 10... |
Analysis and Visualization of Unstructured Text | Towards Data Science | Stuck behind the paywall? Read this article with my friend link here.
What will you do when I ask you to explain textual data? What steps will you take to build the textual visualization story? Here, I am not going to explain how you create a visualization story.
But this article will help you to get the required infor... | [
{
"code": null,
"e": 241,
"s": 171,
"text": "Stuck behind the paywall? Read this article with my friend link here."
},
{
"code": null,
"e": 435,
"s": 241,
"text": "What will you do when I ask you to explain textual data? What steps will you take to build the textual visualization... |
Factorial of a large number | In computers, variables are stored in memory locations. But the size of the memory location is fixed, so when we try to find the factorial of some greater value like 15! or 20! the factorial value exceeds the memory range and returns wrong results.
For calculation of large numbers, we have to use an array to store resu... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "In computers, variables are stored in memory locations. But the size of the memory location is fixed, so when we try to find the factorial of some greater value like 15! or 20! the factorial value exceeds the memory range and returns wrong results."
}... |
Course 2 — Data structure — Part 2: Priority queues and Disjoint set | by Phat Le | Towards Data Science | If we ever want to know how background job works, fastest way to find k smallest elements in an array, how merging tables in database works behind the scenes, keep reading. Because in this article, we will discuss about priority queues and disjoint set. Both data structures are beautiful to solve these problems. In the... | [
{
"code": null,
"e": 549,
"s": 172,
"text": "If we ever want to know how background job works, fastest way to find k smallest elements in an array, how merging tables in database works behind the scenes, keep reading. Because in this article, we will discuss about priority queues and disjoint set. B... |
Data Structures and Algorithms | Set 14 - GeeksforGeeks | 05 Jul, 2018
Following questions have been asked in GATE CS 2008 exam.
1. We have a binary heap on n elements and wish to insert n more elements (not necessarily one after another) into this heap. The total time required for this is(A) Θ(logn)(B) Θ(n)(C) Θ(nlogn)(D) Θ(n2)
The worst case time complexity for insertion in... | [
{
"code": null,
"e": 24410,
"s": 24382,
"text": "\n05 Jul, 2018"
},
{
"code": null,
"e": 24468,
"s": 24410,
"text": "Following questions have been asked in GATE CS 2008 exam."
},
{
"code": null,
"e": 24670,
"s": 24468,
"text": "1. We have a binary heap on n el... |
Division without using '/' operator - GeeksforGeeks | 27 Jul, 2021
Given two numbers, divide one from other without using ‘/’ operator. Examples :
Input : num1 = 13, num2 = 2
Output : 6
Input : num1 = 14, num2 = -2
Output : -7
Input : num1 = -11, num2 = 3
Output : -3
Input : num1 = 10, num2 = 10
Output : 1
Input : num1 = -6, num2 = -2
Output : 3
Input : num1 = 0, n... | [
{
"code": null,
"e": 24800,
"s": 24772,
"text": "\n27 Jul, 2021"
},
{
"code": null,
"e": 24882,
"s": 24800,
"text": "Given two numbers, divide one from other without using ‘/’ operator. Examples : "
},
{
"code": null,
"e": 25126,
"s": 24882,
"text": "Input : ... |
How to backup and restore a Docker Container? | Docker allows us to automate the process of building and deploying an application. It also allows us to create a packaged environment to run the application which makes it easily portable and lightweight while also allowing us to keep track of the versions. All of these are possible through Docker Containers. It helps ... | [
{
"code": null,
"e": 1431,
"s": 1062,
"text": "Docker allows us to automate the process of building and deploying an application. It also allows us to create a packaged environment to run the application which makes it easily portable and lightweight while also allowing us to keep track of the versi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.