What is a good back-end to use with AngularJS [closed]

There is considerable risk in this question for opinion-based answers, so I suggest a more critical evaluation: Restful server-side implemenations … Will make working with angular considerably easier and less painful as well as being true to the HTTP spec with all the good things that entails. In any language that you choose ensure that … Read more

How to interact with back-end after successful auth with OAuth on front-end?

We have 3 main security concerns when creating an API. Authentication: An identify provider like Google is only a partial solution. Because you don’t want to prompt the user to login / confirm their identity for each API request, you must implement authentication for subsequent requests yourself. You must store, accessible to backend: A user’s … Read more

Shared models between two Rails apps – what is the ideal solution for Workflow?

drop the models project(put models into one of other parts, i’d suggest whatever you consider “more important”), put all projects into single repository(separate project folders) and make symlinks to models/libs/apis/whatever your code is highly coupled together and you often need to make changes to few projects at once(like updating models and updating APIs that use … Read more

matplotlib backends – do I care?

The backend mainly matters if you’re embedding matplotlib in an application, in which case you need to use a backend (GTK, Qt, TkInter, WxWindows) which matches the toolkit you’re using to build your application. If you’re also using matplotlib in a simple interactive way, you’ll also want to use a backend which matches what is … Read more

How to switch Backend with Keras (from TensorFlow to Theano)

Create a .keras (note the . in front) folder in you home directory and put the keras.json file there. For example, /home/DaniPaniz/.keras/keras.json (or ~/.keras/keras.json in short) if you are on a UNIX like system (MacOS X, Linux, *BSD). On Windows you want to create the folder %USERPROFILE%/.keras and put the JSON file there. Alternatively, you … Read more

How can I take a screenshot/image of a website using Python?

Here is a simple solution using webkit: http://webscraping.com/blog/Webpage-screenshots-with-webkit/ import sys import time from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import * class Screenshot(QWebView): def __init__(self): self.app = QApplication(sys.argv) QWebView.__init__(self) self._loaded = False self.loadFinished.connect(self._loadFinished) def capture(self, url, output_file): self.load(QUrl(url)) self.wait_load() # set to webpage size frame = self.page().mainFrame() self.page().setViewportSize(frame.contentsSize()) # render image image … Read more