manish
Python Netmiko – network automation
If you have been using expect on Linux or paramiko with python, then you will feel the ease of programing with netmiko. Netmiko really simplifies ssh session management on network devices. To install netmiko use pip3 or pip installer Netmiko currently supports many network operating systems, including Cisco IOS variants, JunOS, Linux etc. You can […]
Apache access and error logs in Fluentd
To parse and add Apache2 access and error logs add this section to your /etc/td-agent/td-agent.conf Fluend config file Restart td-agent Now, access apache web pages and you will see logs going into elastic database. In Kibana management, create new index pattern like apache-* to visualize apache logs in kibana
Getting CCTV streams in Python
I have basic CCTV setup at home with two bullet cameras on 4 channel hikvision DVR. Hikvision DVR does not offers face detection, vehicle detection or any other image processing functions with basic cameras. I thought it will be worth to get CCTV feeds in python and then do try out face detection etc on […]
Programming nodemcu on micropython firmware
NodeMCU board is based on ESP8266 wifi chip. It is an affordable board for IoT, robotics and other embedded programming projects. So far I have used NodeMCU with Arduino to build IoT relays, IoT doorbell and program a number of sensors. NodeMCU and micropython together make embedded programming really simple and easy. To start with, […]
Monitor power usage and other parameters of Linux server
This weekend I decided to exchange my 8 year old i3 laptop with a desktop. I was offered an HP elite 8300 small form factor desktop in exchange of laptop and 7000 Rs. So far I was using raspberry pi 3 for hosting web based apps and running some other programs 24×7. I mainly opted […]
Machine learning using decision tree algorithm in python
Decision tree algorithm is very basic method to predict result of given input using the pre-known data (knowledge) . Let us see how this can be used in machine learning to do predictions. To start with, you need python scikit-learn module Think of a problem statement…say predicting a domestic animal with its height, length and […]
ACS712 current sensor with NodeMCU
When we buy an electrical appliance we trust that the load mentioned on specs is correct. Let us try to build something to measure actual power usage of a 220V AC electrical appliance. ACS712 is available is 5A, 20A and 30A current rating. This sensor works on the principal of Hall effect. From the data […]
python based nmap port scanning
Nmap is a great tool to run scans on remote hosts and networks. python-nmap module uses underline nmap binary to run scans and adds advantage of programmable controls to get desired results. To start install python-nmap module. Here is a sample code how to use above module and run scans. Save this as scanit.py Output