Skip to content

Instantly share code, notes, and snippets.

Kneerunjun kneerunjun

View GitHub Profile
View systemctlunits.md

What is the need of getting such upstarted services on linux ?


I have tested a code working fine on my Raspbery. While much of effort has gone into hardware debugging and getting the ports to work as expected, It still is a challenge to run this program evrytime I have to showcase things to people.Fo each instance I have to connect the hardware along with the peripherals and then carefull issue commands to start the desired program

  1. Logistics of the peripherals is cumbersome
  2. Peripherals sdo consume more amperage

Would it not be good if there was a way th program upstarts with the machine itself ?

Or one up - wait for me in suspension to get started and sensing.

View i2ctest.c
/*
date : 25-AUG-2017
author : kneerunjun@gmail.com
purpose : to try measuring Analog inputs on Rpi using an ADS1115 over I2C and then connect a MQ135 Co2 measurement unit
compilation : gcc ./i2ctest.c -o ./bin/i2ctest -lwiringPi -lwiringPiDev -lm
run : ./bin/i2ctest
*/
#include <stdio.h>
#include <math.h>
#include <stdlib.h> // exit, delay
View design-automatio-ilp.md
  • Design Automation using CATIA VBA

    • Pre requisites

      • Mechanical design fundamentals
      • Mechanical Computer Aided Design (CAD)
      • VB.NET syntax, OO programming
      • Understanding of COM principles & Interface based design
    • The need for CATIA v5VBA (Why) :

      • State: CATIA is authorititive/popular CAD tool used for virtual mechanical design. Althought when it comes to repititive tasks that need precision it can get some assitance from the CATIA VBA tools.
      • VB code run without human interventions atop CATIA (CATIA VBA) leads to better efficiency + precision.Saves time for the engineers so that they can concentrate on higher, more innovative tasks.
      • For large engineering organizations,since the business logic becomes **less
View docker-installation.md

Getting docker started on Linux machine

Like me I expect you to have a Linux machine running atop VMbox that may inturn running on either Win10 or Mac. This also means that you have a linux machine already and all your docker commands are fired from a linux machine. Which gets me to the straight point - no need for docker-machine commands

Installing docker on your linux machine

Im using Anteregos(Arch) with Gnome desktop

View python-mock-problem.md

Problem description: 

  1. Create an application which requires the users to input username and password to register.
  2. Write a program to check the validity of password input by users.

Following are the criteria for checking the password:

  1. At least 1 letter between [a-z]
  2. At least 1 number between [0-9]
  3. At least 1 letter between [A-Z]
  4. At least 1 character from [$#@]
View webdev-mock-project.md

📚 Academy collects quarterly data

Educational function (Academy) of your organization provides you with training services, which include:

  • 🎓 Foundation program for the fresh graduates
  • 🎓 Continuous education support for employees
  • 🎓 Certification program for the employees
  • 🎓 Books and procurement - Library function is not included though
  • 🎓 Field trips and industrial visits
  • 🎓 E-learning and publications.
  • 🎓 Workshops, roadshows, awareness campaigns
View design-automtion.md

📚 Design Automation

📗 Before you take the course

  • ✏️ Prerequisites

    • CATIA v5
    • Mechanical Design fundamentals
    • Mechanical space analysis and measurements
    • Visual Basic.NET
View iot-foundation.md

Iot topics : path for becoming developer / builder

  • All the tables together make a stack You can call it as the architechture stack up
  • Each Table refers to a section in the stack. At all given times you need all the sections to build a complete solution
  • Each section has a option of either acquiring the skills- DIY or buyout option where you can customize by learning a few commands
  • If a person is DIY for all the sections then he / she is referred to as a full-stack developer
  • The target needs to be decided as to which path would he /she like to DIY or buyout
View rctimer.py
#!/usr/bin/python
import RPi.GPIO as gpio
import time
import math
gpio.setmode(gpio.BOARD)
gpio.setwarnings(False)
print('Temperature oC')
print('-------------------')
while True:
gpio.setup (5, gpio.IN)
View 01Introduction.md

Distributable python modules using distutils.core


If you have lately installed a module using python's distutils then you must have hit the wall when it comes to un-installing the same. python-pip is good but then it would not work if you have used python's distutils actually to install it in the first place.

This is most probably what you have done to install your python module

$ cd "module directory"
$ python3 setup.py sdist
You can’t perform that action at this time.