-p .
でカレントディレクトリ内のtsconfig.jsonを参照し、その情報を元にコンパイル"args": ["file1.ts","file2.ts"]
のように指定することで、指定されたファイルのみをコンパイル
- -wでファイルを監視
- VSCodeなら[Tasks: Terminate Runnning Tasks]で終了できます
# coding: raw_unicode_escape | |
#\u000aimport os | |
#\u000aos.system("cat /flag.txt") | |
def hoge(): | |
return 42 | |
__EOF__ |
BASE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) | |
define BUF | |
@docker run --volume "$(BASE_DIR):/workspace" -e HOME=/tmp --workdir /workspace -u `id -u`:`id -g` bufbuild/buf $(1) | |
endef | |
.PHONY: all generate lint | |
all: generate |
import argparse | |
import itertools | |
import os | |
import pathlib | |
import shlex | |
from typing import List | |
def _accumulated_size(idx: int, prefix: str) -> str: | |
if idx == 0: |
import argparse | |
import fractions | |
import io | |
from itertools import count | |
from av import Codec | |
from av.packet import Packet | |
class Decoder: |
import cv2 | |
import numpy | |
image = cv2.imread('./sandstorm.png') | |
height, width = image.shape[:2] | |
new_height = height // 8 | |
new_width = width // 8 | |
new_image = numpy.zeros((new_height, new_width, 3)) |
import hoge | |
from hoge import A | |
def print_value(): | |
instance = A() | |
print(instance.value) | |
def print_value2(): |
import threading | |
import time | |
from unittest import mock | |
class Hoge: | |
b = 10 | |
a = Hoge() |
import sys | |
for x in sys.stdin: | |
sys.stdout.write('stdin: {}'.format(x)) | |
sys.stdout.flush() | |
"""Output. | |
[py36] | |
hoge |
import cProfile | |
import random | |
import cupy | |
from cupy import cudnn | |
libcudnn = cudnn.cudnn | |
N_LAYER = 10 | |
N_TESTCASE = 1000 |