Skip to content

Instantly share code, notes, and snippets.

View AkashiSN's full-sized avatar
🏠
Working from home

Akashi_SN AkashiSN

🏠
Working from home
View GitHub Profile
@AkashiSN
AkashiSN / generate_validation.py
Created December 16, 2019 03:59
generate yolo training and validation(test)
#!/usr/bin/env python3
import glob, os, sys
# Current directory
data_dir = sys.argv[1]
print(data_dir)
# Percentage of images to be used for the test set
percentage_test = 10
@AkashiSN
AkashiSN / Dockerfile
Last active December 25, 2019 14:43
Jupyterlab docker
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 as cuda
ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_DRIVER_CAPABILITIES utility,compute
ENV NVIDIA_VISIBLE_DEVICES all
RUN sed -i'~' -E "s@http://(..\.)?(archive|security)\.ubuntu\.com/ubuntu@http://jp.archive.ubuntu.com/ubuntu@g" /etc/apt/sources.list \
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
build-essential \
@AkashiSN
AkashiSN / Dockerfile
Last active April 8, 2020 04:33
7 Days to Die Dedicated Server in Docker
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NOWARNINGS=yes
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository multiverse \
&& dpkg --add-architecture i386 \
&& apt-get update \
@AkashiSN
AkashiSN / dev_tools.sh
Last active January 11, 2021 14:10
Development tool installation script for ubuntu 18.04 LTS
#!/bin/bash
#
# JetBrains ToolBox
#
# Download program.
wget https://download.jetbrains.com/toolbox/jetbrains-toolbox-1.11.4269.tar.gz -P /tmp
# Expand archives.
@AkashiSN
AkashiSN / server.go
Created January 30, 2021 12:55
Simple SSL Static File Server in go
package main
import (
"crypto/tls"
"flag"
"log"
"net/http"
"time"
)
#!/usr/bin/env python3
from mutagen.mp4 import MP4, MP4Cover
from io import BytesIO
from PIL import Image
import pathlib
import math
files = list(pathlib.Path(".").glob("**/*.m4a"))
for f in files:
print(f)
@AkashiSN
AkashiSN / softether-install-vyos1.2.md
Created April 27, 2019 01:25
vyos1.2にSoftEther VPNをインストールする

vyos1.2にSoftEther VPNをインストールする

1.2.0-rolling+201904260337ではgccなどが依存関係によりインストールできないので他のマシンでビルドを行う

Linux router 4.19.36-amd64-vyos #1 SMP Sun Apr 21 10:39:20 CEST 2019 x86_64 GNU/Linux

kernelバージョンは4.19.36のようなので、ubuntu18.10kernelバージョンを4.19.36にあげてビルドを行う

@AkashiSN
AkashiSN / .latexmkrc
Last active December 19, 2021 07:31
LaTeX in Docker with VS Code Remote Development
#!/usr/bin/env perl
$latex = "uplatex -synctex=1 -interaction=nonstopmode -shell-escape -halt-on-error";
$latex_silent = "uplatex -synctex=1 -interaction=batchmode -shell-escape -halt-on-error";
$lualatex = "lualatex -synctex=1 -interaction=nonstopmode -shell-escape -halt-on-error";
$xelatex = "xelatex -synctex=1 -interaction=nonstopmode -shell-escape -halt-on-error";
$bibtex = "upbibtex";
$biber = "biber --bblencoding=utf8 -u -U --output_safechars";
$dvipdf = "dvipdfmx %O -o %D %S";
$makeindex = "upmendex %O -o %D %S";
$max_repeat = 5;
@AkashiSN
AkashiSN / Dockerfile
Created January 21, 2022 14:57
dl_remote (途中で力尽きた奴)
# syntax = docker/dockerfile:1.3-labs
ARG UBUNTU_VERSION=20.04
ARG CUDA_SDK_VERSION=11.3.0
FROM nvidia/cuda:${CUDA_SDK_VERSION}-devel-ubuntu${UBUNTU_VERSION}
SHELL ["/bin/sh", "-e", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES all
@AkashiSN
AkashiSN / winget.txt
Last active January 25, 2022 01:13
My favorite Windows package list
AgileBits.1Password
7zip.7zip
GnuPG.Gpg4win
Nextcloud.NextcloudDesktop
WireGuard.WireGuard
OpenVPNTechnologies.OpenVPNConnect
Adobe.Acrobat.Reader.64-bit
Microsoft.Office
Microsoft.VC++2015-2022Redist-x86