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 numpy as np | |
from matplotlib import pyplot as plt | |
from scipy.optimize import LinearConstraint, minimize | |
np.random.seed(3737) | |
LO, HI = 0, 100 | |
n = 100 # Number of points | |
k = 73 # Points to remove |
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
using System; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Threading.Tasks; | |
// based on https://gist.github.com/AlexMAS/276eed492bc989e13dcce7c78b9e179d | |
public static class ProcessAsyncHelper | |
{ | |
public static async Task<ProcessResult> RunProcessAsync(string command, string arguments, int timeout) | |
{ |
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
using System; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Threading.Tasks; | |
public static class ProcessAsyncHelper | |
{ | |
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout) | |
{ | |
var result = new ProcessResult(); |
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
# Run meny MediaWiki Jobs | |
while [ `php showJobs.php` != 0 ]; | |
do | |
echo -n "Starting over; `php showJobs.php` jobs left to run; running 10 jobs in 2 cycles." | |
php runJobs.php --maxjobs 10 --procs 5 --quiet | |
LOAD="`uptime |awk '{ print $10 }' |sed 's/,//g'`" | |
if [ $LOAD > 1.9 ]; then | |
WAIT=`echo "sqrt(2 * $LOAD * 50)" |bc` | |
echo " - Sleeping for $WAIT secs" | |
sleep $WAIT |