Tux Machines

Development Leftovers

Posted by Roy Schestowitz on Jul 26, 2023

Gemini Articles of Interest
Free Software in Review

Checking usage of realloc with Valgrind

↺ Checking usage of realloc with Valgrind
One of the C dynamic memory allocation functions is realloc. Given a pointer, realloc will resize the memory block it points to. This sounds like a simple and useful mechanism to do memory management. But realloc has various gotchas that Valgrind Memcheck can check for to ensure you use the function correctly. Memory blocks should exist and have not yet been freed, blocks can be moved when resized, on failure to resize the memory block might leak, and what happens when a block is reduced to zero size might be undefined.
↺ C
↺ Valgrind Memcheck
↺ C
↺ Valgrind Memcheck

Pandas Merge on Multiple Columns

↺ Pandas Merge on Multiple Columns
In Python, the “pandas.merge()” method of the “pandas” module is utilized to merge the multiple columns of two Pandas DataFrame.

Logical Operators in Python

↺ Logical Operators in Python
Python, one of the world’s most popular programming languages, supports a wide range of operators, including arithmetic, comparison, assignment, bitwise, and logical operators. In this article, we’ll focus on Python’s logical operators, exploring their usage and significance in coding various logical operations. What are Logical Operators?

Python List to CSV

↺ Python List to CSV
In Python, the “write()”, “CSV”, “to_csv()”, and the “savetxt()” methods are utilized to create a CSV file from the input list.

Pandas Sum Column

↺ Pandas Sum Column
The “DataFrame.sum()” method or “DataFrame.eval()” method is used to add all the columns or specified columns of Pandas DataFrame in Python.

Pandas Between Dates

↺ Pandas Between Dates
In Python, “df.loc[]”, “df.query()”, and the “df.isin()” methods are used to select the rows of Pandas DataFrame that fall within the specified dates.

Pandas DataFrame Remove Index

↺ Pandas DataFrame Remove Index
The “pd.reset_index()” method of the “pandas” module is used to remove/drop the single or multiple indexes of the Pandas DataFrame.
gemini.tuxmachines.org