Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/08/20 in all areas

  1. Italian is pronounced as it's spelled, but French is similar to English; sounding it out might not lead you to he correct spelling. At nine years of age, I did not find English very hard to learn; my brother ,sister and I were nearly fluent after 6 months of immigrating to Canada. My mom reached an equivalent level after about 5 years while my dad never achieved fluency. I think a bigger problem is spell-check/auto-correct. Just like calculators made sure that young people working at McDonald's can't make correct change mentally, spelling aids on phones and computers are ensuring young people don't know how to spell. ( but more importantly, who is Jim ? )
    1 point
  2. "We have two lives, the second begins when we realize we only have one." - Confucius.
    1 point
  3. fun_list3 = [lambda e: e + i for i in range(5)] The variable i is outside the scope of the lambda function. Let's rewrite the above to make this clearer. fun_list3 = [] for i in range(5): fun_list3.append(lambda e: e + i) This will produce the same list you wrote but is more explicit about what's going on. The variable i in your lambda function is referencing the i variable from the for loop. It's not doing what you think, which is inserting the value of i over each iteration. The i in your lambda function and the i in the for loop are pointing to the same place in memory. You can see this by doing the following: Python 3.8.5 (default, Sep 5 2020, 10:50:12) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> fun_list3 = [] >>> for i in range(5): ... fun_list3.append(lambda e: e + i) ... >>> print([f(10) for f in fun_list3]) [14, 14, 14, 14, 14] >>> i = 555 >>> print([f(10) for f in fun_list3]) [565, 565, 565, 565, 565] >>> You can do what Sensei said above, but that will introduce an optional argument for each of the lambda functions in the list. For example, Python 3.8.5 (default, Sep 5 2020, 10:50:12) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> fun_list3 = [lambda e,f=i: e+f for i in range(5)] >>> print([f(10) for f in fun_list3]) [10, 11, 12, 13, 14] >>> print([f(10, 555) for f in fun_list3]) [565, 565, 565, 565, 565] >>> I personally would do the following which is have a lambda function that takes i as its argument and returns another lambda function. fun_list3 = [(lambda f: lambda e: e + f)(i) for i in range(5)] Python 3.8.5 (default, Sep 5 2020, 10:50:12) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> fun_list3 = [(lambda f: lambda e: e + f)(i) for i in range(5)] >>> print([f(10) for f in fun_list3]) [10, 11, 12, 13, 14] >>> print([f(10, 555) for f in fun_list3]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <listcomp> TypeError: <lambda>() takes 1 positional argument but 2 were given >>>
    1 point
  4. Cherry-picking, are we? You seem to have missed these other things I said: What time in life is the afterlife that you experience at death, you say? And how do you know anything about the perception of death? What evidence do you have that perception of time is discrete? It looks continuous to me. Or, as @md65536 points out: What is a "heavenly experience"? Actually, I firmly believe that at the moment of death there is no heavenly anything. There is only the universal experience of absolute jerkiness. It's neither hell nor heaven. It lasts somewhere between 24 and 48 hours. And after that, there is three thousand eons of doubt, ending in an eternity of definite moronity. How do you like that? Now, tell me that's not at least as plausible as what you're saying. You have an impressive ability to sidestep every major argument people give you and concentrate really hard on the most irrelevant accessories and adornments. No wonder you can prove anything to yourself. How do you define "heavenly"? My suggested picture of the afterlife I find every bit as compelling as yours.
    1 point
  5. I think the wiki page about Pareto distribution confirms you. In the exponential distribution section .
    1 point
  6. Change code to print("list3") fun_list3 = [lambda e,i=i: e+i for i in range(5)] #The lambda function returns e+i for i in range(5), Note e is the argument of lambda function print([f(10) for f in fun_list3]) It is making yet another argument for lambda function which is by default initialized to i (which is taken from for loop). or if you want it to be cleaner: print("list3") fun_list3 = [lambda e,f=i: e+f for i in range(5)] #The lambda function returns e+i for i in range(5), Note e is the argument of lambda function print([f(10) for f in fun_list3]) It will give you expected result:
    1 point
  7. The rotation isn’t in 3D Euclidean space, but in the 4D Minkowski spacetime of Special Relativity. The geometry of that spacetime is hyperbolic, so the situation is more complex than what can be easily visualised. Note also - and that is important - that spin is not a function of spacetime coordinates, so visualising it as some kind of rotation about itself is highly misleading. Rather, the rotation involved is one of the wavefunction about a hyperbolic angle in spacetime - in other words, a Lorentz transformation between inertial frames. I think a better way to understand spin is to take it to signify what kind of mathematical object the quantum mechanical wavefunction of the entity in question needs to be, in order for it to be compatible with both the laws of quantum mechanics and Special Relativity. Spin-0 means we are dealing with a scalar, spin-½ means it is a Dirac spinor (bispinor), spin-1 means it is a vector, and spin-2 means it is a rank-2 tensor. Of course all these object types are closely related, in that they are all representations of the Lorentz group - that group which captures the symmetries of spacetime. So spin is at its heart a relativistic phenomenon, and an expression of symmetry.
    1 point
  8. QM is a bit weird Spin 1/2 means the particle has a component of angular momentum (typically taken as the z-component) of 1/2 h-bar
    1 point
  9. When you rotate an object, the way it behaves is not necessarily the way ordinary things rotate. The particular model an object follows when rotating is called "representation of the rotation group". A spin 1/2 particle, when rotating, carries what's called a spinor representation of O(3). There can be several intuitive ways to picture this, but in the end it's an abstract property. The one I like best is this Balinese traditional dance. Sorry I wasn't able to find a more dexterous dancer: Spin 3/2 (Rarita-Schwinger) particles are believed not to be fundamental. In fact, there are arguments in QFT for particles of spin other than 0, 1/2, 1 or 2 not to exist. A hypothetical spin 3/2 particle would go back to its original state if rotated an angle of 4pi/3.
    1 point
  10. Obviously in most modern societies we are free to express pretty much anything we want (with notable exceptions, and with the caveat that some forms of speech will certainly result in consequences of various kinds). But - and let me play the devil’s advocate here - where does this fit into a larger picture? Is unrestricted freedom always necessarily a good thing, no questions asked? I hear so many people keep going on about their “right to free speech”, but very few ever talk about their corresponding responsibility to engage in ethical speech. People like freedoms, but they don’t like the responsibility that comes with it. If I say or do something that is deeply hurtful to a lot of other people, and is not conducive to peace, prosperity and well-being of society as a whole, in what sense is such a freedom to be considered ‘good’? Much has been said about people’s freedom to engage in whatever speech they want - but what about people’s freedom from forms of malicious or otherwise hurtful speech that is simply not compatible with a civilised and peaceful society that values the well-being of all its citizens? Before anyone responds, I’d like to point out that I grew up under a communist regime in the former Eastern Bloc, so I know first hand what it is like to live in a society that does not grant freedom of speech (well, theoretically you could say anything you wanted of course...but some things you were only ever going to say once, so effectively the freedom was severely curtailed). It isn’t just an academic concept to me, I’ve experienced it, and it is not a good thing. On the other hand though, I am also on the autism spectrum, and as such I am simultaneously more sensitive and vastly more conflict-avoidant that most neurotypical people. Some forms of speech with malicious intend, directed towards me, will affect me very deeply, and at the same time I am entirely incapable of confronting the speaker about it. So for everyone like myself, who is affected in different ways by harsh and malicious speech (essentially everyone who does not fully conform to the accepted norms of society) - where is our freedom from such forms of speech? Why is this never really debated? Given the choice, I would personally be very happy to trade some of my ‘freedom to’ for a bit more ‘freedom from’, if that is conducive to my overall wellbeing. Of course I am aware of the difficulties - who makes these decisions, based on what, etc etc...but still. I don’t have a very specific point to make, I just wanted to put this ‘freedom to’ vs ‘freedom from’ thing out there.
    1 point
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.