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
# open numpy array in imagej | |
###################################################################################### | |
# Installation: | |
# 1. conda create -n pyimagej -c conda-forge pyimagej openjdk=8 | |
# 2. conda activate pyimagej | |
####################################################################################### | |
import imagej | |
import numpy as np |
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
""" | |
Two things are wrong with Django's default `SECRET_KEY` system: | |
1. It is not random but pseudo-random | |
2. It saves and displays the SECRET_KEY in `settings.py` | |
This snippet | |
1. uses `SystemRandom()` instead to generate a random key | |
2. saves a local `secret.txt` |