Skip to content

Instantly share code, notes, and snippets.

View galleon's full-sized avatar
🏠
Working from home

Guillaume Alleon galleon

🏠
Working from home
  • Toulouse
  • 05:15 (UTC +02:00)
View GitHub Profile
import argparse
import json
import os
import sys
import time
import uuid
import pandas as pd
from dotenv import load_dotenv
from tqdm import tqdm
from loguru import logger
llama_new_context_with_model: n_ctx = 2048
llama_new_context_with_model: freq_base = 1000000.0
llama_new_context_with_model: freq_scale = 1
ggml_metal_init: allocating
ggml_metal_init: found device: Apple M3 Max
ggml_metal_init: picking default device: Apple M3 Max
ggml_metal_init: default.metallib not found, loading from source
ggml_metal_init: GGML_METAL_PATH_RESOURCES = /var/folders/vd/flj90b5128xfgcsxgjf4_r7m0000gn/T/ollama2312987543
ggml_metal_init: loading '/var/folders/vd/flj90b5128xfgcsxgjf4_r7m0000gn/T/ollama2312987543/ggml-metal.metal'
ggml_metal_init: GPU name: Apple M3 Max
@galleon
galleon / day15.py
Created December 15, 2021 16:34
day15.py revisited
class AdventDay15(AdventDay):
def __init__(self, test: bool = False):
super().__init__(day=15, test=test)
def load_input(self):
print("Loading input...")
outputs = []
with open(self.filename, "r") as f:
lines = f.readlines()
@galleon
galleon / day15.py
Created December 15, 2021 12:08
Part of day 15 for 2021
class AdventDay15(AdventDay):
def __init__(self, test: bool = False):
super().__init__(test=test)
def load_input(self):
print("Loading input...")
outputs = []
with open(self.filename, "r") as f:
lines = f.readlines()
@galleon
galleon / SETUP_DAY.md
Created May 10, 2021 10:24
Starting my coding journey...
error: can't copy 'build/lib.macosx-10.15-x86_64-3.8/skdecide/hub/.cpython-38-darwin.so': doesn't exist or not a regular file
----------------------------------------
Rolling back uninstall of scikit-decide
Moving to /Users/alleon_g/Library/Caches/pypoetry/virtualenvs/scikit-decide-5gp3ZELx-py3.8/lib/python3.8/site-packages/scikit_decide-0.9.1.dist-info/
from /Users/alleon_g/Library/Caches/pypoetry/virtualenvs/scikit-decide-5gp3ZELx-py3.8/lib/python3.8/site-packages/~cikit_decide-0.9.1.dist-info
Moving to /Users/alleon_g/Library/Caches/pypoetry/virtualenvs/scikit-decide-5gp3ZELx-py3.8/lib/python3.8/site-packages/skdecide/
from /Users/alleon_g/Library/Caches/pypoetry/virtualenvs/scikit-decide-5gp3ZELx-py3.8/lib/python3.8/site-packages/~kdecide
ERROR: Command errored out with exit status 1: /Users/alleon_g/Library/Caches/pypoetry/virtualenvs/scikit-decide-5gp3ZELx-py3.8/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/alleon_g/Documents/0x-TechWork/s
[tool.poetry]
name = "scikit-decide"
version = "0.9.1"
description = "The scikit-decide Python project"
authors = ["tog <guillaume.alleon@gmail.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://airbus.github.io/scikit-decide/"
repository = "https://github.com/galleon/scikit-decide"
keywords = ["reinforcement learning", "planning", "scheduling"]
@galleon
galleon / test_cgp.py
Created February 2, 2021 20:31
hal-cgp issue
from random import randint
from time import perf_counter
import cgp
def display_msg(msg: str, no_skip: bool):
if no_skip:
print(msg, flush=True)
current_best_func = None
@galleon
galleon / delete_git_submodule.md
Created August 18, 2020 10:24 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.