Open Source Articles

Page 102 of 123

How to Repeat Your Last Command in Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 19-Jul-2022 7K+ Views

Linux terminal allows us to execute a variety of commands and sometimes it so happens that we find ourselves in a scenario where we might want to use a certain command more than once. There are many occurrences where we would want to repeat the command that we just ran. In Linux, this can be done with the help of different commands, and in this tutorial, we will explore all such commands with the help of different examples. For reference and simplicity, I will run a single command, say 'ls -ltr' and then use the different methods to search what ...

Read More

How to Run a Command Multiple Times in Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 19-Jul-2022 9K+ Views

There are scenarios where you would want to run a particular command for 'N' number of times. In normal programming, this can be done with the help of any of the loops constructs available in that programming language. In Linux bash too, we have loops available as some other ways with which we can repeat commands 'N' number of times. In this tutorial, we will explore different bash scripts that will allow us to run a certain command multiple times. The first step when you want to work with a bash script is to create one. On Linux or macOS ...

Read More

Array Operations in Linux bash

Mukul Latiyan
Mukul Latiyan
Updated on 18-Jul-2022 911 Views

Bash scripts are one of the most convenient approaches when we talk about making the command line processes automated in nature. They help us in doing a group of things in a simpler and more understandable manner, and we can do almost all theoperations that we could do in other languages as well.It is well known that the syntax of the bash can be tricky at first, and hence I will try to explain everything that I have used in this tutorial.We come across various situations where we would want to make use of bash scripts to perform different operations ...

Read More

What languages have been used to write Windows, Mac OS and Linux OS?

Mukul Latiyan
Mukul Latiyan
Updated on 12-Jul-2022 7K+ Views

We know that an operating system is considered the backbone of any system that you may use. The three most common and widely used operating systems share things in common just as well as they share differences. While there are cases where one might outperform another, those cases and such scenarios are very rare.The most notable difference one can notice is how they store the files in their file structure, like in case of windows, it follows a directory structure to store the different kinds of files of the user, whereas the Mac OS file structure is known as MAC ...

Read More

Freeware v/s Shareware

sudhir sharma
sudhir sharma
Updated on 01-Feb-2022 7K+ Views

Softwares are a set of programs that are created in order to perform a specific computer task. Generally, the software is created by developers to solve the needs of its users. And based on the restrictions that are imposed on software. Basically, there are a few categories based on licensing. Here, we will compare two types: Freeware and Shareware.Freeware SoftwareThese softwares are the softwares that are available to the users free of cost to use and distribute. The source code of the software is not available to use and cannot be modified.Shareware SoftwareThese softwares are the softwares that are initially ...

Read More

SciPy is built upon which core packages?

Gaurav Kumar
Gaurav Kumar
Updated on 14-Dec-2021 271 Views

SciPy is built upon the following core packages −Python − Python, a general-purpose programming language, is dynamically typed and interpreted. It is well suited for interactive work and quick prototyping. It is also powerful to write AI and ML applications.NumPy − NumPy is a base N-dimensional array package for SciPy that allows us to efficiently work with data in numerical arrays. It is the fundamental package for numerical computation.Matplotlib − Matplotlib is used to create comprehensive 2-dimensional charts and plots from data. It also provides us basic 3-dimensional plotting.The SciPy library − It is one of the core packages providing us many user-friendly and ...

Read More

How do I install Python SciPy?

Gaurav Kumar
Gaurav Kumar
Updated on 14-Dec-2021 715 Views

We can install Python SciPy with the help of following methods −Scientific Python Distributions − There are various scientific Python distributions that provide the language itself along with the most used packages. The advantage of using these distributions is that they require little configuration and work on almost all the setups. Here we will be discussing three most useful distributions −Anaconda − Anaconda, a free Python distribution, works well on MS Windows, Mac OS, and Linux. It provides us over 1500 Python and R packages along with a large collection of libraries. This Python distribution is best suited for beginners.WinPython − It ...

Read More

What are various sub-packages in Python SciPy library?

Gaurav Kumar
Gaurav Kumar
Updated on 14-Dec-2021 1K+ Views

To cover different scientific computing domains, SciPy library is organized into various sub-packages. These sub-packages are explained below −Clustering package (scipy.cluster) − This package contains clustering algorithms which are useful in information theory, target detection, compression, communications, and some other areas also. It has two modules namely scipy.cluster.vq and scipy.cluster.hierarchy. As the name entails, the first module i.e., vq module supports only vector quantization and k-meansalgorithms. Whereas the second module i.e., hierarchy module provides functions for agglomerative and hierarchical clustering.Constants(scipy.constants) − It contains mathematical and physical constants. Mathematical constants include pi, golden and golden_ratio. Physical constants include c, speed_of_light, planck, gravitational_constant, etc.Legacy ...

Read More

Implementing K-means clustering of Diabetes dataset with SciPy library

Gaurav Kumar
Gaurav Kumar
Updated on 14-Dec-2021 934 Views

The Pima Indian Diabetes dataset, which we will be using here, is originally from the National Institute of Diabetes and Digestive and Kidney Diseases. Based on the following diagnostic factors, this dataset can be used to place a patient in ether diabetic cluster or non-diabetic cluster −PregnanciesGlucoseBlood PressureSkin ThicknessInsulinBMIDiabetes Pedigree FunctionAgeYou can get this dataset in .CSV format from Kaggle website.ExampleThe example below will use SciPy library to create two clusters namely diabetic and non-diabetic from the Pima Indian diabetes dataset.#importing the required Python libraries: import matplotlib.pyplot as plt import numpy as np from scipy.cluster.vq import whiten, kmeans, vq ...

Read More

Implementing K-means clustering with SciPy by splitting random data in 3 clusters?

Gaurav Kumar
Gaurav Kumar
Updated on 14-Dec-2021 239 Views

Yes, we can also implement a K-means clustering algorithm by splitting the random data in 3 clusters. Let us understand with the example below −Example#importing the required Python libraries: import numpy as np from numpy import vstack, array from numpy.random import rand from scipy.cluster.vq import whiten, kmeans, vq from pylab import plot, show #Random data generation: data = vstack((rand(200, 2) + array([.5, .5]), rand(150, 2))) #Normalizing the data: data = whiten(data) # computing K-Means with K = 3 (3 clusters) centroids, mean_value = kmeans(data, 3) print("Code book :", centroids, "") print("Mean of Euclidean distances :", mean_value.round(4)) ...

Read More
Showing 1011–1020 of 1,225 articles
« Prev 1 100 101 102 103 104 123 Next »
Advertisements