A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
## based on https://github.com/jacobgil/keras-grad-cam | |
## and on https://github.com/vense/keras-grad-cam/blob/master/grad-cam.py | |
import keras | |
from keras.layers import Input | |
from keras.layers import BatchNormalization | |
from keras.layers import Conv2D | |
from keras.layers import Activation | |
from keras.layers import MaxPooling2D | |
from keras.layers import GlobalAveragePooling2D |
from keras.callbacks import Callback | |
import keras.backend as K | |
import numpy as np | |
class SGDRScheduler(Callback): | |
'''Cosine annealing learning rate scheduler with periodic restarts. | |
# Usage | |
```python | |
schedule = SGDRScheduler(min_lr=1e-5, |
Este es un instructivo para un tutorial en Youtube https://youtu.be/pliGG1M87W8
Setting up a linter
can help detect odd or non-typical coding practices. The following will describe how to setup PyCharm for basic linting with the PyCharm PyLint plugin.
This assumes you have a venv
setup within your current project.
For pylint
for your current project venv
the following two commands should be run in your project root. The first will install pylint
and the second will create an rc
file which you can then adjust for your current project.
FROM ubuntu:20.04 | |
RUN apt-get update && \ | |
apt-get install --no-install-recommends -y python3-pip python3.8-dev && \ | |
apt-get install vim && \ | |
apt-get install git |
I am no longer abe to monitor this post , I have decided to move everything to my personal blog for better monitoring.
Please click here to access the full post
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
""" | |
Wiener deconvolution study. | |
Copyright (C) 2021 aferro (ORCID: 0000-0003-3830-3595) | |
This program is free software: you can redistribute it and/or modify |