Blog

  • Ok this is a very interesting and hot topic right now. I personally have been so in love with this trend. I have developed a simple  Bot in my college using AIML technology. The similiar is being used in most of the bot right now also, but in different context. After Facebook has created a new development platform for bot developers. Its even being more interesting in case of usage.

    “Bot for everything and everyone.” This is how I see.

    Enough of the literature. 😀

    I have been collecting materials and developing bots for basic tasks for my personal usage. And before creating bot I would suggest understanding branches required for bot development, ie. Flow of NLU.

    The main task that a bot building starts with is Intent Classification and Entity Extraction from the message text given to the bot by user.

    Example:
    User -> Bot:
     Book me a room for a night

     Intent/ Context: book_room
     Entity Extracted: number_of_room -> a room (one room)
    duration -> a night (one night) (more…)

  • Beginning with SQLAlchemy Python

    Ok I have been doing Python for a while now and Python is amazing. So thought of writing a blog about it in my new blog. Leaving the chitchat.

    We will be performing database operations (CRUD ) in SQLite database. This is a simple database that many programming language support and recommended for beginning database programming for most of them. We will be building a simple todo application to begin with. For further practice, you can create Restaurant Menu App, Remainder App, whatever you like. Be creative. 😎😎😎

    We have few steps that we will be following. Importing libraries, connecting to database (*.db) and creating session interface for performing operations.

    We will be using SQLAlchemy python module to begin.

    Importing dependencies

    import sys
    from sqlalchemy import Column, ForeignKey, Integer, String
    from sqlalchemy.ext.declarative import declarative_base
    from sqlalchemy.orm import relationship
    from sqlalchemy import create_engine

    These are the dependencies that we will be using for begin with.

    (more…)

  • Simple method for creating ISO out of compiled BIN

    Say the file name of assembly code is .

    Compile assembly code,

    nasm -f bin example.asm -o example.bin

    Download Link:
    http://www.nasm.us/pub/nasm/releasebuilds/2.10.09/win32/nasm-2.10.09-win32.zip

    Convert binary file (.bin) to ISO file,

    miso example.iso -ab example.bin

    Download Link:
    http://www.magiciso.c

  • Considering Linux OS, we can see a text “BogoMIPS”. It also displays a number. What does it mean?

    BogoMips is an unscientific measurement of CPU speed made by the Linux Kernel when it boots to calibrate an internal busy-loop. The value can be used to verify whether the processor being used is in proper range of similiar processors.

    BogoMips is Linus’s own invention. His kernel version 0.99.11 needed a timing loop (the time is too short and/or needs to be too exact for a non-busy-loop method of waiting), which must be calibrated to the processor speed of machine. Hence the kernel measures at boot time how fast a certain kind of busy loop runs on a computer. This is unscientific method of measurement of MIPS so is called Bogus (fake).

  • Generally in a computer system we can assign 4 primary partitions, or we can assign 3 primary partitions and 1 extended partition with as many logical partitions as you want but withing the range of A – Z and assign any drive letter to the drives in windows. Similarly in linux its from sda-sdz. In the deeper level, to MBR we can describe more detailed and quite understanding way for why only 4 partitions. A MBR stored in 512 bytes of code in first sector of storage device.

    The above is the memory map of MBR. This shows how many bytes are allocated in the code and which part of the code does what specific task.

    In this section our concern is about the partition table only. That is at address 01BE,  which is of 64 bytes. The complete MBR code would look like below.

    MBR_Pic

    The highlighted code is the partition table code which is 64 bytes long. Each 16 bytes of code represents 4 partitions.

    Partition 1:80 20 21 00 83 FE FF FF 00 08 00 00 00 F8 5F 02 
    Partition 2:00 FE FF FF 05 FE FF FF FE 07 60 02 02 F0 1F 00 
    Partition 3:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Partition 4:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

    In the first partition from above
    80: The first byte represents the bootable or non-bootable status of the partition. If the value is 80 the partition is bootable else if value is 00 it is not.
    20 21 00: (Cylinder-Head-Sector Address) The first byte is represents head, Second represents “almost the head” and the last byte represents the Cylinder
    83: Represents Partition type in our case XX means
    FE FF FF: Cylinder Head Sector Address of the last absolute sector in partition
    00 08 00 00: Logical block addressing of first absolute sector in the partition
    00 F8 5F 02 : number of sectors in partition in our case (sectors-in decimal)

    You can simple do the following:

    $file <EXTRACTED_MBR_FILE>

    Doing this you will the extracted data with partition info displayed.