my-scripts

A collection of personal scripts.

https://github.com/justwhit3/my-scripts

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

bash-script cmake python3 scripting
Last synced: 4 months ago · JSON representation ·

Repository

A collection of personal scripts.

Basic Info
  • Host: GitHub
  • Owner: JustWhit3
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 83 KB
Statistics
  • Stars: 107
  • Watchers: 5
  • Forks: 9
  • Open Issues: 0
  • Releases: 9
Topics
bash-script cmake python3 scripting
Created almost 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

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

sizeofdir.py

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.

dirs_remover.py

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".

send_whatsapp.py

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.

system_info.py

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

compute_lines.py

Description: Script used to count lines of code in files with specific extensions (.cpp, .hpp, .py, .sh, or custom extensions) within one or more directories, recursively.

Arguments: - directories: a list of directories to scan. Example: "dir_1 dir_2 dir_n". - -e, --extensions: file extensions to include in the count (optional). If not specified, the default is ['.cpp', '.hpp', '.py', '.sh']. Example: -e .cpp .py.

Bash

debug.sh

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.

update.sh

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

Requirements:

setup_env.sh

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.

:warning: 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.

include_tests.sh

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.

benchmarking.sh

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

Qt installer

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

Stargazers over time

Stargazers over time

Owner

  • Name: Gianluca Bianco
  • Login: JustWhit3
  • Kind: user
  • Location: Bologna, Italy
  • Company: University of Bologna and INFN

PhD student in particle physics at the University of Bologna and member of the CERN ATLAS experiment. Passionate about coding (C++ in particular)

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Gianluca"
  given-names: "Bianco"
title: "my-scripts"
version: 1.4.0
doi: https://zenodo.org/badge/latestdoi/444528109
date-released: 2021-12-25
url: "https://github.com/JustWhit3/my-scripts"

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Dependencies

.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v2 composite
scripts/python/dirs_remover/requirements.txt pypi
  • numpy >=1.22
scripts/python/send_whatsapp/requirements.txt pypi
  • twilio ==7.9.0
scripts/python/size_of_dir/requirements.txt pypi
  • hurry ==1.1
  • hurry.filesize ==0.9
  • termcolor ==1.1.0