I was trying to set up my Mac to run custom Python scripts from anywhere without having to type python [script.py] or the explicit file path.   The script is called "testscript". I put the script in my own bin directory (separate from /usr/local/bin), called /User/Patrick/bin, and added it to my path so when I type echo $PATH it comes up correctly like so:   /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/User/patrick/bin:/usr/local/go/bin`.    I already added the line #!/usr/bin/env python to the top of the file, I already did chmod 700 testscript, but I still can't call testscript from anywhere. Have things changed since OSX Yosemite?
I have this directory /foo/bar/. Inside, I have a python file named myfile.py. I made it executable by adding (at the top):  #!/usr/bin/env python   Then, I made it executable by issuing   chmod +x myfile.py   I edited my path by issuing  sudo nano /etc/paths   I added /foo/bar/ to it.  The problem is that although I can run myfile.py by typing ./myfile.py while I am inside /foo/bar/, it doesn't work from any other location. What am I doing wrong?  Thank you.
Using the salesforce GUI it seams impossible to schedule a job every 15 minutes. Or more than once a day. How to download Bootcamp drivers without Bootcamp assistant? I'm setting up my MacBook Air for a Windows-only boot setup. This was easy enough. It already had rEFIt on it, I just connected a Windows 7 boot thumb drive, and away I went.  However, it seems Apple does not let you download Bootcamp drivers outside of their assistant tool. Reinstalling OS X just for the drivers is ridiculous.  This laptop no longer has OS X on it at all. How do I get the required drivers? I cannot find them anywhere on Apple's support pages.  Every other manufacturer has their drivers available for download.   How do I download the Windows drivers for my 2010 MacBook Air without the BootCamp Assistant? stl::multimap - how do i get groups of data? Multimap essentially has groups of data sorted by the key. I want a method by which I could access these individual groups and get their aggregate values. For example, in a std::multimap&lt; string, int &gt; I store   {"Group1", 1},  {"Group1", 2},  {"Group1", 3},   {"Group2", 10},  {"Group2", 11},  {"Group2", 12}   Having stored these values, I should be able to iterate this multimap and get the aggregate values of each "group". Problem is there aren't any functions defined in STL to access MultiMaps in such a way. I could use lower_bound, upper_bound to manually iterate the multimap and total the group's contents, but I am hoping there could be better ways already defined in STL ? Can anyone propose a solution as to how I could get the aggregate values for a group in the above example. Let $m,n$ be positive integers bigger than $1$. Show that $\mathbb{Z}_m \times \mathbb Z_n$ is cyclic if and only if $\gcd(m,n)=1$.    I have no idea on how to start. Anyone hints are much helpful. What's the right way to represent phone numbers? When does a dual of a compound proposition equal itself? So I am studying computer science and right now I am stuck on a problem.  When does s∗ = s, where s is a compound proposition?  So far the only thing I can come up with is:  s* = s when the compound proposition is composed only of the same           propositions. (ex. p ∧ p = p ∨ p)  The book defines duality as:  The dual of a compound proposition that contains only the logical operators ∨, ∧, and ¬ is the compound proposition obtained by replacing each ∨ by ∧, each ∧ by ∨, each T by F, and each F by T. The dual of s is denoted by s∗. (Discrete Mathematics and its Applications, Rosen, 7e)  Any help would be great, this is a tricky one. How can I copy location info from geotagged phone images to images taken with my other camera around the same time? So i did quite a big trip recently, and took lots of pictures with my DSLR and occasionally Android phone. Only after coming back did i read about the whole GPX file, tracklog options in Lightroom. meaning i don't have such a tracklog file.  The android phone did geotag most photos it took. (at least, when it got a gps fix i guess)  So my question is, is there some software or way that will automatically copy the geotag from the android's photos to photos taken on the same time with my DSLR?  Or alternatively, generate a tracklog from the geotagged data in the android pictures? Tikzcd conflict with babel and cd I have this problem: when I try to compile a diagram I get the following message:     I think the culprit is a tikzcd arrow in ell 1-1   But I have not problem when, in the tikzlibrary, I just use cd, matrix and backgrounds. The problem is when using babel and cd at the same time.  \documentclass{article} \usepackage{amsfonts,amssymb,amsmath,tikz} \usepackage[spanish]{babel} \usepackage[latin1]{inputenc} \usepackage[mathcal]{euscript}  \usetikzlibrary{babel,cd,matrix,backgrounds}  \begin{document} \begin{center}   \begin{tikzcd}     X\rar[mapsto]{T}&amp;Y   \end{tikzcd} \end{center}  \end{document} Ubuntu 18.04: switch back to /etc/network/interfaces Starting sometime around Ubuntu 18.04, the Ubuntu devs stopped using the classic /etc/init.d/networking and /etc/network/interfaces method of configuring the network and switched to some thing called . This has made a lot of people very angry and been widely regarded as a bad move. Is it possible to remove netplan and use the correct /etc/network/interfaces method for configuring the network? I'm trying to draw a rounded rectangle with round "holes" using  but I need the rectangle borders to be thick and "holes" borders to be thin. Is there a better way to do so than:  \begin{tikzpicture}[x=1mm, y=1mm]     % Background         \fill[fill=black!10] (1.5, 1.5) rectangle (15, -15);      % Fill     \fill[fill=black!2, even odd rule, rounded corners=0.5mm]          (0, 0) rectangle (10, -10)          (2, -2) circle[radius=1.25mm]         (2, -5) circle[radius=1.25mm];     % Rectangle border     \draw[thick, rounded corners=0.5mm] (0, 0) rectangle (10, -10);     % Holes borders     \draw[thin] (2, -2) circle (1.25mm);     \draw[thin] (2, -5) circle (1.25mm); \end{tikzpicture}   The result image should look like this: Python CSV parsing not returning proper rows Software implementations of random forest classifiers have a number of parameters to allow users to fine-tune the algorithm's behavior, including the number of trees $T$ in the forest. Is this a parameter that needs to be tuned, in the same way as $m$, the number of features to try at each split (what Leo Breiman calls mtry)? I just want to write \Sha without ruining everything I realize similar questions have been asked before but I am not satisfied with any of the answers I've seen. I would like to use the Cyrillic letter Ш to denote a particular group in mathematics. Most solutions involve using OT2 or T2A encoding; for example, at . However, this makes the other text in the document look bad.   For example, using the solution above, I get    while I would like to have     The first seems to be shaded strangely and the characters don't seem to align right.  Does anyone know how I can write the character Ш (in math mode) without changing the default font for the rest of the text? According to the special theory of relativity, distant simultaneity depends on the observer's reference frame.  And, according to the quantum theory, in the case of two entangled particles, a measure on one of the particles simultaneously affects the second one. Under which reference frame is this simultaneous? How can I lock a folder so that it CANNOT be erased? On my computer running Windows XP Pro SP3 I have a folder on my desktop that is very important. How can I lock it so that I can alter anything in it, but the folder itself cannot be removed without resetting a (lock/unlock?) switch? , Laser Interferometer Gravitational-Wave Observatory, is a large-scale physics experiment aiming to directly detect gravitational waves. The device measures the phase shift laser beams.  If I understand this well, the measurement assumes that a suitable gravitational wave reduces and prolongs one of the tubes and the extension will take effect in the phase-shifting laser beams.  But I think if there's a gravitational wave that passes through it, it will affect everything, even the laser beam. This means that when the wave lengthens or shortens the tube, it also lengthens or shortens the wavelength of the laser beam.  In my opinion, therefore, this device does not work. Or am I wrong? Generate a comma-separated list of cell contents, excluding blanks To concatenate a certain four cells, I'd use:  =CONCATENATE(A2,",",C2",",D2,",",F2)   This would make it so that...   A2 = "Matthew" C2 = "Mark" D2 = "Luke" F2 = "John"   would result in Matthew,Mark,Luke,John.  But we run into problems with something like...   A2 = "Jesus" C2 = "" D2 = "Mary" F2 = "Joseph"   which would result in Jesus,,Mary,Joseph.  Here, the extra comma is undesired. Is there a way to gracefully handle this so that all non-blank cells are included in the comma-separated list, while avoiding the addition of unnecessary commas when some cells are blank?  Certainly, this can be done with a fair number of nested IFs, but I really want to avoid that if possible. Can it be done with native Excel functions, or perhaps an array formula? Or would one have to resort to VB Script for something like this? On mu Ubuntu 12.04 setups my tmux clipboard copy and paste commands are setup as follows:  set -g prefix M-a unbind C-b bind C-c run "tmux save-buffer - | xclip -i -sel clipboard" bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"   This worked great for the longest time up until a month or so ago, when I suspect some configuration change or package change was made that broke the above. In GNOME terminal, pasting still works fine with both prefix+ctrl-v and ctrl-shift-v.   However the xclip copy command no longer works no matter what I do, and I have tried removing the custom prefix binding above, using -select instead of -sel, not using clipboard etc. This is pretty much a show stopper for a GVim user like me, since I don't even have the GNOME terminal workaround of ctrl-shift-c with tmux taking over the shell. I go into copy mode, select text with space+movement, and when I execute prefix+ctrl-c absolutely nothing happens. Before this broke, tmux would display a confirmation message in the notification section at the bottom.  Does anybody have suggestions as far as how one might debug this? This is a pretty big productivity hit. I can probably use the , but it'd be great to know just what happened to xclip. Is there any hint that some of the beings in Tolkien's lore may have survived into "our" times? In Tolkien's lore, they are many very old beings. Is there any indication that some or even one would have been truly immortal and survived into what we would call "our" history or Age? Galadriel, Cirdan, Ingwe, Bombadil, Ungoliant, or any Maia or Ainur? Anyone or anything? Seems there must be some kind of carry-over seeing as how "man" existed in this time. How to complain about a user? I  and a user was rude to me in a comment and in an answer. Even though I can't downvote, that answer got -5 and it was automatically deleted. I want to complain about that user. How can I do that?