Skip to content

Instantly share code, notes, and snippets.

View hamkewl's full-sized avatar
💼
Working

Koki Nagahama hamkewl

💼
Working
  • Saitama, Japan
View GitHub Profile
@hamkewl
hamkewl / mcClient.cpp
Created August 25, 2021 07:03
UDPマルチキャストのサンプルプログラム
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
int main(int argc, char *argv[])
{
@hamkewl
hamkewl / install_ROS2_dashing.sh
Last active January 1, 2021 15:52
Ubuntu 18.04 LTS (bionic) 向けROS2 Dashingのインストールスクリプト
#---------------------------------------------------------#
# install_ROS2_dashing.sh
# @author Koki Nagahama (hamstick)
# @teston yet
# @discription install ROS2 Dashing & required packages
#---------------------------------------------------------#
# Set locale
sudo apt update && sudo apt -y full-upgrade
sudo apt -y install locales curl gnupg2 lsb-release
@hamkewl
hamkewl / install_ROS2_foxy.sh
Last active January 10, 2021 07:00
Ubuntu 20.04 LTS (focal) 向けROS2 Foxyのインストールスクリプト
#---------------------------------------------------------#
# install_foxy.sh
# @author Koki Nagahama (herp-vt)
# @teston Raspberry Pi 4B+ & Ubuntu 20.04 LTS (focal) 64bit
# @discription install ROS2 & required packages
#---------------------------------------------------------#
# Set locale
sudo apt update && sudo apt -y upgrade
sudo apt -y install locales curl gnupg2 lsb-release
@hamkewl
hamkewl / backup.conf
Created September 12, 2020 14:37
Linuxマシンの作業ディレクトリの中身をmountしているAWS S3 storageに飛ばしてバックアップするやつ
0 0,6,12,18 * * * /bin/bash interval_backup_aws.sh
@hamkewl
hamkewl / Dockerfile
Last active December 6, 2019 04:59 — forked from cordx56/Dockerfile
Send message when someone join VC channel
# Python 3.7 image on Debian stretch for ARMv7
FROM arm32v7/python:3.6-stretch
# Install pipenv
RUN pip install --default-timeout=100 pipenv
# Set PIPENV_TIMEOUT=1000 to prevent timeout err
ENV PIPENV_TIMEOUT 1000
# Setup pipenv
COPY Pipfile ./
@hamkewl
hamkewl / sumitrust2019c_8803956.java
Created December 5, 2019 18:58
三井住友信託銀行プログラミングコンテスト2019の「C - 100 to 105」
/*
submission #8803956 - User: herp_sy
https://atcoder.jp/contests/sumitrust2019/submissions/8803956
coding: utf-8
lang: Java8 (OpenJDK 1.8.0)
*/
import java.util.*;
import java.util.Collections; // sorting use
# coding: utf-8
# lang: Ruby(2.3.3)
# submission # - User: herp_sy
# https://atcoder.jp/contests/
# ------------------------------------------------------------
## stdin,stdout utility
# str = gets
# strArray = gets.split('')
# strLines = readlines.map(&:chomp)
@hamkewl
hamkewl / agc034a_NoSubmittion.c
Last active July 14, 2019 16:24
どうしてもシュミレーションで解いてみたいけど実装が終わらなそうなので
/*
submission # - User: herp_sy
https://atcoder.jp/contests/
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>
/*
submission # - User: herp_sy
https://atcoder.jp/contests/
coding: utf-8
lang: Java8 (OpenJDK 1.8.0)
*/
import java.util.*;
import java.util.Collections; // sorting use
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.8.2)
import math
import statistics
import numpy as np
import queue