The text in this document also directly contradicts what you're saying. Put another way: the presence of a hot journal is how SQLite determines the database might be corrupted.
Pre-python 3.2, the format used for representing `str` objects in memory depended on if you used a "narrow" (UTF-16) or "wide" (UTF-32) build of Python.
Fortunately, wide and narrow builds were abandonned in Python 3.2, with a new way of representing strings : current Python will use ASCII if there's no non-ASCII char, UCS-2 –UTF-16 without surrogate pairs — if there is no codepoint higher than U+FFFF, and UTF-32 else.
`bytes.decode` (and `str.encode`) have used UTF-8 as a default since at least Python 3.
However, the default encoding used for decoding the name of files use ` sys.getfilesystemencoding()`, which is also UTF-8 on Windows and macos, but will vary with the locale on linux (specifically with CODESET).
Finally, `open` will directly use `locale.getencoding()`.
> In 3.1 it was the default encoding of string (the type str I guess).
No, what was used was what sys.getdefaultencoding(), which was already UTF-8 in 3.1 (I checked the source code).
At that time, the format used for representing `str` objects in memory depended on if you used a "narrow" (UTF-16) or "wide" (UTF-32) build of Python.
Fortunately, wide and narrow builds were abandonned in Python 3.2, with a new way of representing strings : current Python will use ASCII if there's no non-ASCII char, UCS-2 –UTF-16 without surrogate pairs — if there is no codepoint higher than U+FFFF, and UTF-32 else. But that did not exist in 3.1, where you could either use the "narrow" build of python (that used UTF-16) or the "wide" build (that used UTF-32).
> strings having an encoding and byte strings being for byte sequences without encodings
You got it kind of backwards. `str` are sequence of unicode codepoints (not UTF-8, which is a specific encoding for unicode codepoints), without reference to any encoding. `bytes` are arbitrary sequence of octets. If you have some `bytes` object that somehow stands for text, you need to know that it is text and what its encoding is to be able to interpret it correctly (by decoding it to `str`).
And, if you got a `str` and want to serialize it (for writing or transmitting), you need to choose an encoding, because different encodings will generate different `bytes`.
Does it not come down to the usual "cathedral vs. bazar" opposition? SQLite, for which Fossil was originally built, lists 3 persons on its developers page and looks pretty much like the definition of a "cathedral", whereas git was built by Linus Torvalds for Linux, which is the prototypical bazar project.
It makes sense when you have a small team of people that know the project very well to record everything, and they can easily maintain stringent standards, like never committing anything that breaks the tests.
Whereas for a big project that involve thousands of people mailing patches around, some of them first time contributors, you'd rather make sure that what ends up in the immutable log has is clean enough.
Ever read a good book, or played a video game, and known that you have to stop now but thought "I'll just read another chapter / play one more turn"?
I would say that's basically how addiction manifests itself: even if you know that you're dealing with substance abuse, come on, one more time won't matter, will it?
And then there's also the comfort aspect: you're getting back from a hard day's work, you're feeling tired and cranky, you do deserve something nice, don't you?
N.B.: I'm not saying that not being able to drop the book or stop playing that game IS addiction, just that substance addiction might feel the same way.
N.B. 2:And I'm not talking here about the medical aspects of withdrawal, because that's not the thing an addict would usually experience (withdrawal would only happen because you're trying to stop or cannot get access to the substance you need).
Question regarding Iodine-131: is it still being generated inside the spent fuel / nuclear waste in Chernobyl? From what I could gather, Iodine-131 is mostly a fission byproduct, and is not present in any of the 4 decay chains[1].
If none is still being generated, there should not be any significant quantity left considering it has a half-life of only 8 days.
The article also says that 1500 police homicides a year accounts for 8 to 10 per cent of all homicides. The corresponding figure in Germany is less than 0.3 %
It could. In France (which has a mixed system), single payer cover around 70% of prescriptions costs. And you usually have an additional private plan that will cover the rest (and if you're too poor to buy one of these plans, you can be eligible to get it from the state).
Your function in the tail recursion optimization exemple is actually not tail recursive. Factorial needs an accumulator parameter to get that tail call.
In France, juries are involved only for cases defined as "Crimes" (the American equivalent would be felony, but it's much more restrictive), such as murder and rape, especially violent thefts and war crimes. And even in these cases, their role is much less important than in the US for two reasons :
* the 6 jurors (9 in appeal) decide the case alongside 3 professional judges whose influence is often decisive during the jury's deliberation (and in any case they always carry 3 votes)
* there's no need for an unanimous decision: 6 votes are necessary for any conviction (8 in appeal)
Numba is indeed pretty impressive, but you're not comparing exactly the same thing with this code.
In the Numba case, you're basically modifying the image in place: it means no allocating a new array, no full copying. However, your pure-numpy code basically creates a new array (the result of np.dot) before copying it back entirely in image.
If you write the two functions so that they both return a new numpy array and do not touch the original one, the time difference drops from 4 times faster to 2.5 times faster. That's still an impressive difference, but at the loss of a bit of flexibility.
N.B.: numpy.dot does not use broadcasting, i.e. it does not allocate a temporary array to extend the smaller one. The function handles n-dimensional arrays by summing on the last index of the first array, and on the second last of the second array.
More generally, for an image im with shape (width, height, channels) and a square transformation matrix M of shape (channels, channels), you can do :
res = np.dot(im, M.T)
It will work with affine transformation as well if you add a 1 component to every pixel. It will also work with higher dimensional images if I'm not mistaken.
Keep in mind that the specific rules of the media chronology legal regime are set through interprofessional agreements. The specific delays for VOD services were added in 2009 and are mostly the result of an attempt by incumbents to protect their market share against internet entrants. The state agency (Conseil National du Cinéma) is actually pushing for a shorter period for subscription VOD (24 months), but only for actors involved in "French artistic creation" (basically all of them except Netflix).
All of this may seem hard to understand from a foreign perspective, but you have to realize that numerous rules apply to cultural industries in France. For example, channels must respect a minimum ratio of French movies and series in their programming. They also have an obligation to invest 3 % of their turnover in funding european and French movies. Thus, these French actors feel that Netflix's foreign status allows it to escape these obligations and they resent what they see as an unfair competition.
In the specific case of France, there are at least two reasons:
- there is a stringent legal regime ("media chronology") that sets compulsory delays for publishing a movie on alternative mediums after it has got into theatres : publishers have to wait 4 months to get DVDs out, free TV channels won't be able to screen the movie before 30 months, and VOD subscription services have to wait 36 months (!)
- Moreover, exclusivity on the national territory is a common practice for TV series, and a lot of the popular ones have been sold to major TV channels. Ironically, Netflix had already signed such a contract with Canal+, a French channel, for its signature series House of Cards, which is thus not available on the French version of Netflix !
https://sqlite.org/lockingv3.html#hot_journals