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 os | |
| import numpy as np | |
| import torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| from torchvision import datasets | |
| import torchvision.models as models | |
| import torchvision.transforms as transforms | |
| from torch.utils import data | |
| from PIL import Image, ImageFile |
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
| public class EventToCommandBehavior<T> : BehaviorBase<T> where T : BindableObject | |
| { | |
| public static readonly BindableProperty EventNameProperty = | |
| BindableProperty.Create("EventName", typeof(string), typeof(EventToCommandBehavior<T>), null, propertyChanged: OnEventNameChanged); | |
| public static readonly BindableProperty CommandProperty = BindableProperty.Create("Command", typeof(ICommand), typeof(EventToCommandBehavior<T>)); | |
| public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create("CommandParameter", typeof(object), typeof(EventToCommandBehavior<T>)); | |
| public static readonly BindableProperty InputConverterProperty = BindableProperty.Create("Converter", typeof(IValueConverter), typeof(EventToCommandBehavior<T>)); | |
| private Delegate eventHandler; |
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 os | |
| import sys | |
| import argparse | |
| import math | |
| from PIL import Image | |
| """ | |
| Reduce images size |