Steps with explanations to set up a server using:
- virtualenv
- Django
- nginx
- uwsgi
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
Save for a few legacy projects that still use Fusion Tables I don't actively use this script anymore. This update hopefully solves the OAuth issue that cropped up once Google depcricated the Client Login method used by the prior version.
As always, your mileage may vary, and I welcome someone -- Google or otherwise -- to offer a long-term maintained solution.
The following is largely cribbed from a Google example here. I try to explain some of the API settings that must be enabled in the Developer's Console and elsewhere
/** | |
* Module dependencies | |
*/ | |
var express = require('express'); | |
var fs = require('fs'); | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
// img path |
""" | |
Implementation of pairwise ranking using scikit-learn LinearSVC | |
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich, | |
T. Graepel, K. Obermayer. | |
Authors: Fabian Pedregosa <[email protected]> | |
Alexandre Gramfort <[email protected]> | |
""" |
var application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
{% load i18n %} | |
<form method="post" | |
{% if action_url %}action="{{ action_url }}"{%endif %} | |
{% if form.is_multipart %}enctype="multipart/form-data"{% endif %}> | |
{% csrf_token %} | |
<fieldset> | |
{% if form_legend %} | |
<legend>{% trans form_legend noop %}</legend> | |
{% endif %}{# form_legend #} |
from socialregistration.signals import connect as profile_connect | |
from userena.managers import ASSIGNED_PERMISSIONS | |
@receiver(socialregistration_signals.connect, sender = FacebookProfile, dispatch_uid = 'facebook.connect') | |
def social_connect_callback(sender, user, profile, client, **kwargs): | |
""" | |
Create a profile for this user after connecting | |
""" | |
# Create a userena user. |