Currently have the following scheme, where I have designated a package named /source, which contains a python file, get.py, that pulls data from the internet and generates a series of text files that is stored in a directory called /txt and returns data in a data structure  final.py can either:  1) import source, and make a call to get.py which would return the content of the text files stored in a data structure. get.py() also writes the contents of the data structure to /text/*.txt  2) retrieve /source/text/data.txt without a call to get.py, which should have equivalent behavior, but the information is from a previous call to get.py (off-line mode)  final.py /source     __init__.py     get.py #returns a data structure and writes to /text/data.txt         /text             data.txt             data1.txt             data2.txt   While this is all well and good, I can't help but think I am violating some important abstraction rules, mainly I am retrieving /source/text/data.txt without ever having to import the source package. And if this is the case, why create packages with init.py at all? How should a python package with the above scheme be organized?
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?  Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install packages.  In particular:   Where do you put the source? Where do you put application startup scripts? Where do you put the IDE project cruft? Where do you put the unit/acceptance tests? Where do you put non-Python data such as config files? Where do you put non-Python sources such as C++ for pyd/so binary extension modules?
Can I use a 23 W CFL in a fixture that's rated for a 60 W incandescent? I have a lamp that is rated at 60 Watts for an incandescent bulb with a disclaimer to use a 13 Watt bulb instead when using a CFL replacement. Do I really need to respect that disclaimer? Would not a 23 Watt CFL be just as safe to use? It still draws less power than a 60 Watt incandescent, right? I have a Beamer presentation with note pages, in which everything renders just fine with pdflatex.   However, when the file is compiled using xelatex (I need to use fontspec), texts in frames after a note page are not visible -- they are rendered in white colour. This problem is reproducible when using Beamer v3.33.  %% Compile with xelatex \documentclass[handout]{beamer}  \mode&lt;handout&gt; { \setbeameroption{show notes} \RequirePackage{pgfpages} \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm] }  \begin{document} \begin{frame} A test, A test! \note{ } \end{frame}      \begin{frame} This text does not appear! \note{ } \end{frame} \end{document}   While this problem can be solved by compiling with lualatex, I'm wondering if there's any thing one can do to make it work for xelatex? Merge some tab-delimited files How do I find this conditional expectation? Check if partition is encrypted How many arrangement of the letters in MISSISSIPPI have at least 2 adjacent S's?  I was thinking that I can glue two of the S's together, so there will be 9 letters plus the special letter SS, and the number of arrangements will be $10!/(2!2!4!)$, this is not the correct answer, but what is wrong with my reasoning.  (the correct answer is $11!/(4!4!2!)-7!/(4!2!)\binom{8}{4}$, I understand the solution) How to auto populate with conditions? I added a user account to the admin group and discovered I added wrong user. So I now have to remove the account from the admin group.   How can I remove an account from a group without deleting the user? To my amazement I just discovered that the C99 stdint.h is missing from MS Visual Studio 2003 upwards.  I'm sure they have their reasons, but does anyone know where I can download a copy?  Without this header I have no definitions for useful types such as uint32_t, etc. How is The Wall bypassed? In the first series of the TV show several things apparently bypass  to reach Winterfell:   The Night's Watch member  captured near Winterfell and executed by Ned. The Direwolf &amp; her pups found immediately after the execution  and the other Wildlings travelling with her   If The Wall is approximately the same along its length it would presumably be impassible. Is the only option for them to go around the western end (since it stops at the Shadow Tower)? Is this clarified in the book? Are other methods mentioned in subsequent books? Using Inclusion/Exclusion to solve $x_1+x_2+x_3=15$ with $x_1,x_2\leq 5$ and $x_3\leq 7$ for non negative integers $x_1,x_2,x_3$ I want to solve for:     Number of integers solutions to the equation $x_1+x_2+x_3=15$ with $x_1,x_2\leq 5$ and $x_3\leq 7$ for non negative integers $x_1,x_2,x_3$   How can this be done using the principle of inclusion/exclusion? I installed Ubuntu (twice actually) onto the same drive. I wanted to 'try again' since one of them didn't install correctly and the other installed differently, but it worked.   I was getting frustrated with the GRUB menu because it was really sloppy (There were two Windows options - one with the Windows bootloader to go into Ubuntu, and two different versions of Ubuntu from the first install for some reason and memtest, etc.).  In my attempts at getting rid Ubuntu to do a fresh installation, I went ahead and deleted the partitions that weren't swap or main via Windows 7. As I said, I am a noob.  Now, even though I though I completely got rid of Ubuntu, including the GRUB menu, when I boot my PC I am brought directly to GRUB Rescue. And from what I've found from other forums, GRUB rescue isn't even completely functional for me (it doesn't recognize any commands that it should support besides ls. It also returns unknown filesystem for any partition I try to view or boot.)  Is there any way that I can boot straight into Windows? I fear I may have gone about deleting those partitions in the wrong way. If so, what are my options? What is the formula for $\frac{1}{1\cdot 2}+\frac{1}{2\cdot 3}+\frac{1}{3\cdot 4}+\cdots +\frac{1}{n(n+1)}$ How can I find the formula for the following equation?  $$\frac{1}{1\cdot 2}+\frac{1}{2\cdot 3}+\frac{1}{3\cdot 4}+\cdots +\frac{1}{n(n+1)}$$  More importantly, how would you approach finding the formula? I have found that every time, the denominator number seems to go up by $n+2$, but that's about as far as I have been able to get:  $\frac12 + \frac16 + \frac1{12} + \frac1{20} + \frac1{30}...$ the denominator increases by $4,6,8,10,12,\ldots$ etc.  So how should I approach finding the formula? Thanks! Nominate for Reopening Shows Duplicate Message Boxes How to design partitions for SSHD? I'm going to install Linux on Lenovo B5400, which contains:   500GB Hybrid SSHD with a 8 GB SSD and 500 GB HDD   Designing partitions for my 2 Linux distros was quite easy before, when I had only HDD. I always had:   10GB for Linux distro (mounted as "/") 10GB for another distro (again "/"; for another distro; for testing purposes or to assure continuity when switching distros) 2GB for swap (used for both distros; no need to separate) 300GB+ for "/home" (used for both distros; different usernames eliminates possible conflicts)   It's simple, isn't it? I would like to keep this approach, but I know that SSD has its own specificity - it prefers to be read, continuous writing may affect its life span. I don't want to kill SSD in a year, so I would like to move some system partitions to HDD in order to protect SSD. As far as I know /tmp is one of often read&amp;written locations. How much space it needs? What else should be placed on HDD?  Or: how to design partitions to achieve exactly the same effect and to keep SSD as safe as possible?  I'd be grateful for your help. Calculate which day of the week a date falls in using modular arithmetic In  the main character (he is a mathematician) calculates the day of the week of someone's birthday (19/07/1992 is Sunday). I know (very) basic modular arithmetic but I can't figure out how to do it. Can someone point me to the right direction? It seems fun to do. In the Phone app (iPhone 5, iOS 6.1.2), I click on a contact's number, the call is initiated and starts ringing.   For a brief moment at this point, the label of the number (home / work / etc…) is displayed alongside the contact's name, but it quickly is removed and replaced with the call timer counting up and only the name (and picture of the contact) are shown.      How can I see the number that is being called during a phone call? Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop?  For instance, I currently do something like this depending on the circumstances:  int i = 0; foreach (Object o in collection) {     // ...     i++; } Equation of the locus of the foot of perpendicular from any focus upon any tangent to the ellipse ${x^2\over a^2}+{y^2\over b^2}=1$ Find the equation of the locus of the foot of perpendicular from any focus upon any tangent to the ellipse ${x^2\over a^2}+{y^2\over b^2}=1$. will it also be an ellipse? Discrepency in unanswered questions counts On , I notice that if I use the lower &quot;unanswered&quot; tab (the one in line with &quot;All Questions&quot;), the count is 1,432 questions. If I use the upper &quot;Unanswered&quot; tab (in line with the site title), I get 1,383 &quot;questions with no upvoted or accepted answers&quot;.  This changes the options in the lower tab, one of which is &quot;no answers&quot;.  Clicking here, I now get 1,083 &quot;questions with no answers&quot;. If I run select Id from Posts where PostTypeId=1 and AnswerCount=0;  in the , I get 1158 rows back. Which of these is correct, and why is the first one (1,432) so much higher than the others?  I understand that the numbers may only be updated periodically, but that difference in particular seems much too great for this to be the reason. To clarify:  1,432 is the number of &quot;unanswered questions&quot;. 1,383 is the number of &quot;questions with no upvoted or accepted answers&quot;. 1,083 is the number of &quot;questions with no answer&quot; 1,158 is the number of questions with no answer in the data explorer.  This is not live data, but that means it should be smaller, not larger, than 1,083.  I promise we did not offset this with answers to the tune of 80 questions this week.  The first three are obviously live because they fluctuate. The difference between the first two is ~50, implying they actually don't refer to the same thing, and the difference between the last two seems too great (and in the wrong direction) to be explained by the a live vs. data explorer source.