Skip to content

Instantly share code, notes, and snippets.

View VineshReddy's full-sized avatar
🎯
Focusing

Vinesh Reddy VineshReddy

🎯
Focusing
View GitHub Profile
<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
@VineshReddy
VineshReddy / colorTemperature.sh
Created February 1, 2020 05:17
Shell script port of getRGBFromTemperature , Credits : Vinesh, tannerhelland (https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html)
#!/bin/sh
temperature=$@
temperature=`expr $temperature / 100`
if [ $temperature -le 66 ]
then
red=255
green=$temperature
green=$(awk -v green="$green" 'BEGIN {printf("%.10f\n",99.4708025861 * log(green) - 161.1195681661)}')
/*
* Copyright (C) 2017 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of