Saturday, 4 May 2019

Grammar Mistakes in Technical Paper Writing

Let me share some experience in this post with you. I'm currently in the second year of my Ph.D. program. We are in the middle of paper submission and it was very difficult to write the paper without avoiding grammar errors.
Last time, my professor helped me a lot in correcting some errors in my first submission to the conference, such as not using a or the or sometimes using plural stuff with singular.
However, this time, the expectation is that in this second submission I will correct myself. Well, I was looking for help online. Although I have something to minimize my errors, the technical part is still a problem. In our paper writing, it is highly recommended that you write active voice sentences and be short and accurate. It's kind of hard to keep such a thing around.
Sometimes, while writing, you stuck to your concept and forget your part of writing. So, while you're writing, there obviously comes a time when you get annoyed about the mistakes your professor points out. At the same time, however, you should consider Yourself lucky that somebody is checking. When you send your paper for review and if you receive a rejection, they sometimes write "Not-Readable" in a comment.
This is kind of embarrassing that in Ph.D., u are facing such stupid grammar errors.
I think we're still in the learning stage and we shouldn't be disappointed. So, let's embrace the rejection by looking deeper and avoiding in the next submissions.

Friday, 14 December 2018

How To Create Multiple Columns From Single Column using Pandas in Jupyter


  1. import pandas as pd
  2. import tensorflow as tf
  3. from pandas import DataFrame
  4. s = pd.read_excel('SaroojWork.xlsx')
  5. s = s.BelowPMandatory.str.split(',', expand=True)
  6. s.columns = ['A','B','C','D','E']
  7. s[['A','A1']] = s.A.str.split(r'[',n=1, expand =True)
  8. s['A1']= s['A1'].str.replace(']','')

  9. s[['B','B1']] = s.B.str.split(r'[',n=1, expand =True)
  10. s['B1']= s['B1'].str.replace(']','')

  11. s[['C','C1']] = s.C.str.split(r'[',n=1, expand =True)
  12. s['C1']= s['C1'].str.replace(']','')

  13. s[['D','D1']] = s.D.str.split(r'[',n=1, expand =True)
  14. s['D1']= s['D1'].str.replace(']','')

  15. s[['E','E1']] = s.E.str.split(r'[',n=1, expand =True)
  16. s['E1']= s['E1'].str.replace(']','')
  17. cols = s.columns.tolist()

  18. cols.insert(1, cols.pop(cols.index('A1')))
  19. cols.insert(3, cols.pop(cols.index('B1')))
  20. cols.insert(5, cols.pop(cols.index('C1')))
  21. cols.insert(7, cols.pop(cols.index('D1')))
  22. cols.insert(9, cols.pop(cols.index('E1')))
  23. s = s.reindex(columns= cols)

  24. writer = pd.ExcelWriter('BookSarooj.xlsx')


  25. s.to_excel(writer,'Sheet1')

  26. writer.save()




Saturday, 7 July 2018

Graphs in GNUPLOT




Put your data in text editor as shown.. separate data files

Open Terminal and type gnuplot. I hope u already have installed it.

Go to the directory.

Write down Following code step by step.

gnuplot>  1. set term wxt enhanced                                                                                                                                                   
                                                                             
2 . set yrange [0:1]                                                                                                                                                                                                              
3.  set ytics .1         

4. set grid ytics                                                       

5. set style data histogram                                                                                                                                                 
                                                                             
6. set style histogram cluster gap 1                                                                                                                                       
                                                                             
7. set style fill pattern border -1                                                                                                                                         
                                                                             
8. set ylabel 'Delivery Rate'        

                                                     
9. set xlabel 'Buffer Size(MB)'                                                           

                                                                                                                   
10. set style line 1 lc rgb 'black' lt 1 lw 2 pt 2  ps 1.1                                                                                                                   
11. set style line 2 lc rgb 'red' lt 1 lw 2 pt 9 ps 1                                                                                                                                                              
12. set style line 3 lc rgb 'blue' lt 1 lw 2 pt 5  ps 1.1                                                                                                                   
13. set style line 4 lc rgb 'navy' lt 1 lw 2 pt 7  ps 1.1                                                                                                                   
         
14. plot 'SnW.dat' title 'Binary SprayNwait' with linespoints ls 1, 

'SnW_NoBinary.dat' title 'SprayNwait' with linespoints ls 2 , 

'Epidemic.dat' title 'Epidemic' with linespoints ls 3, 

'Repl_Algo.dat' title 'Rep_Algo' with linespoints ls 4
 


Monday, 25 April 2016

Makefile.in is Newer Than Makefile in Ns2 Solved

Hello Every one
While you are adding new class or modifying existing one, you encounter this problem.
when u type in terminal "Make clean or make " for compilation, it shows u Makefile.in is newer than Makefile.

So Follow following steps.

step 1. Go to ur ns-2.35 directory
step 2. type sudo gedit Makefile
step 3. type ur password and it will open Makefile
step 4. Make necessary  changes that u have made earlier in Makefile.in
step 5. Save and close file.
step 6. type make clean // remember u must b in ns-2.35 directory
step 7. type make 

 it will compile your class and will create object file. Now if there are no errors, u are done




Tuesday, 29 September 2015

Otcl for NS2 (Acknowledgement Programe )

set  ns [new Simulator]
set  n1 [$ns node]
set  n2 [$ns node]

#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf

#Define a 'finish' procedure
proc finish {} {
        global ns nf
        $ns flush-trace
    #Close the trace file
        close $nf
    #Execute nam on the trace file
        exec nam out.nam &
        exit 0
}

$ns duplex-link $n1 $n2 5Mb 2ms DropTail


 #=== TCP connection setup starts here ===
set tcp [new Agent/TCP]
set sink [new Agent/TCPSink]
set ftp [new Application/FTP]
$ns attach-agent $n1 $tcp
$ns attach-agent $n2 $sink
$ftp attach-agent $tcp
$ns connect $tcp $sink
$ns at 0.0 "$ftp start"


$ns at 5.0 "finish"

#Run the simulation
$ns run

Thursday, 10 September 2015

Otcl for Ns2 lecture 3

In this lecture we will add 4 nodes.
 ...Add following lines to your code done in lecture 1

#Define different colors for data flows

$ns color 1 Blue
$ns color 2 Red

#Create four nodes

set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]

#Create links between the nodes
$ns duplex-link $n0 $n2 1Mb 10ms DropTail
$ns duplex-link $n1 $n2 1Mb 10ms DropTail
$ns duplex-link $n3 $n2 1Mb 10ms DropTail

$ns duplex-link-op $n0 $n2 orient right-down #set position of nodes
$ns duplex-link-op $n1 $n2 orient right-up
$ns duplex-link-op $n2 $n3 orient right

#Monitor the queue for the link between node 2 and node 3
$ns duplex-link-op $n2 $n3 queuePos 0.5

#Create a UDP agent and attach it to node n0
set udp0 [new Agent/UDP]
$udp0 set class_ 1
$ns attach-agent $n0 $udp0

# Create a CBR traffic source and attach it to udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0

#Create a UDP agent and attach it to node n1
set udp1 [new Agent/UDP]
$udp1 set class_ 2
$ns attach-agent $n1 $udp1

# Create a CBR traffic source and attach it to udp1
set cbr1 [new Application/Traffic/CBR]
$cbr1 set packetSize_ 500
$cbr1 set interval_ 0.005
$cbr1 attach-agent $udp1

#Create a Null agent (a traffic sink) and attach it to node n3
set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

#Connect the traffic sources with the traffic sink
$ns connect $udp0 $null0  
$ns connect $udp1 $null0

#Schedule events for the CBR agents
$ns at 0.5 "$cbr0 start"
$ns at 1.0 "$cbr1 start"
$ns at 4.0 "$cbr1 stop"
$ns at 4.5 "$cbr0 stop"
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish"

#Run the simulation
$ns run




Monday, 7 September 2015

Tool Command Language - (Get data from user)

Getting input  from user.

Like in c programming language we use "scanf"  to obtain data from user like 

int x ;
printf("enter value of x \n");
scanf("%d", &x);

now in tcl we using following code to get data from user

puts "enter value of x "
set y [gets stdin] 
puts "$y"

Grammar Mistakes in Technical Paper Writing

Let me share some experience in this post with you. I'm currently in the second year of my Ph.D. program. We are in the middle of paper...