This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip3 install opencv-python==4.2.0.32 | |
# wget https://pjreddie.com/media/files/yolov3.weights | |
# wget https://raw.githubusercontent.com/guptavasu1213/Yolo-Vehicle-Counter/master/yolo-coco/coco.names | |
# wget https://raw.githubusercontent.com/guptavasu1213/Yolo-Vehicle-Counter/master/yolo-coco/yolov3.cfg | |
# Finally, put this code in the same folder as above 3 files. | |
# python vehicle-counter.py | |
# References: | |
# Original source: https://github.com/guptavasu1213/Yolo-Vehicle-Counter | |
# Coco dataset: https://cocodataset.org/#home |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the text files were later used to convert into images via pango-view and later via ffmpeg to vid | |
text = [] | |
filenumber = 1 | |
with open('51D.log', 'r') as f: | |
for line in f: | |
if line.startswith("-----"): | |
if len(text) > 0: | |
with open('text' + str(filenumber).zfill(4), 'w') as out: | |
out.writelines(text) | |
filenumber = filenumber+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reshape(srcFilePath, destFilePath, delim, colCount, filler=''): | |
with open(srcFilePath, 'r') as src, open(destFilePath, 'w') as dest: | |
for line in src: | |
arr = line.split(delim) | |
if len(arr) < colCount: | |
line = line.strip() + delim*(colCount-len(arr)) | |
if len(arr) > colCount: | |
line = delim.join(arr[:colCount]) | |
dest.write(f'{line}\n') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -ex # fail on first exception | |
#az login | |
#az account show | |
subs="My-Subs-Name" | |
az account set --subscription "$subs" | |
rg=$1 | |
# Or use a fixed value of rg | |
rg=my-rg-name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Software to install on clean ubuntu machine. | |
Compulsary: | |
sudo apt install -y mc geany redshift gtk-redshift cherrytree transmission terminator nmap gufw ubuntu-restricted-extras libavcodec-extra libdvd-pkg synaptic gdebi ntp scrot filezilla exfat-fuse exfat-utils pv sqlite lame html2text xdotool synaptic bless ffmpeg rtmpdump nano lynx cups-pdf meld duplicity python-gi geany-plugin-lineoperations geany-plugins supervisor mosquitto-clients openjdk-8-jre-headless openssh-server x11vnc vlc sysbench psensor glmark2 htop espeak git openjdk-8-jdk trimage devilspie2 python3-venv openvpn keepassx pinta tree gnome-tweaks gnome-tweak-tool virtualenv | |
sudo snap install notepad-plus-plus pdftk | |
Optional: | |
sudo apt install -y mumble r-base docker-compose wine-stable swftools aircrack-ng qemu-kvm krita gimp inkscape git-flow dbeaver-ce winetricks |