Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
sudo apt update
sudo apt install fuse libfuse3-dev libicu-dev bzip2 libbz2-dev cmake git libattr1-dev zlib1g-dev g++
sudo snap install cmake --classic
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$(: !550 ) idle3.10
2023-04-24 14:24:52.856 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:24:53.243 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.062 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.076 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.168 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.179 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.184 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.195 Python[69630:507872] +[CATransaction synchronize] called within transaction
2023-04-24 14:32:36.201 Python[69630:507872] +[CATransaction synchronize] called within transaction
@zitterbewegung
zitterbewegung / gist:7c6f737bbfc41b09dbe714e9c078408d
Created March 24, 2023 23:01
Give me a recipe for Spanish american French toast pizza as it would be made in China
Spanish American French Toast Pizza with a Chinese Twist is an interesting fusion dish that combines elements from different cuisines. Here's a recipe to create this unique dish:
Ingredients:
6 slices of white bread or French baguette
3 eggs
1 cup milk
1/4 cup granulated sugar
1 teaspoon vanilla extract
1/2 teaspoon cinnamon
(venv) # Exit:0 2023-03-12 16:59:27 [r2q2@Reformer#[:~/opt/llama.cpp]
$(: !605 ) ./main -m ./models/65B/ggml-model-q4_0.bin -t 8 -n 128
main: seed = 1678658429
llama_model_load: loading model from './models/65B/ggml-model-q4_0.bin' - please wait ...
llama_model_load: n_vocab = 32000
llama_model_load: n_ctx = 512
llama_model_load: n_embd = 8192
llama_model_load: n_mult = 256
llama_model_load: n_head = 64
llama_model_load: n_layer = 80
@zitterbewegung
zitterbewegung / tweet2toot.py
Created November 22, 2022 18:51
Simple script to upload your twitter tweets from a twitter.js file to a mastodon server. NOTE: only upload around 600 at a time or contact the server owners or you can be banned.
#!/usr/bin/env python3
from mastodon import Mastodon
import re
import json
def main(api_base_url: str, client_id: str, secret: str,username: str, password:str, tweets= 'tweets.js': str, listed=True: bool)-> str:
Mastodon.create_app(
'pytooterapp',
api_base_url = api_base_url,
@zitterbewegung
zitterbewegung / Saturday.py
Last active February 11, 2023 20:48
Source code for vocal assistant.
#!/usr/bin/env python3
from transformers import pipeline
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import os
import time
import speech_recognition as sr
import pyttsx3
@zitterbewegung
zitterbewegung / Chapter 3
Last active June 18, 2021 18:36
The Virginity of the world's greatest gamer written by GPTJ
{
"query": "http://10.1.10.182:8000/engines/completions?prompt=Create%20a%20story%20about%20The%20virginity%20of%20the%20world%E2%80%99s%20greatest%20gamers.&max_tokens=5000&temperature=0.9&top_p=1&top_k=40&n=1&stream=false&echo=false&presence_penalty=0.0001&frequency_penalty=0.0001&best_of=1&recursive_depth=0&recursive_refresh=0
",
"id": "",
"object": "text_completion",
"created": "",
"model": "GPT-J-6B",
"choices": [
{
"prompt": "Create a story about The virginity of the world’s greatest gamers.",
@zitterbewegung
zitterbewegung / export_bert_to_coreml.py
Created June 10, 2021 13:25
Can't figure out the shape of an input to bert.
from transformers import BertModel, BertTokenizer, BertConfig
import torch
import coremltools as ct
import torch
import torchvision
enc = BertTokenizer.from_pretrained("bert-base-uncased")
# Tokenizing input text
#!/usr/bin/env python3
Copyright 2020 Joshua Jay Herman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0