709 karma · joined July 11, 2014
That's how the relationship between high-end PC games and the consoles work right now, so it's probably the case.
if name in names:
names[name] += 1
else:
names[name] = 1
That can actually be written as just one neat, readable line: names[name] = names[name] + 1 if name in names else 1
It may not be as readable to some who are used to spelling it out as an if/else block, but I really prefer the one line way. It reads closer to regular English I think.Just plugging "wikileaks" into the search box returned the correct URL:
http://bigstory.ap.org/article/b70da83fd111496dbdf015acbb798...
"just for the pleasure, anyone want to try a simple
rm -rf --no-preserve-root /"
I don't have a Windows 10 computer, so I can't test this myself. I would love to know what happens though. Does this subsystem have Windows' typical self-preservation mindset, or is it full-on UNIX style?
Namedtuples are wonderful! It's like a class with only attributes, except you don't have to define a new class and get slapped across the back of your head by more experienced programmers for creating a useless class. Access objects by index, by name, or by iteration. It's very versatile.
I've been using The Deepin Desktop Environment for a bit over a month now, and I have to say it is easily the best desktop environment out there for Windows users right now. It looks close enough to 7 and 10 to be familiar, but it's far easier to use. Deepin OS is now my go-to recommendation for new Linux users, especially since they have an agreement with Codeweavers to include Crossover in the distro free of charge.
That's a pretty large bug. Considering what JSON is supposed to be used for, passing data between two programs/processes, files larger than 1 MB should have been accounted for.
Does it freeze then crash, freeze until the OS takes care of it, or freeze temporarily then resume?
python -mjson.tool < unformatted.json | vim -
If you're not using cat to concatenate things, the shell can probably handle the job.This isn't the issue.
On the subject of printing, there are actual reasons for having this duplicate functionality. The main way to print is of course the print function in three, or print statement in two. The print function was lacking the ability to flush the buffer before that was introduced in three. You would have to call sys.stdout.flush(), whereas now the print function includes the boolean "flush" keyword argument. The second way to print is to call sys.stdout.write(), which does not automatically append a newline. That functionality was implemented in the print function with the "end" keyword argument. You can pass it an empty string in place of the newline.
So for most use cases, print() is just fine. Sometimes you want finer grained control, and for that you would use the sys module.
I think bulletproof coffee is a bit overrated though. I tried it and couldn't get into it, and that's with very good quality coffee. A bit of heavy cream is nice sometimes though.
Anyway, what he did was legal. There's nothing to be held accountable for. Whether or not it's right or wrong in general is not really a topic I'm interested in. Since the legal process worked as it's supposed to, I believe this to be what you might call right though. Gawker has had this coming. If they hadn't made it so easy by publishing garbage, Theil would have been powerless.
I would be fascinated if Hurd could get the same sort of developer momentum to be comparable to Linux. A completely new (as in 1.0 released) and usable FOSS Unix-alike would be quite welcome amongst Linux and the BSD's I think.
Neat! And here I've been pronouncing it like the English word "mate".