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 json | |
from langchain_openai import ChatOpenAI | |
from langchain_community.vectorstores import Chroma | |
from langchain_community.embeddings import HuggingFaceEmbeddings | |
os.environ['TOKENIZERS_PARALLELISM']='false' | |
os.environ['OPENAI_API_KEY']='YOUR_API_KEY' | |
input = "I would like to order 10 Garden Hoses, 5 iPhone and 10 Sump Pump." |
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 json | |
from langchain import hub | |
from langchain_community.vectorstores import Chroma | |
from langchain.agents import AgentExecutor, create_openai_tools_agent | |
from langchain_openai import ChatOpenAI | |
from langchain_core.tools import tool | |
from langchain_community.agent_toolkits import FileManagementToolkit | |
from langchain_community.embeddings import HuggingFaceEmbeddings |
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 requests | |
from langchain import hub | |
from langchain.agents import AgentExecutor, create_openai_tools_agent | |
from langchain_openai import ChatOpenAI | |
from langchain_core.tools import tool | |
from langchain_community.tools import WikipediaQueryRun | |
from langchain_community.utilities import WikipediaAPIWrapper | |
from langchain_community.agent_toolkits import FileManagementToolkit | |
from langchain_community.tools.tavily_search import TavilySearchResults |
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
setInterval(() => { | |
let links = document.getElementsByTagName('a') | |
for (let link of links) { | |
let href = link.href | |
if (href.indexOf('https://t.co/') === 0) { | |
link.href = `http://redirect.bonamy.fr/?url=${href}` | |
} | |
} | |
}, 500) |
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
from diffusers import StableDiffusionPipeline | |
import torch | |
def progress(step, timestep, latents): | |
print(step, timestep, latents[0][0][0][0]) | |
with torch.no_grad(): | |
latents = 1 / 0.18215 * latents | |
image = pipe.vae.decode(latents).sample | |
image = (image / 2 + 0.5).clamp(0, 1) | |
image = image.cpu().permute(0, 2, 3, 1).float().numpy() |
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
Option Explicit | |
Public Function Max(x, y As Variant) As Variant | |
Max = IIf(x > y, x, y) | |
End Function | |
Public Function Min(x, y As Variant) As Variant | |
Min = IIf(x < y, x, y) | |
End Function |
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
// require some packages | |
const fs = require('fs'); | |
const path = require('path'); | |
// only parameter | |
const root = './public/vendor'; | |
// create root path | |
if (fs.existsSync(root) === false) { |