I am trying to understand the code below:  from functools import reduce reduce(lambda d, i: (i[0] &lt; 7 and d.__setitem__(*i[::-1]), d)[-1], [{}, *{1:2, 3:4, 5:6, 7:8}.items()])      The part that I don't understand is the *.   [{}, *{1:2, 3:4, 5:6, 7:8}.items()]   returns:  [{}, (1, 2), (3, 4), (5, 6), (7, 8)]   Now if i run in isolation  *{1:2, 3:4, 5:6, 7:8}.items()   it returns an error : "File "cell_name", line 4 SyntaxError: can't use starred expression here".  However I am able to run the code without * just fine as a one-line code and returns:  dict_items([(1, 2), (3, 4), (5, 6), (7, 8)])   I have googled it and in  it seems related to unpacking containers, but this one is used in arrays.  However in the full lambda, the * seems necessary and throws an error "'dict_items' object does not support indexing" without the *.  Anyone understand this syntax jargon?  Thanks for any help.
In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):
What is a word/phrase for using a term for a popular special case instead of a generic term? C++ 11 Thread initialization with member functions compiling error Showing that $\mathbb{Q}[\sqrt{2}, \sqrt{3}]$ contains multiplicative inverses Why must $\mathbb{Q}[\sqrt{2}, \sqrt{3}]$ -- the set of all polynomials in $\sqrt{2}$ and $\sqrt{3}$ with rational coefficients  -- contain multiplicative inverses?   I have gathered that every element of $\mathbb{Q}[\sqrt{2}, \sqrt{3}]$ takes form $a + b\sqrt{2} + c\sqrt{3} + d\sqrt{2}\sqrt{3}$ for some $a,b,c,d \in \mathbb{Q}$, and I have shown that $\mathbb{Q}[\sqrt{2}]$ and $\mathbb{Q}[\sqrt{3}]$ are both fields, but it's not clear to me why this allows for general multiplicative inverses to exist in $\mathbb{Q}[\sqrt{2}, \sqrt{3}]$. Effects:  +25 attack damage +15% life steal +40% attack speed Passive  Unique: Your attacks deal 5% of the target's current health in physical damage (60 max vs minions and monsters). Active   Unique: Drains target champion, dealing 15% of the champion's maximum Health in physical damage and healing you by the same amount. Additionally you steal 30% of their movement speed for 4 seconds - 60 second cooldown. (500 range)  Cost: 3200g VS.   Effects:  +70 attack damage +12% life steal Passive: Gain +1 attack damage and +0.2% life steal per kill (maximum +30 attack damage and +6% life steal). Half of the bonuses are lost upon death.  Cost: 3200g What is better for what situations, and when should you build BT instead of BotRK and Vice Versa. Which provides more lifesteal, the only variable being the stats of the weapon? I find myself constantly questioning my decision on which weapon to get and would really love some in depth answers. Would be great if any examples given were given from the ADC side of the house. When I start up Ubuntu 16.04 some applications take too long to run the first time I open them, including Chrome and any PDF viewer. Others, like nautilus, start up immediately.  The first time I try to use a PDF viewer like okular, it takes too long to open. After it opens a PDF file for the first time, other files open quickly. Even if I close all and open some after a long time, it happens quickly.  How can I speed up these programs opening on the first run? Living potato clock? Understanding linear regression In class we've seen that $a$ (the weights) must satisfy $$X^T (y-Xa) =0$$  Here $X$ is a $(n\times d)$ matrix (so we have $n$ samples in $\mathbb R^d$)  let's denote the residuals $r = y-Xa$. In our class notes, it is written that     The normal equations require the residuals to be orthogonal to each of the columns of $X$.   Why?     Therefore, the solution of the linear regression is a projection of $y$ onto the subspace spanned by $v_1 , \ldots , v_d$ (the columns of $X$)   Can you please explain this? Some applications simulate a virtual USB or CD Rom drive as if a USB drive is attached to the computer.  Is there any configuration or application that provides a virtual USB drive, not for the the operating system itself, but for other equipments which accept USB drive, through a USB port.  So I'll have a virtual hard disk (e.g. a *.vdi file) in the computer, which is connected, through a USB socket, as a USB drive to some other equipment (e.g. a cell phone or a laptop). Find $f$ where $f'(x) = f(1+x)$ Let $f \colon \mathbb{R} \rightarrow  \mathbb{R}$ be a smooth function such that $$f'(x) = f(1+x)$$ How can we find the general form of $f$? I thought of some differential equations, but not sure how to use them here. Thanks. Uneven line height in XeTeX I'm embarking on a journey to create a conference abstract book using XeTeX and got stuck within five minutes:        The missing 'g' in 'somethin' influences the line height of the following line. How can I correct this?  At the end I want to be able to include the abstracts and corresponding information through our online registration system, so this should be a global setting.  My MWE:  \documentclass[10pt, a5paper]{article} \usepackage{fontspec}  %% GEOMETRY \usepackage[left=2cm, right=1.5cm]{geometry} % to change the page dimensions  \newenvironment{AbsHead} {     \fontsize{16}{22}\headfont\noindent }% {     \vspace{0.5 cm} }  \newenvironment{AbsAuthors} {     \fontsize{12}{14}\authorfont\noindent }% {    \vspace{0.5 cm} }  \begin{document}  ￼￼￼￼\setmainfont{Minion Pro} \newfontfamily\authorfont{Helvetica Neue Light} \newfontfamily\headfont{Helvetica Neue Condensed Bold}  \begin{AbsHead}The XIAP  something something something somethin somethin somethin somethin somethin somethin somethin something something\end{AbsHead}   \begin{AbsAuthors}Somebody Someone\end{AbsAuthors}   \noindent Purpose: Lorem ipsum \end{document} Electronic visa having Old Passport number What are the restrictions on the use of Slayer's Prey? In the recent book Xanathar's Guide to Everything, there are some subclasses/archetypes added for Rangers, among them the  (p. 43), which gives some specific helpful features. Hunter's Sense  At 3rd level, you gain the ability to peer at a creature and magically discern how best to hurt it. As an action, choose one creature you can see within 60 feet of you. You immediately learn whether the creature has any damage immunities, resistances, or vulnerabilities and what they are. If the creature is hidden from divination magic, you sense that it has no damage immunities, resistances, or vulnerabilities. You can use this feature a number of times equal to your Wisdom modifier (minimum of once). You regain all expended uses of it when you finish a long rest.  The limitations on use are clearly spelled out. Slayer's Prey  Starting at 3rd level, you can focus your ire on one foe, increasing the harm you inflict on it. As a bonus action, you designate one creature you can see within 60 feet of you as the target of this feature. The first time each turn that you hit that target with a weapon attack, it takes an extra 1d6 damage from the weapon. This benefit lasts until you finish a short or long rest. It ends early if you designate a different creature.  So from this, I would interpret it as it being able to switch from creature to creature at will, but there is no guidance as to what happens if the creature under the mark dies, or if you can carry it (so to speak) from encounter to encounter. Is there a limitation on the use of Slayer's Prey in the wording that I am missing? Or is this a basically a multiple use feature? (i.e., you can designate any creature as a bonus action, with no limitations on uses per day)? The extra d6 seems a little overpowering at lower levels, and somewhat meh at higher levels. FWIW, the GM basically allowed it as multi-use for the session, and was going to also try to find clarification. Did English ever have a formal version of "you"? Why are date-based hats awarded too early? Parallel universes: are there an infinite amount of universes? Parallel universe: in every universe, you are presented with a different decision. Does that mean there are an infinite amount of parallel universes? I.e., if in one universe I choose to go left, I am then presented with different choices vs if i choose right, and that creates more universes with more decisions to be made.  Or does it mean that in the end of one's life we end up in the same place, meaning that its just one parallel universe that eventually collides with the other. Is speed of light and sound rational or irrational in nature? Just as circumference of circle will remain $\pi$ for unit diameter, no matter what standard unit we take, are the speeds of light and sound irrational or rational in nature ?   I'm talking about theoretical speeds and not empirical, which of course are rational numbers. Alien invasion movie, giant robot aliens with long legs capturing people I am considering buying a Dell XPS 15 laptop. The laptop has a Nvidia 420m card which should work with Linux but I keep reading that the Nvidia Optimus technology isn't supported on Linux. I am not really interested in switching from Nvidia to Intel to save power but need to know that the Nvidia card will in fact work if I installed Ubuntu.  If anyone has experience using a Nvidia card with Optimus technology or even better the exact laptop in question (Dell XPS 15 with 1GB NVIDIA® GeForce®  GT 420M) it would be great.  A major problem holding people back from adopting Linux is this sort of hardware issue. I am a long term Ubuntu user and supporter who can't afford to make a mistake with a purchase like this. I don't want to spend £500+ to find I have no graphics acceleration because Windows 7 is not an option. Captured variable in a loop in C# Non-existence of a Surjective Function from a Set to Its Subsets (Cantor's theorem)