Skip to content

Instantly share code, notes, and snippets.

@uchidama
uchidama / pytorch_cifer10_vierer.ipynb
Created September 30, 2019 05:58
pytorch_cifer10_vierer.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@uchidama
uchidama / pytorch_cifer100_viewer.ipynb
Created September 30, 2019 06:07
pytorch_cifer100_viewer.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@uchidama
uchidama / motor_GPIO.py
Last active October 2, 2019 07:09
move motor driver TB6643KQ
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
PIN1 = 14
PIN2 = 15
GPIO.setup(PIN1,GPIO.OUT)
@uchidama
uchidama / pytorch_cifer100_viewer.ipynb
Created October 8, 2019 08:07
pytorch_cifer100_viewer.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@uchidama
uchidama / pytorch_cifer10_vierer.ipynb
Created October 8, 2019 08:08
pytorch_cifer10_vierer.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@uchidama
uchidama / pytorch-mnist-predict-cnn-visualization.ipynb
Created October 16, 2019 09:54
pytorch-mnist-predict-cnn-visualization
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
'''
[問題]
https://atcoder.jp/contests/abc188/tasks/abc188_e
[解説]
https://atcoder.jp/contests/abc188/editorial/477
 解法1の手法を使う。
'''
'''
[問題]
https://atcoder.jp/contests/abc203/tasks/abc203_d
[解説]
https://www.youtube.com/watch?v=FA9Z9DowNlQ
 今回は、兄さんの解説がだいぶ、わかりやすい。43:23ごろから、累積和の計算について。
 二次元累積和は、端になんでゼロをつけるのかは、dpテーブル作成時にインデックスのifを無くすためだろう。メモリ消費による高速化。
 一番右下が長方形のもっている値の和であるというところがポイント
 
@uchidama
uchidama / abc203_e.py
Created June 1, 2021 07:01
atcoder abc203 D PyPy3(7.3.0)AC, Python3(3.8.2) AC https://atcoder.jp/contests/abc203/tasks/abc203_e
'''
[問題]
https://atcoder.jp/contests/abc203/tasks/abc203_e
[解説]
https://youtu.be/FA9Z9DowNlQ?t=3836
 黒服兄さんの解説を元に。
 DPで升目を作るのか?と思ったら、升目が多すぎで、この方針はダメとのこと。
 黒のポーンに注目したデータ構造に
@uchidama
uchidama / abc203_f.py
Last active June 4, 2021 14:50
AtCoder Beginner Contest 203(Sponsored by Panasonic) F PyPy3 AC Code. https://atcoder.jp/contests/abc203/tasks/abc203_f
'''
[問題]
https://atcoder.jp/contests/abc203/tasks/abc203_f
[解説]
https://blog.hamayanhamayan.com/entry/2021/05/30/230136
・高橋くんの操作はAi = 10**9 ゆえに2**30、つまり30回が最大
・青木くんは背の低い草から抜くべき