title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Car Model Classification. In this post I will show the result for... | by Weng Seng | Towards Data Science
In this post I will show the result for car model classification with ResNet ( Residual Neutral Network). I use Python and Pytorch to build the model. The steps were similar to my previous flower species classifier project so I will brief about some key steps and the result. You can check my github repo here. I downloa...
[ { "code": null, "e": 447, "s": 171, "text": "In this post I will show the result for car model classification with ResNet ( Residual Neutral Network). I use Python and Pytorch to build the model. The steps were similar to my previous flower species classifier project so I will brief about some key s...
Set Pandas dataframe background Color and font color in Python - GeeksforGeeks
06 Aug, 2021 As we know, the basic idea behind styling is to make more impactful for the end-user readability. We can make changes like the color and format of the data visualized in order to communicate insight more efficiently. For the more impactful visualization on the pandas DataFrame, generally, we DataFrame.styl...
[ { "code": null, "e": 26357, "s": 26329, "text": "\n06 Aug, 2021" }, { "code": null, "e": 26786, "s": 26357, "text": "As we know, the basic idea behind styling is to make more impactful for the end-user readability. We can make changes like the color and format of the data visuali...
std::swap_ranges in C++ - GeeksforGeeks
25 Jul, 2017 std::swap is used for swapping of elements between two containers. One of its variation is std::swap_ranges, which as the name suggests is used for swapping the elements within a range. It simply exchanges the values of each of the elements in the range [first1, last1) with those of their respective elemen...
[ { "code": null, "e": 25369, "s": 25341, "text": "\n25 Jul, 2017" }, { "code": null, "e": 25555, "s": 25369, "text": "std::swap is used for swapping of elements between two containers. One of its variation is std::swap_ranges, which as the name suggests is used for swapping the el...
Angular10 isPlatformServer() Function - GeeksforGeeks
02 Jun, 2021 In this article, we are going to see what is isPlatformServer in Angular 10 and how to use it. The isPlatformServer is used to get a platform id that represents a server platform Syntax: isPlatformServer(platformId); NgModule: Module used by isPlatformServer is: CommonModule Return Value: returns a Boolean...
[ { "code": null, "e": 26354, "s": 26326, "text": "\n02 Jun, 2021" }, { "code": null, "e": 26449, "s": 26354, "text": "In this article, we are going to see what is isPlatformServer in Angular 10 and how to use it." }, { "code": null, "e": 26533, "s": 26449, "tex...
How to get a list of parameter names inside Python function?
To extract the number and names of the arguments from a function or function[something] to return ("arg1", "arg2"), we use the inspect module. The given code is written as follows using inspect module to find the parameters inside the functions aMethod and foo. import inspect def aMethod(arg1, arg2): pass print(inspect...
[ { "code": null, "e": 1205, "s": 1062, "text": "To extract the number and names of the arguments from a function or function[something] to return (\"arg1\", \"arg2\"), we use the inspect module." }, { "code": null, "e": 1324, "s": 1205, "text": "The given code is written as follow...
Finding the End Index of the Specified Range in C# - GeeksforGeeks
28 Jun, 2021 The Range Structure is introduced in C# 8.0. It represents a range that has a start and end indexes. You are allowed to find the end index of the given ranges with the help of End Property provided by the Range struct.Syntax: public property Index End { Index get(); }; Here, Index represents the end inde...
[ { "code": null, "e": 24742, "s": 24714, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24970, "s": 24742, "text": "The Range Structure is introduced in C# 8.0. It represents a range that has a start and end indexes. You are allowed to find the end index of the given ranges with...
Time Series Analysis with Facebook Prophet: How it works and How to use it | by Mitchell Krieger | Towards Data Science
Time series data can be difficult and frustrating to work with, and the various algorithms that generate models can be quite finicky and hard to tune. This is particularly true if you are working with data that has multiple seasonalities. In addition, traditional time series models like SARIMAX have many stringent data...
[ { "code": null, "e": 1010, "s": 47, "text": "Time series data can be difficult and frustrating to work with, and the various algorithms that generate models can be quite finicky and hard to tune. This is particularly true if you are working with data that has multiple seasonalities. In addition, tra...
open() - Unix, Linux System Call
Unix - Home Unix - Getting Started Unix - File Management Unix - Directories Unix - File Permission Unix - Environment Unix - Basic Utilities Unix - Pipes & Filters Unix - Processes Unix - Communication Unix - The vi Editor Unix - What is Shell? Unix - Using Variables Unix - Special Variables Unix - Using Arrays Unix -...
[ { "code": null, "e": 1466, "s": 1454, "text": "Unix - Home" }, { "code": null, "e": 1489, "s": 1466, "text": "Unix - Getting Started" }, { "code": null, "e": 1512, "s": 1489, "text": "Unix - File Management" }, { "code": null, "e": 1531, "s": 1...
C Program to read contents of Whole File - GeeksforGeeks
03 Dec, 2021 C programming language supports four pre-defined functions to read contents from a file, defined in stdio.h header file: fgetc()– This function is used to read a single character from the file.fgets()– This function is used to read strings from files.fscanf()– This function is used to read the block of raw...
[ { "code": null, "e": 24956, "s": 24928, "text": "\n03 Dec, 2021" }, { "code": null, "e": 25077, "s": 24956, "text": "C programming language supports four pre-defined functions to read contents from a file, defined in stdio.h header file:" }, { "code": null, "e": 25384...
Divide Two Integers in C++
Suppose we have two integers dividend and divisor. We have to divide two integers without using multiplication, division, and mod operator. Return the quotient after dividing the dividend by divisor. The integer division should truncate toward zero. Both of the inputs are integers So if the given inputs are dividend = ...
[ { "code": null, "e": 1344, "s": 1062, "text": "Suppose we have two integers dividend and divisor. We have to divide two integers without using multiplication, division, and mod operator. Return the quotient after dividing the dividend by divisor. The integer division should truncate toward zero. Bot...
Bitwise Operators in Java - GeeksforGeeks
09 May, 2022 Operators constitute the basic building block of any programming language. Java too provides many types of operators which can be used according to the need to perform various calculations and functions, be it logical, arithmetic, relational, etc. They are classified based on the functionality they provide...
[ { "code": null, "e": 30746, "s": 30718, "text": "\n09 May, 2022" }, { "code": null, "e": 31078, "s": 30746, "text": "Operators constitute the basic building block of any programming language. Java too provides many types of operators which can be used according to the need to per...
Difference between collection and collections in java
Java collection framework is used to manipulate the collection of the object. Collection framework contains multiple wrapper classes , convenience class , classes for legacy implementation like vector and Hashtable, collection interfaces and etc. Collection is an interface in the java collection framework. It is di...
[ { "code": null, "e": 1313, "s": 1062, "text": "Java collection framework is used to manipulate the collection of the object. Collection framework contains multiple wrapper classes , convenience class , classes for legacy implementation like vector and Hashtable, collection interfaces and etc. " ...
Trapezoidal Rule for definite integral
Definite integrals can be solved using this trapezoidal rule. To integrate a function f(x) between the range a to b is basically finding the area below the curve from point x = a to x = b. To find that area, we can divide the area into n trapezoids, and the width of each trapezoid is h, so we can say that (b - a) = nh...
[ { "code": null, "e": 1252, "s": 1062, "text": "Definite integrals can be solved using this trapezoidal rule. To integrate a function f(x) between the range a to b is basically finding the area below the curve from point x = a to x = b. " }, { "code": null, "e": 1528, "s": 1252, "...
QlikView - Data Transformation
Data Transformation is the process of modifying the existing data to a new data format. It can also involve filtering out or adding some specific values to the existing data set. QlikView can carry out data transformation after reading it to its memory and using many in-built functions. Let us consider the following ...
[ { "code": null, "e": 3210, "s": 2920, "text": "Data Transformation is the process of modifying the existing data to a new data format. It can also involve filtering out or adding some specific values to the existing data set. QlikView can carry out data transformation after reading it to its memory ...
Difference between Natural join and Cross join in SQL
03 May, 2020 1. Natural Join :Natural Join joins two tables based on same attribute name and datatypes. The resulting table will contain all the attributes of both the tables but only one copy of each common column. Example:Consider the two tables given below: Consider the given query SELECT * FROM Student S NATURAL J...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 May, 2020" }, { "code": null, "e": 257, "s": 54, "text": "1. Natural Join :Natural Join joins two tables based on same attribute name and datatypes. The resulting table will contain all the attributes of both the tables but only one...
Maximum length subsequence with difference between adjacent elements as either 0 or 1
30 Apr, 2021 Given an array of n integers. The problem is to find maximum length of the subsequence with difference between adjacent elements as either 0 or 1.Examples: Input : arr[] = {2, 5, 6, 3, 7, 6, 5, 8} Output : 5 The subsequence is {5, 6, 7, 6, 5}. Input : arr[] = {-2, -1, 5, -1, 4, 0, 3} Output : 4 The subs...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Apr, 2021" }, { "code": null, "e": 210, "s": 52, "text": "Given an array of n integers. The problem is to find maximum length of the subsequence with difference between adjacent elements as either 0 or 1.Examples: " }, { "c...
Python | Pandas Timestamp.today
27 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.today() function return the current time in the local timezone. This differs...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jan, 2019" }, { "code": null, "e": 242, "s": 28, "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 and makes imp...
Stream dropWhile() method in Java with examples
25 Apr, 2019 The dropWhile(java.util.function.Predicate) method returns two different types of stream depending upon whether the stream is ordered or not. If the stream is ordered then a stream of the remaining elements of this stream after dropping the longest prefix of elements that match the given predicate is retur...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Apr, 2019" }, { "code": null, "e": 170, "s": 28, "text": "The dropWhile(java.util.function.Predicate) method returns two different types of stream depending upon whether the stream is ordered or not." }, { "code": null, "...
VAX Architecture
22 Mar, 2022 VAX Architecture was designed to increase the compatibility by improving the hardware of the earlier designed machines. As VAX architecture is an example of the CISC (Complex Instruction Set Computers) therefore there are large and complicated instruction sets used in the system. Memory: VAX architecture c...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Mar, 2022" }, { "code": null, "e": 309, "s": 28, "text": "VAX Architecture was designed to increase the compatibility by improving the hardware of the earlier designed machines. As VAX architecture is an example of the CISC (Complex ...
Create a Table in a PDF Using Java
04 Nov, 2020 The creation of a table in a PDF using Java is done by installing the document class. While instantiating this class, pass a PdfDocument object as a parameter to its constructor. Then, to feature a table to the document, instantiate the Table class, and add this object to the document using the add() metho...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Nov, 2020" }, { "code": null, "e": 364, "s": 54, "text": "The creation of a table in a PDF using Java is done by installing the document class. While instantiating this class, pass a PdfDocument object as a parameter to its construc...
Python | os.strerror() method
22 May, 2019 OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. All functions in os module raise OSError in the case of invalid or inaccessible file nam...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 May, 2019" }, { "code": null, "e": 247, "s": 28, "text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin...
Scala Map filter() method with example
13 Aug, 2019 The filter() method is utilized to select all elements of the map which satisfies a stated predicate. Method Definition: def filter(p: ((A, B))=> Boolean): Map[A, B] Return Type: It returns a new map consisting all the elements of the map which satisfies the given predicate. Example #1: // Scala program of...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Aug, 2019" }, { "code": null, "e": 130, "s": 28, "text": "The filter() method is utilized to select all elements of the map which satisfies a stated predicate." }, { "code": null, "e": 194, "s": 130, "text": "Meth...
Flutter – Expanded Widget
23 Oct, 2020 Expanded widget in flutter comes in handy when we want a child widget or children widgets to take all the available space along the main-axis (for Row the main axis is horizontal & vertical for Column). Expanded widget can be taken as the child of Row, Column, and Flex. And in case if we don’t want to giv...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Oct, 2020" }, { "code": null, "e": 778, "s": 52, "text": "Expanded widget in flutter comes in handy when we want a child widget or children widgets to take all the available space along the main-axis (for Row the main axis is horizo...
ios eof() function in C++ with Examples
02 Sep, 2019 The eof() method of ios class in C++ is used to check if the stream is has raised any EOF (End Of File) error. It means that this function will check if this stream has its eofbit set. Syntax: bool eof() const; Parameters: This method does not accept any parameter. Return Value: This method returns true i...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2019" }, { "code": null, "e": 213, "s": 28, "text": "The eof() method of ios class in C++ is used to check if the stream is has raised any EOF (End Of File) error. It means that this function will check if this stream has its eo...
Range Keyword in Golang
28 Jun, 2021 In Golang Range keyword is used in different kinds of data structures in order to iterates over elements. The range keyword is mainly used in for loops in order to iterate over all the elements of a map, slice, channel, or an array. When it iterates over the elements of an array and slices then it returns ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 636, "s": 28, "text": "In Golang Range keyword is used in different kinds of data structures in order to iterates over elements. The range keyword is mainly used in for loops in order to iterate ove...
C# | Add an object to the end of Collection<T>
01 Feb, 2019 Collection<T>.Add(T) method is used to add an object to the end of the Collection<T>. Syntax : public void Add (T item); Here, item is the object to be added to the end of the Collection<T>. The value can be null for reference types. Below given are some examples to understand the implementation in a bett...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Feb, 2019" }, { "code": null, "e": 114, "s": 28, "text": "Collection<T>.Add(T) method is used to add an object to the end of the Collection<T>." }, { "code": null, "e": 123, "s": 114, "text": "Syntax :" }, { ...
Flutter – RichText Widget
06 Jun, 2022 The RichText widget is used to display text that uses various different styles. The displayed text is described using a tree of TextSpan objects, each of which has its own associated style that is used for that subtree. Depending on the layout constraints the text might break across multiple lines or might...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Jun, 2022" }, { "code": null, "e": 397, "s": 54, "text": "The RichText widget is used to display text that uses various different styles. The displayed text is described using a tree of TextSpan objects, each of which has its own as...
Software Testing | Functional Testing
08 May, 2019 Functional Testing is a type of Software Testing in which the system is tested against the functional requirements and specifications. Functional testing ensures that the requirements or specifications are properly satisfied by the application. This type of testing is particularly concerned with the result...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 May, 2019" }, { "code": null, "e": 479, "s": 53, "text": "Functional Testing is a type of Software Testing in which the system is tested against the functional requirements and specifications. Functional testing ensures that the req...
Groovy - toString()
The method is used to get a String object representing the value of the Number Object. If the method takes a primitive data type as an argument, then the String object representing the primitive data type value is returned. If the method takes two arguments, then a String representation of the first argument in the rad...
[ { "code": null, "e": 2325, "s": 2238, "text": "The method is used to get a String object representing the value of the Number Object." }, { "code": null, "e": 2462, "s": 2325, "text": "If the method takes a primitive data type as an argument, then the String object representing t...
Erlang - Data Types
In any programming language, you need to use several variables to store various types of information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in the memory to store the value associated with that variable. You may like to sto...
[ { "code": null, "e": 2602, "s": 2301, "text": "In any programming language, you need to use several variables to store various types of information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in the memory to...
Solid Gauge Chart in Pygal - GeeksforGeeks
10 Jul, 2020 Pygal is a Python module that is mainly used to build SVG (Scalar Vector Graphics) graphs and charts. SVG is a vector-based graphics in the XML format that can be edited in any editor. Pygal can create graphs with minimal lines of code that can be easy to understand and write. Gauges are the popular charts...
[ { "code": null, "e": 26135, "s": 26107, "text": "\n10 Jul, 2020" }, { "code": null, "e": 26413, "s": 26135, "text": "Pygal is a Python module that is mainly used to build SVG (Scalar Vector Graphics) graphs and charts. SVG is a vector-based graphics in the XML format that can be ...
Unique rows in boolean matrix | Practice | GeeksforGeeks
Given a binary matrix your task is to find all unique rows of the given matrix. Example 1: Input: row = 3, col = 4 M[][] = {{1 1 0 1},{1 0 0 1},{1 1 0 1}} Output: 1 1 0 1 $1 0 0 1 $ Explanation: Above the matrix of size 3x4 looks like 1 1 0 1 1 0 0 1 1 1 0 1 The two unique rows are 1 1 0 1 and 1 0 0 1 . Your Task: Y...
[ { "code": null, "e": 319, "s": 238, "text": "Given a binary matrix your task is to find all unique rows of the given matrix. " }, { "code": null, "e": 330, "s": 319, "text": "Example 1:" }, { "code": null, "e": 546, "s": 330, "text": "Input:\nrow = 3, col = 4 ...
Difference between Abstract Class and Interface in C# - GeeksforGeeks
28 Jan, 2022 An abstract class is a way to achieve the abstraction in C#. An Abstract class is never intended to be instantiated directly. This class must contain at least one abstract method, which is marked by the keyword or modifier abstract in the class definition. The Abstract classes are typically used to define ...
[ { "code": null, "e": 24132, "s": 24104, "text": "\n28 Jan, 2022" }, { "code": null, "e": 24476, "s": 24132, "text": "An abstract class is a way to achieve the abstraction in C#. An Abstract class is never intended to be instantiated directly. This class must contain at least one ...
C++ Program to Delete the First Node in a given Singly Linked List
A linked list is a linear data structure that has multiple nodes that are connected with each other. Each node consists of two fields – Data Field and the address of the next node. Let us assume we have a singly linked list and we need to delete the first node from this linked list. For example, Input 1 − 4 → 3 → 2 → 1...
[ { "code": null, "e": 1243, "s": 1062, "text": "A linked list is a linear data structure that has multiple nodes that are connected with each other. Each node consists of two fields – Data Field and the address of the next node." }, { "code": null, "e": 1359, "s": 1243, "text": "L...
Python | Pandas dataframe.mod() - GeeksforGeeks
23 Jul, 2021 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 dataframe.mod() function returns modulo of dataframe and other, element-wise (binary op...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n23 Jul, 2021" }, { "code": null, "e": 24819, "s": 24292, "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...
How to control PC from anywhere using Python? - GeeksforGeeks
12 Jul, 2021 Prerequisite – Socket programming in Python In this solution, we use the concept of Socket Programming for establishing communication between two computers. Socket Programming is a way of connecting two systems on a network to communicate with each other. Sockets are the endpoints built for sending and re...
[ { "code": null, "e": 25689, "s": 25661, "text": "\n12 Jul, 2021" }, { "code": null, "e": 25733, "s": 25689, "text": "Prerequisite – Socket programming in Python" }, { "code": null, "e": 25847, "s": 25733, "text": "In this solution, we use the concept of Socket...
How to escape single quotes in MySQL?
We can escape single quotes with the help of the SELECT statement. For instance, when single quotes are encountered in a name, eg. “Carol’s”. Let us see the syntax. SELECT ‘SomeValue’; Here is an example that display how to include text with single quotes. mysql> SELECT 'Carol\'s Taylor.'; The following is the output. ...
[ { "code": null, "e": 1204, "s": 1062, "text": "We can escape single quotes with the help of the SELECT statement. For instance, when single quotes are encountered in a name, eg. “Carol’s”." }, { "code": null, "e": 1227, "s": 1204, "text": "Let us see the syntax." }, { "co...
How to extract data from a string with Python Regular Expressions?
The following code extracts data like first_id, second_id, category from given strings import re s = 'TS001B01.JPG' match = re.match(r'(TS\d+)([A|B])(\d+)\.JPG', s) first_id = match.group(1) category = match.group(2) second_id = match.group(3) print first_id print category print second_id This gives output TS001 B 01
[ { "code": null, "e": 1149, "s": 1062, "text": "The following code extracts data like first_id, second_id, category from given strings" }, { "code": null, "e": 1352, "s": 1149, "text": "import re\ns = 'TS001B01.JPG'\nmatch = re.match(r'(TS\\d+)([A|B])(\\d+)\\.JPG', s)\nfirst_id = ...
How to remove a list of characters in string in Python?
The string class has a method replace that can be used to replace substrings in a string. We can use this method to replace characters we want to remove with an empty string. For example: >>> "Hello people".replace("e", "") "Hllo popl" If you want to remove multiple characters from a string in a single line, it's bette...
[ { "code": null, "e": 1250, "s": 1062, "text": "The string class has a method replace that can be used to replace substrings in a string. We can use this method to replace characters we want to remove with an empty string. For example:" }, { "code": null, "e": 1298, "s": 1250, "te...
C# | Exception - GeeksforGeeks
07 Jan, 2020 An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at runtime, that disrupts the normal flow of the program’s instructions. Sometimes during the execution of the program, the user may face the possibility that the program may crash or show an unexpected even...
[ { "code": null, "e": 24556, "s": 24528, "text": "\n07 Jan, 2020" }, { "code": null, "e": 25018, "s": 24556, "text": "An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at runtime, that disrupts the normal flow of the program’s inst...
randrange() in Python - GeeksforGeeks
10 Sep, 2020 Generating a random number has always been an important application and having many uses in daily life. Python offers a function that can generate random numbers from a specified range and also allowing rooms for steps to be included, called randrange() in random module. More to this function is discussed ...
[ { "code": null, "e": 23436, "s": 23408, "text": "\n10 Sep, 2020" }, { "code": null, "e": 23761, "s": 23436, "text": "Generating a random number has always been an important application and having many uses in daily life. Python offers a function that can generate random numbers f...
C# | Char.CompareTo() Method - GeeksforGeeks
22 Jun, 2021 In C#, Char.CompareTo() is a System.Char struct method which is used to compare this instance of a specified object or value type and check whether the given instance is precedes, follow, or appears in the same position in the sort order as the specified object or value type. This method can be overloaded ...
[ { "code": null, "e": 25277, "s": 25249, "text": "\n22 Jun, 2021" }, { "code": null, "e": 25634, "s": 25277, "text": "In C#, Char.CompareTo() is a System.Char struct method which is used to compare this instance of a specified object or value type and check whether the given insta...
D3.js scaleQuantize() Function - GeeksforGeeks
19 Aug, 2020 The d3.scaleQuantize() function in d3.js is used to create a new scale that is similar to linear scales except that linear scales use a discrete and dis-continuous scale. Syntax: d3.scaleQuantize(); Parameters: This function does not accept any parameter. Return Value: A function is returned by d3.scaleQua...
[ { "code": null, "e": 25439, "s": 25411, "text": "\n19 Aug, 2020" }, { "code": null, "e": 25610, "s": 25439, "text": "The d3.scaleQuantize() function in d3.js is used to create a new scale that is similar to linear scales except that linear scales use a discrete and dis-continuous...
Implementing a character-level trigram language model from scratch in python | by Cleopatra Douglas | Towards Data Science
The complete code for this article can be found HERE An N-gram is a sequence of n items(words in this case) from a given sample of text or speech. For example, given the text “ Susan is a kind soul, she will help you out as long as it is within her boundaries” a sample n-gram(s) from the text above starting from the be...
[ { "code": null, "e": 100, "s": 47, "text": "The complete code for this article can be found HERE" }, { "code": null, "e": 380, "s": 100, "text": "An N-gram is a sequence of n items(words in this case) from a given sample of text or speech. For example, given the text “ Susan is a...
PhotoView in Android - GeeksforGeeks
18 Feb, 2021 In this article, PhotoView is added in android. PhotoView aims to help produce an easily usable implementation of a zooming Android ImageView using multi-touch and double-tap. Besides that, it has many more features like it notifies the application when the user taps on the photo or when the displayed matr...
[ { "code": null, "e": 26407, "s": 26379, "text": "\n18 Feb, 2021" }, { "code": null, "e": 26869, "s": 26407, "text": "In this article, PhotoView is added in android. PhotoView aims to help produce an easily usable implementation of a zooming Android ImageView using multi-touch and...
Time Series Analysis: Creating Synthetic Datasets | by Soner Yıldırım | Towards Data Science
Time series is a sequence of values ordered in time. We may encounter time series data in pretty much any domain. Weather forecasts, exchange rates, sales data, sound waves are just a few examples. Time series can be any type of data that is represented as an ordered sequence. In an earlier post, I covered the basic co...
[ { "code": null, "e": 450, "s": 172, "text": "Time series is a sequence of values ordered in time. We may encounter time series data in pretty much any domain. Weather forecasts, exchange rates, sales data, sound waves are just a few examples. Time series can be any type of data that is represented a...
How to Delete Data in SQLite Database in Android? - GeeksforGeeks
25 Feb, 2021 In the previous articles, we have seen three operations of CRUD operations such as create, read and update operations in our Android app. In this article, we will take a look at adding delete operation for deleting our items stored in the SQLite database. We will be building a simple application in which ...
[ { "code": null, "e": 24435, "s": 24407, "text": "\n25 Feb, 2021" }, { "code": null, "e": 24692, "s": 24435, "text": "In the previous articles, we have seen three operations of CRUD operations such as create, read and update operations in our Android app. In this article, we will ...
How to Create an Automated Paper Trading System in 5 minutes | by Low Wei Hong | Towards Data Science
Are you bored of doing same stuff again? Feeling your life is just doing the same thing over and over again? Here is the thing, today I am going to introduce a tool to automate your BORING stuff — Python. Python is perhaps the most easiest language to learn. Because of your acquired Python skill, you will be able not o...
[ { "code": null, "e": 213, "s": 172, "text": "Are you bored of doing same stuff again?" }, { "code": null, "e": 281, "s": 213, "text": "Feeling your life is just doing the same thing over and over again?" }, { "code": null, "e": 588, "s": 281, "text": "Here is ...
Prime numbers and Fibonacci in C++
In this problem, we are given a number n. Our task is to print all prime and Fibonacci numbers less than or equal to n. Let’s take an example to understand the problem Input: n = 30 Output: 2 3 5 13 Explanation Fibonacci numbers less than 30 are : 1 1 2 3 5 8 13 21. Out of these numbers, prime numbers are 2 3 5 13. To ...
[ { "code": null, "e": 1182, "s": 1062, "text": "In this problem, we are given a number n. Our task is to print all prime and Fibonacci numbers less than or equal to n." }, { "code": null, "e": 1230, "s": 1182, "text": "Let’s take an example to understand the problem" }, { ...
Inorder Traversal (Iterative) | Practice | GeeksforGeeks
Given a binary tree. Find the inorder traversal of the tree without using recursion. Example 1 Input: 1 / \ 2 3 / \ 4 5 Output: 4 2 5 1 3 Explanation: Inorder traversal (Left->Root->Right) of the tree is 4 2 5 1 3. Example 2 Input: 8 / \ ...
[ { "code": null, "e": 323, "s": 238, "text": "Given a binary tree. Find the inorder traversal of the tree without using recursion." }, { "code": null, "e": 333, "s": 323, "text": "Example 1" }, { "code": null, "e": 507, "s": 333, "text": "Input:\n 1\n...
How to convert a nested OrderedDict to dict? - GeeksforGeeks
23 Nov, 2021 In this article, we will discuss how to convert a nested OrderedDict to dict? Before this we must go through some concepts: Dictionary in Python is an unordered collection of data values, used to store data values like a map, which, unlike other Data Types that hold only a single value as an element, Dicti...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n23 Nov, 2021" }, { "code": null, "e": 24416, "s": 24292, "text": "In this article, we will discuss how to convert a nested OrderedDict to dict? Before this we must go through some concepts:" }, { "code": null, "e": 24...
C++ Program For Deleting A Given Node In Linked List Under Given Constraints - GeeksforGeeks
20 Dec, 2021 Given a Singly Linked List, write a function to delete a given node. Your function must follow the following constraints: It must accept a pointer to the start node as the first parameter and node to be deleted as the second parameter i.e., a pointer to the head node is not global.It should not return a p...
[ { "code": null, "e": 23785, "s": 23757, "text": "\n20 Dec, 2021" }, { "code": null, "e": 23908, "s": 23785, "text": "Given a Singly Linked List, write a function to delete a given node. Your function must follow the following constraints: " }, { "code": null, "e": 241...
SL4A - Quick Guide
Android is a Linux based operating system, designed primarily for portable devices like smartphones and tablet. Android is more than an operating system. It is a software stack that provides many features for users, developers and manufacturers. It is open source and business friendly. The user can choose to replace bu...
[ { "code": null, "e": 2219, "s": 1973, "text": "Android is a Linux based operating system, designed primarily for portable devices like smartphones and tablet. Android is more than an operating system. It is a software stack that provides many features for users, developers and manufacturers." }, ...
Smallest Distance Between Two Words in Python
Suppose we have two strings, word0, and word1 and a text. We have to find the smallest distance between any two occurrences of word0 and word1 in the given text. Here the distance is measured in number of words. If they are not present in the text then return -1. So, if the input is like text = "cat dog abcd dog cat ca...
[ { "code": null, "e": 1326, "s": 1062, "text": "Suppose we have two strings, word0, and word1 and a text. We have to find the smallest\ndistance between any two occurrences of word0 and word1 in the given text. Here the distance\nis measured in number of words. If they are not present in the text the...
HTML - Lists
HTML offers web authors three ways for specifying lists of information. All lists must contain one or more list elements. Lists may contain − <ul> − An unordered list. This will list items using plain bullets. <ul> − An unordered list. This will list items using plain bullets. <ol> − An ordered list. This will use diff...
[ { "code": null, "e": 2516, "s": 2374, "text": "HTML offers web authors three ways for specifying lists of information. All lists must contain one or more list elements. Lists may contain −" }, { "code": null, "e": 2584, "s": 2516, "text": "<ul> − An unordered list. This will list...
How to write a simple Flask API for hello world? - GeeksforGeeks
17 Oct, 2021 Prerequisites: Introduction to REST API REST stands for Representational State Transfer and is an architectural style used in modern web development. It defines a set of rules/constraints for a web application to send and receive data. In this article, we are going to learn how to create a simple REST API...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n17 Oct, 2021" }, { "code": null, "e": 24333, "s": 24292, "text": "Prerequisites: Introduction to REST API " }, { "code": null, "e": 24654, "s": 24333, "text": "REST stands for Representational State Transfer a...
MLflow Part 4: Interacting with the Server Client! | by David Hundley | Towards Data Science
Hello there all! Long time, no see, right? My previous post in this series was published all the way back in October 2020, which is coincidentally the time when a ton of new video games rolled out. Because I write these posts in my free time, I clearly was using my free time for other things. 😂 This will be the fourth...
[ { "code": null, "e": 468, "s": 172, "text": "Hello there all! Long time, no see, right? My previous post in this series was published all the way back in October 2020, which is coincidentally the time when a ton of new video games rolled out. Because I write these posts in my free time, I clearly wa...
Capacity To Ship Packages Within D Days - GeeksforGeeks
06 Jul, 2021 Given an array arr[] consisting of N positive integers representing the weights of N items and a positive integer D, the task is to find the minimum weight capacity of a boat(say K) to ship all weights within D days such that the order of weights loaded on the ship is in the order of the array elements in ...
[ { "code": null, "e": 24890, "s": 24862, "text": "\n06 Jul, 2021" }, { "code": null, "e": 25264, "s": 24890, "text": "Given an array arr[] consisting of N positive integers representing the weights of N items and a positive integer D, the task is to find the minimum weight capacit...
Implementing Linear Search in JavaScript
Following is the code for implementing linear search in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans...
[ { "code": null, "e": 1131, "s": 1062, "text": "Following is the code for implementing linear search in JavaScript −" }, { "code": null, "e": 1142, "s": 1131, "text": " Live Demo" }, { "code": null, "e": 2154, "s": 1142, "text": "<!DOCTYPE html>\n<html lang=\"e...
Mouse Cursor Control Using Facial Movements — An HCI Application | by Akshay L Chandra | Towards Data Science
This HCI (Human-Computer Interaction) application in Python(3.6) will allow you to control your mouse cursor with your facial movements, works with just your regular webcam. Its hands-free, no wearable hardware or sensors needed. Special thanks to Adrian Rosebrock for his amazing blog posts [2] [3], code snippets and h...
[ { "code": null, "e": 401, "s": 171, "text": "This HCI (Human-Computer Interaction) application in Python(3.6) will allow you to control your mouse cursor with your facial movements, works with just your regular webcam. Its hands-free, no wearable hardware or sensors needed." }, { "code": nul...
UUID timestamp() Method in Java with Examples
27 Dec, 2018 The timestamp() method of UUID class in Java is generally used to get the stamp value associated with a particular UUID. Syntax: public long timestamp() Parameters: This method does not take any parameter. Return Value: This method returns the time stamp value of this UUID. Exception: This method throws Un...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Dec, 2018" }, { "code": null, "e": 149, "s": 28, "text": "The timestamp() method of UUID class in Java is generally used to get the stamp value associated with a particular UUID." }, { "code": null, "e": 157, "s": 149...
Python | Pandas dataframe.diff()
20 Nov, 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 dataframe.diff() is used to find the first discrete difference of objects over the giv...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Nov, 2018" }, { "code": null, "e": 242, "s": 28, "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 and makes imp...
Get maximum items when other items of total cost of an item are free
31 May, 2022 Given a list of prices of ‘N’ items. A person can buy only one item of any price and he can get other items for free such that the total price of the rest of the items doesn’t exceed the price of the bought item. The task is to find the maximum number of items the person can have.Examples: Input: n = 5, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 May, 2022" }, { "code": null, "e": 345, "s": 52, "text": "Given a list of prices of ‘N’ items. A person can buy only one item of any price and he can get other items for free such that the total price of the rest of the items doesn’...
Largest gap in an array
12 May, 2021 Given an unsorted array of length N, and we have to find the largest gap between any two elements of the array. In simple words, find max(|Ai-Aj|) where 1 ≤ i ≤ N and 1 ≤ j ≤ N. Examples: Input : arr = {3, 10, 6, 7} Output : 7 Explanation : Here, we can see largest gap can be found between 3 and 10 which...
[ { "code": null, "e": 53, "s": 25, "text": "\n12 May, 2021" }, { "code": null, "e": 231, "s": 53, "text": "Given an unsorted array of length N, and we have to find the largest gap between any two elements of the array. In simple words, find max(|Ai-Aj|) where 1 ≤ i ≤ N and 1 ≤ j ≤...
Java.util.Dictionary Class in Java
07 Dec, 2021 util.Dictionary is an abstract class, representing a key-value relation and works similar to a map. Given a key you can store values and when needed can retrieve the value back using its key. Thus, it is a list of key-value pair. Declaration public abstract class Dictionary extends Object Constructors: D...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Dec, 2021" }, { "code": null, "e": 285, "s": 54, "text": "util.Dictionary is an abstract class, representing a key-value relation and works similar to a map. Given a key you can store values and when needed can retrieve the value ba...
How to sort strings in JavaScript?
17 Jun, 2019 We can sort the strings in JavaScript by following methods described below: Using sort() method Using loop Using sort() method: In this method, we use predefined sort() method of JavaScript to sort the array of string. This method is used only when the string is alphabetic. It will produce wrong results if...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Jun, 2019" }, { "code": null, "e": 128, "s": 52, "text": "We can sort the strings in JavaScript by following methods described below:" }, { "code": null, "e": 148, "s": 128, "text": "Using sort() method" }, {...
How to save connection result in a variable in Node.js ?
07 Apr, 2021 We are going to use the query function in MySQL library in node.js that will return our output as expected. Using this approach, we can save connection result in a variable in Node.js. Setting up environment and Execution: Step 1: Initialize node project using the following command. npm init Step 2: Turn o...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Apr, 2021" }, { "code": null, "e": 213, "s": 28, "text": "We are going to use the query function in MySQL library in node.js that will return our output as expected. Using this approach, we can save connection result in a variable in...
HTML | DOM getElementsByName() Method - GeeksforGeeks
25 Jul, 2019 The getElementsByName() method returns collection of all elements of particular document by name. This collection is called node list and each element of the node list can be visited with the help of the index. Syntax: document.getElementsByName(name) Parameter:This function accepts name of document. Retu...
[ { "code": null, "e": 23513, "s": 23485, "text": "\n25 Jul, 2019" }, { "code": null, "e": 23724, "s": 23513, "text": "The getElementsByName() method returns collection of all elements of particular document by name. This collection is called node list and each element of the node ...
MD5 hash encoding using Python?
One of the major concern of all IT companies in the security of there data. Multiple hashing techniques are there to project and check our data. Hash is a function which takes variable length sequence of bytes as input and converts it to a fixed length sequence. However, to get your original data(input bytes) back is n...
[ { "code": null, "e": 1207, "s": 1062, "text": "One of the major concern of all IT companies in the security of there data. Multiple hashing techniques are there to project and check our data." }, { "code": null, "e": 1559, "s": 1207, "text": "Hash is a function which takes variab...
How can I plot a single point in Matplotlib Python?
To plot a single data point in matplotlib, we can take the following steps − Initialize a list for x and y with a single value. Initialize a list for x and y with a single value. Limit X and Y axis range for 0 to 5. Limit X and Y axis range for 0 to 5. Lay out a grid in the current line style. Lay out a grid in the cur...
[ { "code": null, "e": 1139, "s": 1062, "text": "To plot a single data point in matplotlib, we can take the following steps −" }, { "code": null, "e": 1190, "s": 1139, "text": "Initialize a list for x and y with a single value." }, { "code": null, "e": 1241, "s": 11...
How to download and visualize your Twitter network | by Steve Hedden | Towards Data Science
Social Network Analysis (SNA) is an incredibly interesting field of research in itself as well as a useful skillset for data scientists to apply to other fields. In this tutorial, we will use a Python package, Tweepy, to download Twitter data from the Twitter API and another Python package, NetworkX, to build a network...
[ { "code": null, "e": 586, "s": 172, "text": "Social Network Analysis (SNA) is an incredibly interesting field of research in itself as well as a useful skillset for data scientists to apply to other fields. In this tutorial, we will use a Python package, Tweepy, to download Twitter data from the Twi...
Affinity Analysis (Market Basket Analysis) | by Eser Saygın | Towards Data Science
Have you ever wondered how often do you buy certain items together? Why do you buy some items together? How likely do you purchase an item along with another one? Why sugar placed near tea bags? Is there any relationship between these items? What is the main idea behind it? The answer to all those questions is Affinity...
[ { "code": null, "e": 447, "s": 172, "text": "Have you ever wondered how often do you buy certain items together? Why do you buy some items together? How likely do you purchase an item along with another one? Why sugar placed near tea bags? Is there any relationship between these items? What is the m...
Huang's Termination detection algorithm - GeeksforGeeks
30 Apr, 2019 Huang’s algorithm is an algorithm for detecting termination in a distributed system. The algorithm was proposed by Shing-Tsaan Huang in 1989 in the Journal of Computers. In a distributed system, a process is either in an active state or in an idle state at any given point of time. Termination occurs when a...
[ { "code": null, "e": 24412, "s": 24384, "text": "\n30 Apr, 2019" }, { "code": null, "e": 24582, "s": 24412, "text": "Huang’s algorithm is an algorithm for detecting termination in a distributed system. The algorithm was proposed by Shing-Tsaan Huang in 1989 in the Journal of Comp...
Feature selection in machine learning using Lasso regression | by Gianluca Malato | Towards Data Science
The first thing I have learned as a data scientist is that feature selection is one of the most important steps of a machine learning pipeline. Fortunately, some models may help us accomplish this goal by giving us their own interpretation of feature importance. One of such models is the Lasso regression. I have alread...
[ { "code": null, "e": 478, "s": 171, "text": "The first thing I have learned as a data scientist is that feature selection is one of the most important steps of a machine learning pipeline. Fortunately, some models may help us accomplish this goal by giving us their own interpretation of feature impo...
CSS Buttons - bttn.css Usage
bttn.css library provides a huge collection of simple styles for buttons. This library is completely free for both personal and commercial use. These buttons can be customized easily. To load the btns.css library, go to the link btns.css and paste the following line in the <head> section of the webpage. <head> <link...
[ { "code": null, "e": 2082, "s": 1898, "text": "bttn.css library provides a huge collection of simple styles for buttons. This library is completely free for both personal and commercial use. These buttons can be customized easily." }, { "code": null, "e": 2203, "s": 2082, "text":...
Pascal - Multi-dimensional Array
Pascal programming language allows multidimensional arrays. Here is the general form of a multidimensional array declaration − type array-identifier = array [index-type1, index-type2, ...] of element-type; var a1, a2, ... : array-identifier; For example, the following declaration creates a three dimensional 5 . ...
[ { "code": null, "e": 2210, "s": 2083, "text": "Pascal programming language allows multidimensional arrays. Here is the general form of a multidimensional array declaration −" }, { "code": null, "e": 2332, "s": 2210, "text": "type \n array-identifier = array [index-type1, index-...
C library function - gets()
The C library function char *gets(char *str) reads a line from stdin and stores it into the string pointed to by str. It stops when either the newline character is read or when the end-of-file is reached, whichever comes first. Following is the declaration for gets() function. char *gets(char *str) str − This is the po...
[ { "code": null, "e": 2235, "s": 2007, "text": "The C library function char *gets(char *str) reads a line from stdin and stores it into the string pointed to by str. It stops when either the newline character is read or when the end-of-file is reached, whichever comes first." }, { "code": nul...
Data scientist’s guide to efficient coding in Python | by Dr. Varshita Sher | Towards Data Science
In this article, I wanted to share a few tips for writing cleaner codes that I have absorbed in the last year — mainly from pair programming. Generally speaking, including them as part of my everyday coding routine has helped me generate supreme quality Python scripts, that are easily maintainable and scalable over tim...
[ { "code": null, "e": 495, "s": 172, "text": "In this article, I wanted to share a few tips for writing cleaner codes that I have absorbed in the last year — mainly from pair programming. Generally speaking, including them as part of my everyday coding routine has helped me generate supreme quality P...
How to Protect Files and Directories from Deleting in Linux
Are you working as a Linux Admin? Do you generally defend script documents or any important files? You might be aware that, Chattr (change Attribute) is a command line Linux utility that is used to set/unset exact attributes to a file in Linux process to comfortable unintended deletion or change of major files and fold...
[ { "code": null, "e": 1429, "s": 1062, "text": "Are you working as a Linux Admin? Do you generally defend script documents or any important files? You might be aware that, Chattr (change Attribute) is a command line Linux utility that is used to set/unset exact attributes to a file in Linux process t...
Stop Using Excel for Data Analytics: Upgrade to Python | by Tyler Folkman | Towards Data Science
In 2017, it was estimated that 750 million people worldwide used Excel. The population of the world in 2017 was about 7.6 billion. That means roughly 10% of the population was using Excel and I would guess mostly for data analytics. That is insane. There is no doubt that Excel has been an incredibly important tool for ...
[ { "code": null, "e": 421, "s": 172, "text": "In 2017, it was estimated that 750 million people worldwide used Excel. The population of the world in 2017 was about 7.6 billion. That means roughly 10% of the population was using Excel and I would guess mostly for data analytics. That is insane." }, ...
Deploying a Simple UI for Python. Streamlit Sharing: A Python Project... | by Max Reynolds | Towards Data Science
Creating a user interface for a Python project is seamless with Streamlit, a relatively new browser-based Python framework that lets you elegantly showcase a project without writing any HTML, CSS, or Javascript code. Now, with Streamlit Sharing, you can deploy your project for free without needing to spin up a server o...
[ { "code": null, "e": 389, "s": 172, "text": "Creating a user interface for a Python project is seamless with Streamlit, a relatively new browser-based Python framework that lets you elegantly showcase a project without writing any HTML, CSS, or Javascript code." }, { "code": null, "e": 5...
Validate an IP Address | Practice | GeeksforGeeks
Write a program to Validate an IPv4 Address. According to Wikipedia, IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1 . A valid IPv4 Address is of the form x1.x2.x3.x4 where 0 <= (x1, x2, x3, x4)...
[ { "code": null, "e": 781, "s": 238, "text": "Write a program to Validate an IPv4 Address.\nAccording to Wikipedia, IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1 .\nA valid ...
Shell Script to Check if Every Passed Argument is a File or Directory
04 Oct, 2021 While automating things in Linux we always work on the file and directories. And sometimes we pass the files and directories as the arguments to the shell scripts. And we have to determine whether the provided argument is a file or a directory, and today we are going to see how to check whether provide arg...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Oct, 2021" }, { "code": null, "e": 584, "s": 28, "text": "While automating things in Linux we always work on the file and directories. And sometimes we pass the files and directories as the arguments to the shell scripts. And we have...
Python Program for Fibonacci numbers
24 May, 2022 The Fibonacci numbers are the numbers in the following integer sequence.0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ........In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation Fn = Fn-1 + Fn-2 with seed values F0 = 0 and F1 = 1. Method 1 ( Use recur...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2022" }, { "code": null, "e": 277, "s": 52, "text": "The Fibonacci numbers are the numbers in the following integer sequence.0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ........In mathematical terms, the sequence Fn of Fibona...
Publish Jupiter Notebook File as Web App
08 Jan, 2021 In Jupyter Notebook we always build some models, do some plotting on given Dataset, and many more. But we can also publish our Jupyter file as a web-app. It will show only the output of each code rather than showing the source code. In this article, we will look into the process of publishing a Jupyter No...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jan, 2021" }, { "code": null, "e": 286, "s": 52, "text": "In Jupyter Notebook we always build some models, do some plotting on given Dataset, and many more. But we can also publish our Jupyter file as a web-app. It will show only th...
Sort a string according to the order defined by another string
06 Jul, 2022 Given two strings (of lowercase letters), a pattern, and a string. The task is to sort strings according to the order defined by the pattern. It may be assumed that the pattern has all characters of the string and all characters in the pattern appear only once. Examples: Input : pat = "bca", str = "abc" ...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 314, "s": 52, "text": "Given two strings (of lowercase letters), a pattern, and a string. The task is to sort strings according to the order defined by the pattern. It may be assumed that the patte...
Print array elements that are divisible by at-least one other
22 Jun, 2022 Given an array of length N that contains only integers, the task is to print the special numbers of array. A number in this array is called Special number if it is divisible by at least one other number in the array.Examples : Input : 1 2 3 Output : 2 3 Explanation : both 2 and 3 are divisible by 1.Input...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 283, "s": 54, "text": "Given an array of length N that contains only integers, the task is to print the special numbers of array. A number in this array is called Special number if it is divisible ...
Dispatch Decorator in Python
08 May, 2020 Decorators are a very powerful and useful tool in Python since it allows programmers to modify the behavior of function or class. Decorators allow us to wrap another function in order to extend the behavior of the wrapped function, without permanently modifying it. Example: # defining a decorator def hello...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 May, 2020" }, { "code": null, "e": 294, "s": 28, "text": "Decorators are a very powerful and useful tool in Python since it allows programmers to modify the behavior of function or class. Decorators allow us to wrap another function ...
Program for Variance and Standard Deviation of an array
16 Jul, 2021 Given an array, we need to calculate the variance and standard deviation of the elements of the array. Examples : Input : arr[] = [1, 2, 3, 4, 5] Output : Variance = 2 Standard Deviation = 1 Input : arr[] = [7, 7, 8, 8, 3] Output : Variance = 3 Standard Deviation = 1 We have dis...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jul, 2021" }, { "code": null, "e": 168, "s": 52, "text": "Given an array, we need to calculate the variance and standard deviation of the elements of the array. Examples : " }, { "code": null, "e": 346, "s": 168, ...
C++ Program to Implement Hash Tables with Double Hashing
A hash table is a data structure which is used to store key-value pairs. Hash function is used by hash table to compute an index into an array in which an element will be inserted or searched. Double hashing is a collision resolving technique in Open Addressed Hash tables. Double hashing uses the idea of using a second...
[ { "code": null, "e": 1380, "s": 1187, "text": "A hash table is a data structure which is used to store key-value pairs. Hash function is used by hash table to compute an index into an array in which an element will be inserted or searched." }, { "code": null, "e": 1554, "s": 1380, ...
Python | Automate Google Search using Selenium
11 May, 2020 Google search can be automated using Python script in just 2 minutes. This can be done using selenium (a browser automation tool). Selenium is a portable framework for testing web applications. It can automatically perform the same interactions that any you need to perform manually and this is a small exam...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 May, 2020" }, { "code": null, "e": 628, "s": 54, "text": "Google search can be automated using Python script in just 2 minutes. This can be done using selenium (a browser automation tool). Selenium is a portable framework for testin...
How to set the GOPATH environment variable on Ubuntu?
Before setting up GOPATH or GOROOT on the local environment of yours, we must check whether you have correctly installed Go or not. Just type the following command on any user of the machine, where you think you have installed Go − go version If it outputs nothing or something like go is not present, then instead of se...
[ { "code": null, "e": 1319, "s": 1187, "text": "Before setting up GOPATH or GOROOT on the local environment of yours, we must check whether you have correctly installed Go or not." }, { "code": null, "e": 1419, "s": 1319, "text": "Just type the following command on any user of the...
Python – popup menu in wxPython
15 May, 2020 In this article we are going to know how can we create a popupmenu in wxPython. We will write a code when we click right on screen a popup menu will show up with menu items names as ‘one’ and ‘two’. Syntax : wx.Window.PopupMenu(self, menu, pos) Parameters : Code Example : import wx class PopMenu(wx.Menu)...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2020" }, { "code": null, "e": 227, "s": 28, "text": "In this article we are going to know how can we create a popupmenu in wxPython. We will write a code when we click right on screen a popup menu will show up with menu items na...
Maximum sum submatrix
26 Nov, 2021 Prerequisite: Kadane’s algorithm Given a 2D array arr[][] of dimension N*M, the task is to find the maximum sum sub-matrix from the matrix arr[][]. Examples: Input: arr[][] = {{0, -2, -7, 0 }, { 9, 2, -6, 2 }, { -4, 1, -4, 1 }, { -1, 8, 0, -2}}Output: 15Explanation: The submatrix {{9, 2}, {-4, 1}, {-1, 8}...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Nov, 2021" }, { "code": null, "e": 85, "s": 52, "text": "Prerequisite: Kadane’s algorithm" }, { "code": null, "e": 200, "s": 85, "text": "Given a 2D array arr[][] of dimension N*M, the task is to find the maximum...
How to convert an Object {} to an Array [] of key-value pairs in JavaScript?
10 May, 2022 The task is to convert an Object {} to an Array [] of key-value pairs using JavaScript. Introduction: Objects, in JavaScript, is it’s most important data-type and forms the building blocks for modern JavaScript. These objects are quite different from JavaScript’s primitive data-types(Number, String, Boole...
[ { "code": null, "e": 53, "s": 25, "text": "\n10 May, 2022" }, { "code": null, "e": 142, "s": 53, "text": "The task is to convert an Object {} to an Array [] of key-value pairs using JavaScript. " }, { "code": null, "e": 792, "s": 142, "text": "Introduction: Ob...
How to remove unused space for arraylist Listview in Android?
This example demonstrates How to remove unused space for arraylist Listview in Android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version = "1.0" encoding = "utf-...
[ { "code": null, "e": 1275, "s": 1187, "text": "This example demonstrates How to remove unused space for arraylist Listview in Android." }, { "code": null, "e": 1404, "s": 1275, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all require...
Calculate n + nn + nnn + ... + n(m times) in Python - GeeksforGeeks
05 Nov, 2019 The program is to find a mathematical series, where we need to accept the value of n and m. n is the base number and m is the number of times till which the series run. Examples: Input : 2 + 22 + 222 + 2222 + 22222 Output : 24690 Input : 12 + 1212 + 121212 Output : 122436 We first convert the numbers in...
[ { "code": null, "e": 24097, "s": 24069, "text": "\n05 Nov, 2019" }, { "code": null, "e": 24266, "s": 24097, "text": "The program is to find a mathematical series, where we need to accept the value of n and m. n is the base number and m is the number of times till which the series...
What are different types of parameters to a method in C#?
Methods in C# are generally the block of codes or statements in a program which gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, it provides better readability of the code. There might be certain situations the user wants to...
[ { "code": null, "e": 1331, "s": 1062, "text": "Methods in C# are generally the block of codes or statements in a program which gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, it provides better readabili...
Linear Discriminant Analysis — An Introduction | by Pritha Saha | Towards Data Science
LDA is a dimensionality reduction algorithm, similar to PCA. However while PCA is an unsupervised algorithm that focusses on maximising variance in a dataset, LDA is a supervised algorithm that maximises separability between classes. In a classification problem set up the objective is to ensure maximum separability or ...
[ { "code": null, "e": 406, "s": 172, "text": "LDA is a dimensionality reduction algorithm, similar to PCA. However while PCA is an unsupervised algorithm that focusses on maximising variance in a dataset, LDA is a supervised algorithm that maximises separability between classes." }, { "code":...
Predicting Customer Churn with Neural Networks in Keras | by Kenny Hunt | Towards Data Science
This is a big one for organisations everywhere and one of the main areas in which we see high adoption rate of machine learning, this is probably down to the fact that we are predicting customer behaviour. “Churn” is the term used to describe when a customer stops using a certain organisation’s services. This is a real...
[ { "code": null, "e": 378, "s": 172, "text": "This is a big one for organisations everywhere and one of the main areas in which we see high adoption rate of machine learning, this is probably down to the fact that we are predicting customer behaviour." }, { "code": null, "e": 608, "s"...