Note:- with this you don't need to type password every time to do the ssh connection.
ssh-keygen -t rsa
# https://github.com/linghu8812/blur_detector/blob/master/blur_detector.py | |
import cv2 | |
import numpy as np | |
class BlurDetector(object): | |
def __init__(self): | |
"""Initialize a DCT based blur detector""" |
# make sure terminal window is active when pressing any key | |
import cv2 | |
import numpy as np | |
import time | |
from waitKey import waitKey | |
frame = np.zeros((300, 300, 3)) | |
idx, st = 0, time.time() | |
while True: |
import os | |
import cv2 | |
import hashlib | |
import numpy as np | |
import scipy.fftpack | |
class HashEngine: | |
def __init__(self, htype="dhash", hash_size=8): | |
self.hash_size = hash_size | |
self.htype = htype |
# use multiple gpu devices by index | |
import os | |
#GPU_id = '0' | |
GPU_id = '0,1,2,3' | |
os.environ['CUDA_VISIBLE_DEVICES'] = GPU_id |
import threading | |
class Thread(threading.Thread): | |
def __init__(self, group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None): | |
threading.Thread.__init__(self, group, target, name, args, kwargs, daemon=daemon) | |
self._return = None | |
def run(self): | |
if self._target is not None: | |
self._return = self._target(*self._args, **self._kwargs) |
Scan network for open ports and list their IP address
nmap -p 80 192.168.0.179/24 | grep -B 4 -i open | grep -i report
#https://vitux.com/install-nfs-server-and-client-on-ubuntu/ | |
#Step 1: Install NFS Common | |
sudo apt-get update -y | |
sudo apt-get install nfs-common -y | |
#Step 2: Create a mount point for the NFS host’s shared folder | |
#Your client’s system needs a directory where all the content shared by the host server in the export folder can be accessed. | |
#You can create this folder anywhere on your system. We are creating a mount folder in the mnt directory of our client’s machine. | |
CLIENT_NFS_DIR="/media/NFS" |
# Check if sudo permission is available, else exit | |
if [ `id -u` != "0" ] | |
then | |
echo '[ERROR] please run with sudo' | |
exit | |
fi | |
# Retrieve new hostname from args | |
if [ -z "$1" ] | |
then |
#!/bin/bash | |
mount_safely (){ | |
PARTITION=$1; MOUNTPOINT=$2 | |
if [ `whoami` == root ];then | |
# create mount point dir if doesn't exists | |
[ -d $MOUNTPOINT ] || mkdir -p $MOUNTPOINT | |
# mount the partition to mountpoint | |
mount $PARTITION $MOUNTPOINT |