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
# ## Basic setup | |
import io | |
from pathlib import Path | |
from fastapi import FastAPI, Request | |
import modal | |
from modal import ( | |
App, | |
Image, | |
Mount, |
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
from fastapi import FastAPI, Request | |
from fastapi.responses import HTMLResponse | |
from fastapi import Depends, HTTPException, status, Request | |
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials | |
from modal import Image, App, Secret, asgi_app | |
import modal | |
import os | |
web_app = FastAPI() | |
app = App("auth-test") |
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
MFG | Model | Drive Size (TB) | Drive Count | Avg. Age (months) | Drive Days | Drive Failures | AFR | |
---|---|---|---|---|---|---|---|---|
HGST | HMS5C4040ALE640 | 4 | 3429.00 | 66.92 | 1188017 | 19 | 0.583745855 | |
HGST | HMS5C4040BLE640 | 4 | 12703.00 | 62.37 | 4647157 | 39 | 0.306316313 | |
Seagate | ST4000DM000 | 4 | 18611.00 | 74.37 | 6856981 | 339 | 1.804511344 | |
Toshiba | MD04ABA400V | 4 | 97.00 | 79.32 | 35781 | 2 | 2.040188927 | |
Seagate | ST6000DX000 | 6 | 886.00 | 80.85 | 323390 | 1 | 0.112866817 | |
HGST | HUH728080ALE600 | 8 | 1124.00 | 44.85 | 397463 | 7 | 0.642827131 | |
Seagate | ST8000DM002 | 8 | 9718.00 | 62.63 | 3554465 | 142 | 1.458165997 | |
Seagate | ST8000NM0055 | 8 | 14334.00 | 52.82 | 5253943 | 214 | 1.486692947 | |
Seagate | ST10000NM0086 | 10 | 1192.00 | 50.07 | 436951 | 27 | 2.255401635 |
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 os | |
import sys | |
print("Helloooo") |
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
with self.client.session(self.database, SessionType.DATA) as session: | |
## get various count stats | |
with session.transaction(TransactionType.READ) as read_transaction: | |
query = 'match\ | |
$exref isa external-reference, has source-name "mitre-attack", has external-id like "T[0-9]+";\ | |
$exref has external-id $exid;\ | |
$ap isa attack-pattern, has name $ap_name;\ | |
$in isa intrusion-set, has alias $in_alias;\ | |
$in has name $in_name;\ | |
$rel (referencing: $ap, referenced: $exref) isa external-referencing;\ |
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
from sklearn import datasets | |
import numpy as np | |
import queue | |
from itertools import islice,cycle | |
import matplotlib.pyplot as plt | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.neighbors import DistanceMetric | |
from sklearn.metrics.pairwise import euclidean_distances,manhattan_distances | |
from sklearn.neighbors import NearestNeighbors |
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
version: '3' | |
services: | |
influxdb2: | |
image: quay.io/influxdb/influxdb:v2.0.3 | |
container_name: influxdb2 | |
volumes: | |
# Mount for influxdb data directory and configuration | |
- influxdbv2:/.influxdbv2 | |
ports: | |
- "8086:8086" |