- Notes on how to use
django-tenants
library:- Data Architecture
- Domain setup / URL routing for root and per tenant
- App structure
- Limitations
django-tenants
// Settings in here override those in "Default/Preferences.sublime-settings", | |
// and are overridden in turn by file type specific settings. | |
// This configuration ensures that the coding environment in Sublime Text is | |
// optimized for readability, consistency, and adherence to Python coding standards | |
{ | |
// Display whitespace characters such as spaces and tabs. | |
"draw_white_space": "all", |
def find_anagrams(dictionary): | |
n = len(dictionary) | |
for i in xrange(n): | |
for j in xrange(i + 1, n): | |
a = dictionary[i] | |
b = dictionary[j] | |
if sorted(a) == sorted(b): | |
yield a | |
def find_anagrams2(dictionary): |
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, | |
a^2 + b^2 = c^2 | |
For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2. | |
There exists exactly one Pythagorean triplet for which a + b + c = 1000. | |
Find the product abc. |
#long version | |
list = [] | |
for x in range(0,10): | |
x = x+10 | |
list.append(x) | |
print "list: " | |
print list | |
#short version | |
list_comprehension = [x+10 for x in range(0,10)] |
import java.util.ArrayList; | |
public class ListComprehension { | |
public static void main (String[] args) { | |
ArrayList<Integer> list = new ArrayList<Integer>(); | |
//for (i in Range.between(0, 10)){ | |
for(int x = 0; x < 10; x++){ | |
int num = x + 10; |
# Upgrade update | |
# ssh keys, chmod ssh keys, bashrc | |
``` | |
copy all your ssh keys to your home folder | |
$ chmod 600 ~/.ssh/* && chmod 644 ~/.ssh/*.pub && chmod 664 ~/.ssh/config | |
copy .bashrc to your home folder | |
``` | |
# install your usual dependencies |