title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to merge multiple files into a new file using Python? | To merge multiple files in a new file, you can simply read files and write them to a new file using loops.
filenames = ['file1.txt', 'file2.txt', 'file3.txt']
with open('output_file', 'w') as outfile:
for fname in filenames:
with open(fname) as infile:
outfile.write(infile.read())
If you have ve... | [
{
"code": null,
"e": 1294,
"s": 1187,
"text": "To merge multiple files in a new file, you can simply read files and write them to a new file using loops."
},
{
"code": null,
"e": 1493,
"s": 1294,
"text": "filenames = ['file1.txt', 'file2.txt', 'file3.txt']\nwith open('output_file... |
How to Customize Option Menu of Toolbar in Android? | 14 Feb, 2021
In this article, we will see how to add icons and change background color in the options menu of the toolbar. Option menu is a collection of menu items of an activity. Android Option Menus are the primary menus of the activity. They can be used for settings, search, delete items, etc. We will first create ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Feb, 2021"
},
{
"code": null,
"e": 539,
"s": 28,
"text": "In this article, we will see how to add icons and change background color in the options menu of the toolbar. Option menu is a collection of menu items of an activity. Android... |
Hoare’s vs Lomuto partition scheme in QuickSort | 09 Jun, 2022
We have discussed the implementation of QuickSort using Lomuto partition scheme. Lomuto’s partition scheme is easy to implement as compared to Hoare scheme. This has inferior performance to Hoare’s QuickSort.
Lomuto’s Partition Scheme:
This algorithm works by assuming the pivot element as the last element.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 263,
"s": 54,
"text": "We have discussed the implementation of QuickSort using Lomuto partition scheme. Lomuto’s partition scheme is easy to implement as compared to Hoare scheme. This has inferior... |
ES6 - Syntax | Syntax defines the set of rules for writing programs. Every language specification defines its own syntax.
A JavaScript program can be composed of −
Variables − Represents a named memory block that can store values for the program.
Variables − Represents a named memory block that can store values for the program.
Liter... | [
{
"code": null,
"e": 2384,
"s": 2277,
"text": "Syntax defines the set of rules for writing programs. Every language specification defines its own syntax."
},
{
"code": null,
"e": 2426,
"s": 2384,
"text": "A JavaScript program can be composed of −"
},
{
"code": null,
"... |
Data Analysis & Visualization in Finance — Technical Analysis of Stocks using Python | by Pratik Nabriya | Towards Data Science | With an increase in the penetration of analytics into numerous facets of our lives, finance is definitely one of the earliest to catch onto this trend. In this article, I have attempted to showcase how data analytics and visualization techniques can be incorporated in the world of finance.
For this analysis, I have use... | [
{
"code": null,
"e": 463,
"s": 172,
"text": "With an increase in the penetration of analytics into numerous facets of our lives, finance is definitely one of the earliest to catch onto this trend. In this article, I have attempted to showcase how data analytics and visualization techniques can be in... |
LinkedList AddAfter method in C# | Set a LinkedList.
int [] num = {1, 2, 3, 4, 5};
LinkedList<int> list = new LinkedList<int>(num);
Now add a node at the end using AddLast() method.
var newNode = list.AddLast(20);
To add a node after the above added node, use the AddAfter() method.
list.AddAfter(newNode, 30);
Live Demo
using System;
using System.Collec... | [
{
"code": null,
"e": 1080,
"s": 1062,
"text": "Set a LinkedList."
},
{
"code": null,
"e": 1159,
"s": 1080,
"text": "int [] num = {1, 2, 3, 4, 5};\nLinkedList<int> list = new LinkedList<int>(num);"
},
{
"code": null,
"e": 1209,
"s": 1159,
"text": "Now add a nod... |
Java - toRadians() Method | The method converts the argument value to radians.
double toRadians(double d)
Here is the detail of parameters −
d − A double data type.
d − A double data type.
This method returns a double value.
public class Test {
public static void main(String args[]) {
double x = 45.0;
double y = 30.0;
Sys... | [
{
"code": null,
"e": 2428,
"s": 2377,
"text": "The method converts the argument value to radians."
},
{
"code": null,
"e": 2456,
"s": 2428,
"text": "double toRadians(double d)\n"
},
{
"code": null,
"e": 2491,
"s": 2456,
"text": "Here is the detail of parameter... |
Simple Dashboards Just with Jupyter | by Michael Keith | Towards Data Science | There is such a thing as the right tool for the job. When you or your organization have access to expensive visualization software, such as Tableau, Power BI, or Domo, every problem looks like a nail and your program is the hammer. If you are a data analyst for such an organization, you will inevitably spend countless ... | [
{
"code": null,
"e": 1190,
"s": 172,
"text": "There is such a thing as the right tool for the job. When you or your organization have access to expensive visualization software, such as Tableau, Power BI, or Domo, every problem looks like a nail and your program is the hammer. If you are a data anal... |
Hadoop - HDFS Operations | Initially you have to format the configured HDFS file system, open namenode (HDFS server), and execute the following command.
$ hadoop namenode -format
After formatting the HDFS, start the distributed file system. The following command will start the namenode as well as the data nodes as cluster.
$ start-dfs.sh
Aft... | [
{
"code": null,
"e": 1977,
"s": 1851,
"text": "Initially you have to format the configured HDFS file system, open namenode (HDFS server), and execute the following command."
},
{
"code": null,
"e": 2005,
"s": 1977,
"text": "$ hadoop namenode -format \n"
},
{
"code": null,... |
\mathscr - Tex Command | \mathscr - Used to turn on script typestyle for uppercase letters. If lowercase script letters are not available, then they are typeset in a roman typestyle.
{ \mathscr #1 }
\mathscr command is used to turn on script typestyle for uppercase letters. If lowercase script letters are not available, then they are typeset i... | [
{
"code": null,
"e": 8144,
"s": 7986,
"text": "\\mathscr - Used to turn on script typestyle for uppercase letters. If lowercase script letters are not available, then they are typeset in a roman typestyle."
},
{
"code": null,
"e": 8160,
"s": 8144,
"text": "{ \\mathscr #1 }"
},
... |
C++ Program to Generate Randomized Sequence of Given Range of Numbers | At first let us discuss about the rand() function. rand() function is a predefined method of C++. It is declared in <stdlib.h> header file. rand() is used to generate random number within a range. Here min_n is the minimum range of the random numbers and max_n is the maximum range of the numbers. So rand() will return ... | [
{
"code": null,
"e": 1601,
"s": 1062,
"text": "At first let us discuss about the rand() function. rand() function is a predefined method of C++. It is declared in <stdlib.h> header file. rand() is used to generate random number within a range. Here min_n is the minimum range of the random numbers an... |
Part II: All you need to know about Regular Expressions | by Ria Kulshrestha | Towards Data Science | Assuming you know what Regular Expressions are (in case you don’t, check out Part1 of this tutorial for a quick overview) we’ll now learn how to use them in Python. :)
The ‘re’ module provides an interface to the regular expression engine, and allows us to compile REs into objects and then perform matches with them.
We... | [
{
"code": null,
"e": 339,
"s": 171,
"text": "Assuming you know what Regular Expressions are (in case you don’t, check out Part1 of this tutorial for a quick overview) we’ll now learn how to use them in Python. :)"
},
{
"code": null,
"e": 489,
"s": 339,
"text": "The ‘re’ module pr... |
How to fade in and fade out background with bootstrap text carousel ? - GeeksforGeeks | 12 May, 2021
In this article, we will show you how to fade in and fade out the background with a bootstrap text carousel. Carousel is a slideshow, and it is used for cycling components like images or text.
Approach: To create a fade-in and fade-out background with a bootstrap text carousel we have followed some basic ... | [
{
"code": null,
"e": 25694,
"s": 25663,
"text": " \n12 May, 2021\n"
},
{
"code": null,
"e": 25887,
"s": 25694,
"text": "In this article, we will show you how to fade in and fade out the background with a bootstrap text carousel. Carousel is a slideshow, and it is used for cycling... |
ACPI command in Linux with examples - GeeksforGeeks | 04 Apr, 2019
acpi command is used to display the battery status and other ACPI information. It displays the information from the /proc or the /sys filesystem, such as battery status or thermal information.
Syntax:
acpi [options]
-b | –battery : It displays the battery information.
Example:
-a | –ac-adapter : It displ... | [
{
"code": null,
"e": 24188,
"s": 24160,
"text": "\n04 Apr, 2019"
},
{
"code": null,
"e": 24381,
"s": 24188,
"text": "acpi command is used to display the battery status and other ACPI information. It displays the information from the /proc or the /sys filesystem, such as battery s... |
Find N Geometric Means between A and B - GeeksforGeeks | 07 Apr, 2021
Given three integers A, B and N the task is to find N Geometric means between A and B. WE basically need to insert N terms in a Geometric progression. where A and B are first and last terms. Examples:
Input : A = 2 B = 32 N = 3
Output : 4 8 16
the geometric progression series as 2,
4, 8, 16 , 32
... | [
{
"code": null,
"e": 25092,
"s": 25064,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 25295,
"s": 25092,
"text": "Given three integers A, B and N the task is to find N Geometric means between A and B. WE basically need to insert N terms in a Geometric progression. where A and ... |
Python program to Find the size of a Tuple | When it is required to find the size of a tuple, the ‘sizeof’ method can be used.
Below is the demonstration of the same −
Live Demo
import sys
tuple_1 = ("A", 1, "B", 2, "C", 3)
tuple_2 = ("Java", "Lee", "Code", "Mark", "John")
tuple_3 = ((1, "Bill"), ( 2, "Ant"), (3, "Fox"), (4, "Cheetah"))
print("The first tuple i... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "When it is required to find the size of a tuple, the ‘sizeof’ method can be used."
},
{
"code": null,
"e": 1185,
"s": 1144,
"text": "Below is the demonstration of the same −"
},
{
"code": null,
"e": 1196,
"s": 1185,
... |
Is assignment operator inherited? - GeeksforGeeks | 29 Mar, 2022
In C++, like other functions, assignment operator function is inherited in derived class.
For example, in the following program, base class assignment operator function can be accessed using the derived class object.
#include<iostream> using namespace std; class A { public: A & operator= (A &a) { c... | [
{
"code": null,
"e": 25166,
"s": 25138,
"text": "\n29 Mar, 2022"
},
{
"code": null,
"e": 25256,
"s": 25166,
"text": "In C++, like other functions, assignment operator function is inherited in derived class."
},
{
"code": null,
"e": 25383,
"s": 25256,
"text": "... |
Python - Processing CSV Data | Reading data from CSV(comma separated values) is a fundamental necessity in Data Science. Often, we get data from various sources which can get exported to CSV format so that they can be used by other systems. The Panadas library provides features using which we can read the CSV file in full as well as in parts for onl... | [
{
"code": null,
"e": 2890,
"s": 2529,
"text": "Reading data from CSV(comma separated values) is a fundamental necessity in Data Science. Often, we get data from various sources which can get exported to CSV format so that they can be used by other systems. The Panadas library provides features using... |
C++ Matrix Rotation by 180 degree | Practice | GeeksforGeeks | Given a square matrix of size N X N, turn it by 180 degrees in anticlockwise direction without using extra memory.
Example 1:
Input: N = 4,
matrix = {{1, 2, 3, 4},
{5, 6, 7 ,8},
{9, 10, 11, 12},
{13, 14, 15, 16}}
Output: {{16, 15, 14, 13},
{12, 11, 10, 9},
{8, 7, 6... | [
{
"code": null,
"e": 343,
"s": 226,
"text": "Given a square matrix of size N X N, turn it by 180 degrees in anticlockwise direction without using extra memory.\n "
},
{
"code": null,
"e": 354,
"s": 343,
"text": "Example 1:"
},
{
"code": null,
"e": 577,
"s": 354,
... |
How to Create Wave Loader using CSS? - GeeksforGeeks | 17 Jul, 2020
A Wave Loader can be used in websites when something is loading it will provide better user experience, The wave loader can be easily created using HTML and CSS.
HTML Code: In this section, we will create a basic div tag which consists of various span tags inside of it.
<!DOCTYPE html><html lang="en"><head... | [
{
"code": null,
"e": 24876,
"s": 24848,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 25038,
"s": 24876,
"text": "A Wave Loader can be used in websites when something is loading it will provide better user experience, The wave loader can be easily created using HTML and CSS."
... |
How to delete rows of an R data frame based on string match? | Often, we need to subset our data frame and sometimes this subsetting is based on strings. If we have a character column or a factor column then we might be having its values as a string and we can subset the whole data frame by deleting rows that contain a value or part of a value, for example, we can get rid of all r... | [
{
"code": null,
"e": 1437,
"s": 1062,
"text": "Often, we need to subset our data frame and sometimes this subsetting is based on strings. If we have a character column or a factor column then we might be having its values as a string and we can subset the whole data frame by deleting rows that conta... |
Check if any permutation of a large number is divisible by 8 in Python | Suppose, we are provided with a huge number and we have to find out whether any permutation of the digits of the number is divisible by 8. The number is provided to us in string format.
So, if the input is like: input_num = 4696984, then the output will be “Divisible by eight”.
To solve this problem, we will check all ... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "Suppose, we are provided with a huge number and we have to find out whether any permutation of the digits of the number is divisible by 8. The number is provided to us in string format."
},
{
"code": null,
"e": 1341,
"s": 1248,
"text... |
Creating a Telegram Chatbot Quiz with Python | by Beppe Catanese | Towards Data Science | One of the features that make Telegram a great Chatbot platform is the ability to create Polls. This was introduced in 2019, later improved by adding the Quiz mode and, most importantly, by making it available to the Telegram Chatbot API.
It is possible to create a Poll directly in the Telegram application (without cod... | [
{
"code": null,
"e": 411,
"s": 172,
"text": "One of the features that make Telegram a great Chatbot platform is the ability to create Polls. This was introduced in 2019, later improved by adding the Quiz mode and, most importantly, by making it available to the Telegram Chatbot API."
},
{
"c... |
What are unchecked exceptions in Java? | An unchecked exception is the one which occurs at the time of execution. These are also called as Runtime Exceptions. These include programming bugs, such as logic errors or improper use of an API. Runtime exceptions are ignored at the time of compilation.
If you have declared an array of size 5 in your program, and t... | [
{
"code": null,
"e": 1320,
"s": 1062,
"text": "An unchecked exception is the one which occurs at the time of execution. These are also called as Runtime Exceptions. These include programming bugs, such as logic errors or improper use of an API. Runtime exceptions are ignored at the time of compilati... |
How to read data from JSON array using JavaScript? | Following is the code to read data from JSON array using JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, san... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "Following is the code to read data from JSON array using JavaScript −"
},
{
"code": null,
"e": 1143,
"s": 1132,
"text": " Live Demo"
},
{
"code": null,
"e": 2270,
"s": 1143,
"text": "<!DOCTYPE html>\n<html lang=\"... |
Retrieving And Updating Data Contained in Shelve in Python - GeeksforGeeks | 06 Jan, 2019
In Python shelve you access the keys randomly. In order to access the keys randomly in python shelve we use open() function. This function works a lot like the file open() function in File handling. Syntax for open the file using Python shelve
shelve.open(filename, flag='c' , writeback=True)
In Order to a... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 24145,
"s": 23901,
"text": "In Python shelve you access the keys randomly. In order to access the keys randomly in python shelve we use open() function. This function works a lot like the fil... |
Java program to find a cube of a given number | Cube of a value is simply three times multiplication of the value with self.
For example, cube of 2 is (2*2*2) = 8.
Take integer variable A.
Multiply A three times.
Display result as Cube.
import java.util.Scanner;
public class FindingCube {
public static void main(String args[]){
int n = 5;
System.out.... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "Cube of a value is simply three times multiplication of the value with self."
},
{
"code": null,
"e": 1178,
"s": 1139,
"text": "For example, cube of 2 is (2*2*2) = 8."
},
{
"code": null,
"e": 1203,
"s": 1178,
"tex... |
What is the difference between “screen” and “only screen” in media queries? - GeeksforGeeks | 07 Mar, 2019
Media query is used to create responsive web design. It means that the view of web page differ from system to system based on screen or media types.screen: It is used to set the screen size of media query. The screen size can be set by using max-width and min-width. The screen size is differ from screen to... | [
{
"code": null,
"e": 24596,
"s": 24568,
"text": "\n07 Mar, 2019"
},
{
"code": null,
"e": 24912,
"s": 24596,
"text": "Media query is used to create responsive web design. It means that the view of web page differ from system to system based on screen or media types.screen: It is u... |
What does DELIMITER // do in a Trigger in MySQL? | The DELIMITER // can be used to change the statement from semicolon (;) to //. Now you can write multiple statements with semi-colon in a trigger.
Here is the demo of triggers. In this example whenever you enter the EmployeeSalary less than 1000 then it will by default set to 10000.
Firstly, let us create a table. The ... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "The DELIMITER // can be used to change the statement from semicolon (;) to //. Now you can write multiple statements with semi-colon in a trigger."
},
{
"code": null,
"e": 1346,
"s": 1209,
"text": "Here is the demo of triggers. In th... |
Can we have a return statement in a JavaScript switch statement? | The JavaScript switch statement can contain return statements if it is present inside a function. The function will return the value in the switch statement and the code after the switch statement will not be executed.
Following is the code to have return statements in JavaScript switch statement −
Live Demo
<!DOCTYPE... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "The JavaScript switch statement can contain return statements if it is present inside a function. The function will return the value in the switch statement and the code after the switch statement will not be executed."
},
{
"code": null,
"e... |
Java Program to Find the K-th Largest Sum Contiguous Subarray - GeeksforGeeks | 28 Feb, 2022
Given an array of integers. Write a program to find the K-th largest sum of contiguous subarray within the array of numbers which has negative and positive numbers.
Examples:
Input: a[] = {20, -5, -1}
k = 3
Output: 14
Explanation: All sum of contiguous
subarrays are (20, 15, 14, -5, -6, -1)
so... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 24596,
"s": 24431,
"text": "Given an array of integers. Write a program to find the K-th largest sum of contiguous subarray within the array of numbers which has negative and positive numbers... |
How to bind all the number keys in Tkinter? | While developing a Tkinter application, we often encounter cases where we have to perform some specific operation or event with the keystrokes (on keyboard). Tkinter provides a mechanism to deal with such events.
You can use bind(<Key>, callback) function for each widget that you want to bind in order to perform a cert... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "While developing a Tkinter application, we often encounter cases where we have to perform some specific operation or event with the keystrokes (on keyboard). Tkinter provides a mechanism to deal with such events."
},
{
"code": null,
"e": 150... |
Fetch datetime row from exactly past 7 days records in MySQL | For this, you can use the INTERVAL 7 day concept. Let us first create a table −
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
AdmissionDate datetime
);
Query OK, 0 rows affected (0.83 sec)
Note − Let’s say the current date is 2019-08-23.
Insert some records in the table using insert ... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "For this, you can use the INTERVAL 7 day concept. Let us first create a table −"
},
{
"code": null,
"e": 1287,
"s": 1142,
"text": "mysql> create table DemoTable\n(\n Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n AdmissionDate dat... |
Update multiple rows in a single MongoDB query? | Use the concept of initializeUnorderedBulkOp(). Let us first create a collection with documents −
>db.upDateMultipleRowsDemo.insertOne({"CustomerName":"John","CustomerPurchaseAmount":500});
{
"acknowledged" : true,
"insertedId" : ObjectId("5cd6ceb06d78f205348bc626")
}
>db.upDateMultipleRowsDemo.insertOne({"Custom... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "Use the concept of initializeUnorderedBulkOp(). Let us first create a collection with documents −"
},
{
"code": null,
"e": 1871,
"s": 1160,
"text": ">db.upDateMultipleRowsDemo.insertOne({\"CustomerName\":\"John\",\"CustomerPurchaseAm... |
WebRTC - Sending Messages | Now let's create a simple example. Firstly, run the signaling server we created in the “signaling server” tutorial via “node server”.
There will be three text inputs on the page, one for a login, one for a username, and one for the message we want to send to the other peer. Create an index.html file and add the followi... | [
{
"code": null,
"e": 2021,
"s": 1887,
"text": "Now let's create a simple example. Firstly, run the signaling server we created in the “signaling server” tutorial via “node server”."
},
{
"code": null,
"e": 2217,
"s": 2021,
"text": "There will be three text inputs on the page, one... |
How to sum a variable by factor levels in R? | We can do this by using aggregate function or with the help tapply
> x <- data.frame(Category=factor(c("Graduation", "Graduation", "Post-Graduation",
"Graduation","PhD", "Post-Graduation", "PhD")),
Frequency=c(12,19,15,20,25,13,14))
> x
Category Frequency
1 Graduation 12
2 Graduation 19
3 Post-Graduation 15
4 Graduatio... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "We can do this by using aggregate function or with the help tapply"
},
{
"code": null,
"e": 1426,
"s": 1129,
"text": "> x <- data.frame(Category=factor(c(\"Graduation\", \"Graduation\", \"Post-Graduation\",\n\"Graduation\",\"PhD\", \... |
uniform() method in Python Random module - GeeksforGeeks | 15 Oct, 2020
uniform() is a method specified in the random library in Python 3.
Nowadays, in general, day-day tasks, there’s always the need to generate random numbers in a range. Normal programming constructs require a method more than just one word to achieve this particular task. In python, there’s an inbuilt method... | [
{
"code": null,
"e": 25072,
"s": 25044,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 25139,
"s": 25072,
"text": "uniform() is a method specified in the random library in Python 3."
},
{
"code": null,
"e": 25499,
"s": 25139,
"text": "Nowadays, in general, d... |
How to Install Perl on Windows? - GeeksforGeeks | 05 Oct, 2021
Prerequisite: Introduction to Perl Before, we start with the process of Downloading and Installing Perl on Windows operating system, we must have first-hand knowledge of What the Perl Language is and what it actually does?. Perl is a general-purpose, high level interpreted and dynamic programming language.... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 26839,
"s": 26197,
"text": "Prerequisite: Introduction to Perl Before, we start with the process of Downloading and Installing Perl on Windows operating system, we must have first-hand knowle... |
Dart - Sets - GeeksforGeeks | 15 Sep, 2021
Sets in Dart is a special case in List where all the inputs are unique i.e it doesn’t contain any repeated input. It can also be interpreted as an unordered array with unique inputs. The set comes in play when we want to store unique values in a single variable without considering the order of the inputs. ... | [
{
"code": null,
"e": 25261,
"s": 25233,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 25619,
"s": 25261,
"text": "Sets in Dart is a special case in List where all the inputs are unique i.e it doesn’t contain any repeated input. It can also be interpreted as an unordered array ... |
Role of Subnet Mask - GeeksforGeeks | 26 May, 2020
Suppose we have a Class A network that means we have 16 million hosts in a network. The task we have to do is:
Maintenance of such a huge networkSecurity for the network – For example, we have 4 departments in a company and all of the 4 departments need not access the whole network.
Maintenance of such a h... | [
{
"code": null,
"e": 25755,
"s": 25727,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 25866,
"s": 25755,
"text": "Suppose we have a Class A network that means we have 16 million hosts in a network. The task we have to do is:"
},
{
"code": null,
"e": 26039,
"s":... |
IPC through shared memory - GeeksforGeeks | 22 Jul, 2019
Inter Process Communication through shared memory is a concept where two or more process can access the common memory. And communication is done via this shared memory where changes made by one process can be viewed by another process.
The problem with pipes, fifo and message queue – is that for two proces... | [
{
"code": null,
"e": 25667,
"s": 25639,
"text": "\n22 Jul, 2019"
},
{
"code": null,
"e": 25903,
"s": 25667,
"text": "Inter Process Communication through shared memory is a concept where two or more process can access the common memory. And communication is done via this shared me... |
How to Merge/Combine Arrays using JavaScript ? - GeeksforGeeks | 01 Jul, 2020
There are many ways of merging arrays in JavaScript. We will discuss two problem statements that are commonly encountered in merging arrays:
Merge without removing duplicate elements.Merge after removing the duplicate elements.
Merge without removing duplicate elements.
Merge after removing the duplicate e... | [
{
"code": null,
"e": 25797,
"s": 25769,
"text": "\n01 Jul, 2020"
},
{
"code": null,
"e": 25938,
"s": 25797,
"text": "There are many ways of merging arrays in JavaScript. We will discuss two problem statements that are commonly encountered in merging arrays:"
},
{
"code": ... |
Shortest distance between two nodes in BST - GeeksforGeeks | 17 Mar, 2022
Given a Binary Search Tree and two keys in it. Find the distance between two nodes with given two keys. It may be assumed that both keys exist in BST.
Examples:
Input: Root of above tree
a = 3, b = 9
Output: 4
Distance between 3 and 9 in
above BST is 4.
Input: Root of above tree
a = ... | [
{
"code": null,
"e": 26505,
"s": 26477,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 26656,
"s": 26505,
"text": "Given a Binary Search Tree and two keys in it. Find the distance between two nodes with given two keys. It may be assumed that both keys exist in BST."
},
{
... |
Named List in R Programming - GeeksforGeeks | 22 Jun, 2020
A list is an object in R Language which consists of heterogeneous elements. A list can even contain matrices, data frames, or functions as its elements. The list can be created using list() function in R. Named list is also created with the same function by specifying the names of the elements to access th... | [
{
"code": null,
"e": 26451,
"s": 26423,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 27020,
"s": 26451,
"text": "A list is an object in R Language which consists of heterogeneous elements. A list can even contain matrices, data frames, or functions as its elements. The list c... |
An Ultimate Guide to Git and Github - GeeksforGeeks | 02 Mar, 2021
Highlights of the article:
Introduction to GitGit Repository StructureAccessing github central repository via Https or sshWorking with git – Important Git commands
Introduction to Git
Git Repository Structure
Accessing github central repository via Https or ssh
Working with git – Important Git commands
Int... | [
{
"code": null,
"e": 25975,
"s": 25947,
"text": "\n02 Mar, 2021"
},
{
"code": null,
"e": 26002,
"s": 25975,
"text": "Highlights of the article:"
},
{
"code": null,
"e": 26139,
"s": 26002,
"text": "Introduction to GitGit Repository StructureAccessing github cen... |
p5.js | torus() Function - GeeksforGeeks | 22 Apr, 2019
The torus() function in p5.js is used to draw a torus with given torus radius and tube radius.
Syntax:
torus( radius, tubeRadius, detailX, detailY )
Parameters: This function accepts four parameters as mentioned above and described below:
radius: This parameter stores the radius of the torus.
tubeRadius: T... | [
{
"code": null,
"e": 26627,
"s": 26599,
"text": "\n22 Apr, 2019"
},
{
"code": null,
"e": 26722,
"s": 26627,
"text": "The torus() function in p5.js is used to draw a torus with given torus radius and tube radius."
},
{
"code": null,
"e": 26730,
"s": 26722,
"tex... |
Python | Convert dictionary to list of tuples - GeeksforGeeks | 08 Jul, 2021
Given a dictionary, write a Python program to convert the given dictionary into list of tuples.Examples:
Input: { 'Geeks': 10, 'for': 12, 'Geek': 31 }
Output : [ ('Geeks', 10), ('for', 12), ('Geek', 31) ]
Input: { 'dict': 11, 'to': 22, 'list_of_tup': 33}
Output : [ ('dict', 11), ('to', 22), ('list_of_tu... | [
{
"code": null,
"e": 26179,
"s": 26151,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 26286,
"s": 26179,
"text": "Given a dictionary, write a Python program to convert the given dictionary into list of tuples.Examples: "
},
{
"code": null,
"e": 26496,
"s": 262... |
Sort a linked list of 0s, 1s and 2s - GeeksforGeeks | 17 Jan, 2022
Given a linked list of 0s, 1s and 2s, sort it.Examples:
Input: 1 -> 1 -> 2 -> 0 -> 2 -> 0 -> 1 -> NULL Output: 0 -> 0 -> 1 -> 1 -> 1 -> 2 -> 2 -> NULLInput: 1 -> 1 -> 2 -> 1 -> 0 -> NULL Output: 0 -> 1 -> 1 -> 1 -> 2 -> NULL
Source: Microsoft Interview | Set 1
Following steps can be used to sort the ... | [
{
"code": null,
"e": 26149,
"s": 26121,
"text": "\n17 Jan, 2022"
},
{
"code": null,
"e": 26207,
"s": 26149,
"text": "Given a linked list of 0s, 1s and 2s, sort it.Examples: "
},
{
"code": null,
"e": 26378,
"s": 26207,
"text": "Input: 1 -> 1 -> 2 -> 0 -> 2 -> ... |
What is the use of serve favicon from Node.js server ? - GeeksforGeeks | 13 Jul, 2021
When the browser loads a website for the first time, it will automatically request /favicon.ico (GET) to load favicon. A favicon is a small size file as known as website icon, tab icon, URL icon or bookmark icon. The serve-favicon module is used to serve favicon from the NodeJS server.
Why to use this modu... | [
{
"code": null,
"e": 26267,
"s": 26239,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 26554,
"s": 26267,
"text": "When the browser loads a website for the first time, it will automatically request /favicon.ico (GET) to load favicon. A favicon is a small size file as known as w... |
Angular PrimeNG Accordion Component - GeeksforGeeks | 11 Sep, 2021
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the Accordion Component in Angular PrimeNG. We will also learn abo... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n11 Sep, 2021"
},
{
"code": null,
"e": 26746,
"s": 26354,
"text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp... |
Python 3 - String ljust() Method | The method ljust() returns the string left justified in a string of length width. Padding is done using the specified fillchar (default is a space). The original string is returned if width is less than len(s).
Following is the syntax for ljust() method −
str.ljust(width[, fillchar])
width − This is string length in t... | [
{
"code": null,
"e": 2551,
"s": 2340,
"text": "The method ljust() returns the string left justified in a string of length width. Padding is done using the specified fillchar (default is a space). The original string is returned if width is less than len(s)."
},
{
"code": null,
"e": 2596,... |
XML DOM - Create Node | In this chapter, we will discuss how to create new nodes using a couple of methods of the document object. These methods provide a scope to create new element node, text node, comment node, CDATA section node and attribute node. If the newly created node already exists in the element object, it is replaced by the new o... | [
{
"code": null,
"e": 2663,
"s": 2288,
"text": "In this chapter, we will discuss how to create new nodes using a couple of methods of the document object. These methods provide a scope to create new element node, text node, comment node, CDATA section node and attribute node. If the newly created nod... |
JUnit - Quick Guide | Testing is the process of checking the functionality of an application to ensure it runs as per requirements. Unit testing comes into picture at the developers’ level; it is the testing of single entity (class or method). Unit testing plays a critical role in helping a software company deliver quality products to its c... | [
{
"code": null,
"e": 2302,
"s": 1972,
"text": "Testing is the process of checking the functionality of an application to ensure it runs as per requirements. Unit testing comes into picture at the developers’ level; it is the testing of single entity (class or method). Unit testing plays a critical r... |
Program to count maximum number of distinct pairs whose differences are larger than target in Python | Suppose we have a list of numbers called nums and another value target. We have to find the maximum number of pairs where for each pair i < j, i and j are not in any other pair, and |nums[i] - nums[j]| >= target.
So, if the input is like nums = [2, 4, 6, 10, 11], target = 5, then the output will be 2, as we can get pai... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "Suppose we have a list of numbers called nums and another value target. We have to find the maximum number of pairs where for each pair i < j, i and j are not in any other pair, and |nums[i] - nums[j]| >= target."
},
{
"code": null,
"e": 140... |
Formatting float column of Dataframe in Pandas - GeeksforGeeks | 21 Aug, 2020
While presenting the data, showing the data in the required format is also an important and crucial part. Sometimes, the value is so big that we want to show only desired part of this or we can say in some desired format.
Let’s see different methods of formatting integer column of Dataframe in Pandas.
Code... | [
{
"code": null,
"e": 24894,
"s": 24866,
"text": "\n21 Aug, 2020"
},
{
"code": null,
"e": 25116,
"s": 24894,
"text": "While presenting the data, showing the data in the required format is also an important and crucial part. Sometimes, the value is so big that we want to show only ... |
Python 3 - List insert() Method | The insert() method inserts object obj into list at offset index.
Following is the syntax for insert() method −
list.insert(index, obj)
index − This is the Index where the object obj need to be inserted.
index − This is the Index where the object obj need to be inserted.
obj − This is the Object to be inserted into th... | [
{
"code": null,
"e": 2406,
"s": 2340,
"text": "The insert() method inserts object obj into list at offset index."
},
{
"code": null,
"e": 2452,
"s": 2406,
"text": "Following is the syntax for insert() method −"
},
{
"code": null,
"e": 2477,
"s": 2452,
"text": ... |
How to delete element from linked list for listview in Android? | This example demonstrate about How to delete element from linked list for listview in Android
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding =... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "This example demonstrate about How to delete element from linked list for listview in Android"
},
{
"code": null,
"e": 1285,
"s": 1156,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all r... |
Opening and reading a file with askopenfilename in Tkinter? | When a user wants to open a file from a directory, the preferred way to do this is to display a popup where the user selects a file to Open. Like most tools and widgets, Tkinter provides us a way to open a dialog for opening a file, reading a file, saving a file. All these functionalities are part of filedialog Module ... | [
{
"code": null,
"e": 1633,
"s": 1062,
"text": "When a user wants to open a file from a directory, the preferred way to do this is to display a popup where the user selects a file to Open. Like most tools and widgets, Tkinter provides us a way to open a dialog for opening a file, reading a file, savi... |
Lambda Expressions in C# | A lambda expression in C# describes a pattern.
Lambda Expressions has the token => in an expression context. This is read as “goes to” operator and used when a lambda expression is declared.
Here, we are finding the first occurrence of the element greater than 50 from a list.
list.FindIndex(x => x > 50);
Above the toke... | [
{
"code": null,
"e": 1109,
"s": 1062,
"text": "A lambda expression in C# describes a pattern."
},
{
"code": null,
"e": 1253,
"s": 1109,
"text": "Lambda Expressions has the token => in an expression context. This is read as “goes to” operator and used when a lambda expression is d... |
ARIMA Model Python Example — Time Series Forecasting | by Cory Maklin | Towards Data Science | The ability to make predictions based upon historical observations creates a competitive advantage. For example, if an organization has the capacity to better forecast the sales quantities of a product, it will be in a more favourable position to optimize inventory levels. This can result in an increased liquidity of t... | [
{
"code": null,
"e": 624,
"s": 172,
"text": "The ability to make predictions based upon historical observations creates a competitive advantage. For example, if an organization has the capacity to better forecast the sales quantities of a product, it will be in a more favourable position to optimize... |
Prime numbers within a range in JavaScript | We are required to write a JavaScript function that takes in two numbers, say, a and b and
returns the total number of prime numbers between a and b (including a and b, if they are
prime).
For example: If a = 21, and b = 38.
The prime numbers between them are 23, 29, 31, 37
The prime numbers between them are 23, 29, 31... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in two numbers, say, a and b and\nreturns the total number of prime numbers between a and b (including a and b, if they are\nprime)."
},
{
"code": null,
"e": 1287,
"s": 1251,
... |
Tune the hyperparameters of your deep learning networks in Python using Keras and Talos | by Yefeng Xia | Towards Data Science | With the development of Deep Learning frameworks, it’s more convenient and easy for many people to design the architecture for an artificial neural network. The 3 most popular frameworks, Tensorflow, Keras, and Pytorch, are used more frequently. To improve the performance of our neural networks, there are many approach... | [
{
"code": null,
"e": 647,
"s": 47,
"text": "With the development of Deep Learning frameworks, it’s more convenient and easy for many people to design the architecture for an artificial neural network. The 3 most popular frameworks, Tensorflow, Keras, and Pytorch, are used more frequently. To improve... |
SaltStack - Access Control System | An Access Control System provides options for a user for a group to execute a task with permissions. A Salt access control system is used to configure access to non-administrative control interfaces. You can apply this process to all the systems. This control helps the non-administrative users to execute the Salt comma... | [
{
"code": null,
"e": 2532,
"s": 2207,
"text": "An Access Control System provides options for a user for a group to execute a task with permissions. A Salt access control system is used to configure access to non-administrative control interfaces. You can apply this process to all the systems. This c... |
Nearest prime less than given number n C++ | We are given a number n, we need to find the nearest prime number that is less than n. We can find the number easily if we start checking from the n - 1. Let's see some examples.
Input
10
Output
7
Initialise the number n.
Write a loop that iterates from n - 1 to 1Return the first prime number that you found
Return the ... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "We are given a number n, we need to find the nearest prime number that is less than n. We can find the number easily if we start checking from the n - 1. Let's see some examples."
},
{
"code": null,
"e": 1247,
"s": 1241,
"text": "Inp... |
How to query JSON datatype in MySQL? | Use JSON data type from MySQL to work with JSON. Let us first create a table −
mysql> create table DemoTable
-> (
-> StudentName json
-> );
Query OK, 0 rows affected (0.74 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('["John", "Chris", "Robert","David","Sam"]');
Query... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "Use JSON data type from MySQL to work with JSON. Let us first create a table −"
},
{
"code": null,
"e": 1239,
"s": 1141,
"text": "mysql> create table DemoTable\n-> (\n-> StudentName json\n-> );\nQuery OK, 0 rows affected (0.74 sec)"
... |
How to add users and groups to the local groups on Windows System using PowerShell? | To add users to the local groups using PowerShell, we need to use the Add-LocalGroupMember command (Module − Microsoft.PowerShell.LocalAccounts).
Add-LocalGroupMember -Group "Administrators" -Member
"NewLocalUser","labdomain\Alpha","Labdomain\ITSecurity"
The above command adds 2 users (NewLocalUser (Local) and Alpha (D... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "To add users to the local groups using PowerShell, we need to use the Add-LocalGroupMember command (Module − Microsoft.PowerShell.LocalAccounts)."
},
{
"code": null,
"e": 1317,
"s": 1208,
"text": "Add-LocalGroupMember -Group \"Admini... |
Collaborative Filtering in Pytorch | by Neel Iyer | Towards Data Science | Collaborative filtering is a tool that companies are increasingly using. Netflix uses it to recommend shows for you to watch. Facebook uses it to recommend who you should be friends with. Spotify uses it to recommend playlists and songs. It’s incredibly useful in recommending products to customers.
In this post, I cons... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "Collaborative filtering is a tool that companies are increasingly using. Netflix uses it to recommend shows for you to watch. Facebook uses it to recommend who you should be friends with. Spotify uses it to recommend playlists and songs. It’s incredibly u... |
What is CGI in Python ? - GeeksforGeeks | 10 Feb, 2022
CGI stands for Common Gateway Interface in Python which is a set of standards that explains how information or data is exchanged between the web server and a routine script. This interface is used by web servers to route information requests supplied by a browser or we can say that CGI is customary for ext... | [
{
"code": null,
"e": 23946,
"s": 23918,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 24475,
"s": 23946,
"text": "CGI stands for Common Gateway Interface in Python which is a set of standards that explains how information or data is exchanged between the web server and a routi... |
Iterating over ArrayLists in Java - GeeksforGeeks | 31 Oct, 2021
ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it may be slower than standard arrays but can be helpful in programs where lots of manipulation in the array is needed. This class is found in java.util package.
With the int... | [
{
"code": null,
"e": 23672,
"s": 23644,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 23967,
"s": 23672,
"text": "ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it may be slower than standard... |
JavaScript Date Set Methods | Set Date methods let you set date values (years,
months, days, hours, minutes, seconds, milliseconds) for a Date Object.
Set Date methods are used for setting a part of a date:
The setFullYear() method sets the year of a date object. In this example to 2020:
The setFullYear() method can optionally set month and day:
T... | [
{
"code": null,
"e": 122,
"s": 0,
"text": "Set Date methods let you set date values (years, \nmonths, days, hours, minutes, seconds, milliseconds) for a Date Object."
},
{
"code": null,
"e": 178,
"s": 122,
"text": "Set Date methods are used for setting a part of a date:"
},
{... |
How to put an input element on the same line as its label? - GeeksforGeeks | 30 Jul, 2021
There are several approaches to make an input element the same as its label. Few approaches are discussed here. Basic CSS to label, span, and input to get clear outputs.
Using float and overflow attributes: Make a label and style it with float attribute. Now set the label float(position) left or right acco... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 24601,
"s": 24431,
"text": "There are several approaches to make an input element the same as its label. Few approaches are discussed here. Basic CSS to label, span, and input to get clear ou... |
How to convert a value of one type to another type in SQL server - GeeksforGeeks | 07 Dec, 2020
Convert means to change the form or value of something. The CONVERT() function in SQL server is used to convert a value of one type to another type.
Syntax :
SELECT CONVERT
( target_type ( length ), expression )
Parameters used :
target_type –It is the target data type to which the to expression will be... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n07 Dec, 2020"
},
{
"code": null,
"e": 24026,
"s": 23877,
"text": "Convert means to change the form or value of something. The CONVERT() function in SQL server is used to convert a value of one type to another type."
},
{
... |
How to use Scrapy Items? - GeeksforGeeks | 19 Sep, 2021
In this article, we will scrape Quotes data using scrapy items, from the webpage https://quotes.toscrape.com/tag/reading/. The main objective of scraping, is to prepare structured data, from unstructured resources. Scrapy Items are wrappers around, the dictionary data structures. Code can be written, such ... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n19 Sep, 2021"
},
{
"code": null,
"e": 24340,
"s": 23901,
"text": "In this article, we will scrape Quotes data using scrapy items, from the webpage https://quotes.toscrape.com/tag/reading/. The main objective of scraping, is to pr... |
Git Ignore and .gitignore | When sharing your code with others, there are often files or parts of your project, you do not want to share.
Examples
log files
temporary files
hidden files
personal files
etc.
Git can specify which files or parts of your project should be
ignored by Git using a .gitignore file.
Git will not track files and folders s... | [
{
"code": null,
"e": 110,
"s": 0,
"text": "When sharing your code with others, there are often files or parts of your project, you do not want to share."
},
{
"code": null,
"e": 119,
"s": 110,
"text": "Examples"
},
{
"code": null,
"e": 129,
"s": 119,
"text": "... |
How to change the size of text on a label in Tkinter? | The label widget in Tkinter is used to display text and images in a Tkinter application. In order to change the properties of the label widget such as its font-property, color, background color, foreground color, etc., you can use the configure() method.
If you want to change the size of the text in a Label widget, the... | [
{
"code": null,
"e": 1317,
"s": 1062,
"text": "The label widget in Tkinter is used to display text and images in a Tkinter application. In order to change the properties of the label widget such as its font-property, color, background color, foreground color, etc., you can use the configure() method... |
Sorting data frames in pandas. How to sort data frames quickly and... | by Magdalena Konkiewicz | Towards Data Science | Many beginner data scientists try to sort their data frames by writing complicated functions. This is not the most efficient or easiest way to do it. Do not reinvent the wheel and use sort_values() function provided by pandas package. Let’s have a look at the real-life example and how to use sort_values() function in y... | [
{
"code": null,
"e": 502,
"s": 172,
"text": "Many beginner data scientists try to sort their data frames by writing complicated functions. This is not the most efficient or easiest way to do it. Do not reinvent the wheel and use sort_values() function provided by pandas package. Let’s have a look at... |
Python - Advanced Linked list | We have already seen Linked List in earlier chapter in which it is possible only to travel forward. In this chapter we see another type of linked list in which it is possible to travel both forward and backward. Such a linked list is called Doubly Linked List. Following is the features of doubly linked list.
Doubly Li... | [
{
"code": null,
"e": 2638,
"s": 2327,
"text": "We have already seen Linked List in earlier chapter in which it is possible only to travel forward. In this chapter we see another type of linked list in which it is possible to travel both forward and backward. Such a linked list is called Doubly Link... |
Why is it faster to process sorted array than an unsorted array ? - GeeksforGeeks | 11 Jul, 2017
Here is a C++ code that illustrates that sorting the data miraculously makes the code faster than the unsorted version. Let’s try out a sample C++ program to understand the problem statement better.
// CPP program to demonstrate processing// time of sorted and unsorted array#include <iostream>#include <alg... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n11 Jul, 2017"
},
{
"code": null,
"e": 25019,
"s": 24820,
"text": "Here is a C++ code that illustrates that sorting the data miraculously makes the code faster than the unsorted version. Let’s try out a sample C++ program to under... |
JavaScript Number - NaN | Unquoted literal constant NaN is a special value representing Not-a-Number. Since NaN always compares unequal to any number, including NaN, it is usually used to indicate an error condition for a function that should return a valid number.
Note − Use the isNaN() global function to see if a value is an NaN value.
The sy... | [
{
"code": null,
"e": 2706,
"s": 2466,
"text": "Unquoted literal constant NaN is a special value representing Not-a-Number. Since NaN always compares unequal to any number, including NaN, it is usually used to indicate an error condition for a function that should return a valid number."
},
{
... |
3 Ways to Get Notified with Python | by Khuyen Tran | Towards Data Science | As a data scientist or programmer, it might take you a lot of time to process your data and train your model. It is inefficient to constantly check the training on your screen, especially when the training can take hours or days. Are there ways that you can get a notification when your training is done with Python?
Yes... | [
{
"code": null,
"e": 488,
"s": 171,
"text": "As a data scientist or programmer, it might take you a lot of time to process your data and train your model. It is inefficient to constantly check the training on your screen, especially when the training can take hours or days. Are there ways that you c... |
Creating Junction Points - GeeksforGeeks | 05 Oct, 2020
Junction Points (also commonly referred to as NTFS Junction or Directory Junction) is a type of reparse point which contains a link to a directory that acts as an alias of that directory. Junction points are a Windows exclusive feature, absent in other operating systems. Compatibility with Legacy Windows O... | [
{
"code": null,
"e": 24492,
"s": 24464,
"text": "\n05 Oct, 2020"
},
{
"code": null,
"e": 24991,
"s": 24492,
"text": "Junction Points (also commonly referred to as NTFS Junction or Directory Junction) is a type of reparse point which contains a link to a directory that acts as an ... |
How to Convert Int to Bytes in Python? - GeeksforGeeks | 23 Dec, 2020
An int object can be used to represent the same value in the format of the byte. The integer represents a byte, is stored as an array with its most significant digit (MSB) stored at either the start or end of the array.
Method 1: int.tobytes()
An int value can be converted into bytes by using the method ... | [
{
"code": null,
"e": 23919,
"s": 23888,
"text": " \n23 Dec, 2020\n"
},
{
"code": null,
"e": 24140,
"s": 23919,
"text": "An int object can be used to represent the same value in the format of the byte. The integer represents a byte, is stored as an array with its most significant ... |
POSIX Function strftime() in Perl | You can use the POSIX function strftime() in Perl to format the date and time with the help of the following table. Please note that the specifiers marked with an asterisk (*) are locale-dependent.
Let's check the following example to understand the usage −
Live Demo
#!/usr/local/bin/perl
use POSIX qw(strftime);
$date... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "You can use the POSIX function strftime() in Perl to format the date and time with the help of the following table. Please note that the specifiers marked with an asterisk (*) are locale-dependent."
},
{
"code": null,
"e": 1320,
"s": 126... |
Data Structures | Hash | Question 5 - GeeksforGeeks | 20 May, 2019
Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?i. 9679, 1989, 4199 hash to the same valueii. 1471, 6171 hash to the same valueiii. All elements hash to the same valueiv. Each element hashes to a different... | [
{
"code": null,
"e": 24362,
"s": 24334,
"text": "\n20 May, 2019"
},
{
"code": null,
"e": 24764,
"s": 24362,
"text": "Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?i. 9679, 1989... |
How to open a new tab using Selenium WebDriver? | We can open a new tab with Selenium. The Keys.chord and sendKeys methods are used for this. Multiple keys can be passed simultaneously with the Keys.chord method. A group of strings or keys can be passed as parameters to that method.
The Keys.CONTROL and Keys.ENTER are passed as parameters to the Keys.chord method here... | [
{
"code": null,
"e": 1296,
"s": 1062,
"text": "We can open a new tab with Selenium. The Keys.chord and sendKeys methods are used for this. Multiple keys can be passed simultaneously with the Keys.chord method. A group of strings or keys can be passed as parameters to that method."
},
{
"code... |
Integrating JsonToKotlin Plugin With Android Studio - GeeksforGeeks | 18 Feb, 2021
Android Studio is the best IDE for android development. Plenty of plugins are available and they can be installed easily via Android Studio itself. In computing, a plug-in is a software component that adds a particular characteristic to an existing computer program. When a program supports plug-ins, it ena... | [
{
"code": null,
"e": 24590,
"s": 24562,
"text": "\n18 Feb, 2021"
},
{
"code": null,
"e": 25203,
"s": 24590,
"text": "Android Studio is the best IDE for android development. Plenty of plugins are available and they can be installed easily via Android Studio itself. In computing, a... |
Tail command in Linux with examples - GeeksforGeeks | 19 Feb, 2021
It is the complementary of head command.The tail command, as the name implies, print the last N number of data of the given input. By default it prints the last 10 lines of the specified files. If more than one file name is provided then data from each file is precedes by its file name.
Syntax:
tail [OPT... | [
{
"code": null,
"e": 25431,
"s": 25400,
"text": " \n19 Feb, 2021\n"
},
{
"code": null,
"e": 25720,
"s": 25431,
"text": "It is the complementary of head command.The tail command, as the name implies, print the last N number of data of the given input. By default it prints the last... |
How to Create Bindings and Conditions Between Multiple Plots Using Altair | by Khuyen Tran | Towards Data Science | Have you ever wanted to see one plot change when you interact with another plot like below? That is when Altair comes in handy.
The graph above is created with Altair. If you don’t know about Altair, Altair is a statistical visualization library for Python based on Vega and Vega-Lite. In my last article, I showed how A... | [
{
"code": null,
"e": 300,
"s": 172,
"text": "Have you ever wanted to see one plot change when you interact with another plot like below? That is when Altair comes in handy."
},
{
"code": null,
"e": 585,
"s": 300,
"text": "The graph above is created with Altair. If you don’t know ... |
Autoencoders in Practice: Dimensionality Reduction and Image Denoising | by Ruben Winastwan | Towards Data Science | Let’s imagine ourselves creating a neural network based machine learning model. When we do so, most of the time we’re going to use it to do a classification task. This means that we train our neural network to predict the target y given the input features x.
However, the ability of a neural network to create a lower-di... | [
{
"code": null,
"e": 430,
"s": 171,
"text": "Let’s imagine ourselves creating a neural network based machine learning model. When we do so, most of the time we’re going to use it to do a classification task. This means that we train our neural network to predict the target y given the input features... |
What Is the Best Input Pipeline to Train Image Classification Models with tf.keras? | by Yan Gobeil | Towards Data Science | When we start learning how to build deep neural networks with Keras, the first method we use to input data is simply loading it into NumPy arrays. At some point, especially when working with images, the data is too large to fit in memory so we need an alternative to arrays. From my experience, the go-to solution to tha... | [
{
"code": null,
"e": 766,
"s": 171,
"text": "When we start learning how to build deep neural networks with Keras, the first method we use to input data is simply loading it into NumPy arrays. At some point, especially when working with images, the data is too large to fit in memory so we need an alt... |
How To Deal With Imbalanced Classification, Without Re-balancing the Data | by David B Rosen (PhD) | Towards Data Science | In machine learning, when building a classification model with data having far more instances of one class than another, the initial default classifier is often unsatisfactory because it classifies almost every case as the majority class. Many articles show you how you could use oversampling (e.g. SMOTE) or sometimes u... | [
{
"code": null,
"e": 719,
"s": 171,
"text": "In machine learning, when building a classification model with data having far more instances of one class than another, the initial default classifier is often unsatisfactory because it classifies almost every case as the majority class. Many articles sh... |
QlikView - Quick Guide | QlikView is a leading Business Discovery Platform. It is unique in many ways as compared to the traditional BI platforms. As a data analysis tool, it always maintains the relationship between the data and this relationship can be seen visually using colors. It also shows the data that are not related. It provides both ... | [
{
"code": null,
"e": 3317,
"s": 2920,
"text": "QlikView is a leading Business Discovery Platform. It is unique in many ways as compared to the traditional BI platforms. As a data analysis tool, it always maintains the relationship between the data and this relationship can be seen visually using col... |
M-Coloring Problem | In this problem, an undirected graph is given. There is also provided m colors. The problem is to find if it is possible to assign nodes with m different colors, such that no two adjacent vertices of the graph are of the same colors. If the solution exists, then display which color is assigned on which vertex.
Starting... | [
{
"code": null,
"e": 1374,
"s": 1062,
"text": "In this problem, an undirected graph is given. There is also provided m colors. The problem is to find if it is possible to assign nodes with m different colors, such that no two adjacent vertices of the graph are of the same colors. If the solution exi... |
How to select records beginning with certain numbers in MySQL? | The optimal solution to select records beginning with certain numbers, use MySQL LIKE operator. Let us first create a table −
mysql> create table DemoTable
(
ClientId bigint,
ClientName varchar(40)
);
Query OK, 0 rows affected (0.82 sec)
Insert some records in the table using insert command −
mysql> insert into D... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "The optimal solution to select records beginning with certain numbers, use MySQL LIKE operator. Let us first create a table −"
},
{
"code": null,
"e": 1306,
"s": 1188,
"text": "mysql> create table DemoTable\n(\n ClientId bigint,\n ... |
HTML5 Canvas - Create Gradients | HTML5 canvas allows us to fill and stroke shapes using linear and radial gradients using the following methods −
addColorStop(offset, color)
This method adds a color stop with the given color to the gradient at the given offset. Here 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
crea... | [
{
"code": null,
"e": 2721,
"s": 2608,
"text": "HTML5 canvas allows us to fill and stroke shapes using linear and radial gradients using the following methods −"
},
{
"code": null,
"e": 2749,
"s": 2721,
"text": "addColorStop(offset, color)"
},
{
"code": null,
"e": 2924... |
Going Prescriptive — The Real Super Power of Data Science | by Martin Schmitz, PhD | Towards Data Science | At its core, Data Science relies on methods of machine learning. But Data Science is also more than just predicting who will buy, who will click or what will break. Data Science uses ML methods and combines them with other methods. In this article, we will discuss Prescriptive Analytics, a technology which combines mac... | [
{
"code": null,
"e": 525,
"s": 172,
"text": "At its core, Data Science relies on methods of machine learning. But Data Science is also more than just predicting who will buy, who will click or what will break. Data Science uses ML methods and combines them with other methods. In this article, we wil... |
How to answer a coding interview question | by Tuan Nhu Dinh | Towards Data Science | This blog is a part of my “15 days cheat sheet for hacking technical interviews at big tech companies”. In this blog, we focus on a step by step approach to solve a coding interview question.
The coding interview sections are designed to reveal how you think, communicate, and solve problems. Hence, giving the correct a... | [
{
"code": null,
"e": 364,
"s": 172,
"text": "This blog is a part of my “15 days cheat sheet for hacking technical interviews at big tech companies”. In this blog, we focus on a step by step approach to solve a coding interview question."
},
{
"code": null,
"e": 810,
"s": 364,
"te... |
Bootstrap 4 .justify-content-* class | To align flex items, use the justify-content-* class.
Use any of the following to align flex items at the start, end, around, and between.
justify-content-start – Align Flex items at the start
justify-content-end - Align Flex items at the end
justify-content-around – Align flex items around on different screen sizes
... | [
{
"code": null,
"e": 1116,
"s": 1062,
"text": "To align flex items, use the justify-content-* class."
},
{
"code": null,
"e": 1201,
"s": 1116,
"text": "Use any of the following to align flex items at the start, end, around, and between."
},
{
"code": null,
"e": 1463,
... |
YAML - Full Length Example | The following full-length example specifies the construct of YAML which includes symbols and various representations which will be helpful while converting or processing them in JSON format. These attributes are also called as key names in JSON documents. These notations are created for security purposes.
The above YA... | [
{
"code": null,
"e": 2356,
"s": 2048,
"text": "The following full-length example specifies the construct of YAML which includes symbols and various representations which will be helpful while converting or processing them in JSON format. These attributes are also called as key names in JSON document... |
Shuffle elements of ArrayList with Java Collections | In order to shuffle elements of ArrayList with Java Collections, we use the Collections.shuffle() method. The java.util.Collections.shuffle() method randomly permutes the list using a default source of randomness.
Declaration −The java.util.Collections.shuffle() method is declared as follows −
public static void shuffl... | [
{
"code": null,
"e": 1276,
"s": 1062,
"text": "In order to shuffle elements of ArrayList with Java Collections, we use the Collections.shuffle() method. The java.util.Collections.shuffle() method randomly permutes the list using a default source of randomness."
},
{
"code": null,
"e": 13... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.