title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python model of Covid-19 epidemic | Towards Data Science | How long will the epidemic last? How long do we need to keep social distancing? What if it is lifted? What if nothing was done?
One month ago, with contributions from doctors and data scientists, I created a model in Python to forecast the evolution of the Coronavirus epidemic in the metropolitan region of São Paulo a... | [
{
"code": null,
"e": 299,
"s": 171,
"text": "How long will the epidemic last? How long do we need to keep social distancing? What if it is lifted? What if nothing was done?"
},
{
"code": null,
"e": 796,
"s": 299,
"text": "One month ago, with contributions from doctors and data sc... |
How to update a range of records in MySQL? | To update a range of records in MySQL, you can use BETWEEN. Let us first create a table:
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name varchar(20),
Age int
);
Query OK, 0 rows affected (0.53 sec)
Following is the query to insert some records in the table using insert command:... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To update a range of records in MySQL, you can use BETWEEN. Let us first create a table:"
},
{
"code": null,
"e": 1302,
"s": 1151,
"text": "mysql> create table DemoTable\n(\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n Name var... |
Java - String Buffer replace() Method | This method replaces the characters in a substring of this StringBuffer with characters in the specified String.
The substring begins at the specified start and extends to the character at index end - 1 or to the end of the StringBuffer, if no such character exists. First the characters in the substring are removed and... | [
{
"code": null,
"e": 2490,
"s": 2377,
"text": "This method replaces the characters in a substring of this StringBuffer with characters in the specified String."
},
{
"code": null,
"e": 2746,
"s": 2490,
"text": "The substring begins at the specified start and extends to the charac... |
How do I see what character set a MySQL database / table / column is? | To check what character set a MySQL database/ table/ column is, let us see an example: A database which has the name ‘business’ and table name is ‘student’ which is already present in the database is used.
Syntax in order to check the table character set.
SELECT CCSA.character_set_name
FROM information_schema.`TABLES`... | [
{
"code": null,
"e": 1268,
"s": 1062,
"text": "To check what character set a MySQL database/ table/ column is, let us see an example: A database which has the name ‘business’ and table name is ‘student’ which is already present in the database is used."
},
{
"code": null,
"e": 1318,
... |
How to perform double click on an element in Selenium with python? | We can perform double click on an element in Selenium with the help of
Action Chains class. These classes are generally used for automating interactions
like context menu click, mouse button actions, key press and mouse movements.
These types of actions are mainly common in complex scenarios like drag and drop
and hove... | [
{
"code": null,
"e": 1293,
"s": 1062,
"text": "We can perform double click on an element in Selenium with the help of\nAction Chains class. These classes are generally used for automating interactions\nlike context menu click, mouse button actions, key press and mouse movements."
},
{
"code"... |
Analysis of Algorithms | Set 5 (Practice Problems) - GeeksforGeeks | 31 Mar, 2022
We have discussed Asymptotic Analysis, Worst, Average and Best Cases , Asymptotic Notations and Analysis of loops in previous posts.In this post, practice problems on the analysis of algorithms are discussed.Problem 1: Find the complexity of below recurrence:
{ 3T(n-1), if n>0,
T(n) = { 1, oth... | [
{
"code": null,
"e": 24158,
"s": 24130,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 24420,
"s": 24158,
"text": "We have discussed Asymptotic Analysis, Worst, Average and Best Cases , Asymptotic Notations and Analysis of loops in previous posts.In this post, practice problems... |
How do I get into a Docker container's shell? | Once you have your Docker container up and running, you can work with the environment of the Docker container in the same way you would do with an Ubuntu machine. You can access the bash or shell of the container and execute commands inside it and play around with the file system. You can build, test, and deploy your a... | [
{
"code": null,
"e": 1423,
"s": 1062,
"text": "Once you have your Docker container up and running, you can work with the environment of the Docker container in the same way you would do with an Ubuntu machine. You can access the bash or shell of the container and execute commands inside it and play ... |
53 Python Interview Questions and Answers | by GreekDataGuy | Towards Data Science | Not so long ago I started a new role as a “Data Scientist” which turned out to be “Python Engineer” in practice.
I would have been more prepared if I’d brushed up on Python’s thread lifecycle instead of recommender systems in advance.
In that spirit, here are my python interview/job preparation questions and answers. M... | [
{
"code": null,
"e": 285,
"s": 172,
"text": "Not so long ago I started a new role as a “Data Scientist” which turned out to be “Python Engineer” in practice."
},
{
"code": null,
"e": 407,
"s": 285,
"text": "I would have been more prepared if I’d brushed up on Python’s thread life... |
Find all divisors of a natural number in java | Following is the Java program which prints all the divisors of a given number.
import java.util.Scanner;
public class DivisorsOfNaturalNumber {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter required number :");
int num = sc.nextInt();
... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "Following is the Java program which prints all the divisors of a given number."
},
{
"code": null,
"e": 1511,
"s": 1141,
"text": "import java.util.Scanner;\n\npublic class DivisorsOfNaturalNumber {\n public static void main(String ... |
Time Series Forecasting using TensorFlow and Deep Hybrid Learning | by Aditya Bhattacharya | Towards Data Science | In my previous TDS article I described about the Machine Learning variant of Deep Hybrid Learning and how easily it can be applied for image data. If you are someone who is new to the concept of Deep Hybrid Learning, I would highly recommend you to have a look at the session recording of my past session at GIDS AI/ML 2... | [
{
"code": null,
"e": 583,
"s": 172,
"text": "In my previous TDS article I described about the Machine Learning variant of Deep Hybrid Learning and how easily it can be applied for image data. If you are someone who is new to the concept of Deep Hybrid Learning, I would highly recommend you to have a... |
PDFBox - Adding Multiple Lines | In the example provided in the previous chapter we discussed how to add text to a page in a PDF but through this program, you can only add the text that would fit in a single line. If you try to add more content, all the text that exceeds the line space will not be displayed.
For example, if you execute the above progr... | [
{
"code": null,
"e": 2304,
"s": 2027,
"text": "In the example provided in the previous chapter we discussed how to add text to a page in a PDF but through this program, you can only add the text that would fit in a single line. If you try to add more content, all the text that exceeds the line space... |
Emulating a PID Controller with Long Short-term Memory: Part 1 | by Nicholas Lewis | Towards Data Science | Do you ever just get really excited about an idea? Maybe it’s a new DIY project you’re tackling, or a cool assignment at work. Maybe you’re crazy like me and want to hike the Pacific Crest Trail (as I’m moving to Seattle soon, so I can’t help but get excited about the idea of flying down to San Diego and walking home).... | [
{
"code": null,
"e": 582,
"s": 172,
"text": "Do you ever just get really excited about an idea? Maybe it’s a new DIY project you’re tackling, or a cool assignment at work. Maybe you’re crazy like me and want to hike the Pacific Crest Trail (as I’m moving to Seattle soon, so I can’t help but get exci... |
Javascript Program For Sorting An Array Of 0s, 1s and 2s - GeeksforGeeks | 16 Dec, 2021
Given an array A[] consisting 0s, 1s and 2s. The task is to write a function that sorts the given array. The functions should put all 0s first, then all 1s and all 2s in last.Examples:
Input: {0, 1, 2, 0, 1, 2}
Output: {0, 0, 1, 1, 2, 2}
Input: {0, 1, 1, 0, 1, 2, 1, 2, 0, 0, 0, 1}
Output: {0, 0, 0, 0, 0, ... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 24590,
"s": 24405,
"text": "Given an array A[] consisting 0s, 1s and 2s. The task is to write a function that sorts the given array. The functions should put all 0s first, then all 1s and all... |
Shell Scripting - Set Command - GeeksforGeeks | 04 Jan, 2022
In this article, we will see the SET command in bash scripting.
Set command: It is used to set or unset specific flags and settings( determines the behavior of the script and helps in executing the tasks without any issue.) inside the shell environment. It can be used to change or display the shell attribu... | [
{
"code": null,
"e": 24040,
"s": 24012,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 24104,
"s": 24040,
"text": "In this article, we will see the SET command in bash scripting."
},
{
"code": null,
"e": 24368,
"s": 24104,
"text": "Set command: It is used to... |
How to convert numeric columns to factor using dplyr package in R? | If we have a numeric column in an R data frame and the unique number of values in the column is low that means the numerical column can be treated as a factor. Therefore, we can convert numeric columns to factor. To do this using dplyr package, we can use mutate_if function of dplyr package.
Loading dplyr package and c... | [
{
"code": null,
"e": 1355,
"s": 1062,
"text": "If we have a numeric column in an R data frame and the unique number of values in the column is low that means the numerical column can be treated as a factor. Therefore, we can convert numeric columns to factor. To do this using dplyr package, we can u... |
Seaborn - Facet Grid | A useful approach to explore medium-dimensional data, is by drawing multiple instances of the same plot on different subsets of your dataset.
This technique is commonly called as “lattice”, or “trellis” plotting, and it is related to the idea of “small multiples”.
To use these features, your data has to be in a Pandas ... | [
{
"code": null,
"e": 2181,
"s": 2039,
"text": "A useful approach to explore medium-dimensional data, is by drawing multiple instances of the same plot on different subsets of your dataset."
},
{
"code": null,
"e": 2304,
"s": 2181,
"text": "This technique is commonly called as “la... |
Batch Script - Writing to Files | Content writing to files is also done with the help of the redirection filter >. This filter can be used to redirect any output to a file. Following is a simple example of how to create a file using the redirection command to write data to files.
@echo off
dir C:\>C:\new.txt
The above code snippet first uses the DIR co... | [
{
"code": null,
"e": 2416,
"s": 2169,
"text": "Content writing to files is also done with the help of the redirection filter >. This filter can be used to redirect any output to a file. Following is a simple example of how to create a file using the redirection command to write data to files."
},
... |
Get the list of all the public methods in Java | A list of all the public methods of a class or interface that is represented by an object are provided using the method java.lang.Class.getMethods(). The public methods include that are declared by the class or interface and also those that are inherited by the class or interface.
Also, the getMethods() method returns ... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "A list of all the public methods of a class or interface that is represented by an object are provided using the method java.lang.Class.getMethods(). The public methods include that are declared by the class or interface and also those that are inherite... |
Merge k sorted arrays in Java | We are given an ‘n’ number of arrays, let's say we take three arrays i.e. arr1[], arr2[] and arr3[] of integer type. The task is to merge all the given integer arrays in such a manner that the resultant array is sorted in the runtime only.
Input −
Int
a[]={21,22,23,24};
int b[ ] ={28,31,35}
Output −int resultant[ ]={21... | [
{
"code": null,
"e": 1302,
"s": 1062,
"text": "We are given an ‘n’ number of arrays, let's say we take three arrays i.e. arr1[], arr2[] and arr3[] of integer type. The task is to merge all the given integer arrays in such a manner that the resultant array is sorted in the runtime only."
},
{
... |
Angular 6 - Services | In this chapter, we will discuss the services in Angular 6.
We might come across a situation where we need some code to be used everywhere on the page. It can be for data connection that needs to be shared across components, etc. Services help us achieve that. With services, we can access methods and properties across ... | [
{
"code": null,
"e": 2055,
"s": 1995,
"text": "In this chapter, we will discuss the services in Angular 6."
},
{
"code": null,
"e": 2355,
"s": 2055,
"text": "We might come across a situation where we need some code to be used everywhere on the page. It can be for data connection ... |
How to read text file into a list or array with Python? | f = open('my_file.txt', 'r+')
my_file_data = f.read()
f.close()
The above code opens 'my_file.txt' in read mode then stores the data it reads from my_file.txt in my_file_data and closes the file. The read function reads the whole file at once. You can use the following to read the file line by line and store it in a li... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "f = open('my_file.txt', 'r+')\nmy_file_data = f.read()\nf.close()"
},
{
"code": null,
"e": 1386,
"s": 1126,
"text": "The above code opens 'my_file.txt' in read mode then stores the data it reads from my_file.txt in my_file_data and c... |
FileOutputStream in Java. | This writes data into a specific file or, a file descriptor (byte by byte). It is usually used to write the contents of a file with raw bytes, such as images.
To write the contents of a file using this class −
First of all, you need to instantiate this class by passing a string variable or a File object, representing t... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "This writes data into a specific file or, a file descriptor (byte by byte). It is usually used to write the contents of a file with raw bytes, such as images."
},
{
"code": null,
"e": 1272,
"s": 1221,
"text": "To write the contents o... |
How To Train Your Chatbot With Simple Transformers | by Thilina Rajapakse | Towards Data Science | Chatbots and virtual assistants, once found mostly in Sci-Fi, are becoming increasingly more common. Google Assistant’s and Siri’s of today still has a long, long way to go to reach Iron Man’s J.A.R.V.I.S. and the like, but the journey has begun. While the current crop of Conversational AI is far from perfect, they are... | [
{
"code": null,
"e": 568,
"s": 172,
"text": "Chatbots and virtual assistants, once found mostly in Sci-Fi, are becoming increasingly more common. Google Assistant’s and Siri’s of today still has a long, long way to go to reach Iron Man’s J.A.R.V.I.S. and the like, but the journey has begun. While th... |
Word Segmentation for Languages Without Spaces Between Words | by Xu LIANG | Towards Data Science | If you are working on some NLP tasks related to Chinese, Japanese and Korean, you might notice that the NLP workflow is different from the English NLP task. Because different from the English, there is no space in these languages to separate the words naturally. So word segmentation is very important for these language... | [
{
"code": null,
"e": 637,
"s": 172,
"text": "If you are working on some NLP tasks related to Chinese, Japanese and Korean, you might notice that the NLP workflow is different from the English NLP task. Because different from the English, there is no space in these languages to separate the words nat... |
Sum of list (with string types) in Python | In this tutorial, we are going to write a program that adds all numbers from the list. List may contain numbers in string or integer format. See the example.
random_list = [1, '10', 'tutorialspoint', '2020', 'tutorialspoint@2020', 2020]
4051
Follow the below steps to write the program.
Initialize the list.
3Initialize ... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "In this tutorial, we are going to write a program that adds all numbers from the list. List may contain numbers in string or integer format. See the example."
},
{
"code": null,
"e": 1299,
"s": 1220,
"text": "random_list = [1, '10', ... |
Plot in Python with Matplotlib Step by Step | by Matias Eiletz | Towards Data Science | Matplotlib is the most popular graphics library in Python. For instance if we look in StackOverflow, we can see that there are ~47k questions tagged with Matoplotlib, whereas if we look for other comparable libraries like Seaborn or Plotly, we get ~4k and ~7k respectively.
Hence if you are getting started with plotting... | [
{
"code": null,
"e": 445,
"s": 171,
"text": "Matplotlib is the most popular graphics library in Python. For instance if we look in StackOverflow, we can see that there are ~47k questions tagged with Matoplotlib, whereas if we look for other comparable libraries like Seaborn or Plotly, we get ~4k and... |
Line Chart Animation with Plotly on Jupyter | by Shinichi Okada | Towards Data Science | Table of ContentsIntroduction1. Data preparation2. All countries line chart3. Adding LOG and LINEAR buttons4. Changing hovermode5. Line chart animation6. Scatter and bar chart animationsConclusion
In this article, I will try to reproduce one of Our World in Data charts using Plotly animation on Jupyter.
ourworldindata.... | [
{
"code": null,
"e": 369,
"s": 172,
"text": "Table of ContentsIntroduction1. Data preparation2. All countries line chart3. Adding LOG and LINEAR buttons4. Changing hovermode5. Line chart animation6. Scatter and bar chart animationsConclusion"
},
{
"code": null,
"e": 477,
"s": 369,
... |
Can we override the main method in java? | Overriding is one of the mechanisms to achieve polymorphism. This is the case when we have two classes where one inherits the properties of another using the extends keyword and, these two classes have the same method including parameters and return type (say, sample()).
Since it is an inheritance. If we instantiate th... | [
{
"code": null,
"e": 1334,
"s": 1062,
"text": "Overriding is one of the mechanisms to achieve polymorphism. This is the case when we have two classes where one inherits the properties of another using the extends keyword and, these two classes have the same method including parameters and return typ... |
MoviePy – Creating Text Clip - GeeksforGeeks | 18 Aug, 2020
In this article we will see how we can create a text clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Video is formed by the frames, combination of frames creates a video each frame is an individual image. Text clip is basically a cl... | [
{
"code": null,
"e": 24057,
"s": 24029,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 24412,
"s": 24057,
"text": "In this article we will see how we can create a text clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on video... |
C# - Relational Operators | Following table shows all the relational operators supported by C#. Assume variable A holds 10 and variable B holds 20, then −
The following example demonstrates all the relational operators available in C# −
using System;
class Program {
static void Main(string[] args) {
int a = 21;
int b = 10;
... | [
{
"code": null,
"e": 2397,
"s": 2270,
"text": "Following table shows all the relational operators supported by C#. Assume variable A holds 10 and variable B holds 20, then −"
},
{
"code": null,
"e": 2479,
"s": 2397,
"text": "The following example demonstrates all the relational o... |
Ruby | Array collect() operation - GeeksforGeeks | 08 Jan, 2020
Array#collect() : collect() is an Array class method which invokes the argument block once for each element of the array. A new array is returned which has the value returned by the block.
Syntax: Array.collect()
Parameter: Arrays in which we want elements to be invoked
Return: array with all the envo... | [
{
"code": null,
"e": 23359,
"s": 23331,
"text": "\n08 Jan, 2020"
},
{
"code": null,
"e": 23548,
"s": 23359,
"text": "Array#collect() : collect() is an Array class method which invokes the argument block once for each element of the array. A new array is returned which has the val... |
Performing Null check using HANA SQL Script | You can go for using either NULLIF or COALESCE function to serve your requirement.
NULLIF (expression, expression"): This function will return the same type whatever is specified as the first expression.
Basically, NULLIF returns
The first expression if the two expressions are not equal.
The first expression if the two... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "You can go for using either NULLIF or COALESCE function to serve your requirement."
},
{
"code": null,
"e": 1266,
"s": 1145,
"text": "NULLIF (expression, expression\"): This function will return the same type whatever is specified as... |
What is Google API Vision? And how to use it | by Christophe Pere | Towards Data Science | This post finds his root in an interesting project of knowledge extraction. The first step was to extract the text of pdf documents. The company that I work for is based on the Google platform, so naturally, I would like to use the OCR of the API Vision but, can’t find an easy way to use the API to extract text. So her... | [
{
"code": null,
"e": 505,
"s": 172,
"text": "This post finds his root in an interesting project of knowledge extraction. The first step was to extract the text of pdf documents. The company that I work for is based on the Google platform, so naturally, I would like to use the OCR of the API Vision b... |
How to create a notification alert using Kotlin? | This example demonstrates how to create a notification alert using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayo... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "This example demonstrates how to create a notification alert using Kotlin."
},
{
"code": null,
"e": 1265,
"s": 1137,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to c... |
Android - Bluetooth | Among many ways, Bluetooth is a way to send or receive data between two different devices. Android platform includes support for the Bluetooth framework that allows a device to wirelessly exchange data with other Bluetooth devices.
Android provides Bluetooth API to perform these different operations.
Scan for other Blu... | [
{
"code": null,
"e": 3839,
"s": 3607,
"text": "Among many ways, Bluetooth is a way to send or receive data between two different devices. Android platform includes support for the Bluetooth framework that allows a device to wirelessly exchange data with other Bluetooth devices."
},
{
"code":... |
cleardevice() function in C - GeeksforGeeks | 23 Jan, 2018
The header file graphics.h contains cleardevice() function which clears the screen in graphics mode and sets the current position to (0,0). Clearing the screen consists of filling the screen with current background color.
Syntax :
void cleardevice();
Below is the implementation of cleardevice() in C:
// C... | [
{
"code": null,
"e": 24492,
"s": 24464,
"text": "\n23 Jan, 2018"
},
{
"code": null,
"e": 24714,
"s": 24492,
"text": "The header file graphics.h contains cleardevice() function which clears the screen in graphics mode and sets the current position to (0,0). Clearing the screen con... |
Insert current date to the database in MySQL? | To insert current date to the database, you can use NOW(). Following is the syntax −
INSERT INTO yourTableName(yourDateColumnName) VALUES(NOW());
If your column has datatype date then NOW() function inserts only current date, not time and MySQL will give a warning. To remove the warning, you can use CURDATE().
Let us f... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To insert current date to the database, you can use NOW(). Following is the syntax −"
},
{
"code": null,
"e": 1208,
"s": 1147,
"text": "INSERT INTO yourTableName(yourDateColumnName) VALUES(NOW());"
},
{
"code": null,
"e":... |
C++ Library - <limits> | It is a Numeric limits type and it provides information about the properties of arithmetic types (either integral or floating-point) in the specific platform for which the library compiles.
Following is the declaration for std::numeric_limits.
template <class T> numeric_limits;
template <class T> numeric_limits;
T − ... | [
{
"code": null,
"e": 2793,
"s": 2603,
"text": "It is a Numeric limits type and it provides information about the properties of arithmetic types (either integral or floating-point) in the specific platform for which the library compiles."
},
{
"code": null,
"e": 2847,
"s": 2793,
"... |
Find MongoDB documents that contains specific field? | To find documents that contain specific field, use $exists. Let us create a collection with documents −
> db.demo247.insertOne({"ClientDetails":[{"ClientFirstName":"Chris","ClientAge":34}]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e46b2a31627c0c63e7dba69")
}
>db.demo247.insertOne({"ClientDetails":[{"C... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "To find documents that contain specific field, use $exists. Let us create a collection with documents −"
},
{
"code": null,
"e": 1906,
"s": 1166,
"text": "> db.demo247.insertOne({\"ClientDetails\":[{\"ClientFirstName\":\"Chris\",\"Cl... |
Python 3 - Tkinter Bitmaps | This attribute to displays a bitmap. There are following type of bitmaps available −
"error"
"gray75"
"gray50"
"gray25"
"gray12"
"hourglass"
"info"
"questhead"
"question"
"warning"
# !/usr/bin/python3
from tkinter import *
import tkinter
top = Tk()
B1 = Button(top, text = "error", relief = RAISED,\ bitmap = "error")... | [
{
"code": null,
"e": 2426,
"s": 2340,
"text": "This attribute to displays a bitmap. There are following type of bitmaps available −"
},
{
"code": null,
"e": 2434,
"s": 2426,
"text": "\"error\""
},
{
"code": null,
"e": 2443,
"s": 2434,
"text": "\"gray75\""
}... |
5 smart Python NumPy functions. Elegant NumPy functions for neat... | by Baijayanta Roy | Towards Data Science | In everyday data processing for Machine Learning and Data Science projects, we encounter unique situations, those require boilerplate code to solve the problem. Over the period some of those are converted into base features provided by the core language or the package itself as per need and usage from the community. He... | [
{
"code": null,
"e": 602,
"s": 172,
"text": "In everyday data processing for Machine Learning and Data Science projects, we encounter unique situations, those require boilerplate code to solve the problem. Over the period some of those are converted into base features provided by the core language o... |
Explore and Visualize your LinkedIn Network with Python and Sentiment Analysis | by Khuyen Tran | Towards Data Science | If you are a LinkedIn user, have you ever wondered about the segments of people in your network? If you are working to expand your connections in the data science world, do most of the people in your network work in a data science-related field?
How about your messages? Are they mostly positive and about the topics tha... | [
{
"code": null,
"e": 292,
"s": 46,
"text": "If you are a LinkedIn user, have you ever wondered about the segments of people in your network? If you are working to expand your connections in the data science world, do most of the people in your network work in a data science-related field?"
},
{
... |
Jupyter Lab: Evolution of the Jupyter Notebook | by Parul Pandey | Towards Data Science | All good things (must) come to an end to make way for something better.
Data says there are more than three million Jupyter Notebooks available publicly on Github. There is roughly a similar number of private ones too. Even without this data, we are quite aware of the popularity of the notebooks in the Data Science dom... | [
{
"code": null,
"e": 244,
"s": 172,
"text": "All good things (must) come to an end to make way for something better."
},
{
"code": null,
"e": 826,
"s": 244,
"text": "Data says there are more than three million Jupyter Notebooks available publicly on Github. There is roughly a sim... |
map::empty() in C++ STL | In this article we will be discussing the working, syntax and examples of map::empty() function in C++ STL.
Maps are the associative container, which facilitates to store the elements formed by a combination of key value and mapped value in a specific order. In a map container the data is internally always sorted with ... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "In this article we will be discussing the working, syntax and examples of map::empty() function in C++ STL."
},
{
"code": null,
"e": 1480,
"s": 1170,
"text": "Maps are the associative container, which facilitates to store the element... |
Sum of the Longest Bloodline of a Tree (Sum of nodes on the longest path from root to leaf node) | Practice | GeeksforGeeks | Given a binary tree of size N. Your task is to complete the function sumOfLongRootToLeafPath(), that find the sum of all nodes on the longest path from root to leaf node.
If two or more paths compete for the longest path, then the path having maximum sum of nodes is being considered.
Example 1:
Input:
4 ... | [
{
"code": null,
"e": 523,
"s": 238,
"text": "Given a binary tree of size N. Your task is to complete the function sumOfLongRootToLeafPath(), that find the sum of all nodes on the longest path from root to leaf node.\nIf two or more paths compete for the longest path, then the path having maximum sum... |
Array setChar() method in Java - GeeksforGeeks | 30 Nov, 2018
The java.lang.reflect.Array.setChar() is an inbuilt method in Java and is used to change a specified char value to a specified index of a given object array.
Syntax:
Array.setChar(Object []array, int index, char value)
Parameter: This method takes three parameters:
array: This is an array of type Object wh... | [
{
"code": null,
"e": 23931,
"s": 23903,
"text": "\n30 Nov, 2018"
},
{
"code": null,
"e": 24089,
"s": 23931,
"text": "The java.lang.reflect.Array.setChar() is an inbuilt method in Java and is used to change a specified char value to a specified index of a given object array."
},... |
How to change background color in R using ggplot2? - GeeksforGeeks | 04 Jul, 2021
In this article, we will discuss how to change the background color of a ggplot2 plot in R Programming Language.
To do so first we will create a basic ggplot2 plot.
Step 1: Create sample data for the plot.
sample_data <- data.frame(x = 1:10, y = 1:10)
Step 2: Load the package ggplot2.
library("ggplot2")
St... | [
{
"code": null,
"e": 24877,
"s": 24849,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 24990,
"s": 24877,
"text": "In this article, we will discuss how to change the background color of a ggplot2 plot in R Programming Language."
},
{
"code": null,
"e": 25042,
"s... |
Python - globals() function - GeeksforGeeks | 18 Nov, 2020
globals() function in Python returns the dictionary of current global symbol table.
Symbol table: Symbol table is a data structure which contains all necessary information about the program. These include variable names, methods, classes, etc.Global symbol table stores all information related to the global... | [
{
"code": null,
"e": 24502,
"s": 24474,
"text": "\n18 Nov, 2020"
},
{
"code": null,
"e": 24586,
"s": 24502,
"text": "globals() function in Python returns the dictionary of current global symbol table."
},
{
"code": null,
"e": 24882,
"s": 24586,
"text": "Symbol... |
The Search for Categorical Correlation | by Shaked Zychlinski | Towards Data Science | All the code appearing in this post is available as part of the dython library on my GitHub page.For any code related questions, please open an issue on the library’s GitHub page.
Not long ago I stumbled across a data-set of mushrooms on Kaggle, where over 20 different features of edible and poisonous mushrooms were co... | [
{
"code": null,
"e": 352,
"s": 172,
"text": "All the code appearing in this post is available as part of the dython library on my GitHub page.For any code related questions, please open an issue on the library’s GitHub page."
},
{
"code": null,
"e": 762,
"s": 352,
"text": "Not lo... |
Formatting code with Prettier - GeeksforGeeks | 10 Dec, 2021
Prettier is an opinionated code formatter that will take all your code, removes the inconsistency in the codebase in styling the code, and ensures the output code should be formatted in the desired pattern by using the predefined styles in prettier. The reason for being used prettier is given below:
It hel... | [
{
"code": null,
"e": 24449,
"s": 24421,
"text": "\n10 Dec, 2021"
},
{
"code": null,
"e": 24750,
"s": 24449,
"text": "Prettier is an opinionated code formatter that will take all your code, removes the inconsistency in the codebase in styling the code, and ensures the output code ... |
How to create a contingency table with sum on the margins from an R data frame? | The sum of rows and columns on the margins in a contingency table are always useful because they are used for different type of calculations such as odds ratio, probability etc. If an R data frame has factor columns then we can create a contingency table for that data frame and it can be done by using addmargins functi... | [
{
"code": null,
"e": 1386,
"s": 1062,
"text": "The sum of rows and columns on the margins in a contingency table are always useful because they are used for different type of calculations such as odds ratio, probability etc. If an R data frame has factor columns then we can create a contingency tabl... |
Building a Web Application to Deploy Machine Learning Models | by Joseph Lee Wei En | Towards Data Science | If you’ve been learning Deep Learning for a while now, you may have built some really cool models using your Jupyter notebook doing a range of things, from image recognition to language translation. You probably want to let your friends try out your models (or maybe even set up a company from this), but sending them a ... | [
{
"code": null,
"e": 619,
"s": 172,
"text": "If you’ve been learning Deep Learning for a while now, you may have built some really cool models using your Jupyter notebook doing a range of things, from image recognition to language translation. You probably want to let your friends try out your model... |
C library function - time() | The C library function time_t time(time_t *seconds) returns the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds. If seconds is not NULL, the return value is also stored in variable seconds.
Following is the declaration for time() function.
time_t time(time_t *t)
seconds − This is the pointer t... | [
{
"code": null,
"e": 2223,
"s": 2007,
"text": "The C library function time_t time(time_t *seconds) returns the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds. If seconds is not NULL, the return value is also stored in variable seconds."
},
{
"code": null,
"e": ... |
Convert array into Zig-Zag fashion - GeeksforGeeks | 05 May, 2022
Given an array of DISTINCT elements, rearrange the elements of array in zig-zag fashion in O(n) time. The converted array should be in form a < b > c < d > e < f.
Example:
Input: arr[] = {4, 3, 7, 8, 6, 2, 1} Output: arr[] = {3, 7, 4, 8, 2, 6, 1}
Input: arr[] = {1, 4, 3, 2} Output: arr[] = {1, 4, 2, 3}
A ... | [
{
"code": null,
"e": 26755,
"s": 26727,
"text": "\n05 May, 2022"
},
{
"code": null,
"e": 26919,
"s": 26755,
"text": "Given an array of DISTINCT elements, rearrange the elements of array in zig-zag fashion in O(n) time. The converted array should be in form a < b > c < d > e < f. ... |
Prim’s (Minimum Spanning Tree) MST Algorithm | There is a connected graph G(V,E) and the weight or cost for every edge is given. Prim’s Algorithm will find the minimum spanning tree from the graph G.
It is growing tree approach. This algorithm needs a seed value to start the tree. The seed vertex is grown to form the whole tree.
The problem will be solved using two... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "There is a connected graph G(V,E) and the weight or cost for every edge is given. Prim’s Algorithm will find the minimum spanning tree from the graph G."
},
{
"code": null,
"e": 1346,
"s": 1215,
"text": "It is growing tree approach. ... |
Teaching Cars To See — Vehicle Detection Using Machine Learning And Computer Vision | by Eddie Forson | Towards Data Science | This is the final project of Term 1 of the Udacity Self-Driving Car Engineer Nanodegree. You can find all code related to this project on github. You can also read my posts on previous projects:
project 1: Detecting Lane Lines Using Computer Vision
project 2: Traffic Sign Classification Using Deep Learning
project 3: S... | [
{
"code": null,
"e": 367,
"s": 172,
"text": "This is the final project of Term 1 of the Udacity Self-Driving Car Engineer Nanodegree. You can find all code related to this project on github. You can also read my posts on previous projects:"
},
{
"code": null,
"e": 421,
"s": 367,
... |
SQL - Logical Operators | Consider the CUSTOMERS table having the following records −
SQL> SELECT * FROM CUSTOMERS;
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.... | [
{
"code": null,
"e": 2513,
"s": 2453,
"text": "Consider the CUSTOMERS table having the following records −"
},
{
"code": null,
"e": 2543,
"s": 2513,
"text": "SQL> SELECT * FROM CUSTOMERS;"
},
{
"code": null,
"e": 3086,
"s": 2543,
"text": "+----+----------+----... |
How to get the width and height of an android.widget.ImageView in Kotlin? | This example demonstrates how to get the width and height of an android.widget.ImageView in Kotlin.
Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encodi... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "This example demonstrates how to get the width and height of an android.widget.ImageView in Kotlin."
},
{
"code": null,
"e": 1291,
"s": 1162,
"text": "Step 1 − Create a new project in Android Studio, go to File ? New Project and fill... |
Draw Graph Grid Using Turtle in Python - GeeksforGeeks | 29 Aug, 2021
Prerequisite: Turtle Programming Basics
Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move turtle, there are some functions i.e forward(), backward(), etc.
Approach:
Following ste... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n29 Aug, 2021"
},
{
"code": null,
"e": 23941,
"s": 23901,
"text": "Prerequisite: Turtle Programming Basics"
},
{
"code": null,
"e": 24185,
"s": 23941,
"text": "Turtle is an inbuilt module in Python. It provides... |
Design and Analysis Radix Sort | Radix sort is a small method that many people intuitively use when alphabetizing a large list of names. Specifically, the list of names is first sorted according to the first letter of each name, that is, the names are arranged in 26 classes.
Intuitively, one might want to sort numbers on their most significant digit. ... | [
{
"code": null,
"e": 2842,
"s": 2599,
"text": "Radix sort is a small method that many people intuitively use when alphabetizing a large list of names. Specifically, the list of names is first sorted according to the first letter of each name, that is, the names are arranged in 26 classes."
},
{
... |
How to pass parameters to a method in C#? | To pass parameters to a method in C#, let us see how to pass parameters by value. In this mechanism, when a method is called, a new storage location is created for each value parameter.
The values of the actual parameters are copied into them. Hence, the changes made to the parameter inside the method have no effect on... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "To pass parameters to a method in C#, let us see how to pass parameters by value. In this mechanism, when a method is called, a new storage location is created for each value parameter."
},
{
"code": null,
"e": 1397,
"s": 1248,
"text... |
Plot parallel coordinates in Matplotlib | To plot parallel coordinates, we can take the following Steps −
Load dataset iris using Seaborn (Need internet).
Load dataset iris using Seaborn (Need internet).
Pass the loaded data into the parallel_coordinates() method, which will help in parallel plotting.
Pass the loaded data into the parallel_coordinates() method... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "To plot parallel coordinates, we can take the following Steps −"
},
{
"code": null,
"e": 1175,
"s": 1126,
"text": "Load dataset iris using Seaborn (Need internet)."
},
{
"code": null,
"e": 1224,
"s": 1175,
"text":... |
How to get the Tkinter Label text? | Tkinter Labels are used to create and display text or images on the window. It has several components and functions that can be used to customize the label information such as fontfamily, padding, width, height, etc. In order to get the Label text on the window, we can write the value for the text that has to be displa... | [
{
"code": null,
"e": 1401,
"s": 1062,
"text": "Tkinter Labels are used to create and display text or images on the window. It has several components and functions that can be used to customize the label information such as fontfamily, padding, width, height, etc. In order to get the Label text on th... |
Find the minimum and maximum values that can be calculated by summing exactly four of the five integers in JavaScript | Given an array of five positive integers, we are required to find the minimum and maximum values that can be calculated by summing exactly four of the five integers.
Then print the respective minimum and maximum values as a single line of two spaceseparated long integers.
The array is not sorted all the times.
For exam... | [
{
"code": null,
"e": 1228,
"s": 1062,
"text": "Given an array of five positive integers, we are required to find the minimum and maximum values that can be calculated by summing exactly four of the five integers."
},
{
"code": null,
"e": 1335,
"s": 1228,
"text": "Then print the r... |
Program to convert Byte array to IP Address | 24 Apr, 2018
Given a Byte Array, convert it to the format of IP Address.
Examples:
Input : {16, 16, 16, 16}
Output : 16.16.16.16
Input : {172, 31, 102, 14}
Output : 172.31.102.14
Byte arrays:A byte is collection of bits (8). Byte arrays are arrays of contiguous bytes and can be used to store binary information. With ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Apr, 2018"
},
{
"code": null,
"e": 88,
"s": 28,
"text": "Given a Byte Array, convert it to the format of IP Address."
},
{
"code": null,
"e": 98,
"s": 88,
"text": "Examples:"
},
{
"code": null,
"e": 19... |
Flatten a Matrix in Python using NumPy | 29 Aug, 2020
Let’s discuss how to flatten a Matrix using NumPy in Python. By using ndarray.flatten() function we can flatten a matrix to one dimension in python.
Syntax:numpy_array.flatten(order=’C’)
order:‘C’ means to flatten in row-major.’F’ means to flatten in column-major.’A’ means to flatten in column-major order ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "Let’s discuss how to flatten a Matrix using NumPy in Python. By using ndarray.flatten() function we can flatten a matrix to one dimension in python."
},
{
"code": null... |
Python Program to Get total Business days between two dates | 18 Jul, 2021
Given two dates, our task is to write a Python program to get total business days, i.e weekdays between the two dates.
Example:
Input : test_date1, test_date2 = datetime(2015, 6, 3), datetime(2015, 7, 1)
Output : 20
Explanation : Total weekdays, i.e business days are 20 in span.
Input : test_date1, test_da... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 147,
"s": 28,
"text": "Given two dates, our task is to write a Python program to get total business days, i.e weekdays between the two dates."
},
{
"code": null,
"e": 156,
"s": 147,
... |
Joining NumPy Array | 01 Oct, 2020
NumPy provides various functions to combine arrays. In this article, we will discuss some of the major ones.
numpy.concatenate
numpy.stack
numpy.block
Method 1: Using numpy.concatenate()
The concatenate function in NumPy joins two or more arrays along a specified axis.
Syntax:
numpy.concatenate((array1, a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 161,
"s": 52,
"text": "NumPy provides various functions to combine arrays. In this article, we will discuss some of the major ones."
},
{
"code": null,
"e": 179,
"s": 161,
"text... |
Python | Filter even values from a list | 14 Feb, 2019
Given a list of numbers, the task is to make a new list containing only even values.
Examples:
Input: list = [1, 2, 3, 4, 5]
Output: [2, 4]
Input: list = [12, 14, 95, 3]
Output: [12, 14]
Method #1 : Using For loopIterate each element in the list using for loop and check if num % 2 == 0. If the condition... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Feb, 2019"
},
{
"code": null,
"e": 113,
"s": 28,
"text": "Given a list of numbers, the task is to make a new list containing only even values."
},
{
"code": null,
"e": 123,
"s": 113,
"text": "Examples:"
},
{
... |
Longest Subarray of non-negative Integers | 22 Jun, 2022
Given an array, return the length of the longest subarray of non-negative integersExamples :
Input : {2, 3, 4, -1, -2, 1, 5, 6, 3}
Output : 4
The subarray [ 1, 5, 6, 3] has length 4 and
contains no negative integers
Input : {1, 0, 0, 1, -1, -1, 0, 0, 1, 0}
Output : 4
Subarrays [1, 0, 0, 1] and [0, 0, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 146,
"s": 52,
"text": "Given an array, return the length of the longest subarray of non-negative integersExamples : "
},
{
"code": null,
"e": 445,
"s": 146,
"text": "Input : {2,... |
Getting started with OpenGL | 29 Jun, 2022
Open Graphics Library (OpenGL) is a cross-language (language independent), cross-platform (platform-independent) API for rendering 2D and 3D Vector Graphics(use of polygons to represent image). OpenGL API is designed mostly in hardware.
Design : This API is defined as a set of functions which may be calle... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 290,
"s": 52,
"text": "Open Graphics Library (OpenGL) is a cross-language (language independent), cross-platform (platform-independent) API for rendering 2D and 3D Vector Graphics(use of polygons t... |
Minimum distance to travel to cover all intervals | 22 Jun, 2022
Given many intervals as ranges and our position. We need to find minimum distance to travel to reach such a point which covers all the intervals at once.
Examples:
Input : Intervals = [(0, 7), (2, 14), (4, 6)]
Position = 3
Output : 1
We can reach position 4 by traveling
distance 1, at which all ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 207,
"s": 52,
"text": "Given many intervals as ranges and our position. We need to find minimum distance to travel to reach such a point which covers all the intervals at once. "
},
{
"code... |
Join statement in JCL | 25 Jun, 2020
Prerequisite – Job Control Language (JCL)In RDBMS, SQL JOIN clause is used to join tables and perform multiple operations on it. To perform operations on records in different flat files, JOINKEYS are used. With the help of JOINKEYS in SORT JCL, various join operation on matched and non-matched records can ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Jun, 2020"
},
{
"code": null,
"e": 545,
"s": 54,
"text": "Prerequisite – Job Control Language (JCL)In RDBMS, SQL JOIN clause is used to join tables and perform multiple operations on it. To perform operations on records in different... |
Python | Count overlapping substring in a given string | 20 Apr, 2020
Given a string and a sub-string, the task is to get the count of overlapping substring from the given string.
Note that in Python, the count() function returns the number of substrings in a given string, but it does not give correct results when two occurrences of the substring overlap. Consider this examp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Apr, 2020"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "Given a string and a sub-string, the task is to get the count of overlapping substring from the given string."
},
{
"code": null,
"e": 340,
"s": 138,
"text... |
How to create a div that contains multiple fixed-size images ? | 14 Jan, 2021
What is a <div> tag ?
A <div> tag can be defined as a divider of two blocks of HTML code. It is used as a container for HTML elements which can then be styled with CSS or Javascript. Class or id attribute can be used to easily style the element in the <div> tag.
Please read more about <div> tag from this a... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jan, 2021"
},
{
"code": null,
"e": 76,
"s": 54,
"text": "What is a <div> tag ?"
},
{
"code": null,
"e": 317,
"s": 76,
"text": "A <div> tag can be defined as a divider of two blocks of HTML code. It is used as a c... |
FCFS Disk Scheduling Algorithms | 28 May, 2021
Prerequisite: Disk scheduling algorithms.Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations done to access all the requested tracks if First Come First Serve (FCFS) disk scheduling algorithm is used.
First Come First Serve (FCFS) FCFS is ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 323,
"s": 54,
"text": "Prerequisite: Disk scheduling algorithms.Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations done to acces... |
What is the difference between getter and setter in JavaScript? | When a property is accessed, the value gets through calling a function implicitly. The get keyword is used in JavaScript. An identifier, either a number or a string is allowed for set.
When a property is set, it implicitly calls a function and the value is passed as an argument. With that, the return value is set to th... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "When a property is accessed, the value gets through calling a function implicitly. The get keyword is used in JavaScript. An identifier, either a number or a string is allowed for set."
},
{
"code": null,
"e": 1503,
"s": 1247,
"text"... |
Python - end parameter in print() | The print() function in python always creates a newline. But there is also a parameter for this function which can put other characters instead of new line at the end. In this article we will explore various options for this parameter.
In the below example we see various ways we can assign values to the end parameter a... | [
{
"code": null,
"e": 1298,
"s": 1062,
"text": "The print() function in python always creates a newline. But there is also a parameter for this function which can put other characters instead of new line at the end. In this article we will explore various options for this parameter."
},
{
"co... |
Haskell - Basic Data Models | Haskell is a purely functional programing language, hence it is much more interactive and intelligent than other programming languages. In this chapter, we will learn about basic data models of Haskell which are actually predefined or somehow intelligently decoded into the computer memory.
Throughout this tutorial, we ... | [
{
"code": null,
"e": 2206,
"s": 1915,
"text": "Haskell is a purely functional programing language, hence it is much more interactive and intelligent than other programming languages. In this chapter, we will learn about basic data models of Haskell which are actually predefined or somehow intelligen... |
Simple Guide to Data Cleaning with Python | by June Tao Ching | Towards Data Science | Data cleaning is the most crucial step in any project, if we do not take care of it properly, it might lead us to a completely different conclusion. Often than not, we might spend half of the time cleaning our data in most projects.
In this article, I am going to share some Python functions that can help us in data cle... | [
{
"code": null,
"e": 405,
"s": 172,
"text": "Data cleaning is the most crucial step in any project, if we do not take care of it properly, it might lead us to a completely different conclusion. Often than not, we might spend half of the time cleaning our data in most projects."
},
{
"code": ... |
Bayesian Decision Theory. Oh! What are we if not patterns? | by Shivam Chaudhary | Towards Data Science | Oh! What are we if not patterns?
It’s amazing how we perform so many sophisticated tasks easily and yet yearn to teach machines how to do them. Telling the difference between apples and oranges is quite trivial for us but to teach this to someone who only understands ‘0’ and ‘1’ is troublesome. Now what would seem an s... | [
{
"code": null,
"e": 205,
"s": 172,
"text": "Oh! What are we if not patterns?"
},
{
"code": null,
"e": 637,
"s": 205,
"text": "It’s amazing how we perform so many sophisticated tasks easily and yet yearn to teach machines how to do them. Telling the difference between apples and ... |
Output of Java program | Set 12(Exception Handling) | 06 Feb, 2019
Prerequisites : Exception handling , control flow in try-catch-finally1) What is the output of the following program?
public class Test{ public static void main(String[] args) { try { System.out.printf("1"); int sum = 9 / 0; System.out.printf("2"); ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Feb, 2019"
},
{
"code": null,
"e": 170,
"s": 52,
"text": "Prerequisites : Exception handling , control flow in try-catch-finally1) What is the output of the following program?"
},
{
"code": "public class Test{ public stat... |
Scraping Covid-19 statistics using BeautifulSoup | 29 Dec, 2020
Coronavirus, one of the biggest pandemic has brought all the world to Danger. Along with this, it is one of the trending News, everyone has this day. In this article, we will be scraping data and printing Covid-19 statistics in human-readable form. The data will be scraped from this websitePrerequisites:
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 359,
"s": 52,
"text": "Coronavirus, one of the biggest pandemic has brought all the world to Danger. Along with this, it is one of the trending News, everyone has this day. In this article, we will... |
How to Fix “class, interface, or enum expected” Error in Java with Examples? | 28 Jan, 2021
In Java, the class interface or enum expected error is a compile-time error. There can be one of the following reasons we get “class, interface, or enum expected” error in Java:
Case 1: Extra curly Bracket
Java
class Hello { public static void main(String[] args) { System.out.println("Hello... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2021"
},
{
"code": null,
"e": 207,
"s": 28,
"text": "In Java, the class interface or enum expected error is a compile-time error. There can be one of the following reasons we get “class, interface, or enum expected” error in Jav... |
How to set Cookie in ReactJS ? | 16 Dec, 2020
Cookies are an important part of an application because cookies are used to set value in a key-value form which can be set in browser storage and used further for identifying the current user. The following example shows how to set the cookie in the ReactJS application, here we have taken the username as k... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n16 Dec, 2020"
},
{
"code": null,
"e": 407,
"s": 53,
"text": "Cookies are an important part of an application because cookies are used to set value in a key-value form which can be set in browser storage and used further for identifying... |
How to Create a Spring Boot Project? | 22 Dec, 2021
Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days because of its rapid production-ready environment which enables the developers to directly focus on the logic instead of struggling with the configuration and setup. Sp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 502,
"s": 28,
"text": "Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days because of its rapid production-read... |
Perl | my keyword | 07 May, 2019
my keyword in Perl declares the listed variable to be local to the enclosing block in which it is defined. The purpose of my is to define static scoping. This can be used to use the same variable name multiple times but with different values. Note: To specify more than one variable under my keyword, parent... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 May, 2019"
},
{
"code": null,
"e": 351,
"s": 28,
"text": "my keyword in Perl declares the listed variable to be local to the enclosing block in which it is defined. The purpose of my is to define static scoping. This can be used to u... |
Python Program to check date in date range | 06 Jun, 2021
Given a date list and date range, the task is to write a Python program to check whether any date exists in the list in a given range.
Example:
Input : test_list = [datetime(2019, 12, 30), datetime(2018, 4, 4), datetime(2016, 12, 21), datetime(2021, 2, 2), datetime(2020, 2, 3), datetime(2017, 1, 1)], date_... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 163,
"s": 28,
"text": "Given a date list and date range, the task is to write a Python program to check whether any date exists in the list in a given range."
},
{
"code": null,
"e": 172... |
How to reverse the order of a dataframe in R? | 23 Dec, 2021
Order reversal of the dataframe involves swapping of the rows or columns in such a way, that the elements are accessed from backward. In this article, we will discuss various ways of reversing the order of a dataframe both column and row-wise.
Method 1: Using the rev method
The rev() method in R is used to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "Order reversal of the dataframe involves swapping of the rows or columns in such a way, that the elements are accessed from backward. In this article, we will discuss various ... |
Servers, streams and sockets in Node | 30 Apr, 2019
Node.js is a javascript framework for writing Server-side applications.A Node.js server provides the mechanisms for connecting to a service and sending/receiving data. It achieves this through TCP or UDP connections. Developers can hence create their own server and test their app deployment.NodeJS comes wi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 806,
"s": 52,
"text": "Node.js is a javascript framework for writing Server-side applications.A Node.js server provides the mechanisms for connecting to a service and sending/receiving data. It ach... |
How to refresh a file in Node.js ? | 13 Feb, 2020
Node.js has seen an important growth in past years and is still increasing its value in many organizations and business models. Companies like Walmart or PayPal have already started to adopt it.NPM, the package manager of Node.js has been already installed when you install Node.js and is ready to run on yo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 583,
"s": 54,
"text": "Node.js has seen an important growth in past years and is still increasing its value in many organizations and business models. Companies like Walmart or PayPal have already ... |
Data cleaning in Python: examples from cleaning Airbnb data | Towards Data Science | Airbnb fascinates me. I previously worked for a year and a half at an Airbnb property management company, as head of the team responsible for pricing, revenue and analysis. One thing I find particularly interesting is how to figure out what price to charge for a listing on the site. Although ‘it’s a two bedroom in Manc... | [
{
"code": null,
"e": 611,
"s": 172,
"text": "Airbnb fascinates me. I previously worked for a year and a half at an Airbnb property management company, as head of the team responsible for pricing, revenue and analysis. One thing I find particularly interesting is how to figure out what price to charg... |
Explain array of pointers in C programming language | Pointer is a variable that stores the address of another variable.
Pointer saves the memory space.
Execution time of pointer is faster because of direct access to memory location.
With the help of pointers, the memory is accessed efficiently, i.e., memory is allocated and deallocated dynamically.
Pointers are used with... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "Pointer is a variable that stores the address of another variable."
},
{
"code": null,
"e": 1161,
"s": 1129,
"text": "Pointer saves the memory space."
},
{
"code": null,
"e": 1242,
"s": 1161,
"text": "Execution ti... |
Tryit Editor v3.7 | Tryit: A list with ABC | [] |
How to replace a character in a MySQL table? | To replace only a single character, use REPLACE() in MySQL. Let us first create a table −
mysql> create table DemoTable
-> (
-> Name varchar(20)
-> );
Query OK, 0 rows affected (0.69 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('John Smitk');
Query OK, 1 row ... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To replace only a single character, use REPLACE() in MySQL. Let us first create a table −"
},
{
"code": null,
"e": 1259,
"s": 1152,
"text": "mysql> create table DemoTable\n -> (\n -> Name varchar(20)\n -> );\nQuery OK, 0 rows a... |
How to make flexbox children 100% height of their parent using CSS? - GeeksforGeeks | 30 Jul, 2021
CSS Flexbox is an awesome tool to create website layouts. Making a flex-box child 100% height of their parent can be done in two ways. It is little tricky because, certainly it will display an error. For example, the child may flow out of the parent boundary or it may not get upto 100% height that you will... | [
{
"code": null,
"e": 24889,
"s": 24861,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 25298,
"s": 24889,
"text": "CSS Flexbox is an awesome tool to create website layouts. Making a flex-box child 100% height of their parent can be done in two ways. It is little tricky because,... |
Lodash _.flatMap() Method - GeeksforGeeks | 10 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc.The _.flatMap() method creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.
Syntax:
... | [
{
"code": null,
"e": 37045,
"s": 37017,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 37344,
"s": 37045,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc.The _.flatMap... |
Python | Ways to check string contain all same characters | 29 Jun, 2019
Given a list of strings, write a Python program to check whether each string has all the characters same or not. Given below are a few methods to check the same.
Method #1: Using Naive Method [Inefficient]
# Python code to demonstrate # to check whether string contains# all characters same or not # Initia... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2019"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "Given a list of strings, write a Python program to check whether each string has all the characters same or not. Given below are a few methods to check the same."
},
{
... |
How to return multiple values from a function in C or C++? | 15 Jun, 2022
New programmers are usually in the search of ways to return multiple values from a function. Unfortunately, C and C++ do not allow this directly. But fortunately, with a little bit of clever programming, we can easily achieve this. Below are the methods to return multiple values from a function in C:
By us... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 354,
"s": 52,
"text": "New programmers are usually in the search of ways to return multiple values from a function. Unfortunately, C and C++ do not allow this directly. But fortunately, with a litt... |
What is Data Science? | 04 Feb, 2022
Data Science is an interdisciplinary field that focuses on extracting knowledge from data sets which are typically huge in amount. The field encompasses analysis, preparing data for analysis, and presenting findings to inform high-level decisions in an organization. As such, it incorporates skills from com... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 448,
"s": 53,
"text": "Data Science is an interdisciplinary field that focuses on extracting knowledge from data sets which are typically huge in amount. The field encompasses analysis, preparing d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.