Skip to content

Instantly share code, notes, and snippets.

View molbal's full-sized avatar
🦆

molbal molbal

🦆
View GitHub Profile
import os
from tqdm import tqdm
import ollama
directory = 'C:\\tools\\training\\illustration_pending'
model_name = 'llama3:8b-instruct-q6_K'
def rewrite_description(description):
"""
{
"ervenyes": null,
"lejarDat": "2019-12-28T21:55:39.308Z",
"okmTipus": "1",
"okmanyKep": "/9j/4AAQSkZJRgABAQEASABIAAD/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAEAAAAAAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAM7BCcDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9+KK/NSb/AIOsf2PY/wDV+JvEkn00px/7PTtO/wCDqj9kW
{
"ervenyes": null,
"lejarDat": "2019-12-28T21:55:39.308Z",
"okmTipus": "1",
"okmanyKep": "/9j/4AAQSkZJRgABAQEASABIAAD/4QEQRXhpZgAASUkqAAgAAAABAGmHBAABAAAAHAAAAAAAAAAAAAkADQECABAAAACQAAAADgECAAcAAACgAAAADwECAA0AAACoAAAAEAECAAkAAAC4AAAAOwECAA4AAADEAAAAmIICAA0AAADUAAAAA5ACABMAAADkAAAAgLwCAAUAAAD4AAAAgbwCAAYAAAAAAQAAAAAAAAAAMTkwNTIyQk1LMDEwMDAxMFVBZmFsc2UAVmlkZW9sb2d5IGluYwAAADI0WjcwNFVTQgAAAFBIT1RPU0hPUFc3LVBDAABJZG9tc29mdCBacnQuAAAAMjAxOTowNToyMiAxMzoyNjo1OQA4MjdweAAAADEwNjNweAAA/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgDUgKWAwEiAAIRAQMRAf/EAB0AAAICAwEBAQAAAAAAAAAAAAIDAAEEBQYHCAn/xABQEAABAwIFAQQFCQQHBgQGAwEBAAIRAyEEBRIxQVEGEyJhBzJxgZEUFUJSYpKhsdEjM3LBCCRDgqKy4VNjc8Lw8RYmdLM0NlSDo9IlRJO0/8QAGgEBAQEBAQEBAAAAAAAAAAAAAAECAwQFBv/EACgRAQEAAgEEAgIDAAIDAAAAAAABAhEDBBIhMRNBMlEFFCIjcUJSYf/aAAwDAQACEQMRAD8A+qVFFCgkqSqUlBcqShVoLlSVSiC5UlVyoguVJQ77K0FypKpRBcqSqUQXKkqlE
@molbal
molbal / TestConversation.php
Created July 25, 2019 14:32
Trait example
<?php
namespace App\Conversations;
use BotMan\BotMan\Messages\Conversations\Conversation;
use BotMan\BotMan\Messages\Incoming\Answer;
use BotMan\BotMan\Messages\Outgoing\Question;
use SundayIT\ChatbotAdmin\Botman\Middleware\PropertyLoggingTrait;
class TestConversation extends Conversation
@molbal
molbal / welcome.blade.php
Created July 23, 2019 16:04
Example frotnend integration
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BotMan Studio</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Barlow+Semi+Condensed:400,700&display=swap&subset=latin-ext" rel="stylesheet">
@molbal
molbal / v_listaar.sql
Created May 23, 2019 07:23
Listaár számlálás
BEGIN DECLARE v_listaar INT;
DECLARE v_euro FLOAT;
DECLARE v_ar_eur FLOAT;
SELECT listaar,
arEUR INTO v_listaar,
v_ar_eur