This file contains 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
{ | |
"title":"A320 Hydraulic System Failure.", | |
"create_time":1682368832.626937, | |
"update_time":1682369104.0, | |
"mapping":{ | |
"<mapping_id>":{ | |
"id":"<mapping_id>", | |
"message":{ | |
"id":"<message_id>", | |
"author":{ |
This file contains 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
[ avalenzu ~]$ cat secretmanager_dataset.jsonl | |
{"prompt": "How can I install openai_secret_manager python package?", "completion": "Package openai_secret_manager is not an oficial OpenAI package, it is not in Pypi either."} | |
{"prompt": "How can I install openai-secret-manager python package?", "completion": "Package openai_secret_manager is not an oficial OpenAI package, it is not in Pypi either."} | |
{"prompt": "Does the url <https://github.com/openai/openai-secret-manager.git> exist?", "completion": "no, this url returns 404" } | |
{"prompt": "Does the url <https://github.com/opensecrets-io/openai-secret-manager.git> exist?", "completion": "no, this url returns 404"} | |
{"prompt": "Does the url <https://github.com/opensecrets/openai-secret-manager.git> exist?", "completion": "no, this url returns 404"} |
This file contains 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
# Amend the last commit | |
git commit --amend | |
# This will open a text editor with the previous commit message | |
# Modify the message if necessary | |
# Save and exit the editor |
This file contains 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
# List all branches in the repository | |
git branch | |
# Switch to a branch | |
git switch branch-name | |
# Create and switch to a new branch | |
git switch -c new-branch-name | |
# In contrast to the deprecated command |
This file contains 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
# Start an interactive rebase | |
git rebase -i HEAD~3 | |
# This will open a text editor with a list of the last 3 commits | |
# Replace "pick" with "squash" or "fixup" to combine or discard commits | |
# Save and exit the editor | |
# Git will apply the changes and prompt you to edit the commit message | |
# Save and exit the editor |
This file contains 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/env python | |
import argparse | |
import openai | |
from secret_manager import get_secret | |
# Load the API key from the file | |
secret = get_secret("gpt-token") | |
openai.api_key = secret | |
# Define the command line arguments |
This file contains 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/env python | |
import os | |
def get_secret(key_name="openai"): | |
""" | |
Get the value of a secret from the environment or a file. | |
""" | |
try: | |
# Try to read the secret from the environment variable | |
return os.environ[key_name] |
This file contains 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/env python | |
import openai | |
from openai_secret_manager import get_secret | |
# Load the API key from the file | |
secret = get_secret("openai")["api_key"] | |
openai.api_key = secret | |
# Define the prompt for the text generation | |
prompt = "Once upon a time" |
This file contains 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
labels = element["why"].encode('utf-8') | |
print("==> LABELS: ", labels) | |
if "already in progress" in labels: | |
reason = "concurrent builds not allowed" | |
elif "Waiting for next available executor on" in labels: | |
reason = labels.split(" on ")[1].decode('utf8').encode('ascii', errors='ignore') | |
else: | |
reason = "other" |