I am trying to import python files programmatically using importlib.  For instance, given a file "a/b/some_file.py", and given also there are no __init__.py files in any of those directories (nor can I add them), what is the best way to import it?  What I tried doesn't seem like it's correct: (After lunching the prompt from "a"'a parent directory and adding it to the path)   &gt;&gt;&gt; importlib.import_module('a.b.some_file') ImportError: No module named a.b.some_file   I also tried a relative import but the result is the same.
How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.
What is the function of the RNA primer in DNA replication? During DNA replication, RNA primase puts an RNA primer in the lagging strand. What is the function of this RNA primer? Why can't the enzymes put DNA fragments directly? What does the colon in Tikz coordinates mean? Assume that $0 &lt; a_n \leq 1$ and that $\sum a_n=\infty$. Is it true that  $$ \sum_{n \geq 1} \frac{a_n}{(a_1+\ldots+a_n)^2} &lt; \infty $$ ?  I think it is but I can't prove it. Of course if $a_n \geq \varepsilon$ for some $\varepsilon &gt; 0$ this is obvious.  Any idea? Thanks. Is there a way to make Git mark a file as conflicted? Excluding System admin from this validation rule I have the following validation rule ;  OR(      AND(         Upper(MailingCountry) &lt;&gt; 'UK',             NOT(ISBLANK(TEXT(UK_Email_Consent__c)))     ),      AND(        Upper(MailingCountry) = 'UK',          ISBLANK(TEXT(UK_Email_Consent__c))     ) )   I know to exclude system admins I need to include the following line   $Profile.Name &lt;&gt; "System Administrator"   In the validation rule above where do I add profile &lt;> system admin   Looking forward to your help   many thanks Prove $(x_1+.....+x_n)^2 \leq n(x_1^2 + .....+x_n^2)$ Prove that  $(x_1+\dots+x_n)^2 \leq n(x_1^2 + \dots+x_n^2)$  for all positive integers n and all real numbers $x_1,....,x_n$  I am attempting a proof by induction but wasn't sure if i need the Cauchy-Schwarz Inequality or perhaps another way other than induction to prove this.  Proof   $n=1$ true  assume true for $n=k$  Now for $n= k+1$  $(x_1 + \dots +x_k + x_{k+1})^2 \leq \dots$ Are Tolkien Elves taller or shorter than Men?  In general fantasy, elves are frequently smaller than humans. But I seem to recall that in Tolkien they aren't.  Based on How can I convert an std::string to a char* or a const char*? I have few friends.   I have a few friends.      I thought "few" means just one, two or even none. "A few" typically means more than two. However it seems to me some people say "few" when they really mean "a few", am I right? What is the difference between a framework and a library?   I always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a framework on the other hand as a collection of libraries centered on a particular methodology (i.e. MVC) and which covers all areas of application development. If I want to shoot darker shots, is it better to increase the lighting and then darken in post to retain clarity? I'm just getting started - in my last shoot, I was using a 6D with a 50mm/1.4.  In low light, the pictures looked fantastic on the viewfinder but on the computer screen, appeared extremely grainy.  For future shoots, if I want to achieve something like this:     Should I shoot with way more light / lower ISO to retain clarity, and then just darken in post?  What kind of setup would be needed to achieve the above?    With my setup -   Camera Canon EOS 6D  Lens EF50mm f/1.4 USM  Focal Length 50mm  Shutter Speed 1/40 s  Aperture f/1.8  ISO/Film 6400  I was getting very grainy results that I had to soften in post (in case you want to see my attempts):      Any tips would be much appreciated. Duplicate id in list My service is working fine for single record insert when i send bulk records at that time it showing soapenv:ClientSystem.ListException: Duplicate id in list: 01ti0000002gUP1AAM Class.Sample.behaviourOfWebService: line 235, column 1  the error line is Database.upsert(pList)     p.productCode = pCode;    p.name =pName;    pList.add(p);  } How do I evaluate these fork() calls with the && and || operators in C? Turning a cipher into a hashing function Can a multiclass character with 1 level of wizard copy any wizard spell they find into their spellbook? The &quot;Your Spellbook&quot; sidebar for the wizard includes the following line:  Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it.  Does this mean that a Wizard 1/Cleric 19 can copy any wizard spell they find into their spellbook? Is there anything preventing them from casting these spells? Apache reverse proxy error page when proxied server is down I am using Apache2 as a reverse proxy for tomcat, my configuration being something like:  ProxyRequests Off  ProxyPass        / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/   My question is: can I configure Apache to show up a courtesy page (an "under construction" HTML static page) whenever Tomcat is down? How should I deal with becoming discouraged as a graduate student? I am a third year (starting fourth year in the fall) PhD student in mathematics. I've passed all qualifying exams and am currently doing research. As far as I can tell, I am not doing poorly. I have the good fortune of having a great advisor, being in a very supportive department, and having friends and family who genuinely care about my success.   The fact is research is hard. It appears to consist primarily of staring at a problem for days and days and days without getting anywhere. Sometimes, rarely, I do figure something out and that feels wonderful, but the overwhelming majority of my time appears to be spent banging my head against a mostly figurative wall. I am not complaining about the material being hard, and I am not averse to putting in hard work, but I get frequently discouraged when I realize the vast volumes of mathematics that I yet know nothing about (and probably never will). It's very hard to quantify progress - in particular, there are too few tangible returns after too many hours worked. I find myself thinking along the lines of "Oh, if only someone actually smart were thinking about this problem they would have solved it in moments" and so on.   I've talked about this to some number of people; here is some advice I have received:   Take a day off. Putting in hours upon hours of trying things doesn't magically lead to a solution, particularly if the brain is tired and just wants to sleep. Have a hobby. Since math research doesn't exactly provide instant gratification, a hobby might provide some instead.  Talk to other graduate students. Realize that many graduate students go through this.   I'm interested to know how other folks have dealt with being discouraged as a graduate student. Does it get better with time and experience? Is this a sign that research is not for me and that I should seriously consider a life outside academia? So I recently saw add comment (requires 50 reputation) on a deleted answer. After looking around a bit, it seems to be on all deleted posts now (only deleted posts, normal posts still say just add comment).  I'm sure it wasn't there before (I think it just said add comment (unclickable) or possible nothing).  It is also on , presumably the root cause is the same.  And yes, I do have more than 50 reputation (in case anyone was wondering).  Just to clarify, requires 50 reputation obviously shouldn't be there for users with 50 or more reputation. Choices:   Display nothing Unclickable add comment - probably not ideal Unclickable add comment (disabled for deleted posts) or something along those lines   FYI - You may be somewhat confused right about now if you can't  yet. What were Luke's lessons? Luke tells Rey that      there are three lessons he will teach her as he trains her as a Jedi   What are the lessons? How do you find time period as a function of time for a simple pendulum that is in the form of a hollow sphere that is filled with mercury and there is a hole in the bottom through which the mercury is constantly falling at a fixed rate? I tried creating a function for the time period to check how it varies with the mass of mercury, but I had too many variables.   EDIT: This question was a concept based multiple choice question in my homework book. The option were time period becomes erratic, time period increases, time period decreases, time period first increases then decreases.