Skip to content

Instantly share code, notes, and snippets.

View BoQsc's full-sized avatar
💭
I may be slow to respond.

Feldwor BoQsc

💭
I may be slow to respond.
  • Public Domain
  • Baltic States
  • 22:04 (UTC +02:00)
View GitHub Profile
@BoQsc
BoQsc / V2groqfactcheckerllm.py
Last active September 3, 2024 19:38
groq factchecker llm
from groq import Groq
#Give me list of built-in python libraries for UI that require no installation in cross-platform way
# who were all characters in Serial Experiments Lain anime
# what was the first version of python?
# Initialize the Groq client
api_key = "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"
client = Groq(api_key=api_key)
# User input
prompt = input("Enter your statement: ")
@BoQsc
BoQsc / gist:ad1e1526f3e7c2e7cfa663736366dfc4
Created August 3, 2024 08:11
Third party CORS demo for fetching user profile of steam using pure clientside javascript.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fetch and Display Image</title>
<style>
#avatar {
max-width: 100%;
height: auto;
@BoQsc
BoQsc / 7DTD_Steam_Link_26900_HTTP_Redirect.py
Last active July 23, 2024 17:19
A simple 7 Days To Die TCP HTTP Steam Link redirecter. Once you visit the webpage, it opens up steam://connect/127.0.0.1:26900 link that auto joins player to the gameserver. This is only a proof of concept, replace 127.0.0.1 with your Public IP.
@BoQsc
BoQsc / find_python_installation.cmd
Last active July 21, 2024 07:27
How to find the python executable on Windows.
@ECHO OFF
python -c "import sys; print(sys.executable)"
PAUSE
@BoQsc
BoQsc / install_requests.py
Created July 21, 2024 07:05
How to install pip requests using cross platform python script.
import subprocess
import sys
def install_package(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
def check_and_install_requests():
try:
import requests
print("The 'requests' library is already installed.")
@BoQsc
BoQsc / install_python.cmd
Last active July 21, 2024 07:02
How to install latest stable Python on Windows via Command Line.
@ECHO OFF
python --version 3>NUL
if errorlevel 1 winget install Python --silent --accept-package-agreements --accept-source-agreements
PAUSE
@BoQsc
BoQsc / NEW0517-defaultGPT4-web-browsing.user.js
Last active May 17, 2023 17:49
ChatGPT Plus: default GPT4 web browsing. Userscript for Tampermonkey or Greasemonkey that sets the LLM default model in the https://chat.openai.com/ User Interface.
// ==UserScript==
// @name GPT-4 Button Auto Click
// @match https://chat.openai.com/
// @match https://chat.openai.com/?model=text-davinci-002-render-sha
// ==/UserScript==
const clickFirstDivInsideButton = () => {
let buttonNode = document.evaluate("//button[contains(., 'GPT-4')]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (buttonNode) {
let firstDivInsideButton = buttonNode.querySelector('div');
@BoQsc
BoQsc / Adding empty space to revolt chat.txt
Last active May 1, 2023 12:43
Adding empty space to revolt chat
`​  `
@BoQsc
BoQsc / gist:be2034af19b0d10da3d037ddf5f4e878
Created March 28, 2023 20:28
Screenshot example in javascript clientside
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Screenshot Demo</title>
<style>
#v,
#i {
width: 1920px;
height: 1080px;
@BoQsc
BoQsc / chatgpt-on-your-computer.md
Last active March 27, 2023 08:30
Open Source and free. Locally run 7B "ChatGPT" model named Alpaca-LoRA on your computer. A 7 Billions parameter model on your laptop.

Locally run 7B "ChatGPT" model named Alpaca-LoRA on your computer.

  1. Download 7B model alpaca model.
  2. Download client-side program for Windows, Linux or Mac
  3. Extract alpaca-win.zip
  4. Copy the previously downloaded ggml-alpaca-7b-q4.bin file into newly extracted alpaca-win folder
  5. Open command prompt and run chat.exe
  6. Type questions you would want to ask an Alpaca.

Customize: chat --threads 4 --n_predict 512 --ctx_size 2048
Help: for more options. chat --help