This file contains 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
# coding: raw_unicode_escape | |
#\u000aimport os | |
#\u000aos.system("cat /flag.txt") | |
def hoge(): | |
return 42 | |
__EOF__ |
This file contains 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
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 |
This file contains 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 itertools | |
import os | |
import pathlib | |
import shlex | |
from typing import List | |
def _accumulated_size(idx: int, prefix: str) -> str: | |
if idx == 0: |
This file contains 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 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)) |
This file contains 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 fractions | |
import io | |
from itertools import count | |
from av import Codec | |
from av.packet import Packet | |
class Decoder: |
This file contains 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 hoge | |
from hoge import A | |
def print_value(): | |
instance = A() | |
print(instance.value) | |
def print_value2(): |
This file contains 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 threading | |
import time | |
from unittest import mock | |
class Hoge: | |
b = 10 | |
a = Hoge() |
This file contains 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 sys | |
for x in sys.stdin: | |
sys.stdout.write('stdin: {}'.format(x)) | |
sys.stdout.flush() | |
"""Output. | |
[py36] | |
hoge |
This file contains 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 cProfile | |
import random | |
import cupy | |
from cupy import cudnn | |
libcudnn = cudnn.cudnn | |
N_LAYER = 10 | |
N_TESTCASE = 1000 |
This file contains 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
False | |
True |
NewerOlder