Skip to content

Instantly share code, notes, and snippets.

@CarterMcClellan
CarterMcClellan / game_of_life.py
Created April 12, 2022 06:58
Conway - Game of Life
#!/usr/bin/python3 -u
from typing import List
import os, sys, random, time
class GameOfLife:
@staticmethod
def random_board(n_rows: int, n_cols: int) -> List[List[int]]:
board = []
for _ in range(n_rows):
row = []
@CarterMcClellan
CarterMcClellan / gist:5066eaabde8d865d475302bae3403346
Last active March 7, 2022 07:36
Torch Linker / Torch Compiler / Torchvision Question

If I torchscript a simple model with the torchvision.transforms.Resize op.

import torch
import torch.nn as nn
from torchvision import transforms

class ModelA(nn.Module):
    def __init__(self,):
        super().__init__()
        self.preproc = transforms.Resize(size=(256, 256))
@CarterMcClellan
CarterMcClellan / Proposal_mc_find.md
Last active July 31, 2017 21:51 — forked from donatello/Proposal_mc_find.md
Adding pattern matching to `mc`

Upon Further Input and Contemplation Original

mc find PATH [ACTION [print|exec ARGS...]]
  • PATH is either a file-path or a remote storage alias-path like myminio/mybucket
    • ACTION
    • --mcexec now named exec As suggested in the original proposal
    • --time now changed to --newer and --older Will take only positive values newer will be inclusive, older will be exclusive. Will accept the suffixes dy, wk, mh, or yr which will all be put in terms of days