Skip to content

Instantly share code, notes, and snippets.

View letrongminh's full-sized avatar

Trong-Minh Le letrongminh

  • Vietnam
  • 19:27 (UTC +03:00)
View GitHub Profile
@letrongminh
letrongminh / grpo_demo.py
Created January 30, 2025 12:04 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@letrongminh
letrongminh / How enable SQL Server Agent in docker container existing.md
Last active October 15, 2024 03:35
How enable SQL Server Agent in docker container existing

If you've already created a Docker container with something like SQL Server 2019 Developer edition:

$ docker run -e ACCEPT_EULA=Y -e MSSQL_PID=Developer -e MSSQL_SA_PASSWORD=YourStrongPassw0rd -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest

With reference to Configure SQL Server on Linux with the mssql-conf tool, get a root shell in the container:

$ docker exec -it --user root 57301203bac5 bash

If you want to run docker as non-root user then you need to add it to the docker group.

  1. Create the docker group if it does not exist
$ sudo groupadd docker
  1. Add your user to the docker group.
import cv2
import numpy as np
# Loading the image and resize it
image = cv2.imread('Manchester_United.png')
image = cv2.resize(image, (1280, 720))
# Convert the color space from BGR to HSV
image_hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)