Skip to content

Instantly share code, notes, and snippets.

@mikeedjones
mikeedjones / async_database_session_service.py
Last active October 16, 2025 08:11
AsyncDatabaseSessionService for adk
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@mikeedjones
mikeedjones / base.py
Last active April 9, 2025 11:44
`Tool` is called from `tool_manager.py:ToolManager`. `base.py:FastMCP` declares which `ToolManager` to use.
import fastmcp
from fastmcp.exceptions import ToolError
from fastmcp.utilities.func_metadata import func_metadata, FuncMetadata
from pydantic import BaseModel, Field
import inspect
from typing import TYPE_CHECKING, Any, Callable, Optional
@mikeedjones
mikeedjones / model_validate_template.jinja2
Last active April 11, 2024 14:06
Pydantic pipeline component
# pylint: disable-all
# type: ignore
# ruff: noqa
from typing import *
from pydantic import *
# {{ autogenerated_header }}
def {{function_name}}{{function_signature}}:
{% filter indent(width=4) %}
@mikeedjones
mikeedjones / exp.py
Created May 18, 2022 07:17 — forked from LaughDonor/exp.py
Solves Torus Puzzle on Exponential Idle on Android (no root)
#!/usr/bin/env python
# coding: utf-8
# In[1]:
"""Solves Torus Puzzle on Exponential Idle on Android (no root)"""
__author__ = "Sunny Patel <github.com/laughdonor>"
from __future__ import annotations
from dataclasses import dataclass, astuple

Keybase proof

I hereby claim:

  • I am mikeedjones on github.
  • I am jonahj (https://keybase.io/jonahj) on keybase.
  • I have a public key ASAcYh6b6o411Jo1NLiU0rF1xmZCu74zbJ-qQmcaoDdUuwo

To claim this, I am signing this object: