Skip to content

Instantly share code, notes, and snippets.

View mythrex's full-sized avatar
🎯
Focusing

Shivam Kaushik mythrex

🎯
Focusing
View GitHub Profile
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Popcorn Time
Name[en_US]=Popcorn Time
GenericName=BitTorrent Stream Player
GenericName[en_US]=BitTorrent Stream Player
Comment=Run the Popcorn Time application
Comment[en_US]=Run the Popcorn Time application
Type=Application
[Desktop Entry]
Name=Vice City
Comment=Vice City
Exec=sh -c "cd /hardisk/Games/Vice\ City; wine gta-vc.exe"
Icon=/home/mythrex/.icons/icon.png
Terminal=false
Type=Application
Categories=Wine;
StartupNotify=true
#!/bin/bash
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM
gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode FIXED
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 64
gsettings set org.gnome.shell.extensions.dash-to-dock unity-backlit-items true
@mythrex
mythrex / Merge Videos
Created May 10, 2020 13:20
Merge videos with ffmpeg
ffmpeg -i concat:"input1.mp4|input2.mp4" output.mp4
@mythrex
mythrex / merge.sh
Created May 10, 2020 14:03
Merge two files
!#/bin/bash
mkvmerge -o outfile.mkv Scene0.mp4 \+ Scene1.mp4
@mythrex
mythrex / concat
Created May 11, 2020 20:07
ffmpeg concat
ffmpeg -f concat -i files.txt -c copy output.mp4
@mythrex
mythrex / Global Contast Normalisation
Last active May 27, 2020 18:05
In this we normalise the contrast
def gcn(x, lambda_, s, epsilon=1e-8):
'''
Returns contrasted normalized img with added mean.
lambda_: constant added to variance
s: new std deviation of img
mu: img mean
'''
img = x.copy()
mu = img.mean()
img = img - mu
@mythrex
mythrex / kaggle-dataset-download.sh
Created June 8, 2020 14:08
Download dataset to kaggle on colab
#/bin/bash
pip install kaggle
mkdir ~/.kaggle
cp kaggle.json ~/.kaggle/
chmod 600 ~/.kaggle/kaggle.json
kaggle datasets download -d iarunava/cell-images-for-detecting-malaria
@mythrex
mythrex / get_iou.py
Created June 13, 2020 07:46
Gets Iou given two bounding boxes
def get_iou(bb1, bb2):
assert bb1[0] < bb1[2]
assert bb1[1] < bb1[3]
assert bb2[0] < bb2[2]
assert bb2[1] < bb2[3]
# determine the coordinates of the intersection rectangle
x_left = max(bb1[0], bb2[0])
y_top = max(bb1[1], bb2[1])
x_right = min(bb1[2], bb2[2])
@mythrex
mythrex / non_max supression.py
Created June 13, 2020 10:30
Non Max Suppression
def get_iou(bb1, bb2):
assert bb1[0] < bb1[2]
assert bb1[1] < bb1[3]
assert bb2[0] < bb2[2]
assert bb2[1] < bb2[3]
# determine the coordinates of the intersection rectangle
x_left = max(bb1[0], bb2[0])
y_top = max(bb1[1], bb2[1])
x_right = min(bb1[2], bb2[2])