Skip to content

Instantly share code, notes, and snippets.

View kmaehashi's full-sized avatar
📛

Kenichi Maehashi kmaehashi

📛
View GitHub Profile
@jfut
jfut / robocopy-backup-full.bat
Created October 6, 2021 04:45
Robocopy Backup
@echo off
::
:: フルバックアップ
::
:: 1. robocopy バックアップ
:: 2. バックアップ元のすべてのファイルのアーカイブ属性を Off に設定
:: 3. バックアップ先ディレクトリの隠し属性削除
:: 注意: 1. 実行後、2. の実行までに更新されたファイルは、
:: バックアップから漏れますが許容することにします。
::
@kawaz
kawaz / find-iphone.sh
Created September 16, 2019 02:14
iphoneを探すのメモ
#!/bin/bash
username='apple-id@example.com'
password='apple-id-no-password'
authheader="Authorization: Basic $(echo -n "$username:$password" | base64)"
url_initClient="https://fmipmobile.icloud.com/fmipservice/device/$username/initClient"
url_playSound="https://fmipmobile.icloud.com/fmipservice/device/$username/playSound"
# initClient
curl -vXPOST "$url_initClient" -H "$authheader" > initClient.json
@mugifly
mugifly / morninp.md
Last active December 28, 2020 03:52
Unofficial CLI command for mornin'+ (mornin' plus) smart curtain.

morninp.py

Unofficial CLI command for mornin'+ (mornin' plus) smart curtain.

Requirements: Python 3, bluepy 3.2+, pycryptodome 3.6+


GoでISUCONを戦う話

mercari.go #4 https://mercari.connpass.com/event/105640/

自己紹介

  • catatsuyというIDで各種SNS活動しています
    • かたついって呼ばれています
  • メルカリのSREチームで主にGoを書いています
  • 前職はピクシブでpixivのHTTPS化・PHP7.1化・HTTP/2化や、広告サーバーの新機能追加など色々やっていました
@hrsma2i
hrsma2i / cosine_annealing.py
Last active November 18, 2019 07:59
# Chainer SGDR, Cosine Annealing
from math import cos, pi
import numpy
from chainer.training import extension
class CosineAnnealing(extension.Extension):
def __init__(self, lr_max, lr_min=0, T_0=1, T_mult=2,
optimizer=None):
super(CosineAnnealing, self).__init__()
@ZhijianChan
ZhijianChan / Readme.md
Last active September 3, 2018 11:35
Multi-GPU GEMM comparison between PyTorch & Cupy

Snippets for Multi-GPU GEMM with PyTorch & Cupy

Steps to visualize kernel execution details

  1. Generate .nvprof files
    nvprof -o pytorch.nvprof -f python3 test_pytorch.py
    nvprof -o pytorch_mp.nvprof -f python3 test_pytorch_mp.py
    nvprof -o cupy.nvprof -f python3 test_cupy.py
    nvprof -o cupy_mp.nvprof -f python3 test_cupy_mp.py
@beam2d
beam2d / new-style-func-guideline.md
Last active February 23, 2018 01:20
New-Style Function Implementation Guideline

New-Style Function Implementation Guideline

This is a guideline to give the standard way of implementing a new-style function in Chainer. Different developers can align the coding style by writing implementations based on this document.

Basics

A new-style function implementation consists of at least two elements: an implementation of FunctionNode and a user interface function.

@kmaehashi
kmaehashi / sbstat-output.json
Last active March 17, 2017 07:37
Output of `sbstat --json`
{
"runtime_status": {
"hostname": "localhost",
"user": "kenichi",
"gomaxprocs": 4,
"goversion": "go1.6.2",
"goroot": "/home/kenichi/local/go",
"pid": 18742,
"num_cpu": 4,
"working_directory": "/home/kenichi/Development/sensorbee-iris-jubatus",
@yamori813
yamori813 / gist:c50428445ec6a1ff39defc125362adcf
Last active June 26, 2017 08:43
Jubatus build on FreeBSD 10.3R/amd64
必要なパッケージをインストールします
% sudo pkg install gcc48
gcc49にしなかったのは特に理由はないです。
% sudo pkg install pkgconf
% sudo pkg install python27
@kmaehashi
kmaehashi / README.md
Last active February 15, 2016 11:17
Jubatus AMI の作成手順

AMI作成手順

  1. Ubuntu Server 12.04 LTS (x86_64) HVM イメージでインスタンスを作成
  2. root ユーザとしてログインし、 run_root.sh を実行
  3. ubuntu ユーザとしてログインし、run_user.sh を実行
  4. インスタンスをシャットダウン
  5. EBS のスナップショットを作成
  6. 作成されたスナップショットに対して AMI を作成