Monday 11 March 2024

Set the boot files and boot the system from the GRUB prompt.

When you’re at the grub> prompt, you have a lot of functionality similar to any command shell such as history and tab-completion.

  • Use the ls command to list the contents of various partitions
and identify the linux root partition
grub> ls

  • The boot/ folder in the root partition would contain the linux
kernel and intrd image (initial ramdisk image)

  • Set the root partition, kernel and intrd image using grub> prompt
grub> set root=(hd0,gpt2)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda2
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot

The first line sets the partition that the root filesystem is on. The second line tells GRUB the location of the kernel you want to use. Start typing /boot/vmli, and then use tab-completion to fill in the rest. Type root=/dev/sdX to set the location of the root filesystem. Yes, this seems redundant, but if you leave this out you’ll get a kernel panic. How do you know the correct partition? hd0,1 = /dev/sda1. hd1,1 = /dev/sdb1. hd3,2 = /dev/sdd2. I think you can extrapolate the rest.

The third line sets the initrd file, which must be the same version number as the kernel.

The fourth line boots your system.

  • When you have successfully booted your system, run these commands to fix GRUB permanently:

 sudo update-grub
 sudo grub-install /dev/sda

Install TeXstudio on Ubuntu

Add the ppa 

sudo add-apt-repository ppa:sunderme/texstudio

sudo apt install texstudio                      

sudo apt install texlive-latex-extra

sudo apt install texlive-bibtex-extra

sudo apt install biber


## To solve eps figures not included in tex output

sudo apt install texlive-font-utils

Sunday 10 March 2024

Compress pdf on Ubuntu

 gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf



-dPDFSETTINGS=/screen lower quality, smaller size. (72 dpi)
-dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs. (150 dpi)
-dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting (300 dpi)
-dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting (300 dpi)
-dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file

Friday 29 April 2022

Raspberry Pi Headless on Raspberry Pi OS Debian version: 11 (bullseye)

Debian version: 11 (bullseye) of Raspberry Pi OS  has removed the, default user “pi”  to enhance security. As the result applications that relied on the default user 'pi' would break. Here we shall see how to

  1. Create a default user in Raspberry Pi OS (bullseye)
  2. Enable SSH on Rpi and SSH into it
  3. Configure wifi on Rpi
All the above three points can be accomplished either by using the Raspberry Pi imager or by using third party tools like Etcher. The Raspberry Pi imager provides a graphical way to do the above things, whereas the Etcher based approach leads a simple command line based solution. A headless setup covering rpi imager and Etcher is discussed in this short tutorial. 

Headless Raspberry Pi (minus the keyboard, mice and monitor) allows the user to control the Raspberry Pi wirelessly from any other PC/Laptop. 





Contents of the wpa_supplicant.conf  for configuring wifi on Rpi headless (see video for details)

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=<Insert 2 letter ISO 3166-1 country code here>
update_config=1

network={
 ssid="<Name of your wireless LAN>"
 psk="<Password for your wireless LAN>"
}

rpi-bullseye-headless



burn rpi os into sd card







Sunday 25 October 2020

LaTeX crash course

A crash course to get you started with LaTeX, LaTeX, which is pronounced «Lah-tech» or «Lay-tech», is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

LaTeX is not a word processor! Instead, LaTeX encourages authors not to worry too much about the appearance of their documents but to concentrate on getting the right content [1].




overleaf tutorial

latex tutorial
tex studio



Tuesday 7 July 2020

Grasha's Teaching Style Survey

To understand your teaching style and improve weaker skills please take this online scoring survey. 
Teaching style affects how Teachers present information, interact with students, supervise course work, projects and other academic work. Anthony Grasha (1996) has identified five teaching styles as follows:

  • Expert (transmitter of information)
  • Formal authority (sets standards)
  • Personal model (teaches by direct example)
  • Facilitator (guides by asking questions, exploring options)
  • Delegator (develop students ability to function autonomously) 


Copyright 1976, 1987, 1990, 1996 by Anthony F. Grasha and Sheryl Riechmann-Hruska, University of Cincinnati, Cincinnati, Oh 45221


Tuesday 23 June 2020

Add virtual environment to Jupyter notebook

Add/Remove Virtual Environment to Jupyter Notebook
========================================

1.Activate the virtual environment.


2. Install the Jupyter Core

sudo apt install jupyter-core


3.Install ipykernel which provides the IPython kernel for Jupyter


pip install --user ipykernel

4.Add your virtual environment to Jupyter by typing:

python -m ipykernel install --user --name=ENVNAME


This should print the following:

Installed kernelspec myenv in /home/user/.local/share/jupyter/kernels/ENVNAME


The virtual environment is now added in the Jupyter Notebook


5.Launch a Jupyter Notebook and change the Kernel using the option Kernel>Change Kernel


6.To list the paths of all the listed kernels use the command
jupyter kernelspec list

7. It is also better to install jupyter notebook to the environment itself (i had to face the situation package not found when running the notebook as in step 4 and then changing the kernel). To do this activate the environment and then type in 

conda install jupyter notebook

8.To uninstall any unwanted kernel, list the paths of all the installed kernels and then uninstall using the command

jupyter kernelspec uninstall unwanted-kernel

Add Virtual Environment to Jupyter Notebook

Saturday 20 June 2020

fake news and image search tools

Two online tools that can used to make reverse image searches are TinEye and Google image search. These can be used locate the sources of fake news images.

Most often the fake news creators use old images available on net and then put sensational captions/comments relevant to current situation(s). These 'fake images' are then posted on social media platforms (facebook, twitter etc) which are then widely shared. The account from which the 'fake image and content' is first posted is usually deleted in a few hours.

But, by then the damage would have been done in real world.

Interestingly, these tools can also be used to perform copyright violation of images.

https://tineye.com
https://images.google.com

fake news image
fake news



Friday 29 May 2020

OBS Studio crash course

The Open Broadcaster Software is a free and open-source cross-platform streaming and recording program. OBS Studio is available for free on Windows / Linux / Mac platforms. Download and install OBS Studio using this link.
https://obsproject.com

 A crash course to use OBS Studio:
You can record a video of ppt in just 5 minutes to share with your students.

There are lots of videos available on YouTube to use the advanced features of OBS Studio

Download the help file

Required Hardware:

  • Laptop / PC
  • Phone headset
  • Internet connectivity
  • Patience and time


Watch the video (8 minutes) from this link to record the first video using OBS Studio



Now share the video recorded using any of the following platforms

  • Google Classroom
  • WhatsApp
  • Youtube Channel

Or upload the video on your You Tube channel and share the link on the platforms above. Share video recordings of short video clips (6- 8 minutes) in small portions of the topic to keep the audience engaged.

record ppt with obs and phone headset

Thursday 16 April 2020

How to use Jitsi Meet, an open source alternative

The steps to use Jitsi Meet, an open source video conferencing tool are listed below. Jitsi meet does not require any software to be installed (if running on PC) . One good feature is that the meeting link created remains after the present session has ended and can be reused, no need to create a new link unlike other tools. So the steps to setup a Jitsi Meet
  1. Go to https://jitsi.org/jitsi-meet/
  2. Scroll down the page and click "Start a call"
  3. On the next screen you will see a randomly generated meeting name scrolling below the field "Start a new meeting"
  4. Click in the space below and enter a suitable meeting name for example, meeting_may27 
  5. Click Go, and your meeting gets started
  6. After your meeting has started click the "i" icon in the bottom-right corner of the screen.
  7. Select "add password," and then enter your a password in the blank field and press enter.
  8. You meeting is now password protected
  9. Again click the "i" icon in the bottom-right corner of the screen. Click the copy icon at the end of the field Link to copy the link
  10. Share the link copied in step 9 via email/whatspp/sms along with the meeting password (entered in step 7) and share with the expected participants. 
  11. The participants can either paste the link in the browser running on PC/laptop or join meet by logging in via the jitsi meet app from Google play store or App store
  12. If the meeting is scheduled at a particular time, the admin (ie, person setting the password) has to enter the meet a few minutes before the meeting and perform step 7 once again. Please fill in the same password as shared with participants.
jitsi-a-zoom-alternative

zoom-alternative


Friday 14 February 2020

Setting up a Python development environment in Atom

Atom is an open-source cross platform for text and source code editor. It works on Microsoft Windows, Linux and macOS platforms. To configure Atom for Python programming follow these steps.

    1. Download and install Atom from https://atom.io
    2. On the Linux system activate the Python environment from the terminal ($ conda activate ENV NAME)
    3. Launch Atom from the environment by typing atom in the terminal.
    4. Now we shall install some packages to atom to make Python programming easier
          • In Atom, go to edit > preferences > install and search for the package you wish to install. Some useful packages for a python ide in atom are
          It would be better to install the autocomplete-python package without kite (use the option jedi). Else after installation of the  package, go to its settings and uncheck the option ' use kite powered completions'. It seems kite is snopping on your code.

          Cool! Now your Atom editor is ready for python programming. Happy Programming!
          To launch the terminal in Atom use Alt+ Shift +T





          Monday 3 June 2019

          Anti ragging and Aman Kachroo

          In 2009, Aman Kachroo, a first-year student at Dr Rajendra Prasad Government Medical College,Tanda, Himachal Pradesh was severely and persistently ragged by seniors who were allegedly drunk. On March 7, 2009, his four seniors attacked him so brutally in the boys' hostel that he died from Brain hemorrhage. In 2010, the four seniors - Ajay Verma, Naveen Verma, Abhinav Verma and Mukul Sharma were convicted and sentenced to four year imprisonment. In 2013, the four were released from prison on account of good conduct and were allowed to complete their studies, but were barred from Government jobs.

          Aman's father Rajendar Kachroo was actively involved in monitoring an anti-ragging programme mandated by the Supreme Court in 2009. Accordingly new guidelines were introduced at colleges across the country to protect students from ragging. 

          A 24 x 7 toll free antiragging helpline 1800-180-5522 and helpline@antiragging.in were launched. The functioning of the helpline is monitored by an independent NGO, at present Aman Movement www.amanmovement.org, which lists all the complaints received and the action taken on them. 

          A sad truth is that ragging still continues in varying degrees in our campuses and its surroundings. 

          https://indianexpress.com/article/india/crime/aman-kachroo-ragging-guilty-seniors-get-four-years-in-jail

          http://antiragging.in

          https://amanmovement.org

          Anti Ragging
          Aman Kachoo
          National Anti Ragging Help Line (UGC Crisis Hotline)
          24x7 Toll Free Number 1800-180-5522 
          (helpline@antiragging.in)

          Friday 24 May 2019

          Installing nussl - music signal processing

          nussl (pronounced ["nuzzle"]  is a flexible, object oriented python audio source separation library created by the [Interactive Audio Lab] (http://music.cs.northwestern.edu/) at Northwestern University. At its core, nussl provides implementations of common source separation algorithms as well as an easy-to-use framework for prototyping and adding new algorithms. The aim of nussl is to create a low barrier to entry for using popular source separation algorithms, while also allowing the user fine tuned control of low-level parameters.

          Steps to install nussl on Ubuntu 18.04 LTS
          ====================================
          1) First we need to download Anaconda.  Go to  https://repo.anaconda.com/archive/ to download the latest version of Anaconda
          After the download is done,  and compare it with the one on the Website, just to be sure.

          2) Verify the MD5SUM
          md5sum Anaconda2-2019.03-Linux-x86_64.sh

          3) Install Anaconda
          bash Anaconda2-2019.03-Linux-x86_64.sh

          4) Activating the Installation
          source ~/.bashrc

          5) Use the conda command to test if installation & activation was successful.

          conda list

          6) Making an anaconda env
          conda will create a new env named audio_test_env with numpy, scipy, and matplotlib installed in it. 

          conda create --name audio_test_env numpy scipy matplotlib python=2.7           

          or 

          conda create --name audio_test_env numpy scipy matplotlib python=3.6       


          7) Now, we need to activate the env. Run the following command:
          $ source activate audio_test_env
          (audio_test_env) $
          Now we’re in the conda env. 

          8) From within the conda env, you can do a regular pip install

          pip install nussl
          or:
          sudo pip install nussl

          9) We can exit conda env with the following command:
          (audio_test_env) $ source deactivate

          or 

          (audio_test_env) $ conda deactivate

          10) Install additional Python packages to a virtual environment.
          conda install -n yourenvname [package]

          11)To delete a conda environment, enter the following, where yourenvname is the name of the environment you wish to delete.
          conda remove -n yourenvname --all

          conda remove -n yourenvname --all

          12) updating conda
          conda update --all

          13) Dependencies for nussl ( in the virtual environment)
          (audio_test_env) $ pip install musdb
          (audio_test_env) $ pip install museval

          14) Installing spyder in python 2.7 environment
          (audio_test_env) $ conda install spyder

          15) Spyder environment managing
          conda install spyder-kernels=0.*
          if using conda/Anaconda, or

          pip install spyder-kernels==0.*
          if using pip/virtualenv.

          After installing via either method, run the following command inside the same environment:

          python -c "import sys; print(sys.executable)"
          and copy the path returned by that command (it should end in python, pythonw, python.exe or pythonw.exe, depending on your operating system).

          Deactivate that environment, activate the one in which Spyder is installed (if you've installed it in its own environment) and start Spyder as you normally would.

          After Spyder has started, navigate to Preferences > Python Interpreter > Use the following interpreter and paste the path from Step 3 into the text box.

          Start a new IPython console. All packages installed in your myenv environment should be available there.

          References
          ==========
          https://www.ceos3c.com/open-source/install-anaconda-ubuntu-18-04/
          https://www.digitalocean.com/community/tutorials/how-to-install-the-anaconda-python-distribution-on-ubuntu-18-04
          https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/20/conda
          https://interactiveaudiolab.github.io/nussl/getting_started/install.html#anaconda-env

          Wednesday 11 July 2018

          Skipping acquire of configured file 'main/binary-i386/Packages' as - google earth

          If you encounter the following error on google earth update on ubuntu, the fix below can be applied to resolve it.

           Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/earth/deb stable InRelease' doesn't support architecture 'i386'

          Fix
          open terminal and type

          sudo gedit /etc/apt/sources.list.d/google-earth-pro.list 

          Locate this line and edit it as given below

          deb http://dl.google.com/linux/earth/deb/ stable main

          edit as

          deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main


          Thursday 28 June 2018

          Okhi Relief Fund PAN

          Okhi Relief Fund PAN ( Cyclone Ockhi Relief Fund PAN)
          PAN number of Kerala CM Ockhi relief fund. The donations made by public, Government employees and Teachers (via salary deduction) to the Kerala Chief Minister Distress Relief Fund (CMDRF) for Cyclone Ockhi Relief is eligible for 100 % exemption from income tax (under section 80 G (2) (iii hf)) of the Income Tax Act 1961.

          To claim income tax exemption for the amount donated while filing Tax returns, the following details may be entered in the 80G tab in Income tax e-filing page.

          The details are to be entered under the section A Donations entitled for 100% deductions without qualifying limit.

          Name of Donee  : Chief Minister Distress Relief Fund
          Address : Government of  Kerala
          District: Thiruvananthapuram
          State  : Kerala
          Pin Code : 695001
          PAN of Donee : AAAGD0584M
          Amount of Donation : ( Enter the Amount contributed to the CMDRF)

          For further details 
          CMDRF (A Section): 0471-2518513 / 0471 - 2518684
          CMDRF (B Section): 0471-2518487




          Monday 11 June 2018

          Raspberrry Pi setup

          RaspberryPi installation &  wi-fi setup using SSH. Only a LAN cable to connect to RPi is needed. Separate keyboard, mouse, HDMI monitor not required.


          Tuesday 1 May 2018

          Simple Latex Flyer

          A simple single page Flyer that I created for the IoT workshop. The flyer is based on the Latex document class-leaflet.  Tex files are also posted, feel free to modify and use.

          Flyer tex files



          Simple Latex brochure template

          A simple brochure brochure that I created  for the IoT workshop. The brochure was created using the leaflet document class.
          Tex files are also posted, feel free to modify and use.

          Tri-fold brochure files