Skip to content

Instantly share code, notes, and snippets.

View techwithanirudh's full-sized avatar
😀
I'm creating a few projects right now

Anirudh techwithanirudh

😀
I'm creating a few projects right now
View GitHub Profile

You are an advanced AI-powered home assistant, similar to Google Home or Siri, with deep integration into the smart home ecosystem. You are powered by large language models (LLMs) and can access additional information dynamically. You have access to the HomeAssistant API to perform tasks like controlling lights, devices, and automations.

Your primary role is to assist the user with home automation tasks in a thoughtful and intelligent manner. Always prioritize precision and verification before executing actions.

Intelligent Command Handling:

  • When the user asks for an action like "turn off the light," always verify the device before acting. If the user provides a name like "turn off Ikea," and "Ikea" isn't an exact match for a light, infer the correct device by searching the available list. Ensure the name aligns or closely matches with an existing smart device in the system.
  • Be proactive: If there's ambiguity in a user's request (e.g., "turn off the kitchen"), determine if they meant "kitchen lights
openapi: 3.1.0
info:
title: Home Assistant REST API
description: RESTful API for interacting with Home Assistant.
version: 1.0.0
contact:
name: Home Assistant
url: https://www.home-assistant.io/
email: support@home-assistant.io
servers:
@techwithanirudh
techwithanirudh / schedule-x-theme.css
Last active November 13, 2024 09:50
This is a theme for schedule-x which makes it look a bit more like shadcn, and removes a bit of mui design hints.
:root {
/* Primary colors */
--sx-color-primary: hsl(var(--primary));
--sx-color-on-primary: hsl(var(--primary-foreground));
--sx-color-primary-container: hsl(var(--muted));
--sx-color-on-primary-container: hsl(var(--muted-foreground));
/* Secondary colors */
--sx-color-secondary: hsl(var(--secondary));
--sx-color-on-secondary: hsl(var(--secondary-foreground));
@techwithanirudh
techwithanirudh / coderQuickInstaller.sh
Last active March 15, 2024 04:55
Installs Coder, with ease
curl -L https://coder.com/install.sh | sh
sudo systemctl enable --now coder
cat <<EOT | sudo tee /etc/coder.d/coder.env > /dev/null
# Coder must be reachable from an external URL for users and workspaces to connect.
# e.g. https://coder.example.com
CODER_ACCESS_URL=
CODER_HTTP_ADDRESS=0.0.0.0:80
CODER_PG_CONNECTION_URL=
CODER_TLS_CERT_FILE=
const fs = require("fs");
const { Configuration, OpenAIApi } = require("openai");
// Replace these values with your actual OpenAI API key and discourse API key.
const OPENAI_API_KEY =
const CSRF_TOKEN =
const COOKIE =
// Discourse API Configuration
@techwithanirudh
techwithanirudh / hftg_demo_guanaco-33b-merged_qlora.py
Created June 23, 2023 07:59 — forked from xsa-dev/hftg_demo_guanaco-33b-merged_qlora.py
This quanaco model for LangChain integration. Subscribe me back =)
import os
import dotenv
from langchain import HuggingFaceTextGenInference
dotenv.load_dotenv()
os.environ[
"HUGGINGFACEHUB_API_TOKEN"
] = os.getenv("HF_API_TOKEN")
function file2Number(filepath, number) {
const seperator = '-';
let dir = path.dirname(filepath);
let ext = path.extname(filepath);
let base = path.basename(filepath, ext);
let append = seperator + number;
const filename = path.join(dir, base + append + ext);
document
.querySelector(".SGP0hd.kunNie")
.children[1].querySelector("button")
.click();
setTimeout(function () {
document
.querySelector(".SGP0hd.kunNie")
.children[2].querySelector("button")
.click();
// Replit IDE Trick
// CODE START //
document
.querySelector('div[data-testid="sidenav-preferences"]')
.addEventListener("click", () => {
setTimeout(function () {
// Replit IDE Trick
var settingsContainer = document.querySelector(".css-d43pp7");
var editorDiv = document.createElement("div");
@techwithanirudh
techwithanirudh / word-un-scrambler.ipynb
Last active June 22, 2022 11:40
word(Un)Scrambler
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.