Gists の API はこちら。
昔の Gist にたまにコメントついたりしてて気づかないことがあるので、API で取ろうとした。コメント数はとれるけどスター数やフォーク数は取れない。
あと新しいものから30個しか取れてない。
TMUX(1) BSD General Commands Manual TMUX(1) | |
NAME | |
tmux — terminal multiplexer | |
SYNOPSIS | |
tmux [-2CluvV] [-c shell-command] [-f file] [-L socket-name] | |
[-S socket-path] [command [flags]] | |
DESCRIPTION |
import threading | |
class ThreadingSingleton: | |
_instance = None | |
_lock = threading.Lock() | |
def __init__(self): | |
print('__init__') | |
def __new__(cls): |
import heapq as hq | |
que = [] | |
hq.heappush(que, (1, "TEST1")) | |
hq.heappush(que, (0, "TEST0")) | |
hq.heappush(que, (2, "TEST2")) | |
print(que) | |
priority, a = hq.heappop(que) | |
print(priority, a) |
li = [[]] * 2 | |
print(li) | |
li[0].append(1) | |
print(li) | |
print(id(li[0])) | |
print(id(li[1])) | |
li2 = [[] for _ in range(2)] |
Gists の API はこちら。
昔の Gist にたまにコメントついたりしてて気づかないことがあるので、API で取ろうとした。コメント数はとれるけどスター数やフォーク数は取れない。
あと新しいものから30個しか取れてない。
FROM python:3.5 | |
RUN apt-get update && \ | |
apt-get install -y git wget gzip | |
RUN git clone https://www.github.com/ildoonet/tf-openpose && \ | |
cd tf-openpose && \ | |
pip3 install -r requirements.txt && \ | |
pip3 install opencv-python tensorflow && \ | |
python setup.py install |
$current_path = $(Resolve-Path .).ToString() | |
docker run -v ${current_path}:/data ubuntu bash |
$TAG = "ubuntu" | |
$IMAGE_ID = $(docker images -q $TAG) | |
if ($IMAGE_ID){ | |
Write-Output "Docker Image ${IMAGE_ID} found." | |
} | |
else{ | |
Write-Output "Docker Image not found." | |
} |
A = int(input()) | |
B = int(input()) | |
for i in reversed(range(A+1)): | |
if i % B == 0: | |
print(i) | |
break |