I need to check a string is a valid SHA1 string, like    '418c1f073782a1c855890971ff18794f7a298f6d'   I didn't know the rules for that, for example whether a number and a letter is a must? or how many number or letters are minimum?  Could anybody advise any regex for matching in python?
I'm trying to match SHA1's in generic text with a regular expression.  Ideally I want to avoid matching words.   It's safe to say that full SHA1's have a distinctive pattern (they're long and a consistent length) - so I can match these reliably - but what about abbreviated SHA1's?  Can I rely on the presence of numbers?  Looking at the SHA1's in my commit log - numbers always appear in the first 3 characters. But is this too short? How many characters of SHA1 do I need to consider before I can assume a number would have appeared?    This does not have to be 100% accurate - I just need to match an abbreviated SHA1 99% of the time.
Why is the empty set considered an interval? Can you be sued for using publicly used images on a blog without copyright permission? How does a non-mathematician go about publishing a proof in a way that ensures it to be up to the mathematical community's standards? I'm a computer science student who is a maths hobbyist. I'm convinced that I've proven a major conjecture. The problem lies in that I've never published anything before and am not a mathematician by profession. Knowing full well that my proof may be fallacious, erroneous, or simply lacking mathematical formality, what advice would you give me? How to get Intel Dual Band Wireless-AC 3168 work on Ubuntu 16.04? How do I redirect to another webpage? How can I redirect the user from one page to another using jQuery or pure JavaScript? Set same icon for all my Forms Is there any way to set the same icon to all my forms without having to change one by one? Something like when you setup GlobalAssemblyInfo for all your projects inside your solution. Send mail without MFMailComposeViewController May someone help me? I am trying to use induction to prove that the formula for finding the $n$-th term of the Fibonacci sequence is:   $$F_n=\frac{1}{\sqrt{5}}⋅\left(\frac{1+\sqrt{5}}{2}\right)^n-\frac{1}{\sqrt{5}}⋅\left(\frac{1-\sqrt{5}}{2}\right)^n.$$  I tried to put $n=1$ into the equation and prove that if $n=1$ works then $n=2$ works and it should work for any number, but it didn't work. I need to prove that this formula gives the $n$th Fibonacci number. How do you collect valuable information from regular "User Group" meetings? The scenario:   You work on a SaAS application.  Some of your users use your application heavily each day. Every 2 weeks (or month or whatever), a "User Group" of your most avid users gets together to talk shop and see how their progress is going in the context of a larger project they are working on. You can participate and potentially direct some group activities aimed at improving the application.   How do you gather valuable user information in this group setting? On SO, when I'm scrolling through "questions" some have a yellow background.  Is this intuitive to everyone but me?  What is the yellow background trying to tell me about this particular question? I'm trying to find the probability of getting 8 trials in a row correct in a block of 25 trials, you have 8 total blocks (of 25 trials) to get 8 trials correct in a row. The probability of getting any trial correct based on guessing is 1/3, after getting 8 in a row correct the blocks will end (so getting more than 8 in a row correct is technically not possible). How would I go about finding the probability of this occurring? I've been thinking along the lines of using (1/3)^8 as the probability of getting 8 in a row correct, there are 17 possible chances to get 8 in a row in a block of 25 trials, if I multiply 17 possibilities * 8 blocks I get 136, would 1-(1-(1/3)^8)^136 give me the likelihood of getting 8 in a row correct in this situation or am I missing something fundamental here? Can I levitate an object without using an electromagnet? When a user who approved an edit is removed, an incorrect "-2 reverted" event appears in reputation history I am aware that . But now there is an extraneous "reverted" event to go along with user removal:     Source: .   The edit was not reverted, it's . In any case, I should not lose 2 points twice for the total of -4. And indeed, my reputation only dropped from 131 to 129 despite what the history suggests.   So the line with "-2 reverted" is a bug.     A more extreme example:  got 21 "reverted" events on 2017-06-30, none of which should be there. His rep loss is 42, not 84 as the reputation history says. When customers buy things from a store, you say:  (1) Customers give ABC Store business.  If I "turn this around", can I say:  (2) ABC Store obtains or acquires business from its customers.  Do these verbs work in (2)? Top angular speed of electric motor I recently came across a question asking the following:     If a motor is switched on, it quickly reaches a top speed. Why does it not just go faster and faster and faster?   I thought it might be related to the fact that the electrical power is constant, so I tried approaching with $P=\tau \cdot \omega$. However I still do not have any clue to reaching the conclusion.  Is it somehow related to the energy loss (due to friction)? Like the terminal speed of a parachute or something? But I was thinking that friction should be constant ($f=\mu \cdot N$) while air drag is related to the speed, so this may not be the answer.  Thank you. How to prove Fibonacci sequence with matrices? If I have a sequence of .obj (or any other readable format) files created from my own simulation code (say cloth simulation), can I use the rendering capabilities of blender to generate a video?   Is there a way to set the material properties for frame 1 and use the same or rest of the frames while the corresponding meshes are imported afresh from that ones I provide? Add an API key to QGIS for QOSM layer What is the name of this castle part? Attending graduate school at my undergraduate university I've been told by numerous people that (1) my undergraduate university will be disinclined to bring me on as a graduate student, and that (2) it's a bad idea to attend grad school where you completed your undergraduate degree, anyway.  Is that true? If so, why?