Hello how can I make a list of numbers that will increase by an x amount until the range is complete. Like I want set = [i for i in range(2,11)] I want the contents of list to be increase by 0.1, so its contents are going to go like [2, 2.1, 2.2, 2.3...... etc.]. Also how can I only print the contents of set1 of elements from the code below. instead of the outputs being (2, 1, 1) (2, 1, 2) (2, 2, 1) (2, 2, 2) (3, 1, 1) (3, 1, 2) (3, 2, 1) (3, 2, 2) it would be(2) (2) (2) (2) (3) (3) (3) (3). Thanks for the help :) import itertools set1 = [i for i in range(2,4)] set2 = [i for i in range(1,2)] set3 = [i for i in range(1,2)]               list_set = [set1, set2, set3] for element in itertools.product(*list_set):   print(element)
Is there a way to step between 0 and 1 by 0.1?   I thought I could do it like the following, but it failed:  for i in range(0, 1, 0.1):     print i   Instead, it says that the step argument cannot be zero, which I did not expect.
Discriminant analysis vs logistic regression Consider the sum of $n$ uniform distributions on $[0,1]$, or $Z_n$. Why does the cusp in the PDF of $Z_n$ disappear for $n \geq 3$? I've been wondering about this one for a while; I find it a little weird how abruptly it happens. Basically, why do we need just three uniforms for $Z_n$ to smooth out like it does? And why does the smoothing-out happen so relatively quickly?  $Z_2$:     $Z_3$:    (images shamelessly stolen from John D. Cook's blog: )  Why doesn't it take, say, four uniforms? Or five? Or...? A while ago, I had a discussion with a colleague about how to insert values in STL . I preferred map[key] = value; because it feels natural and is clear to read whereas he preferred map.insert(std::make_pair(key, value)). I just asked him and neither of us can remember the reason why insert is better, but I am sure it was not just a style preference rather there was a technical reason such as efficiency. The  simply says: &quot;Strictly speaking, this member function is unnecessary: it exists only for convenience.&quot; Can anybody tell me that reason, or am I just dreaming that there is one? Proof that the set of irrational numbers is dense in reals During my studying to integration I find this integration.  So I tried to prove but I got stuk.  So I need help in this integration.  $$\displaystyle\int_{-\infty}^{\infty} \frac{x \sin (x)}{1+x^2}  dx = \frac {\pi}{e} $$ Autoexpand UITextView height dynamically in ios Shape with a slanted side (responsive) Upon the risk of being down voted as no MWE is present, but at the moment just trying to get some pointers. I updated my MiKTeX installation to the newest available version at the moment (MiKTeX-pdfTeX 4.1 (MiKTeX 20.12)) and now I get an error while building my documentation: Appendix D. (../html/examples/group/latex/refman_doc.tex (../html/examples/group/latex//gro up__group1.tex) [243] ! I can't write on file `../html/examples/group/latex//group__group2.aux'. \@include ...mmediate \openout \@partaux &quot;#1.aux&quot;                                                   \immediate \write \@partau... l.3 \include{group__group2}  Please type another output file name ! Emergency stop. \@include ...mmediate \openout \@partaux &quot;#1.aux&quot;                                                   \immediate \write \@partau... l.3 \include{group__group2}  *** (job aborted, file error in nonstop mode)  some small background:  Started normally with pdflatex doxygen_manual.tex in here is the statement: \subinputfrom{../html/examples/group/latex/}{refman_doc} and in this file again: \include{group__group2} as far as I know the disk is not full and the protections of the files and directories are OK as well  It looks like that now an attempt is made to write to the directory ../html/examples/group/latex/ whilst in the past the file was written to the current directory. I already tried -shell-escape and -enable-write18 (as well as --shell-escape and --enable-write18) but to no avail.  Any known changes in respect to writing the aux file? Any hints  edit I asked another question () with the details and MWE but that was closed with the reason that it was a duplicate of this one ... So I'm adding the information now here: In the question  asked about the problems I encountered due to an update of my MiKTeX distribution, but didn't take the time (at that moment) to create a MWE, so it didn't attract much response. I have the directory structure:  main  manual.tex   group  group__group2.tex refman_doc.tex    manual.tex \documentclass{book} \usepackage{import} \usepackage{hyperref}  \begin{document} \subinputfrom{../group}{refman_doc} \end{document}  group__group2.tex \hypertarget{group__group2}{}{The Second Group}  refman_doc.tex {Module Documentation} \include{group__group2}  When running in the directory main the command pdflatex manual.tex I get the error: ... (../group/../group/refman_doc.tex [1{C:/Users/User/AppData/Local/MiKTeX/2.9/pdf tex/config/pdftex.map}] ! I can't write on file `../group//group__group2.aux'. \@include ...mmediate \openout \@partaux &quot;#1.aux&quot;                                                   \immediate \write \@partau... l.2 \include{group__group2}  Please type another output file name:  but in a non interactive mode (the usual way to run. i.e. with \batchmode) one doesn't get an opportunity to specify the file and the generation crashes. As written in the original question adding options like -shell-escape and / or -enable-write18 didn't help.  Is there a solution for this problem?  edit 2 I did some further test. I replaced the \subinputfrom with an \input statement, although this worked for the limited example above it didn't work for my larger codebase as here (again just a limited view) we have in the refman_doc.tex {Module Documentation} \input{group__group1} \include{group__group2}  with the contents of group_group1.tex similar to group__group2.tex and the file is also parallel to group__group2.tex. This results in the error: (manual.out) (manual.out) (../group/refman_doc.tex  ! LaTeX Error: File `group__group1.tex' not found.  Type X to quit or &lt;RETURN&gt; to proceed, or enter new name. (Default extension: tex)  Enter file name: ! Emergency stop. &lt;read *&gt;  l.2 \input{group__group1}  !  ==&gt; Fatal error occurred, no output PDF file produced! Regular expression to match balanced parentheses I need a regular expression to select all the text between two outer brackets.  Example: some text(text here(possible text)text(possible text(more text)))end text  Result: (text here(possible text)text(possible text(more text))) PDF of product of variables Could anyone please indicate a general strategy (if there is any) to get the PDF (or CDF) of the  product of two random variables, each having known distributions and limits?   My particular need is the following: Let $w :=u \cdot v$. The PDF of $u$ is $$\frac{1}{\pi u}\frac{1}{\sqrt{u^2-0.25}},$$ for $z&gt;0.5$ and the PDF of $v$ is $$\exp\left(-\frac{v}{v_0}\right),$$ for $v_1&lt;v&lt;v_2$. What's the PDF of $w$? How to search for email of a particular date from years ago in Gmail There are similar questions and several answers. I tried to follow the methods provided in the answers.  They did not work. So I am going to ask it again with more specifics.  I only knew the date of the email in the in-box in 2012 and the content of it but did not know the exact wording of the subject. Is it possible to find this email? Space between 2 paths in Illustrator How can I align 2 paths perfectly? No matter what I do I get a little space (gap between the 2 paths I create, and they are straight lines not as I saw in other questions with pixel problems)  An example:    Between every triangle is a little space, like in the example. It isn't obvious and it doesn't bother, but if I use the image (as an SVG or something) it is really obvious. Question 1: Why are irrational numbers uncountable and rationals countable?  I really struggle to understand this. I initially thought it had something to with the fact that between any two numbers there will always be a irrational number. But now it has come to my attention that the same holds for rational numbers. So I can't really see the difference between them. What is it that makes the difference? Why can we line up all rational numbers one-to-one with the natural numbers, but not the irrationals with the naturals?  Sorry for a perhaps basic question, but I really, really struggle with it. Thanks. Understanding the length extension attack I have been trying to understand exactly how a length extension attack works on SHA-1. I'll detail below what I've understood so far, so that I can convey my understanding of the same and hopefully get advice on where I'm going wrong.  Lets assume that for a message $m$, a secret $s$ is appended to it and the SHA-1 hash is calculated. If $\textrm{len}(m) + \textrm{len}(s)$ is not a multiple of the block size, a certain amount of padding is added to it to make it a multiple, and the hash is generated using what is essentially $s || m || \textrm{padding}$.  Now SHA-1 internally uses 5 registers — it takes in an block, generates new register values, turns the crank, takes in another block, generates new register values, turns the crank ... and so on till the end. When all blocks are exhausted, the register values are concatenated and spit out.  Assume that an attacker knows a certain value of $m$, for which he also knows the hashed key. In such a case, he knows the state of the 5 registers when $(s || m || \textrm{padding}$ was processed. Lets also assume that the attacker knows the length of $s$, so that he can predict how much padding was added.  Here is where I get confused. From what I've read so far, the attack involves taking the known hash, adding a certain amount of padding and then the value that we want. However, isn't the padding already used up in creating the hash? Why are we using padding in our attack? sudo apt update always giving Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) I am using ECIES (Cryptobox as poncho pointed out) for public key encryption with ECC between Alice and Bob with secret/public keys $(a,A)$ and $(b,B)$ respectively. So Alice encrypts to Bob with  $$ Encrypt(aB,Message) $$  Additionally I would like to encrypt some of Alice's data such that only she can decrypt it. Is it safe to use ECIES to compute a shared secret from Alice's secret and public key as in  $$ Encrypt(aA,Message) $$  I know I could randomly generate a public key, but then I would have to store this key somewhere which I would like to avoid. I am trying to get a better feel for the topology of ordinals and just received a great answer to this  where the Cantor-Bendixson rank and degree turn out to be a complete homeomorphism invariant of countable compact spaces. Now I am curious about what is going on within homeomorphism classes of ordinals. In particular, I want to know how to characterize countable ordinals $\alpha$ which are minimal among all ordinals homeomorphic to $\alpha$.   Certainly finite ordinals and $\omega$ are easy. Next, if $\alpha\cong \omega+1$, then it seems like we would have to have $\omega+1\leq \alpha&lt;\omega +\omega$ since there can only be one limit point in $\alpha$. Things become a little fuzzier for me with ordinals that have infinitely many limit points.  For instance, suppose $\alpha$ is an ordinal homeomorphic to $\omega^{\omega}$. Is it necessarily true that $\alpha\geq \omega^{\omega}$? Is there a general rule for knowing when an ordinal is the smallest among all ordinals homeomorphic to it? Is the set of all possible binary strings countable? Determine whether the given sets are countable or uncountable. Justify your answers either with bijections or using results/methods. The set of all possible binary strings. Note a binary string is a sequence of 0s and 1s.  If a binary string consists only of 0s and 1s, then is it even possible to find a bijection for it? Secretary problem - why is the optimal solution optimal? I have read about this problem:    But I want to see how it is proven that the "optimal" solution is indeed optimal. I understand how to prove that if the optimal solution is of the form "wait for $t$ candidates and then choose the next best one" then $t=n/e$ is optimal; but why is the best strategy of that form in the first place?  A complete proof is not required - a reference to a good text discussing this is good as well. From :     Importantly, the DDH assumption does not hold in the multiplicative group $\mathbb {Z} _{p}^{*}$, where $p$ is prime. This is because given $g^{a}$ and $g^{b}$, one can efficiently compute the Legendre symbol of $g^{ab}$, giving a successful method to distinguish $g^{ab}$ from a random group element.   The only way I can think of to distinguish $g^c$ from $g^{ab}$ is:    If $\left(\frac{g}{p}\right)=-1$, then $\left(\frac{g^{ab}}{p}\right) = 1$ if and only if $a$ or $b$ is even (which is $3/4$ of the times). So if $\left(\frac{g^c}{p}\right) =-1$, probably $g^c\neq g^{ab}$. Nothing is certain.   How'd do you compute $\left(\frac{g^{ab}}{p}\right)$ given $g^a$ and $g^b$?