Source code for reading a file in Python:
file=open(’2.txt’,'r’)
file1=file.read()
file.close
to see the contents of the read file simply use
print file1
Source code for reading a file in Python:
file=open(’2.txt’,'r’)
file1=file.read()
file.close
to see the contents of the read file simply use
print file1

Read the below article:
http://epaper.timesofindia.com/Default/Scripting/ArticleWin.asp?From=Archive&Source=Page&Skin=TOI&BaseHref=TOIM/2008/07/27&PageLabel=9&EntityId=Ar00902&ViewMode=HTML&GZ=T
If he does n’t know about IAEA then what the hell did he speak in Parliament during debate….???????? A Person who does n’t know what is the expansion of IAEA is going to explain advantage of Nuclear Energy ….This shows where the Manmohan Singh Government and Rahul stands…He is not fit even to occupy an MP position…
I just got this sms from one of my batchmates “Govt has requested the people to avoid going to public places tommorrow as red alert is declared all over chennai following the serial bomb blasts in B’lore and Ahmedabad.It h’s been guessed tat they’re followin de word BACK
B-banglaore
A-ahmedabad
C-Chennai
K-Kolkata
Pls forward this to every body u care”..
From the above one you can clearly understand that this sms has been forwarded only to spread more panic and fear among the people! This is also a handiwork of some terrorist organisations… as their e main aim to keep people indoors..
Who knows they are following code word BACK???? this is simply a rumour spread out by someone(terrorists?) and by the time I am writing this post it would have been forwarded to 1000’s of people unknowingly…
Google ’s knol is a collection of user written articles from various topics ranging from history to General topics.And also it is mostly seen as a competitor to by Wikipedia started by Google. In Addition to this you can use your Google adsense account to display Google ads on knol so that you get paid whenever someone clicks ads on it or according to no of views..
To Sign in to knol you just need to use your Google account and after that you will get a verification mail to your google account ,after getting verified you can start posting articles on Google’s knol
And also your name will be displayed as verified if you get yourself verified by Phone or credit card… so you will be differentiated from others
Though it is a good project started by Google ,some questions have rised with regard to spam and how to differentiated Good articles from badly written ones!
Today I found out an important security loop hole in Google groups which is related to posting of messages
I am a owner of a small Proxy Google group with 1000 members and only I had the right to post and moderate messages.Today a noticed a couple of management tasks pending(Pending messages) in my Group,even though I have not given posting permissions to anybody…
After that I reviewed the messages which were spam sent through anonymailer.net
Google groups has a posting defect which allows any non-moderator and non google account holder to post messages directly by using the Group owners email address…
To check this I also sent out a mail to my proxy group using a php script by using my mail address (Group owner mail address)
To check for yourself go to
http://www.anonymailer.net/
Example: http://groups.google.com/group/unblocktheblocked ( I am taking this proxy group as example)
From address:unblocktheblocked@gmail.com (Owner address)
To address :unblocktheblocked@googlegroups.com
subject: New asdpasdpaspdasd (Any thing)
Message: asdasdasdasdas(Any thing)
Sender :unblocker(some name)
then submit it and after few minutes you will notice a new post http://groups.google.com/group/unblocktheblocked
Thus it Google groups allows even a non google account holder to post message where it should not allow emails from masked addresses….
Below is the code which will allow you to create folders/directories in Python
import os
os.makedirs(’C:/Python25/testing/a/dddf/’,mode=666)
This will create a directory called dddf under a and it will have permissions 666
NOT A STORY BUT A TRUE INCIDENT
An Indian man walks into a bank in
New York City and asks for the loan officer.
He tells the loan officer that he is going to India on business
for two weeks and needs to borrow $5,000.
The bank officer tells him that the bank
will need some form of security for the loan,
so the Indian man hands over the keys
and documents of new Ferrari parked
on the street in front of the bank.
He produces the title and everything checks out.
The loan officer agrees to accept
the car as collateral for the loan.
The bank’s president and its officers
all enjoy a good laugh at the Indian
for using a $250,000 Ferrari
as collateral against a $5,000 loan.
An employee of the bank then
drives the Ferrari into the bank’s
underground garage and parks it there.
Two weeks later, the Indian returns,
repays the $5,000 and the interest,
which comes to $15.41.
The loan officer says,
“Sir, we are very happy to have had your business,
and this transaction has worked out very nicely,
but we are a little puzzled.
While you were away,
we checked you out and found that you are a multi millionaire.
What puzzles us is, why would you bother to borrow “$5,000″ ?
The Indian replies:
“Where else in New York City can I park my car
for two weeks for only $15.41
and expect it to be there when I return’”
Ah, the mind of the Indian…
This is why India is shining
Here is the simple example of for loop in python Code: //This line is important,This is where you declare how many times the loop should be executed in range,To execute the loop ten times you declare range(1,10):
for x in range(1,10):
print x Output: In the above loop x is the variable… and then range can be replaced by array so you do want to specify the length of the array when you are going to use array values in the for loop 123456789
Today I found out a site where we can play a Virtual stock Market Game according to real market prices
http://moneybhai.moneycontrol.com
Just Sign up for that and start trading and also they will give prizes periodically according to their net worth…
It’s truly amazing , I am going keep myself engaged by this daily and also for any newbies who are wishing to earn by stockmarket this provides a good opportunity for them to learn about the basics of stockmarket….( I am not a newbie though)
Add this code at the end of your index.php in Proxy
This code was made my friend so I claim no rights to it…
$b1=preg_match(”/http:\/\/www\.\youtube\.com\/watch\?\v\=/i”,$_url,$c);
if($b1>0)
{
$_url1=preg_replace(”/&(.*)/i”,” “,$_url);
function get_youtube_flv ($url3)
{
$data = @file_get_contents(”http://www.youtube.com/watch?v=” . $url3);
@preg_match(”#fullscreenUrl = \’([^\’]+)\’#i”, $data, $matches);
parse_str($matches[1], $params);
return “http://www.youtube.com/get_video?video_id=” . $params[’video_id’] . “&t=” . $params[’t'];
}$video_url=$_url1;
$video_url1=preg_match(”/=(.*)/i”,$video_url,$video);
$video1=$video[1];
$ur1=preg_match(”/=(.*)/i”,$video1,$url2);
$url3=$video1;
//echo $url3;
//echo”<BR>”;
$id1=get_youtube_flv($url3);
$url1=base64_encode($id1);
//echo $url1;
//echo”<BR>”;
$url2=”http://67.228.3.79/index.php?q=”.$url1;
//echo $url2;
//echo”<BR>”;//For image
$image=”http://i.ytimg.com/vi/”.$url3.”/default.jpg”;
$image1=base64_encode($image);$content= “<embed type=’application/x-shockwave-flash’ src=’player.swf’ style=” id=’ply’ name=’ply’ bgcolor=’#FFFFFF’ quality=’high’ allowfullscreen=’true’ allowscriptaccess=’always’ flashvars=’height=395&width=480&file=http://www.proxy.com/index.php?q=$url1.flv&image=http://www.proxy.com/index.php?q=$image1&&backcolor=0×000000&frontcolor=0xCCCCCC&lightcolor=0×996600&searchbar=false&type=flv’ width=’480′ height=’395′>”;
$_response_body = preg_replace(’#<div id=”watch-noplayer-div”>(.*?)</div>#smi’,$content,$_response_body);
//$_response_body = preg_replace(’#<div id=”watch-this-vid”>(.*?)</div>#smi’, ‘<div id=”playerDiv”></div>’ . $content, $_response_body);
echo $_response_body;
}else
{
echo $_response_body;
}
Also you should replace http://www.proxy.com with your proxy site and you should download
JW FLV media player and should extract all the files to the folder where your index.php exists..