Demonstrates using d3.behavior.zoom with a geographic projection. Based on an
example by Iain Dillingham.
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
| # "Colorizing B/W Movies with Neural Nets", | |
| # Network/Code Created by Ryan Dahl, hacked by samim.io to work with movies | |
| # BACKGROUND: http://tinyclouds.org/colorize/ | |
| # DEMO: https://www.youtube.com/watch?v=_MJU8VK2PI4 | |
| # USAGE: | |
| # 1. Download TensorFlow model from: http://tinyclouds.org/colorize/ | |
| # 2. Use FFMPEG or such to extract frames from video. | |
| # 3. Make sure your images are 224x224 pixels dimension. You can use imagemagicks "mogrify", here some useful commands: | |
| # mogrify -resize 224x224 *.jpg | |
| # mogrify -gravity center -background black -extent 224x224 *.jpg |
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
| import pandas as pd | |
| import numpy as np | |
| def get_dataset(size): | |
| # Create Fake Dataset | |
| df = pd.DataFrame() | |
| df['size'] = np.random.choice(['big','medium','small'], size) | |
| df['age'] = np.random.randint(1, 50, size) | |
| df['team'] = np.random.choice(['red','blue','yellow','green'], size) | |
| df['win'] = np.random.choice(['yes','no'], size) |
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
| """ | |
| Usage: | |
| Make sure that redis is running on localhost (or adjust the url) | |
| Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html | |
| pip install -u uvicorn | |
| Install dependencies |
OlderNewer