Posts
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
- Magic Cauldron: Harry Potter Themed Gender Reveal Party - #Aurdino
Earlier this year, we had a very fun filled Harry Potter themed gender reveal party. For the reveal, I built a Magic Cauldron which would reveal the gender. Check it out for yourself! For this I needed: A Cauldron. WS2812B LED array. Aurdino UNO. Bread board and jumper wires. Dry ice. Kasa Smart bulbs I will go over in the following sections The Mist.
- Kakashi: The Copycat Robot - #Aurdino #image processing
In this post, I want to share about "Kakashi: The Copycat Robot"—a fun side project I built a few years ago. The name is inspired by the famous character from Naruto, Kakashi Hatake, also known as the Copycat Ninja.The goal of this robot was to mimic Kakashi's ability to copy movements—though, of course, in a more limited way. Check it out for yourself!Here are the things I used to build this:
- Neural network inference pipeline for videos in Tensorflow - #Deeplearning #Tensorflow
Just as we saw a huge influx of images in the past decade or so, we are now seeing a lot of videos being produced on social media. The need to understand and moderate videos using machine learning has never been greater. In this post, I will show you how to build an efficient pipeline to processes videos in Tensorflow. For simplicity, let us consider a Resnet50 model pre-trained on
- Finding Where's Waldo using Mask R-CNN - #Deeplearning #ML
When I was a kid, I really loved solving Where's Waldo. There were few books (it used to be called Where's Wally) in our school library on which I spent hours finding Waldo. For people who do not know what it is, basically Waldo - a unique character is hidden among hundreds of other characters and you have to find him in all the chaos in the image. Now that I am too old to be solving it and
- Higher level ops for building neural network layers with deeplearn.js - #Deeplearning #javascript #ML
I have been meddling with google's deeplearn.js lately for fun. It is surprisingly good given how new the project is and it seems to have a sold roadmap. However it still lacks something like tf.layers and tf.contrib.layers which have many higher level functions that has made using tensorflow so easy. It looks like they will be added to Graphlayers in future but their priorities as of now is to
Saturday, 26 October 2013
Performance modelling of a linux system using fork bomb
Error removing file: Directory not empty
Then i tried doing that from terminal using 'rm -rf Main_Game'. Again it didn't work. It said rm: cannot remove 'Main_Game': Directory not empty
Then I thought there might be some process using that folder. So I restarted and tried again. It didn't work :(
Then I thought there might be some error in the filesystem. So I did force fsck.
$ sudo touch /forcefsck
$ sudo reboot
It successfully completed fsck. However the problem wasnt fixed
Then I did something which I should've tried long back and it worked!!
I simply deleted the folder (not force delete). The folder Main_Game was moved to recycle bin. I just deleted from there.
I dunno how this worked though :P
Saturday, 7 September 2013
Automatic log manager for Game of Thrones series.
That was a good idea but not good enough :P. At least for awesome people like me doing work manually is too mainstream xD.
If you do all the work what is your computer there for???
So I wrote a script which automatically manages the log. And next time when I run the script it will continue from the place I stopped last time \m/. Now I am planning to start Game of Thrones TV series. People tell I'll like it because I am a big fan of Age of Empires and I love wars :D.
Setup
#!/bin/bash | |
# log is 1:2 | |
echo -n "how many episodes u wanna see: " | |
read count | |
while [ $count -ne 0 ] | |
do | |
log=`cat log` | |
expr "$log" : "\(.*\):.*" | |
series=`expr "$log" : "\(.*\):.*"` | |
episode=`expr "$log" : ".*:\(.*\)"` | |
if [ `echo "$series<10"|bc` -ne 0 ] | |
then | |
series=0$series | |
fi | |
if [ `echo "$episode<10"|bc` -ne 0 ] | |
then | |
episode=0$episode | |
fi | |
file=S"$series"E"$episode" | |
file=`find . -name "*$file*"` | |
#if file exists then play else go to next series | |
if [ "$file" ] | |
then | |
# vlc is run in full screen. If u r not using vlc change this line | |
vlc -f "$file" | |
count=`expr $count - 1` | |
series=`expr "$log" : "\(.*\):.*"` | |
episode=`expr "$log" : ".*:\(.*\)"` | |
episode=`expr $episode + 1` | |
echo "$series:$episode">log | |
echo "none">error.log | |
else | |
error_log=`cat error.log` | |
if [ "$error_log" == "error" ] | |
then | |
# this will just print a fancy message :P change it if u want | |
figlet end of episodes | |
exit | |
fi | |
echo "error">error.log | |
series=`expr "$log" : "\(.*\):.*"` | |
series=`expr $series + 1` | |
echo "$series:1">log | |
fi | |
done |
Step1
Step2
Running:
Now just enter the number of episodes you want to watch in a stretch and enjoy!
Monday, 20 May 2013
Customizing linux terminal with powerline (powerline-shell)
In the past I used to edit the bash superglobal $PS1 to make it look a littile better.
I found this awesome thing called powerline-shell on github which makes your terminal look so awesome. Not only it makes your terminal look beautiful it also helps us to visualize many things easily. Like errors, git stuff..etc
I took some time and modified it a little. Here is mine:
How to get it?
- Download powerline-bash.py from the link and place it in the home folder.
- Make it executable
chmod +x ~/powerline-bash.py - Then add the following lines to the file ~/.bashrc:function _update_ps1() { export PS1="$(~/powerline-bash.py $?) " } export PROMPT_COMMAND="_update_ps1"
- Now patch the font. Download anonymous Pro-Powerline.ttf and open it to install it
- You are done!!! Now just open the terminal.
Saturday, 18 May 2013
Jarvis, at your sevice
Hello everyone! Its been a long time since I blogged. Today I will show you how to use 'Jarvis' which is an open source software which can be used to control your Linux system using your hand motion, gestures which was made as my Human Computer Interaction project. This is mainly an image processing based project developed using python.
Things u can do using Jarvis:
- The first thing you can do using Jarvis is control your mouse. You just need a colored object (preferably has color different from its background). So you can do things like draw in air!
- The second thing is that you can assign any gesture which is a combination of
Left->Right, Right->Left, Top->Bottom, Bottom->Top to any command. So using this you can literally perform anything!!! The following are the things you can do by default:
- Maximize/Minimize/Close current window
- Go next and forward in PPT presentation
- Page up and Page down
- Switch window (Alt+tab)
- Take screenshot
- Shutdown/Suspend system
- Mute and unmute
- Open Calculator, File manager, Gedit
You can practically add anything else also. All you need to know is the command which does that and the equivalent of the gesture which you want to assign in the combination of Left->Right, Right->Left, Top->Bottom, Bottom->Top.
Getting dependencies:
Ubuntu:$ sudo apt-get install python-opencv xdotool
Fedora:
$ sudo yum install python-opencv xdotool
Installation:
$ git clone https://github.com/alseambusher/jarvis.git$ cd jarvis
$ ./install
Now you need to set the screen resolution of your screen. If your screen resolution is 1366x768 then skip this step.
$ gedit ~/.jarvis/config.py
change the value of variable RESOLUTION corresponding to your screen resolution.
Running:
Now simply open Jarvis from your Applications menuOR
Do this:
$ cd ~/.jarvis
$ python main.py
Now click on Start Jarvis
Add new gesture:
1. Go to settings from the File menu2. Click on Add gesture from the File menu of settings
3. Suppose say that you want to add a gesture which opens terminal.
Say the gesture you wish to give is (Left to Right)->(Right to Left)->(Top to Bottom)->(Bottom to Top)
The command corresponding to open gnome terminal is 'gnome-terminal'
4. Fill the details and save it.
You are done!!!
Editing and deleting gestures are simple :P
How to use?
We need two different colored objects which are required to run. One the tracker and the other one is the flag!- If the flag is not exposed then the gesture is disabled and Jarvis works as a mouse controller.
- When both tracker and flag are exposed the gesture begins. Perform the gesture using the tracker. Once the gesture is complete hide the flag. Jarvis then processes and analyses the gesture performed and checks for any matches from the existing database. If there is a match then it executes it!.
Customizing Tracker and Flag color:
By default the tracker is yellow color and flag is blue color.You can change it by editing the config.py file
$ gedit ~/.jarvis/config.py
Change the min and max values of TRACKER_COLOR and GESTURE_COLOR corresponding to the HSV values of the color intended
By default these are the values:
TRACKER_COLOR={'MIN':[20,100,100],'MAX':[30,255,255]}
GESTURE_COLOR={'MIN': [108.0, 100, 10],'MAX': [118.0, 255, 255]}
Thank you. Dont forget to contribute to this open source project as there is a lot of scope for improvements. :)
Fork the project from here: https://github.com/alseambusher/jarvis
Thursday, 4 April 2013
Open with script in Gnome/Ubuntu
Step 1: Find MimeType of the target file (the file you want to open). You can find it in file properties
Step2: Download this gist. And make it executable:
$ chmod +x open_with_script.sh
Step3: Then run the script and enter necessary details. For example I was trying to install yEd, an awesome Software Engineering Drawing tool. This is what I did:
NOTE that if the command is <command> <file name> enter as <command> %U
Step4: This step is optional. This is to set font to the script. If you don't wanna do it, skip it. Open application called "Main Menu" or alacarte which comes by default in ubuntu. Then search for the script you just added and then set the font.
Step5: Now just set the file to open with the script by default if necessary using file properties.
Now you can simply open the file using yEd by default. So you are done!!!
Saturday, 16 March 2013
Installing Turbo Assembler (TASM), Turbo Debugger (TD) on Ubuntu
Step2
sudo apt-get install unrar
Step3
download this sample .asm file. Place the file in the tasm directory.NOTE: You can use your own asm file instead
Step4
Open dosbox( generally found in games sublist ). Now you have to mount the virtual c drive.mount c /home/<username> eg: /home/alse
Step5
Now test the test3.asm which you downloaded
Tuesday, 26 February 2013
Make STAR WARS message greet you when you open the terminal
Suppose say you are using Bash, when you open your terminal the file ~/.bashrc will run. Similarly if you are using Zsh => ~/.zshrc will run. So basically I can just put an echo statement in that to make it greet me every time I open my terminal. Today lets do something more interesting. Someting like this:
To get this you can just download this gist and add the contents in it to ~/.bashrc or ~/.zshrc or ~/.cshrc ..etc depending on which shell you are using. Or you can just copy the following and paste it in ~/.bashrc or ~/.zshrc or ~/.cshrc
function print_element { | |
while [ $cols -ge 1 ] | |
do | |
printf "$element" | |
cols=`expr $cols - 1` | |
done | |
} | |
function print_sentence { | |
cols=`tput cols` | |
size=`expr "$sentence" : '.*'` | |
cols=`echo "($cols-$size)/2"|bc` | |
cols=`expr $cols - 1` | |
element=' ' | |
print_element | |
echo $sentence | |
} | |
cols=`tput cols` | |
element='~' | |
print_element | |
#PRINTING STAR WARS | |
if [ `tput cols` -le 80 ] | |
then | |
if [ $# -ne 1 ] | |
then | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo " 8888888888 888 88888 " | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo " 88 88 88 88 88 88 " | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo " 8888 88 88 88 88888 " | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo " 88 88 888888888 88 88 " | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo "88888888 88 88 88 88 888888" | |
echo "" | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo "88 88 88 888 88888 888888" | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo "88 88 88 88 88 88 88 88 " | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo "88 8888 88 88 88 88888 8888 " | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo " 888 888 888888888 88 88 88 " | |
cols=`tput cols` | |
cols=`echo $cols/2-17|bc` | |
element=' ' | |
print_element | |
echo " 88 88 88 88 88 8888888 " | |
echo "" | |
fi | |
#PRINTING STAR WARS DONE | |
fi |
Saturday, 16 February 2013
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
I was setting up SSL on localhost to get https://localhost. I was successfully able to get the digital signature, sign it. But when i restarted apache2 I was getting this error:
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
This means that port was already being listened. Hence at first I tried to kill the processes which are using that port. When this didn't work I tried this:
open /etc/apache2/ports.conf
Problem solved!!
Wednesday, 6 February 2013
Top 100 apps / software / libraries in Linux
Yesterday I took up the task of of listing out top hundred+ apps/softwares/libraries I use in Linux thinking that it might help people to make a list of what they have to install when they have newly installed linux.
Editors
- vim - Vi improved
- gvim - Vim with GUI
- emacs
- kate
- geany - Good editor for many languages.
- bluefish - Good editor for PHP, Javascript, HTML, CSS
- code blocks
- eclipse
- netbeans
- pycharm
- jedit
Programming - qt designer - Design in Qt
- pyqt4 - Python Qt library
- qt creater - Design and Code for Qt
- freeglut - OpenGL library
- filezilla - Good ftp client
- g++ - c/c++ compiler
- cmake - Cross-Platform Makefile Generator
- wireshark - Packet analyser
- unetbootin - startup disk creater
- apache2 - apache server
- mysql - mysql client/server
- php5 - php5 library
- php5-mysql - mysql library for php
- ipython - interactive python shell
- phpmyadmin - manage mysql databases
- open-jdk - java development kit
- git - revision control
- sqlite3 - database
- arduino - arduino programming
- linux-matlab - matlab for linux
- FontForge - create your ttf, ps..etc
- xampp
General stuff - unrar - extract files from rar archives
- ark - KDE archiving tool
- kchmviewer - Windows CHM viewer for KDE
- gsnash-viewer - swf viewer
- virtualbox - x86 virtualization solution
- wine - wine is not an emulator
- deluge - torrent client
- linuxdcpp - Dc++ client
- ubuntu-tweak -tweak ubuntu settings
- compiz-config -change compiz settings
- k3b - CD/DVD buring tool
- brasero - CD/DVD buring tool
- nerolinux - CD/DVD buring tool
- playonlinux - Play on Linux
- q4wine -runs GUI utility for wine applications and prefixes management.
- dropbox - cloud
- gnome-do - Launcher application
- gparted - partition manager
- empathy - GNOME multi-protocol chat and call client
- lightread - Google reader
- pidgin - IM client
- dolphin - File manager
- thunderbird - Mail manager
- cheese - webcam client
- evolution - calander
- adobe flash player
- axel - A light download accelerator for Linux
- proxychains - proxifier for linux
- ubuntu one - ubuntu cloud
- stellarium - astronomy
- byobu - cool terminal
- burg - customize how your bootloader looks
- dosbox
- docky - dock
- avant-window-navigator - MacOS X like panel for GNOME
- gnome-do - awesome searcher
Update - Conky
Package Managers - synaptic - package manager
- apt-fast - 'apt-get + axel' to download very fast
- aptitude - command line package manager
- pacman - package manager
Browsers - chomium-browser
- google-chrome-stable
- firefox
- konqueror - advanced file manager, web browser and document viewer
Media editors - picasa(on wine) - photo editor/viewer
- blender - 3D modelling
- gimp - photo editor
- audacity - audio editor
- inkscape - an SVG editing program
- dia - diagram editor (UML,Use Case,ER..etc)
Update - Kdenlive - awesome video editing software
Media Players - amarok
- banshee
- vlc
- mplayer
- Rhythmbox
Interfaces - unity
- gnome-shell 3
- kde plasma
- awesome
- openbox
Games - open Arena
- savage2
- assault cube
- nexuiz
- super tuxkart
- blobby volley
- hedgewars