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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cnlimiter/codex-manager | https://github.com/cnlimiter/codex-manager | null | null | null | null | 1,954 | null | null | mit | null | null | null | null | null | null | null | src/web/routes/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:05.719545 | """
API 路由模块
"""
from fastapi import APIRouter
from .accounts import router as accounts_router
from .registration import router as registration_router
from .settings import router as settings_router
from .email import router as email_services_router
from .payment import router as payment_router
from .upload.cpa_servi... |
cnlimiter/codex-manager | https://github.com/cnlimiter/codex-manager | null | null | null | null | 1,954 | null | null | mit | null | null | null | null | null | null | null | src/web/routes/accounts.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:05.915342 | """
账号管理 API 路由
"""
import asyncio
import io
import json
import logging
import threading
import zipfile
from datetime import datetime
from typing import Any, Dict, List, Optional
from fastapi import APIRouter, HTTPException, Query, BackgroundTasks, Body
from fastapi.responses import StreamingResponse
from pydantic imp... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | titans_pytorch/implicit_mlp_attention.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.233867 | from __future__ import annotations
import torch
from torch import nn, cat, is_tensor
import torch.nn.functional as F
from torch.nn import Module, ModuleList
from torch.utils._pytree import tree_map
from einops.layers.torch import Rearrange
from rotary_embedding_torch import RotaryEmbedding
# functions
def exists(v... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | train_mac.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.237816 | # /// script
# dependencies = [
# "accelerate",
# "adam-atan2-pytorch>=0.1.18",
# "setuptools",
# "titans-pytorch",
# "tqdm",
# "wandb"
# ]
# ///
import random
import tqdm
import gzip
import numpy as np
import torch
from torch import nn, Tensor
from torch.nn import functional as F
from torch.u... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | titans_pytorch/nested_attention.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.255673 | from __future__ import annotations
import torch
from torch import nn, cat, is_tensor
import torch.nn.functional as F
from torch.nn import Module, ModuleList
from torch.utils._pytree import tree_map
from einops.layers.torch import Rearrange
from rotary_embedding_torch import RotaryEmbedding
# functions
def exists(v... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | tests/test_titans.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.256351 | from contextlib import contextmanager
import torch
from torch import nn
import pytest
from titans_pytorch import NeuralMemory
from titans_pytorch.mac_transformer import flex_attention, SegmentedAttention, MemoryAsContextTransformer
# functions
def exists(v):
return v is not None
def diff(x, y):
return (x -... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | titans_pytorch/mac_transformer.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.264770 | from __future__ import annotations
from typing import Callable
from math import ceil
from copy import deepcopy
from functools import partial
from collections import namedtuple
import tqdm
import torch
from torch import nn, stack, cat
import torch.nn.functional as F
from torch.nn import Module, ModuleList, Linear
# ... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | titans_pytorch/neural_memory.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.295197 | from __future__ import annotations
from typing import Callable
import math
from functools import partial
from itertools import zip_longest
from collections import namedtuple
import torch
from torch import nn, stack, cat, is_tensor, tensor, Tensor
import torch.nn.functional as F
from torch.nn import Linear, Module, Pa... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | titans_pytorch/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.329960 | from titans_pytorch.neural_memory import (
NeuralMemory,
NeuralMemState,
mem_state_detach
)
from titans_pytorch.memory_models import (
MemoryMLP,
MemoryAttention,
FactorizedMemoryMLP,
MemorySwiGluMLP,
GatedResidualMemoryMLP
)
from titans_pytorch.mac_transformer import (
MemoryAsCon... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | titans_pytorch/memory_models.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.330735 | import torch
from torch import nn, cat
import torch.nn.functional as F
from torch.nn import Module, ModuleList, Parameter, ParameterList
from einops import rearrange
# functions
def l2norm(t):
return F.normalize(t, dim = -1)
# norms
class LayerNorm(Module):
def __init__(
self,
dim
):
... |
lucidrains/titans-pytorch | https://github.com/lucidrains/titans-pytorch | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | train_implicit_mlp_attn.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:08.347236 | # /// script
# dependencies = [
# "accelerate",
# "titans-pytorch",
# "tqdm"
# ]
# ///
import math
import gzip
import random
import tqdm
import numpy as np
import torch
from torch.optim import Adam
from torch import nn, Tensor
from torch.nn import Module, ModuleList
import torch.nn.functional as F
from to... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/engine/mangler.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:10.629778 | """
Class to manage obfuscation technuqies that are applied on all Mutators
"""
import re
import string
from bashfuscator.core.engine.random import RandomGen
class Mangler(object):
"""
Class to handle mangling of individual payload lines
"""
binaryRegexStr = r":\w+:"
requiredWhitespaceRegexStr = ... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/engine/random.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:10.631996 | """
Defines RandomGen, a wrapper around all common functions relying on
randomness.
"""
import string
import random
import re
class RandomGen(object):
"""
Wrapper around :py:class:`random.SystemRandom`.
Provided for ease of use and to avoid
having to initialize a SystemRandom object
every time som... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/common/messages.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:10.632847 | """
Helper functions to print output to the terminal.
"""
import sys
from bashfuscator.common.colors import blue, yellow, red, bold
QUIET_OUTPUT = False
def activateQuietMode():
"""Activate quiet mode, only print errors."""
global QUIET_OUTPUT
QUIET_OUTPUT = True
def printInfo(msg):
"""Format and... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/common/colors.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:10.642804 | # Copyright (C) 2010-2013 Claudio Guarnieri.
# Copyright (C) 2014-2016 Cuckoo Foundation.
"""
Provides helper functions for pretty-printing with colors. This file is
borrowed from the Cuckoo Sandbox Project:
https://github.com/cuckoosandbox/cuckoo
"""
import os
import sys
def color(text, colorCode):
"""
Color... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/engine/obfuscation_handler.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:10.646309 | """
Defines ObufscationHandler, which manages the obfuscation process.
"""
from bashfuscator.common.messages import printError, printWarning
from bashfuscator.core.engine.mangler import Mangler
from bashfuscator.core.engine.random import RandomGen
from bashfuscator.core.utils import import_mutators
class ObfuscationH... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/mutators/encoder.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:11.286909 | """
Base class for Encoders used by the framework
"""
from bashfuscator.core.mutators.mutator import Mutator
class Encoder(Mutator):
"""
Base class for all Encoders. An Encoder is a Mutator that mutates
the entire input given, so none of the input is visible after
encoding.
:param name: name of t... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:11.288630 | import importlib
import os
import bashfuscator.modules as bashfuscator_modules
MODULES_DIR = bashfuscator_modules.__path__[0]
def import_mutators():
modules = []
for root, dirs, files in os.walk(MODULES_DIR):
_, package, root = root.rpartition("bashfuscator/modules/".replace("/", os.sep))
roo... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/mutators/command_obfuscator.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:11.291287 | """
Base class for Command Obfuscators used by the framework
"""
import re
from bashfuscator.common.messages import printError
from bashfuscator.core.mutators.mutator import Mutator
class CommandObfuscator(Mutator):
"""
Base class for all Command Obfuscators. If an obfuscator takes the
original input, mu... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/mutators/mutator.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:11.292325 | """
Base class all modules inherit from
"""
import string
from bashfuscator.core.engine.mangler import Mangler
from bashfuscator.core.engine.random import RandomGen
class Mutator(object):
"""
Base class that all Mutators inherit from. Automatically generates
a longName attribute that is used to choose Mu... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/mutators/compressor.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:11.293503 | """
Base class for Compressors used by the framework
"""
from bashfuscator.core.mutators.mutator import Mutator
class Compressor(Mutator):
"""
Base class for all compressors. A compressor is a Mutator that
takes input, mutates it to make it smaller, and restores it to
the original input with a decompr... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/mutators/token_obfuscator.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:11.306271 | """
Base class for Token Obfuscators used by the framework
"""
from bashfuscator.core.mutators.mutator import Mutator
class TokenObfuscator(Mutator):
"""
Base class for all token obfuscators. If an obfuscator is able to
be deobfuscated and executed by bash at runtime, without bash
having to execute a ... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/core/mutators/string_obfuscator.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:11.354251 | """
Base class for String Obfuscators used by the framework
"""
from bashfuscator.core.mutators.mutator import Mutator
class StringObfuscator(Mutator):
"""
Base class for all String Obfuscators. A String Obfuscator is a
Mutator that builds the input string by executing a series of
commands to build ch... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/command_obfuscators/case_swapper.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:12.154783 | from bashfuscator.core.mutators.command_obfuscator import CommandObfuscator
from bashfuscator.core.mutators.command_obfuscator import Stub
class CaseSwapper(CommandObfuscator):
def __init__(self):
super().__init__(
name="Case Swapper",
description="Flips the case of all alpha chars... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/encoders/xor_non_null.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:12.156726 | from bashfuscator.core.mutators.encoder import Encoder
class XorNonNull(Encoder):
def __init__(self):
super().__init__(
name="Xor Non Null",
description="Uses the xor operator in perl to encode strings",
sizeRating=5,
timeRating=5,
binariesUsed=[... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/command_obfuscators/reverse.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:12.158248 | from bashfuscator.core.mutators.command_obfuscator import CommandObfuscator
from bashfuscator.core.mutators.command_obfuscator import Stub
class Reverse(CommandObfuscator):
def __init__(self):
super().__init__(
name="Reverse",
description="Reverses a command",
sizeRatin... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/encoders/rot_n.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:12.161341 | from bashfuscator.core.mutators.encoder import Encoder
class RotN(Encoder):
def __init__(self):
super().__init__(
name="RotN",
description="Offsets each character a random number of times across the ASCII charset",
sizeRating=1,
timeRating=1,
bin... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/compressors/bzip2.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:12.163294 | import bz2
from base64 import b64encode
from bashfuscator.core.mutators.compressor import Compressor
class Bzip2(Compressor):
def __init__(self):
super().__init__(
name="Bzip2",
description="Compress command with bzip2",
sizeRating=3,
timeRating=3,
... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/encoders/base64.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:12.164529 | from base64 import b64encode
from bashfuscator.core.mutators.encoder import Encoder
class Base64(Encoder):
def __init__(self):
super().__init__(
name="Base64",
description="Base64 encode command",
sizeRating=2,
timeRating=1,
binariesUsed=["base6... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/compressors/gzip.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:12.165409 | import gzip
from base64 import b64encode
from bashfuscator.core.mutators.compressor import Compressor
class Gzip(Compressor):
def __init__(self):
super().__init__(
name="Gzip",
description="Compress command with gzip",
sizeRating=3,
timeRating=3,
... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/string_obfuscators/glob_obfuscators/_glob_obfuscator.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:15.254247 | import math
from bashfuscator.core.mutators.string_obfuscator import StringObfuscator
class GlobObfuscator(StringObfuscator):
def __init__(self, name, description, sizeRating, timeRating, author):
super().__init__(
name=name,
description=description,
sizeRating=sizeRat... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/string_obfuscators/hex_hash.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:15.259293 | import hashlib
from bashfuscator.core.mutators.string_obfuscator import StringObfuscator
class HexHash(StringObfuscator):
def __init__(self):
super().__init__(
name="Hex Hash",
description="Uses the output of md5 to encode strings",
sizeRating=5,
timeRating... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/token_obfuscators/for_code.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:15.259842 | from bashfuscator.core.mutators.token_obfuscator import TokenObfuscator
class ForCode(TokenObfuscator):
def __init__(self):
super().__init__(
name="ForCode",
description="Shuffle command and reassemble it in a for loop",
sizeRating=2,
timeRating=3,
... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | scripts/single_mutator_test.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:15.260893 | #!/usr/bin/env python3
"""
Stress tests a single Mutator
"""
from datetime import datetime
import os
import pytest
from subprocess import STDOUT, PIPE, Popen
from bashfuscator.core.obfuscation_handler import ObfuscationHandler
if __name__ == "__main__":
mutatorName = "string/xor_non_null"
inputCommand =... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/string_obfuscators/glob_obfuscators/folder_glob.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:15.261835 | from bashfuscator.modules.string_obfuscators.glob_obfuscators._glob_obfuscator import GlobObfuscator
class FolderGlob(GlobObfuscator):
def __init__(self):
super().__init__(
name="Folder Glob",
description="Same as file glob, but better",
sizeRating=5,
timeRa... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/string_obfuscators/glob_obfuscators/file_glob.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:15.262461 | from bashfuscator.modules.string_obfuscators.glob_obfuscators._glob_obfuscator import GlobObfuscator
class FileGlob(GlobObfuscator):
def __init__(self):
super().__init__(
name="File Glob",
description="Uses files and glob sorting to reassemble a string",
sizeRating=5,
... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | bashfuscator/modules/token_obfuscators/special_char_only.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:15.263018 | from collections import OrderedDict
import string
from bashfuscator.core.mutators.token_obfuscator import TokenObfuscator
class SpecialCharOnly(TokenObfuscator):
def __init__(self):
super().__init__(
name="Special Char Only",
description="Converts commands to only use special char... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | test/test_mutators.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:16.040936 | from datetime import datetime
import os
import pytest
from subprocess import STDOUT, PIPE, Popen
from bashfuscator.core.engine.obfuscation_handler import ObfuscationHandler
inputCommand = "echo 'It works!'"
expectedOutput = "It works!\n"
obHandler = ObfuscationHandler()
commandObNames = [(c.longName, s.longName) f... |
Bashfuscator/Bashfuscator | https://github.com/Bashfuscator/Bashfuscator | null | null | null | null | 1,953 | null | null | mit | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:16.071340 | """
Get dependencies, install bashfuscator to PATH and enable auto-completion
"""
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import call, Popen, PIPE
from sys import exit
import os
def findArgcompletePath(command):
proc = Popen("which " + command, st... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/auth/logout.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.505571 | import logging
from typing import Any
import click
from requests.exceptions import ConnectionError
import ggshield.verticals.hmsl.utils as hmsl_utils
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core.client import create_client
fr... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.507036 | #!/usr/bin/python3
import logging
import multiprocessing
import os
import sys
from io import TextIOWrapper
from pathlib import Path
from typing import Any, List, Optional
import click
from ggshield import __version__
from ggshield.cmd.ai import ai_group
from ggshield.cmd.auth import auth_group
from ggshield.cmd.confi... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/ai/discover.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.515845 | """
MCP Discover command - Discovers MCP servers and optionally probes them
for tools, resources, and prompts.
"""
import json
from typing import Any, Dict, List
import click
from pygitguardian.models import AIDiscovery
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/ai/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.519068 | from typing import Any
import click
from ggshield.cmd.ai.discover import discover_cmd
from ggshield.cmd.utils.common_options import add_common_options
@click.group(commands={"discover": discover_cmd})
@add_common_options()
def ai_group(**kwargs: Any) -> None:
"""Commands to work with AI assistants."""
|
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/auth/login.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.546779 | import re
from typing import Any, List, Optional, Tuple
import click
import requests
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core.client import create_client
from ggshield.core.config import Config
from ggshield.core.constant... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/auth/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.548191 | from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from .login import login_cmd
from .logout import logout_cmd
@click.group(commands={"login": login_cmd, "logout": logout_cmd})
@add_common_options()
def auth_group(**kwargs: Any) -> None:
"""Commands to manage a... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/config/config_get.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.580493 | from typing import Any, Optional
import click
from ggshield.cmd.config.constants import FIELD_NAMES, FIELD_NAMES_DOC, FIELDS
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core.errors import UnknownInstanceError
@click.command(
... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/config/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:18.581547 | from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from .config_get import config_get_cmd
from .config_list import config_list_cmd
from .config_migrate import config_migrate_cmd
from .config_set import config_set_cmd
from .config_unset import config_unset_cmd
@clic... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/config/config_migrate.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:19.504555 | from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
@click.command()
@click.pass_context
@add_common_options()
def config_migrate_cmd(ctx: click.Context, **kwargs: Any) -> int:
"""
Migrate configuration fi... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/config/config_set.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:19.505875 | from typing import Any, Optional
import click
from click import BadParameter
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core.config.user_config import UserConfig
from ggshield.core.config.utils import find_global_config_path
fr... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/config/config_unset.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:19.517879 | from typing import Any, Optional
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from .config_set import set_user_config_field
from .constants import FIELD_NAMES, FIELD_NAMES_DOC, FIELDS
@click.command(
help=f"""Remove the valu... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/config/constants.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:19.518408 | from dataclasses import dataclass
DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
@dataclass
class ConfigField:
"""Meta-information about a config field, used by `ggshield config` commands to
manipulate configuration files.
"""
# The name of the field in the config file.
name: str
# True if this fi... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/config/config_list.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:19.519798 | import json
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional
import click
from ggshield.cmd.utils.common_options import (
add_common_options,
json_option,
text_json_format_option,
)
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core.config.auth_co... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/check.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.244388 | import logging
from typing import Any, TextIO, cast
import click
from ggshield.cmd.hmsl.hmsl_common_options import (
full_hashes_option,
input_arg,
input_type_option,
naming_strategy_option,
)
from ggshield.cmd.hmsl.hmsl_utils import check_secrets
from ggshield.cmd.utils.common_options import (
ad... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/hmsl_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.246506 | from typing import Iterable, Optional
import click
from requests import HTTPError
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core import ui
from ggshield.core.errors import UnexpectedError
from ggshield.core.text_utils import pluralize
from ggshield.verticals.hmsl import Secret, get_client
fr... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/fingerprint.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.247831 | from typing import Any, TextIO, cast
import click
from ggshield.cmd.hmsl.hmsl_common_options import (
full_hashes_option,
input_arg,
input_type_option,
naming_strategy_option,
)
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.core import ui
from ggshield.verticals.hmsl.c... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/hmsl_common_options.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.249047 | import click
from ggshield.verticals.hmsl.collection import NAMING_STRATEGIES, InputType
input_arg = click.argument(
"path",
type=click.Path(
exists=True,
dir_okay=False,
readable=True,
allow_dash=True,
),
)
naming_strategy_option = click.option(
"--naming-strategy",
... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/decrypt.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.250145 | import json
from typing import Any, Dict, Iterator, TextIO, cast
import click
from ggshield.cmd.hmsl.hmsl_common_options import input_arg
from ggshield.cmd.utils.common_options import (
add_common_options,
json_option,
text_json_format_option,
)
from ggshield.cmd.utils.context_obj import ContextObj
from g... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/query.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.366768 | import json
import logging
from dataclasses import asdict
from typing import Any, List, TextIO, Tuple, cast
import click
from requests import HTTPError
from ggshield.cmd.hmsl.hmsl_common_options import input_arg
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj impor... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/api_status.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.368318 | import logging
from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core.text_utils import STYLE, format_text
from ggshield.verticals.hmsl import get_client
logger = logging.getLogger(__name__)
@cli... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/check_secret_manager/hashicorp_vault.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.369788 | import os
from typing import Any, Optional, Tuple
import click
from ggshield.cmd.hmsl.hmsl_common_options import (
full_hashes_option,
naming_strategy_option,
)
from ggshield.cmd.hmsl.hmsl_utils import check_secrets
from ggshield.cmd.utils.common_options import (
add_common_options,
json_option,
t... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.644527 | from typing import Any
import click
from ggshield.cmd.hmsl.api_status import status_cmd
from ggshield.cmd.hmsl.check import check_cmd
from ggshield.cmd.hmsl.check_secret_manager import check_secret_manager_group
from ggshield.cmd.hmsl.decrypt import decrypt_cmd
from ggshield.cmd.hmsl.fingerprint import fingerprint_cm... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/check_secret_manager/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:20.645066 | from typing import Any
import click
from ggshield.cmd.hmsl.check_secret_manager.hashicorp_vault import (
check_hashicorp_vault_cmd,
)
from ggshield.cmd.utils.common_options import add_common_options
@click.group(
commands={
"hashicorp-vault": check_hashicorp_vault_cmd,
},
)
@add_common_options()... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/plugin/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.046717 | """
Plugin commands for managing ggshield plugins.
"""
from typing import Any
import click
from ggshield.cmd.plugin.install import install_cmd
from ggshield.cmd.plugin.manage import disable_cmd, enable_cmd, uninstall_cmd
from ggshield.cmd.plugin.plugin_list import list_cmd
from ggshield.cmd.plugin.status import stat... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/honeytoken/utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.054701 | import random
import string
def generate_random_honeytoken_name() -> str:
"""Generate a honeytoken name based on a random string of eight alphanumeric characters"""
letters_and_digits = string.ascii_letters + string.digits
random_str = "".join(random.choice(letters_and_digits) for i in range(8))
retur... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/honeytoken/create_with_context.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.056035 | from collections import Counter
from pathlib import Path
from typing import Any, List, Optional
import click
from pygitguardian.models import Detail, HoneytokenWithContextResponse
from ggshield.cmd.honeytoken.utils import generate_random_honeytoken_name
from ggshield.cmd.utils.common_options import add_common_options... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/plugin/install.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.060813 | """
Plugin install command.
"""
import re
from pathlib import Path
from typing import Any, Optional
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core import ui
from ggshield.core.client import create_client_from_conf... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/install.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.062264 | import os
import subprocess
from pathlib import Path
from typing import Any, Literal, Optional
import click
from click import UsageError
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.core.dirs import get_data_dir
from ggshield.core.errors import UnexpectedError
from ggshield.utils.git... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/honeytoken/create.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.075726 | from pathlib import Path
from typing import Any, Dict, Optional
import click
from pygitguardian.models import Detail, HoneytokenResponse
from ggshield.cmd.honeytoken.utils import generate_random_honeytoken_name
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/hmsl/quota.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.077626 | import logging
from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.cmd.utils.quota import format_quota_color
from ggshield.verticals.hmsl import get_client
logger = logging.getLogger(__name__)
@cli... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/honeytoken/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.078539 | from typing import Any
import click
from ggshield.cmd.honeytoken.create import create_cmd
from ggshield.cmd.honeytoken.create_with_context import create_with_context_cmd
from ggshield.cmd.utils.common_options import add_common_options
@click.group(
commands={"create": create_cmd, "create-with-context": create_w... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/plugin/manage.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.571734 | """
Plugin management commands (enable/disable/uninstall).
"""
from typing import Any, Optional
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.core import ui
from ggshield.core.config.enterprise_config import EnterpriseConfig
from ggshield.core.errors import ExitCode
from... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/plugin/plugin_list.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:21.573009 | """
Plugin list command.
"""
from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.core import ui
from ggshield.core.config.enterprise_config import EnterpriseConfig
from ggshield.core.plugin.downloader import PluginDownloader
from ggshield.core.plugin.loa... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/changes.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:22.287919 | from pathlib import Path
from typing import Any
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
create_output_handler,
)
from ggshield.cmd.utils.common_decorators import exception_wrapper
from ggshield.cmd.utils.context_obj import ContextObj
from ... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/ci.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:22.289010 | import os
from pathlib import Path
from typing import Any
import click
from click import UsageError
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
create_output_handler,
)
from ggshield.cmd.utils.common_decorators import (
exception_wrapper,
non_block... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/dockerarchive.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:23.107515 | from pathlib import Path
from typing import Any
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
create_output_handler,
)
from ggshield.cmd.utils.common_decorators import exception_wrapper
from ggshield.cmd.utils.context_obj import ContextObj
from ... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/docker.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:23.108603 | import tempfile
from pathlib import Path
from typing import Any
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
create_output_handler,
)
from ggshield.cmd.utils.common_decorators import exception_wrapper
from ggshield.cmd.utils.context_obj import ... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/path.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:23.824497 | from pathlib import Path
from typing import Any, List, Tuple
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
create_output_handler,
)
from ggshield.cmd.secret.scan.ui_utils import print_file_list
from ggshield.cmd.utils.common_decorators import ex... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/docset.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:23.825778 | import json
from typing import Any, Iterable, Iterator, List, TextIO
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
create_output_handler,
)
from ggshield.cmd.utils.common_decorators import exception_wrapper
from ggshield.cmd.utils.context_obj im... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/precommit.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:24.672931 | import os
import subprocess
from pathlib import Path
from typing import Any, List
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
)
from ggshield.cmd.utils.common_decorators import (
exception_wrapper,
non_blocking_on_server_error,
)
from ggsh... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/archive.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.851735 | import tempfile
from pathlib import Path
from typing import Any
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
create_output_handler,
)
from ggshield.cmd.secret.scan.ui_utils import print_file_list
from ggshield.cmd.utils.context_obj import Conte... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/ai_hook.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.853491 | import sys
from typing import Any
import click
from ggshield.cmd.secret.scan.secret_scan_common_options import (
add_secret_scan_common_options,
)
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core import ui
from ggshield.core.client import create_client_from_config
from ggshield.core.scan i... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/quota.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.861922 | #!/usr/bin/python3
from typing import Any, Union
import click
from pygitguardian import GGClient
from pygitguardian.models import Detail, Quota, QuotaResponse
from ggshield.cmd.utils.common_options import (
add_common_options,
instance_option,
json_option,
text_json_format_option,
)
from ggshield.cmd.... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/scan/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.867717 | import os
from typing import Any, Optional
import click
from ggshield.cmd.secret.scan.ai_hook import ai_hook_cmd
from ggshield.cmd.secret.scan.archive import archive_cmd
from ggshield.cmd.secret.scan.changes import changes_cmd
from ggshield.cmd.secret.scan.ci import ci_cmd
from ggshield.cmd.secret.scan.docker import ... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/plugin/update.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.870741 | """
Plugin update command - updates installed plugins.
"""
import logging
import os
from typing import Any, Dict, List, Optional
import click
import requests
from packaging import version as packaging_version
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/plugin/status.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.872311 | """
Plugin status command.
"""
from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core import ui
from ggshield.core.client import create_client_from_config
from ggshield.core.config.enterprise_config... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/ignore.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.874783 | from typing import Any
import click
from ggshield.cmd.utils.common_options import add_common_options
from ggshield.cmd.utils.context_obj import ContextObj
from ggshield.core.cache import Cache
from ggshield.core.config import Config
from ggshield.core.text_utils import pluralize
from ggshield.core.types import Ignore... |
GitGuardian/ggshield | https://github.com/GitGuardian/ggshield | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | ggshield/cmd/secret/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:26.875353 | from typing import Any
import click
from ggshield.cmd.secret.ignore import ignore_cmd
from ggshield.cmd.secret.scan import scan_group
from ggshield.cmd.utils.common_options import add_common_options
@click.group(commands={"scan": scan_group, "ignore": ignore_cmd})
@add_common_options()
def secret_group(**kwargs: An... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/custom_solver.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.307756 | import itertools
from typing import Any, Callable, Dict, Iterable, List, Set, Type, Union
import torch
from detectron2.config import CfgNode
from detectron2.solver.build import maybe_add_gradient_clipping
def build_custom_optimizer(cfg: CfgNode, model: torch.nn.Module) -> torch.optim.Optimizer:
params: List[Dic... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/add_all_json.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.309180 | import json
from argparse import ArgumentParser
def open_json(path):
with open(path,"r") as f:
data=json.load(f)
return data
def save_json(json_list,save_path):
with open(save_path, 'w') as file:
json.dump(json_list, file, indent=4)
def caculate_IOU(box1,box2):
Ax1=box1[0]
Ay1=box1[1... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/data/custom_build_augmentation.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.325919 | # Copyright (c) Facebook, Inc. and its affiliates.
from detectron2.data import transforms as T
from .transforms.custom_augmentation_impl import EfficientDetResizeCrop
def build_custom_augmentation(cfg, is_train, scale=None, size=None, \
min_size=None, max_size=None):
"""
Create a list of default :class:`A... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/chatgpt.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.326542 | import json
import openai
from argparse import ArgumentParser
#You can replace this step with Open Source LMM
openai.api_base = ""
openai.api_key = ''
def save_json(json_list,save_path):
with open(save_path, 'w') as file:
json.dump(json_list, file, indent=4)
def _get_args():
parser = ArgumentParser()
... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.328947 | from .modeling.meta_arch import grit
from .modeling.roi_heads import grit_roi_heads
from .modeling.backbone import vit
from .data.datasets import object365
from .data.datasets import vg
from .data.datasets import grit_coco |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/config.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.329851 | from detectron2.config import CfgNode as CN
def add_grit_config(cfg):
_C = cfg
_C.MODEL.BEAM_SIZE = 1
_C.MODEL.TRAIN_TASK = ["ObjectDet", "DenseCap"]
_C.MODEL.TEST_TASK = "DenseCap" # This can be varied if the model is jointly trained on multiple tasks
_C.MODEL.ROI_BOX_HEAD.USE_BIAS = 0.0 # >= ... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/data/custom_dataset_dataloader.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.336495 | # Copyright (c) Facebook, Inc. and its affiliates.
# Modified by Jialian Wu from https://github.com/facebookresearch/Detic/blob/main/detic/data/custom_dataset_dataloader.py
import operator
import torch
import torch.utils.data
from detectron2.utils.comm import get_world_size
from detectron2.config import configurable
f... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/amg.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.337467 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import cv2 # type: ignore
from segment_anything import SamAutomaticMaskGenerator, sam_model_registry
import argparse
im... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/data/custom_dataset_mapper.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.366441 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# Modified by Jialian Wu from https://github.com/facebookresearch/Detic/blob/main/detic/data/custom_dataset_mapper.py
import copy
import numpy as np
import torch
from detectron2.config import configurable
from detectron2.data import detection_util... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/blip2.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.413994 | import torch
from PIL import Image
from lavis.models import load_model_and_preprocess
from argparse import ArgumentParser
import os
from torch.utils.data import Dataset, DataLoader
from tqdm import tqdm
import torchvision.utils as vutils
import json
def save_json(json_list,save_path):
with open(save_path, 'w') as f... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/data/transforms/custom_augmentation_impl.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.939742 | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# Part of the code is from https://github.com/rwightman/efficientdet-pytorch/blob/master/effdet/data/transforms.py
# Modified by Xingyi Zhou
# The original code is under Apache-2.0 License
import numpy as np
from PIL import ... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/data/datasets/vg.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.949943 | import logging
import os
from fvcore.common.timer import Timer
from detectron2.structures import BoxMode
from fvcore.common.file_io import PathManager
from detectron2.data import DatasetCatalog, MetadataCatalog
from lvis import LVIS
logger = logging.getLogger(__name__)
__all__ = ["load_vg_json", "register_vg_instance... |
Yuliang-Liu/Monkey | https://github.com/Yuliang-Liu/Monkey | null | null | null | null | 1,950 | null | null | mit | null | null | null | null | null | null | null | data_generation/grit/grit/evaluation/eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:46:29.950960 | import itertools
import json
import os
from detectron2.structures import Boxes, BoxMode, pairwise_iou
from detectron2.utils.file_io import PathManager
import numpy as np
import pycocotools.mask as mask_util
from detectron2.evaluation.coco_evaluation import COCOEvaluator
from detectron2.evaluation.coco_evaluation import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.