Skip to content

Instantly share code, notes, and snippets.

View AlessandroSpallina's full-sized avatar
📖
Learning

AlessandroSpallina

📖
Learning
View GitHub Profile
from cat.mad_hatter.decorators import tool, hook
from pydantic import BaseModel
from datetime import datetime
@hook
def agent_prompt_prefix(cat):
prefix = """<s>[INST] <<SYS>>
You are a drunk old man from south Italy who really wants to offer wine to everyone. Act friendly and provide concise and markdown-formatted responses to people asking you questions. Focus on delivering accurate and insightful guidance. If a question lacks context or is ambiguous, ask for additional information before generating a response to ensure accuracy. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
"""
@AlessandroSpallina
AlessandroSpallina / gist:3234af836a16446f6a3c90e0bca509d1
Created January 5, 2017 23:18
Curl command: massive shorte links with adf.ly api
curl -X POST -d "_user_id=XXXX&_api_key=XXXXXXXXXXXXXXXXXXXXX&domain=q.gs&advert_type=1&url[0]=http://google.it&url[1]=http://www.msn.com" http://api.adf.ly/v1/shorten
@AlessandroSpallina
AlessandroSpallina / Arduino mouse (message sender)
Created April 4, 2015 21:09
listati necessari per l'arduino mouse
/****************************************************************************
* Copyright © 2015 Alessandro Spallina
* email: alessandrospallina1@gmail.com
* website: aleksnote.altervista.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@AlessandroSpallina
AlessandroSpallina / gist:e1ff8ba170de32b76f66
Created April 3, 2015 11:21
Arduino button led buzzer
/****************************************************************************
* Copyright © 2015 Alessandro Spallina
* email: alessandrospallina1@gmail.com
* website: aleksnote.altervista.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
/****************************************************************************
* Copyright © 2015 Alessandro Spallina
* email: alessandrospallina1@gmail.com
* website: aleksnote.altervista.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
/*
Author: Alessandro Spallina
Website: http://aleksnote.altervista.org
Email: alessandrospallina1@gmail.com
* Creare un programma che:
- Chiede all'utente di inserire il proprio nome.
- Scrive a video "Ciao".
- Crea un thread che scrive a video "sono", aspetta
2 secondi ed esce.
/*
Author: Alessandro Spallina
Website: http://aleksnote.altervista.org
Email: alessandrospallina1@gmail.com
* Creare un programma che
- Scrive a video "Ciao".
- Crea un thread che scrive a video "Bye", aspetta
2 secondi ed esce.
- Aspetta la chiusura del thread e mette a video la
/*
Author: Alessandro Spallina
Website: http://aleksnote.altervista.org
Email: alessandrospallina1@gmail.com
* Creare un programma che:
- Scrive a video "Ciao".
- Crea un figlio.
- Aspetta il primo figlio e quando finisce ne crea
un secondo.
@AlessandroSpallina
AlessandroSpallina / fragck_v0.1.c
Created February 24, 2015 10:23
verifica la frammentazione del disco (linux)
/****************************************************************************
* Copyright © 2015 Alessandro Spallina
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@AlessandroSpallina
AlessandroSpallina / arduino1.c
Created February 24, 2015 09:51
legge stringa e lampeggia led di conseguenza
/*
Alessandro Spallina
alessandrospallina1@gmail.com
http://aleksnote.altervista.org
Lorenzo Siena
lorenzosiena91@hotmail.it
* * * * * * * * * * * * * * * * * * * * * * * * * * * *