Two items may be unequal in many ways. Can python tell what is the reason?  For example: 5 is not 6, int(5) is not float(5), "5" is not "5 ", ...    Edit: I did not ask what kinds of equality test there are, but why and how those are not equal. I think my question is not duplicate.
My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?
Within, between or overall R-square for random effects in Stata Consider a stochastic process $\{X_t, t = 1, 2, \ldots\}$ following the model $$X_t = \alpha X_{t-1} + e_t,$$ where $e_t \thicksim f$.  Can I say that the distribution of the initial point, $X_1$, is the same as $f$? Can I say that the stationary marginal density, if it exists, of $\{X_t\}$ is same as $X_2 (\stackrel{D}{=}\alpha X_1 + e_2)$?  I think that the stationary marginal density, if it exists, of $\{X_t\}$ is the same as $X_2$, but not necessarily same as $X_1$. Smart guides aren't smart TL:DR Smart guides aren't accurate - even though the snap, (end up causing more problems in the long run) is there a way to fix it?  Maybe there are some settings that I'm missing (need to be changed)    I use my smart guides all the time (and am overall pleased with them). I do have my issues with it, as explained here:  A lot of times, when I'm trying to make a bunch of triangles like this:    Done by making a triangle, cloning, flipping, rotating etc. Repeat until full  (Perfect) Snapping using Smart Guides    Ends up looking likebetween the triangles (Outline Mode)    Now I personally (with a strong attention to detail) will notice that there is something off after making just 1 or 2 triangles (Even before outline mode... strokes look oh so slightly thicker/off)   And then I check in outline mode... and sure enough:    Notice the line spaces (and this is in outline mode, so if I didn't notice it before, now it's sitting right in front of my nose)  The way I (seemingly) "fixed" the first image was by adding in a thick stroke outline so that masks out the difference, however, in a lot of my cases I don't want to have a stroke at all (and then you really notice the problems). What is dependency injection? There have been several questions already posted with specific questions about , such as when to use it and what frameworks are there for it. However,  What is dependency injection and when/why should or shouldn't it be used? Do not hide VLQ flag option from users who already flagged and may wish to retract Is it better in C++ to pass by value or pass by constant reference?  I am wondering which is better practice.  I realize that pass by constant reference should provide for better performance in the program because you are not making a copy of the variable. $d = \gcd(c,m),\ ac≡bc\pmod{\! m}\Rightarrow a≡b\pmod {\!m/d}\ $ [Congruence Cancellation & Division Rule] How would you show that if $ac≡bc$ $\mod m$ and $\gcd(c,m)=d$, then  $a≡b$ $\mod \frac{m}{d}$?  Any help would be much appreciated! How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control? I used to use  to remap Right Alt to Right Control (as an Emacs user I use Control MUCH more that Alt) but updating to Sierra broke this.  Downgrading is not an option.  How do I manually remap keys in Sierra?  I specifically would like to remap Right Alt to Right Control. Retail boxed Steam activated games: can they be resold? I recently purchased retail boxed versions of   Dead Island (which is awesome) Warhammer 40k: Space Marine (not so much)   I finished both games and I was thinking of reselling them or giving them to a friend to play. However, these are both Steam activated games that had a required Steam registration code I had to enter -- and validate on Steam -- as part of the installation.  If I give these games to a friend or resell them, will they even work? Is the registration code single use and tied to a single person / computer / Steam account? Do professors get paid for supervising students? Let $A$ be a commutative ring with $1$. Let $I$ and $J_k$, $k=1,\dots,n$ be ideals of $A$ with $I\subseteq \cup _{k=1}^n J_k$. Then I have obtained the following:  (1) If $J_k$, $k=1,\dots,n$, are prime ideals, then there exists some $j$ such that $I\subseteq J_j$.   (2) If $A$ is a principal ideal ring, then there exists some $j$ such that $I\subseteq J_j$.   I want some counterexamples that for all $k=1,\dots,n$, $I$ is not contained in $J_k$. How to get the counterexamples? Question title overlap in new design when title is longer Today I noticed that in new design view count is getting overlapped with question title on scifi.se for longer title:    But it's not site specific as same problem happen in Beta site too ( Hinduism.se):    That's why asked in main meta. R stem and leaf values As I understand this, firewalls (assuming default settings) deny all incoming traffic that has no prior corresponding outgoing traffic.  Based on  and , reverse SSH tunneling can be used to get around pesky firewall restrictions.  I would like to execute shell commands on a remote machine. The remote machine has its own firewall and is behind an additional firewall (router). It has an IP address like 192.168.1.126 (or something similar). I am not behind a firewall and I know the remote machine's IP address as seen from the Internet (not the 192.168.1.126 address). Additionally, I can ask someone to execute ssh (something) as root on the remote machine first.  Could anyone explain me, step by step, how reverse SSH tunneling works to get around the firewalls (local and remote machines' firewalls and the additional firewall between them)?  What is the role of the switches (-R, -f, -L, -N)? How do you calculate the likelihood of drawing certain cards in your opening hand? In Magic, at the start of the game, you draw 7 cards. How would you calculate the likelihood of drawing a specific card in your opening hand?  For example, let's say I have a 60 card deck, and I'm running 4 . What is the percent chance that I will have at least one Bird in my opening hand? biblatex in a nutshell (for beginners) Is there a 'biblatex in a nutshell' guide out there? I'd like if someone explained to me the essentials on how to use biblatex (what lines I have to write in my document, which files I have to have, how many times and what I have to compile), so then I can go to  to customise it further. We have a few cases of chat accounts remaining without valid parent account:  and  for example. What should mods do when that happens:  delete the chat account notify the SE team so they can reattach or clean it up leave it as is: it's a normal situation Do questions about specific StackOverflow implementation details belong on SO or Meta? has several discussion comments going back and forth about whether the question belongs on SO or Meta.  The question is asking about how a specific feature of the site is implemented from a coding perspective (so that the OP might duplicate it in their own implementation), which can make it a legitimate programming question.  According to the Meta FAQ: "If your "question is about ... Stack Overflow / The core Stack Exchange engine", it should be asked here.  Here are some similar example questions on Meta:         Where do these questions belong? I have a data frame in python where I need to find all categorical variables. Checking the type of the column doesn't always work because int type can also be categorical.   So I seek help in finding the right hypothesis test method to identify if a column is categorical or not.   I was trying below chi-square test but I am not sure if this is good enough  import numpy as np data = np.random.randint(0,5,100) import scipy.stats as ss ss.chisquare(data)   Please advise. Let $n \geq 1$ be an odd integer. Show that $D_{2n}\cong \mathbb{Z}_2 \times D_n$. Let $n \geq 1$ be an odd integer. Show that $D_{2n}\cong \mathbb{Z}_2 \times D_n$. I define a map $$\phi:D_{2n} \rightarrow \mathbb{Z}_2 \times D_n$$ by $R \mapsto (0,r^{\frac{n+1}{2}})$ and $M \mapsto(1,m)$. Then I am stuck at showing the map is bijective. By the way, do we need to show that $(0,r^{\frac{n+1}{2}})(1,m)(0,r^{\frac{n+1}{2}})^{-1}=(1,m)$ ? If we can prove this, then what can we conclude?