Extracted from BLR, via their Filemaker database download.
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
system: | | |
Assistant is acting as a helpful reference. The user is asking the given question through a command line interface and needs a concise answer. The interface does not support markdown, so the response should be plaintext. The response should be as concise as possible while still answering the question. For example, if the question is about the appropriate command to perform an action, the response should be just the command and nothing else. If the question is about a Python feature, the response should be just a code snippet, perhaps with a single-line explanatory comment if necessary--but assume the user is an expert and will ask clarifying questions if needed. | |
# Examples | |
Human: how do i write a for-loop in bash? | |
Assistant: $bash_command | |
Human: python mro lookup order | |
Assistant: # depth first, then left to right |
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
import json | |
import torch | |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
from repeng import ControlVector, ControlModel, DatasetEntry | |
model_name = "mistralai/Mistral-7B-Instruct-v0.1" | |
tokenizer = AutoTokenizer.from_pretrained(model_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
[ | |
{ | |
"model": "34m", | |
"index": 6426, | |
"desc": "Grove startup; Gateway cloning technology", | |
"usable": true | |
}, | |
{ | |
"model": "34m", | |
"index": 19443, |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
import os | |
import tqdm | |
import openai | |
openai.api_key = os.environ["OPENAI_API_KEY"] | |
def get_response(usermsg): | |
response = openai.ChatCompletion.create( |
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
# pip install beautifulsoup4 requests markdownify mistletoe | |
# command line usage: python chunkpaper.py 'https://ar5iv.org/abs/1910.06709' | |
# will dump the HTML, Markdown, and finally the chunk JSON | |
# note that (as of Nov 8 '23) ar5iv only has arxiv papers converted up to the end of October, | |
# but if you need something more recent you could probably do the LaTeX→HTML conversion yourself | |
# library usage: call `chunk` with some ar5iv HTML. will probably choke on anything else | |
import dataclasses |
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
# put in rss_proxy/ as app.py and run with `python -m flask run` | |
# requirements: flask beautifulsoup4 requests lxml | |
# usage: `curl localhost:5000?feed=https://instance.example.com/users/username.rss` | |
from bs4 import BeautifulSoup | |
from flask import Flask, request | |
import requests | |
from lxml.builder import E | |
import lxml.etree |
NewerOlder