rabid logic http://rabidlogic.posterous.com Most recent posts at rabid logic posterous.com Wed, 22 Aug 2012 23:56:00 -0700 To Remove Extra Spaces From A String in Python http://rabidlogic.posterous.com/to-remove-extra-spaces-from-a-string-in-pytho http://rabidlogic.posterous.com/to-remove-extra-spaces-from-a-string-in-pytho

>>> a='To be    or      not to   be'
>>> ' '.join(a.split())
'To be or not to be'

 

Use ' '.join(a.split())

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Wed, 22 Aug 2012 23:47:00 -0700 Print an amount in words using Python - Indian Format http://rabidlogic.posterous.com/print-an-amount-in-words-indian-format http://rabidlogic.posterous.com/print-an-amount-in-words-indian-format

A little script i've written to convert an amount of upto 14 digits before the decimal into words.I have a 14 digit limit which conforms with the accounting package tally which is predominantly used here.Million, billions trillions etc aren't used to decribe large sums of money but lakhs and crores are used instead..

XX,XX,XXX

The indian format does not seperate the number in 3's as done in the US here its 2-2-3

So for 14 digits the separation is as follows

XX,XX,XXX,XX,XX,XXX

 

instructions: paste the code and call the the in_words() function passing it a float formatted to 2 digits after the decimal.

 

#Constants
ONES={0:'',1:'One',2:'Two',3:'Three',4:'Four',
      5:'Five',6:'Six',7:'Seven',8:'Eight',
      9:'Nine',10:'Ten',11:'Eleven',12:'Twelve',
      13:'Thirteen',14:'Fourteen',15:'Fifteen',
      16:'Sixteen',17:'Seventeen',18:'Eighteen',19:'Nineteen'}

TENS={2:'Twenty',3:'Thirty',4:'Forty',5:'Fifty',6:'Sixty',7:'Seventy',8:'Eighty',9:'Ninety'}

#Functions
def parse_amt2words(ns):
    ns1=ns[-3:]
    ns2=ns[-5:-3]
    ns3=ns[-7:-5]
    if len(ns1)>0 and int(ns1)>0:
        if len(ns1[-2:-1])>0 and int(ns1[-2:-1])>1:
            a= '%s %s'%(TENS[int(ns1[-2:-1])],ONES[int(ns1[-1:])])
        else:
            a= '%s'%(ONES[int(ns1[-2:])],)
           
           
        if len(ns1[-3:-2])>0 and int(ns1[-3:-2])>0:
            a= '%s Hundred %s'%(ONES[int(ns1[-3:-2])],a)
       
    if len(ns2)>0 and int(ns2)>0:
        if len(ns2[-2:-1])>0 and int(ns2[-2:-1])>1:
            a= '%s %s Thousand %s'%(TENS[int(ns2[-2:-1])],ONES[int(ns2[-1:])],a)
        else:
            a= '%s Thousand %s'%(ONES[int(ns2[-2:])],a)
   
    if len(ns3)>0 and int(ns3)>0:
        if len(ns3[-2:-1])>0 and int(ns3[-2:-1])>1:
            a= '%s %s Lakh %s'%(TENS[int(ns3[-2:-1])],ONES[int(ns3[-1:])],a)
        else:
            a= '%s Lakh %s'%(ONES[int(ns3[-2:])],a)
    return ' '.join(a.split())

 

#split into 7 chunks.. since its to be used with tally which supports 14 digits -done manually

def amt2words(n): 
    ns=str(n)
    if len(ns)>14:
        return 'Number too large'
    if len(ns)<=7:
        return '%s'%(parse_amt2words(ns[-7:]),)
    else:
        return '%s Crore %s'%(parse_amt2words(ns[-14:-7]),parse_amt2words(ns[-7:]))

 

#take the number seperate at decimal point for decimal use 2 digits only
def in_words(x):
        #return mdc_report_func.amt2words(int(x))
        if isinstance(x,float):
            rs=int(x)
            ps=int(str(x)[-2:])
        elif isinstance(x,int):
            rs=int(x)
            ps=0
        else:
            return x
        if rs>0:
            rs1=amt2words(rs)
        else:
            rs1=''
        if ps>0:
            ps1=' And %s Paise'%(amt2words(ps),)
        else:
            ps1='' 
        y = '%s%s Only'%(rs1,ps1)
        return y

print in_words(50430112.55)

 

May not the best or even the best piece of code to do this task but it took me about 20 minutes to do and it works so.. use it at your own risk if you need help to understand it drop me a line..

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Wed, 14 Sep 2011 04:30:27 -0700 SQL Differences in PostgreSQL http://rabidlogic.posterous.com/sql-differences-in-postgresql http://rabidlogic.posterous.com/sql-differences-in-postgresql
  1. NO TOP, so SELECT TOP 10 * FROM table, becomes SELECT * FROM table LIMIT 10 you can also use the maxrows attribute of CFQUERY to do this, if you want cross db code (which is good). MySQL also uses the LIMIT sytax, but Oracle uses yet another syntax
  2. LIKE statements are case sensitive in postgresql, they can be made case insensitive like this: SELECT * FROM table WHERE LOWER(column) LIKE '%#LCase(var)#%' (Or you can use the ILIKE operator)
  3. The plus operator cannot be used for concatination so SELECT firstname + ' ' + lastname AS fullname becomes SELECT firstname || ' ' || lastname AS fullname this way works on both servers.

sourced from:
http://www.petefreitag.com/item/5.cfm

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Mon, 05 Sep 2011 04:50:22 -0700 Removing list elements by looping http://rabidlogic.posterous.com/removing-list-elements-by-looping http://rabidlogic.posterous.com/removing-list-elements-by-looping
While looping through a list - list index nos. 0- n are used to iterate through the list items

parent = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
child = ['a', 'b', 'c', 'd']

child index nos.
a = 0
b = 1
c=  2
d = 3

If there is a need to remove items from one list based on those present in another (parent) - logically it would require iterating through the child list and removing those items that exist in the parent list

so the foll code should do the trick..

parent = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
child = ['a', 'b', 'c', 'd']

for c in child:
 if c in parent:
  child.remove(c)

however if you print child it will output [b,d]

The reason is that python resets the index nos. of the list after the removal of an item. 
So in effect after 'a' (index 0) is removed from the child list - 'b' is set as index 0. The next loop by will pass index 1 which is now 'c'. As a consequence 'b' never enters the loop and therefore not checked if it exists in the parent list and hence not removed.

Solution:
Instead of using the actual list in the for loop, iterate through a copy of the list using [:] and carry out the removal from the original list.

parent = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
child = ['a', 'b', 'c', 'd']

for c in child[:]:
 if c in parent:
  child.remove(c)

now when you print child the output is as expected an empty list []

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Mon, 08 Aug 2011 05:02:34 -0700 PyImportScript http://rabidlogic.posterous.com/pyimportscript http://rabidlogic.posterous.com/pyimportscript -:WIP:-

Part A
1
Get List of Machines from mdc_mach table on postgresql
select name from
mdc_machines where type = 1 

Store each machine type in a sep List inside a Dictionary
{
'Ex':[MDC Excavator 1, .....],
'WL':[],
'Trucks':[]....
}

2
Check returned list in Access Db for new Machines
select mach.name, owner from
mdc_machines as mm where mach.name not in (RETURNED LIST)

This has to be done for each mach_type as the tables in access are separate for each.

The new Machines should be appended into a List
[['0981','GA-09-0981','Owner'],['WL223','', 'Owner'],...]

And a second List with only Owner Names

Check if all owners are present: [What about change in owners?]

Query Postgresql to see if all the names are present

select name from
res_partner where lower(name) in (lower('AsUstek'))

Count of the rows should be equal to that of the owner list

If less then then some owners are not present in openerp
Compare list to query result and find the missing owner add to owner_exlist

For each Owner in the exlist get - Name, Address, Phone details and create a Partner in Openerp

Now that all Owners are in the system Start Import of machines


Insert New Machines into mdc_machines directly and assoc with the site in mdc_site_machines


4
Check all Machines in access are assoc with the same site in Postgres
select mach.name from
mdc_site_machines as msm
inner join
mdc_machines as mach
on msm.mach_id = mach.id
where msm.site_id = 1

5
Check returned list in Access Db - The Result should be 0
In the previous steps all machines in the access db were updated in Postgres. If a machine is returned here then that mach exists in the Openerp but is assoc with another site.
This has to be rectified manually as the reason for this move needs to be obtained

select mach.name, owner from
mdc_machines as mm where mach.name not in (RETURNED LIST)


IF STEP 5 returns 0 then Proceed or Terminate Here


Part B
B-1
Check if the Dist Codes are in the System

B-2 ====>not a good idea - add manually -awareness
Import New Dist Codes


B-3
Check if the Ore Types are in the system


B-4 ====>not a good idea - add manually -awareness
Import New Ore Types


site pits?
operator?
supervisor?


Part
-1
Check for New MDLs

1
Get List of MDL + Date + Machine Names in Postgresql db

select mdl.date, mach.name from mdc_mdl as mdl inner join mdc_machines
as mach on mdl.mach_id = mach.id where mdl.site_id = 1


2
Compare the Returned list with the access db

*select mdl.date, mach.name from mdc_mdl as mdl inner join mdc_machines
as mach on mdl.mach_id = mach.id where mdl.site_id = 1 and date not in (RETURNED LIST - DATE VAUES)


3
Store List of MDL Date- Machines that need to be imported from Access

4
For each (One Transaction if Possible):
Get the MDL and Trips for the New MDL
Ex/WL
PV
Wtanker

Insert the New MDL+Trips directly into MDL/Trips/Log Hours on Postgresql

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Thu, 04 Aug 2011 05:09:00 -0700 Connecting & Querying from MS Access (accdb) in python http://rabidlogic.posterous.com/connecting-querying-from-ms-access-accdb-in-p http://rabidlogic.posterous.com/connecting-querying-from-ms-access-accdb-in-p

Ive got an MS Access accdb file that from which I need to extract data programatically and insert it into Postgresql
This post deals with connecting to and querying data from MS Access 2007 on Windows 7 using Python 2.7

The simplest approach is to use pyodbc - a python package which is based on the Open Database Connectivity (ODBC) API

First get pyodbc: http://code.google.com/p/pyodbc/

Its available as an exe so simply double click to install on windows. For linux the source is available and is installed via distutils by running...

sudo python setup.py install

...from within the pyodbc directory


A connection is made to the access database by

connection = pyodbc.connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=path_to_file;")

A query is executed via a cursor object

eg:

Start python within cmd or terminal and enter the following:


>>> import pyodbc
>>> conn = pyodbc.connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ
=C:\\access\\site_be.accdb;")
>>> cursor = conn.cursor()
>>> sql = "select * from dist_code;"
>>> for row in cursor.execute(sql):
...  print row.dist_code
...
250
500
750
1000
1250
1500
1750
2000
2250
2500
2750
3000
WT140
WT180
>>> cursor.close()
>>> conn.close()
>>>

Note: For this eg to work "literally" you would need to create an access db site_be.accdb and place it in C:\access\
The database should contain atleast one table - dist_code and this table would need to contain one column dist_code

Notice the escaped backslashes in the connection assignment - "C:\\access\\site_be.accdb"
If \ is used instead of \\ you would get an error:

Traceback (most recent call last):
File "", line 1, in conn = pyodbc.connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=;")

Error: ('HY000', "[HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x167c Thread 0x1568 DBC 0x1c67a5c

Jet'. (63) (SQLDriverConnectW); [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x167c Thread 0x1568 DBC 0x1c67a5c

Jet'. (63); [HY000] [Microsoft][ODBC Microsoft Access Driver] Not a valid file name. (-1044); [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x167c Thread 0x1568 DBC 0x1c67a5c

Jet'. (63); [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x167c Thread 0x1568 DBC 0x1c67a5c

Jet'. (63); [HY000] [Microsoft][ODBC Microsoft Access Driver] Not a valid file name. (-1044)")

 
Compiled from:
http://en.wikibooks.org/wiki/Python_Programming/Database_Programming
http://code.google.com/p/pyodbc/wiki/GettingStarted

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Wed, 03 Aug 2011 05:39:06 -0700 View Listening Ports on Linux http://rabidlogic.posterous.com/view-listening-ports-on-linux http://rabidlogic.posterous.com/view-listening-ports-on-linux

Find Out What Ports Are Listening / Open On My Linux & FreeBSD Server

How do I find open ports on Linux / FreeBSD server?

There are different commands on both Linux and UNIX server to find out what tcp/udp ports are listening or open on your own server. You can use netstat command, which print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships etc. Another (and suggested) option is to use lsof command, which list open files, and ports on Linux, FreeBSD, Solaris and other Unixish systems.

netstat command to find open ports

# netstat --listen
To display open ports and established TCP connections, enter:
$ netstat -vatn
To display only open UDP ports try the following command:
$ netstat -vaun
If you want to see FQDN (full dns hostname), try removing the -n flag:
$ netstat -vat

lsof Command Examples

To display the list of open ports, enter:
# lsof -i
To display all open files, use:
# lsof
To display all open IPv4 network files in use by the process whose PID is 9255, use:
# lsof -i 4 -a -p 9255

A Note About FreeBSD Users

You can use the sockstat command lists open Internet or UNIX domain sockets, enter:
$ sockstat
$ sockstat -l
$ sockstat -4 -l
$ sockstat -6 -l


From: http://www.cyberciti.biz/faq/how-do-i-find-out-what-ports-are-listeningopen-on-my-linuxfreebsd-server/

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Wed, 03 Aug 2011 05:02:19 -0700 Kill Linux Processes http://rabidlogic.posterous.com/kill-linux-processes http://rabidlogic.posterous.com/kill-linux-processes From: http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/

Kill process in Linux or terminate a process in UNIX or Linux systems

Q. How do I kill process in Linux?

A. Linux and all other UNIX like oses comes with kill command. The command kill sends the specified signal (such as kill process) to the specified process or process group. If no signal is specified, the TERM signal is sent.

Kill process using kill command under Linux/UNIX

kill command works under both Linux and UNIX/BSD like operating systems.

Step #1: First, you need to find out process PID (process id)

Use ps command or pidof command to find out process ID (PID). Syntax:
ps aux | grep processname
pidof processname

For example if process name is lighttpd, you can use any one of the following command to obtain process ID:
# ps aux | grep lighttpdOutput:

lighttpd 3486 0.0 0.1 4248 1432 ? S Jul31 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conflighttpd 3492 0.0 0.5 13752 3936 ? Ss Jul31 0:00 /usr/bin/php5-cg

OR use pidof command which is use to find the process ID of a running program:
# pidof lighttpdOutput:

3486

Step #2: kill process using PID (process id)

Above command tell you PID (3486) of lighttpd process. Now kill process using this PID:
# kill 3486
OR
# kill -9 3486
Where,

  • -9 is special Kill signal, which will kill the process.

killall command examples

DO NOT USE killall command on UNIX system (Linux only command). You can also use killall command. The killall command kill processes by name (no need to find PID):
# killall -9 lighttpd
Kill Firefox process:
# killall -9 firefox-bin
As I said earlier killall on UNIX system does something else. It kills all process and not just specific process. Do not use killall on UNIX system (use kill -9).

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Fri, 29 Jul 2011 13:37:00 -0700 Shared Folders in Virtual Box http://rabidlogic.posterous.com/shared-folders-in-virtual-box http://rabidlogic.posterous.com/shared-folders-in-virtual-box

After installing the Guest Additions I managed to get the screen resizing/ full screen functionality to work. However I wasn't able to share the clipboard between the Host and the Guest OS.
My next best option was using the 'Shared Folder' functionality which wasn't very intuitive

Some points of note:
Firstly, the shared folders are made available under /media/ directory in the guest OS
Secondly, you do not need to allow sharing of a folder on the Host OS inorder to access it from the guest
Thirdly, in order to access the shares your guest OS user needs to be a member of the group 'vboxsf'
My Host OS is Ubuntu 11.04 and the Guest is Ubuntu 10.04.3 LTS

Steps,
1) Start up and log in to the guest OS
2) Add yourself to the group vboxsf (System>Users& Groups)
3) Right Click the blue foder icon and click 'Shared Folders' or Devices>Shared Folders
4) Add a folder to share. Check make permanent (transient ie only available for this session didn't feel like working for me). Also check Automount.
5) Log out and back in to let the group permissions set
6) Browse over to /media/.. The folders that were shared should be available here

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Thu, 28 Jul 2011 23:16:00 -0700 Getting around the VBoxGuestAdditions_4.0.4.iso' (VERR_NOT_SUPPORTED) Error http://rabidlogic.posterous.com/getting-around-the-vboxguestadditions404iso-v http://rabidlogic.posterous.com/getting-around-the-vboxguestadditions404iso-v

I was trying out VirtualBox on ubuntu 11.04 and I wanted to install the "Guest Additions" package in order to increase the screen size of the guest which was ubuntu 10.04.
So i got the guest os running and then clicked on Devices>Install Guest Additions (Note: the Devices Menu is on the common menu bar on the top in 11.04 and not on the window for Vbox)
A prompt asked me to download the VBoxGuestAdditions_4.0.4.iso and then another prompt asked to mount it..
Here i got an error

"Failed to open the CD/DVD image (then indicated the file path for the ISO)

Could not get Storage format of the medium (again indicated the file path of the ISO)

VERR_NOT_SUPPORTED"

I retried the process about 3 times but in vain..

Basically the iso file was not downloaded completely.. its about 36 mb and only 10 mb was downloaded before the prompt to mount came up.

The solution to this is pretty simple.
Click on install guest additions again.. In the prompt copy the url that its says its goin to get the iso file from.
Download the file in the Host ie ur desktop
Shut down the guest os
Configure the guest os to use the downloaded iso file as the secondary drive.. (under Settings for the Guest in Vbox)
Start the Guest os
Now the iso file will be available under places.. Autorun..
Restart the guest and autoresize screen will now be available..


Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Wed, 27 Jul 2011 04:18:00 -0700 jasper connect for OpenERP http://rabidlogic.posterous.com/jasper-connect http://rabidlogic.posterous.com/jasper-connect

plan:
- create jasper_connect module
- the module will hold -server address, url, and list of users.
- these users can be mapped to different groups in openerp to control access to reports in jasper server repo
- the actual report is created in iReport by directly connecting to the db.
- Each report will need a wizard to be created in openerp.
- the wizard can be in 2 stages and will appear to the right of the page related to the object
- the first stage takes parameters
- on submit the second page redirects to jasperserver with the report unit name, jasper username and pw
- each wizard basically creates the form to capture the parameters and the creates a url for the redirection
eg of url with username and pw

http://localhost:8080/jasperserver/flow.html?_flowId= viewReportFlow&reportUnit=/reports/samples/AllAccounts& j_username=jasperadmin&j_password=jasperadmin

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Mon, 23 Jul 2007 06:25:00 -0700 view from the middle... http://rabidlogic.posterous.com/2007/07/i-came-accross-this-picture-of.html http://rabidlogic.posterous.com/2007/07/i-came-accross-this-picture-of.html

Media_http4bpblogspot_jilwy
I came across this picture of Sindhudurg fort while going through some old pictures in the archives of my computer folders. I can't believe i had witnessed something so beautiful...
I had posted this earlier as part of my Malvani Odyssey but couldn't resist putting it up again...

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Thu, 28 Jun 2007 09:24:00 -0700 Ode to my hot cuppa chai http://rabidlogic.posterous.com/2007/06/ode-to-my-hot-cuppa-chai.html http://rabidlogic.posterous.com/2007/06/ode-to-my-hot-cuppa-chai.html

A long overdue tribute to many a cups of delicious chai!
(sung to the tune of Last Kiss by Pearl Jam)



oh chai, oh chai
wont u set me free
from my recurring dosing spree
Ive got to work its half past three
I need ur anti snooze remedy.

oh chai, oh chai
wont u refresh me,
im feeling so tired and so drowsy
i can hear sleep callin out my name
im gonna drift off, don't u put me to shame.

oh where, oh where
could the chai wala be
doesnt he know its time for my afternoon tea
im losing control, im about to snore
i need u now more than ever before

-chai-a-holic anonymous

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Sun, 24 Jun 2007 21:28:00 -0700 In pursuit of chocolate http://rabidlogic.posterous.com/2007/06/in-pursuit-of-chocolate.html http://rabidlogic.posterous.com/2007/06/in-pursuit-of-chocolate.html Its 3:00pm, sunday afternoon, it has stopped raining and the power supply shows some sign of stability. Iam studying for a certification I intend to get, when suddenly i get this craving for chocolate... Impulsive as Iam i want to get out and get some. But then i think... i've got a dump of more than 400 questions running into some 800 pages or so to go through, i cant just stop to get some chocolate... be rational... i've got to be serious about this, continue with the questions and may be later...

On my way out as i walk towards my bike i think to myself....
its sunday + 3pm + goa= there's no way in hell shops are goin to be open

i was right my regular supplier was closed... I on ride still hopeful that the shopping center would be open

Im at Panjim... supposedly a city in Goa... the capital too... yet after 2pm everyday all shopkeepers will shut shop and hit the sack for a snooze... a city called panjim

As i swerve onto the main road i get hit by a few drops of rain... i think to myself "should i turn back... nah just a few dro...." Swooosh it feels as though someone has emptied a bucket of water on me... literally...

in one sychronised motion all the bikes on the road including me ride onto the pavement and stop under the parapet of the adjacent building... ALL of us.. as though its an unwritten rule ...bikes allowed on pavements only if it rains... off the bike and i wait for the rain to stop

i feel my tummy ...hmm... it has gone in... maybe if i don't eat the chocolate my on going efforts will bear fruit and it will go in further... but then, when i visit my aunt she'll look at me and say "U've lost so much weight... here... EAT!!".... it would be like removing a drop and adding a gallon...

either ways an ocean will still remain relatively the same ... the rain stops and i continue

I've been pretty depressed for the past two days... I wanted to go to my cousins place, but then decided not to.. i did not get much study done yesterday .... i need to complete these questions... now i've got to deal with the guilt of wasting yesterday and the depression while I continue studying... way to go...

The certification is important.. people are counting on me for the benefit the certification brings.. what is it about me that makes people think they can count on me?
is it my not so broad shoulders..
my huge belly..
or the blank expression on my face when someone asks "could u do me a favour?"

..i will never know

i reach the center... its open... maybe it is a city after all

i find the chocolate counter to be unmanned ... i go behind the counter to get a better look at whats there and whats not....i hear a voice coming at me ...."could u tell me where i could find a shirt of my size" he says plucking at his shirt....
Im wearing a crumpled T-shirt..semi soaked jeans..with wet, messed up hair and my trademark ... a stubble u can spot from a mile

.....what makes u think i will be able to find u ur shirt? do i look like i work here... look around the guys who work here look a whole lot decent..

think...person...think... some people i tell u cannot be rational at all...

i said i had no idea, he aplogises and walks on to the next unsuspecting customer..

Damn "the one and only chocolate that i would want and eat" is not available.....

thats me being picky

i walk out to my bike.. ride around the city ... nothing is open ... or "the one and only chocolate that i would want and eat" is not available... but i could buy some fancy pajamas or have a dosa....

after a while i give up and settle for baskin robbin's chocolate mouse royale.... only the most yummiest and creamiest chocolate ice cream in the whole wide world.... but it will have to do ...tsk tsk

moral of the story... im not sure ... not figured that one out yet.....its back to page 159 question 76.....

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Thu, 12 Apr 2007 11:37:00 -0700 Life ain't that bad...... at times http://rabidlogic.posterous.com/2007/04/life-aint-that-bad-at-times.html http://rabidlogic.posterous.com/2007/04/life-aint-that-bad-at-times.html
The bright side to having a mango tree grow INTO your house!


Media_http2bpblogspot_oxvfc

Its Mango Season!


Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Wed, 20 Dec 2006 07:33:00 -0800 Merry Christmas http://rabidlogic.posterous.com/2006/12/merry-christmas.html http://rabidlogic.posterous.com/2006/12/merry-christmas.html

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Wed, 08 Nov 2006 21:18:00 -0800 Malvani Odyssey http://rabidlogic.posterous.com/2006/11/malvani-odyssey.html http://rabidlogic.posterous.com/2006/11/malvani-odyssey.html Here is the plan- get up at 5:00 am, leave by 5:30 am, reach Querim for breakfast, continue to Shiroda and from there on upto Malvan for some mouthwatering malvani food...umm... fish. Check out Sindudurgh fort and head back by 3:00 pm. You see I am a very organised man and absolutely agree with what my aunt says, "everything should happen, time to time."

Here is what happened, I wake up at 10:40am by the sound of a friend's phone call, still decide to carry on with the trip (what else did i really have to do).

I take the really smooth road to Saligaon from Porvorim, head on to the road parallel to that leading to Baga. The roads get narrow but they are not all that bumpy.

Stop. Breakfast. 2 glasses of sugarcane juice.

Continue to Siolim,the motorcycle ahead of me suddenly stops. What? there is a snake darting accross the road. I swerve right to avoid crashing into the motorcycle and then further right to avoid the snake now back to the left to avoid the motorist coming towards me..... phew...... that was fun.

But why did the snake cross the road?
Maybe it went after the chicken.

Accross the bridge and through the hills to Arambol.

The road swerves left around the hills making way for a beautiful view of the river below.

Avoid the first ferry crossing and continue riding, Querim.

Querim Beach. Beautiful, deserted and clean. But there were people bringing in Coconut leaves (to be used as roofs), and there is a bamboo framework in the shape of the houses I used to draw for art class in school.........Shacks!! There goes the deserted and clean. But its still beautiful though.

Just ahead the road ends at the ferry. Onboard the ferry I saw this huge, multicoloured turtle swimming into the river from the sea. At first I could'nt tell, the outlines of the sections of the shell was a mix of red and green. And its motion was masked by that of the boat but as we passed it, it became more clear. Huge Turtle. HUGE.

Off the ferry, and the road ahead leads to Tiracol Fort, now Tiracol Fort Heritage Hotel. It houses a church within and from the top you get an amazing view of Querim Beach, I could also see the ferry heading back.

A few pictures and onward to Shiroda. The road gets pathetic, with pot holes big enough to be lost in for a week and trucks thuding along, creating a mini dust storm before my eyes. Its like an extension of No Mans Land, No Mans Developmental Hassle, I thought to myself. Goa must have said, "the land belongs to Maharashtra". Maharashtra said,"the land maybe ours but the road belongs to Goa". Just then I see a number of trucks, all bearing Karnataka registered number plates. Karnataka must have said,"I don't understand what you say and you don't understand what I say. Just the way I like it."

Media_httpphotos1blog_bsyoc
But that stretch does end and soon I am turning left to join MSH 4 or Maharashtra State Highway 4. An amazing road through the ghats alongside the coastline, which is visible as you climb higher. The ghats are green with little traffic, mainly the locals on scooters, some cars, very few tempos and the occasional ST Bus. Be very careful of the buses and tempos though, the roads are narrow and for some reason they always pop up at the end of a blind turn.

Its 2:30pm no time to stop for pictures, besides, the camera I borrowed allows me to take just one picture before it says that the battery has died. So Iam back to my phone's camera.

The milestones along the highway are not meant to be taken seriously. I see a milestone saying 25 kms to Malvan. After 2 kms another says the same. Further down It says 20 Kms to Malvan after which I am back to 25 and then 22.

After a series of ups and downs I land up climbing again and then its flat with a totally different terrain. They are flat lands ... well more or less with dried grass which appear golden and you can see kilometers of it on either sides. Then its back up and down. This happens again for quite a stretch just before I turn left and head into the town of MALVAN.

Media_httpphotos1blog_awund

Its 3:30pm with some directions I reach the fort its pretty simple to find actually just keep riding straight till a sharp right, when your there look on the left and you can see the fort.........Whoa its huge. Its out at sea and there are coconut trees growing inside.

The roads are very narrow and are labelled with ONE WAY, NO ENTRY and NO RIGHT TURN etc. But nobody actually follows them.

Now for that malvani food......ummm...fish.

Just my luck, lunch time is over, I was told. only breakfast was available .....what ??!!!

I had to settle for Onion Uttapam in Malvan...that sucks !
No I mean the Uttapam was delicious but there is no fish in uttapam.

Media_httpphotos1blog_hgqtu

A ferry service is in place to take people to the fort and it brings them back after about an hour and a half. It costs Rs 27 and they take 15 people at a time.

Its a small boat with a motor and a plastic can for a fuel tank.

Media_httpphotos1blog_dodyg
The fort is huge. 3sq Kms some website had told me. As you enter there is a stall selling cold drinks and Kokum Juice. The kokum juice is very refreshing .... and I am still alive for those wondering how safe it is. There's like a village in the fort, one house even has Dish TV! There are atleast 3 mandirs that I have come accross along the cemented path.

A huge pedestle stands from where one can see the sea and the walls of the fort.
The sky looked amazing with huge clouds, which looked like rain clouds allowing sunlight to just seep through, illuminating the periphery of these clouds.

Media_httpphotos1blog_kobgn
Media_httpphotos1blog_kgmnh
Media_httpphotos1blog_bnbik
Media_httpphotos1blog_abheq




Media_httpphotos1blog_zmtei
Media_httpphotos1blog_ekfuh




Media_httpphotos1blog_rokxg
Media_httpphotos1blog_duoky

Coming back I have some more of
that kokum juice and I climb up above the entrance of the fort. There I see it, a beautiful rainbow over the town of Malvan. A few others come but they are pre-occupied with something else. Apparently a footprint and a hand print of Shvaji was created and housed in 2 structures on the east wall of the fort."Who knows one of these locals only must have made these to attract more crowds, where there was cement during Shivaji's time" says one of the revellers.

It begins to rain. Those did'nt just look like rain clouds. They were rain clouds.

It stops raining back on the boat. There is a dead squid on in the boat. One person picks it up (I don't know why) another just says "Dil Chahata Hai" and this guy has got the squid over his mouth, which I manage to capture on camera.

As we get past the fort I can see the sunset. Now Iam almost at the level of the sea, the sun appears a deep orange in colour and its half swallowed by the sea. I take out the phone, click a picture and put the phone back in. When I look again the sun has set.

Media_httpphotos1blog_mzxgo
Media_httpphotos1blog_jracu

6:15pm. Back on dry land.

Here, two choices lie ahead of me :

Head back home with the ever dakening sky behind me, reach by say 9:00 or 9:30 pm, look for food, go home where there is no TV, nobody and nothing to do except sleep.

Or.

Find a decent Hotel with a TV (oh, how I've longed for thee), have authentic malvani food for dinner, sleep early, wake early and ride back with daybreak, on a road with no traffic.

In no time Iam watching James Bond's Never Say Never Again with a fish thali........umm awesome fried fish, in a clean hotel which goes by the name of Sonchafa.

I watch Jerry Maguire (again), and doze off.

7:25am. Off the bed, out of the room, on the bike and vvrrrroooooom.

2 hours 10 mins and 110kms later Im back home with the whole day ahead of me and lots of stories to tell.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho
Mon, 30 Oct 2006 15:12:00 -0800 Road Trip - Goa I http://rabidlogic.posterous.com/2006/10/ive-recently-moved-to-goa-with-new-job.html http://rabidlogic.posterous.com/2006/10/ive-recently-moved-to-goa-with-new-job.html Ive recently moved to Goa with a new job and rented accommodation at Porvorim. Have plenty of family here but not really had time to make friends. With friends I mean, crazy people who love to ride and enjoy going on road trips where after spending all night arguing about things that we won't really remember, heading out at dawn to climb the highest peak in that State with no sleep, no food and 1 bottle of water between the 3 of us. Then taking twice as much time than a man in a wheelchair would take; reach the summit only to be chased down the mountain by lightening. Yes as I was saying Ive not been able to make any friends.

My buddies and I would go out often when I was in Bombay, but since Ive moved here we have not been able to co-ordinate anything and its been sometime that I enjoyed a good ride.

I finally gave up the search and decided to go out alone, found a map and planned the route on Saturday night. The destination would be Dudh-Sagar a mighty waterfall in eastern Goa; following a road that leads to the top of the waterfall where there is a spring -the source of the waterfall and a breathtaking view of the surrounding regions.

I rode out at 5 am with the usual combination of no sleep + extra strong chai.

First, Petrol. my bike, a red CBZ was on reserve since last evening with 2 and1/2 Lts as reserve I was good for another 100kms even after yesterdays ride back home from work.

Considering I live along a National Highway and near the City its a pity not to find a sngle 24 hr petrol pump. After a few enquiries with the local taxiwallas I headed out towards OLD GOA. A neat stretch of road along the Mandovi River leading to Ribander and from there a narrow road which keeps splitting into one ways around picturesque old houses to Old Goa.

Media_httpphotos1blog_feiwe
With the Basilica of Bom Jesu on the right and Se Cathedral on the left, along the same stretch, I rode on.Its 5:38 and I find a petrol pump which opens up at 6am. But the attendant obliged and filled fuel.Having petrol tank reserve restored and I had an additional 5 Lt in to burn.

Onwards to PONDA. The road taken was National Highway 4 A, it wasn't in too great a shape with potholes scattered across the road and loose gravel spread across some other massive ones declaring that restoration had ateast begun. Riding on I start climbing up towards the ghats I reach FARMAGUDDI; up on a hill with a coolness and fresh air thats unique to it.
Down the slope and Im in Ponda. I stop for some Lassi and off again. Now the roads are hell with pot holes materialising from thin air and Dumper trucks which have just be relieved of their load passing by like vampires fleeing away from dawn.

Dawn was magnificient with the sun lighting up clouds which formed a blanket, that stretched from over my head across the sky right to where the sun was rising leaving a narrow horizontal slit for the sunlight to pass.

Finally after some really bad roads I reach MOLLEM. Take the right (you would have to look really, really hard to find that right) and head out to COLLEM.

I stop for breakfast, puri bhajji and chai. After consulting with the cafe owner I was on a bumpy path which ended abruptly in a stream and began again on the other side.
The stream is not too deep, Trucks and Jeeps go through, but a local who was washing his truck in the stream informed me of another stream further ahead which was even deeper.
I stepped into the stream to gauge its depth and decided against going ahead, the water reached my knees and i could not risk having water go into the exhaust.

Dudh Sagar was now just 12kms away. It was 8:30 in the morning not such a bad time for a hike I thought. So I take out my camera to load the roll to find that the film advance lever of the SLR is not functioning.
Pissed off I decide to head back to Ponda to find a studio or a repair center which might be able to help.

On my way back the NH 4A wasnt the same that I had come by. There were some stretches which were like dirt bike racing arenas with the road splitting up into 4 or 5 paths and dust from the tyres of the trucks ah

Media_httpphotos1blog_aexfa
ead of me filling the air. At one such stretch i was displaced off the highway and was on my way into a new direction all together.
I stop to check the map and I was right, I had just passed PALE and that was way off the highway.

I thought to myself "today is Sunday and this is 'susegad goa', its very unlikely that I would find anything open so fixing the camera would need to wait anyway" with that thought just leaving my mind I check the map and I see that there is another waterfall nearby. I land up on the road from Onda to Sanquelim and take a left further ahead. I reach Arvalem Waterfalls.
Wi
th steps leading down I find a temple and on the left the waterfall. There is a tiled path with benches leading up alongside the waterfall and then further up to where I had parked. Its not a huge water fall but the small hutments and the entire layout of the path alongside the waterfall looks classic as in from another year in time.

After spending some time there I pick up the map and find a lake not too far away, Mayern Lake.
I head out to BICHOLIM, an old man jumps on promising me directions in return for a ride. On reaching his destination he directs me to turn off left to find the lake further. The road leading down to it looks just like those around famous tourist spots with shops and stalls - I hate that. But the lake was calm, the near end of the lake being a man made construction with the top, motorable. There were a few paddle boats out on the water and the areas beyond the lake were hilly and green.

12:30pm Lunch: Fish curry rice. Very, very tasty fried fish.

Media_httpphotos1blog_ynlwx
Off to CHORAO. Chorao is an island with narrow winding roads and pretty houses on either sides, these roads are very inviting and they entice you to continue riding. Slowly admiring the beauty the island has to offer I travel to the end of the island.
Media_httpphotos1blog_jwgfv

End of the road. I ride aboard a ferry, onboard I meet an elderly man who had just hooked himself a huge kite fish.The ferry takes me across the Mandovi River to back to Ribander. From Ribander its back home
Media_httpphotos1blog_zffyd
and time for some shut eye.

Ive managed to capture a few pictureson my phone and Ive clocked about 175 kms, not too bad for a start. Next up ... Sindhudurg Fort, Ive wanted to go there since last year, but its too far from Bombay. From here, Its about 150 kms..... only. And this time there will be better pictures.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1366009/profile.jpg http://posterous.com/users/hckDrl2zzsesq Fabio Carvalho fabs Fabio Carvalho