- Frontend Focus: A once–weekly roundup of the best front-end news, articles and tutorials. HTML, CSS, WebGL, Canvas, browser tech, and more.
- This Week In React: The latest news directly in your inbox!
- Web Tools Weekly: A weekly newsletter for front-end developers with a specific focus on tools.
- NEXT.JS Weekly: A newsletter of the best Next.js articles, tools and projects
- JavaScript Weekly: A newsletter of JavaScript articles, news and cool projects
- Friday Front-End: Front-end development links tweeted daily, emailed weekly.
- CSS Weekly: Weekly e-mail roundup of CSS articles, tutorials, experiments, and tools curated by Zoran Jambor
- Liquid Weekly: Your one-stop shop for all things Shopify Development
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
This uses llm.datasette.io and OpenAI. | |
I use `git commit --template` to provide the output from the LLM to Git. This way, if you do not like the results, you | |
can quit your editor and no commit will be made. | |
# Shell function for generating a diff and editing it in your default editor: | |
gcllm() { | |
GIT_DIR="$(git rev-parse --git-dir)" | |
TEMPLATE="$GIT_DIR/COMMIT_EDITMSG_TEMPLATE" |
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 speak_ollama() { | |
if ! command -v ollama &> /dev/null; then | |
echo "Error: ollama is not installed." | |
return 1 | |
fi | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: speak_ollama <file_path> <model>" | |
return 1 | |
fi |
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/zsh | |
# #popclip | |
# name: Azure TTS | |
# icon: symbol:message.and.waveform | |
# Please apply for your own key | |
AZURE_REGION= | |
AZURE_SUBSCRIPTION_KEY= | |
# Create a temporary audio file |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Version: 08-2024 | |
# Migrated to: https://github.com/mrjk/python_snippets/blob/main/examples/typer/cli-app-typer.py | |
"""MyApp CLI interface | |
This CLI provides a similar experience as the git CLI, but in Python with Typer. |
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
from langchain.chat_models import ChatOpenAI | |
from pydantic import BaseModel, Field | |
from langchain.document_loaders import UnstructuredURLLoader | |
from langchain.chains.openai_functions import create_extraction_chain_pydantic | |
class LLMItem(BaseModel): | |
title: str = Field(description="The simple and concise title of the product") | |
description: str = Field(description="The description of the product") | |
def main(): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env bash | |
# sudo ln -s "$(pwd)/csv2datasette" /usr/bin/csv2datasette | |
# csv2datasette is meant to explore CSV data. It is not meant to create a sustainable DB. | |
# csv2datasette is a bash script which open CSV files directly in Datasette. It offers | |
# a number of options for reading and exploring CSV files, such as --stats, inspired by WTFCsv. | |
# | |
# `--stats` option includes, for each column: the column name, the number of unique values, | |
# the number of filled rows, the number of missing values, the mininmum value, the maximum value, | |
# the average, the sum, the shortest string, the longest string, the number of numeric values, |
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
from langchain.document_loaders import YoutubeLoader | |
from langchain.indexes import VectorstoreIndexCreator | |
urls = [ | |
("https://www.youtube.com/watch?v=fP6vRNkNEt0", "Prompt Injection"), | |
("https://www.youtube.com/watch?v=qWv2vyOX0tk", "Low Code-No Code"), | |
("https://www.youtube.com/watch?v=k8GNCCs16F4", "Agents In Production"), | |
("https://www.youtube.com/watch?v=1gRlCjy18m4", "Agents"), | |
("https://www.youtube.com/watch?v=fLn-WqliEQU", "Output Parsing"), | |
("https://www.youtube.com/watch?v=ywT-5yKDtDg", "Document QA"), | |
("https://www.youtube.com/watch?v=GrCFyyyAxCU", "SQL"), |
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
from langchain.document_loaders import YoutubeLoader | |
from langchain.indexes import VectorstoreIndexCreator | |
loader = YoutubeLoader.from_youtube_url("https://www.youtube.com/watch?v=fLn-WqliEQU&lc=UgyOc6oNr_4-YLGCL2R4AaABAg", add_video_info=False) | |
docs = loader.load() | |
index = VectorstoreIndexCreator() | |
index = index.from_documents(docs) |