Descripción | Comando |
---|---|
Bajar imagen de Ubuntu | docker pull ubuntu:18.04 |
Listar imágenes descargadas | docker images |
Arrancar un contenedor vía IMAGE ID o TAG |
docker run -it IMAGE_ID bash |
Arrancar un contenedor vía TAG |
docker run -it ubuntu:18.04 bash |
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 |
Enlace al foro donde se explica
Cuando clonas un repo, tiene que contener el siguiente archivo.
Makefile
PKGBUILD
...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
(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]], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |