title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
A Practical approach to Simple Linear Regression using R - GeeksforGeeks | 29 Sep, 2021
Simple Linear Regression is a statistical method that allows us to summarize and study relationships between two continuous (quantitative) variables. One variable denoted x is regarded as an independent variable and other one denoted y is regarded as a dependent variable. It is assumed that the two variabl... | [
{
"code": null,
"e": 23979,
"s": 23951,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 24472,
"s": 23979,
"text": "Simple Linear Regression is a statistical method that allows us to summarize and study relationships between two continuous (quantitative) variables. One variable ... |
How to list directory tree structure in python? | You can use the os.walk() method to get the list of all children of path you want to display the tree of. Then you can join the paths and get the absolute path of each file.
import os
def tree_printer(root):
for root, dirs, files in os.walk(root):
for d in dirs:
print os.path.join(root, d)
... | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "You can use the os.walk() method to get the list of all children of path you want to display the tree of. Then you can join the paths and get the absolute path of each file."
},
{
"code": null,
"e": 1463,
"s": 1236,
"text": "import o... |
Excel Add Cells | Columns can be added and deleted. You access the menu by right clicking the column letter. New columns are added to the same place you clicked.
Let's try to create a new column B.
Right click on the column and select "Insert Columns":
And a new column is created:
Next, we need to get some Pokemon trainers in there. Typ... | [
{
"code": null,
"e": 144,
"s": 0,
"text": "Columns can be added and deleted. You access the menu by right clicking the column letter. New columns are added to the same place you clicked."
},
{
"code": null,
"e": 180,
"s": 144,
"text": "Let's try to create a new column B."
},
... |
How to Launch an application from another application on Android | In android, we can lunch other applications using packing name. This example demonstrate
about How to Launch an application from another application on 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 cod... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "In android, we can lunch other applications using packing name. This example demonstrate\nabout How to Launch an application from another application on Android."
},
{
"code": null,
"e": 1352,
"s": 1223,
"text": "Step 1 − Create a ne... |
Go Variables | Variables are containers for storing data values.
In Go, there are different types of variables, for example:
int- stores integers (whole numbers), such as 123 or -123
float32- stores floating point numbers, with decimals, such as 19.99 or -19.99
string - stores text, such as "Hello World". String values are surrounded... | [
{
"code": null,
"e": 50,
"s": 0,
"text": "Variables are containers for storing data values."
},
{
"code": null,
"e": 110,
"s": 50,
"text": "In Go, there are different types of variables, for example:"
},
{
"code": null,
"e": 168,
"s": 110,
"text": "int- stores... |
The Quick Guide To Using Environment Variables in Python | by Yash Prakash | Towards Data Science | In our day to day work, we have all come across the need to hide specific things from our app before sharing them on a public version control system, like Git.
You could be dealing with your SQL database names and URLs, their passwords, some secret keys associated with AWS or Google Cloud Platform user groups, API secr... | [
{
"code": null,
"e": 332,
"s": 172,
"text": "In our day to day work, we have all come across the need to hide specific things from our app before sharing them on a public version control system, like Git."
},
{
"code": null,
"e": 515,
"s": 332,
"text": "You could be dealing with ... |
How to get the value of an Entry widget in Tkinter? | Let us suppose that we have created an Entry widget and we want to get the value of it. In this case, we can use the .get() method. It maps the input object into a variable which can be used further to print or display the entered value.
In this example, we will create an application that will display the input text th... | [
{
"code": null,
"e": 1300,
"s": 1062,
"text": "Let us suppose that we have created an Entry widget and we want to get the value of it. In this case, we can use the .get() method. It maps the input object into a variable which can be used further to print or display the entered value."
},
{
"... |
How to perform Case Insensitive matching with JavaScript RegExp? | To perform case-insensitive matching, use the I modifier available in JavaScript Regular Expression.
You can try to run the following code for case-insensitive matching −
<html>
<head>
<title>JavaScript Regular Expression</title>
</head>
<body>
<script>
var myStr = "Welcome to the website!... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "To perform case-insensitive matching, use the I modifier available in JavaScript Regular Expression."
},
{
"code": null,
"e": 1233,
"s": 1163,
"text": "You can try to run the following code for case-insensitive matching −"
},
{
... |
Hard ROC: Really Understanding & Using ROC and AUC | Towards Data Science | The ROC graphs generating code used in this post is available as part of the dython library, which can be found on my GitHub page. Examples seen in this post are also available as a notebook.
Assessing the predictions of any machine-learning model is probably the most important task of a Data Scientist — perhaps even m... | [
{
"code": null,
"e": 364,
"s": 172,
"text": "The ROC graphs generating code used in this post is available as part of the dython library, which can be found on my GitHub page. Examples seen in this post are also available as a notebook."
},
{
"code": null,
"e": 681,
"s": 364,
"te... |
A Bayesian Approach to Time Series Forecasting | by Daniel Foley | Towards Data Science | Today we are going to implement a Bayesian linear regression in R from scratch and use it to forecast US GDP growth. This post is based on a very informative manual from the Bank of England on Applied Bayesian Econometrics. I have translated the original Matlab code into R since its open source and widely used in data ... | [
{
"code": null,
"e": 564,
"s": 47,
"text": "Today we are going to implement a Bayesian linear regression in R from scratch and use it to forecast US GDP growth. This post is based on a very informative manual from the Bank of England on Applied Bayesian Econometrics. I have translated the original M... |
Tryit Editor v3.7 - Show Java | static void Main(string[] args)
{
string firstName = "John";
string lastName = "Doe";
string name = $"My full name is: {firstName} {lastName}"; | [] |
Git - Create Operation | In this chapter, we will see how to create a remote Git repository; from now on, we will refer to it as Git Server. We need a Git server to allow team collaboration.
# add new group
[root@CentOS ~]# groupadd dev
# add new user
[root@CentOS ~]# useradd -G devs -d /home/gituser -m -s /bin/bash gituser
# change password... | [
{
"code": null,
"e": 2211,
"s": 2045,
"text": "In this chapter, we will see how to create a remote Git repository; from now on, we will refer to it as Git Server. We need a Git server to allow team collaboration."
},
{
"code": null,
"e": 2399,
"s": 2211,
"text": "# add new group\... |
Python | Print an Inverted Star Pattern - GeeksforGeeks | 31 Dec, 2020
Here we are going to print inverted star pattern of desired sizes.Examples:
1) Below is the inverted star pattern of size n=5
(Because there are 5 horizontal lines
or rows consist of stars).
*****
****
***
**
*
2) Below is the inverted star pattern of size n=10
(Because... | [
{
"code": null,
"e": 24284,
"s": 24256,
"text": "\n31 Dec, 2020"
},
{
"code": null,
"e": 24360,
"s": 24284,
"text": "Here we are going to print inverted star pattern of desired sizes.Examples:"
},
{
"code": null,
"e": 24793,
"s": 24360,
"text": "1) Below is th... |
Python | Check if substring is part of List of Strings - GeeksforGeeks | 30 Jun, 2019
Many problems of substrings have been dealt with many times. There can also be such problem in which we require to check if argument string is a part of any of the strings coming in the input list of strings. Let’s discuss various ways in which this can be performed.
Method #1 : Using join()The basic appro... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n30 Jun, 2019"
},
{
"code": null,
"e": 24560,
"s": 24292,
"text": "Many problems of substrings have been dealt with many times. There can also be such problem in which we require to check if argument string is a part of any of the... |
Python SQLite - Update Table | UPDATE Operation on any database implies modifying the values of one or more records of a table, which are already available in the database. You can update the values of existing records in SQLite using the UPDATE statement.
To update specific rows, you need to use the WHERE clause along with it.
Following is the synt... | [
{
"code": null,
"e": 3431,
"s": 3205,
"text": "UPDATE Operation on any database implies modifying the values of one or more records of a table, which are already available in the database. You can update the values of existing records in SQLite using the UPDATE statement."
},
{
"code": null,... |
Python Generate successive element difference list | In this as its elements article we will see how to find the difference between the two successive elements for each pair of elements in a given list. The list has only numbers as its elements.
Using the index of the elements along with the for loop, we can find the difference between the successive pair of elements.
L... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "In this as its elements article we will see how to find the difference between the two successive elements for each pair of elements in a given list. The list has only numbers as its elements."
},
{
"code": null,
"e": 1380,
"s": 1255,
... |
Using Deep Learning for Structured Data with Entity Embeddings | by Rutger Ruizendaal | Towards Data Science | Showing that deep learning can handle structured data and how to do it.
In this blog we will touch on two recurring questions in machine learning: The first question revolves around how deep learning performs well on images and text, but how can we use it on our tabular data? Second is a question you must always ask yo... | [
{
"code": null,
"e": 244,
"s": 172,
"text": "Showing that deep learning can handle structured data and how to do it."
},
{
"code": null,
"e": 691,
"s": 244,
"text": "In this blog we will touch on two recurring questions in machine learning: The first question revolves around how ... |
Python | Update each element in tuple list - GeeksforGeeks | 21 Nov, 2019
Sometimes, while working with data, we can have a problem in which we need to perform update operations on tuples. This can have applications across many domains such as web development. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using list comprehensionThis is shorthand to... | [
{
"code": null,
"e": 24498,
"s": 24470,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 24749,
"s": 24498,
"text": "Sometimes, while working with data, we can have a problem in which we need to perform update operations on tuples. This can have applications across many domains s... |
Angular CLI - ng update Command | This chapter explains the syntax, argument and options of ng update command along with an example.
The syntax for ng update command is as follows −
ng update [options]
ng update command updates the application and its dependencies.
The argument for ng update command is as follows −
Options are optional parameters.
De... | [
{
"code": null,
"e": 2174,
"s": 2075,
"text": "This chapter explains the syntax, argument and options of ng update command along with an example."
},
{
"code": null,
"e": 2223,
"s": 2174,
"text": "The syntax for ng update command is as follows −"
},
{
"code": null,
"e... |
Topological sort | Practice | GeeksforGeeks | Given a Directed Acyclic Graph (DAG) with V vertices and E edges, Find any Topological Sorting of that Graph.
Example 1:
Input:
Output:
1
Explanation:
The output 1 denotes that the order is
valid. So, if you have, implemented
your function correctly, then output
would be 1 for all test cases.
One possible Topological... | [
{
"code": null,
"e": 348,
"s": 238,
"text": "Given a Directed Acyclic Graph (DAG) with V vertices and E edges, Find any Topological Sorting of that Graph."
},
{
"code": null,
"e": 360,
"s": 348,
"text": "\nExample 1:"
},
{
"code": null,
"e": 595,
"s": 360,
"te... |
Rearrange characters in a string such that no two adjacent are same using hashing | 24 May, 2022
Given a string str with repeated characters, the task is to rearrange the characters in a string such that no two adjacent characters are same. If it is possible then print Yes else print No.Examples:
Input: str = “geeksforgeeks” Output: Yes “egeksforegeks” is one such arrangement.
Input: str = “bbbbb” Ou... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 May, 2022"
},
{
"code": null,
"e": 254,
"s": 52,
"text": "Given a string str with repeated characters, the task is to rearrange the characters in a string such that no two adjacent characters are same. If it is possible then print Y... |
Python – API.search_users() in Tweepy | 05 Jun, 2020
Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and access secret from twitte... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 454,
"s": 54,
"text": "Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be twe... |
Python | Pandas Index.copy() | 12 Jan, 2022
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 Index.copy() function make a copy of this object. The function also sets the name and ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jan, 2022"
},
{
"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... |
How to subtract two images using Python-OpenCV ? | 28 Dec, 2021
In this article, we are going to see how to subtract two images using OpenCV in Python.
Now, before getting into the topic we shall discuss some of the use cases of Arithmetic operations. Arithmetic operations like addition and subtraction can help us to make images brighter or darker. Specifically, subtra... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 116,
"s": 28,
"text": "In this article, we are going to see how to subtract two images using OpenCV in Python."
},
{
"code": null,
"e": 619,
"s": 116,
"text": "Now, before gettin... |
ASP.NET MVC - Razor | In this chapter, we will look at the Razor view engine in ASP.NET MVC applications and some of the reasons why Razor exists. Razor is a markup syntax that lets you embed server-based code into web pages using C# and VB.Net. It is not a programming language. It is a server side markup language.
Razor has no ties to ASP.... | [
{
"code": null,
"e": 2564,
"s": 2269,
"text": "In this chapter, we will look at the Razor view engine in ASP.NET MVC applications and some of the reasons why Razor exists. Razor is a markup syntax that lets you embed server-based code into web pages using C# and VB.Net. It is not a programming langu... |
\implies - Tex Command | \implies - Used to draw implies symbol.
{ \implies }
\implies command draws implies symbol.
P\implies Q
P⟹Q
P\implies Q
P⟹Q
P\implies Q
14 Lectures
52 mins
Ashraf Said
11 Lectures
1 hours
Ashraf Said
9 Lectures
1 hours
Emenwa Global, Ejike IfeanyiChukwu
29 Lectures ... | [
{
"code": null,
"e": 8026,
"s": 7986,
"text": "\\implies - Used to draw implies symbol."
},
{
"code": null,
"e": 8039,
"s": 8026,
"text": "{ \\implies }"
},
{
"code": null,
"e": 8078,
"s": 8039,
"text": "\\implies command draws implies symbol."
},
{
"c... |
HTML | <tr> align Attribute - GeeksforGeeks | 22 Feb, 2022
The HTML <tr> align Attribute is used to set the horizontal alignment of text content inside the table row. It is not supported by HTML 5.
Syntax:
<tr align= "left | right | center | justify | char">
Attribute Values:
left: It sets the text left-align.
right: It sets the text right-align.
center: It sets t... | [
{
"code": null,
"e": 24766,
"s": 24738,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 24905,
"s": 24766,
"text": "The HTML <tr> align Attribute is used to set the horizontal alignment of text content inside the table row. It is not supported by HTML 5."
},
{
"code": nu... |
AngularJS - Directives | AngularJS directives are used to extend HTML. They are special attributes starting with ng-prefix. Let us discuss the following directives −
ng-app − This directive starts an AngularJS Application.
ng-app − This directive starts an AngularJS Application.
ng-init − This directive initializes application data.
ng-init − ... | [
{
"code": null,
"e": 2840,
"s": 2699,
"text": "AngularJS directives are used to extend HTML. They are special attributes starting with ng-prefix. Let us discuss the following directives −"
},
{
"code": null,
"e": 2897,
"s": 2840,
"text": "ng-app − This directive starts an Angular... |
Difference between int (*p)[3] and int* p[3]? - GeeksforGeeks | 24 Nov, 2020
Pointers store the address of variables or a memory location. Pointers are a symbolic representation of addresses. They enable programs to simulate call-by-reference as well as to create and manipulate dynamic data structures. Its general declaration in C/C++ has the format:
Syntax:
datatype *var_name;
Ex... | [
{
"code": null,
"e": 24122,
"s": 24094,
"text": "\n24 Nov, 2020"
},
{
"code": null,
"e": 24398,
"s": 24122,
"text": "Pointers store the address of variables or a memory location. Pointers are a symbolic representation of addresses. They enable programs to simulate call-by-referen... |
json.load() in Python - GeeksforGeeks | 23 Mar, 2020
The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer the data. Python supports JSON through a built-in package called json. To use this feature, we import the json package in Python scrip... | [
{
"code": null,
"e": 24278,
"s": 24250,
"text": "\n23 Mar, 2020"
},
{
"code": null,
"e": 24736,
"s": 24278,
"text": "The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and... |
How to load CSS and JS files dynamically ? - GeeksforGeeks | 08 Dec, 2021
Generally, the CSS and JS files are included statically with HTML code. It means they are written in the script or the link tag in the HTML code. But this slows down the execution as a bulk of code is loaded unnecessarily. It may or may not use the functionality related to that DOM element. So dynamically... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 25691,
"s": 25300,
"text": "Generally, the CSS and JS files are included statically with HTML code. It means they are written in the script or the link tag in the HTML code. But this slows d... |
How to return only a single property “_id” in MongoDB? | Following is the syntax to return only a single property _id in MongoDB
db.yourCollectionName.find({}, {"_id": 1}).pretty();
Let us first create a collection with documents
> db.singlePropertyIdDemo.insertOne({"_id":101,"UserName":"Larry","UserAge":21});
{ "acknowledged" : true, "insertedId" : 101 }
> db.singleProperty... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "Following is the syntax to return only a single property _id in MongoDB"
},
{
"code": null,
"e": 1187,
"s": 1134,
"text": "db.yourCollectionName.find({}, {\"_id\": 1}).pretty();"
},
{
"code": null,
"e": 1235,
"s": 118... |
What is the importance of _isEqual() method in JavaScript? | _isEqual() is from the underscore and lodash library of javascript. It is used to compare javascript objects. The importance of this method is that it doesn't care about the order of properties while comparing the objects. It only checks whether the properties in the two objects are equal or not. Whereas JSON.stringify... | [
{
"code": null,
"e": 1516,
"s": 1062,
"text": "_isEqual() is from the underscore and lodash library of javascript. It is used to compare javascript objects. The importance of this method is that it doesn't care about the order of properties while comparing the objects. It only checks whether the pro... |
Android Sensors with Example - GeeksforGeeks | 08 Feb, 2022
In our childhood, we all have played many android games like Moto Racing and Temple run in which by tilting the phone the position of the character changes. So, all these happen because of the sensors present in your Android device. Most Android-powered devices have built-in sensors that measure motion, or... | [
{
"code": null,
"e": 25142,
"s": 25114,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 25697,
"s": 25142,
"text": "In our childhood, we all have played many android games like Moto Racing and Temple run in which by tilting the phone the position of the character changes. So, al... |
Matplotlib legends in subplot | To add legends in a subplot, we can take the following Steps −
Using numpy, create points for x, y1, y2 and y3.
Using numpy, create points for x, y1, y2 and y3.
Create a figure and a set of subplots, using the subplots() method, considering 3 subplots.
Create a figure and a set of subplots, using the subplots() method,... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "To add legends in a subplot, we can take the following Steps −"
},
{
"code": null,
"e": 1174,
"s": 1125,
"text": "Using numpy, create points for x, y1, y2 and y3."
},
{
"code": null,
"e": 1223,
"s": 1174,
"text": ... |
EOF, getc() and feof() in C | EOF stands for End of File. The function getc() returns EOF, on success..
Here is an example of EOF in C language,
Let’s say we have “new.txt” file with the following content.
This is demo!
This is demo!
Now, let us see the example.
#include <stdio.h>
int main() {
FILE *f = fopen("new.txt", "r");
int c = getc(f);... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "EOF stands for End of File. The function getc() returns EOF, on success.."
},
{
"code": null,
"e": 1177,
"s": 1136,
"text": "Here is an example of EOF in C language,"
},
{
"code": null,
"e": 1238,
"s": 1177,
"text... |
How to extract unique combinations of two or more variables in an R data frame? | An R data frame can have a large number of categorical variables and these categorical form different combinations. For example, one value of a variable could be linked with two or more values of the other variable. Also, one categorical variable can have all unique categories. We can find this unique combination for a... | [
{
"code": null,
"e": 1463,
"s": 1062,
"text": "An R data frame can have a large number of categorical variables and these categorical form different combinations. For example, one value of a variable could be linked with two or more values of the other variable. Also, one categorical variable can ha... |
How to print duplicate rows in a table? - GeeksforGeeks | 21 Jun, 2018
In the above table, we can find duplicate row using below query.
SELECT name, section FROM tbl
GROUP BY name, section
HAVING COUNT(*) > 1
Another Example:Given a table named PERSON task is to write an SQL query to find all duplicate name in the table.Example :
+----+---------+
| Id | NAME |
+----+-----... | [
{
"code": null,
"e": 23859,
"s": 23831,
"text": "\n21 Jun, 2018"
},
{
"code": null,
"e": 23924,
"s": 23859,
"text": "In the above table, we can find duplicate row using below query."
},
{
"code": null,
"e": 23998,
"s": 23924,
"text": "SELECT name, section FROM... |
How to sort the objects in a list in Python? | To sort a list of ints, floats, strings, chars or any other class that has implemented the __cmp__ method can be sorted just by calling sort on the list. If you want to sort the list in reverse order(descending), just pass in the reverse parameter as well.
my_list = [1, 5, 2, 6, 0]
my_list.sort()
print(my_list)
my_lis... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "To sort a list of ints, floats, strings, chars or any other class that has implemented the __cmp__ method can be sorted just by calling sort on the list. If you want to sort the list in reverse order(descending), just pass in the reverse parameter as we... |
Rotate div to -20 degrees angle with CSS | You can try to run the following code to rotate div to -20 degrees angle with CSS −
Live Demo
<html>
<head>
<style>
div {
width: 300px;
height: 100px;
background-color: pink;
border: 1px solid black;
}
div#myDiv {
/* IE 9 *... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "You can try to run the following code to rotate div to -20 degrees angle with CSS −"
},
{
"code": null,
"e": 1157,
"s": 1146,
"text": " Live Demo"
},
{
"code": null,
"e": 1775,
"s": 1157,
"text": "<html>\n <head... |
C++ Program to Implement Nearest Neighbour Algorithm | This is a C++ program to implement Nearest Neighbour Algorithm which is used to implement traveling salesman problem to compute the minimum cost required to visit all the nodes by traversing across the edges only once.
Begin
Initialize c = 0, cost = 1000;
Initialize g[][].
function swap() is used to swap two v... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "This is a C++ program to implement Nearest Neighbour Algorithm which is used to implement traveling salesman problem to compute the minimum cost required to visit all the nodes by traversing across the edges only once."
},
{
"code": null,
"e... |
How to Create a Sequence of Linearly Increasing Values with Numpy Arrange? - GeeksforGeeks | 05 Aug, 2021
In this article, we are going to create a sequence of linearly increasing values with Numpy arrange() function.
By using arrange() function, we can create a sequence of linearly increasing values. This method returns an array with evenly spaced elements as per the interval. The interval mentioned is half ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 24405,
"s": 24292,
"text": "In this article, we are going to create a sequence of linearly increasing values with Numpy arrange() function. "
},
{
"code": null,
"e": 24625,
"s... |
How to Parse and Modify XML in Python? - GeeksforGeeks | 21 Apr, 2020
XML stands for Extensible Markup Language. It was designed to store and transport data. It was designed to be both human- and machine-readable. That’s why, the design goals of XML emphasize simplicity, generality, and usability across the Internet.
Note: For more information, refer to XML | Basics
Here we ... | [
{
"code": null,
"e": 24530,
"s": 24502,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 24779,
"s": 24530,
"text": "XML stands for Extensible Markup Language. It was designed to store and transport data. It was designed to be both human- and machine-readable. That’s why, the des... |
How to take pictures with camera on Android Programmatically? | This example demonstrates how do I take pictures with camera on android programmatically.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<RelativeLayout
xmlns:android="ht... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "This example demonstrates how do I take pictures with camera on android programmatically."
},
{
"code": null,
"e": 1281,
"s": 1152,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requi... |
Python | Column Average in Record List - GeeksforGeeks | 19 Feb, 2020
Sometimes the data that we receive, is in the form of tuples having data from various sources and we can usually have a use case in which we require to process the finding average of each index of tuple for cumulation. Let’s discuss certain ways in which this can be performed.
Method #1 : Using list compre... | [
{
"code": null,
"e": 24200,
"s": 24172,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 24478,
"s": 24200,
"text": "Sometimes the data that we receive, is in the form of tuples having data from various sources and we can usually have a use case in which we require to process the... |
C++ Program to Add Complex Numbers by Passing Structure to a Function | Complex numbers are numbers that are expressed as a+bi where i is an imaginary number and a and b are real numbers. Some examples on complex numbers are −
2+5i
3-9i
8+2i
A program to add complex numbers by passing structure to a function is given as follows −
Live Demo
#include <iostream>
using namespace std;
typedef... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "Complex numbers are numbers that are expressed as a+bi where i is an imaginary number and a and b are real numbers. Some examples on complex numbers are −"
},
{
"code": null,
"e": 1232,
"s": 1217,
"text": "2+5i\n3-9i\n8+2i"
},
{
... |
Python - Extract URL from Text | URL extraction is achieved from a text file by using regular expression. The expression fetches the text wherever it matches the pattern. Only the re module is used for this purpose.
We can take a input file containig some URLs and process it thorugh the following program to extract the URLs. The findall()function is ... | [
{
"code": null,
"e": 2772,
"s": 2587,
"text": " URL extraction is achieved from a text file by using regular expression. The expression fetches the text wherever it matches the pattern. Only the re module is used for this purpose. "
},
{
"code": null,
"e": 2974,
"s": 2772,
"text"... |
Import all Python libraries in one line of code | by Satyam Kumar | Towards Data Science | Python is a primary language used by data scientists for data science projects, because of the presence of thousands of open-source libraries that can ease and perform a data scientist task. Over 235,000 Python packages can be imported through PyPl.
Multiple libraries and frameworks need to be imported to perform tasks... | [
{
"code": null,
"e": 422,
"s": 172,
"text": "Python is a primary language used by data scientists for data science projects, because of the presence of thousands of open-source libraries that can ease and perform a data scientist task. Over 235,000 Python packages can be imported through PyPl."
},... |
C++ Vector Library - back() Function | The C++ function std::vector::back() returns a reference to the last element of the vector.
Calling back on empty vector causes undefined behavior.
Following is the declaration for std::vector::back() function form std::vector header.
reference back();
const_reference back() const;
None
Reference to last element of th... | [
{
"code": null,
"e": 2695,
"s": 2603,
"text": "The C++ function std::vector::back() returns a reference to the last element of the vector."
},
{
"code": null,
"e": 2751,
"s": 2695,
"text": "Calling back on empty vector causes undefined behavior."
},
{
"code": null,
"e... |
Essential Math for Data Science: Introduction to Matrices and the Matrix Product | by Hadrien Jean | Towards Data Science | As you saw in Essential Math for Data Science, vectors are a useful way to store and manipulate data. You can represent them geometrically as arrows, or as arrays of numbers (the coordinates of their ending points). However, it can be helpful to create more complicated data structures — and that is where matrices need ... | [
{
"code": null,
"e": 510,
"s": 172,
"text": "As you saw in Essential Math for Data Science, vectors are a useful way to store and manipulate data. You can represent them geometrically as arrows, or as arrays of numbers (the coordinates of their ending points). However, it can be helpful to create mo... |
Python Program for Iterative Merge Sort - GeeksforGeeks | 30 Dec, 2020
Following is a typical recursive implementation of Merge Sort that uses last element as pivot.
# Recursive Python Program for merge sort def merge(left, right): if not len(left) or not len(right): return left or right result = [] i, j = 0, 0 while (len(result) < len(left) + len(right)... | [
{
"code": null,
"e": 26285,
"s": 26257,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 26380,
"s": 26285,
"text": "Following is a typical recursive implementation of Merge Sort that uses last element as pivot."
},
{
"code": "# Recursive Python Program for merge sort de... |
C# | Char.GetNumericValue() Method - GeeksforGeeks | 01 Feb, 2019
In C#, Char.GetNumericValue() is a System.Char struct method which is used to convert a numeric Unicode character into a double-precision floating-point number. The numeric value must belong to UnicodeCategory, i.e DecimalDigitNumber, LetterNumber, or OtherNumber. This method can be overloaded by passing d... | [
{
"code": null,
"e": 25387,
"s": 25359,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 25739,
"s": 25387,
"text": "In C#, Char.GetNumericValue() is a System.Char struct method which is used to convert a numeric Unicode character into a double-precision floating-point number. Th... |
What is the difference between MySQL BOOL and BOOLEAN column data types? | BOOL and BOOLEAN both acts like TINYINT(1). You can say that both are synonyms for TINYINT(1).
Here is an example of BOOLEAN. The query to create a table with column boolean type.
mysql> create table Demo
-> (
-> isVaidUser boolean
-> );
Query OK, 0 rows affected (1.08 sec)
The query to insert records in the t... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "BOOL and BOOLEAN both acts like TINYINT(1). You can say that both are synonyms for TINYINT(1)."
},
{
"code": null,
"e": 1242,
"s": 1157,
"text": "Here is an example of BOOLEAN. The query to create a table with column boolean type."
... |
How to display output in javascript? | There are 4 ways to display the output in JavaScript.
Live Demo
<html>
<body>
<p id="display"></p>
<script>
document.getElementById("display").innerHTML = 10 + 10;
</script>
</body>
</html>
20.
Live Demo
<html>
<body>
<script>
document.write(2 + 3);
</script>
</body>
</html>
5
Live Demo
<html>
<body>
<script>
... | [
{
"code": null,
"e": 1116,
"s": 1062,
"text": "There are 4 ways to display the output in JavaScript."
},
{
"code": null,
"e": 1127,
"s": 1116,
"text": " Live Demo"
},
{
"code": null,
"e": 1256,
"s": 1127,
"text": "<html>\n<body>\n<p id=\"display\"></p>\n<scrip... |
Python | Pandas Timedelta.microseconds - GeeksforGeeks | 14 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.
Timedelta is a subclass of datetime.timedelta, and behaves in a similar manner. It is the pan... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n14 Jan, 2019"
},
{
"code": null,
"e": 25861,
"s": 25647,
"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... |
C++ Program to Implement the RSA Algorithm | RSA is an asymmetric cryptography algorithm which works on two keys-public key and private key.
Begin
1. Choose two prime numbers p and q.
2. Compute n = p*q.
3. Calculate phi = (p-1) * (q-1).
4. Choose an integer e such that 1 < e < phi(n) and gcd(e, phi(n)) = 1; i.e., e and phi(n) are coprime.
5. Calcu... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "RSA is an asymmetric cryptography algorithm which works on two keys-public key and private key."
},
{
"code": null,
"e": 1585,
"s": 1158,
"text": "Begin\n 1. Choose two prime numbers p and q.\n 2. Compute n = p*q.\n 3. Calculat... |
JavaScript for-in Loop - GeeksforGeeks | 15 Jul, 2020
For-in loop in JavaScript is used to iterate over properties of an object. It can be a great debugging tool if we want to show the contents of an object. The for-in loop iterates only over those keys of an object which have their enumerable property set to “true”. The key values in an object have four attr... | [
{
"code": null,
"e": 30060,
"s": 30032,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 30660,
"s": 30060,
"text": "For-in loop in JavaScript is used to iterate over properties of an object. It can be a great debugging tool if we want to show the contents of an object. The for-i... |
Transcribing interview data from video to text with Python | by Alan Davies | Towards Data Science | Occasionally I have the need to interview participants for various research projects. Often grant funding for such projects will cover transcription costs. Human transcribers remain the gold standard for this sort of work and usually do an excellent job. You could of course transcribe your own interviews but this can b... | [
{
"code": null,
"e": 661,
"s": 171,
"text": "Occasionally I have the need to interview participants for various research projects. Often grant funding for such projects will cover transcription costs. Human transcribers remain the gold standard for this sort of work and usually do an excellent job. ... |
How can I get the selected value of a drop-down list with jQuery? | With jQuery, it’s easy to get selected text from a drop-down list. This is done using the select id. To change the selected value of a drop-down list, use the val() method.
You can try to run the following code to learn how to change the selected value of a drop-down list. Here, we have a default select option first, b... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "With jQuery, it’s easy to get selected text from a drop-down list. This is done using the select id. To change the selected value of a drop-down list, use the val() method."
},
{
"code": null,
"e": 1468,
"s": 1235,
"text": "You can t... |
UserForms in Excel Macros - GeeksforGeeks | 01 Jun, 2021
A UserFrom refers to a form or a dialog box on the screen that enables a user to input data into Excel’s user interface. it can be created using the Visual Basic Editor and is used to control data entry and avoid errors.
To create a userform head on to the Developer tab-> Visual Basic->Insert->UserForm.
Yo... | [
{
"code": null,
"e": 24653,
"s": 24625,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 24874,
"s": 24653,
"text": "A UserFrom refers to a form or a dialog box on the screen that enables a user to input data into Excel’s user interface. it can be created using the Visual Basic E... |
Java Strings | Set 1 | Practice | GeeksforGeeks | Given two strings S1 and S2 as input. Your task is to concatenate two strings and then reverse the string. Finally print the reversed string.
Example 1:
Input: S1 = "Geeks" , S2 = "forGeeks"
Output: "skeeGrofskeeG"
Explanation: Concatenating S1 and S2 to
get "GeeksforGeeks" then reversing it to
"skeeGrofskeeG".
Ex... | [
{
"code": null,
"e": 380,
"s": 226,
"text": "Given two strings S1 and S2 as input. Your task is to concatenate two strings and then reverse the string. Finally print the reversed string.\n\nExample 1:"
},
{
"code": null,
"e": 544,
"s": 380,
"text": "Input: S1 = \"Geeks\" , S2 = \... |
Add 1 to a given number - GeeksforGeeks | 01 Nov, 2021
Write a program to add one to a given number. The use of operators like ‘+’, ‘-‘, ‘*’, ‘/’, ‘++’, ‘–‘ ...etc are not allowed. Examples:
Input: 12
Output: 13
Input: 6
Output: 7
This question can be approached by using some bit magic. Following are different methods to achieve the same using bitwise ope... | [
{
"code": null,
"e": 24745,
"s": 24717,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 24883,
"s": 24745,
"text": "Write a program to add one to a given number. The use of operators like ‘+’, ‘-‘, ‘*’, ‘/’, ‘++’, ‘–‘ ...etc are not allowed. Examples: "
},
{
"code": nul... |
Boolean Expressions in SQL - GeeksforGeeks | 19 Nov, 2021
Boolean expressions are that expression that returns boolean datatype as result. In SQL there are three values for boolean datatype, those are:
TRUE
FALSE
UNKNOWN
The boolean data type can not be specified during table creation, unlike other data types. Boolean expressions are mainly used with WHERE clause... | [
{
"code": null,
"e": 25623,
"s": 25595,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 25767,
"s": 25623,
"text": "Boolean expressions are that expression that returns boolean datatype as result. In SQL there are three values for boolean datatype, those are:"
},
{
"code... |
C# | Indexers - GeeksforGeeks | 25 Nov, 2020
An indexer allows an instance of a class or struct to be indexed as an array. If the user will define an indexer for a class, then the class will behave like a virtual array. Array access operator i.e ([ ]) is used to access the instance of the class which uses an indexer. A user can retrieve or set the in... | [
{
"code": null,
"e": 25403,
"s": 25375,
"text": "\n25 Nov, 2020"
},
{
"code": null,
"e": 25928,
"s": 25403,
"text": "An indexer allows an instance of a class or struct to be indexed as an array. If the user will define an indexer for a class, then the class will behave like a vir... |
Case insensitive search in JavaScript - GeeksforGeeks | 27 Sep, 2021
Case-insensitive: It means the text or typed input that is not sensitive to capitalization of letters, like “Geeks” and “GEEKS” must be treated as same in case-insensitive search. In Javascript, we use string.match() function to search a regexp in a string and match() function returns the matches, as an Ar... | [
{
"code": null,
"e": 26137,
"s": 26109,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 26457,
"s": 26137,
"text": "Case-insensitive: It means the text or typed input that is not sensitive to capitalization of letters, like “Geeks” and “GEEKS” must be treated as same in case-ins... |
Iterate over a set in Python | In this article, we will learn about iterating/traversing over a set in Python 3.x. Or Earlier.
It is an unordered collection of objects without any duplicates. This can be done by enclosing all the elements within curly braces. We can also form sets by using type casting via a keyword “set”.
set_inp = {'t','u','t','o'... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "In this article, we will learn about iterating/traversing over a set in Python 3.x. Or Earlier."
},
{
"code": null,
"e": 1356,
"s": 1158,
"text": "It is an unordered collection of objects without any duplicates. This can be done by e... |
Difference between import tkinter as tk and from tkinter import | In order to work with tkinter applications and widgets, we have to import the tkinter library in the environment. There are multiple ways to import the tkinter library in the notebook.
Using from tkinter import *
Using import tkinter as tk
The first method to import the tkinter library is the most common, as it comes w... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "In order to work with tkinter applications and widgets, we have to import the tkinter library in the environment. There are multiple ways to import the tkinter library in the notebook."
},
{
"code": null,
"e": 1275,
"s": 1247,
"text"... |
How can we add different font style items to JList in Java?
| A JList is a subclass of JComponent class and it can be used to display a list of objects that allows the user to select
one or more items. A JList can generate a ListSelectiionListener interface and need to implement the abstract method valueChanged(). A DefaultListModel class provides a simple implementation of a lis... | [
{
"code": null,
"e": 1710,
"s": 1062,
"text": "A JList is a subclass of JComponent class and it can be used to display a list of objects that allows the user to select\none or more items. A JList can generate a ListSelectiionListener interface and need to implement the abstract method valueChanged()... |
Static Data Members in C++ | Static data members are class members that are declared using the static keyword. There is only one copy of the static data member in the class, even if there are many class objects. This is because all the objects share the static data member. The static data member is always initialized to zero when the first class o... | [
{
"code": null,
"e": 1400,
"s": 1062,
"text": "Static data members are class members that are declared using the static keyword. There is only one copy of the static data member in the class, even if there are many class objects. This is because all the objects share the static data member. The stat... |
Compare the content of two StringBuilders | Equals method is used in C# to compare the content of two StringBuilders.
The following are our two StringBuilders −
// first
StringBuilder str1 = new StringBuilder();
str1.Append("Tim");
str1.Append("Tom");
str1.Append("Henry");
// second
StringBuilder str2 = new StringBuilder();
str2.Append("John");
str2.Append("Dav... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "Equals method is used in C# to compare the content of two StringBuilders."
},
{
"code": null,
"e": 1179,
"s": 1136,
"text": "The following are our two StringBuilders −"
},
{
"code": null,
"e": 1409,
"s": 1179,
"te... |
Agile in Data Science: How can Scrum Work Effectively for Your Team? | by Rose Day | Towards Data Science | Let’s dive deeper into acceptance criteria, story points, and sprint reviews! Using Agile Scrum on a data science team is hard, but it doesn’t need to be impossible. The past year I have worked on a heavily research-focused data science team, using Scrum to define, prioritize, and plan work. On this team, we have a set... | [
{
"code": null,
"e": 787,
"s": 172,
"text": "Let’s dive deeper into acceptance criteria, story points, and sprint reviews! Using Agile Scrum on a data science team is hard, but it doesn’t need to be impossible. The past year I have worked on a heavily research-focused data science team, using Scrum ... |
PHP and MYSQL database connection and table creation only once if it does not already exist? | To create database only once, use the below syntax.
CREATE DATABASE IF NOT EXISTS yourDatabaseName;
To create table only once, use the below syntax −
CREATE TABLE IF NOT EXISTS yourTableName
(
yourColumnName yourDatatype,
.
.
.
N
);
Let us implement both the above syntaxes to create database and table on... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "To create database only once, use the below syntax."
},
{
"code": null,
"e": 1162,
"s": 1114,
"text": "CREATE DATABASE IF NOT EXISTS yourDatabaseName;"
},
{
"code": null,
"e": 1212,
"s": 1162,
"text": "To create t... |
Load a text file and find number of characters in the file - JavaScript | Suppose we have a data.txt file that lives in the same directory as our NodeJS file. Suppose the content of that file is −
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of typ... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "Suppose we have a data.txt file that lives in the same directory as our NodeJS file. Suppose the content of that file is −"
},
{
"code": null,
"e": 1585,
"s": 1185,
"text": "Lorem Ipsum is simply dummy text of the printing and typese... |
Python program to find uncommon words from two Strings | In this article, we will learn about the solution to the problem statement given below.
Problem statement − We are given two strings, we need to get the uncommon words from the given strings.
Now let’s observe the solution in the implementation below −
Live Demo
# uncommon words
def find(A, B):
# count
count = {... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this article, we will learn about the solution to the problem statement given below."
},
{
"code": null,
"e": 1254,
"s": 1150,
"text": "Problem statement − We are given two strings, we need to get the uncommon words from the given... |
0-1 Knapsack Problem in C? | A knapsack is a bag. And the knapsack problem deals with the putting items to the bag based on the value of the items. It aim is to maximise the value inside the bag. In 0-1 Knapsack you can either put the item or discard it, there is no concept of putting some part of item in the knapsack.
Value of items = {20, 25,40}... | [
{
"code": null,
"e": 1354,
"s": 1062,
"text": "A knapsack is a bag. And the knapsack problem deals with the putting items to the bag based on the value of the items. It aim is to maximise the value inside the bag. In 0-1 Knapsack you can either put the item or discard it, there is no concept of putt... |
4 Categorical Encoding Concepts to Know for Data Scientists | by Cornellius Yudha Wijaya | Towards Data Science | The categorical data type is data divided by category or group — for example, Gender, Education, and Birth Place. Each element in the categorical data is used to group information on specific labels, different from numerical data where the numerical data information is in numbers. The problem with the unprocessed categ... | [
{
"code": null,
"e": 632,
"s": 172,
"text": "The categorical data type is data divided by category or group — for example, Gender, Education, and Birth Place. Each element in the categorical data is used to group information on specific labels, different from numerical data where the numerical data ... |
Spring Boot - Exception Handling | Handling exceptions and errors in APIs and sending the proper response to the client is good for enterprise applications. In this chapter, we will learn how to handle exceptions in Spring Boot.
Before proceeding with exception handling, let us gain an understanding on the following annotations.
The @ControllerAdvice is... | [
{
"code": null,
"e": 3219,
"s": 3025,
"text": "Handling exceptions and errors in APIs and sending the proper response to the client is good for enterprise applications. In this chapter, we will learn how to handle exceptions in Spring Boot."
},
{
"code": null,
"e": 3321,
"s": 3219,
... |
How to convert string to 24-hour datetime format in MySQL? | To convert string to 24 hour datetime format in MySQL, you can use STR_TO_DATE() method. With that use the following format for datetime as the parameter:
'%Y-%m-%d %H:%i:%s'
Following is the syntax
SELECT STR_TO_DATE(yourColumnName, '%Y-%m-%d %H:%i:%s') FROM yourTableName;
Let us first create a table:
mysql> create ta... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "To convert string to 24 hour datetime format in MySQL, you can use STR_TO_DATE() method. With that use the following format for datetime as the parameter:"
},
{
"code": null,
"e": 1237,
"s": 1217,
"text": "'%Y-%m-%d %H:%i:%s'"
},
... |
How to find mode for an R data frame column? | To find the model for an R data frame column, we can create a function and use it for the calculation. The function for mode is created as written below −
mode<-function(x){which.max(tabulate(x))}
For a data frame called df having numerical column x, this function will be used as mode(df$x).
Consider the below data fra... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "To find the model for an R data frame column, we can create a function and use it for the calculation. The function for mode is created as written below −"
},
{
"code": null,
"e": 1259,
"s": 1217,
"text": "mode<-function(x){which.max... |
Maximum XOR subarray | Practice | GeeksforGeeks | Given an array arr[] of size, N. Find the subarray with maximum XOR. A subarray is a contiguous part of the array.
Example 1:
Input:
N = 4
arr[] = {1,2,3,4}
Output: 7
Explanation:
The subarray {3,4} has maximum xor
value equal to 7.
Your Task:
You don't need to read input or print anything. Your task is to compl... | [
{
"code": null,
"e": 353,
"s": 238,
"text": "Given an array arr[] of size, N. Find the subarray with maximum XOR. A subarray is a contiguous part of the array."
},
{
"code": null,
"e": 365,
"s": 353,
"text": "\nExample 1:"
},
{
"code": null,
"e": 476,
"s": 365,
... |
BabylonJS - Position | <!doctype html>
<html>
<head>
<meta charset = "utf-8">
<title>BabylonJs - Basic Element-Creating Scene</title>
<script src = "babylon.js"></script>
<style>
canvas {width: 100%; height: 100%;}
</style>
</head>
<body>
<canvas id = "renderCanvas"></canvas>
<scri... | [
{
"code": null,
"e": 4067,
"s": 2183,
"text": "<!doctype html>\n<html>\n <head>\n <meta charset = \"utf-8\">\n <title>BabylonJs - Basic Element-Creating Scene</title>\n <script src = \"babylon.js\"></script>\n <style>\n canvas {width: 100%; height: 100%;}\n </style... |
Text Classification with State of the Art NLP Library — Flair | by Tadej Magajna | Towards Data Science | Why is this big news for NLP? Flair delivers state-of-the-art performance in solving NLP problems such as named entity recognition (NER), part-of-speech tagging (PoS), sense disambiguation and text classification. It’s an NLP framework built on top of PyTorch.
This article explains how to use existing and build custom ... | [
{
"code": null,
"e": 433,
"s": 172,
"text": "Why is this big news for NLP? Flair delivers state-of-the-art performance in solving NLP problems such as named entity recognition (NER), part-of-speech tagging (PoS), sense disambiguation and text classification. It’s an NLP framework built on top of PyT... |
WebRTC - Text Demo | In this chapter, we are going to build a client application that allows two users on separate devices to send messages each other using WebRTC. Our application will have two pages. One for login and the other for sending messages to another user.
The two pages will be the div tags. Most input is done through simple eve... | [
{
"code": null,
"e": 2134,
"s": 1887,
"text": "In this chapter, we are going to build a client application that allows two users on separate devices to send messages each other using WebRTC. Our application will have two pages. One for login and the other for sending messages to another user."
},
... |
How to use small font in HTML? | To set the small font in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-size. HTML5 do not support the <font> tag, so the CSS style is used to add font size.
Just keep in mind, the usage of style attrib... | [
{
"code": null,
"e": 1338,
"s": 1062,
"text": "To set the small font in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-size. HTML5 do not support the <font> tag, so the CSS style is ... |
Spam Filtering System With Deep Learning | by Sie Huai Gan | Towards Data Science | Deep learning is getting very popular in many industry and many interesting problems can be solved by deep learning technology. In this article, I am showing you how to utilize a deep learning model to design a super effective spam filtering system.
Not long ago, I had written an article about Spam Filtering with Tradi... | [
{
"code": null,
"e": 422,
"s": 172,
"text": "Deep learning is getting very popular in many industry and many interesting problems can be solved by deep learning technology. In this article, I am showing you how to utilize a deep learning model to design a super effective spam filtering system."
},... |
How to filter a specific month in MySQL when date is in varchar? | To filter, you can use STR_TO_DATE() function from MySQL. With that, use MONTH() to get the date from the specific month. Let us first create a table −
mysql> create table DemoTable
-> (
-> DueDate varchar(100)
-> );
Query OK, 0 rows affected (1.18 sec)
Insert some records in the table using insert command −
my... | [
{
"code": null,
"e": 1214,
"s": 1062,
"text": "To filter, you can use STR_TO_DATE() function from MySQL. With that, use MONTH() to get the date from the specific month. Let us first create a table −"
},
{
"code": null,
"e": 1324,
"s": 1214,
"text": "mysql> create table DemoTable\... |
Android - Eclipse | You can download the latest version of Android SDK from Android official website − Android SDK Downloads. If you are installing SDK on Windows machine, then you will find a installer_rXX-windows.exe, so just download and run this exe which will launch Android SDK Tool Set up wizard to guide you throughout of the instal... | [
{
"code": null,
"e": 4046,
"s": 3607,
"text": "You can download the latest version of Android SDK from Android official website − Android SDK Downloads. If you are installing SDK on Windows machine, then you will find a installer_rXX-windows.exe, so just download and run this exe which will launch A... |
How to Drop Rows with NaN Values in Pandas DataFrame? - GeeksforGeeks | 01 Sep, 2021
NaN stands for Not A Number and is one of the common ways to represent the missing value in the data. It is a special floating-point value and cannot be converted to any other type than float. NaN value is one of the major problems in Data Analysis. It is very essential to deal with NaN in order to get the... | [
{
"code": null,
"e": 25330,
"s": 25302,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 25804,
"s": 25330,
"text": "NaN stands for Not A Number and is one of the common ways to represent the missing value in the data. It is a special floating-point value and cannot be converted ... |
How to disable arrow key in textarea using JavaScript ? - GeeksforGeeks | 31 Oct, 2019
Given an HTML element containing the <textarea> element and the task is to disable scrolling through arrow keys with the help of JavaScript.
Approach 1:
Add an event listener onkeydown on the window.
If the event happens then check if the keys are arrow or not.
If arrow key is pressed then prevent its defa... | [
{
"code": null,
"e": 26655,
"s": 26627,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 26796,
"s": 26655,
"text": "Given an HTML element containing the <textarea> element and the task is to disable scrolling through arrow keys with the help of JavaScript."
},
{
"code": ... |
Pairs with Difference less than K | Practice | GeeksforGeeks | Given an array of N integers, the task is to find all pairs with a difference less than K.
Example 1:
Input : Arr[] = {1, 10, 4, 2}, K = 3
Output : 2
Explanation:
we have an array a[] = {1, 10, 4, 2} and
K = 3 We can make only two pairs with a
difference of less than 3.
(1, 2) and (4, 2). So, the answer is 2.
Examp... | [
{
"code": null,
"e": 329,
"s": 238,
"text": "Given an array of N integers, the task is to find all pairs with a difference less than K."
},
{
"code": null,
"e": 340,
"s": 329,
"text": "Example 1:"
},
{
"code": null,
"e": 553,
"s": 340,
"text": "Input : Arr[] =... |
MapStruct - Mapping Map | Using Mapstruct we can create mapping of map objects using @MapMapping annotation. Other rules of mapping are same as we've seen so far.
@Mapper
public interface UtilityMapper {
@MapMapping(valueDateFormat = "dd.MM.yyyy")
Map<String, String> getMap(Map<Long, GregorianCalendar> source);
}
Following example demonst... | [
{
"code": null,
"e": 2397,
"s": 2260,
"text": "Using Mapstruct we can create mapping of map objects using @MapMapping annotation. Other rules of mapping are same as we've seen so far."
},
{
"code": null,
"e": 2555,
"s": 2397,
"text": "@Mapper\npublic interface UtilityMapper {\n ... |
How to create space between list bullets and text in HTML? | To create space between list bullets and text in HTML, use CSS padding property. Left padding padding-left is to be added to <ul> tag list item i.e. <li> tag. Through this, padding gets added, which will create space between list bullets and text in HTML.
We have the following unordered list with disc bullets
Live Demo... | [
{
"code": null,
"e": 1318,
"s": 1062,
"text": "To create space between list bullets and text in HTML, use CSS padding property. Left padding padding-left is to be added to <ul> tag list item i.e. <li> tag. Through this, padding gets added, which will create space between list bullets and text in HTM... |
How to fill color below a curve in Matplotlib? | To fill color below a curve, we can take the following steps −
Initialize variable n. Initialize x and y data points using numpy.
Initialize variable n. Initialize x and y data points using numpy.
Create a figure and a set of subplots, fig and ax.
Create a figure and a set of subplots, fig and ax.
Plot the curve using ... | [
{
"code": null,
"e": 1125,
"s": 1062,
"text": "To fill color below a curve, we can take the following steps −"
},
{
"code": null,
"e": 1192,
"s": 1125,
"text": "Initialize variable n. Initialize x and y data points using numpy."
},
{
"code": null,
"e": 1259,
"s": ... |
Static Typing in Python. Conducting Type Checking with Ease | by Eden Au | Towards Data Science | Python is a dynamically typed language. That means it is not necessary to declare the type of a variable when assigning a value to it. For instance, you do not need to declare the data type of object major as string when you initialise the object with a string value of 'Tom'.
major = 'Tom'
In a statically typed languag... | [
{
"code": null,
"e": 448,
"s": 171,
"text": "Python is a dynamically typed language. That means it is not necessary to declare the type of a variable when assigning a value to it. For instance, you do not need to declare the data type of object major as string when you initialise the object with a s... |
C++ Program to Generate Random Numbers Using Middle Square Method | The middle-square method is one of the simplest method of generating random numbers. this method will either begin repeatedly generating the same number or cycle to a previous number in the sequence and loop indefinitely. For a generator of ndigit random numbers, the period can be no longer than n. If the middle n digi... | [
{
"code": null,
"e": 1555,
"s": 1062,
"text": "The middle-square method is one of the simplest method of generating random numbers. this method will either begin repeatedly generating the same number or cycle to a previous number in the sequence and loop indefinitely. For a generator of ndigit rando... |
Python import modules from Zip archives (zipimport) | Use of 'zipimport' module makes it possible to import Python modules and packages from ZIP-format archives. This module also allows an item of sys.path to be a string naming a ZIP file archive. Any files may be present in the ZIP archive, but only files .py and .pyc are available for import. ZIP import of dynamic modul... | [
{
"code": null,
"e": 1400,
"s": 1062,
"text": "Use of 'zipimport' module makes it possible to import Python modules and packages from ZIP-format archives. This module also allows an item of sys.path to be a string naming a ZIP file archive. Any files may be present in the ZIP archive, but only files... |
Image Segmentation using Python’s scikit-image module | 03 Dec, 2021
The process of splitting images into multiple layers, represented by a smart, pixel-wise mask is known as Image Segmentation. It involves merging, blocking, and separating an image from its integration level. Splitting a picture into a collection of Image Objects with comparable properties is the first sta... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 461,
"s": 52,
"text": "The process of splitting images into multiple layers, represented by a smart, pixel-wise mask is known as Image Segmentation. It involves merging, blocking, and separating an... |
How to perform square root without using math module in Python? | Python has exponentiation operator (**) which can be used to calculate power of a number. x**y returns x raised to y i.e. y times multiplication of x. Since we need to calculate square root, y should be (1/2)
>>> 10**(1/2)
3.1622776601683795
>>> 25**(1/2)
5.0 | [
{
"code": null,
"e": 1396,
"s": 1187,
"text": "Python has exponentiation operator (**) which can be used to calculate power of a number. x**y returns x raised to y i.e. y times multiplication of x. Since we need to calculate square root, y should be (1/2)"
},
{
"code": null,
"e": 1447,
... |
How to Count the Number of Rows of a Given SQLite Table using Python? | 28 Apr, 2021
In this article, we will discuss how we can count the number of rows of a given SQLite Table using Python. We will be using the cursor_obj.fetchall() method to do the same. This method fetches all the rows of a query result. It returns all the rows as a list of tuples. An empty list is returned if there is... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 356,
"s": 28,
"text": "In this article, we will discuss how we can count the number of rows of a given SQLite Table using Python. We will be using the cursor_obj.fetchall() method to do the same. Th... |
Perl | given-when Statement | 04 Jul, 2019
given-when statement in Perl is a substitute for long if-statements that compare a variable to several integral values.
The given-when statement is a multiway branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression.
given is a control ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jul, 2019"
},
{
"code": null,
"e": 172,
"s": 52,
"text": "given-when statement in Perl is a substitute for long if-statements that compare a variable to several integral values."
},
{
"code": null,
"e": 340,
"s": 172... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.