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
environment: | |
- DISPLAY=${DISPLAY} | |
volumes: | |
- /tmp/.X11-unix:/tmp/.X11-unix |
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
# Based on https://github.com/mateuszbuda/brain-segmentation-pytorch/blob/master/unet.py | |
# Original version is licensed under MIT License by mateuszbuda. | |
from collections import OrderedDict | |
import torch | |
import torch.nn as nn | |
class UNet(nn.Module): |
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
<?php | |
$title = ""; | |
$N = 100*3; # multiplying "3" because "あ" is 3 bytes in utf-8 | |
# $N = 74; | |
for ($i=0; $i<$N; $i++) { | |
$title = $title . "a"; | |
} | |
?> | |
<!DOCTYPE html> |
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
float f = 100; | |
float amp = 255; | |
void setup() { | |
// pinMode(A0, OUTPUT); | |
Serial.begin(115200); | |
} | |
void loop() { | |
float t = (float) millis() / 1000; |
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
// ==UserScript== | |
// @name New Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description try to take over the world! | |
// @author You | |
// @match http://example.com/* | |
// @grant none | |
// ==/UserScript== |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 torch | |
import torchvision.models as M | |
model = M.resnet18(pretrained=True) | |
model.eval() | |
# model = M.resnet50(pretrained=True) | |
dummy = torch.randn((1, 3, 224, 224)) | |
trmodel = torch.jit.trace(model, dummy) |
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 sys | |
import io | |
import subprocess | |
import argparse | |
JAVA_HOME = '/usr/lib/jvm/java-11-openjdk-amd64' | |
JDEPS = os.path.join(JAVA_HOME, 'bin/jdeps') | |
JLINK = os.path.join(JAVA_HOME, 'bin/jlink') | |
JMODS_DIR = os.path.join(JAVA_HOME, 'jmods') |
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
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
import time | |
import os | |
from stat import * | |
class FileWatchHandler(FileSystemEventHandler): | |
def __init__(self, path): | |
self.path = os.path.realpath(path) | |
self.fp = None |