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 ipaddress | |
import platform | |
import re | |
import subprocess | |
def get_netmask(ipv4_address): | |
"""Gets the computer's current netmask for a given IP. | |
Returns: | |
str: The computer's current netmask. |
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 typing import Optional, Callable, List, Dict, Any, Union, Type | |
from nicegui import ui | |
from nicegui.elements.mixins.value_element import ValueElement | |
from pydantic import BaseModel | |
TYPE_TO_INPUT_UI_MAP = { | |
int: ui.number, | |
bool: ui.switch, | |
str: ui.input, |
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
#!/usr/bin/env python3 | |
import multiprocessing | |
import tempfile | |
from fastapi import FastAPI | |
from uvicorn import Config, Server | |
import webview | |
from nicegui import ui |