repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/cli/imagine.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:10.185878 | """Command-line interface for AI-driven image generation"""
import click
from imaginairy.cli.clickshell_mod import ImagineColorsCommand
from imaginairy.cli.shared import (
_imagine_cmd,
add_options,
common_options,
imaginairy_click_context,
)
@click.command(
context_settings={"max_content_width"... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/cli/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:10.186537 | """CLI for AI-powered image generation"""
import logging
import click
from imaginairy.cli.clickshell_mod import ColorShell, ImagineColorsCommand
from imaginairy.cli.colorize import colorize_cmd
from imaginairy.cli.describe import describe_cmd
from imaginairy.cli.edit import edit_cmd
from imaginairy.cli.edit_demo imp... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/cli/run_api.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:10.679731 | """Code for starting an HTTP API server"""
import logging
import click
logger = logging.getLogger(__name__)
@click.command("run-server")
def run_server_cmd():
"""Run a HTTP API server."""
import uvicorn
from imaginairy.cli.shared import imaginairy_click_context
from imaginairy.http_app.app import ... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/cli/unslow_the_cli.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:11.120935 | """
horrible hack to overcome horrible design choices by easy_install/setuptools
If we don't do this then the scripts will be slow to start up because of
pkg_resources.require() which is called by setuptools to ensure the
"correct" version of the package is installed.
"""
import os
def log(text):
# for debuggin... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/bool_masker.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:11.122299 | # pylama:ignore=W0613
"""
Logic for parsing mask prompts.
Supports
lower case text descriptions
Combinations: AND OR NOT ()
Strength Modifiers: {<operator><number>}
Examples:
fruit
fruit bowl
fruit AND NOT pears
fruit OR bowl
(pears OR oranges OR peaches){*1.5}
fruit{-0.1} OR bowl
"""
import operator... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/clip_masking.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:11.124760 | """Functions for generating and processing image masks"""
from functools import lru_cache
from typing import Optional, Sequence
import cv2
import numpy as np
import PIL.Image
import torch
from torchvision import transforms
from imaginairy.schema import LazyLoadingImage
from imaginairy.utils.img_utils import pillow_f... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/blur_detect.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:11.127296 | """Functions for assessing image blurriness"""
import cv2
from imaginairy.utils.img_utils import pillow_img_to_opencv_img
def calculate_blurriness_level(img):
img = pillow_img_to_opencv_img(img)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
sharpness = cv2.Laplacian(gray, cv2.CV_64F).var()
sharpness... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:11.128160 | """Classes and constants for AI model configuration"""
from dataclasses import dataclass
from typing import Any, List
DEFAULT_MODEL_WEIGHTS = "sd15"
DEFAULT_SOLVER = "ddim"
DEFAULT_UPSCALE_MODEL = "realesrgan-x2-plus"
DEFAULT_NEGATIVE_PROMPT = (
"Ugly, duplication, duplicates, mutilation, deformed, mutilated, mu... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/cli/shared.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:11.232770 | """Context managers and functions for image generation CLI"""
import logging
import math
from contextlib import contextmanager
import click
from imaginairy import config
logger = logging.getLogger(__name__)
@contextmanager
def imaginairy_click_context(log_level="INFO"):
from pydantic import ValidationError
... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/cli/videogen.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.261994 | """Command for generating AI-powered videos"""
import logging
import click
logger = logging.getLogger(__name__)
@click.command()
@click.option(
"--start-image",
default="other/images/sound-music.jpg",
help="Input path for image file.",
)
@click.option("--num-frames", default=None, type=int, help="Numbe... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/cli/upscale.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.375531 | """Command for upscaling images with AI"""
import logging
import os.path
from datetime import datetime, timezone
import click
from imaginairy.config import DEFAULT_UPSCALE_MODEL
logger = logging.getLogger(__name__)
DEFAULT_FORMAT_TEMPLATE = "{original_filename}.upscaled{file_extension}"
@click.argument("image_fi... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/prompt_expansion.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.588891 | """Functions for expanding text prompts with phraselists"""
import gzip
import os.path
import random
import re
from functools import lru_cache
from string import Formatter
from imaginairy.utils.paths import PKG_ROOT
DEFAULT_PROMPT_LIBRARY_PATHS = [
os.path.join(PKG_ROOT, "vendored", "noodle_soup_prompts"),
o... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/upscale.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.641817 | import logging
from typing import TYPE_CHECKING, Union
from imaginairy.config import DEFAULT_UPSCALE_MODEL
from imaginairy.utils import get_device
if TYPE_CHECKING:
from PIL import Image
from imaginairy.schema import LazyLoadingImage
upscale_model_lookup = {
# RealESRGAN
"ultrasharp": "https://hugg... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/facecrop.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.693784 | """Functions for detecting and cropping faces"""
import numpy as np
from imaginairy.enhancers.face_restoration_codeformer import face_restore_helper
from imaginairy.utils.roi_utils import resize_roi_coordinates, square_roi_coordinate
def detect_faces(img):
face_helper = face_restore_helper()
face_helper.cle... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/face_restoration_codeformer.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.753658 | """Code for enhancing facial images"""
import logging
from functools import lru_cache
import numpy as np
import torch
from PIL import Image
from torchvision.transforms.functional import normalize
from imaginairy.utils.downloads import get_cached_url_path
from imaginairy.vendored.basicsr.img_util import img2tensor, t... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/describe_image_clip.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.852715 | """Functions for image-text similarity assessment"""
from functools import lru_cache
from typing import Sequence
import torch
from PIL import Image
from torch import nn
from imaginairy.vendored import clip
device = "cuda" if torch.cuda.is_available() else "cpu"
@lru_cache
def get_model():
model_name = "ViT-L/... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/upscale_riverwing.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:12.918271 | """Classes and functions for image upscaling"""
from functools import lru_cache
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from imaginairy.utils import get_device, platform_appropriate_autocast
from imaginairy.utils.downloads import hf_hub_download
from imaginairy.utils.log_... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/video_interpolation/rife/IFNet_HDv3.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:13.209186 | import torch
import torch.nn as nn
import torch.nn.functional as F
from .warplayer import warp
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
def conv(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dilation=1):
return nn.Sequential(
nn.Conv2d(
in_planes,
... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/video_interpolation/rife/RIFE_HDv3.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:13.240538 | import torch
from .IFNet_HDv3 import IFNet
class Model:
def __init__(self):
self.flownet = IFNet()
self.version = None
def eval(self):
self.flownet.eval()
def load_model(self, path, version: float):
from safetensors import safe_open
tensors = {}
with saf... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/video_interpolation/rife/interpolate.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:13.280604 | import _thread
import logging
import os
import shutil
import time
from functools import lru_cache
from queue import Queue
from typing import List
import cv2
import numpy as np
import torch
from PIL import Image
from torch.nn import functional as F
from tqdm import tqdm
from imaginairy.utils import get_device
from ima... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/video_interpolation/rife/warplayer.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:13.407247 | import torch
from . import msssim
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
backwarp_tenGrid = {}
def warp(tenInput, tenFlow):
k = (str(msssim.device), str(tenFlow.size()))
if k not in backwarp_tenGrid:
tenHorizontal = (
torch.linspace(-1.0, 1.0, tenFlow.shape... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/video_interpolation/rife/msssim.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:13.519593 | from math import exp
import torch
from torch.nn import functional as F
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
def gaussian(window_size, sigma):
gauss = torch.Tensor(
[
exp(-((x - window_size // 2) ** 2) / float(2 * sigma**2))
for x in range(window_s... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/http_app/app.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:14.129285 | """FastAPI application for image generation"""
import logging
import os.path
import sys
import traceback
from asyncio import Lock
from fastapi import FastAPI, Query, Request
from fastapi.concurrency import run_in_threadpool
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import FileResponse,... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/http_app/stablestudio/models.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:14.130209 | """Classes for image generation API models"""
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel, Extra, Field, HttpUrl, validator
from imaginairy.http_app.utils import Base64Bytes
from imaginairy.schema import ImaginePrompt
class StableStudioPrompt(BaseModel):
text:... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/describe_image_blip.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:16.535346 | """Functions for generating image captions"""
import os
import os.path
from functools import lru_cache
import torch
from torchvision import transforms
from torchvision.transforms.functional import InterpolationMode
from imaginairy.utils import get_device
from imaginairy.utils.downloads import get_cached_url_path
fro... |
brycedrennan/imaginAIry | https://github.com/brycedrennan/imaginAIry | null | null | null | null | 8,148 | null | null | mit | null | null | null | null | null | null | null | imaginairy/enhancers/upscale_realesrgan.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:17.375505 | """Functions for image upscaling using RealESRGAN"""
import numpy as np
import torch
from PIL import Image
from imaginairy.utils import get_device
from imaginairy.utils.downloads import get_cached_url_path
from imaginairy.utils.model_cache import memory_managed_model
from imaginairy.vendored.basicsr.rrdbnet_arch impo... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/basic.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:20.244429 | """Python Basics Examples
Source code for docs/notes/basic/python-basic.rst
"""
import sys
import platform
import pytest
# Python Version
def get_version_info() -> tuple:
"""Get Python version info."""
return sys.version_info[:3]
def get_version_string() -> str:
"""Get Python version as string."""
... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/datetime_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:20.245748 | """Tests for datetime operations."""
import calendar
import time
from datetime import date, datetime, time as dt_time, timedelta, timezone
def test_current_datetime():
"""Get current date and time."""
now = datetime.now()
assert isinstance(now, datetime)
utc_now = datetime.now(timezone.utc)
asse... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | app.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:20.254973 | # -*- coding: utf-8 -*-
"""This is a simple cheatsheet webapp."""
import os
from flask import Flask, abort, send_from_directory, render_template
from flask_sslify import SSLify
from flask_seasurf import SeaSurf
from flask_talisman import Talisman
from werkzeug.exceptions import NotFound
from werkzeug.utils import safe... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/crypto_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:20.257939 | """
Tests for modern cryptography examples.
"""
import hashlib
import hmac
import os
import secrets
import pytest
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import rsa, padding, ed25519
from cryptography.hazmat... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/asyncio_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:20.263044 | """Tests for asyncio examples."""
import asyncio
import pytest
class TestAsyncioBasics:
"""Test basic asyncio operations."""
def test_asyncio_run(self):
"""Test basic coroutine execution."""
async def hello():
return "hello"
result = asyncio.run(hello())
assert ... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/concurrency_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:20.266397 | """Tests for concurrency examples."""
import pytest
import time
from threading import Thread, Lock, RLock, Semaphore, Event, Condition, Barrier
from queue import Queue
from concurrent.futures import ThreadPoolExecutor, as_completed
# Module-level functions for multiprocessing (must be picklable)
def _mp_square(x):
... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/dict.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:20.267906 | """Python Dictionary Examples
Source code for docs/notes/basic/python-dict.rst
"""
import pytest
from collections import defaultdict, OrderedDict
from functools import lru_cache
# Create a Dictionary
def create_dict_literal():
"""Create dict using literal syntax."""
return {"key": "value", "num": 42}
def ... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | app_test.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:21.722804 | """Test app.py."""
import multiprocessing
import platform
import unittest
import requests
import os
from pathlib import Path
from werkzeug.exceptions import NotFound
from flask_testing import LiveServerTestCase
from app import acme, find_key, static_proxy, index_redirection, page_not_found
from app import ROOT
from... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/cext_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:21.833660 | """
Tests for C extension examples (ctypes and cffi).
These tests demonstrate calling C code from Python without
requiring compilation of pybind11/Cython modules.
"""
import ctypes
import math
import os
import platform
import subprocess
import tempfile
import pytest
# Skip all tests if no C compiler available
def ... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/heap.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.605346 | """Python Heap Examples
Source code for docs/notes/basic/python-heap.rst
"""
import heapq
import pytest
# Basic Heap Operations
def heapify_list(items: list) -> list:
"""Convert list to heap in-place."""
h = items.copy()
heapq.heapify(h)
return h
def heap_push(h: list, item) -> list:
"""Push ... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/list.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.605862 | """Python List Examples
Source code for docs/notes/basic/python-list.rst
"""
import bisect
import copy
import itertools
from collections import defaultdict, deque
from functools import reduce
import pytest
# Initialize
def init_immutable(n: int) -> list:
"""Initialize list with immutable objects."""
return... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/future_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.606972 | """Python Future Examples
Source code for docs/notes/basic/python-future.rst
"""
from __future__ import annotations
import __future__
import sys
import pytest
# List Future Features
def get_all_features() -> list[str]:
"""Get all available future features."""
return __future__.all_feature_names
def get_fe... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/object.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.608684 | """Python OOP Examples
Source code for docs/notes/basic/python-object.rst
"""
from abc import ABC, abstractmethod
from functools import total_ordering
import pytest
# Basic Class
class Person:
"""Basic class with __init__."""
def __init__(self, name: str, age: int):
self.name = name
self.a... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/generator.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.610011 | """Python Generator Examples
Source code for docs/notes/basic/python-generator.rst
"""
import inspect
from contextlib import contextmanager
from types import GeneratorType
import pytest
# Generator Function
def simple_gen():
"""Simple generator yielding values."""
yield 1
yield 2
yield 3
def coun... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/os_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.611172 | """
Tests for operating system operations.
These tests demonstrate Python's os module for file system operations,
process management, environment variables, and path manipulation.
"""
import os
import platform
import subprocess
import tempfile
from pathlib import Path
import pytest
class TestSystemInfo:
"""Tes... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/fileio_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.612037 | """Tests for file I/O operations."""
import csv
import gzip
import json
import tempfile
import zipfile
from pathlib import Path
def test_read_write_text(tmp_path):
"""Read and write text files."""
p = tmp_path / "test.txt"
content = "Hello, World!\nLine 2"
with open(p, "w", encoding="utf-8") as f:
... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/func.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:22.612903 | """Python Function Examples
Source code for docs/notes/basic/python-func.rst
"""
from functools import lru_cache, partial, reduce, singledispatch, wraps
import pytest
# Default Arguments
def greet(name: str, greeting: str = "Hello") -> str:
"""Greet with optional greeting."""
return f"{greeting}, {name}!"
... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/set.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:24.007026 | """Python Set Examples
Source code for docs/notes/basic/python-set.rst
"""
import pytest
# Create a Set
def create_set_literal():
"""Create set using literal syntax."""
return {1, 2, 3}
def create_set_from_list(items: list) -> set:
"""Create set from list, removing duplicates."""
return set(items)... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/typing_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:24.930537 | """Python Typing Examples
Source code for docs/notes/basic/python-typing.rst
"""
import pytest
from typing import (
Optional,
Union,
Callable,
TypeVar,
Generic,
Protocol,
TypedDict,
Literal,
Final,
ClassVar,
)
# Basic Types
def greet(name: str) -> str:
"""Function with ty... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/sqlalchemy_orm.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:24.931844 | """SQLAlchemy ORM examples and tests for pysheeet documentation."""
import pytest
from sqlalchemy import (
create_engine,
Column,
Integer,
String,
ForeignKey,
Table,
select,
and_,
or_,
func,
DateTime,
event,
)
from sqlalchemy.orm import (
declarative_base,
sessio... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/cext/capi/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.144133 | from setuptools import setup, Extension
extensions = [
Extension("simple", ["simple.c"]),
Extension("args", ["args.c"]),
Extension("gil", ["gil.c"]),
Extension("errors", ["errors.c"]),
Extension("types_demo", ["types_demo.c"]),
]
setup(
name="capi_examples",
version="1.0",
ext_modules=... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/sqlalchemy_core.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.144669 | """SQLAlchemy examples and tests for pysheeet documentation."""
from datetime import datetime
import pytest
from sqlalchemy import (
create_engine,
MetaData,
Table,
Column,
Integer,
String,
ForeignKey,
select,
insert,
update,
delete,
text,
inspect,
func,
and_... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/unicode_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.339335 | """Python Unicode Examples
Source code for docs/notes/basic/python-unicode.rst
"""
import pytest
import unicodedata
# Encoding and Decoding
def encode_utf8(s: str) -> bytes:
"""Encode string to UTF-8 bytes."""
return s.encode("utf-8")
def decode_utf8(b: bytes) -> str:
"""Decode UTF-8 bytes to string."... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/cext/capi/test_capi.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.340400 | """Tests for Python C API extension examples."""
import pytest
import sys
import os
# Add build directory to path
build_dir = os.path.join(os.path.dirname(__file__), "build")
for d in os.listdir(build_dir) if os.path.exists(build_dir) else []:
path = os.path.join(build_dir, d)
if os.path.isdir(path) and path ... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/socket_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.450930 | """Network/socket examples and tests for pysheeet documentation."""
import socket
import threading
import time
import pytest
class TestHostname:
"""Test hostname and DNS resolution."""
def test_gethostname(self):
hostname = socket.gethostname()
assert isinstance(hostname, str)
assert... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/cext/test_cext.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.655034 | """
Tests for pybind11 C++ extension modules.
Run from src/cext directory:
python -m pytest test_cext.py -v
Build first:
mkdir build && cd build && cmake .. && make
"""
import sys
import threading
from datetime import datetime
import pytest
# Try to import compiled modules (path set by conftest.py)
try:
... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/cext/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.655549 | """
setup.py for pybind11 examples
Build:
pip install .
# or
python setup.py build_ext --inplace
"""
from setuptools import setup, find_packages
try:
from pybind11.setup_helpers import Pybind11Extension, build_ext
ext_modules = [
Pybind11Extension(
"example",
["ex... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/megatron/entrypoint.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.825363 | #!/usr/bin/env python3
"""Generic entrypoint for Megatron Bridge recipes.
Usage:
./srun.sh recipes/deepseek_v2_lite_pretrain.py hf_path=/fsx/models/deepseek-ai/DeepSeek-V2-Lite
./srun.sh recipes/qwen3_30b_a3b_pretrain.py hf_path=/fsx/models/Qwen/Qwen3-30B-A3B-FP8
"""
import importlib.util
import sys
import m... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/llm/vllm/offline_bench.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.849165 | #!/usr/bin/env python3
"""
Offline vLLM benchmark without API server overhead.
Based on vllm torchrun_dp_example.py for distributed inference.
Usage:
# Single GPU
python offline_bench.py --model meta-llama/Llama-3.1-8B --num-prompts 50
# Multi-GPU with tensor parallelism
torchrun --nproc-per-node=4 of... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/megatron/recipes/deepseek_v2_lite_pretrain.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.904347 | from megatron.bridge.recipes.deepseek.deepseek_v2 import (
deepseek_v2_lite_pretrain_config,
)
def configure(hf_path=None, moe_token_dispatcher_type=None):
cfg = deepseek_v2_lite_pretrain_config(
**({"hf_path": hf_path} if hf_path else {}),
tensor_model_parallel_size=8,
pipeline_model_... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/megatron/viztracer_plugin.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:25.934311 | """VizTracer profiling plugin for Megatron Bridge.
Monkey-patches megatron.bridge.training.profiling to add viztracer support.
Activated when `profiling.use_viztracer=true` is passed as a Hydra override.
Usage:
./srun.sh recipes/deepseek_v2_lite_pretrain.py \
profiling.use_viztracer=true \
profili... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/new_py3/py3.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:26.075946 | """New features in Python 3 (3.12 → 3.0)
Source code examples for docs/notes/python-new-py3.rst
"""
import sys
import asyncio
import pytest
from dataclasses import dataclass, FrozenInstanceError
PY_VERSION = sys.version_info[:2]
# Python 3.9 - Dictionary Merge (PEP 584)
def dict_merge(a: dict, b: dict) -> dict:
... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/security/vulnerability_.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:26.260052 | """Tests demonstrating security vulnerabilities and secure alternatives."""
import pytest
import hmac
import secrets
import os
class TestTimingAttack:
"""Demonstrate timing attack vulnerability in string comparison."""
def test_insecure_comparison(self):
"""Insecure comparison - vulnerable to timing... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/sqlalchemy_query.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:26.700533 | """SQLAlchemy query recipe examples and tests for pysheeet documentation."""
import pytest
from sqlalchemy import (
create_engine,
Column,
Integer,
String,
ForeignKey,
select,
insert,
func,
desc,
case,
distinct,
union_all,
exists,
text,
)
from sqlalchemy.orm impo... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/basic/rexp.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:27.518722 | """Python Regular Expression Examples
Source code for docs/notes/basic/python-rexp.rst
"""
import re
from collections import namedtuple
import pytest
# Basic Matching
def search_pattern(pattern: str, text: str) -> str | None:
"""Find first match of pattern in text."""
m = re.search(pattern, text)
retur... |
crazyguitar/pysheeet | https://github.com/crazyguitar/pysheeet | null | null | null | null | 8,145 | null | null | mit | null | null | null | null | null | null | null | src/cext/conftest.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:29.844837 | """
pytest configuration for C extension tests.
Adds build directory to sys.path before tests run.
"""
import sys
from pathlib import Path
def pytest_configure(config):
"""Add build directory to path before collecting tests."""
test_dir = Path(__file__).parent
build_dir = test_dir / "build"
if build_... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | scripts/remote_debug.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.406914 | import logging
import rpyc
import rpyc.core.protocol
import rpyc.utils.server
RPYC_PORT = 18812
class RemoteDebugService(rpyc.Service):
def on_connect(self, conn: rpyc.core.protocol.Connection):
logging.info(f"connect open: {str(conn)}")
return
def on_disconnect(self, conn: rpyc.core.protoc... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/api/gef_disassemble.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.408254 | """
`gef.heap` test module.
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ARCH, debug_target
class GefDisassembleApiFunction(RemoteGefUnitTestGeneric):
"""`gef_disassemble` function test module."""
def setUp(self) -> None:
self._target = debug_target("mma... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | scripts/new-release.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.409440 | #!/usr/bin/env python3
"""
Small script to generate the changelog for a new release. It uses information from
both git and Github to create the changelog in Markdown, which can be simply copy/pasted
to the Github release page.
The script requires a Github token to be set in the environment variable `GITHUB_REPO_TOKEN... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/api/gef_arch.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.412033 | """
`gef.arch` test module.
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ARCH, is_64b, debug_target
class GefArchApi(RemoteGefUnitTestGeneric):
"""`gef.arch` test module."""
def setUp(self) -> None:
self._target = debug_target("default")
return s... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | scripts/vscode_debug.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.413011 | import debugpy
DEBUGPY_PORT = 5678
debugpy.listen(DEBUGPY_PORT)
print("Waiting for debugger attach")
debugpy.wait_for_client()
print("Client connected, resuming session")
|
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/api/deprecated.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.413928 | """
test module for deprecated functions
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import WARNING_DEPRECATION_MESSAGE
class GefFuncDeprecatedApi(RemoteGefUnitTestGeneric):
"""Test class for deprecated functions and variables. Each of those tests expect to receive a
de... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/api/gef_memory.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.414872 | """
`gef.session` test module.
"""
import pathlib
import random
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
IN_GITHUB_ACTIONS,
debug_target,
gdbserver_session,
qemuuser_session,
GDBSERVER_DEFAULT_HOST,
)
class GefMemoryApi(RemoteGefUnitTestG... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/api/gef_heap.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:32.416409 | """
`gef.heap` test module.
"""
import random
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ARCH, debug_target, is_64b
TCACHE_BINS = 64
class GefHeapApi(RemoteGefUnitTestGeneric):
"""`gef.heap` test module."""
def setUp(self) -> None:
self._target = debug_t... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/api/misc.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.149282 | """
Tests GEF internal functions.
"""
import pathlib
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
debug_target,
)
class MiscFunctionTest(RemoteGefUnitTestGeneric):
"""Tests GEF internal functions."""
def setUp(self) -> None:
self._target = debug_targ... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.151313 | import os
import pathlib
import random
import re
import subprocess
import tempfile
import time
import unittest
import rpyc
from .utils import debug_target
COVERAGE_DIR = os.getenv("COVERAGE_DIR", "")
GEF_PATH = pathlib.Path(os.getenv("GEF_PATH", "gef.py")).absolute()
RPYC_GEF_PATH = GEF_PATH.parent / "scripts/remot... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/api/gef_session.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.152205 | """
`gef.session` test module.
"""
import os
import pathlib
import random
import re
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
debug_target,
gdbserver_session,
qemuuser_session,
GDBSERVER_DEFAULT_HOST,
)
class GefSessionApi(RemoteGefUnitTestGen... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/context.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.561388 | """
`context` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class ContextCommand(RemoteGefUnitTestGeneric):
"""`context` command test module"""
cmd = "context"
# TODO See https://github.com/hugsy/gef/projects/10
def test_duplicate_pane_name(self):
# Make sure we c... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/checksec.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.561896 | """
checksec command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import debug_target
class ChecksecCommandNoCanary(RemoteGefUnitTestGeneric):
"""`checksec` command test module"""
def setUp(self) -> None:
self._target = debug_target("checksec-no-canary")
r... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/arch.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.568149 | """
Arch commands test module
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ARCH
class ArchCommand(RemoteGefUnitTestGeneric):
"""Class for `arch` command testing."""
@pytest.mark.skipif(ARCH != "x86_64", reason=f"Skipped for {ARCH}")
def test_cmd_arch_get(sel... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/aliases.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.570113 | """
`aliases` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class AliasesCommand(RemoteGefUnitTestGeneric):
"""`aliases` command test module"""
def test_cmd_aliases_add(self):
gdb = self._gdb
gef = self._gef
initial_nb = len(gef.session.aliases)
gdb... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/canary.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.571116 | """
`canary` command test module
"""
from tests.utils import (
ERROR_INACTIVE_SESSION_MESSAGE,
debug_target,
p64,
p32,
is_64b,
u32,
)
from tests.base import RemoteGefUnitTestGeneric
class CanaryCommand(RemoteGefUnitTestGeneric):
"""`canary` command test module"""
def setUp(self) -> N... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/aslr.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:38.572181 | """
`aslr` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class AslrCommand(RemoteGefUnitTestGeneric):
"""`aslr` command test module"""
cmd = "aslr"
def __is_alsr_on_gdb(self):
gdb = self._gdb
gdb_output = gdb.execute("show disable-randomization", to_string=True... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/entry_break.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:39.879768 | """
`entry-break` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class EntryBreakCommand(RemoteGefUnitTestGeneric):
"""`entry-break` command test module"""
def test_cmd_entry_break(self):
gdb = self._gdb
# run once (ok)
lines = (gdb.execute("entry-break", to... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/edit_flags.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:39.880501 | """
`edit-flags` command test module
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ARCH
@pytest.mark.skipif(ARCH not in ("i686", "x86_64"), reason=f"Skipped for {ARCH}")
class EditFlagsCommand(RemoteGefUnitTestGeneric):
"""`edit-flags` command test module"""
def ... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/dereference.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:39.881671 | """
dereference command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ERROR_INACTIVE_SESSION_MESSAGE
class DereferenceCommand(RemoteGefUnitTestGeneric):
"""`dereference` command test module"""
def test_cmd_dereference(self):
gdb = self._gdb
assert (... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/elf_info.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:39.909176 | """
elf-info command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class ElfInfoCommand(RemoteGefUnitTestGeneric):
"""`elf-info` command test module"""
def test_cmd_elf_info(self):
gdb = self._gdb
res = gdb.execute("elf-info", to_string=True)
self.assertIn("7f 45 4c... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/gef.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.688890 | """
`gef` command test module
"""
import pytest
import pathlib
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import removeuntil
class GefCommand(RemoteGefUnitTestGeneric):
"""`gef` command test module"""
def test_cmd_gef(self):
gdb = self._gdb
res = gdb.execute("gef", to_... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/hexdump.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.690696 | """
`hexdump` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ERROR_INACTIVE_SESSION_MESSAGE
class HexdumpCommand(RemoteGefUnitTestGeneric):
"""`hexdump` command test module"""
def test_cmd_hexdump(self):
gdb = self._gdb
self.assertEqual(
... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/functions.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.691784 | """
`functions` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class FunctionsCommand(RemoteGefUnitTestGeneric):
"""`functions` command test module"""
def test_cmd_functions(self):
gdb = self._gdb
res = gdb.execute("functions", to_string=True)
self.assertIn("... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/got.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.693248 | """
`got` command test module
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
ERROR_INACTIVE_SESSION_MESSAGE,
debug_target,
)
@pytest.mark.skipif(ARCH in ("ppc64le",), reason=f"Skipped for {ARCH}")
class GotCommand(RemoteGefUnitTestGeneric):
"""`got... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/format_string_helper.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.694597 | """
`format-string_helper` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import debug_target
class FormatStringHelperCommand(RemoteGefUnitTestGeneric):
"""`format-string-helper` command test module"""
def setUp(self) -> None:
self._target = debug_target("fo... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/highlight.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.695669 | """
`highlight` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import Color
class HighlightCommand(RemoteGefUnitTestGeneric):
"""`highlight` command test module"""
def test_cmd_highlight(self):
gdb = self._gdb
gdb.execute("start")
gdb.execu... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/gef_remote.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.696737 | """
`gef_remote` command test module
"""
import random
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
debug_target,
gdbserver_session,
qemuuser_session,
GDBSERVER_DEFAULT_HOST,
)
class GefRemoteCommand(RemoteGefUnitTestGeneric):
"""`gef_remote`... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/hijack_fd.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:40.726170 | """
`hijack_fd` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class HijackFdCommand(RemoteGefUnitTestGeneric):
"""`hijack-fd` command test module"""
cmd = "hijack-fd"
def test_cmd_hijack_fd(self):
gdb = self._gdb
gdb.execute(f"{self.cmd}", to_string=True)
|
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/pie.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.760328 | """
`pie` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import debug_target, find_symbol, removeuntil
class PieCommand(RemoteGefUnitTestGeneric):
"""`pie` command test module"""
def setUp(self) -> None:
target = debug_target("default")
self.pie_offs... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/memory.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.760954 | """
Memory commands test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ERROR_INACTIVE_SESSION_MESSAGE,
debug_target,
)
class MemoryCommand(RemoteGefUnitTestGeneric):
"""`memory` command testing module"""
def setUp(self) -> None:
self._target = debug_tar... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/name_break.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.762087 | """
`name-break` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
class NameBreakCommand(RemoteGefUnitTestGeneric):
"""`name-break` command test module"""
def test_cmd_name_break(self):
gdb = self._gdb
gdb.execute("start")
res = gdb.execute("nb foobar *main+10"... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/nop.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.763756 | """
`nop` command test module
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
ERROR_INACTIVE_SESSION_MESSAGE,
debug_target,
p16,
p32,
p64,
u16,
u32,
u64,
)
class NopCommand(RemoteGefUnitTestGeneric):
"""`nop` command test modu... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/pattern.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.764644 | """
Pattern commands test module
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ARCH, debug_target, is_64b
class PatternCommand(RemoteGefUnitTestGeneric):
"""`pattern` command test module"""
def setUp(self) -> None:
self._target = debug_target("pattern")
... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/patch.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.766161 | """
patch command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ERROR_INACTIVE_SESSION_MESSAGE, debug_target, u16, u32, u64, u8
class PatchCommand(RemoteGefUnitTestGeneric):
"""`patch` command test module"""
def test_cmd_patch(self):
gdb = self._gdb
... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/pcustom.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.795679 | """
pcustom command test module
"""
import tempfile
import pathlib
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
is_64b,
debug_target,
GEF_DEFAULT_TEMPDIR,
)
struct = b"""from ctypes import *
class foo_t(Structure):
_fields_ = [("a", c_int32),("b", c_int32),]
class goo_t... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/heap_analysis.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:41.841647 | """
`heap-analysis` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ERROR_INACTIVE_SESSION_MESSAGE, debug_target
class HeapAnalysisCommand(RemoteGefUnitTestGeneric):
"""`heap-analysis` command test module"""
def setUp(self) -> None:
self._target = debu... |
hugsy/gef | https://github.com/hugsy/gef | null | null | null | null | 8,143 | null | null | mit | null | null | null | null | null | null | null | tests/commands/scan.py | null | null | null | null | null | null | Python | 2026-05-04T02:13:42.360751 | """
scan command test module
"""
import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
ERROR_INACTIVE_SESSION_MESSAGE,
IN_GITHUB_ACTIONS,
debug_target,
is_glibc_ge,
)
class ScanCommand(RemoteGefUnitTestGeneric):
"""`scan` command test module"""
de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.