pip install pandas Jinja2 tqdm
$ python3 secret_santa.py
Google Sheet Structure needs to have the following columns [Nom, Prenom, Email]
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # dependencies = ["rich", "ipython", "httpx", "polars-lts-cpu"] | |
| # /// | |
| # fmt: off | |
| #SBATCH --partition=cpu | |
| #SBATCH --cpus-per-task=1 | |
| #SBATCH --mem=1G | |
| #SBATCH --job-name=env-test | |
| #SBATCH --time=00:10:00 |
| #!/bin/bash | |
| # Setup console tools | |
| xcode-select --install | |
| # install brew | |
| bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| # install dependencies | |
| brew bundle --no-lock --file=/dev/stdin <<EOF |
| #!/usr/bin/env python3 | |
| import sys | |
| import argparse | |
| from pathlib import Path | |
| from typing import Optional | |
| try: | |
| from rich.console import Console | |
| from rich.tree import Tree | |
| except ImportError: |
| from datetime import datetime | |
| import contextlib | |
| from time import sleep | |
| from threading import Thread | |
| from rich.console import Console | |
| # pip install humanize | |
| import humanize | |
| """ | |
| Script to sanitize all argument files for infSim model data. | |
| - checkpoint_args.json & args.json : files used to save arguments used to train the model. | |
| ::> contain absolute paths that require to be converted to the current machine after moving the model data. | |
| """ | |
| import argparse | |
| import json | |
| from pathlib import Path |
pip install pandas Jinja2 tqdm
$ python3 secret_santa.py
Google Sheet Structure needs to have the following columns [Nom, Prenom, Email]
| """ Sample code for an tolerant to failure upload | |
| using UploadManifest class to iterate over items to upload/process | |
| UploadManifest does not close the loop if all the items do not have a status done or failed. | |
| Customisable number of retries (via argument) | |
| Checkpoint saving to local json file | |
| """ | |
| import json | |
| import random | |
| import time |
| import { Directive, HostListener} from '@angular/core'; | |
| @Directive({ | |
| selector: '[noClickable]' | |
| }) | |
| export class ComponentLockDirective { | |
| constructor() { } | |
| @HostListener('click', ['$event']) |
| class Corpus { | |
| name: string; | |
| } | |
| @TrucAngularAUZEF | |
| class MyCorporaComponent extends OnInit { | |
| listCorpora : Array<Corpus> = []; | |
| constructor(private api: MyAPIServiceDeLEspace){} |
| interface Exposable { | |
| public exposeFunctions: () => Array<string>; | |
| } | |
| // TODO: fix function prototype.add | |
| function applyMixins(derivedCtor: any, baseCtors: Array<Exposable>) { | |
| baseCtors.forEach((baseCtor) => { | |
| baseCtor.prototype.exposeFunctions().forEach(funct => { | |
| Object.setPrototypeOf(derivedCtor, { |