Skip to content

Instantly share code, notes, and snippets.

View psavarmattas's full-sized avatar
:electron:

Puranjay Savar Mattas psavarmattas

:electron:
View GitHub Profile
@psavarmattas
psavarmattas / install_rootless_docker.sh
Last active February 19, 2025 15:38
docker-rootless-install-scripts
#!/bin/bash
# Script to install rootless Docker for the current user
check_command() {
if ! command -v "$1" &> /dev/null; then
echo "Error: $1 is required but not found. Please install it and try again." >&2
exit 1
fi
}
@psavarmattas
psavarmattas / Virtual_Assistant.py
Created January 28, 2021 05:47
Text to Speech & Listener for Virtual Assistants in Python
import speech_recognition as sr
import pyttsx3
import datetime
listener = sr.Recognizer()
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
rate = engine.getProperty('rate')
engine.setProperty('rate', 150)
@psavarmattas
psavarmattas / news.py
Last active January 28, 2021 05:42
News Text to Speech in Python
import pyttsx3
import requests
import json
import time
url = ('https://newsapi.org/v2/top-headlines?'
'country = in&'
'apiKey =')
url += 'YOUR_API_KEY_HERE'