You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.
Consider something like:
| KEYMAPOPTS="us us" | |
| HOSTNAMEOPTS="-n alpine" | |
| INTERFACESOPTS="auto lo | |
| iface lo inet loopback | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| hostname alpine | |
| " | |
| TIMEZONEOPTS="-z UTC" |
| import openai | |
| import streamlit as st | |
| from streamlit_chat import message | |
| from dotenv import load_dotenv | |
| import os | |
| from langchain.embeddings.openai import OpenAIEmbeddings | |
| from langchain.vectorstores import Chroma | |
| import openai | |
| from langchain.document_loaders import UnstructuredMarkdownLoader | |
| from langchain.chains.question_answering import load_qa_chain |
| import openai | |
| import streamlit as st | |
| from streamlit_chat import message | |
| from dotenv import load_dotenv | |
| import os | |
| from langchain.embeddings.openai import OpenAIEmbeddings | |
| from langchain.vectorstores import Chroma | |
| import openai | |
| from langchain.document_loaders import UnstructuredMarkdownLoader | |
| from langchain.chains.question_answering import load_qa_chain |
Reverse proxy to use OpenAI API Join Our Discord Server 😁
| /* | |
| # Query the OpenAI API | |
| - Prompts the user for an OPENAI_API_KEY | |
| - Prompts the user for a prompt to send to OpenAI | |
| - Sends the prompt to OpenAI | |
| - Displays the response from OpenAI in the built-in editor | |
| */ | |
| // Name: OpenAI Playground |
PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.
Here's how I combine the two, to create docs with embedded diagrams.
Get the command-line PlantUML from the download page or your relevant package manager.
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| public static String sha1(String s, String keyString) throws | |
| UnsupportedEncodingException, NoSuchAlgorithmException, | |
| InvalidKeyException { | |
| SecretKeySpec key = new SecretKeySpec((keyString).getBytes("UTF-8"), "HmacSHA1"); | |
| Mac mac = Mac.getInstance("HmacSHA1"); | |
| mac.init(key); | |
| byte[] bytes = mac.doFinal(s.getBytes("UTF-8")); | |