This file contains hidden or 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
from pydantic import BaseModel, root_validator | |
class StrictBaseModel(BaseModel): | |
@root_validator(pre=True) | |
def check_all_fields_are_defined(cls, values): | |
for v in values: | |
if v not in cls.__fields__: | |
raise ValueError(f"{v} is not a field of {cls}") |
This file contains hidden or 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
View: Pods(<namespace>)[number of pods listed] | |
NAME pod name | |
READY number of pods in ready state / number of pods to be in ready state | |
RESTARTS number of times the pod has been restarted so far | |
STATUS state of the pod life cycle, such as Running | ... | Completed | |
CPU current CPU usage, unit is milli-vCPU | |
MEM current main memory usage, unit is MiB | |
%CPU/R current CPU usage as a percentage of what has been requested by the pod | |
%MEM/R current main memory usage as a percentage of what has been requested by the pod |
This file contains hidden or 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 threading | |
from keras.models import Model | |
import keras | |
class ThreadSafeModel: | |
def __init__(self, model: Model): | |
self.model = model | |
self.lock = threading.Lock() |
This file contains hidden or 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 math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import random | |
import scipy.stats as stats | |
die_e = 3.5 # expected value of an ordinary six-sided die | |
die_var = 17.5/6 # variance of an ordinary six-sided die | |
die_sigma = math.sqrt(die_var) |
This file contains hidden or 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 math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import random | |
import scipy.stats as stats | |
die_e = 3.5 # expected value of an ordinary six-sided die | |
die_var = 17.5/6 # variance of an ordinary six-sided die | |
die_sigma = math.sqrt(die_var) |
This file contains hidden or 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 math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import random | |
import scipy.stats as stats | |
die_e = 3.5 # expected value of an ordinary six-sided die | |
die_var = 17.5/6 # variance of an ordinary six-sided die | |
die_sigma = math.sqrt(die_var) |
This file contains hidden or 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/bash | |
# | |
# This bash script downloads the current Fritz Box event log as JSON file and as TXT file. | |
# | |
# The login procedure was implemented according to https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AVM_Technical_Note_-_Session_ID.pdf | |
# | |
# The script was tested successfully on MacOS High Sierra 10.13.6 with Fritz!Box 6490 Cable (kdg) | |
PASSWORD=<replace-with-your-fritz-box-password> |