Skip to content

Instantly share code, notes, and snippets.

@xprilion
xprilion / Python Websockets SSL with Let's Encrypt
Last active April 19, 2024 12:11
Python Websockets SSL with Lets Encrypt
## Python Websockets SSL with Lets Encrypt
This code uses the `python-websockets` library.
You'll need to generate the certificate and keyfile using Let's Encrypt.
After generating the files correctly, you need to make them accessible to the current user who runs the script, my way of doing this was to copy it to the home directory of the current user and change the owner to the current user, set the permissions of the files to 400.
To know more about this process, read the blog here - https://xprilion.com/python-websockets-ssl-with-lets-encrypt/
@chunseoklee
chunseoklee / inst_norm.py
Created October 9, 2019 03:45
tflite instance norm generation python
## tested on tf 2.0
from tensorflow import keras
import tensorflow as tf
from tensorflow.keras import layers
import tensorflow_addons as tfa
inputs = keras.Input(shape=(784,), name='digits')
x = tfa.layers.normalizations.InstanceNormalization()(inputs)
outputs = layers.Dense(10, activation='softmax', name='predictions')(x)