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 MyClass(object): | |
| def __init__(self, p): | |
| self.__x = p | |
| @property | |
| def x(self): | |
| return self.__x |
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
| BLACK = 0 | |
| RED = 1 | |
| class Interval(object): | |
| def __init__(self, start, end): | |
| self.__start = start | |
| self.__end = end | |
| self.__max = end | |
| self.__left = None |
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 argparse | |
| import sys | |
| import h5py | |
| import numpy as np | |
| desc = ''' | |
| Concatenate one or more .npy files into a dataset into an HDF5 file | |
| ''' | |
| parser = argparse.ArgumentParser(description=desc) | |
| parser.add_argument('output_h5', help='the .h5 file to write converted data to') |
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 argparse | |
| import os | |
| import socket | |
| import torch | |
| from torch import nn | |
| import torch.nn.functional as F | |
| from torchvision import transforms | |
| from torchvision.datasets import MNIST | |
| from torch.utils.data import DataLoader, random_split | |
| import pytorch_lightning as pl |
OlderNewer