Skip to content

Instantly share code, notes, and snippets.

View jeanmidevacc's full-sized avatar

Jean-Michel Daignan jeanmidevacc

View GitHub Profile
name: CI
on:
push:
branches: [main]
tags: ["v*.*.*"]
pull_request:
branches: [main]
jobs:
# formatting check
ruff format --check .
# linter check
ruff check .
# to run all the tests in the test folder
pytest
> tests/integration/test_agent_play.py ........ [ 3%]
tests/integration/test_game_flow.py ...................... [ 12%]
tests/integration/test_logging.py ....... [ 15%]
tests/unit/agents/test_base.py ....... [ 18%]
tests/unit/dungeon/test_card_pool.py ......................... [ 28
### Part around unit tests
import pytest
from pyscoundrel.models.card import Card, CardType
pytestmark = pytest.mark.unit
class TestCardFromDungeonCard:
def test_creates_card_with_correct_fields(self):
# Check dist are ok
twine check dist/*
# Upload to pypi (when local setup is done , advice use api way)
twine upload dist/*
# upload to test pypi
twine upload --repository testpypi dist/*
"""Game engine for PyScoundrel."""
from typing import TYPE_CHECKING, Optional
from ..dungeon import Dungeon
from ..models import Card, CardType, Deck, Player, Room, Weapon
from .actions import ActionResult
from .state import GamePhase, GameState
if TYPE_CHECKING:
# basic cmd
python -m build
# Select the outputs
python -m build --wheel # wheel only (faster, skips sdist)
python -m build --sdist # sdist only
## A lot of logs diverse to have finiw with that in a dist/ folder
Successfully built pyscoundrel-0.1.7.tar.gz and pyscoundrel-0.1.7-py3-none-any.whl
@jeanmidevacc
jeanmidevacc / .py
Created March 5, 2026 02:19
illustration_voyager_usage.py
from voyager import Index, Space
# sharing also the chunking function
def chunk_dfp(df, chunk_size):
"""Yield successive n-sized chunks from df."""
for i in range(0, len(df), chunk_size):
yield df.iloc[i:i + chunk_size]
index = Index(
space=Space.Cosine,

Prompt

Help me build a Jekyll website with the following requirements:

  • Personal blog / portfolio for a Data Scientist / Machine Learning Engineer
  • Articles support categories and tags
  • Each article has a cover image visible in article listing pages
  • A search feature allowing search by article title and tags

Site structure

# How to colect table versions
query = f"""
SELECT *
FROM (DESCRIBE HISTORY name_of_the_table)
WHERE timestamp >= '{start_date.strftime('%Y-%m-%d %H:%M:%S')}';
"""
# How to get a specific version
dfs_recommendations = spark.read.format("delta").option("versionAsOf", version_id).table(f"name_of_the_table")