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
| # Set API_KEY! | |
| import requests | |
| headers = { | |
| 'Authorization': API_KEY, | |
| 'Content-Type': 'application/json' | |
| } | |
| # Search for issues that have been synced from LinearSync: |
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
| // ==UserScript== | |
| // @name Fix spelling with GPT | |
| // @namespace https://gist.github.com/lukestanley/937ffd4de748cdc00a5dd701bd6fbdfb | |
| // @version 1.0 | |
| // @description User script for checking spelling and grammar with OpenAI API | |
| // @match http://*/* | |
| // @match https://*/* | |
| // @run-at document-end | |
| // @grant GM_xmlhttpRequest | |
| // ==/UserScript== |
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
| // ==UserScript== | |
| // @name ChatGPT Message Sync | |
| // @version 0.1 | |
| // @description Sync ChatGPT messages to own server. | |
| // @include https://chat.openai.com/c/* | |
| // @grant GM_xmlhttpRequest | |
| // ==/UserScript== | |
| (function() { |
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 os | |
| from webdav3.client import Client | |
| from tenacity import retry, stop_after_attempt, wait_fixed | |
| import time | |
| BATCH_SIZE = 100 | |
| uploaded_files = [] | |
| # get password from environment variable |
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
| [{"country":"Afghanistan","province":null,"timeline":{"cases":{"2/8/23":208771,"2/9/23":208771,"2/10/23":208943,"2/11/23":208971,"2/12/23":208982,"2/13/23":209011,"2/14/23":209036,"2/15/23":209056,"2/16/23":209072,"2/17/23":209083,"2/18/23":209084,"2/19/23":209107,"2/20/23":209153,"2/21/23":209181,"2/22/23":209181,"2/23/23":209215,"2/24/23":209230,"2/25/23":209246,"2/26/23":209274,"2/27/23":209308,"2/28/23":209322,"3/1/23":209340,"3/2/23":209358,"3/3/23":209362,"3/4/23":209369,"3/5/23":209390,"3/6/23":209406,"3/7/23":209436,"3/8/23":209451,"3/9/23":209451},"deaths":{"2/8/23":7896,"2/9/23":7896,"2/10/23":7896,"2/11/23":7896,"2/12/23":7896,"2/13/23":7896,"2/14/23":7896,"2/15/23":7896,"2/16/23":7896,"2/17/23":7896,"2/18/23":7896,"2/19/23":7896,"2/20/23":7896,"2/21/23":7896,"2/22/23":7896,"2/23/23":7896,"2/24/23":7896,"2/25/23":7896,"2/26/23":7896,"2/27/23":7896,"2/28/23":7896,"3/1/23":7896,"3/2/23":7896,"3/3/23":7896,"3/4/23":7896,"3/5/23":7896,"3/6/23":7896,"3/7/23":7896,"3/8/23":7896,"3/9/23":7896},"recovered" |
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
| # pylint: disable=too-few-public-methods,unused-argument,line-too-long,no-name-in-module | |
| from typing import List | |
| import logging | |
| from pydantic import BaseModel, Field | |
| from langchain.chat_models import ChatAnthropic | |
| from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
| from langchain_decorators import llm_prompt, PromptTypes, GlobalSettings |
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
| Human: | |
| <file path=setup.py> | |
| import setuptools | |
| with open("src/langchain_decorators/__init__.py", "rt") as f: | |
| for line in f.readlines(): | |
| if line.startswith("__version__"): | |
| __version__ = line.split("=")[1].strip(" \n\"") |
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 json | |
| import time | |
| from langchain.chat_models import ChatAnthropic | |
| from langchain.schema import HumanMessage | |
| FAST = "claude-instant-1" | |
| GOOD = "claude-1.3" | |
| model = GOOD |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # Credit to https://github.com/nsarrazin/serge - this is heavily copied from the API there and not very well yet but it might work.w | |
| from typing import List, Optional | |
| from uuid import UUID, uuid4 | |
| from pydantic import BaseModel, Field | |
| from datetime import datetime | |
| import subprocess, os | |
| import asyncio |