import qgis geoprocessing tools in python os x 10.9.5 I'd like to use the python bindings from qgis, but in a standalone project. I need the geoprocessing tools for vectors.  I updated QGIS (Wien - 2.8), python (3.4.3), etc. However, it always ends with the following error :                 import qgis.core       Traceback (most recent call last):         File "", line 1, in          File "/Applications/QGIS.app/Contents/Resources/python/qgis/init.py", line 26, in            import sip       ImportError: dlopen(/Applications/QGIS.app/Contents/Resources/python/sip.so, 2): Symbol not found: _PyCObject_Type         Referenced from: /Applications/QGIS.app/Contents/Resources/python/sip.so         Expected in: flat namespace        in /Applications/QGIS.app/Contents/Resources/python/sip.so           I set the following path : export PYTHONPATH=/Applications/QGIS.app/Contents/Resources/python/ export DYLD_LIBRARY_PATH=/Applications/QGIS.app/Contents/MacOS/lib/:/Applications/QGIS.app/Contents/Frameworks/  The issue is obviously about SIP, but I truly don't know what to do. The python console inside QGIS is not insulting me when I'm giving it "import qgis.core". So I 'd bet there is something about the versions of SIP, Python "command line" and Python "QGIS command line".  I can't say what... and I'mm really stuck.   I am using miniconda3 for my libraries (rsgislib, gdal, ogr, ...).
Python 3 with QGIS on Mac? I need to start learning Python, and I want to learn with version 3.x. I understand that QGIS--at least some plug-ins--relies on Python and Tcl/Tk, and probably on specific versions. Assuming that QGIS is dependent on Python 2, can anyone tell me how to set up parallel installations of Python 3 and Tcl/Tk such that QGIS will have what it needs and I can use Python 3 for other purposes?
Say $R$ is a commutative ring and $I\in R$ is an ideal. Let us consider the quotient $R/I$. It is created by taking every element $a\in R$, and adding all the elements of $I$ to it. The elements of $R/I$ are of the form $a+I$ and $b+I$, $\forall a,b\in R$.   Now $$(a+I).(b+I)=(a+i_{1}).(b+i_{2}),\forall (i_{1},i_{2})\in I \times I$$  $$(a+i_{1}).(b+i_{2})=ab+a.i_{2}+b.i_{1}+i_{1}i_{2}=ab+I$$  We know that $a.i_{2}+b.i_{1}+i_{1}i_{2}\in I$.   If $(a+I).(b+I)=ab+I$, then taking suitable $(i_{1},i_{2})\in I\times I$, we should be able to prove $(a+i_{1}).(b+i_{2})=ab+i_{3},\forall i_{3}\in I$. However, can every element in $I$ be generated by taking suitable $i_{1},i_{2}\in I$? And if not, is that the reason why $(a+I).(b+I)$ has to be defined as equal to $ab+I$ in violation of the distributive property of ring elements? This has confused me for a long time.   EDIT: I figured addition does not have to be defined as such because $(a+i_{1})+(b+i_{2})=a+b+i_{1}+i_{2}$, where $i_{1}+i_{2}\in I$. In fact, every element $i\in I$ can be constructed by taking $i_{1}=0$ and $i_{2}=i$. Hence, $(a+I) + (b+I)=a+b+I$ naturally. This is the logic I followed to determine that $(a+I).(b+I)$ doesn't quite work as nicey. I'm not sure if this logic is flawed or not as I haven't had the opportunity to ask anybody.   Thanks for your help in advance! I am working to build a reinforcement agent with DQN. The agent would be able to place buy and sell orders for a day trading purpose. I am facing a little problem with that project. The question is "how to tell the agent to maximize the profit and avoid the transaction where the profit is less than 100$".  I want to maximize the profit inside a trading day and avoid to place the pair (limit buy order, limit sell order) if the profit on that transaction is less than 100$. The idea here is to avoid the little noisy movements. Instead, I prefer long beautiful profitable movements. Be aware that I thought using the "Profit &amp; Loss" as the reward.  "I want the minimal profit per transaction to be 100$" ==> It seems this is not something that is enforceable. I can train the agent to maximize profit per transaction, but how that profit is cannot be ensured.  At the beginning, I wanted to tell the agent, if the profit of a transaction is 50 dollars, I will remove 100 dollars, then It becomes a penalty of 50 dollars for the agent. I thought it was a great way to tell the agent to not place a limit buy order if you are not sure it will give us a minimal profit of 100$. It seems that all I would be doing there is simply shifting the value of the reward. The agent only cares about maximizing the sum of rewards and not taking care of individual transactions.   How to tell the agent to maximize the profit and avoid the transaction where the profit is less than 100$? With that strategy, what guarantee that the agent will never make a buy/sell decision that results in less than 100 dollars profit? Does the sum of reward - # transaction * 100 can be a solution? If I want to shoot darker shots, is it better to increase the lighting and then darken in post to retain clarity? I'm just getting started - in my last shoot, I was using a 6D with a 50mm/1.4.  In low light, the pictures looked fantastic on the viewfinder but on the computer screen, appeared extremely grainy.  For future shoots, if I want to achieve something like this:     Should I shoot with way more light / lower ISO to retain clarity, and then just darken in post?  What kind of setup would be needed to achieve the above?    With my setup -   Camera Canon EOS 6D  Lens EF50mm f/1.4 USM  Focal Length 50mm  Shutter Speed 1/40 s  Aperture f/1.8  ISO/Film 6400  I was getting very grainy results that I had to soften in post (in case you want to see my attempts):      Any tips would be much appreciated. "Coming soon" pages & SEO I am setting up my personal website, and I have designed a simple "Coming Soon / Under Construction" page which basically has nothing but a small notice for the users.   What kind of SEO can I make on this page such that it won't harm the full website's ranking later on? Acount suspension reason is only shown on the main site profile not meta How many Shutter Clicks on a New Camera considered normal?    I purchased a quotes new Nikon D750 and checked the shutter count and it has 264 Shutter Clik count on it.    Is that suspect of a returned purchase or used camera? I'm trying to display models that have shading drawn or baked directly on the textures, but I can't figure out how to disable Blender's default scene lighting. If there are no lights in the scene, everything is black, but I want to see the textured objects fully bright. How do I disable the lighting?  NOTE: Just before posting this, I found the "Shadeless" material property, which does more or less what I want. However, is there a way to globally toggle the default lighting? I'm creating a color object using the following code.  curView.backgroundColor = [[UIColor alloc] initWithHue:229 saturation:40 brightness:75 alpha:1];   How can I retrieve RGB values from the created color object? How do you get a submit button in the Windows Phone keyboard? Test whether string is a valid integer I have a problem with derivation of some function. This is related to computing the Poincare Map of Logistic Population model with Periodic harvesting. This function is:  $\phi(t,x_0) = x_0 + \int_{0}^{t} f(s,\phi(s,x_0)) ds $,  where $\phi(t,x_0)$ is a function: $\mathbb{R}  \times \mathbb{R} \rightarrow \mathbb{R}$.  I'm trying to differentiate  equation of this function both sides  with respect to $x_{0}$. In book from this equation comes from the result of this differentiation is:  $\frac{\partial \phi}{\partial x_0} (t,x_0) = 1 + \int_0^{t} \frac{\partial f}{\partial x_0} (s, \phi(s,x_0)) \cdot \frac{\partial \phi}{\partial x_0} (s, x_0)ds$.  I can't understand expression under the integral. In this book it is explained that it is clear from chain rule.Could someone explain to me this transformation in easy way? I will be grateful for your help Best regards Convergence of Ratio Test implies Convergence of the Root Test If $f \in \mathcal{L}^1(\mathbb{R})$ then $\lim_{h\rightarrow 0}\int_{-\infty}^\infty |f(x+h)-f(x)|dx\rightarrow 0$ I am working on some past prelim problems and one of them is the following: If $f \in \mathcal{L}^1(\mathbb{R})$ then $\lim_{h\rightarrow 0}\int_{-\infty}^\infty |f(x+h)-f(x)|dx\rightarrow 0$   Update: Following Jackie Chong's advice, I am attempting this problem with the dominated convergence theorem. Since $f\in L^1(\mathbb{R})$, $f$ can be approximated from below by a sequence of continuous functions $f_n$. Then, I believe I can say that, for all $n$ sufficiently large, $|f_n(x+\frac{1}{n})-f_n(x)|\le 2|f(x)|$. (I'm not sure of this part thought). Then $2|f(x)|$ is integrable and hence a dominating function for $|f_n(x+\frac{1}{n})-f_n(x)|$. So by the dominated convergence theorem we can take the limit inside $\lim_{n\rightarrow \infty}\int|f_n(x+\frac{1}{n})-f(x)|dx=\int \lim_{n\rightarrow \infty}|f_n(x+\frac{1}{n})-f(x)|dx=0$ Is this on the right track?  Another approach that I thought may work, but which I'm less certain of is the following: If $f$ can be approximated by $C^1$ functions (I have no real justification for this, so please correct me if its wrong), then for each $n$ and each $x$ there is some $y(x,n)\in B_{1/n}(x)$ such that $|f(x+\frac{1}{n}-f(x)|=\frac{1}{n}|f'(y(x,n)|$ but from here I don't see how to proceed, because just because $|f|$ is integrable, I can't justify $|f'|$ being integrable, but if there is some way to fix this approach, hints would be appreciated.   Another thing I was thinking was to first approximate $f$ from below by continuous functions $f_n$ then to define $g_{m,n}=|f_n(x+\frac{1}{m})-f_n(x)| \chi_{[-m,m]}$. Then, for each $n$, the function $g_{m,n}$ is continuous on its support, and since it support is compact, it is uniformly continuous there. Can this be used to justify bringing the limit $\lim_{n\rightarrow \infty}$ inside the integral? Then apply the monotone convergence theorem? I know this idea is probably even more sketchy than my previous one, but if it can be fixed please let me know :)  Thanks! "Element is no longer attached to the DOM” StaleElementReferenceException when selecting HTML table row I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I get the "org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM" error and the test fails.  The code is the following:  @Test public void rowSelection() throws Exception {     SeleniumHelper helper = new SeleniumHelper();     action = new SeleniumActionHelper(driver);      helper.login();      String testUrl = navigateToUrl("option/listOptions.xhtml");     driver.get(testUrl);      WebElement table = findElementById("tableSection:dataTableWrapped_data");     List&lt;WebElement&gt; allRows = table.findElements(By.tagName("tr"));     for (WebElement row : allRows)         {             List&lt;WebElement&gt; cells = row.findElements(By.tagName("td"));             for (WebElement cell : cells)             {                 WebElement listName = cell.findElement(By.xpath("./* [text()='body_build']"));                 listName.click();             }         } }   I have put a Thread.sleep(2000) in front and after the listName.click() action, but neither has helped. Any help would be greatly appreciated. I would like to label an equation with an arbitrary symbol, rather than a number, or letter.  Is this possible? What's the best way to get the last N elements of a Perl array? How to choose a circle for default stream in Google Plus? How can I choose a specific circle for the default stream in Google+ ? Many extensions don't work, and are not comfortable if using another PC. I'm working through a problem regarding expected values in Markov chains, and at some point it says:     Recall from probability that if $X$ is a positive integer valued random variable, then $\mathbb{E}[X] = 1 + \sum^\infty_{k=1}\mathbb{P}(X &gt; k)$.   I know that by definition $\mathbb{E}[X] = \sum_a a\mathbb{P}(X = a)$, but I can't see how the above equality follows from this, nor am I sure if this is how to approach the problem. shortcut for commands I use following commands very often, and they're too long.  sudo /etc/init.d/kerio-kvc start sudo /etc/init.d/kerio-kvc stop   how can I create a shortcut command for them? something like sudo kerio start or sudo kerio stop What are "Community Wiki" posts?