Skip to content

Instantly share code, notes, and snippets.

View horitaku1124's full-sized avatar

Horimatsu Takuya horitaku1124

  • Tokyo
View GitHub Profile
@horitaku1124
horitaku1124 / signal.go
Last active November 7, 2018 10:58
go version
package main
import (
"fmt"
"io"
"log"
"os"
"os/exec"
"os/signal"
)
#include <stdio.h>
#include <signal.h>
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
#define BUFSIZE 128
@horitaku1124
horitaku1124 / solver.js
Created October 31, 2018 14:32
solver for IQ test
const inputLayer = [
[1, 5],
[2, 7],
[3, 9],
[5, 10],
];
const labels = [
18,
27,
@horitaku1124
horitaku1124 / Dockerfile
Created October 16, 2018 22:42
to build SeleniumIDE
# docker build . -t selenium_build -f Dockerfile
FROM ubuntu:18.04
RUN apt update
RUN apt install -y git yarn python3 python3-pip npm curl
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt update
package sample;
public class BinaryReader {
enum Endian {
Little,
Big
}
private Endian endianness;
public BinaryReader(Endian endian) {
this.endianness = endian;
@horitaku1124
horitaku1124 / dev.md
Last active April 21, 2020 23:26
calculate hour
@horitaku1124
horitaku1124 / Dockerfile
Created April 11, 2018 14:24
build selenium-ide
FROM ubuntu:17.10
RUN apt update
RUN apt install curl git python3 python3-pip -y
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
RUN export NVM_DIR="$HOME/.nvm"
RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
RUN [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
@horitaku1124
horitaku1124 / Makefile
Last active June 10, 2018 15:02
Finding prime number from StandardInput
CC=gcc
CFLAGS=-O3
all: prime pi
pi:
$(CC) $(CFLAGS) -o $@ pi.c
prime:
$(CC) $(CFLAGS) -o $@ prime.c -lm
@horitaku1124
horitaku1124 / Dockerfile.jupyter
Last active February 26, 2018 23:05
getting started Jupyter/notebook
# docker build . -t pandas_jupyter -f Dockerfile.jupyter
FROM jupyter/notebook:latest
RUN pip install --upgrade pip
RUN pip install pandas-datareader matplotlib scipy
# RUN apt update
# RUN apt install python3-tk -y
@horitaku1124
horitaku1124 / chat.py
Last active January 30, 2018 17:49
sample for chatting
"""
setup:
pip3 install PyMySQL
"""
import sys
import pymysql.cursors
def printPrompt():