This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
# -- coding: utf-8 -- | |
from win32api import * | |
from win32gui import * | |
import win32con | |
import sys, os | |
import struct | |
import time | |
class WindowsBalloonTip: |
/* Invokes a published function in PiCloud and then | |
retrieves the results. | |
Uses libcurl. Compile using the -lcurl flag. | |
See: http://echorand.me/2012/01/27/picloud-and-rest-api-with-c-client/ | |
*/ | |
#include <stdio.h> | |
#include <curl/curl.h> | |
#include <string.h> |
#!/home/drspock/scripts/FBInvite/bin/python | |
import argparse | |
import requests | |
import pyquery | |
def login(session, email, password): | |
''' | |
Attempt to login to Facebook. Returns user ID, xs token and |
#Reference: https://docs.djangoproject.com/en/1.9/ref/templates/api/#writing-your-own-context-processors | |
#This file is in yourapp/ directory | |
+from .models import Foo | |
+ | |
+def foo(request): | |
# you might need this line for unit tests | |
if request.user.is_authenticated and request.user.is_active: | |
+ count = len(Foo.objects.filter(user = request.user)) | |
+ return {"foo_count" :count} |
Picking the right architecture = Picking the right battles + Managing trade-offs
def delete_first(self): | |
deleted = self.head | |
if self.head: | |
self.head = self.head.next | |
deleted.next = None | |
return deleted |
""" | |
Test Qt Frameless Window resizing with QSizeGrip | |
Maxwell Grady, September 2017. | |
""" | |
import sys | |
from PyQt5 import QtCore, QtWidgets | |
from qtmodern.styles import dark | |
from qtmodern.windows import ModernWindow |