Repeated “Kernel died, restarting” forever

When I attempt to run The console shows up, with the message Which continues. Trying $ jupyter qtconsole –debug didn’t print anything else, and neither has adding into $USERHOME/.jupyter/jupyter_qtconsole_config.py Also, I found nothing in $USERHOME/.ipython/profile_default/log/ and the other directories around there. Nothing has changed in my configuration since last time I started up jupyter-qtconsole. How … Read more

How to create a numpy array of lists?

As you discovered, np.array tries to create a 2d array when given something like You have apply some tricks to get around this default behavior. One is to make the sublists variable in length. It can’t make a 2d array from these, so it resorts to the object array: And you can then append values … Read more

python module for nslookup

Is there a python-module that’s doing the same stuff as nslookup does? I am planning to use nslookup on digging some information regarding the domain of a URL to be scrapped. I know I can use os.sys to call nslookup but I am just wondering if there is a python-module for this already. Thanks in … Read more

How do I flush the cin buffer?

Possibly: This would read in and ignore everything until EOF. (you can also supply a second argument which is the character to read until (ex: ‘\n’ to ignore a single line). Also: You probably want to do a: std::cin.clear(); before this too to reset the stream state.

jQuery toggle CSS?

For jQuery versions lower than 1.9 (see https://api.jquery.com/toggle-event): Using classes in this case would be better than setting the css directly though, look at the addClass and removeClass methods alecwh mentioned.