Skip to content

Instantly share code, notes, and snippets.

View danielturus's full-sized avatar
🎯
Focusing

Daniel Turuș danielturus

🎯
Focusing
View GitHub Profile
import * as React from 'react'
export function usePropertyChangeTracker({ data, property, callback }) {
const previousDataRef = React.useRef([])
React.useEffect(() => {
const previousData = previousDataRef.current
for (let i = 0; i < data.length; i++) {
const previousItem = previousData[i]
import json
import requests
# Read package.json file
with open('package.json', 'r') as file:
package_json = json.load(file)
# Extract dependencies and their versions
dependencies = package_json.get('dependencies', {})
@danielturus
danielturus / claude_3.5_sonnet_artifacts.xml
Created June 23, 2024 18:32 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt
<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