A complete guide to generating a GPG key, configuring Git to sign commits, and setting up pinentry-mac so graphical apps like VS Code can sign commits and save your passphrase in the macOS Keychain.
Install GnuPG via Homebrew:
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
| async function replacePDF(item) { | |
| // filter annotations, attachments, notes | |
| if (!item.isRegularItem()) { | |
| return; | |
| } | |
| let fileExists = []; | |
| let oldPDF = null; | |
| // filter multiple or existing PDFs | |
| const attachmentIDs = item.getAttachments(); |
| package main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| n := 0 // position of the number | |
| prev := 0 |
| class LayerNorm(nn.Module): | |
| epsilon: float = 1e-6 # Small value for numerical stability | |
| use_bias: bool = True | |
| use_scale: bool = True | |
| @nn.compact | |
| def __call__(self, x): | |
| # Calculate mean and variance along the feature dimension | |
| mean = jnp.mean(x, axis=-1, keepdims=True) | |
| variance = jnp.var(x, axis=-1, keepdims=True) |
For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.
You can download Windows 10 or Windows 11 directly from Microsoft.
After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.
| package org.playerchat.core; | |
| import org.playerchat.utils.MessageCounter; | |
| import org.playerchat.utils.MessageLogger; | |
| import org.playerchat.utils.Operations; | |
| import java.io.*; | |
| import java.net.Socket; | |
| public class PlayerMultiProcess { |
| from llama_index.vector_stores.qdrant import QdrantVectorStore | |
| def get_forward_nodes( | |
| node_with_score: NodeWithScore, num_nodes: int, vector_store: QdrantVectorStore | |
| ) -> Dict[str, NodeWithScore]: | |
| """Get forward nodes.""" | |
| node = node_with_score.node | |
| nodes: Dict[str, NodeWithScore] = {node.node_id: node_with_score} | |
| cur_count = 0 | |
| # get forward nodes in an iterative manner |
| <artifacts_info> | |
| The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
| # Good artifacts are... | |
| - Substantial content (>15 lines) | |
| - Content that the user is likely to modify, iterate on, or take ownership of | |
| - Self-contained, complex content that can be understood on its own, without context from the conversation | |
| - Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
| - Content likely to be referenced or reused multiple times |
| import os | |
| import shutil | |
| if os.path.exists(".cache/distilabel"): | |
| shutil.rmtree(".cache/distilabel") | |
| from distilabel.steps.tasks import TextGeneration | |
| from distilabel.steps import LoadHubDataset | |
| from distilabel.pipeline.local import Pipeline |