-
Install https://networkx.github.io/documentation/latest/install.html
-
Install https://django-extensions.readthedocs.io/en/latest/installation_instructions.html
-
Follow this: https://django-extensions.readthedocs.io/en/latest/graph_models.html
-
Remove all old migrations.
-
Remove all entries out of the
django_migrations
table.
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
class CxmlNode: | |
dtd = etree.DTD(dtd_file) | |
def __init__(self, *args, **kwargs): | |
self.payload_id = kwargs['payload_id'] | |
self.timestamp = kwargs.get('timestamp') # datetime.now().isoformat() | |
def __str__(self): | |
return self.render().decode('UTF-8') |
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
def convert(name, remove_ns=True): | |
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) | |
# remove namespaces | |
if remove_ns: | |
s1 = re.sub(r'^\{http.*\}', '', s1) | |
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() |
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.template.loader import get_template | |
class ValidationError(Exception): | |
pass | |
class Field: | |
def __init__(self, default=None, required=False, allowed_type=None): | |
self.allowed_type = allowed_type |
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.template.loader import get_template | |
class ValidationError(Exception): | |
pass | |
class Field: | |
def __init__(self, default=None, required=False, allowed_type=None): | |
self.allowed_type = allowed_type |
- Install
go
if you haven't so far- Mac (homewbrew):
brew install go
- Ubuntu:
sudo apt-get install golang-go
- Other: https://golang.org/doc/install#install
- Mac (homewbrew):
- Install imageproxy
- Using standalone installation:
go get willnorris.com/go/imageproxy/cmd/imageproxy
- Using standalone installation:
go build willnorris.com/go/imageproxy/cmd/imageproxy
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
class Track: | |
def print_result(self, name, start_time, end_time): | |
time_delta = end_time - start_time | |
result = '%r took: %2.4f sec' % (name, time_delta) | |
print(result) | |
def time(self, func): | |
@wraps(func) | |
def func_wrapper(*args, **kwargs): | |
start_time = time.time() |
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 os, sys, datetime | |
# Static variables | |
dateformat = { | |
"eu": "%d.%m.%Y", | |
"us": "%Y.%m.%d" | |
}; | |
# Check that script is properly called |
This guide describes a way to structure a feathers-client application with react and node. It is based on ideas from Mantra and personal experience.
node_modules/
└── ...
dist/
NewerOlder