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 math | |
import cv2 | |
import numpy | |
count = 0 | |
for i in range(12): | |
print('makeing {0}.mp4 background image'.format(i+1)) | |
video = cv2.VideoCapture('src/{0}.mp4'.format(i+1)) |
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 chainer | |
import numpy | |
import sklearn.base | |
class CNNFinder(chainer.FunctionSet): | |
def __init__(self): | |
super().__init__(conv1=chainer.functions.Convolution2D(1, 10, 4), | |
conv2=chainer.functions.Convolution2D(10, 20, 4), | |
conv3=chainer.functions.Convolution2D(20, 40, 4), |
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 math | |
import cv2 | |
import numpy | |
MOVIE_NUM = 12 | |
count = 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
class Tea: | |
def __init__(self, n): | |
self.n = n | |
def __add__(self, v): | |
print('add of {}'.format(self.n)) | |
def __radd__(self, v): | |
print('radd of {}'.format(self.n)) |
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
#!/bin/bash | |
if [ $# -eq 1 ]; then | |
channel=$1 | |
else | |
echo "usage : $0 channel_name" | |
echo " channel_name list" | |
echo " TBS Radio: TBS" | |
echo " Nippon Cultural Broadcasting: QRR" | |
echo " Nippon Broadcasting: LFR" |
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
i = 10 | |
while --i >= 0: | |
print(i) |
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
target = input().split(' ')[0] | |
coins = {*range(10)} - {*map(int, input().split(' '))} | |
result = '' | |
for c in target: | |
try: | |
result += str(min(x for x in coins if int(c) <= x)) | |
except ValueError: | |
for i in range(-1, -len(result), -1): | |
try: |
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 ast | |
import sys | |
if len(sys.argv) != 2: | |
print('usage: python {} [FILE.py]'.format(sys.argv[0])) | |
sys.exit(1) | |
with open(sys.argv[1]) as f: | |
a = ast.parse(f.read(), f.name) |
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
defmodule Main do | |
def inc x do | |
x + 1 | |
end | |
def dec x do | |
x - 1 | |
end | |
defp minus(x, y) when x < 0 do |
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 enum | |
import functools | |
import sys | |
class Align(enum.Enum): | |
left = lambda w, c, x: str(x) + c*(w-len(str(x))) | |
right = lambda w, c, x: c*(w-len(str(x))) + str(x) | |
@classmethod |