This file contains hidden or 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
| # SPDX-License-Identifier: Unlicense or CC0 | |
| extends Node2D | |
| # Smooth panning and precise zooming for Camera2D | |
| # Usage: This script may be placed on a child node | |
| # of a Camera2D or on a Camera2D itself. | |
| # Suggestion: Change and/or set up the three Input Actions, | |
| # otherwise the mouse will fall back to hard-wired mouse | |
| # buttons and you will miss out on alternative bindings, | |
| # deadzones, and other nice things from the project InputMap. |
This file contains hidden or 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
| """ | |
| stable diffusion dreaming | |
| creates hypnotic moving videos by smoothly walking randomly through the sample space | |
| example way to run this script: | |
| $ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry | |
| to stitch together the images, e.g.: | |
| $ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4 |
This file contains hidden or 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 AttentionWithContext(Layer): | |
| """ | |
| Attention operation, with a context/query vector, for temporal data. | |
| Supports Masking. | |
| Follows the work of Yang et al. [https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf] | |
| "Hierarchical Attention Networks for Document Classification" | |
| by using a context vector to assist the attention | |
| # Input shape | |
| 3D tensor with shape: `(samples, steps, features)`. | |
| # Output shape |
This file contains hidden or 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
| # Stacked LSTMs | |
| # Author: Kyle Kastner | |
| # Based on script from /u/siblbombs | |
| # License: BSD 3-Clause | |
| import tensorflow as tf | |
| from tensorflow.models.rnn import rnn | |
| from tensorflow.models.rnn.rnn_cell import LSTMCell | |
| import numpy as np | |
| import time |
This file contains hidden or 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
| "Serve a Flask app on a sub-url during localhost development." | |
| from flask import Flask | |
| APPLICATION_ROOT = '/spam' | |
| app = Flask(__name__) | |
| app.config.from_object(__name__) |