This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.contrib.auth.models import AbstractBaseUser | |
class Zone(models.Model): | |
name = models.CharField(max_length=35) | |
class Farm(Zone): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Zone(models.Model): | |
name = models.CharField(max_length=35) | |
class Farm(Zone): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from datetime import datetime | |
class Zone(models.Model): | |
''' Generic Zone superclass. ''' | |
name = models.CharField(max_length=35) | |
class Farm(Zone): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating test database for alias 'default'... | |
Destroying test database for alias 'default'... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E | |
====================================================================== | |
ERROR: FarmNet.tests (unittest.loader.ModuleImportFailure) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File /usr/lib64/python3.4/unittest/case.py, line 58, in testPartExecutor | |
yield | |
File /usr/lib64/python3.4/unittest/case.py, line 577, in run | |
testMethod() | |
File /usr/lib64/python3.4/unittest/loader.py, line 32, in testFailure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.utils import timezone | |
class Zone(models.Model): | |
''' Generic Zone superclass. ''' | |
name = models.CharField(max_length=35) | |
class Farm(Zone): | |
''' Farm. Users can have many of these. ''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 1270.965] | |
X.Org X Server 1.17.1 | |
Release Date: 2015-02-10 | |
[ 1270.968] X Protocol Version 11, Revision 0 | |
[ 1270.970] Build Operating System: Linux 3.19.2-1-ARCH x86_64 | |
[ 1270.971] Current Operating System: Linux autrilla 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 | |
[ 1270.971] Kernel command line: initrd=\initramfs-linux.img root=UUID=80474b4b-2858-4e88-a367-f4cb9fe172d6 rw rootflags=subvol=rootvol systemd.unit=multi-user.target nomodeset | |
[ 1270.974] Build Date: 14 April 2015 10:34:18AM | |
[ 1270.976] | |
[ 1270.977] Current version of pixman: 0.32.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scrapy | |
from scrapy.contrib.spiders import CrawlSpider, Rule | |
from scrapy.contrib.linkextractors import LinkExtractor | |
class StoreSpider(CrawlSpider): | |
name = 'store' | |
allowed_domains =['tiendaganadera.com', 'tiendaagricola.com'] | |
start_urls = ['http://tiendaganadera.com/home.php', | |
'http://tiendaagricola.com/home.php'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scrapy | |
from scrapy.contrib.spiders import CrawlSpider, Rule | |
from scrapy.contrib.linkextractors import LinkExtractor | |
class StoreSpider(CrawlSpider): | |
name = 'store' | |
allowed_domains =['tiendaganadera.com', 'tiendaagricola.com'] | |
start_urls = ['http://tiendaganadera.com/home.php', | |
'http://tiendaagricola.com/home.php'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X marks intersection points | |
Cliens want to write to a shared file | |
All acceptors and learners start with no one ('null') having access | |
ClientA ClientB Proposer Acceptor1 Acceptor2 Acceptor3 LearnerX LearnerY | |
| | | | | | | | | |
X------------------>| | | | | | Request(ClientA) | |
| | X--------->|----------->|---------->| | | Prepare(transaction_id=1) | |
| | |<---------X------------X-----------X | | Promise(transaction_id=1, {null, null, null}) // Acceptors answer with their current value, i.e. who currently has write access | |
| | X--------->|----------->|---------->| | | Accept(transaction_id=1, ClientA) // The proposer decides to let ClientA access the file |