Using filter-repo
pip install -U git-filter-repo
# Move n files from one directory to another. | |
# Useful for separating datasets in train/val | |
# that do not have code implemented in the training itself. | |
#!/bin/bash | |
i=0 | |
j=$(stat source_folder/* --printf "%i\n" | wc -l ) | |
NUM_FILES=314 |
""" | |
Source: https://unix.stackexchange.com/questions/528490/python-removing-jpg-files-without-matching-txt-files | |
Remove from the image folder any image that is not in the labels folder. | |
It is recommended to make a previous raw folder for security. In the opposite | |
case (more labels than images) rename the necessary directories and variables. | |
. | |
├── images | |
│ ├── 1.jpg | |
│ ├── 2.jpg |
import numpy as np | |
import cv2 | |
cap = cv2.VideoCapture('path_to_video.mp4') | |
fourcc = cv2.VideoWriter_fourcc(*'mp4v') | |
name = 'output.mp4' | |
out = cv2.VideoWriter(name, fourcc, 25.0, (1920, 1080)) |
""" | |
(Does not work on python2) | |
Input example: | |
-------------- | |
main_list = | |
[ | |
[[3, 100, 37, 142, 96]], | |
[[3, 246, 37, 290, 97], [3, 101, 37, 143, 96]], | |
[[1, 194, 6, 233, 73], [1, 156, 6, 195, 72], [3, 246, 38, 290, 99], [3, 102, 39, 146, 98], [4, 85, 74, 133, 115], [7, 284, 168, 355, 236]], |
Enlace al foro donde se explica
Cuando clonas un repo, tiene que contener el siguiente archivo.
Makefile
PKGBUILD
...
Descripción | Comando |
---|---|
Eliminar ficheros por fecha (todos los que superen la fecha) | find /opt/backup -type f -mtime +30 -exec rm -f {} \; |
Eliminar ficheros por nombre | find /var/log -name "*.log" -type f -mtime +30 -exec rm -f {} \; |
Calcular y ordenar directorios por tamaño | sudo du -sch [!.]* * |
Detectar máquinas con nmap | nmap -sn 192.168.0.1-254 ó nmap -v -sn 192.168.0.0/24 |