迹忆客 EN >

所有文章

How to read input from stdin in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

This tutorial discussed stdin the methods of reading input from in Python. You can read directly from the console or from a file name specified in the console. In Python, fileinput.input() use stdin fileinput We can use the read module in P...

查看全文

Maximum integer in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

This tutorial will discuss the maximum integer value in different versions of Python and how we can get it. In Python 2, integers and long integers are different data types. The maximum value of an integer is 2 31 -1. If the value exceeds t...

查看全文

Get a list of time zones using Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

When developing real-world applications, software developers must ensure that the application can support users from both their own country and other parts of the world. Since most countries have different time zones and many people around...

查看全文

Convert NumPy array to list in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

Lists and arrays are the two most basic and commonly used collection objects in Python. They are both mutable and are used to store a collection of elements under a common name and each element has a specific location that can be used to ac...

查看全文

Appending 2D Arrays in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

In Python, we can have ND arrays. We can use NumPy module to process arrays in Python. This tutorial demonstrated the different methods you can use to append values ​​to a two-dimensional array in Python. Use append() the function to ap...

查看全文

Sliding average of NumPy arrays in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

The sliding average is often used to study time series data by calculating the average of data at a specific time interval. It is used to eliminate some short-term fluctuations and study data trends. When studying stock price trends, the si...

查看全文

Calculating Mahalanobis distance in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

This tutorial will show you how to find the Mahalanobis distance between two NumPy arrays in Python. Use the function scipy.spatial.distance in the Python library cdist() to calculate the Mahalanobis distance The Mahalanobis distance is a m...

查看全文

Implementing the ReLU function in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

This tutorial will discuss the Relu function and how to implement it in Python. ReLU function Relu Functions are the foundation of machine learning and are essential when using deep learning. ReLU The term is Rectified Linear Unit an acrony...

查看全文

Killing a Python process

发布时间:2025/05/05 作者:JIYIK 分类:Python

When programming in Python, sometimes our program gets stuck in an infinite loop. In this case, we need to terminate the program manually. This article will discuss different ways to kill a Python process. Killing a Python process using a k...

查看全文

Get file extension in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

This tutorial shows how to get the file extension from a file name in Python. os.path Extract extension from file using module in Python The Python module os.path pre-makes useful utility functions for manipulating operating system file pat...

查看全文

Read the first line of a file in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

In Python, we have built-in functions to handle different file operations. A text file contains a sequence of strings where each line \n is terminated by a newline character. In this tutorial, we will learn how to read the first line of a t...

查看全文

Reading binary files in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

The program or internal processor interprets the binary file. It contains bytes as content. When we read a binary file, an bytes object of type is returned. open() Read a binary file using the function in Python In Python, we have open() th...

查看全文

Writing bytes to a file in Python

发布时间:2025/05/05 作者:JIYIK 分类:Python

In this tutorial, we will look at how to write bytes to a binary file in Python. Binary files contain strings of type bytes. When we read a binary file, an object of type bytes is returned. In Python, bytes are represented by hexadecimal nu...

查看全文

Python get file name without extension from path

发布时间:2025/05/05 作者:JIYIK 分类:Python

This tutorial will demonstrate various ways to get the file name without extension from a file path in Python. Suppose our goal is to get the file name from a list of file paths that are in the form of strings, such as from the path Desktop...

查看全文

扫一扫阅读全部技术教程

社交账号
  • https://www.github.com/onmpw
  • qq:1244347461

热门文章

热门标签

扫码一下
查看教程更方便