Generate an animated GIF from a folder full of .jpg images.
You need:
- Python 3; I used 3.6.2 for development and testing.
- The imageio package. If you're using pip, install with
pip install imageio
. I worked with version 2.2.0.
import ipywidgets as ipw | |
from pylab import * | |
def classify_image(tst,trn,k): | |
""" Input: | |
tst: a n x T vector corresponding to T images that are to be classified | |
trn: n x m x 10 matrix containing m training samples for each digit | |
k: integer between 1 and n | |
""" | |
n,T = tst.shape |
using Images | |
""" | |
B = shift_lr(A, k) | |
Shift `A` by `k` columns. If `k` is positive, shift to the | |
right by inserting `k` columns on the left. If `k` is | |
negative, shift to the left by inserting `k` columns | |
on the right. | |
""" | |
function shift_lr(A::AbstractMatrix, k::Integer) |
""" | |
p = joyplot(A) | |
Generate a "joyplot" from data in `A`. Each column of `A` will be | |
plotted with a `plot()` command, and all plots will be stacked | |
vertically. | |
Keyword arguments: | |
* `labels`: a vector of subplot labels having length size(A, 2). | |
* `plot_size`: overall plot size; default is (400, 500). |
sheet col row longname input keystrokes comment | |
open-file Quiz_1a_scores.csv o | |
open-file Quiz_1b_scores.csv o | |
open-file Quiz_2a_scores.csv o | |
open-file Quiz_2b_scores.csv o | |
open-file Quiz_3a_scores.csv o | |
open-file Quiz_3b_scores.csv o | |
open-file Quiz_4a_scores.csv o | |
open-file Quiz_4b_scores.csv o | |
open-file Quiz_5a_scores.csv o |
heigh: 800 |
{ | |
"grg_version": "v.4.0", | |
"network": { | |
"id": "nesta_case3_lmbd", | |
"type": "network", | |
"subtype": "bus_branch", | |
"description": "Copyright (c) 2017 The Grid Research for Good (GRG) Team. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated. documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR C |
case | gap | time_ac | time_sdp |
---|---|---|---|
nesta_case3_lmbd | 0.380212 | 0.0115185 | 0.00657511 |
nesta_case5_pjm | 5.21946 | 0.0187869 | 0.026509 |
nesta_case14_ieee | 0.000147327 | 0.0249393 | 0.0432889 |
nesta_case24_ieee_rts | 4.66891e-5 | 0.0591923 | 0.166873 |
nesta_case30_as | 0.000902287 | 0.0485134 | 0.110496 |
nesta_case30_fsr | 2.73208e-5 | 0.0556282 | 0.234215 |
nesta_case30_ieee | 2.83224e-5 | 0.0627696 | 0.127613 |
nesta_case39_epri | 0.0151207 | 0.0661744 | 0.257961 |