This file contains 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
/** | |
* Creates a function that performs any promisable task in parallel. | |
* @param {number} [concurrency] - The maximum number of concurrent jobs that are able to run simultaneously. | |
* @return {Promise} | |
*/ | |
const createJobRunner = (concurrency = 3) => { | |
const EMPTY_SLOT = false; | |
const BUSY_SLOT = true; |
This file contains 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
#!/bin/bash | |
MAX_THRESHOLD=${MAX_THRESHOLD:-4} | |
MIN_THRESHOLD=${MIN_THRESHOLD:-2} | |
TELEGRAM_API="https://api.telegram.org/bot$BOT_API_TOKEN" | |
monit=`cat /proc/loadavg` | |
load=`echo $monit | cut -d' ' -f1` | |
pid=`echo $monit | cut -d' ' -f5` | |
pinfo=`ps -p $pid u` |
This file contains 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 requests | |
from requests_html import HTMLSession | |
import json | |
import datetime | |
session = HTMLSession() | |
now = datetime.datetime.now() | |
def getMoreInfo(id): | |
url = 'https://freefit.co.il/CLUBS/?CLUB=%d&SUBCLUBCATEGORY=-1' % id |