Profanity Is Not Professional
Somewhat unsurprisingly, profanity is a lot more common in open source than in closed source software. Also not surprisingly, some people find it offensive while others view it as nothing more than an exercise of free speech.
For me it depends on the situation. Using the word f**k in kernel code comments is one thing - I highly doubt that anyone can write code for the Linux kernel without having heard the word f**k before. (See the updated Linux kernel f**k count.)