Posts

Objective neurological reality behind subjective Indian Ragas

Anyone who is a natural singer or taught himself singing will know, there is some reality behind melodies. Melodies are not random. They always behave in certain ways. These colours of melodies are called Raga in Indian music. Raga is a very ancient and well-developed concept. There is more to it than singing it. Some 4 or more years ago this occurred to me and I described what I termed as the Neurological Reality to a friend who is an expert in neuroscience. The set of related melodies that have some very similar character form, a kind of memory in the brain. This I am certain. This can form because of in my opinion based on the very primal neural networks that are related to basic human emotions and our innate ability to vocalize them. Laugh, cry, giggle, sadness anger and other emotions vocalised by us follow a basic musical note pattern. This neural networks can be expanded by simulating the intensity of those emotions, exposure to more melodies and deliberate tra...

What are numbers? Part-1

What are numbers? Part-1 This is not something I have chosen to write to show I think philosophy or 'larger questions of life' etc. I am merely sharing some confusion and discomfort I have with my understanding of numbers. To me, understanding numbers is a scientific problem and is important. I say so with some resolve because  I think, numbers as we know today are incomplete.  So throwing out my current understanding will follow. You will see how scientific or otherwise, it is. I will take two practical approaches to understanding numbers. I am not interested in whether the number is a concept or a thing etc. What numbers  do,  explains a lot more. So the two approaches are: Enumerate what property numbers help denote. Assume numbers are incomplete and verify if consequences explain inabilities of numbers as we know today.  What do numbers help denote? Numbers help  count . What does 0.75 Mango mean then? Numbers help  measure ...

How to find the public IP of your linux node without using an external DNS server

Without much ado: #!/bin/bash #Get the public IP for the network in use #This IP will be accessible through this gateway if the gateway is open to the Internet accessible from the Internet as well #Get the gateway address gatewayIP=`ip route | grep default | awk '{print $3}'` #Find the public IP for the network ip route get $gatewayIP | awk '{print $5}' #If you want to know the public IP open to the Internet you can do # ip route get 10.0.136.116 | awk '{print $5}' #10.0.136.116 is an IBM nameserver The idea is to use the Gateway of your network to find the IP accessible from your network. i.e public to your network. If the Gateway is open to the Internet that will be the public IP in general as well. Regards Ragu

How to setup FREE HTTPS for your website -- including a free CA certificate

Image
**GET YOUR SETTINGS REVIEWED BY AN EXPERT BEFORE YOU GO LIVE** You will find a lot of information in bits and pieces all over the Internet, too much technical jargon peppered all over. If you do not know how https works, do not worry. It is not hard to setup https. Lets say the https setup encrypts stuff between browser and the website and move on to set up https for your website. The keys are a couple of files needed to encrypt your website and these keys need to be signed by CA or the certificate authority in order for browsers to recognise that traffic is properly encrypted. I will use nginx web server and centos7 operating system to show how https can be setup. If you use a different webserver like apache or os like ubuntu look up corresponding instructions elsewhere. So here go the steps: 1. Get a free CA signed certificate 2. Update your web server to use the certificates and enable https 3. Setup certificate renewal and optimize and se...

Pageant for Mac - Using Jump Server on Mac

Image
If you use putty on windows, you probably used pageant to store multiple keys, ssh to jump server and then ssh to your work machine. If you ended up on Mac for some reason and you have a production situation, there is no reason to panic. Mac systems have Keychain - a software that manages your keys including ssh keys. There are 3 steps to use it for jumping . 1. Add your ssh keys to Keychain. 2. Create an ssh  config file to access jump terminal 3. Agent forwarding 1. Adding keys If you had ppk/putty keys you need to convert them. If you have ssh keys then you can add them without converting. I had puttygen on my mac. If you were using Windows machine, you can convert ppk keys to ssh key on Windows and then add on Mac. I had two keys - if you have only one that is fine. puttygen user_rsa.ppk -O private-openssh -o user_rsa.key puttygen jump.ppk -O private-openssh -o jump.key If a window pops up then DO NOT hit generate key.  1. Load y...

jstut

Image
https://github.com/raguks/jstut

Installing Ubuntu and Fixing Boot, Software Centre Issues

Installing Ubuntu 12.04 =============== As long as you do not choose to screw your windows partition explicitly default installation should work fine. The problems starts later on however! I trust you on this part and proceed further directly to problems. Boot Problems =========== The grandchildren of linux have the same old boot loader problems that their grandmother RedHat 2-6.0x had! What happens is you will not see an option to boot to Linux, stuff directly goes to Windows or whatever else you have on you computer. Ctrl+Alt+T sudo grub-install /dev/sda Hit enter the problem should now be solved. Software Centre =========== The Canadian server seems to be sleeping so you may get this error. Error ===== W:Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Unable to connect to ca.archive.ubuntu.com:http: E:Some index files failed to download. They have been ignored, or old ones used instead. Open Software Centre and choose Edit -...

Perl Script to find intersection of lines in two files

#!/usr/bin/perl #/* Author : ~rAGU () */ # /*Descripation: A script to find the intersection set of the lines in two text files */ # /* when one of the file is a subset of the other */ # /* finsec.pl */ # 2004 open(SET, @ARGV[0]); $isInSubset = 0; $count = 0; while ($lineInSet = ) {     chop($lineInSet);     #$lineInSet = ~s / ^ \s * (.* ? )\ s * $ / $1 / ;     $count++;     $counts = 0;     open(SUBSET, @ARGV[1]);     while ($lineInSubset = )     {         $counts++;         chop($lineInSubset);         #$lineInSubset = ~s / ^ \s * (.* ? )\ s * $ / $1 / ;         if ($lineInSet eq $lineInSubset)         {             $isInSubset = 1;    ...

Using Regular Expressions for Program Transformation

I have been investigating the problem of practical code transformation to deal with small changes that have to be made across a large collection of programs in different programming languages . So the problem is not to transform a program entirely but doing small transformations to a large set of programs that too when we have C, Perl, Java etc source programs in that set. This has practical application in software development, code refactoring and testing. A lot of cost savings in software testing is possible if test the suits are well maintained and are automagically transformed using some method. I used a method and published findings on ip.com  which is rather a full system explanation of what I described here in 2011  There are some interesting obstacles to transforming programs. I will try to explain as well as understand some of them through this post. When we want to transform a set of programs in different languages what we are dealing with is a bun...

#Perl recursive file listing in dir with a pattern in name

Modified: use File::Find;    #Recursive file find with a pattern in name    find( sub{               /.*NODE.*\.CAT.*/si && -f $_ and push @bkpfiles, $File::Find::name;               #-d $_ and push @dirs,  $File::Find::name;             }, $dir ); due to: sh1tn

nohup and hist need some care before use

I mean you can not do something like: nohup r prep; something& nohup: cannot run command `hist': No such file or directory Well we could run this provided we eval r something.

rsh2/rsh Permission Denied

Even when everything is set right there could be "Permission Denied" error. .rhosts has all the entries etc. Then check the permission on .rhosts file: chmod 644 on users .rhosts file

Search and replace by parsing nested clause across multilines using recursive regex

 Let me start with the answer. The answer is: perl -p -i -e 'undef $/;$re = qr/\((?:[^()]*|(??{$re}))*\)/;s/(create\s+table \s+.[a-z,A-Z,0-9,.]*\s*$re)\s*(?!SPARSIFY)/$1 SPARSIFY /gis' test/* Now the question and story behind it:  Transforming existing code can be bit tricky and less useful sometimes. But at other times it can literally save our jobs! Here is a typical scenario: FuncName ("Hell brakes $heck if(blah (blah(blah(". "blah(blah))blah)))", Heaven); If the above function is called million times at different places and you want to change that crazy looking nested structure inside a function argument what will you do ? Ok, you can slurp the file to a scalar as in here: http://www.modernperlbooks.com/mt/2009/08/a-one-line-slurp-in-perl-5.html. Then use the recursive regexp idiom: $re = qr/\((?:[^()]*|(??{$re}))*\)/;      $input_scalar =~ s/(Hell\s+brakes\s+.[a-z,A-Z,0-9|.]*\s+if\s*$re)\s*(?!HELLIFY)/$1 HELLIFY /gis; The $re grabs every...

Relational XML

Why use hierarchical data model with relational databases? That is the story of XML in relational databases. Why can't XML be used to define data relations? So I looked around if it existed. This dude has an idea . Then came the boss with lotsa more ideii ! Right on!

C# .NET Application deployment

I am not overly familiar with this stuff. As I try to figure out. Images added to resources should be specified using relative path. If you try Visual Studio is smart enough to suggest. So the Source filed in the Property tab should like /YakshaTala;component/Resources/kanlogo.png YakshaTala is the root folder  Resources is the sub folder The rest about deployment soon... It appears this is a common problem. The solution is here http://geekrick.blogspot.com/2008/08/frustrating-net-framework-sp1-issue.html and in many other places .Best way is to google the error message deleting application specific part in the error message. I am able to install my app.

What ailes file systems

File systems have a single region of failure: the table. Corruption of allocation table renders all data waste. Such corruption reduces the problem of finding files in to the known problem of non trivial 'string comparison/search'. Go write a software to find the file headers in a DVD. We can write one but only if someone can lend a computer that can compute it before I am dead! So we need an idea that does away single region of failure.

Elements of Abstractions - Computation as simulation of models

Let us define 'abstraction' as 'hiding' for the purpose of this post. A 'level of abstraction' therefore is amount of hiding details of a particular kind. Elements are in a sense different 'kinds' of 'bricks' that build a level of abstraction. ...more

Questions?

Questions can be crazy! Look at interviewers on TV. They create so much trouble with simple questions and put good guys in trouble even if everything they said and did was right! Why and how? The trick is in questions they ask. Questions can be incorrect. What question implies could be out right wrong. More cunning is the warrant of what is implied in a question being wrong. It is hidden so deep that question looks all right. Yet something is odd about it! It occurred to me that we should study what can be called Interrogative Calculus? Propositional and other calculi do not cover logic of questions because questions are not propositions. However, questions are part of everyday logic and propositional calculus can not represent  . We therefore need a formal system that can account for questions. I dug to see if there was some research on this topic. Sure, there is. It appears that there is a proposal here.: : in 2001 . I am only 9 years behind! A lot of improvement ; It used t...

Get a domain name for your url

www.dot.tk is a cool idea that gets a domain name for URLs. Try it. It works for me! www.thoughtslot.tk

iClock

http://thoughtslot.blogspot.com/2008/09/personica.html