Skip to content

Instantly share code, notes, and snippets.

View krishnakanthpps's full-sized avatar

Krishnakanth krishnakanthpps

View GitHub Profile
@krishnakanthpps
krishnakanthpps / README.md
Created June 22, 2023 14:20 — forked from codelahoma/README.md
Automatically generate summaries of YouTube videos with transcriptions, using OpenAI's language model and create Markdown files with the output.

YouTube Video Summarizer (yt_summarize.py)

This gist contains a Python script that generates a transcript or summary of a YouTube video. It fetches video information, transcribes the audio using the Whisper ASR model, and generates a summary using the OpenAI language model.

Features

  • Fetch YouTube video information (title, description, channel title, etc.)
  • Transcribe video audio
  • Generate a summary of the video transcript
  • Save output as a markdown file
@krishnakanthpps
krishnakanthpps / custom_canvas.html
Created September 16, 2020 18:23 — forked from mekya/custom_canvas.html
Custom canvas streaming in Ant Media Server
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
@krishnakanthpps
krishnakanthpps / ffmpeg-hls.html
Created July 14, 2020 20:47 — forked from CharlesHolbrow/ffmpeg-hls.html
Example of ffmpeg for live hls streaming with hls.js
<!DOCTYPE html>
<html lang='`en'>
<head>
<meta charset='utf-8'/>
<title>Audio only stream example</title>
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script>
<style>
video {
width: 640px;
height: 360px;
@krishnakanthpps
krishnakanthpps / background.js
Created May 30, 2020 19:56 — forked from muralikg/background.js
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
console.log(msg);
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {
:: UPDATE YUM ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
sudo yum update -y
:: MAKE SWAP :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024k
sudo su
mkswap /swapfile
swapon /swapfile
swapon -s
@krishnakanthpps
krishnakanthpps / stt.py
Created August 22, 2017 12:20 — forked from srli/stt.py
#!/usr/bin/env python
from pocketsphinx.pocketsphinx import *
from sphinxbase.sphinxbase import *
import os
import pyaudio
import wave
import audioop
from collections import deque
@krishnakanthpps
krishnakanthpps / nginx.default.conf
Created July 16, 2017 12:56 — forked from santoshachari/nginx.default.conf
PHP5.6 and NGINX: Install PHP56-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and php56-FPM
sudo yum install -y nginx php56-fpm
# Install php56 extensions
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap
@krishnakanthpps
krishnakanthpps / Commands.sh
Created July 16, 2017 12:55 — forked from nrollr/Commands.sh
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
$ sudo yum install nginx -y
## Install PHP and PHP-FPM
$ sudo yum install php -y
$ sudo yum install php-fpm -y
## Configure NGINX (see below)
$ sudo nano /etc/nginx/conf.d/default.conf
@krishnakanthpps
krishnakanthpps / gist:49815e7aba5490c116ba020da51eddb0
Created May 5, 2017 11:52 — forked from rnorth/gist:2031652
Cookie-based authentication with nginx
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
@krishnakanthpps
krishnakanthpps / grafana-dashboard-exporter
Created September 12, 2016 08:20 — forked from crisidev/grafana-dashboard-exporter
Command to export all grafana 2 dashboard to JSON using curl
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json
done