Problem understanding generation of a dataset within some interval and probability 
(1) Generate a dataset within interval $I =[−3,3]×[−3,3]∈\mathbb R^2$ a set $S$
  containing $M=10,000$ data points. A point $(x,y)∈I$ is to belong
  with probability $p(x,y) = p_x(x) p_y(y)$ to $S$, where
  $p_x(x)=a_x(\cos(5x)+1)$ and $p_y(y)=a_y(\cos(3y)+1)$. 
(2) Produce $a_x, a_y∈\mathbb R$ such that $\int_{-3}^3 p_x(x)dx=\int_{-3}^3 p_y(y)dy=1.$ Save the data points into a file, and plot S.
(3) Associate to every data point $(x,y)∈S$ a target value $F(x,y)=\mathrm{sign}(\exp(y−x^2/2)  \sin(x^3−x−y))$, then save $x, y, F(x,y)$ into a
  data file, and plot the two sets, and $C_0=\{(x,y)∈S ∣ F ( x , y)=−1\}$
  and $C_1=\{(x,y)∈S∣F(x,y)=1 \}.$

I am really struggling to understand this question. 
In Part 1&2: e.g. $x=-3, y=2$ is to belong with probability $p(-3,2) = p_x(-3)p_y(2)$. How is it possible to find $a_x$ and $a_y$ based on the integration given? Is it possible by hand?
In Part 3: I am unable to understand what the expression for $C_0$ and $C_1$ means?
I'd appreciate if someone could help me understand in much simpler terms. I need to create a program based on this and feed this dataset into a neural network, but I'm not able to even comprehend the mathematics. Thanks in advance.
 A: I've addressed your questions and given some more background information.

In Part 1&2: How is it possible to find $a_x$ and $a_y$ based on the integration given? Is it possible by hand?

What $p(x,y) = p_x(x) p_y(y)$ means is that because the probability densities $p_x$ and $p_y$ multiply to get $p(x,y)$, the probability for the coordinate $x$ is independent of the probability for the coordinate $y$. So you can generate a coordinate for $x$ and then generate a coordinate from $y$ without worrying about dependencies between them.
The area under the curve $p_x(x) = a_x(\cos 5x + 1)$ represents the probability of $x$ taking particular values: you should plot the curve for some arbitrary $a_x$ to visualize this. Avoiding as much maths as possible, the easiest way to generate an $x$ value is to generate uniform $x$ and $p$ values in the rectangle given by $-3\le x\le3$ and $0\le p\le 2a_x$, only accepting those values of $x$ for which $p$ falls under the curve $p_x(x)$. And similarly for $y$. This is rejection sampling. (Note there are more sophisticated ways of sampling, but this is an easy one to get your head around.)
This will work if you don't know $a_x$ and $a_y$ because you can just choose them arbitrarily. However the area under each curve represents the total probability. So the area under each curve should sum to $1$. This is what is meant for $x$ by $\int_{-3}^3 p_x(x)dx=1$. You need to work out the area in terms of $a_x$ by integrating $a_x(\cos 5x + 1)$ from $-3$ to $3$, and then solve for $a_x$ given that the area has to be $1$.
\begin{align}
1
&=\int_{-3}^3a_x(\cos 5x + 1)\,dx\\
&= a_x\int_{-3}^3\cos 5x + 1\,dx \;\;\;\text{ because $a_x$ is constant}\\
&= a_x\left(\int_{-3}^3\cos 5x\,dx + \int_{-3}^31\,dx\right) \;\;\;\text{ because you can add integrals together}
\end{align}
You'll need to do something similar to find $a_y$.
It isn't the role of this site to teach you integration from scratch. See maths is fun for a tutorial on integration with examples that should give you what you need. Or search for "definite integration".

In Part 3: I am unable to understand what the expression for $C_0$ and $C_1$ means?

$C_0=\{(x,y)∈S ∣ F ( x , y)=−1\}$ just means the set of points $(x,y)$ in the set $S$ you generated earlier for which $F ( x , y)=−1$ and similarly for $C_1$. The vertical line $|$ can be read as "given".
