Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LLMQuant/quant-mind
/ functions
Functions
343 in github.com/LLMQuant/quant-mind
⨍
Functions
343
◇
Types & classes
107
↓ 22 callers
Function
_now
()
tests/knowledge/test_base.py:17
↓ 18 callers
Function
_src
()
tests/knowledge/test_base.py:21
↓ 10 callers
Function
batch_run
Run ``flow_fn`` over ``inputs`` with bounded concurrency. Args: flow_fn: Any flow function with signature ``(input, *, cfg, *
quantmind/flows/batch.py:51
↓ 9 callers
Function
_extract_arxiv_id
Pull the canonical arXiv id from a raw user input. Returns: Canonical id in either modern (``YYMM.NNNNN``) or legacy (``archive[.
quantmind/preprocess/fetch/arxiv.py:35
↓ 9 callers
Function
parse_filing_date
Parse a date string (filing dates, news timestamps) into UTC datetime. Accepts ISO-8601 with or without time component, ``YYYY-MM-DD``, ``YYY
quantmind/preprocess/time.py:39
↓ 9 callers
Function
resolve_doi
Look up a DOI on Crossref and return canonical metadata. Args: doi: A DOI string. Accepts canonical form (``10.NNNN/...``), `
quantmind/preprocess/fetch/doi.py:81
↓ 8 callers
Function
_now
()
tests/knowledge/test_roundtrip.py:26
↓ 8 callers
Function
_patch_runner
(return_value: Any)
tests/flows/test_paper.py:47
↓ 8 callers
Function
_stub_paper
()
tests/flows/test_paper.py:32
↓ 8 callers
Function
business_days_between
Count weekdays (Mon-Fri) strictly between ``a`` and ``b``. The count is **inclusive of both endpoints** when they fall on weekdays, and direc
quantmind/preprocess/time.py:73
↓ 8 callers
Function
paper_flow
Extract a ``Paper`` from a typed ``PaperInput``. See design doc §4.1 for the rationale on each kwarg. ``memory`` is a PR6 placeholder — non-N
quantmind/flows/paper.py:64
↓ 8 callers
Function
read_local_file
Read a file from disk into a ``Fetched`` value. Args: path: Path to the file. Tilde and relative paths are accepted; both are
quantmind/preprocess/fetch/local.py:32
↓ 7 callers
Function
_format_by_content_type
Route a ``Fetched`` payload through the right format helper.
quantmind/flows/paper.py:161
↓ 7 callers
Function
_make_tree
Three-level tree: root ├── a │ ├── a1 │ └── a2 └── b
tests/knowledge/test_tree.py:26
↓ 7 callers
Function
_pydantic_schema_str
Render a JSON-schema-ish description for resolver instructions. Cases handled: 1. ``Annotated[X, ...]`` — peel via ``__metadata__`` and recu
quantmind/magic.py:162
↓ 7 callers
Function
collapse_whitespace
Collapse runs of horizontal whitespace; keep paragraph breaks. Preserves single and double newlines (the markdown-paragraph signal) but colla
quantmind/preprocess/clean.py:55
↓ 7 callers
Function
normalize_unicode
Apply NFKC + ligature/smart-quote normalisation + control-char drop. Order matters: NFKC first (so e.g. fullwidth digits collapse to ASCII),
quantmind/preprocess/clean.py:38
↓ 6 callers
Function
_crossref_payload
(**overrides)
tests/preprocess/fetch/test_doi.py:16
↓ 6 callers
Function
_fetch_and_format
Dispatch on the input variant; return (markdown, source metadata).
quantmind/flows/paper.py:117
↓ 6 callers
Function
_now
()
tests/knowledge/test_news.py:12
↓ 6 callers
Function
_src
(kind: str = "manual")
tests/knowledge/test_roundtrip.py:30
↓ 6 callers
Function
fetch_arxiv
Fetch arXiv metadata and PDF bytes for a single paper. Args: id_or_url: ArXiv id, ``arXiv:`` prefixed string, or full ``arxiv
quantmind/preprocess/fetch/arxiv.py:77
↓ 6 callers
Function
fetch_url
GET ``url`` and return the body as ``Fetched``. Streams the response so we can short-circuit on payloads larger than ``max_bytes`` without bu
quantmind/preprocess/fetch/http.py:26
↓ 6 callers
Function
html_to_markdown
Convert an HTML document into markdown. Args: html: Raw HTML source as a string. Pass already-decoded text — the fetch layer
quantmind/preprocess/format/html.py:25
↓ 6 callers
Function
pdf_to_markdown
Convert PDF bytes to a plain-text/markdown string. PyMuPDF returns plain text rather than rich markdown — there is no structural tree (headin
quantmind/preprocess/format/pdf.py:44
↓ 5 callers
Function
_introspect_flow_signature
Return ``(input_annotation, cfg_type)`` for a flow function. ``input_annotation`` is returned as-is — it may be a discriminated- union alias
quantmind/magic.py:118
↓ 5 callers
Function
_strip_optional
Peel ``T | None`` / ``Optional[T]`` to return the inner T.
quantmind/magic.py:152
↓ 5 callers
Function
dedupe_lines
Drop consecutive duplicate lines. Useful for killing repeated PDF page headers/footers ("Page 3 of 12", journal banners) without touching leg
quantmind/preprocess/clean.py:71
↓ 4 callers
Function
_collect_hooks
Return hooks in run order: memory hooks first (PR6), then extras.
quantmind/flows/_runner.py:62
↓ 4 callers
Function
_compose_hooks
Merge multiple `RunHooks` into one (the SDK takes a single instance).
quantmind/flows/_runner.py:75
↓ 4 callers
Function
_now
()
tests/knowledge/test_paper.py:12
↓ 4 callers
Function
_src
()
tests/knowledge/test_paper.py:16
↓ 4 callers
Method
embedding_text
(self)
tests/knowledge/test_base.py:83
↓ 4 callers
Function
resolve_magic_input
Parse ``natural_language`` into ``(input_obj, cfg_obj)`` for ``target_flow``. Args: natural_language: User-supplied free-form description
quantmind/magic.py:62
↓ 4 callers
Method
root
(self)
quantmind/knowledge/_tree.py:59
↓ 4 callers
Function
run_with_observability
Build `RunConfig` + composed hooks, run the agent, return final output. Args: agent: The Agents SDK ``Agent`` to invoke. input: P
quantmind/flows/_runner.py:17
↓ 3 callers
Function
_compose_instructions
Render the system instructions, appending ``extra`` if provided.
quantmind/flows/paper.py:177
↓ 3 callers
Function
_format_input
Concatenate metadata + content into the prompt the agent sees.
quantmind/flows/paper.py:191
↓ 3 callers
Function
_now
()
tests/knowledge/test_factor.py:10
↓ 3 callers
Function
_now
()
tests/knowledge/test_earnings.py:10
↓ 3 callers
Function
_single_node_paper
(**overrides)
tests/knowledge/test_paper.py:20
↓ 3 callers
Function
_src
()
tests/knowledge/test_factor.py:14
↓ 3 callers
Function
_src
()
tests/knowledge/test_earnings.py:14
↓ 3 callers
Function
_src
()
tests/knowledge/test_news.py:16
↓ 3 callers
Function
_stub_arxiv_result
( *, pdf_url: str = "https://arxiv.org/pdf/2401.12345v1", title: str = "A Test Paper", )
tests/preprocess/fetch/test_arxiv.py:19
↓ 3 callers
Method
find_path
Root-to-node path. Empty if `node_id` is not in the tree.
quantmind/knowledge/_tree.py:76
↓ 3 callers
Function
setup_logger
Set up a logger with consistent formatting and optional colors. Args: name: Logger name (defaults to 'quantmind') level: Logging
quantmind/utils/logger.py:80
↓ 3 callers
Function
to_utc
Return a UTC-aware datetime equivalent to ``dt``. Naive inputs are *interpreted* as UTC (we do not guess local time). Aware inputs are conver
quantmind/preprocess/time.py:28
↓ 2 callers
Function
_archive_run_artifacts
No-op stub. PR6 writes a trajectory record under ``<memory_dir>/runs/``. Kept as a real call site (rather than commented-out) so PR6 changes
quantmind/flows/_runner.py:126
↓ 2 callers
Method
_build_paper
(self)
tests/knowledge/test_roundtrip.py:95
↓ 2 callers
Function
_ext
()
tests/knowledge/test_roundtrip.py:34
↓ 2 callers
Function
_now
()
tests/knowledge/test_thesis.py:10
↓ 2 callers
Function
_src
()
tests/knowledge/test_thesis.py:14
↓ 2 callers
Method
embedding_text
Default: title + summary. Override per domain if needed.
quantmind/knowledge/_tree.py:42
↓ 2 callers
Method
embedding_text
(self)
quantmind/knowledge/factor.py:21
↓ 2 callers
Method
format
Format the log record with colors.
quantmind/utils/logger.py:53
↓ 2 callers
Method
freshness
Time elapsed since ``as_of``. Defaults ``now`` to ``utcnow()``.
quantmind/knowledge/_base.py:118
↓ 2 callers
Method
is_extracted
True iff the item came from an LLM flow (vs hand-curated).
quantmind/knowledge/_base.py:114
↓ 2 callers
Method
on_llm_start
(self, *_: Any, **__: Any)
tests/flows/test_runner.py:26
↓ 2 callers
Method
walk_dfs
Depth-first traversal starting at the root.
quantmind/knowledge/_tree.py:66
↓ 2 callers
Method
with_tags
Return a copy with extra tags appended (frozen-friendly). Duplicates are skipped so the operation is idempotent.
quantmind/knowledge/_base.py:123
↓ 1 callers
Function
_format_authors
(items: list[dict[str, str]] | None)
quantmind/preprocess/fetch/doi.py:65
↓ 1 callers
Function
_infer_content_type
(path: Path)
quantmind/preprocess/fetch/local.py:26
↓ 1 callers
Function
_normalize_doi
Strip common decorations from a user-supplied DOI string.
quantmind/preprocess/fetch/doi.py:36
↓ 1 callers
Function
_now
()
tests/knowledge/test_tree.py:14
↓ 1 callers
Function
_parse_crossref_date
Convert Crossref's ``date-parts: [[YYYY, MM, DD]]`` to a UTC datetime. Crossref returns date-parts arrays where missing components are simply
quantmind/preprocess/fetch/doi.py:46
↓ 1 callers
Function
_src
()
tests/knowledge/test_tree.py:18
↓ 1 callers
Function
_to_utc
(dt: datetime | None)
quantmind/preprocess/fetch/arxiv.py:60
↓ 1 callers
Method
children_of
(self, node_id: UUID)
quantmind/knowledge/_tree.py:62
↓ 1 callers
Method
embedding_text
(self)
quantmind/knowledge/thesis.py:20
↓ 1 callers
Method
embedding_text
(self)
quantmind/knowledge/earnings.py:23
↓ 1 callers
Method
embedding_text
(self)
quantmind/knowledge/paper.py:51
↓ 1 callers
Method
embedding_text
(self)
quantmind/knowledge/news.py:23
↓ 1 callers
Function
get_logger
Get a logger instance with QuantMind formatting and optional colors. Args: name: Logger name (usually __name__) level: Optional l
quantmind/utils/logger.py:140
↓ 1 callers
Method
on_agent_end
(self, *_: Any, **__: Any)
tests/flows/test_runner.py:35
↓ 1 callers
Method
on_agent_start
(self, *_: Any, **__: Any)
tests/flows/test_runner.py:32
↓ 1 callers
Method
on_handoff
(self, *_: Any, **__: Any)
tests/flows/test_runner.py:38
↓ 1 callers
Method
on_llm_end
(self, *_: Any, **__: Any)
tests/flows/test_runner.py:29
↓ 1 callers
Method
on_tool_end
(self, *_: Any, **__: Any)
tests/flows/test_runner.py:44
↓ 1 callers
Method
on_tool_start
(self, *_: Any, **__: Any)
tests/flows/test_runner.py:41
↓ 1 callers
Function
preview_resolve
Resolve and pretty-print the result without invoking the flow.
quantmind/magic.py:101
↓ 1 callers
Function
run_one
(i: int, inp: InputT)
quantmind/flows/batch.py:108
Method
__init__
Initialize the colored formatter. Args: *args: Positional arguments passed to parent Formatter use_color: Whether to
quantmind/utils/logger.py:32
Method
__init__
(self, inner: list[RunHooks[Any]])
quantmind/flows/_runner.py:94
Method
__init__
(self, label: str, log: list[tuple[str, str]])
tests/flows/test_runner.py:22
Method
__init_subclass__
(cls, **kwargs: Any)
quantmind/knowledge/_graph.py:34
Method
_capture_agent
(*_a: object, **kwargs: object)
tests/test_magic.py:110
Method
_capture_agent
(*_a: Any, **kwargs: Any)
tests/flows/test_paper.py:245
Function
_extract_sync
(html: str, *, strip_boilerplate: bool)
quantmind/preprocess/format/html.py:13
Function
_extract_text_sync
(pdf_bytes: bytes)
quantmind/preprocess/format/pdf.py:21
Function
_fetch_metadata_sync
(arxiv_id: str)
quantmind/preprocess/fetch/arxiv.py:68
Method
bad
(*, cfg: PaperFlowCfg | None = None)
tests/test_magic.py:48
Function
configure_logging
Configure global logging settings for QuantMind. Args: level: Global logging level use_color: Whether to use colors (auto-detect
quantmind/utils/logger.py:175
Function
create_demo_logger
Create a demo logger to show color capabilities. Returns: Demo logger instance
quantmind/utils/logger.py:199
Method
embedding_text
Return the canonical string the store should embed for this item. Flatten subclasses: typically ``summary + key attrs``. Tree subclas
quantmind/knowledge/_base.py:99
Method
embedding_text
Default: root node's embedding text. Override per domain if needed.
quantmind/knowledge/_tree.py:89
Method
failures
Alias for ``errors`` to mirror ``successes`` for symmetry.
quantmind/flows/batch.py:46
Method
flow
(input: RawText, *, cfg: Any = None)
tests/flows/test_batch.py:31
Method
on_agent_end
(self, *args: Any, **kwargs: Any)
quantmind/flows/_runner.py:109
Method
on_agent_start
(self, *args: Any, **kwargs: Any)
quantmind/flows/_runner.py:105
next →
1–100 of 343, ranked by callers