django, wsgi, apache: error 500

The problem Apache gives an error 500 (internal server error) when trying to access website running django 1.9 using wsgi based on the tutorial given at https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04. Running the server using the developmental server (manage.py runserver) works fine. Looking in the apache error log reveals: [stuff] mod_wsgi (pid=20304): Target WSGI script ‘/django/XY_django/XY/XY/wsgi.py’ cannot be loaded…

Continue Reading

python, virtualenv, pip and sudo/permissions

The problem: To install a virtualenv (virtual environment for python) under a common (not user) folder, so that it is accessible to other users. If we try without using sudo, we get a permission error: [go into virtualenv called env] pip3 install fibo >[lots of stuff] >PermissionError: [Errno 13] Permission denied: ‘/django/env/lib/python3.4/site-packages/Fibo.py’ If we try…

Continue Reading

Meta-analysis of behavioral genetic studies of Piagetian cognitive ability

Apparently, only a few studies have examined this question and they are not easily available. Because we obtained these, it makes sense to share our results. The datafile is on Google Drive. We will fill in more results as we find them. So far results reveal nothing surprising: MZ correlations are larger than DZ correlations….

Continue Reading

Numlock problems in Virtualbox linux Mint

My situation is this: I run linux Mint from Windows 8.1 using Virtualbox. I have disabled the numlock (and the other *lock keys) in Windows by rebinding my keyboard using The Microsoft Keyboard Layout Creator. Windows boots up with numlock on so my numpad works. In Virtualbox, Mint boots up without numlock on. Cannot turn…

Continue Reading

General model for immigrant group traits and outcomes

(Broad-strokes modeling of how to think about immigrant performance. Some references are gone because they were written using the Zotero plugin, which I later uninstalled. I have re-added those I could recall.) Consider the model below: Something much like this has been my intuitive working model for thinking about immigrant groups’ traits and socioeconomic outcomes….

Continue Reading

Useful Twitter extensions for Firefox

I often share material on Twitter when I find something interesting. This is the primary purpose of Twitter for me: share and find interesting links. Right now, the process is a bit cumbersome. I have to switch tabs and paste the URL manually. Sometimes I need to also copy the title which means another set…

Continue Reading

R: fastest way of finding out of all elements of a vector are identical?

There is a question on SO about this: http://stackoverflow.com/questions/4752275/test-for-equality-among-all-elements-of-a-single-vector But I was a bit more curious, so! #test data, large vectors v1 = rep(1234, 1e6) v2 = runif(1e6) #functions to try all_the_same1 = function(x) {   range(x) == 0 } all_the_same2 = function(x) {   max(x) == min(x) } all_the_same3 = function(x) {   sd(x)…

Continue Reading