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/sh | |
# This script runs $N pings against various Vultr hosts in specific locations. | |
N=5 | |
ping_cleaned () { | |
ping -q -c $N $1 | grep 'ping statistics' --color=never -A 2 || break | |
echo "" | |
} |
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
class GGHKeyPair: | |
def __init__(self, n=2, d=128, high_ratio_req=0.8, low_ratio_req=0.3): | |
self.generate(n, d, high_ratio_req, low_ratio_req) | |
self.n = n | |
# set_keypair can be used to set specific matrices for the public | |
# and private GGH keys. | |
def set_keypair(self, priv, pub): | |
self.public_key = pub |
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 java.io.*; | |
public class CE { | |
public static void readOutput(Process proc) throws IOException { | |
System.out.println("--- read output:"); | |
InputStream is = proc.getInputStream(); | |
InputStreamReader isr = new InputStreamReader(is); | |
BufferedReader br = new BufferedReader(isr); |