Skip to content

Instantly share code, notes, and snippets.

View gireeshkbogu's full-sized avatar

Gireesh Bogu gireeshkbogu

View GitHub Profile
model mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21 6 160 110 3.9 2.62 16.46 0 1 4 4
Mazda RX4 Wag 21 6 160 110 3.9 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108 93 3.85 2.32 18.61 1 1 4 1
Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
Hornet Sportabout 18.7 8 360 175 3.15 3.44 17.02 0 0 3 2
Valiant 18.1 6 225 105 2.76 3.46 20.22 1 0 3 1
Duster 360 14.3 8 360 245 3.21 3.57 15.84 0 0 3 4
Merc 240D 24.4 4 146.7 62 3.69 3.19 20 1 0 4 2
Merc 230 22.8 4 140.8 95 3.92 3.15 22.9 1 0 4 2
@gireeshkbogu
gireeshkbogu / ffmpeg-watermark.md
Created April 6, 2022 17:50 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

# With this you cann upload a CSV file and plot a scatterplot.
import pandas as pd
import streamlit as st
import seaborn as sns
import matplotlib.pyplot as plt
st.set_option('deprecation.showPyplotGlobalUse', False)
st.title("Basic plotting..")
@gireeshkbogu
gireeshkbogu / rhrad_online_24hr_alerts_v5.py
Last active February 10, 2021 13:30
updated script with new steps format data
# RHR Online Anomaly Detection & Alert Monitoring
######################################################
# Author: Gireesh K. Bogu #
# Email: gbogu17@stanford.edu #
# Location: Dept.of Genetics, Stanford University #
# Date: Oct 29 2020 #
######################################################
## simple command
We can't make this file beautiful and searchable because it's too large.
"user","datetime","steps"
"ASFODQR","2024-07-07 00:00:00",0
"ASFODQR","2024-07-07 00:01:00",0
"ASFODQR","2024-07-07 00:02:00",9
"ASFODQR","2024-07-07 00:03:00",0
"ASFODQR","2024-07-07 00:04:00",0
"ASFODQR","2024-07-07 00:05:00",26
"ASFODQR","2024-07-07 00:06:00",0
"ASFODQR","2024-07-07 00:07:00",12
"ASFODQR","2024-07-07 00:08:00",0
steps
2020-02-01 00:00:00 0
2020-02-01 00:01:00 0
2020-02-01 00:02:00 0
2020-02-01 00:03:00 0
2020-02-01 00:04:00 0
2020-02-01 00:05:00 0
2020-02-01 00:06:00 0
2020-02-01 00:07:00 0
2020-02-01 00:08:00 0
Subject datetime Type Count
User1 4/16/20 15:00 A1 1
User2 3/28/20 13:00 A1 1
User3 4/29/20 15:00 A1 1
User4 5/2/20 9:00 A1 1
User5 2/19/20 18:00 A1 1
User6 4/20/20 16:00 A1 1
User7 5/4/20 20:00 A1 1
User8 4/4/20 16:00 A1 1
User9 4/5/20 8:00 A1 1
@gireeshkbogu
gireeshkbogu / nii_to_png.sh
Last active April 11, 2020 21:40
Converts .nii format to .jpg or .png format
# source: https://pypi.org/project/med2image/
# https://stackoverflow.com/questions/29640641/how-to-convert-nii-format-file-into-2d-image
# requirements
#pip3 install pydicom
#pip3 install med2image
#pip3 install pudb
#pip3 install pfmisc
#$1 = input.nii
@gireeshkbogu
gireeshkbogu / add_prefix_to_filenames.sh
Created April 8, 2020 19:32
Adds a prefix to multiple file names
for filename in *.jpg; do mv "$filename" "prefix_$filename"; done;