Skip to content

Instantly share code, notes, and snippets.

@kohya-ss
kohya-ss / gradio_llm.py
Last active April 19, 2024 14:31
gradioでLLMを利用する簡易クライアント
# Apache License 2.0
# 使用法は gist のコメントを見てください
import argparse
from typing import List, Optional, Union, Iterator
from llama_cpp.llama_chat_format import _convert_completion_to_chat, register_chat_completion_handler
import llama_cpp.llama_types as llama_types
from llama_cpp.llama import LogitsProcessorList, LlamaGrammar
from llama_cpp import Llama, llama_chat_format
import gradio as gr
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@0xdevalias
0xdevalias / reverse-engineering-macos.md
Last active April 19, 2024 14:30
Some notes, tools, and techniques for reverse engineering macOS binaries
@niw
niw / uninstall_xquartz.sh
Last active April 19, 2024 14:28
A simple XQuartz uninstall script
#!/usr/bin/env bash
set -e
[[ $USER == "root" ]] || {
echo "You must be root to run this script." >&2
exit 1
}
echo "Unload launchd daemons and agents..."
@0xdevalias
0xdevalias / reverse-engineering-webpack-apps.md
Last active April 19, 2024 14:27
Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue) apps
@davidedmundson
davidedmundson / PlasmaNested.sh
Last active April 19, 2024 14:27
Run plasma from within gamescope
#!/bin/sh
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
## whilst being launched by plasma-session
mkdir $XDG_RUNTIME_DIR/nested_plasma -p
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
#!/bin/sh
@rxaviers
rxaviers / gist:7360908
Last active April 19, 2024 14:26
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@aerobounce
aerobounce / macOS System Preference Pane Links.md
Last active April 19, 2024 14:26
macOS System Preference Pane Links
@scriptdev
scriptdev / .php
Last active April 19, 2024 14:25
DEFINIR O CLIQUE OU FOCO NO BOTÃO AO TECLAR O ENTER
<?php
// DEFINA UM ID PARA O BOTÃO
$btn_pesquisar->id = 'btn_pesquisar';
// ROTINA JAVASCRIPT PARA DÁ O FOCO OU CLICAR NO BOTÃO AO PRESSIONAR O ENTER
TScript::create('
$(document).keyup(function(e) {
if(e.which == 13) $("#btn_pesquisar").click();
});
@scriptdev
scriptdev / .php
Last active April 19, 2024 14:25
LIMPAR COMBO "TCombo" NO FORMULÁRIO
<?php
TCombo::clearField(self::$formName, 'nome_combo');
/*
FABRÍCIO ALMEIDA
PROGRAMADOR DESKTOP, WEB e MOBILE
CONSULTORIAS E ORÇAMENTO:
WHATSAPP (83) 98655-6461
*/