Skip to content

Instantly share code, notes, and snippets.

View emezac's full-sized avatar

Enrique Meza C emezac

View GitHub Profile
@emezac
emezac / grpo_demo.py
Created January 30, 2025 22:29 — 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
@emezac
emezac / messages_service.rb
Created September 12, 2023 03:20
messages_controller.rb
# app/controllers/api/v1/messages_controller.rb
class Api::V1::MessagesController < ApplicationController
before_action :set_bot
before_action :authenticate_user!
before_action :authorize_user
# GET /bots/:bot_id/messages
def index
@messages = MessagesService.new(@bot).paginate(params[:page], params[:per_page])
## Minimum dependencies
Here are the dependencies that I have installed at the moment in the VMware
<img width="907" alt="image" src="https://user-images.githubusercontent.com/1863670/221222132-90944ba1-3c69-47cb-9450-1120232ba5c7.png">
## Process and steps
1. You need to install a valid LTS node version using the `nvm` package manager, the instructions would look like this:
<img width="689" alt="image" src="https://user-images.githubusercontent.com/1863670/221223228-f0374879-2953-488d-8903-a14874f1430d.png">
Then you need to install a valid `18.xx` version, I'm currently using `18.12.0`, so the commands might look like this:
@emezac
emezac / commit
Created February 14, 2023 19:08
commit alias
#!/bin/bash
# Prompt for the type of change
echo "Enter the type of change you made (fix, feat, etc.):"
read type
# Prompt for the optional scope
echo "Enter an optional scope (in parentheses):"
read scope
@emezac
emezac / .gitconfig
Created February 14, 2023 19:08
Git Config for git alias
[merge]
tool = meld
[alias]
hello = !git-hello-world
com = !commit
@emezac
emezac / calculator.py
Created February 2, 2023 19:25
Demo created with ChatGPT
from kivymd.app import MDApp
from kivymd.uix.label import MDLabel
from kivymd.uix.screen import Screen
from kivymd.uix.textfield import MDTextField
from kivymd.uix.button import MDRectangleFlatButton
from kivy.graphics import Color, Ellipse, Line
from functools import partial
# creating Demo Class(base class)
class Demo(MDApp):
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Enrique Meza",
"label": "Senior Software Engineer at MagmaLabs",
"image": "",
"email": "[email protected]",
"phone": "",
"url": "",
"summary": "Experience in full Software development lifecycle using RUP and SCRUM methodologies with emphasis on user interface design and n-tier distributed architecture design development.\n\nJust a Couple of words: \"I love to be a software developer\".",
@emezac
emezac / sorcery.rb
Created December 13, 2021 03:52 — forked from reqshark/sorcery.rb
sorcery config file
Rails.application.config.sorcery.submodules = [:reset_password, :activity_logging, :external, :remember_me]
Rails.application.config.sorcery.configure do |config|
config.not_authenticated_action = :not_authenticated
config.save_return_to_url = true
config.cookie_domain = sorcery.kickr.io
# -- session timeout --
# config.session_timeout = 3600
# config.session_timeout_from_last_action = false
# -- activity logging --
@emezac
emezac / .txt
Created July 27, 2021 19:10
files-images
./app/views/spree/home/_best_sellers.html.erb: <%= image_tag "smoothies/blueberry-cacao-splash.png", class: "absolute show mx-auto"%>
./app/views/spree/home/_best_sellers.html.erb: <%= image_tag "smoothies/blueberry-cacao-cup.png", class: "absolute mx-auto"%>
./app/views/spree/home/_best_sellers.html.erb: <%= image_tag "smoothies/hint-of-mint-splash", class: "absolute show mx-auto"%>
./app/views/spree/home/_best_sellers.html.erb: <%= image_tag "smoothies/hint-of-mint-cup", class: "absolute mx-auto"%>
./app/views/spree/home/_best_sellers.html.erb: <%= image_tag "smoothies/dragonfruit-strawberry-splash", class: "absolute show mx-auto"%>
./app/views/spree/home/_best_sellers.html.erb: <%= image_tag "smoothies/dragonfruit-strawberry-cup", class: "absolute mx-auto"%>
./app/views/spree/home/_best_sellers.html.erb: <%= image_tag "smoothies/cherry-acai-splash", class: "absolute show mx-auto"%>
./app/views/spree/home/_best_sellers.html.erb:
{
"summary": "CPM package was created successfully at interfaces capacitor",
"packageId": fbf712d6-ea6b-4cd6-80a1-0534e370fb3f,
"create_at": 1584033297,
"userId": 539,
"saved_at": "//Deluxe/tmp/gpo_file_share",
"data": {
"cover_sheets": {
"cover_sheet": [
{