Skip to content

Instantly share code, notes, and snippets.

View tcapelle's full-sized avatar
😄
happy

Thomas Capelle tcapelle

😄
happy
View GitHub Profile
@tcapelle
tcapelle / pixtral.py
Last active September 24, 2024 13:59
from mistralai import Mistral
import os
import weave
weave.init("pixtral")
print("1. La Platforme Mistral")
api_key = os.environ["MISTRAL_API_KEY"]
model = "pixtral-12b-2409"
@tcapelle
tcapelle / weave_docs_dump.py
Last active July 31, 2024 13:19
Dump all weave docs into a single MD file
from dataclasses import dataclass
from pathlib import Path
import simple_parsing
# clone weave:
# git clone https://github.com/wandb/weave
WEAVE_DOCS_PATH = Path("weave/docs/docs")
@dataclass
name: Build and Test Locally
on:
workflow_dispatch: #allows repo admins to trigger this workflow from the Actions tab
inputs:
create_github_issue:
type: boolean
description: 'Create issues on failing notebooks'
default: false
nbs_list:
type: choice
@tcapelle
tcapelle / useful_stuff.md
Last active November 8, 2023 16:59
Useful Command and more

Linux

Setup

When setting up a fresh VM.

sudo apt update
sudo apt-get install vim tmux wget
@tcapelle
tcapelle / wine_list.md
Last active October 26, 2023 15:41
Wine List in France

My Personal Top Wines: by Region

This is an arbitrary good list of wines I like, don't be offended if your favorite wine is not there. I have limited tasting time, and have mostly choose little family owned producers

Everything here is Organic, most are biodynamic and some are natural.

I have visited most of the winerys myself, and now I order directly from them or by my local wine-shop that actually helps me find more wine of this quality.

Loire

Probably my fav white wine region, I love the floral and sometimes minerality of these wines. There is always a good reason to open any of these bottles. It is also a very beautiful region to visit where you find accomodation on old castles like Chteau de Beaujeu.

import wandb
from wandb import Api
api = Api()
ENTITY = "fastai"
PROJECT = "fine_tune_timm"
project = api.project(PROJECT, entity=ENTITY)
sweeps = project.sweeps()
import os
import openai
from rich.console import Console
console = Console()
openai.api_key = os.getenv("OPENAI_API_KEY")
history = [{"role": "system", "content": "You are a helpful assistant."},]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import wandb
import timm
import argparse
from fastai.vision.all import *
from fastai.callback.wandb import WandbCallback
from torchvision import models
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--batch_size', type=int, default=64)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.