This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
now=$(date +"%Y %m-%d %T ns%N") | |
xclip -selection clipboard -t TARGETS -o | (while IFS= read -r line; do | |
echo $line | |
if [[ $line = image/* ]] | |
then | |
notify-send "Opening ${line} with feh" -a "(•ิ_•ิ)?" -t 2000 | |
xclip -selection clipboard -t image/png -o | feh - | |
break | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aud | |
device = aud.Device() | |
sound = aud.Sound.sawtooth(400) | |
sound2 = aud.Sound.buffer(np.array([1,2,3], dtype="float32"), 44100) | |
handle = device.play(sound); | |
handle.stop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FRAGMENT | |
#define STANDARD | |
#ifdef PHYSICAL | |
#define IOR | |
#define SPECULAR | |
#endif | |
uniform vec3 diffuse; | |
uniform vec3 emissive; | |
uniform float roughness; | |
uniform float metalness; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
from itertools import chain | |
import math | |
def convert_size(size_bytes): | |
if size_bytes == 0: | |
return "0B" | |
size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") | |
i = int(math.floor(math.log(size_bytes, 1024))) | |
p = math.pow(1024, i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set the threshold, duration (in seconds), and recording directory | |
threshold=0.2 | |
duration=10 | |
recording_dir="/mnt/tera/audio/NOISE2" | |
# Set output options | |
output_to_console=true | |
output_to_log=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"id":"chatcmpl-79TNYGf2QniAFeerg2taVUVkouz3H","object":"chat.completion.chunk","created":1682492240,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]} | |
{"id":"chatcmpl-79TNYGf2QniAFeerg2taVUVkouz3H","object":"chat.completion.chunk","created":1682492240,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"As"},"index":0,"finish_reason":null}]} | |
{"id":"chatcmpl-79TNYGf2QniAFeerg2taVUVkouz3H","object":"chat.completion.chunk","created":1682492240,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" an"},"index":0,"finish_reason":null}]} | |
{"id":"chatcmpl-79TNYGf2QniAFeerg2taVUVkouz3H","object":"chat.completion.chunk","created":1682492240,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" AI"},"index":0,"finish_reason":null}]} | |
{"id":"chatcmpl-79TNYGf2QniAFeerg2taVUVkouz3H","object":"chat.completion.chunk","created":1682492240,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":" language"},"index":0,"finish_reason":null}]} | |
{"id": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from exllama.model import ExLlama, ExLlamaCache, ExLlamaConfig | |
from exllama.lora import ExLlamaLora | |
from exllama.tokenizer import ExLlamaTokenizer | |
from exllama.generator import ExLlamaGenerator | |
from exllama import model_init | |
import argparse | |
import torch | |
import sys | |
import os | |
#import glob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
DEV = "cuda" | |
# I want a base model and this is instruct-tuned, but it will fit on my gpu | |
model_path = "microsoft/Phi-3-mini-128k-instruct" | |
model = AutoModelForCausalLM.from_pretrained( | |
model_path, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer