Skip to content

Instantly share code, notes, and snippets.

View kobus-v-schoor's full-sized avatar

Kobus van Schoor kobus-v-schoor

View GitHub Profile
@kobus-v-schoor
kobus-v-schoor / viz.py
Last active July 12, 2020 18:42
Entelect Challenge 2020 Visualizer
#! /usr/bin/env python3
import os
import sys
import enum
import json
import time
## settings ##
#! /usr/bin/env python3
import requests
import subprocess
import time
from datetime import datetime, timedelta
# put your AppServiceAuthSession cookie in a file named cookie
with open('cookie', 'r') as f:
cookies = {'AppServiceAuthSession': f.read().strip()}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#! /bin/bash
# get icc cpu usage
cpu=$(ps -C ICC -o %cpu | tail -n 1 | sed 's/\..*//g')
# compare with threshold
THRESHOLD=50
if [[ $cpu -gt $THRESHOLD ]]; then
# kill ICC
import argparse
import socket
import socketserver
import json
import logging
from ipaddress import ip_address, IPv4Network
# parse command-line arguments