For now we can skip checking with ty unless they add full pydantic support: astral-sh/ty#2403 Thus if you have ty installed and enabled then we need to change to Pylance:
code --list-extensions | grep -iE 'ty|pylance|python|mypy|pyright'For now we can skip checking with ty unless they add full pydantic support: astral-sh/ty#2403 Thus if you have ty installed and enabled then we need to change to Pylance:
code --list-extensions | grep -iE 'ty|pylance|python|mypy|pyright'| #!/usr/bin/python3 | |
| import sys | |
| from datetime import datetime, timezone | |
| import argparse | |
| def main(args): | |
| time = datetime.now(timezone.utc).replace(tzinfo=None) | |
| print(time.isoformat(timespec="milliseconds") + "Z") | |
| print(time.timestamp()) |
| FROM python:3.12-alpine | |
| EXPOSE 8123 | |
| WORKDIR /app | |
| RUN <<EOF cat >> /app/http_time_server.py | |
| import http.server | |
| import socketserver | |
| import time |
| FROM ubuntu:22.04 as builder | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ca-certificates wget xz-utils build-essential cmake \ | |
| libglib2.0-dev libgcrypt20-dev flex \ | |
| yacc bison byacc libpcap-dev libssh-dev \ | |
| libsystemd-dev libc-ares-dev libspeexdsp-dev |
| #!/usr/bin/python3 | |
| """ | |
| Examples: | |
| ------------------------------------------------------ | |
| echo "1742546018015123" | ctte.py --reverse --us | |
| 2025-03-21T08:33:38.015Z | |
| 2025-03-21T08:33:38.015123Z |
| #!/usr/bin/zsh | |
| RED=$(echo -e "\e[31m") | |
| RESET=$(echo -e "\e[39m") | |
| while read line; do | |
| echo "$RED$line$RESET" | |
| done | |
| ### https://wiki.qt.io/Install_Qt_5_on_Ubuntu#Installation_Guide_.28Qt_download_page.29 | |
| ## if you need to install dependencies uncomment below lines | |
| # sudo apt-get install build-essential | |
| # sudo apt-get install libfontconfig1 | |
| # sudo apt-get install mesa-common-dev | |
| # sudo apt-get install libglu1-mesa-dev -y | |
| wget https://download.qt.io/new_archive/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run |
| # taken from https://github.com/tiangolo/fastapi/issues/617#issuecomment-840626819 | |
| from dataclasses import dataclass | |
| from functools import partial | |
| from typing import Optional | |
| from fastapi import FastAPI | |
| from pydantic import BaseSettings | |
| #!/bin/bash | |
| set -e | |
| INSTALL_DIR="/usr/local" | |
| TARGET_VERSION=${1} | |
| default_info () { | |
| echo "The following cuda installations have been found (in '${INSTALL_DIR}'):" | |
| available_cudas=$(ls -a "${INSTALL_DIR}" | grep "cuda-" | sed 's/cuda-//') |