background preloader

Unix and Linux

Facebook Twitter

Joel Lennx sur Twitter : "1981 Unix on Univac 1100 series systems from Usenet Oldnews Archive via gopher. #Unix #Univac. Floodgap Gopher-HTTP gateway. PromyLOPh/pianobar. Useful Unix commands for data science. Imagine you have a 4.2GB CSV file.

Useful Unix commands for data science

It has over 12 million records and 50 columns. All you need from this file is the sum of all values in one particular column. How would you do it? Writing a script in python/ruby/perl/whatever would probably take a few minutes and then even more time for the script to actually complete. A database and SQL would be fairly quick, but then you'd have load the data, which is kind of a pain. Thankfully, the Unix utilities exist and they're awesome. Let's assume our data, which we'll call data.csv, is pipe-delimited ( | ), and we want to sum the fourth column of the file. cat data.csv | awk -F "|" '{ sum += $4 } END { printf "%.2f\n", sum }' The above line says: It took less than two minutes to run on the entire file - much faster than other options and written in a lot fewer characters.

For those who are a bit newer to the command line than the rest of this post assumes, Hilary previously wrote a nice introduction to it. Other commands grep sed Additional Resources: The Basics of C Programming". The previous discussion becomes a little clearer if you understand how memory addresses work in a computer's hardware.

The Basics of C Programming"

If you have not read it already, now would be a good time to read How Bits and Bytes Work to fully understand bits, bytes and words. All computers have memory, also known as RAM (random access memory). For example, your computer might have 16 or 32 or 64 megabytes of RAM installed right now. RAM holds the programs that your computer is currently running along with the data they are currently manipulating (their variables and data structures).

Memory can be thought of simply as an array of bytes. Float f; This statement says, "Declare a location named f that can hold one floating point value. " While you think of the variable f, the computer thinks of a specific address in memory (for example, 248,440). F = 3.14; The compiler might translate that into, "Load the value 3.14 into memory location 248,440. " The output that you see from the program will probably look like this: 20 Excelentes gratis Editores de texto enriquecido. Rich-text editors, also known as online rich-text editors, are web components that allow users to edit and enter text within a web browser.

20 Excelentes gratis Editores de texto enriquecido

Rich-text editors are used in numerous ways such as in enhancing your comment input form or as part of a web application that allows entry of user-generated and formatted content. Rich-text editors are essentially web-based WYSIWYG (“what you see is what you get”) editors. There are many rich-text editors out there. What’s even better than a lot of choices? Many of the best rich-text editors currently in the market are free. In this article, we present 20 exceptional (and free) rich-text editors. 1. TinyMCE is an open source (under the GNU Lesser General Public License) rich-text editor released and maintained by Moxiecode. TinyMCE |Demo | Download 2. FCKeditor is another wildly popular open source online rich-text editor (check out some of the websites that use it). FCKeditor | Demo | Download.

cURL - Tutorial. cURL Docs Tutorial HTTP Scripting.

cURL - Tutorial

Bash Guide for Beginners. Seders's grab bag - Tutorials. If you have written anything about sed - whether an introduction, how sed got you out of a real-life situation, or perhaps an advanced technique you've discovered - you may like have your work published here.

Seders's grab bag - Tutorials

Your contribution will be very welcome. Intros sed one-liners (18kb) The essential, official compendium of useful sed one-liners. Organised into sections by usage, such as file spacing, line numbering, selective line removal/deletion and optimisation. The sed FAQ v15 (168kb) Another sed FAQ And here is another sed FAQ, by a different person. Do it with sed (51kb) Seders's grab bag - Tutorials. LinuxCommand.org: Learn the Linux command line. Write shell scripts. Pdp7. 1969 unix.