| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #!/bin/sh
- # If the blockages have not already been evaluted, do that now
- if [ ! -f data/blocked_loesing ]; then
- echo "Running python code to evaluate blockages..."
- ./scripts/evaluate-blockages.py
- fi
- # Do the actual math in python
- if [ ! -f output ]; then
- echo "Running python code to compute stats..."
- ./scripts/get-stats.py > output
- fi
- echo "Tables:"
- head -74 output
- echo -n "Number of bridges that received more than 0 connections: "
- grep '^Single: ' output | grep 'max=' | wc -l
- echo -n "Number of bridges that received more than 8 connections: "
- grep '^Single: ' output | grep 'max=' | grep -v 'max=8' | wc -l
- echo -n "Number of bridges that received more than 16 connections: "
- grep '^Single: ' output | grep 'max=' | grep -v 'max=8' | grep -v 'max=16' | wc -l
- echo -n "Number of bridges that received more than 24 connections: "
- grep '^Single: ' output | grep 'max=' | grep -v 'max=8' | grep -v 'max=16' | grep -v 'max=24' | wc -l
- echo ""
- echo -n "Number of bridges with connection count mean more than 1 stddev away from 0: "
- grep "^Single: Zero is " output | grep -v "^Single: Zero is 0." | wc -l
- echo -n "Max number of stddevs from 0: "
- grep "^Single: Zero is " output | grep -v "^Single: Zero is 0." | grep -Po '(?<=^Single: Zero is )(.*?)(?= standard deviations away from the mean)' | sort -r | head -1
- echo ""
- echo -n "Number of pairs of bridges that received more than 8 connections: "
- grep '^Double: ' output | grep 'max=' | grep -v 'max=8' | wc -l
- echo -n "Number of pairs of bridges that received more than 16 connections: "
- grep '^Double: ' output | grep 'max=' | grep -v 'max=8' | grep -v 'max=16' | wc -l
- echo -n "Number of pairs of bridges that received more than 24 connections: "
- grep '^Double: ' output | grep 'max=' | grep -v 'max=8' | grep -v 'max=16' | grep -v 'max=24' | wc -l
- echo -n "Number of pairs of bridges that received more than 32 connections: "
- grep '^Double: ' output | grep 'max=' | grep -v 'max=8' | grep -v 'max=16' | grep -v 'max=24' | grep -v 'max=32' | wc -l
- echo ""
- echo -n "Number of pairs of bridges with connection count mean more than 1 stddev away from 0: "
- grep "^Double: Zero is " output | grep -v "^Double: Zero is 0." | wc -l
- echo -n "Max number of stddevs from 0: "
- grep "^Double: Zero is " output | grep -v "^Double: Zero is 0." | grep -Po '(?<=^Double: Zero is )(.*?)(?= standard deviations away from the mean)' | sort -r | head -1
- echo ""
- ./scripts/get-stats-non-obfs4-email.py
|