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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "github.com/bytecodealliance/wasmtime-go/v31" | |
| ) | |
| // Default memory configuration (matching JavaScript defaults) |
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 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 |
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 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 |
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 { useCalendar } from '@h6s/calendar'; | |
| import { useMachine } from '@xstate/react'; | |
| import { Button as AriaButton } from 'ariakit/button'; | |
| import clsx from 'clsx'; | |
| import { isSunday, isSameDay, addMonths, isFuture, isPast, setDate } from 'date-fns'; | |
| import format from 'date-fns/format'; | |
| import isWithinInterval from 'date-fns/isWithinInterval'; | |
| import { FC, useCallback, useMemo } from 'react'; | |
| import Select from '@components/forms/components/Select'; |
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 * as d3 from "d3"; | |
| import { | |
| eachMonthOfInterval, | |
| endOfMonth, | |
| format, | |
| isSameMonth, | |
| parseISO, | |
| startOfMonth, | |
| } from "date-fns"; | |
| import useMeasure from "react-use-measure"; |
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 { isTest } from "@/lib/constants"; | |
| import { Dialog } from "@headlessui/react"; | |
| import { motion } from "framer-motion"; | |
| const TRANSITIONS = { | |
| DURATION: !isTest ? 0.5 : 0, | |
| EASE: [0.32, 0.72, 0, 1], | |
| }; | |
| function Modal({ onClose = () => {}, initialFocusRef, children }) { |
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
| function findBreakoutElem(rootElem = document.body) { | |
| function checkElemWidth(elem) { | |
| if (elem.clientWidth > window.outerWidth) { | |
| console.log("The following element has a larger width than the window's outer width"); | |
| console.log(elem); | |
| console.log('<-------------------------------------------------------------------->'); | |
| } else if (elem.scrollWidth > window.outerWidth) { | |
| console.log("The following element has a larger width than the window's scroll width"); | |
| console.log(elem); | |
| console.log('<-------------------------------------------------------------------->'); |
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
| #!/bin/bash | |
| while :; do | |
| verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1) | |
| pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1) | |
| ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))") | |
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
| const MY_DOMAIN = "agodrich.com" | |
| const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2" | |
| const DISQUS_SHORTNAME = "agodrich" | |
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndApply(event.request)) | |
| }) | |
| const corsHeaders = { | |
| "Access-Control-Allow-Origin": "*", |
NewerOlder