I want to add an alias to my ~/.bashrc such that when I use killp it kills the python process(es) that use GPU. I am not sure why neither of these commands work. I have sourced my bashrc using source ~/.bashrc command. How can I fix it? alias killp=&quot;lsof /dev/nvidia* | grep python333  | awk '{print $2}' | tail -1 | xargs kill -9&quot;  or alias killp=&quot;ps -aux | grep python | awk '{print $2}' | xargs kill -9&quot;  Here's an example of nvidia-smi output that shows a Python code using GPU: $ nvidia-smi Tue Jan 26 23:34:00 2021        +-----------------------------------------------------------------------------+ | NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |                               |                      |               MIG M. | |===============================+======================+======================| |   0  GeForce GTX 165...  Off  | 00000000:01:00.0 Off |                  N/A | | N/A   48C    P0    12W /  N/A |   1777MiB /  3911MiB |      8%      Default | |                               |                      |                  N/A | +-------------------------------+----------------------+----------------------+                                                                                 +-----------------------------------------------------------------------------+ | Processes:                                                                  | |  GPU   GI   CI        PID   Type   Process name                  GPU Memory | |        ID   ID                                                   Usage      | |=============================================================================| |    0   N/A  N/A      1114      G   /usr/lib/xorg/Xorg                133MiB | |    0   N/A  N/A      1730      G   /usr/lib/xorg/Xorg                759MiB | |    0   N/A  N/A      1920      G   /usr/bin/gnome-shell              122MiB | |    0   N/A  N/A      2289      G   ...gAAAAAAAAA --shared-files      162MiB | |    0   N/A  N/A      2621      G   /usr/lib/firefox/firefox            1MiB | |    0   N/A  N/A      2683      G   /usr/lib/firefox/firefox            1MiB | |    0   N/A  N/A      2887      G   /usr/lib/firefox/firefox            1MiB | |    0   N/A  N/A      3136      G   /opt/zoom/zoom                     17MiB | |    0   N/A  N/A      3854      G   ...f_3536.log --shared-files        2MiB | |    0   N/A  N/A      4423      G   /usr/lib/firefox/firefox            1MiB | |    0   N/A  N/A      6335      G   /usr/lib/firefox/firefox            1MiB | |    0   N/A  N/A      6899      G   /usr/lib/firefox/firefox            1MiB | |    0   N/A  N/A     19939      C   python3                           549MiB | +-----------------------------------------------------------------------------+
I want to add this iostat command to my .bashrc and create an alias for it: iostat -xk 2 $(findmnt -T ~ | awk 'END {print $2}')  I'm adding this to my .bashrc: alias ios='iostat -xk 2 $(findmnt -T ~ | awk 'END {print $2}')'  Unfortunately, it doesn't work. If I run the above iostat command in a terminal it works, but when I run the ios alias it no longer works. And yes, I restart my shell every time.
Reason for Subject-Verb Inversion: Only in cases where A is B, shall the Company do X Ubuntu installation is slow, why? I am currently installing Ubuntu 12.04.3. Everything was going fine until I came across this...     Installing System   It is sssooooooo close to being finished! Like 1/6 of the way there! I just wanted to know if this is normal or if something is wrong. I'm installing it through a flash drive if that helps   Also,what will happen if I press the skip button that pops up when I click Installing System? Central Pennsylvanian English speakers: what are the limitations on the "needs washed" construction? Can you win a game of Splendor if you still have cards in reserve? I've just installed Ubuntu on my Lenovo g460  with Windows 7. I am not able to play any movie or mp3 file. When I click on a file I'm asked to install a plugin. When I click on the install button nothing happens. I noticed that I have three warnings when I submitted my Sitemap. They all say this:      When we tested a sample of URLs from your Sitemap, we found that some   URLs redirect to other locations. We recommend that your Sitemap   contain URLs that point to the final destination (the redirect target)   instead of redirecting to another URL.   I'd like to try and resolve this issues but I'm not sure what to do.  Sitemap url for reference: Intuitive Understanding of the constant "$e$" In  (the original movie), Marty comes back from 1955 10 mins early to prevent Doc from being shot (which he fails at). He then rolls up to the Lone Pine Mall and sees himself hit 88 mph and shoot back to 1955 (again). Marty then carries on with this life as usual. What happens to the Marty that goes back to 1955 at the end of the film?  This obviously is a recursive problem where it would create another timeline and Marty would keep coming back 10 mins early to view another Marty zip back to 1955? I am trying to run Notepad as admin so I can edit my hosts file from the command line.  I have tried runas /user:(myusername)\administrator "notepad c:\windows\system32\drivers\etc\hosts" I then input my password and I get     RUNAS ERROR: Unable to run - notepad   c:\windows\system32\drivers\etc\hosts 1327: Account restrictions are   preventing this user from signing in. For example: blank pa sswords   aren't allowed, sign-in times are limited, or a policy restriction has   been enforc ed.   PS: I know if I give permission to my user account I can edit it without running as admin. But I'd like to know how to do this without having to change permissions on the hosts file. Getting the starting shortcut in c# LaTeX template for resume/curriculum vitae If you have a TeX'ed resume, did you use a template or make your own? Are there any useful packages? What looks the most professional? How about special considerations for different areas of work (e.g. in academia)? How can one change an entire document to use bold font? I see many posts in how to changes the font and font size, but none for changing the default font for a document to bold font. I believe this is called changing the font series. The approach in  (obtained by random Googling) looks like it should work, but doesn't do anything when I stick it in the preamble. Maybe I'm putting it in the wrong place.  \fontencoding{T1} \fontfamily{garamond} \fontseries{m} \fontshape{it} \fontsize{12}{15} \selectfont   There is also some discussion . Does $\lim\limits_{n\to\infty}\frac{a_{n+1}}{a_n}=1$ imply that $a_n$ convergent? Does the condition $\lim\limits_{n\to\infty}\frac{a_{n+1}}{a_n}=1$ imply that $a_n$ convergent?  When I say convergent I mean to $L\in \mathbb{R}$ or to $\infty$ or to $-\infty$  I have a gut feeling this statement is false, just can't find a series which contradicts it.  Thanks a lot How do I configure Nautilus to open at my Documents folder instead of my home folder?  I've scoured this site and found answers instructing users to edit the /usr/share/applications/nautilus.desktop file, replacing %U with the path to the desired default directory. I've edited all the variants of nautilus.desktop in the said directory, but none of the edits has an effect. I've checked all the files after editing them to make sure that I saved the edit effectively, and all look good to me.   I've edited every file to read as follows:  Exec=nautilus --new-window /home/judy/Documents   I've also edited the org.gnome.Nautilus.desktop file, just to be sure, with no joy.   I'm running Ubuntu 15.10.  Note: if I enter nautilus /home/judy/Documents from the command line, Nautilus properly opens in the desired directory.  Is there a simple way that I can configure an icon in the launcher bar to run this command and have the Nautilus icon that looks like a metal file drawer?  Thanks. I'm pulling my hair out over this one. How to get distance when acceleration is not constant? I have a background in calculus but don't really know anything about physics.  Forgive me if this is a really basic question.  The equation for distance of an accelerating object with constant acceleration is:  $$d=ut        +\frac{1}{2}at^2$$  which can also be expressed  $$d=\frac{\mathrm{d}x}{\mathrm{d}t}t+\frac{\mathrm{d^2}x}{\mathrm{d}t^2}\frac{t^2}{2}$$  (where x(t) is the position of the object at time t)  That's fine for a canonball or something like that, but what about a car accelerating from 0 to cruising speed?  The acceleration is obviously not constant, but what about the change in acceleration?  Is it constant?  I suspect not.  And then what about the change in the change of acceleration, etc. etc.?  In other words, how does one know how many additional terms to add in the series?  $$d=\frac{\mathrm{d}x}{\mathrm{d}t}t+\frac{\mathrm{d^2}x}{\mathrm{d}t^2}\frac{t^2}{2}+\frac{\mathrm{d^3}x}{\mathrm{d}t^3}\frac{t^3}{3}+\frac{\mathrm{d^4}x}{\mathrm{d}t^4}\frac{t^4}{4}\cdot etc. \cdot ?$$ Conky does not work properly on Ubuntu 16.04 GNOME I have this strange problem with conky. It doesn't show properly on the desktop:    I've tried everything from editing conky widget file to reinstalling conky and conky manager (v.2.4). Who knows how to fix it? Borel-Cantelli-related exercise: Show that $\sum_{n=1}^{\infty} p_n < 1 \implies \prod_{n=1}^{\infty} (1-p_n) \geq 1- S$. This is supposed to be related to the  (my justification for the independence tag). In Williams' Probability with Martingales, 2BCL is proven and then the following is given as an exercise:  Prove $S \doteq \sum_{n=1}^\infty p_n &lt; \infty \implies \prod_{n=1}^\infty (1-p_n) &gt; 0$ assuming $0 \leq p_n &lt; 1$. Hint: Show that $S &lt; 1 \implies \prod_{n=1}^\infty (1-p_n) \geq 1 - S$.   Proving the hint: I tried to find $\{a_n\}$ s.t. $$\prod_{n=1}^\infty (1-p_n) \geq \prod_{n=1}^\infty e^{a_n} = e^{\sum_{n=1}^\infty a_n} \geq 1 - \sum_{n=1}^\infty a_n \geq 1 - S &gt; 0$$ That is, find $\{a_n\}$ s.t.: 1a. $1 - p_n \geq e^{a_n}$ 1b. $a_n \leq p_n$ I thought of $a_n = \ln(1-p_n)$ (a reason why $p_n &lt; 1$, I guess) Is that right? Edit: Actually, assuming my proof is right, is $S &lt; 1$ used in the proof? If so, where?  From Williams book: Solve $\frac{d}{dx}f(x)=f(x-1)$ I am trying to find a function such that   $\dfrac{d}{dx}f(x)=f(x-1)$   Is there such function other than $0$ ? Is the "live" in "He only lived a few days after the accident" intrasitive or transitive? An example sentence from the :  [I] He only lived a few days after the accident.  [I] means &quot;intransitive verb&quot;. He (subject) + lived (verb) + a few days (noun). What part of speech is a few days? From the :  number 5  way of life[intransitive always + adverb/preposition, transitive] to have a particular type of life, or live in a particular way   used 'transitive verb' like 'She lives a very busy life.' From the ELU question :  She is 16 year old.  '16 years' as acting as an adverb. My questions are:  In &quot;He lived a few days.&quot;, is a few days an object (noun) or an adverb? How is it different from &quot;He lived for a few days.&quot;? &quot;I walked ten miles.&quot; Number + measurement — how can I deal with 'part of speech'? Why is a nonstop flight sometimes more expensive than multiple connections?