I have a continuous distribution that I was thinking of binning for computing MI and H.  I often arbitrarily decide on bin size. Is there a general consensus on how to set bin size and number?  Thanks for your input!
I want to quantify the relationship between two variables, A and B, using mutual information. The way to compute it is by binning the observations (see example Python code below). However, what factors determines what number of bins is reasonable? I need the computation to be fast so I cannot simply use a lot of bins to be on the safe side.  from sklearn.metrics import mutual_info_score  def calc_MI(x, y, bins):     c_xy = np.histogram2d(x, y, bins)[0]     mi = mutual_info_score(None, None, contingency=c_xy)     return mi
In Ubuntu, I want to scroll up while a command is running in my terminal window and generates new output (the command that is running is rspec). I can scroll up, but each time rspec generates a new line of console output, it throws me back down to the bottom. Is there a way to scroll all the way up? I'm using terminator on Linux Mint/Ubuntu 12.04 LTS. I found a possible workaround.  says that with stty ixon  you can turn on &quot;XON/XOFF flow control for terminal output. Being able to pause output by typing ^S and resume it by typing ^Q [...]&quot; This it not totally what I wanted though, without having to pause the output (and maybe wondering when forgetting to turn it on again), I thought there might be a simple modifier key like shft-alt with mouse wheel scroll-up. Are there better solutions? A fly in an accelerating car A fly is flying around in a car, the fly never touches any surface in the car only fly’s around in the air inside the car. The car accelerates. does the fly slam in to the rear window. or does the fly continue to fly uninterrupted? PSTricks will not compile \documentclass[12pt]{article} \usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry} \usepackage{pstricks} \usepackage{graphicx} \begin{document} \thispagestyle{empty} \psset{unit=1in} \begin{pspicture}(13.24in,9in) \psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9)  \end{pspicture}  \end{document}   I am following a tutorial outlined here:   I am following the Robbers book.  Everything seems fine until I paste the \psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9)  What could be the problem? can any one tell me how to write long equation in multline i tried with coding below but some errors of \right and \left appear \begin{multline*} \displaystyle \left \| f  \right \|_{M\dot{K}^{\alpha(\cdot),q}_{p(\cdot), \lambda}(\mathbb{R}^{n})} \approx \max \left\{ \sup_{L\leqslant0,L\in  \mathbb{Z}}2^{-L\lambda}\left ( \sum_{k=-\infty}^{L}2^{k\alpha(0)q}\left \|  f\chi_{k} \right \|^{q}_{L^{p(\cdot)}} \right )^{1/q},\\\sup_{L&gt;0,L\in \mathbb{Z}}\left[ 2^{-L\lambda}\left ( \sum_{k=-\infty}^{-1}2^{k\alpha(0)q} \left \| f\chi_{k} \right \|^{q}_{L^{p(\cdot)}} \right )^{1/q}\\ +2^{-L\lambda}\left ( \sum_{k=0}^{L}2^{k\alpha(\infty)q}\left \|  f\chi_{k} \right \|^{q}_{L^{p(\cdot)}} \right )^{1/q}\right] \right\}  \end{multline*} Left and right subscript / superscript I am trying to put two subscripts at the left and right of a character. For example, something like:  _{t} p_{x}  where p is in the middle. How do you do this? Running an infinite loop on startup I'd like to run a command at startup which pings a certain address every 10 minutes and writes the result to a file. I've figured out now how to do the pinging and file writing and the 10 min intervals:  while true; do my-command-here; sleep 600; done   My question is, can I put this in /etc/init.d/rc.local or should I be putting it in /etc/rc.local or somewhere else entirely? I'm specifically concerned because it's an infinite loop so I'm not sure if I could put it in one of these startup scripts.  Some help would be appreciated. I'm using Ubuntu 12.04.5 Today, we had a math class, where we had to show, that $a_{100} &gt; 14$ for  $$a_0 = 1;\qquad a_{n+1} = a_n + a_n^{-1}$$  Apart from this task, I asked myself: Is there a closed form for this sequence? Since I didn't find an answer by myself, can somebody tell me, whether such a closed form exists, and if yes what it is? This is a  about using cron &amp; crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted. While studying the problem of determining the orbit of a binary star system, my astronomy notes say: "the projection of an ellipse onto a plane is still an ellipse (except the special case in which it's a segment)". How could I prove this?  EDIT: As suggested i'm adding what I know about ellipses. I know the basics of ellipses in the plane, the equation of an ellipse in a plane in cartesia coordinates, the equation of an ellipse in polar coordinates, the fact that ellipses can be obtained by the intersection of planes with a cone. In my geometry course we defined ellipses as the the points of the plane such that the ratio between the distance from a point and a line is constant and less than 1. I also know that the sum of the distances of the points of the ellipse from the foci is constant. Renaming a bunch of files with date modified timestamp at the end of the filename? Why "hide" Luke from his father somewhere Anakin knows? In Episode II Anakin goes to the Lars homestead and meets his extended family. How would sending Luke there be "hidden" to Vader in any way? At least Leia had a random planet and family. Windows 10 doesn't shut down properly Reprojecting raster from 0 360 to -180 180 with cutting 180 meridian using gdalwarp I have a geotiff raster image that has a coordinate system with longitudes from 0 to 360. The horizontal center of the image is 180 longitude. See image below:    I want to transform it to EPSG:4326 SRS with -180 180 longtitude range.  And I want the center of the image to be at Greenwich meridian (0). I guess this srs is very widely used. I expect the result look like this:    So I use a gdalwarp command to reproject:  gdalwarp -s_srs '+proj=latlong +datum=WGS84 +pm=180dW' -t_srs EPSG:4326 test_col.tif test_4326.tif   But I only get a tiff with bigger dimensions (more pixels) and EPSG:4326 metadata. The image itself looks the same, as the initial one. But I expect it to swap the hemispheres.  How do I gdalwarp an image to be strictly -180 180 EPSG:4326 with the center in 0 longitude?  This is gdalinfo of my initial file:  Origin = (-0.102272598067084,89.946211604095552) Pixel Size = (0.204545196134167,-0.204423208191126) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   INTERLEAVE=BAND Corner Coordinates: Upper Left  (  -0.1022726,  89.9462116) (  0d 6' 8.18"W, 89d56'46.36"N) Lower Left  (  -0.1022726, -89.9462116) (  0d 6' 8.18"W, 89d56'46.36"S) Upper Right (     359.897,      89.946) (359d53'50.18"E, 89d56'46.36"N) Lower Right (     359.897,     -89.946) (359d53'50.18"E, 89d56'46.36"S) Center      ( 179.8975000,  -0.0000000) (179d53'51.00"E,  0d 0' 0.00"S)   This is gdalinfo after gdalwarp     Origin = (-180.102727401932952,89.946211604095552) Pixel Size = (0.091397622896436,-0.091420837939082) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   INTERLEAVE=PIXEL Corner Coordinates: Upper Left  (-180.1027274,  89.9462116) (180d 6' 9.82"W, 89d56'46.36"N) Lower Left  (-180.1027274, -89.9699975) (180d 6' 9.82"W, 89d58'11.99"S) Upper Right ( 179.8211116,  89.9462116) (179d49'16.00"E, 89d56'46.36"N) Lower Right ( 179.8211116, -89.9699975) (179d49'16.00"E, 89d58'11.99"S) Center      (  -0.1408079,  -0.0118929) (  0d 8'26.91"W,  0d 0'42.81"S) How to use combinatorial proof instead of induction? Let k ≥ 1 be an integer and consider a sequence $n_1, n_2, . . . , n_k$ of positive integers. Use a combinatorial proof to show that  $\binom{n_1}{2}$ + $\binom{n_2}{2}$ +...+ $\binom{n_k}{2}$ $\le$ $\binom{n_1 + n_2 + ...+ n_k}{2}$ Distributions other than the normal where mean and variance are independent I was wondering if there are any distributions besides the normal where the mean and variance are independent of each other (or in other words, where the variance is not a function of the mean). How to prove that this set is closed? Suppose $Y$ be an ordered set in the order topology. Let $f, g: X \to Y$ be continuous. How to show that the set $\{x| f(x) \leq g(x)\}$ is closed?  This is a excercise from munkres. Maybe trying to show that the set $f(\{x| f(x) &gt; g(x)\})$ is open is suffice. But I could not figure out the connection between this set and the continuity of the two functions.Could you give a hint?  Thanks. How Do Dementors Communicate with Wizards? What should my Objective-C singleton look like? My singleton accessor method is usually some variant of:  static MyClass *gInstance = NULL;  + (MyClass *)instance {     @synchronized(self)     {         if (gInstance == NULL)             gInstance = [[self alloc] init];     }      return(gInstance); }   What could I be doing to improve this? Is it possible to play D&D 5e solo? Pgfplots with custom axis markers Assume you have a trigonometric function, say for simplicity sin(x). When plotting the function, how can one place the x-axis markers on 0, pi/2, pi, 3pi/2, 2pi, instead of the default numeric values that pgfplots uses?