Skip to content

Instantly share code, notes, and snippets.

View kashewnuts's full-sized avatar

Kashun YOSHIDA kashewnuts

View GitHub Profile
@kashewnuts
kashewnuts / actionlist.vim
Created December 13, 2018 11:51 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@kashewnuts
kashewnuts / apt_install.log
Created October 28, 2018 04:02
Ubuntu18.04LTSでpython3-devとpython3-pipを入れるときの依存関係
vagrant@ubuntu-bionic:~$ sudo apt install python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dh-python libexpat1-dev libpython3-dev libpython3-stdlib libpython3.6 libpython3.6-dev libpython3.6-minimal
libpython3.6-stdlib python3 python3-minimal python3-venv python3.6 python3.6-dev python3.6-minimal python3.6-venv
Suggested packages:
python3-doc python3-tk python3.6-doc binfmt-support
The following NEW packages will be installed:
@kashewnuts
kashewnuts / pyls_memo.md
Last active October 11, 2018 04:03
python-language-serverを試したとき補完が効かないモジュールがあるので記録を残す

前提とする環境

  • OS: macOS Sierra, Ubuntu18.04LTS Desktop
  • Python: 3.6.4(macOS 公式インストーラ), 3.6.6(Ubuntuデフォルト)
  • Vim: macvim-kaoirya, apt install vim-gnome して入ったもの
  • 仮想環境: あるなし関係なくモジュールの補完がうまくいかないものがある
    • なし→Python3.6が動く
    • venv
    • pipenv
@kashewnuts
kashewnuts / constraints.txt
Created October 6, 2018 07:08
MachineLearning用 Jupyter Notebook環境 requirements.txt
ipython==6.5.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
jedi==0.13.0
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0
@kashewnuts
kashewnuts / vim-lsp_async-related_pyls.vimrc
Created October 3, 2018 03:18
Vim8でvim-lspとasyncomplete関連でpylsを使う(細かいオプションは省略)
@kashewnuts
kashewnuts / .vimrc
Created October 3, 2018 00:23
vim-lspを試そうとしたがomnifuncが設定されないのか動かない
let s:plug_dir = '~/.cache/plugged'
call plug#begin(s:plug_dir) " {{{
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
call plug#end() " }}}
" --- vim-lsp --- {{{
if executable('pyls')
" pip install python-language-server
autocmd User lsp_setup call lsp#register_server({
@kashewnuts
kashewnuts / tox
Created September 6, 2018 17:20
Ubuntu18.04LTSの/usr/share/bash-completion/completions/toxで補完が効かないので修正したcompletionsファイル
# tox completion -*- shell-script -*-
_tox()
{
local cur prev words cword split
_init_completion -s || return
case $prev in
-h|--help|--version|-n|--num|-i|--index-url|--hashseed|--force-dep)
return
@kashewnuts
kashewnuts / filter.md
Created August 2, 2018 14:26
Python2と3のfilterの違い
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [-1, 3, -5, 7, -9]
>>> filter(lambda x: abs(x) > 5, a)
[7, -9]
>>>
@kashewnuts
kashewnuts / .bashrc
Last active June 30, 2022 14:45
peco & ghq でいい感じにした bashrc (関連部分だけ抜粋)
# bash history
export HISTSIZE=10000
export HISTCONTROL=ignoreboth # ignorespace+ignoredups = ignoreboth
export HISTIGNORE="ls:fg*:history*"
# peco
function peco-repo() {
local selected_file=$(ghq list --full-path | peco --query "$LBUFFER")
if [ -n "$selected_file" ]; then
if [ -t 1 ]; then
@kashewnuts
kashewnuts / python-and-pip-command-list.txt
Last active August 9, 2017 15:59
Python & pipコマンド一覧
kashewnuts@kashew-mbp:~$
python
python python2.6-config python3-config python3.5m-config pythonw
python-config python2.7 python3.5 python3.6 pythonw2
python2 python2.7-config python3.5-32 python3.6-config pythonw2.6
python2-config python3 python3.5-config python3.6m pythonw2.7
python2.6 python3-32 python3.5m python3.6m-config
kashewnuts@kashew-mbp:~$
python -V
Python 2.7.10