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
| # Tailwind CSS LLMs.txt Documentation | |
| > This document provides a comprehensive overview of Tailwind CSS utility classes, examples, and customization options. It covers various CSS properties like layout, spacing, typography, backgrounds, borders, effects, transitions, transforms, and more, explaining how to use Tailwind's utility classes to style web elements effectively and responsively. | |
| This document details the documentation of Tailwind CSS utilities. It explains how Tailwind scans source files for classes, the importance of using complete class names, and how utility classes can be applied conditionally using variants for states (hover, focus), responsive breakpoints, dark mode, and other conditions. It also covers customization via theme variables and adding custom styles. | |
| **Core Concepts (from styling-with-utility-classes.mdx & responsive-design.mdx):** | |
| * **Utility-First:** Style elements by combining many single-purpose utility classes directly in HTML. | |
| * **Constraint-Based:** Utilities general |
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 pytest | |
| import moto | |
| from mock import mock, patch | |
| from moto import mock_lambda | |
| @pytest.fixture(scope='function') | |
| def aws_credentials(): | |
| """Mocked AWS Credentials for moto.""" |
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 ast | |
| import logging | |
| import inspect | |
| from typing import Type, TypeVar | |
| from dspy import Assert, Module, ChainOfThought, Signature, InputField, OutputField | |
| from pydantic import BaseModel, ValidationError | |
| logger = logging.getLogger(__name__) | |
| logger.setLevel(logging.ERROR) |
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, is_dataclass, asdict as dataclass_as_dict, fields as dataclass_fields | |
| def dataclass_from_dict(cls, src): | |
| kwargs = {} | |
| fields_lookup = {field.name: field for field in dataclass_fields(cls)} | |
| for field_name, value in src.items(): | |
| field = fields_lookup.get(field_name) | |
| if not field: | |
| #logger.warning('config field %s not found for class %s', field_name, cls.__name__) | |
| continue |
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 | |
| # See https://gist.github.com/teasherm/bb73f21ed2f3b46bc1c2ca48ec2c1cf5 | |
| import argparse | |
| import os | |
| import boto3 | |
| class S3MultipartUpload(object): | |
| # AWS throws EntityTooSmall error for parts smaller than 5 MB |
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 bash | |
| while [ $# -gt 0 ]; do | |
| echo "$1" | |
| readarray -d, projinfo < <(bs project list --format csv | tail -n +2 | awk -F, -v reg="$1" '($0 ~ reg) {print $0}') | |
| proj_dir="${projinfo[0]::-1}" | |
| mkdir "$proj_dir" | |
| cd "$proj_dir" | |
| bs download project --id "${projinfo[1]::-1}" | |
| mv ./*/*.fastq.gz . | |
| rmdir ./*/ |
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 | |
| # @credit: @gist.github.com/motebaya | |
| # @modify: 2023-08-21 10:48:13.274582300 +0700 | |
| # @gist: simple async multi threading python for download batch file | |
| # @docs: | |
| # https://rich.readthedocs.io/en/latest/progress.html | |
| # https://github.com/Textualize/rich/discussions/1102 | |
| # https://testfiledownload.com/ | |
| # https://stackoverflow.com/questions/64282309/aiohttp-download-large-list-of-pdf-files |
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 base64 | |
| import boto3 | |
| from botocore.exceptions import ClientError | |
| import logging | |
| AWS_REGION = 'us-east-1' | |
| kms_client = boto3.client("kms", region_name=AWS_REGION) | |
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 Callable, Iterable, Dict, List | |
| from concurrent.futures import ThreadPoolExecutor | |
| from tqdm import tqdm | |
| def thread_progress( | |
| worker: Callable, | |
| items: Iterable, | |
| threads: int = None, | |
| result_handler: Callable = None, | |
| worker_kwargs: Dict = None, |
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
| """Patch to use callbacks with Streamlit custom components. | |
| Usage | |
| ----- | |
| >>> import streamlit.components.v1 as components | |
| >>> from components_callbacks import register_callback | |
| >>> | |
| >>> print("Script begins...") | |
| >>> |
NewerOlder