Skip to content

Instantly share code, notes, and snippets.

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

Sani khursani8

🏠
Working from home
View GitHub Profile
@khursani8
khursani8 / nvidia-reinstall.sh
Created April 30, 2019 02:46 — forked from morgangiraud/nvidia-reinstall.sh
Script to reinstall manually nvidia drivers,cuda 9.0 and cudnn 7.1 on Ubuntu 16.04
# Remove anything linked to nvidia
sudo apt-get remove --purge nvidia*
sudo apt-get autoremove
# Search for your driver
apt search nvidia
# Select one driver (the last one is a decent choice)
sudo apt install nvidia-370
@khursani8
khursani8 / test.js
Created September 17, 2019 16:00
node performance test
let crypto = require('crypto');
const salt = 'lone-star',
iterations = 10000,
len = 16,
digest = 'sha512';
const REPEATS = 10;
const NUMBER_COUNT = 10000000;
@khursani8
khursani8 / cml.sh
Last active December 3, 2020 14:00
cml colab
set -ex
echo $(pwd)
RUNNER_PATH=/home/runner
RUNNER_ALLOW_RUNASROOT=1
mkdir ${RUNNER_PATH}
cd ${RUNNER_PATH}
echo $(pwd)
echo $1
echo $2
# echo -e RUNNER_ALLOW_RUNASROOT=1\\nRUNNER_LABELS=cml,gpu\\nRUNNER_IDLE_TIMEOUT=72000\\nRUNNER_PATH\\nRUNNER_REPO=$1\\nrepo_token=$2\\n > /home/runner/.env
@khursani8
khursani8 / copy_templates.sh
Last active May 19, 2021 04:35
create new event based on templates
cp -r apps/events/templates/129 apps/events/templates/131
mkdir -p static/bundles/131
cp -r static/bundles/129/* static/bundles/131/
mkdir -p static/images/events/131
cp -r static/images/events/129/* static/images/events/131/
mkdir -p static/src/js/events/131
cp -r static/src/js/events/129/* static/src/js/events/131/
mappings = {
'a':'a',
'i':'i',
'u':'u',
'e':'e',
'o':'o',
'ka':'ka',
'ki':'ki',
'ku':'ku',
// Create a function to check for the live preview
function checkLivePreview() {
console.log("123")
var script = document.createElement('script');script.src = "https://code.jquery.com/jquery-3.4.1.min.js";document.getElementsByTagName('head')[0].appendChild(script);
// const parentElement = document.querySelector('gradio-app');
// const shadowRoot = parentElement.shadowRoot;
const livePreview = document.querySelector('.livePreview');
// const livePreview = $('.livePreview');
if (livePreview) {
// Initialize variables to hold highest resolution and corresponding image node
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
"ID","time","name","weights alpha","weights beta","model A","model B","model C","alpha","beta","mode","use MBW","plus lora","custum name","save setting","use ID"
1,2023.03.11 21.06.40,"cosmix_10 x (1-alpha) + Basil_mix_fixed x alpha (0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5)","0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5","0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2",69407300d9,0ff127093f,,0.25,0.25,Weight sum:A*(1-alpha)+B*alpha,True,,,"['image', 'PNG info']",
2,2023.03.11 21.07.20,"cosmix_10 x (1-alpha) + Basil_mix_fixed x alpha (0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5)","0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5","0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2
import openai
from pdb import set_trace
import time
start = time.monotonic()
openai.api_base = "http://34.16.147.202/v1"
openai.api_key = "test"
# prompt = "Apakah ibu negara malaysia?" # warm up prompt
prompt = "Siapakah perdana menteri malaysia sekarang?"
messages = [
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Here's the text you requested in a code block:
txt
Copy code
You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture.
Knowledge cutoff: 2023-04
Current date: 2023-11-29
Image input capabilities: Enabled
# Tools