UPDATE (2021-03-31): I've posted an improved version of this guide with newer versions of the software.
I hate when my images turn out like this:
import openai | |
from colorama import Fore | |
from langchain import PromptTemplate | |
from langchain.chains import ConversationalRetrievalChain, RetrievalQA | |
from langchain.chat_models import ChatOpenAI | |
from langchain.document_loaders import TextLoader | |
from langchain.embeddings import HuggingFaceEmbeddings | |
from langchain.memory import ConversationBufferMemory | |
from langchain.schema import SystemMessage | |
from langchain.text_splitter import RecursiveCharacterTextSplitter |
function isArray(data: any): Boolean { | |
return data && data.constructor === Array; | |
} | |
function isObject(data: any): Boolean { | |
return data && data.constructor === Object; | |
} | |
function withoutEdgesAndNodes(data: any): any { | |
let result = Array.isArray(data) ? [] : {}; |
/** | |
* Sets up a DOM MutationObserver that watches for elements using undefined CSS | |
* class names. Performance should be pretty good, but it's probably best to | |
* avoid using this in production. | |
* | |
* Usage: | |
* | |
* import cssCheck from './checkForUndefinedCSSClasses.js' | |
* | |
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render()) |
#!/bin/bash | |
# | |
# WARNING: CPU MINING IS UNPROFITABLE! (FOR HOBBY / EXPERIMENT / RESEARCH ONLY) | |
# | |
# RASPBERRY PI CPUMINER-MULTI SETUP SCRIPT | |
# | |
# RASPBERRY PI, DOGE, DOGECOIN, PROHASHING.COM, LITECOIN, MINING | |
# |
# !!! IMPORTANT | |
# Must point to the correct director or this entire script breaks | |
eval $(/opt/homebrew/bin/brew shellenv) | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/usr/local/google-cloud-sdk/path.bash.inc' ]; then . '/usr/local/google-cloud-sdk/path.bash.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/usr/local/google-cloud-sdk/completion.bash.inc' ]; then . '/usr/local/google-cloud-sdk/completion.bash.inc'; fi |
UPDATE (2021-03-31): I've posted an improved version of this guide with newer versions of the software.
I hate when my images turn out like this:
DUMP | |
// pod-name name of the postgres pod | |
// postgres-user database user that is able to access the database | |
// database-name name of the database | |
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql | |
RESTORE | |
// pod-name name of the postgres pod | |
// postgres-user database user that is able to access the database | |
// database-name name of the database |
package dumptransport | |
import ( | |
"fmt" | |
"net/http" | |
"net/http/httputil" | |
) | |
type DumpTransport struct { | |
r http.RoundTripper |
import * as request from 'request'; | |
import * as fs from 'fs'; | |
import * as readline from 'readline'; | |
var google = require('googleapis'); | |
var googleAuth = require('google-auth-library'); | |
/*************** STEPS | |
- made a project on https://console.cloud.google.com/cloudpubsub/topicList?project=testmabs thing? |
_BUCKET_NAME="foo.example.com" | |
_POLICY=$(cat <<EOT | |
{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"PublicReadForGetBucketObjects", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject"], |