Skip to content

JustWhit3/my-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A collection of personal scripts

v1.4 license Python Bash
code size repo size total lines

Table of contents

Introduction

This repository contains some scripts I write for other personal and working projects. I keep them here for two reasons: first, to keep them easily accessible to me in case of the needing to retrieve some parts of code; secondly, to let everybody accessing them freely.

For each script folder there is a requirements.txt file which contains prerequisites for correct usage.

If you want to use one of my scripts please cite them with this template citation file.

Python

Description: script used to compute the size of a single or more directories in a precise way, by considering also all the subdirectories and files.

Arguments:

  • --paths: directory path, or paths. Example: "path_1 path_2 path_n".
  • --message: a flag to turn on/off the final message.
  • --exception: exclude a particular file from the final count.

Description: script used to efficiently remove directories in parallel.

Arguments:

  • --dirs: contains path to dirs to be removed in parallel. Example: "dir_1 dir_2 dir_3".

Description: script used to send whatsapp messages using Twilio API. It can be easily used for bots.

Arguments:

  • --number: your personal telephone number (with prefix and +).
  • --message: the message to be sent.

Description: script used to get current device information (RAM, CPU, etc...).

Bash

Description: script used to debug C/C++ code with Valgrind and cppcheck.

Requirements:

Arguments:

  • $1: debug option (cppcheck, memcheck, helgrind etc...).
  • $2: source file to be debugged.

Description: script used to update a repository without using git.

Requirements:

Description: script used to create a virtual environment specifying Python version, environment name and requirements file. If it is the first time you run it, a virtual environment will be created and activated and prerequisites Python modules will be installed. From the second time on, the script will simply activate the virtual environment.

⚠️ Launch it with source setup_env.sh since source command is used into the script.

Requirements:

Arguments:

  • $1: Python version.
  • $2: Virtual environment name.
  • $3: Requirements file.

Description: script used to launch include tests of a .h/.hpp c++ file. Basically it tests if the file can be included correctly in a generic program and if there are no inline errors in case of multiple inclusion from different files.

Requirements:

  • g++ compiler.

Arguments:

  • $1: the input .h/.hpp file to be tested for include. Use complete path in string format.

Description: script used to optimize benchmark result precision. To use it open the script and add your benchmark command in the respective line, doesn't matter which command you prefer, it is not relevant. The script allows to set scaling governor to "precision", to disable Turboboost, to drop file cache and to disable address space randomization. All these operations will improve the precision of the result. At the end all the settings will be restored.

Arguments:

  • $1: the number of benchmarking iterations.

CMake

Description: script used to install Qt. Default is Qt6 but the version can be changed from the script.

Stargazers over time

Stargazers over time