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/sh | |
domain="MY_DOMAIN_NAME" | |
email="CLOUDFLARE_EMAIL" | |
global_api_key="GLOBAL_API_KEY" | |
zone_id="ZONE_ID_FOR_DOMAIN" | |
ip_file="/var/log/dyndns.log" | |
ipOld=$(cat $ip_file) | |
ipNow=$(curl ifconfig.co/) |
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
# Cloned from bcm94345wlpagb_p2xx.txt | |
NVRAMRev=$Rev: 498373 $ | |
sromrev=11 | |
vendid=0x14e4 | |
devid=0x43ab | |
manfid=0x2d0 | |
prodid=0x06e4 | |
#macaddr=00:90:4c:c5:12:38 | |
macaddr=b8:27:eb:74:f2:6c | |
nocrc=1 |
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
y_true = le.inverse_transform(y_valid) | |
y_pred = le.inverse_transform(y_valid_pred_lr) | |
from sklearn.metrics import confusion_matrix | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
%matplotlib inline | |
data = confusion_matrix(y_true, y_pred) |
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
contractions = { | |
"ain't": "am not", | |
"aren't": "are not", | |
"can't": "cannot", | |
"can't've": "cannot have", | |
"'cause": "because", | |
"could've": "could have", | |
"couldn't": "could not", | |
"couldn't've": "could not have", | |
"didn't": "did not", |
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
metrics_names = ['loss', 'accuracy', 'top10_accuracy'] | |
plt.figure(figsize=(14,4)) | |
sns.set_style('whitegrid') | |
for i in range(len(metrics_names)): | |
ax = plt.subplot(1, len(metrics_names), i+1) | |
ax.plot(history.history[metrics_names[i]], label="train") | |
ax.plot(history.history['val_'+ metrics_names[i]], label="valid") | |
ax.title.set_text(metrics_names[i]) | |
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 requests import get | |
from io import BytesIO | |
from zipfile import ZipFile | |
import os | |
from pathlib import Path | |
destination = "testproject" | |
file_url = 'https://github.com/vikramsoni2/aihubcli/archive/refs/heads/main.zip' |
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 logging | |
from bisect import bisect | |
from logging import getLogger, Formatter, LogRecord, StreamHandler | |
from typing import Dict | |
class LevelFormatter(Formatter): | |
def __init__(self, formats: Dict[int, str], **kwargs): | |
super().__init__() |
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
def top_10_accuracy(preds, train_data, is_higher_better=True): | |
y_preds = np.asarray(preds).reshape(-1, len(np.unique(y))) | |
y_true = train_data.get_label() | |
score = top_k_accuracy_score(y_true, y_preds, k=10) | |
return ('top_10_accuracy', score, True) |
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 numpy as np | |
import pandas as pd | |
from matplotlib.path import Path | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
import seaborn as sns | |
from typing import Union, List, Tuple | |
def parallel_coordinates(df: pd.DataFrame, |