Skip to content

Instantly share code, notes, and snippets.

View ABC10946's full-sized avatar

Taisei Kanai ABC10946

View GitHub Profile
@ABC10946
ABC10946 / Dockerfile4Rust
Last active September 13, 2018 04:34
Dockerfile for rust on ubuntu 18.04
FROM ubuntu:18.04
RUN set -ex && \
apt update; \
apt install -y curl gcc git vim; \
curl https://sh.rustup.rs -o rust-init; \
chmod +x rust-init; \
./rust-init -y; \
rm rust-init; \
echo 'export PATH="$HOME/.cargo/bin:$PATH"' > $HOME/.bashrc
@ABC10946
ABC10946 / Dockerfile4cpp
Last active September 13, 2018 04:34
Dockerfile for C++ on ubuntu 18.04
FROM ubuntu:18.04
RUN apt update && apt install -y gcc g++ make gdb vim
@ABC10946
ABC10946 / RPN_calc.rs
Created September 16, 2018 02:07
Simple Reverse Polish Notation Calculator implemented in Rust
use std::io;
fn main() {
println!("Hello, world!");
let mut formula = String::new();
io::stdin().read_line(&mut formula).expect("failed to read line");
formula = formula.trim().to_string();
let mut stack: Vec<i32> = Vec::new();
for i in formula.chars() {
@ABC10946
ABC10946 / pair_sort.cpp
Created September 22, 2018 02:24
experiment of pair sort written in c++
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
typedef std::pair<int, std::string> P;
bool pairCompare(const P& fc, const P& sc){
return fc.first < sc.first;
}
@ABC10946
ABC10946 / gloss_experiment.hs
Created October 31, 2018 18:45
gloss 実験コード
module Main where
import Graphics.Gloss
import Graphics.Gloss.Interface.IO.Game
windowWidth, windowHeight :: Num a => a
windowWidth = 640
windowHeight = 480
window :: Display
@ABC10946
ABC10946 / mnist_cnn_with_cpu.ipynb
Last active November 19, 2018 17:08
mnist cnn learning velocity compare with cpu (Intel Core i7 8750H) , gpu (GTX 1050 laptop ver) , gpu (GTX 750 ti desktop ver)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$$\lnot p$$ $$A \land B$$ $$P \to Q$$
@ABC10946
ABC10946 / disableInternalInputDevices.sh
Last active December 2, 2018 16:19
script to enable/disable laptop internal input devices
#!/bin/bash
keyboard_id=$(xinput list --id-only "AT Translated Set 2 keyboard")
touchpad_id=$(xinput list --id-only "SynPS/2 Synaptics TouchPad")
xinput disable $keyboard_id
xinput disable $touchpad_id
@ABC10946
ABC10946 / fibonacci.ipynb
Created March 25, 2019 12:11
functools.lru_cacheを用いた再帰関数の高速化
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ABC10946
ABC10946 / config.py
Last active June 26, 2019 04:48
とぇえとクリーナー
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
ACCESS_KEY = ""
ACCESS_SECRET = ""