Skip to content

Instantly share code, notes, and snippets.

View andreamad8's full-sized avatar

Andrea Madotto andreamad8

View GitHub Profile
@lucarin91
lucarin91 / sync.sh
Last active December 20, 2022 14:09
Synchronize a local folder with a remote server in a bidirectional way.
#!/bin/sh
set -e
### Configuration ###
SERVER=luca@example.com
REMOTE_FOLDER=my_folder
REMOTE_RESULTS=results
EXCLUDE_FILES="--exclude=.*\
--exclude=build/"
@lucarin91
lucarin91 / tsend
Last active November 3, 2018 16:50
Send a telegram message when something happens on a remote server
#!/bin/sh
###
# Send message to your telegram chat when something happens to a remote server.
# Before use the sript update the TOKEN and CHAT_ID variable with your data.
#
# Usage:
# tsend 'ALL DONE!'
# cat myfile.txt | tsend
#
# license: MIT
@Antrikshy
Antrikshy / data_split.py
Last active May 17, 2022 09:07
Simple, configurable Python script to split a single-file dataset into training, testing and validation sets
import random
import math
# Configure paths to your dataset files here
DATASET_FILE = 'data.csv'
FILE_TRAIN = 'train.csv'
FILE_VALID = 'validation.csv'
FILE_TESTS = 'test.csv'
# Set to true if you want to copy first line from main