Challenge
Given an email in plain text format, including headers, decide if the email is either spam or ham, and output SPAM or HAM respectively. The emails will be given below. Your code must be able to correctly identify all of the samples, but should be general enough to work on any email.
...
@NathanMerrill 1) Start with some vertices and add each of them to their own set. 2) Randomly decide whether to add walls between any two connected vertices. (If said vertices are in the same set, always add a wall. If either vertex would be completely walled off if you add a wall, don't.) 3) Add all connected vertices to the sets of the vertices they're connected to. If a vertex is connected to two members of the same set, union the sets (and don't add a wall). Repeat from step 2.
@Downgoat __whatever__ is generally a special variable/function, and there are two underscores so you can still use _whatever_ for your own special variables/functions.
@FryAmTheEggman @LeakyNun @MartinEnder @mbomb007 and other Sesos users: You can now use -c to count the executed commands and -d to print debugging information instead of regular output.
Almost all digital camera sensors are organized in a grid of photosensors. Each photo sensor is sensitive for one of the primary colors: red, green and blue. The way those photo sensors are organized is called the Bayer filter, after its inventor, Bryce Bayer of Eastman Kodak. After an image is t...
> You may not return an array representation of the resulting image.
Netpbm is close. But honestly, I want something even simpler.
For one, the format shouldn’t allow for things like comments or skipping over whitespace — that way, an “image reader” can be dead simple and still process 100% of images.
Other than that, just skip the P3 header, I guess; all you need is "\n".join([width, height, *rgb_values]). Defaulting to 8-bit RGB is okay too, I think.