Skip to content

Instantly share code, notes, and snippets.

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

George Alexandrou rumbis

🏠
Working from home
  • Cyprus
View GitHub Profile
@rumbis
rumbis / txt
Created June 29, 2024 00:08 — forked from patrickstorm/txt
Perfect Prompt Builder
You are an expert prompt engineer. Your task is to deeply understand what I want, and in return respond with a well crafted prompt that, if fed to a separate AI, will get me exactly the result I want.
The prompt follows this rough outline, and makes sure to include each part as needed:
1. A persona. At the start, you write something to the affect of "Act as an expert in ..." This primes the LLM to respond from info relating to experts in the specific field.
2. The task. This part of the prompt involves exhaustively laying out the task for the LLM. It is critical this part is specific and clear. This is the most important part of the prompt.
3. Context. Make sure to include *any* context that is needed for the LLM to accurately, and reliably respond as needed.
4. Response format. Outline the ideal response format for this prompt.
5. Examples. This step is optional, but if examples would be beneficial, include them.
6. Input. If needed, leave a space in the prompt for any input data. This should be highlight
@rumbis
rumbis / avoid_colab_close.js
Created September 29, 2023 14:35 — forked from amrrs/avoid_colab_close.js
How to avoid Google Colab Session Closing automatically?
//credit - https://huggingface.co/blog/fine-tune-wav2vec2-english (Patrick von Platen)
// run this on your Chrome / Browser Console (where Colab is present)
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
var colab = setInterval(ConnectButton,60000);
# this tutorial assumes conda and git are both installed on your computer
conda create -n tg python=3.10.9
conda activate tg
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui.git
cd text-generation-webui
pip install -r requirements.txt
# GPU only:
@rumbis
rumbis / musicplayer.js
Created November 2, 2022 18:06
Build a Music Player | Vanilla JavaScript es6+ version https://www.youtube.com/watch?v=QTHRWGn_sJw
const musicContainer = document.querySelector(".music-container");
const playBtn = document.querySelector("#play");
const prevBtn = document.querySelector("#prev");
const nextBtn = document.querySelector("#next");
const audio = document.querySelector("#audio");
const progress = document.querySelector(".progress");
const progressContainer = document.querySelector(".progress-container");
const title = document.querySelector("#title");
const cover = document.querySelector("#cover");
//Song titles
{
"quizId": "3483j33",
"title": "What cheeze are you?",
"subtitle": "This quiz isn't cheezy or anything like that...",
"content": [
{
"id": 0,
"text": "Pick a vacation destination",
"questions": [
{
# ----------------------------------------------------------------------
# | Activate CORS
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js|mjs|gif|png|jpe?g|svg|svgz|ico|webp)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
@rumbis
rumbis / proxy-pass-with-apache2.4-to-appwrite.txt
Last active October 3, 2022 02:10
proxypass with apche 2.4 appwrite
SuexecUserGroup "#1020" "#1007"
ServerName example.example.example
ServerAlias www.example.example.example
ServerAlias mail.example.example.example
ServerAlias webmail.example.example.example
ServerAlias admin.example.example.example
DocumentRoot /home/example/public_html
ErrorLog /var/log/virtualmin/example.example.example_error_log
CustomLog /var/log/virtualmin/example.example.example_access_log combined
ScriptAlias /cgi-bin/ /home/example/cgi-bin/
@rumbis
rumbis / drag-drop-vanilla-javascript.markdown
Created August 9, 2022 21:17
Drag & Drop - Vanilla JavaScript
@rumbis
rumbis / Docker on Termux answerfile
Created January 2, 2022 04:30 — forked from oofnikj/answerfile
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@rumbis
rumbis / xrdpaudio installer
Last active December 30, 2021 00:08 — forked from rkttu/readme.txt
Ubuntu 20.04 + WSL 2 + XRDP PulseAudio
# Credits
# https://c-nergy.be/blog/?p=13655
# https://askubuntu.com/questions/844245/how-to-compile-latest-pulseaudio-with-webrtc-in-ubuntu-16-04
# https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list
# https://unix.stackexchange.com/questions/65167/enable-udev-and-speex-support-for-pulseaudio
# https://rudd-o.com/linux-and-free-software/how-to-make-pulseaudio-run-once-at-boot-for-all-your-users
# First, you should install XRDP and X11 Desktop Environment first.
# Step 1 - Install Some PreReqs