Skip to content

Instantly share code, notes, and snippets.

View petersg83's full-sized avatar
🙂

Pierre Noël petersg83

🙂
View GitHub Profile
const MULTIPLIERS = [1, 2, 1, 2, 1, 2, 1, 2, 1];
const isValid = (sin) => {
if (typeof sin !== 'string' || sin.length !== 9) {
return false;
}
splitedSin = sin.split('').map(Number);
const digits = splitedSin.reduce((allDigits, val, index) => {
const result = String(val * MULTIPLIERS[index]).split('');
for f in `ls *.py`
do
echo "---> $f"
python3 $f > /dev/null &
sleep 1
program=`ps -ef | grep "ython $f" | awk '{print $2}'`
pid=(${program})
pid=${pid[0]}
if (($pid > 0))