made with esnextbin
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 argparse | |
from together import Together | |
def analyze_image(image_url): | |
client = Together(api_key=os.environ.get('TOGETHER_API_KEY')) | |
response = client.chat.completions.create( | |
model="meta-llama/Llama-Vision-Free", | |
messages=[ |
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 llama_index.core import VectorStoreIndex, download_loader | |
from llama_index.llms.ollama import Ollama | |
from llama_index.embeddings.huggingface import HuggingFaceEmbedding | |
from llama_index.core import Settings | |
from llama_index.llms.ollama import Ollama | |
from IPython.display import display | |
Settings.llm = Ollama(model="mistral:latest", request_timeout=30.0) | |
Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5") |
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
#!/usr/bin/bash | |
function colorPrint { | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
printf "${RED}$*${NC}\n" | |
} | |
function cloneDepTools { | |
colorPrint "Cloning depot_tools" |
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
<html> | |
<body> | |
<h1>Main</h1> | |
<button>Load portal</button> | |
</body> | |
<script> | |
document.querySelector('button').addEventListener('click', () => { | |
const portal = document.createElement('portal'); | |
portal.src = 'http://localhost:3001'; | |
document.body.appendChild(portal); |
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
const choo = require('choo') | |
const app = choo() | |
app.model({ | |
state: { title: 'Set the title' }, | |
reducers: { | |
update: (action, state) => ({ title: action.value }) | |
} | |
}) |
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
"use strict"; | |
var animate = require('fd-animate'); | |
var logo = document.createElement('img') | |
logo.src = 'https://raw.githubusercontent.com/fp-dom/logo/master/fp-dom.png'; | |
document.body.appendChild(logo) |
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
var cnvsGrad = require('canvas-gradaint'); | |
//canvas setup | |
var canvas = document.createElement('canvas'); | |
canvas.width = '500'; | |
canvas.height = '300'; | |
canvas.style.outline = "1px solid black"; | |
document.body.appendChild(canvas); | |
// Get the context. |
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
clear = require('clear-canvas'); | |
//canvas setup | |
var canvas = document.createElement('canvas'); | |
canvas.width = '500'; | |
canvas.height = '300'; | |
canvas.style.outline = "1px solid black"; | |
document.body.appendChild(canvas); | |
// Get the context. |
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
function(t) { | |
t.exports = { | |
resources: ["https://events.google.com/io2015/experiment/cataudiosprite.mp3"], | |
spritemap: { | |
"arp_synth_A-sharp": { | |
start: 0, | |
end: 1.0971428571428572, | |
loop: !1 | |
}, | |
"arp_synth_A-sharp2": { |
NewerOlder