Skip directly to content

erantone's blog

Stock trading with neural networks evolved by a genetic algorithm

on Fri, 04/01/2016 - 23:17

- Very preliminary experimentation, done in 2012
- Tools used: Ruby and GnuPlot

Ruby tools and perks

on Fri, 02/19/2016 - 13:38

A list of ruby tools and tips to make life easier and more efficient:



on Thu, 01/21/2016 - 12:58
This is a list of external links which could be useful.


Counting the number of occurrences of a string in a file

on Fri, 07/18/2014 - 15:32
Let's assume you want to find the number of ocurrences of a string in a big XML file, quickly.
Let the filename be 'properties.xml', the keyword string be '<property>', and the script language be Perl. Then, the following command will print the total number of occurrences: 
perl -lnwe '$a+=()=/\Q<property>/g; }{ print $a;'  properties.xml