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 random | |
| import numpy as np | |
| from PIL import Image | |
| import matplotlib.pyplot as plt | |
| from scipy.ndimage import shift as scipy_shift | |
| import json | |
| DATA_PATH = 'data' | |
| OUTPUT_PATH = 'dataset' |
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 React, { useEffect, useRef } from "react"; | |
| const Oneko = () => { | |
| const nekoElRef = useRef(null); | |
| const timeoutIdRef = useRef(null); | |
| useEffect(() => { | |
| const isReduced = | |
| window.matchMedia(`(prefers-reduced-motion: reduce)`) === true || | |
| window.matchMedia(`(prefers-reduced-motion: reduce)`).matches === true; |
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
| # PyTorch implementation of "Half-UNet: A Simplified U-Net Architecture for Medical Image Segmentation" | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| class GhostModule(nn.Module): | |
| def __init__(self, in_channels, out_channels=64): | |
| super(GhostModule, self).__init__() | |
| self.conv1 = nn.Conv2d(in_channels, out_channels // 2, 3, padding=1, bias=False) | |
| self.batch_norm = nn.BatchNorm2d(out_channels // 2) |