Blah Blah

December 27, 2018 Leave a comment

ooo

 

This is my new emoji

Categories: Uncategorized

Download script for Operating System course material- Indian Institute of Science

June 10, 2011 Leave a comment
#!/bin/bash
for ((a=1;a<=116;a++))
do
mkdir $a
cd $a
y=$a*100
z=$y+70
for ((i=$y;i<$z;i++))
do
wget http://uva.onlinejudge.org/external/$a/$i.html
done
echo $a 'done'
if [ $a -eq 9 ]
then
a=99
echo $a
fi
cd ..
done

Download script for Operating System course material- Indian Institute of Science

February 19, 2011 7 comments

I was lazy to click through all the pdf on that site hence the following code 🙂

The following code downloads the course material completely by making respective folders .Copy Paste the code and run it.
the downloaded material contains

  • Lecture Notes
  • Teacher PPT
  • Question Bank
import urllib
import os
file = urllib.URLopener()
for i in range(1,21):
	a=str(i)
	os.makedirs('./module'+a)
	os.chdir('./module'+a)
	file.retrieve("http://nptel.iitm.ac.in/courses/Webcourse-contents/IISc-BANG/Operating%20Systems/pdf/PPTs/Mod_"+a+".pdf",a+".pdf")
	file.retrieve("http://nptel.iitm.ac.in/courses/Webcourse-contents/IISc-BANG/Operating%20Systems/pdf/Lecture_Notes/Mod%20"+a+"_LN.pdf",a+"_LN.pdf")
	file.retrieve("http://nptel.iitm.ac.in/courses/Webcourse-contents/IISc-BANG/Operating%20Systems/pdf/Question_Bank/Mod_"+a+".pdf",a+"QB.pdf")
	os.chdir('/home/mak/OS_NPTEL')

You will need python already installed in your system to get this working.

    Steps

  • if you are using linux [ubuntu] or any alternative python comes installed , else download the python installer for your OS eg: WINDOWS
  • save the code in a file with filename.py as extension
  • type this – python filename.py

Please change the path names – replace “/home/mak” with the desired path you want.

OR

Download the archive here ( if you have clicked here you are super LAZY )

anyway i urge you to fiddle with the code 🙂

Any suggestions are welcome! –

Combine multiple PDFs into one file in Ubuntu Linux

October 3, 2010 Leave a comment

It is very useful when you multiple pdfs talking abt the same thing!

Just follow the following steps:


$ sudo apt-get install gs pdftk

After the installation , go to the folder containing the pdf files and :


$ gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=target.pdf -dBATCH 1.pdf 2.pdf 3.pdf


Create an Invisible Folder – hide stuff ;)

September 1, 2010 Leave a comment

Follow these steps to create an invisible folder

Step 1 : Right Click on Desktop->New->New Folder

Step 2 : Right Click on New Folder->Rename , with Numlock On presse “Alt+0160” to remove the Name 🙂 , press Enter.

Step 3: Right Click on folder ->properties-> Customize->Change Icon , Choose an invisible folder option ( it is tested on Windows 7).

There you go the Folder you created has Vanished !!

Don’t worry you can remove it easily too, Follow these steps

Step 1 : Open Command Prompt

Step 2 : the prompt says C:\Users\<your username> , enter cd Desktop

Step 3 : enter dir/x

Step 4 : the last entry will give you a DIR with name as 9DEC~1 or something, which is dependent on the machine , that is your invisible folder

Step 5 : rd/s 9DEC~1 , you will get a prompt saying (Y/N) , enter Y

the invisible folder has vanished completely 😉

Have Fun Hacking , Do share here .

Web Rap !! Yo Yo

August 8, 2010 Leave a comment

This is a must-watch for all the Web Developers! You will be amazed

Categories: Random Tags: , , , , ,

Find the GCD of two very very large numbers

July 20, 2010 2 comments

Yes this is possible . Thank you python 🙂

t = int(raw_input())
while t:
    s = raw_input()
    a,b = [long(i) for i in s.split(' ')]
    while b :
        a,b = b,long(a%b)
    print a
    t =t - 1

Explanation:

The above code takes input of the number of tries you want to carry
out i.e ( t )
and then it accepts the numbers separated by a space
i.e 123123123123123 123123123123123123123123123
simple isn’t it? Yes …

Sample Input
1
123123123123 123123123123123123

Sample Output
123123

OpenHackDay – Bangalore (Successful)

July 7, 2010 Leave a comment

On the 24th of July yet another edition of the most awaited HACKING meet ” Open Hack India“2010 will be held in Taj Residency , Bangalore.

DETAILS

HURRY!!

Categories: Events Tags: , , , , ,

Pycon – National Python Conference

July 7, 2010 Leave a comment

MSRIT is proud to present second edition of Python Conference on 25th and 26th of September.

Details are available here


Categories: Events Tags: , , , ,