I am developing an asset management system with the Python web framework Django. The goal of AssetStorm is to model structured document like magazine articles in a verifyable structure without having to specify the structure itself in the code. AssetStorm achieves this goal with objects of the type AssetType
. They store the information how an asset may be structured as JSON with the IDs of other AssetType
as references. The JSON structure contains named keys and lists with only one ID which means that this AssetType
may be repeated as often as needed.
The data itself is stored as objects of type Asset
which also contain JSON. This JSON stores the actual primary keys of other assets. This allows any tree structure of assets with typed branches. The structure can be verified using the information from the corresponding AssetType
.
This software already works great. However I want to improve it by allowing versioned updates of the content. I want the software to be usable as a collaborative e
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 sys | |
def fibonacci(n): | |
if n > 1: | |
return fibonacci(n-1) + fibonacci(n-2) | |
else: | |
return n | |
if __name__=="__main__": | |
print(fibonacci(int(sys.argv[1]))) |
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 time | |
import RPi.GPIO as GPIO | |
from threading import Thread | |
def setup(): | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(2, GPIO.OUT, | |
initial=GPIO.LOW) | |
GPIO.setup(22, GPIO.IN) |
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
sudo apt-get install -y libhdf5-dev \ | |
libc-ares-dev libeigen3-dev gcc \ | |
gfortran python-dev libgfortran5 \ | |
libatlas3-base libatlas-base-dev \ | |
libopenblas-dev libopenblas-base \ | |
libblas-dev liblapack-dev cython \ | |
libatlas-base-dev openmpi-bin \ | |
libopenmpi-dev python3-dev | |
sudo pip3 install keras_applications==1.0.8 --no-deps | |
sudo pip3 install keras_preprocessing==1.1.0 --no-deps |