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
| #!/usr/bin/env python | |
| import moviepy.editor as mpe | |
| import sys | |
| from pathlib import Path | |
| fname = Path(sys.argv[1]) | |
| v = mpe.VideoFileClip(str(fname)) | |
| v.write_gif(fname.with_suffix(".gif")) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| """Extract a cube slice using a time constraint.""" | |
| from datetime import datetime | |
| import iris | |
| # The cube with a time dimension | |
| cube = mycubelist.extract_cube("some_variable") | |
| # For example, we want to extract the time slice at 2020-04-29 12:00 model time, | |
| # which corresponds to a time index of 123. |
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 matplotlib.pyplot as plt | |
| import cartopy.crs as ccrs | |
| import cartopy.feature as cfeature | |
| from matplotlib.offsetbox import AnchoredText | |
| fig = plt.figure(figsize=(10, 10)) | |
| ax = fig.add_subplot(111, projection=ccrs.PlateCarree()) | |
| # Set extent of the map |
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
| { | |
| "shortcuts":[ | |
| { | |
| "args": {}, | |
| "command": "notebook:restart-and-run-to-selected", | |
| "keys": [ | |
| "Ctrl Q", "Ctrl Q" | |
| ], | |
| "selector": ".jp-Notebook:focus" | |
| }, |
OlderNewer