This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64
- Install Xcode from App Store or install Command Line Tools on your Mac running on Apple Silicon.
This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64
from datetime import datetime | |
import os | |
import docker | |
import dateparser | |
STARTING_TIME = str(datetime.now()).split(" ")[0]+ "T" + str(datetime.now()).split(" ")[1] + "Z" | |
if os.environ.get('LIMIT_HOURS') is None: | |
LIMIT_HOURS = 2.0 | |
else: |
#!/bin/bash | |
i=0 | |
while read line | |
do | |
array[ $i ]="$line" | |
(( i++ )) | |
done < <(ls) | |
# Creates the base overlay.mkv file |
#!/bin/bash | |
function new_password () { | |
if [ ! -z $1 ]; then | |
length=$1 | |
else | |
length=20 | |
fi | |
curl -s "https://www.random.org/passwords/?num=1&len=$length&format=plain&rnd=new" | pbcopy | |
} |
#!/bin/bash | |
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users $1 -privs -all -restart -agent -menu |
For RKE v0.1.x and Rancher v2.0.x/v2.1.x, see https://gist.github.com/superseb/3d8de6092ebc4b1581185197583f472a
This needs to be run on a node with the controlplane role, as it rewrites the server endpoint to https://127.0.0.1:6443
, you can of course manually change this if necessary.
Applicable for:
from plexapi.myplex import MyPlexAccount | |
import os | |
plex_auth_info = { | |
"username" : os.environ['PLEX_USERNAME'], | |
"password" : os.environ['PLEX_PASSWORD'], | |
"server" : os.environ['PLEX_SERVER_NAME'] | |
} | |
account = MyPlexAccount(plex_auth_info['username'], plex_auth_info['password']) |
## Applies the modified manifest to K3s, which automatically applies the contents of /var/lib/rancher/k3s/server/manifests | |
curl -s https://docs.projectcalico.org/manifests/canal.yaml | sed -e 's| # - name: CALICO_IPV4POOL_CIDR| - name: CALICO_IPV4POOL_CIDR|g' -e "s| # value: \"192.168.0.0/16\"| value: \"$(kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}')\"|g" | \ | |
tee -a /var/lib/rancher/k3s/server/manifests/canal.yaml |
nashpy
is a Python library for computing equilibria in game theory. It provides tools for computing Nash equilibria, correlated equilibria, and other solution concepts in both cooperative and non-cooperative games.
This quickstart document will cover the basics of using nashpy to solve simple two-player games.
To install nashpy, you can use pip:
#include <stdio.h> | |
// The payoffs for each player in the game | |
int player1_payoff[2][2] = {{3, 0}, {5, 1}}; | |
int player2_payoff[2][2] = {{3, 5}, {0, 1}}; | |
// Function to calculate the Nash equilibrium | |
void calculate_nash_equilibrium() { | |
int row, col; | |
// Find the maximum payoff for player 1 in each row |