server

Server-Sent Events in Flask work locally but not on production (linode)

Server-Sent Events in Flask work locally but not on production (linode) Question: I’m trying to get a progress bar to work in Flask. I use a Server Sent Events for that. When I run it in local development server, then everything works well and I can see in the browser real time added numbers in …

Total answers: 1

Extract domain name from URL in Python

Extract domain name from URL in Python Question: I am tring to extract the domain names out of a list of URLs. Just like in https://stackoverflow.com/questions/18331948/extract-domain-name-from-the-url My problem is that the URLs can be about everything, few examples: m.google.com => google m.docs.google.com => google www.someisotericdomain.innersite.mall.co.uk => mall www.ouruniversity.department.mit.ac.us => mit www.somestrangeurl.shops.relevantdomain.net => relevantdomain www.example.info => …

Total answers: 7

How to measure server response time for Python requests POST-request

How to measure server response time for Python requests POST-request Question: I create requests POST-requests like this, where I specify timeout threshold: response = requests.post(url, data=post_fields, timeout=timeout) However, to determine a “good” threshold value, I would like to benchmark the server response time in advance. How do I compute the minimum and maximum response times …

Total answers: 2

cannot quit jupyter notebook server running

cannot quit jupyter notebook server running Question: I am using Jupyter Notebook for a project. Since I ssh into a linux cluster at work I use ssh -Y -L 8000:localhost:8888 user@host Then I start the notebook with jupyter notebook –no-browser & so that I can continue using the terminal. Then on my local machine I …

Total answers: 9

Socket issues in Python

Socket issues in Python Question: I’m building a simple server-client app using sockets. Right now, I am trying to get my client to print to console only when it received a specific message (actually, when it doesn’t receive a specific message), but for some reason, every other time I run it, it goes through the …

Total answers: 2

ipython server can't launch: No module named notebook.notebookapp

ipython server can't launch: No module named notebook.notebookapp Question: I’ve been trying to setup an ipython server following several tutorials (since none was exactly my case). A couple days ago, I did manage to get it to the point where it was launching but then was not able to access it via url. Today it’s …

Total answers: 5

Install Anaconda on Ubuntu (or Linux) via command line

Install Anaconda on Ubuntu (or Linux) via command line Question: I would like to install Anaconda on a remote server. The server is running Ubuntu 12.04. I only have access to this server via SSH. How can I install Anaconda via the command line? Asked By: JNevens || Source Answers: Something along the lines of: …

Total answers: 7