Skip to content

Instantly share code, notes, and snippets.

@higumachan
higumachan / shomei.svg
Created May 4, 2023 17:08
chatgpt-svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@higumachan
higumachan / hellloworld.rs
Last active May 4, 2023 15:47
helloworld.rs
fn main() {
println!("Hello, world!");
}
@higumachan
higumachan / command.sh
Last active July 5, 2022 07:47
いい感じに検索しながらpreview
sk --ansi -i -c 'ag --color "{}"' --preview "python preview.py {}"
from pathlib import Path
import tvm
from chainer import Variable
from chainer.links import ResNet50Layers
from tvm import relay
from tvm.contrib import graph_runtime
import numpy as np
import torch
import torchvision
syntax on
set autoindent
"バックアップファイルを作るディレクトリ
set backupdir=$HOME/.vimbackup
"ファイル保存ダイアログの初期ディレクトリをバッファファイル位置に設定
set browsedir=buffer
"クリップボードをWindowsと連携
"set clipboard=unnamed
@higumachan
higumachan / rails_admin_import.ja-MX.yml
Created August 26, 2017 03:37
A japanese translation for stephskardal/rails_admin_import (https://github.com/stephskardal/rails_admin_import) Raw
ja:
admin:
actions:
import:
title: "%{model_label} をインポート"
menu: "インポート"
breadcrumb: "インポート"
link: "インポート"
bulk_link: "インポート"
done: "一括作成"
@higumachan
higumachan / gist:107533b59378db8f0323ecab6e787187
Created August 26, 2017 03:36
A japanese translation for stephskardal/rails_admin_import (https://github.com/stephskardal/rails_admin_import)
ja:
admin:
actions:
import:
title: "%{model_label} をインポート"
menu: "インポート"
breadcrumb: "インポート"
link: "インポート"
bulk_link: "インポート"
done: "一括作成"
from itertools import imap
import timeit
if __name__ == '__main__':
cached_time = timeit.timeit("map(_ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1, xrange(1000))", setup="from pyscalambda import _", number=100)
nocached_time = timeit.timeit("map((_ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1).nocache(), xrange(1000))", setup="from pyscalambda import _", number=100)
print(cached_time, nocached_time)
@higumachan
higumachan / vs2.py
Last active January 21, 2017 01:25
from pyscalambda import _ as _1
from fn import _ as _2
from itertools import imap
import timeit
if __name__ == '__main__':
fnpy_time = timeit.timeit("map(_ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1, xrange(1000))", setup="from fn import _", number=100)
pyscalambda_time = timeit.timeit("map(_ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1, xrange(1000))", setup="from pyscalambda import _", number=100)