How to put each word in a file on a separate line
Place each word on a separate line with sed and awk: sed -e ‘s/[^[:alpha:]]/ /g’ | awk ‘{ for (i=1;i
Difficulty level 2 of 5: Easy
Place each word on a separate line with sed and awk: sed -e ‘s/[^[:alpha:]]/ /g’ | awk ‘{ for (i=1;i
I read somewhere that if you take a list of words reverse the letters in each word sort the (reversed) words alphabetically then reverse the words back to normal
I keep forgetting how to do this. How to group on a date column (date_col in the example) in Oracle: SELECT count(*) FROM table GROUP ON TO_CHAR(date_col, ‘DD-MON-YYYY HH:MI:SS’) For other format strings than ‘DD-MON-YYYY HH:MI:SS’ see this page.
In this example I had a big log file (many million lines), that I wanted to split into smaller logfiles (each one million lines) for processing on Elastic MapReduce. -rw-r–r– 1 kostas staff 543067012012 Oct 11 13:45 huge_logfile This is…
There is a good little tool called s3funnel on GitHub for this. I used easy_install to install on my Mac. easy_install s3funnel
E.g. to select rows with a timestamp on minutes 0, 5, 10, …, 55 select * from t where mod(to_number(to_char(date_time_col, ‘mi’)),5)=0
One way to check whether a library is installed is to use ld, e.g. check that zlib is installed: ld -lzlib If library is installed you’ll get something like this: ld: warning: -arch not specified ld: could not find entry…
Say you have a static JSON file sitting on a web server, e.g. mystaticfiles.com on Amazon S3 or a CDN. For the sake of argument, let’s imagine that it’s a configuration file. The contents of the file looks like this:…
If you have an ESRI Shapefile (.shp) that you want to reproject, you can use ogr2ogr ogr2ogr -t_srs newfile.shp oldfile.shp The EPSG code could be for instance epsg:28532.
Include the packages. The blindtext package is just an easy way to type Lorem ipsum etc. \usepackage{multicol} \usepackage{blindtext} Make a two column section of a page. \begin{multicols}{2}[\textbf{Example for a two column text}] \blindtext \end{multicols}