SyntaxError: EOL while scanning string literal while doing string interpolation for file names I am trying to write the following line for a function:     a.to_csv(&quot;~\Desktop\&quot; + file.split('\\')[-1])  but I get SyntaxError: EOL while scanning string literal  I also tried an f string: a.to_csv(f&quot;~\Desktop\{file.split('\\')[-1]}&quot;)  but I get SyntaxError: f-string expression part cannot include a backslash  I didn't think this would be such a problem, any help would be appreciated. I am trying to extract the file name part of a path.
"EOL while scanning single-quoted string"? (backslash in string) import os xp1 = "\Documents and Settings\" xp2 = os.getenv("USERNAME") print xp1+xp2   Gives me error   File "1.py", line 2  xp1 = "\Documents and Settings\"                                ^ SyntaxError: EOL while scannning single-quoted string   Can you help me please, do you see the problem?
If replicators allowed humans to stop working, why were replicators shut down in the Voyager? What special characters must be escaped in regular expressions? How to show bibliography alphabetically with biblatex? How do I properly access Windows software RAID 0? I am a new Ubuntu user with a fresh installation, and am eager to get started with it. However, all of my important data is on Windows software RAID 0 array, and I need it to stay there as I'm also dual booting Windows. I need access to this data on Ubuntu, and can't really get anything real done until I have access.  I have already researched this subject as best as I could, and I managed to find a very helpful post:      The post describes how to get Ubuntu to see a Windows RAID 0 array that is made up of two drives. The main command used is sudo mdadm --build /dev/md0 --chunk=64 --level=0 --raid-devices=2 /dev/sdd2 /dev/sdc2. According to that user, and the other posters in the thread, it actually does work. That's great.  I have not tried following these instructions yet. Why? The post includes a warning about how you must not write to it if you enter the wrong chunk size; it's understandable how that could cause problems. My concern is that my setup is different to their example, and I am not sure that the commands should be entered exactly the same for my setup. I am afraid to break it by doing it wrong, and therefore wish to get the advice of somebody more experienced.  This is how my setup differs from their example:   I have three 1 TB drives, not two drives (of whatever size they used). I have two RAID 0 partitions spread across those three drives: one 500 GB and 2.3 TB. This means that I need to NOT use the full disks when creating the RAID array, but instead use just part of them. I used a non-default block size for at least one of my RAID 0 partitions when I set them up years ago. I have no idea if this block size is the same as the chunk size that they mention. My 500 GB partition has a block size of 4 kb (4096 bytes per cluster), and my 2.3 TB partition has a block size of 64 kb (65536 bytes per cluster).   The relevant output from sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL (for just those three RAID0 drives) is:  NAME   FSTYPE   SIZE MOUNTPOINT            LABEL sdb           931.5G             ├─sdb1            1M             ├─sdb2          127M             └─sdb3        931.4G             sdc           931.5G             ├─sdc1            1M             ├─sdc2          127M             └─sdc3        931.4G             sdd           931.5G             ├─sdd1        166.7G             └─sdd2        764.7G    The relevant output from cat /proc/partitions (for just those three RAID0 drives) is:  8       16  976762584 sdb 8       17       1024 sdb1 8       18     130048 sdb2 8       19  976631478 sdb3 8       32  976762584 sdc 8       33       1024 sdc1 8       34     130048 sdc2 8       35  976631478 sdc3 8       48  976762584 sdd 8       49  174763008 sdd1 8       50  801865728 sdd2   The "Disks" program in Ubuntu displays the following partitions for my drives:  /dev/sdb:   GUID Partition Table . /dev/sdb1:  1.0 MB, Microsoft LDM metadata. /dev/sdb2:  133 MB, Microsoft Reserved. /dev/sdb3:  1.0 TB, Microsoft LDM data. /dev/sdc:   GUID Partition Table partitioning. /dev/sdc1:  1.0 MB, Microsoft LDM metadata. /dev/sdc2:  133 MB, Microsoft Reserved. /dev/sdc3:  1.0 TB, Microsoft LDM data. /dev/sdd:   Master Boot Record partitioning. /dev/sdd1:  179 GB, Unknown. /dev/sdd2:  821 GB, Unknown. /dev/sdd:   136 MB, Unallocated space.   I hope I've provided enough information here. So now, my question is this: what is the proper command for me to enter with my setup, so that I can access both of my Windows RAID 0 partitions from Ubuntu?  Thank you very much in advance. I have a problem. I am going to make a minecraft animation in blender. But when I put a minecraft texture on a 3d cube that is 16x16x16 it is very low resolution is there a way to get the texture in a better resolution or is there a way to make blender make the texture better?  I hope you have an answer. Thanks in advance Integrating $\int^2_{-2}\frac{x^2}{1+5^x}$ $$\int^2_{-2}\frac{x^2}{1+5^x}$$  How do I start to integrate this?  I know the basics and tried substituting $5^x$ by $u$ where by changing the base of logarithm I get $\frac{\ln(u)}{\ln 5}=x$, but I got stuck.  Any hints would suffice preferably in the original question and not after my substitution.  (And also using the basic definite integrals property.)  Now I know only basic integration, that is restricted to high school, so would prefer answer in terms of that level. prove that $\operatorname{lcm}(n,m) = nm/\gcd(n,m)$ I'm trying to prove that $\operatorname{lcm}(n,m) = nm/\gcd(n,m)$ I showed that both $n,m$ divides $nm/\gcd(n,m)$  but I can't prove that it is the smallest number.  Any help will be appreciated. When the external resistor increases in temperature, why is the calculated value for internal resistance higher? Say we had a circuit with a cell (with internal resistance)and an external resistor of $10 \Omega$ as shown:  The $10\Omega$ resistor then increases in temperature, leading to an increase in resistance in this resistor. My thinking was that since $10 \Omega$ resistor now has a value higher than $10\Omega$, more voltage drops across this resistor. Since your emf is constant, less voltage must drop across the internal resistor. Less voltage drop means less resistance. Where is the flaw in my logic? I don't understand philosophy very well, and so I am wondering whether you can "prove" anything in philosophy. It always seems you can go a layer down, and find another question, almost endlessly until you get to the question of "why/how/are we here?"  Can you prove, absolutely, and 100% that something is true, in the field of philosophy? nginx: Redirect https traffic without subdomain to subdomain (non-www to www) My current ssl certificate covers the subdomains www.example.com and static.example.com  So if a users try to access my site via  I want to redirect him to  .   How can I do that within in my nginx conf?  I know that similiar questions have been asked here, but I could not find the solution here. 90s (or earlier) Japanese anime movie: two planets at war, young man is in love with princess from the other planet, and floods his own village Is it safe to give out one's bank account number? I'm managing the utility of the house and I'm sharing with another person. He asks me to provide my bank account number, so that he can transfer his money to my account when paying the utility.    I wonder if it is safe to give out my bank account number?   For example, if I'm correct, many online payments just need the account number to draw money out of it. Is giving out the bank account number safer than handing a check to another person, since there is also the account number printed on the check? Heroes of Might and Magic VI seems to have installed a program called "Uplay", which it uses to launch (in addition to Steam, mind!)  What exactly is Uplay supposed to be? I notice that when I stop playing, it captchalogs the highlights of my past session (achievements earned, etc.) - which is kinda cool, but also kinda creepy and big-brotherish. Given that I value my privacy, is there anyway to play Uplay games without using Uplay?  Is this just Ubisoft's infamous "always-on" DRM? proving $\left(1+\frac 1n\right)^{n} = 1 + \sum_{k=1}^n \{\frac 1{k!}\prod_{r=0}^{k-1}(1-\frac rn)\}$ using the binomial theorem Is temperature a Lorentz invariant in relativity? Partial Sums of Geometric Series Execute script after specific delay using JavaScript Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for a specific amount of time)? Ubuntu 12.10 "Turn screen off when inactive for: Never" still turns off Mac-like alt-tab replacement for Windows 7? Is there an alt-tab replacement for Windows 7 that works in the same manner as command-tab and command-tick (tilde) on OS X?  Requirements:  1. Completely keyboard-shortcut-based, no mouse action should be necessary.  2. 2 keyboard shortcuts with the following behavior:  a.) alt+tab:       cycles through open applications (NOT windows... applications, meaning even if i have 10 firefox windows open, I only want to see firefox once in the list that comes up when i hit this shortcut)  b.) alt+`:     cycles through WINDOWS that are instances of the currently active application (meaning if firefox is my active window and i hit shortcut2, it will cycle through those 10 firefox windows, while ignoring any other windows from ANY other application).    Update 08:40 5/21: I tried out eidylon's suggestion, TopDesk.  It doesn't provide any of the functionality described here.  Other apps I've already tried:   VistaSwitcher Switcher Dexpot (awesome app, still using, but doesn't do what I want in this case... also looked for plugins but couldn't find one that does it) UltraMon Nvidia nView   update: Unfortunately I still haven't found a solution for this.  update: made this a community wiki in case anyone is ever able to find a solution for this. What are reserved filenames for various platforms?