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
DESCRIPTION OF SUSPECT #1 – Unknown male, 20s, heavy build, black hair, brown complexion, wearing a black shirt and blue jeans | |
DESCRIPTION OF SUSPECT #2 – Unknown female, 20s, medium build, black hair, tan complexion, tattoo down center of back, wearing a blue skirt and white halter top | |
DESCRIPTION OF SUSPECT #3 – Unknown male, 20s, heavy build, black hair, brown complexion, wearing a white shirt and white pants. | |
DESCRIPTION OF SUSPECT #4 – Unknown mixed Asian female, 40s, with straight black hair, wearing a black with a green print dress, long black sweater, and glasses on head. |
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
# https://github.com/pytorch/pytorch/issues/31285 | |
pip3 install torch torchvision torchaudio --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu116 |
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 requests | |
import json | |
# Define your Azure app registration details | |
client_id = 'your_client_id' | |
client_secret = 'your_client_secret' | |
tenant_id = 'your_tenant_id' | |
authority = f"https://login.microsoftonline.com/{tenant_id}" | |
scope = ["https://graph.microsoft.com/.default"] | |
graph_url = 'https://graph.microsoft.com/v1.0/' |
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 dataclasses import dataclass, field, asdict | |
from enum import Enum, auto | |
class Scale(Enum): | |
NONE = 0 | |
LOW = 25 | |
MEDIUM = 50 | |
HIGH = 75 | |
MAX = 100 |
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 dataclasses import dataclass, field, fields, replace, asdict | |
_MISSING = object() | |
@dataclass | |
class Component(object): | |
""" | |
Collection of attributes. | |
""" | |
_key: str = field(default=None, hash=False, repr=False, compare=False) |
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 cherrypy | |
import sqlalchemy | |
from sqlalchemy import Table, Column, ForeignKey, MetaData, Integer, String | |
from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relationship | |
from sqlalchemy.orm.properties import ColumnProperty | |
from sqlalchemy.orm.util import object_mapper | |
# The base class from which all entities will extend | |
class BaseEntity(object): | |
def __repr__(self): |
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
{ | |
"graph": [], | |
"links": [ | |
{"source": 0, "target": 1}, | |
{"source": 0, "target": 2}, | |
{"source": 0, "target": 3}, | |
{"source": 0, "target": 4}, | |
{"source": 0, "target": 5}, | |
{"source": 0, "target": 6}, | |
{"source": 1, "target": 3}, |
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 sqlalchemy import Column, Integer, String, ForeignKey, create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import relationship, backref, sessionmaker, joinedload | |
# For this example we will use an in-memory sqlite DB. | |
# Let's also configure it to echo everything it does to the screen. | |
engine = create_engine('sqlite:///:memory:', echo=True) | |
# The base class which our objects will be defined on. | |
Base = declarative_base() |
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
{"Dataset name": "Alerts", "Possible values": [], "Model": "Alerts", "Expected values": [], "Data type": "string", "Description": "The application involved in the event, such as win:app:trendmicro, vmware, nagios.", "Field name": "app"} | |
{"Dataset name": "Alerts", "Possible values": [], "Model": "Alerts", "Expected values": [], "Data type": "string", "Description": "The body of a message.", "Field name": "body"} | |
{"Dataset name": "Alerts", "Possible values": [], "Model": "Alerts", "Expected values": [], "Data type": "string", "Description": "The destination of the alert message, such as an email address or SNMP trap. You can alias this from more specific fields, such as dest_host, dest_ip, or dest_name.", "Field name": "dest"} | |
{"Dataset name": "Alerts", "Possible values": [], "Model": "Alerts", "Expected values": [], "Data type": "string", "Description": "The business unit associated with the destination. This field is automatically provided by asset and identity correlation features of applications like ClownS |
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 django.test import TestCase | |
from pandas import DataFrame | |
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer | |
from sklearn.naive_bayes import MultinomialNB | |
from sklearn.pipeline import Pipeline | |
import numpy | |
import os |
NewerOlder