I hereby claim:
- I am buanzo on github.
- I am buanzo (https://keybase.io/buanzo) on keybase.
- I have a public key whose fingerprint is 7350 B06E 7AEA 78FD E739 F3AD 025A 4EB0 6857 704D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
import sys | |
import argparse | |
""" This class allows to work on getting your Argparse object | |
ready even if nothing useful happens when used. | |
Save this git on some file then import the class. | |
Usage: |
# Buanzo is a VIM scheme by Arturo 'Buanzo' Busleiman, based in gruvbox written by Pavel Pertsev | |
# Original Gruvbox version at version at https://github.com/morhetz/gruvbox | |
.colors 16 | |
# Palette | |
.set bg 0 | |
.set dark_red 124 | |
.set dark_green 106 | |
.set dark_yellow 172 |
# This code snippet shows one way we could use gpt inside a Jinja2 template | |
# to hack-around the context limitations. Have fun! And remember, the ART is the prompt... | |
# MAKE SURE you modify the 'set titulo' (titulo is title in spanish) | |
# Author: Arturo "Buanzo" Busleiman <[email protected]> | |
import os | |
import openai | |
import json | |
from jinja2 import Template |
# This is a work in progress. There are still bugs. Once it is production-ready this will become a full repo. | |
import os | |
def count_tokens(text, model_name="gpt-3.5-turbo", debug=False): | |
""" | |
Count the number of tokens in a given text string without using the OpenAI API. | |
This function tries three methods in the following order: | |
1. tiktoken (preferred): Accurate token counting similar to the OpenAI API. | |
2. nltk: Token counting using the Natural Language Toolkit library. |
Kilu is a YAML-based template system that enables you to generate project files for any project that you indicate. The syntax of a Kilu template is as follows: | |
A basedir field specifies the base directory for the project. It should be a string value. | |
A files field contains a list of file entries. Each file entry should have a name and content field. The name field should be a string value that specifies the name of the file, and the content field should be a multiline string that defines the contents of the file. |
#!/usr/bin/env python3 | |
# By Arturo 'Buanzo' Busleiman | |
# YMMV | |
import openai | |
import ast | |
import astunparse | |
import sys | |
import shutil | |
from itertools import takewhile |
import os | |
import openai | |
import inspect | |
from typing import Callable | |
import json | |
class Dyson: | |
def __init__(self, func: Callable, model='gpt-4'): | |
self.func = func | |
self.model = model |