[Ilugc] Re:[IIugc] problem in installing Tiny OS in Ubuntu 14.04

2014-06-18 Thread sandeep81.srit

___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] python regex - question

2014-06-18 Thread Arun Khan
On Tue, Jun 17, 2014 at 9:57 PM, Mohan R mohan...@gmail.com wrote:
 Hello Regex Gurus,

 I need help handling this particular situation

 In a log file, I have a line like this,

 2014-06-17 13:55:14: IncomingData: TMSUpdateCallback:
 { SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
 13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
 Account=PTBHK01 }

 I have to make a dictionary out of this line using the key=value pair
 strings between {} parenthesis. I can take out the inner string using
 the following code,

 re.search('^.*{ (.*) }.*$', line).groups()[0]

 But, after this, I'm looking for a way to split the string using '
 '(space), but the values also contains ' '(space) in between. I have to
 replace the space in the values and split the string using ' '(space).
 Is there any way in regex to capture only the values which are inside 
 and contain space?

replace the the string of spaces with *one* space and - something like
this [ ]{1,+}
You can also try sed to search for strings and capture the context in
a variable.

-- Arun Khan
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] python regex - question

2014-06-18 Thread Girish Venkatachalam
Better one;

import re

feedstr = '2014-06-17 13:55:14: IncomingData: TMSUpdateCallback: {
SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
Account=PTBHK01 }';

start = feedstr.find('{');

s = feedstr[start+1:]

def spaceinquotes(match):
return match.replace(' ', '_')

for quotes in re.findall('[^]*', s):
s = s.replace(quotes, quotes.replace(' ', '_'))

d = []
for pairs in s.split( ):
if pairs.find('=') != -1:
k,v= pairs.split('=')
v=v.replace('_', ' ')
v=v.replace('', '')
d.append({k:v})

print d

On Wed, Jun 18, 2014 at 11:19 AM, Girish Venkatachalam
girishvenkatacha...@gmail.com wrote:
 import re

 feedstr = '2014-06-17 13:55:14: IncomingData: TMSUpdateCallback: {
 SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
 13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
 Account=PTBHK01 }';

 start = feedstr.find('{');

 s = feedstr[start+1:]

 def spaceinquotes(match):
 return match.replace(' ', '_')

 for quotes in re.findall('[^]*', s):
 s = s.replace(quotes, quotes.replace(' ', '_'))

 d = []
 for pairs in s.split( ):
 if pairs.find('=') != -1:
 k,v= pairs.split('=')
 d.append({k:v})

 print d


 On Tue, Jun 17, 2014 at 9:57 PM, Mohan R mohan...@gmail.com wrote:
 Hello Regex Gurus,

 I need help handling this particular situation

 In a log file, I have a line like this,

 2014-06-17 13:55:14: IncomingData: TMSUpdateCallback:
 { SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
 13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
 Account=PTBHK01 }

 I have to make a dictionary out of this line using the key=value pair
 strings between {} parenthesis. I can take out the inner string using
 the following code,

 re.search('^.*{ (.*) }.*$', line).groups()[0]

 But, after this, I'm looking for a way to split the string using '
 '(space), but the values also contains ' '(space) in between. I have to
 replace the space in the values and split the string using ' '(space).
 Is there any way in regex to capture only the values which are inside 
 and contain space?

 Thanks,
 Mohan R

 ___
 ILUGC Mailing List:
 http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
 ILUGC Mailing List Guidelines:
 http://ilugc.in/mailinglist-guidelines



 --
 Gayatri Hitech
 http://gayatri-hitech.com



-- 
Gayatri Hitech
http://gayatri-hitech.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] python regex - question

2014-06-18 Thread Girish Venkatachalam
import re

feedstr = '2014-06-17 13:55:14: IncomingData: TMSUpdateCallback: {
SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
Account=PTBHK01 }';

start = feedstr.find('{');

s = feedstr[start+1:]

def spaceinquotes(match):
return match.replace(' ', '_')

for quotes in re.findall('[^]*', s):
s = s.replace(quotes, quotes.replace(' ', '_'))

d = []
for pairs in s.split( ):
if pairs.find('=') != -1:
k,v= pairs.split('=')
d.append({k:v})

print d


On Tue, Jun 17, 2014 at 9:57 PM, Mohan R mohan...@gmail.com wrote:
 Hello Regex Gurus,

 I need help handling this particular situation

 In a log file, I have a line like this,

 2014-06-17 13:55:14: IncomingData: TMSUpdateCallback:
 { SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
 13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
 Account=PTBHK01 }

 I have to make a dictionary out of this line using the key=value pair
 strings between {} parenthesis. I can take out the inner string using
 the following code,

 re.search('^.*{ (.*) }.*$', line).groups()[0]

 But, after this, I'm looking for a way to split the string using '
 '(space), but the values also contains ' '(space) in between. I have to
 replace the space in the values and split the string using ' '(space).
 Is there any way in regex to capture only the values which are inside 
 and contain space?

 Thanks,
 Mohan R

 ___
 ILUGC Mailing List:
 http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
 ILUGC Mailing List Guidelines:
 http://ilugc.in/mailinglist-guidelines



-- 
Gayatri Hitech
http://gayatri-hitech.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


[Ilugc] Fwd: Ruby on Rails For All Of Us - Tech Talk

2014-06-18 Thread Shrinivasan T
-- Forwarded message --
From: Shrinivasan T tshriniva...@gmail.com
Date: 2014-06-18 13:40 GMT+05:30
Subject: Ruby on Rails For All Of Us - Tech Talk
To: chenna...@googlegroups.com


Ruby on Rails For All Of Us
Ideal for Students and professionals proficient in PHP
21st June 2014
9 AM - 1 PM

Techartus is conducting a seminar (in Chennai, India) this Saturday (21
June 2014) 9AM to 1PM on Ruby on Rails, especially targeting PHP
developers. The following are the topics that will be covered:

1. Moving from PHP to Ruby
2. Model View and Controller
3. Whats Ruby why its becoming popular?
4. Ruby on Rails (aka Rails) philosophy, why it caught as wild fire?
5. Why there aren't any big CMS in Rails?
6. How is Rails evolving with time?
7. Current trends in Rails
8. If the future is Javascript, how Rails will fit in?

To subscribe please checkout http://eepurl.com/UNmUr

Entry free. open to all.

Venue :
Techartus Solutions
#20, 53rd Street, 9th Sector, K K Nagar
K K Nagar
Chennai 600078
India


-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get CollabNet Subversion Edge : http://www.collab.net/svnedge



-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get CollabNet Subversion Edge : http://www.collab.net/svnedge
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] python regex - question

2014-06-18 Thread Udaya Kumar
On Tue, Jun 17, 2014 at 9:57 PM, Mohan R mohan...@gmail.com wrote:

 Hello Regex Gurus,

 I need help handling this particular situation

 In a log file, I have a line like this,

 2014-06-17 13:55:14: IncomingData: TMSUpdateCallback:
 { SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
 13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
 Account=PTBHK01 }


How are you? If this is related to office work, then you owe me! :)
Check whether this fits your req.

result = re.findall(\w+=.+?(?=\s+\w+=|\s+}),feedstr,re.M|re.I|re.X)

Uday.
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] python regex - question

2014-06-18 Thread AJIT KUMAR
Hi Uday,

Nice solution. Hat off !!!

function code using your re.

import re

data='SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0
TradeTime=2014-06-17 13:54:19 DestID= ExchangeTransCode=65725497
89897456 523 1Account=PTBHK01'

def parse_input(data):
my_dict={}
#convert into a list of key=value
result = re.findall(\w+=.+?(?=\s+\w+=|\s+}),data,re.M|re.I|re.X)
#convert into dictonary

for item in result:
tmp=item.split('=')
my_dict[tmp[0]]=tmp[1]
return my_dict
#print(parse_input(data))




On Wed, Jun 18, 2014 at 2:48 PM, Udaya Kumar tuxu...@gmail.com wrote:
 On Tue, Jun 17, 2014 at 9:57 PM, Mohan R mohan...@gmail.com wrote:

 Hello Regex Gurus,

 I need help handling this particular situation

 In a log file, I have a line like this,

 2014-06-17 13:55:14: IncomingData: TMSUpdateCallback:
 { SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17
 13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1
 Account=PTBHK01 }


 How are you? If this is related to office work, then you owe me! :)
 Check whether this fits your req.

 result = re.findall(\w+=.+?(?=\s+\w+=|\s+}),feedstr,re.M|re.I|re.X)

 Uday.
 ___
 ILUGC Mailing List:
 http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
 ILUGC Mailing List Guidelines:
 http://ilugc.in/mailinglist-guidelines
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] [IIugc] problem in installing Tiny OS in Ubuntu 14.04

2014-06-18 Thread Ajeya Anand
hey I had followed the easiest two step installation given in tinyos wiki.
Have you tried it?


2014-06-18 8:53 GMT+05:30 sandeep81.s...@gmail.com:


 ___
 ILUGC Mailing List:
 http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
 ILUGC Mailing List Guidelines:
 http://ilugc.in/mailinglist-guidelines




-- 
Thanks and Regards, | നന്ദി,

Ajeya Anand | അജേയ ആനന്ദ്

[image: http://ajeya.wordpress.com/] http://ajeya.wordpress.com/
[image: http://ajeya.wordpress.com/] http://ajeya.wordpress.com/

[image: http://twitter.com/ajeyaajeya] http://twitter.com/ajeyaajeya
[image: http://www.linkedin.com/in/ajeyaanand]
http://www.linkedin.com/in/ajeyaanand
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

[Ilugc] Python for you and me - book

2014-06-18 Thread Shrinivasan T
Found the book interesting.

http://pymbook.readthedocs.org/en/latest/index.html






-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get CollabNet Subversion Edge : http://www.collab.net/svnedge
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


[Ilugc] Commercial - Mysql L1 Admin Help

2014-06-18 Thread Ganesh Hariharan
I have a project to do with Maria DB or Mysql DB

If anyone has time and knowledge to work up-to a week , please send me an
email:ghariha...@gmail.com with your expertise

Thanks
G
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] [Commercial] Book: i want 2 do project. tell me wat 2 do

2014-06-18 Thread Shrinivasan T
Received the book today.

Thanks for the great work shakthi.

The book should reach all the college students.


-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get CollabNet Subversion Edge : http://www.collab.net/svnedge
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] Project idea - word puzzle solver

2014-06-18 Thread Shrinivasan T
Mani maran did the code for this in last week kanchilug meeting.

https://github.com/manimaran990/wordpuzzle

Thanks mani.

-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get CollabNet Subversion Edge : http://www.collab.net/svnedge
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] [Commercial] Book: i want 2 do project. tell me wat 2 do

2014-06-18 Thread రహ్మానుద్దీన్ షేక్
Received the book in the morning. Looking forward to read it.
Thank you mbuf for such a book.
On Jun 18, 2014 7:50 PM, Shrinivasan T tshriniva...@gmail.com wrote:

 Received the book today.

 Thanks for the great work shakthi.

 The book should reach all the college students.


 --
 Regards,
 T.Shrinivasan


 My Life with GNU/Linux : http://goinggnu.wordpress.com
 Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

 Get CollabNet Subversion Edge : http://www.collab.net/svnedge
 ___
 ILUGC Mailing List:
 http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
 ILUGC Mailing List Guidelines:
 http://ilugc.in/mailinglist-guidelines

___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] python regex - question

2014-06-18 Thread Mohan R
On Wed, 2014-06-18 at 14:48 +0530, Udaya Kumar wrote:
 How are you? If this is related to office work, then you owe me! :)
 Check whether this fits your req.

Yeah :) I owe you a drink party!!

 result = re.findall(\w+=.+?(?=\s+\w+=|\s+}),feedstr,re.M|re.I|re.X)

wow!! I never thought there is a direct regex solution. thank you very
much. Also, I fixed it today using space-to-underscore-inside-quotes
approach. here is the code,

[code]

#!/usr/bin/env python   



import re

line = '{ SourceID=JP000456712 Ric=0388.HK BuyQty=3800.0 TradeTime=2014-06-17 
13:54:19 DestID= ExchangeTransCode=65725497 89897456 523 1 
Account=PTBHK01 }'
line = re.match(^.*{ (.*) }.*$', line).groups()[0]
print dict([word.split('=') for word in re.sub('((?:[^ ]+ *)+)', lambda x: 
x.groups()[0].replace(' ', '_'), data).split(' ')])

[/code]

This is not a straight forward regex solution, not sure this can be
achieved in other languages. Anyway thanks for all those replied and
took time to provide a solution.

Thanks,
Mohan R

___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] Failover help

2014-06-18 Thread Deepti Varshney
On Wed, Jun 18, 2014 at 8:27 AM, arunkumar s arunkumars.3...@gmail.com
wrote:

 Thanks for ur reply
 It is webbased app using apache
 On 16 Jun 2014 19:19, Mohan Sundaram mohan@gmail.com wrote:

  On Mon, Jun 16, 2014 at 6:26 PM, arunkumar s arun_le...@yahoo.co.in
  wrote:
   I am running one application on two servers,between servers i am doing
   replication of data now i need to configure one server as active and
 the
   other one as passive using ip address as failover
  
   I have only one option of configuring failover using ip and not have
  option
   to do with DNS and other ways kindly help
 
  Assuming these are linux servers, you can do VRRP for ip failover in a
  master slave (active-standby) configuration. However, I suspect this
  alone may not be enough. What is your application? Web based? Suspect
  it is as you are talking of DNS. Can you drop sessions?
 
  For web based applications, it would be better to use a load balancer
  (like nginX) which will maintain sessions and will talk to servers
  behind it configured in a active-standby configuration.


Also worth deploying would be http://www.linuxvirtualserver.org/ since
nginx only provides Layer-7 level fault tolerance / load balancing. This
way, you can have a more cleaner DNS setup (ie., one Virtual IP address for
your service being load balanced using LVS while there are multiple
physical machines). LVS would work for non-http applications too.

Also, if you're aiming to achieve awesome fault tolerance, you may want to
consider some sort of a GSLB (Global Server Load Balancing) so that if your
hosted site (colo or data center) becomes unavailable, another hosted
site could take over.

Regards,

  -Suraj
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


[Ilugc] requesting for the topic on ROR

2014-06-18 Thread Ashwanth G
5. Ruby on Rails For All Of Us - Tech Talk (Shrinivasan T)

*Regards,*
*Ashwanth *
*M Sc Computer Science(integrated)*
*College of Engineering Guindy*
*Anna University ,Chennai*
http://about.me/ashwanth_gurumani
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines


Re: [Ilugc] requesting for the topic on ROR

2014-06-18 Thread Madan U Sreenivasan
Dear Ashwanth,

On Thu, Jun 19, 2014 at 10:30 AM, Ashwanth G ashwant...@gmail.com wrote:

 5. Ruby on Rails For All Of Us - Tech Talk (Shrinivasan T)


What is your question?

Regards,
Madan
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines