Skip to content

Instantly share code, notes, and snippets.

@Burhan-Q
Burhan-Q / default.md
Created July 10, 2025 15:12 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@Burhan-Q
Burhan-Q / ds_norm.py
Created February 15, 2025 21:29
Normalize images using values from entire dataset
from pathlib import Path
import torch
import torchvision
import yaml
from torchvision.transforms.v2 import Normalize
from torchvision.io import decode_image # >= torchvision 0.20
from torchvision.io import read_image # < torchvision 0.20
from ultralytics import YOLO
from typing import Any, Dict, Iterable
def dict_flatten(d: Dict[str, Any]) -> Dict[str, Any]:
"""Flattens nested dictionaries (but none in lists or tuples)."""
res = {}
for k, v in d.items():
if isinstance(v, dict):
res.update(dict_flatten(v))
else:
@Burhan-Q
Burhan-Q / coverage.xml
Created October 9, 2024 15:24
Local run Ultralytics coverage report for PR https://github.com/ultralytics/ultralytics/pull/16442
<!-- Local run Ultralytics coverage report for PR https://github.com/ultralytics/ultralytics/pull/16442 -->
<?xml version="1.0" ?>
<coverage version="7.3.2" timestamp="1728481946686" lines-valid="17125" lines-covered="4468" line-rate="0.2609" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.3.2 -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
<source>ultralytics</source>
</sources>
<packages>
<package name="." line-rate="0.5556" branch-rate="0" complexity="0">
@Burhan-Q
Burhan-Q / equal_img_crops.py
Created December 1, 2023 14:54
Small collection of functions for cropping images into equally sized crops with options to slice only vertically or horizontally
'''
Author: Burhan Qaddoumi
Date: 2023-12-01
Requires: numpy, cv2
Please provide attribution.
'''
from pathlib import Path
import numpy as np
@Burhan-Q
Burhan-Q / fast_bbox.py
Created December 1, 2023 01:23
Even faster function for very fast annotation drawing on images for Ultralytics results
import torch
import cv2 as cv
import numpy as np
from torchvision.utils import draw_bounding_boxes
from ultralytics import YOLO
from ultralytics.utils.ops import Profile
from ultralytics.engine.results import Results
def fast_bbox(result:Results, l_width:int=3, np_out:bool=False):
@Burhan-Q
Burhan-Q / fast_yolov8_bboxes.py
Created December 1, 2023 01:07
Function for quicker bounding box image annotations using Ultralytics
from pathlib import Path
import torch
from torchvision.utils import draw_bounding_boxes
from ultralytics.utils import USER_CONFIG_DIR
from ultralytics.utils.plotting import colors
from ultralytics.engine.results import Results
from ultralytics.utils.checks import check_font, is_ascii