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
| # dots_mps_parse.py | |
| # macOS/M1-friendly runner for dots.ocr (local, offline, SDPA on MPS) | |
| # - Uses repo's built-in prompts via --prompt-mode (JSON-ready) | |
| # - Harmless flash_attn shim (with valid __spec__) to avoid import crashes | |
| # - Forces SDPA attention (not Flash-Attn) | |
| # - Disables Sliding-Window Attention for SDPA/Qwen2 | |
| # - Avoids BF16 by forcing FP16 everywhere and monkey-patching the vision tower | |
| # - Processes PDFs page-by-page with pixel caps to avoid OOM on 16 GB | |
| # - Parses JSON output flexibly (array OR object) and can drop headers/footers |
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
| // All domains need to know is container name and object names | |
| // The domain which creates the container needs to know the groupid | |
| // CONTAINER OPERATIONS | |
| // Creates a new container shared with groupid | |
| // Returns a container ID (>=0) if no error occurs. | |
| // Returns error (<0) if resource allocation fails or if container already exists | |
| int container_create(char *name, int groupid) |
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
| #!/bin/bash | |
| # Description: Remove host from denyhosts files | |
| # This script can be run from any directory | |
| # It requires to be run as root | |
| # | |
| # Pablo Llopis 2011 | |
| CONFIG='/etc/denyhosts.conf' | |
| if [ $# -ne 1 ]; |
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
| #!/bin/bash | |
| function ifloop { | |
| # If it is NOT a file in /dev, assume file loopback mount | |
| if [[ ! $1 =~ /dev/* ]] | |
| then | |
| echo "-o loop" | |
| fi | |
| } |