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 stat | |
from fastapi.responses import FileResponse | |
from starlette.types import Receive, Scope, Send | |
class FileResponseSynchronous(FileResponse): | |
""" | |
This works around an issue building with `Nuitka-commercial` and embedding files |
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 tempfile | |
import json | |
from pathlib import Path | |
from typing import Any, Dict, Type | |
import datamodel_code_generator | |
from pydantic import BaseModel | |
def json_schema_to_pydantic_model(json_schema: Dict[str, Any]) -> Type[BaseModel]: |
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
# Copyright (c) 2024 JKI. All rights reserved. | |
# Licensed under the MIT License. | |
### About ### | |
# This a powershell script to modify a .nipkg file such that the packaged LabVIEW executable application shows in the Windows Add or Remove Programs list | |
# See NIPM docs on this feature here: | |
# https://www.ni.com/docs/en-US/bundle/package-manager/page/instructions-xml-file-packages.html#GUID-4607C6C4-C7F0-4544-93CD-F098A4271D43__GUID-18C9D8AE-B61B-41B2-8D54-4B604F34D18D | |
### How this Script Works ### |
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 io | |
import base64 | |
from typing import Union | |
from PIL import Image # requires `pillow` package | |
from fastui.components import Iframe | |
def iframe_from_html_raw( | |
raw_html: str, |
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 configparser | |
class ConfigParserLabVIEW(configparser.ConfigParser): | |
""" | |
A ConfigParser that handles LabVIEW-generated config files with fewer errors than the default configparser: | |
- disables the interpolation feature | |
- disables the strict validation feature | |
- removes double-quotes from around values | |
""" |
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
JKI CONTRIBUTION LICENSE AGREEMENT | |
Thank you for your contribution to JKI software project(s). In order to clarify the intellectual property rights in the project(s), and to grant licenses to the project(s) to others, James Kring, Inc. (“JKI”) requires that you accept this Contributor License Agreement (“Agreement”). This license is for your protection as a Contributor as well as the protection of JKI, its users, and its licensees; you may still license your own Contributions under other terms. | |
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to JKI. Except for the license granted herein to JKI and recipients of software distributed by JKI, You reserve all right, title, and interest in and to Your Contributions and retain the right to license and distribute them separately under the terms of your choice. | |
1. Definitions. “You” (or “Your”) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreemen |