Skip to content

Instantly share code, notes, and snippets.

@ksomemo
ksomemo / maxargs.m
Created May 27, 2017 16:49
max args in octave matrix
[max_values row_indices] = max(magic(5));
[max_values col_index] = max(row_indices);
row_index = row_indices(col_index);
@ksomemo
ksomemo / display_multiple_df_as_html.py
Last active July 24, 2017 02:31
Notebookに複数のDataFrameを(水平に)出力する+displayについて
import pandas as pd
import IPython.core.display as display
import IPython.display
"""
from IPython.core.display import *
from IPython.lib.display import *
lib.display includes
__all__ = ['Audio', 'IFrame', 'YouTubeVideo', 'VimeoVideo', 'ScribdDocument',
@ksomemo
ksomemo / imp.ipynb
Created January 9, 2017 17:33
Dynamic module Import
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksomemo
ksomemo / make_schedule_table.py
Last active August 11, 2017 00:11
月の予定表のテンプレ(祝日情報付き)
import pandas as pd
import japandas as jpd
import datetime
import tabulate
def make_schedule_table(start_date):
end_date = jpd.to_datetime(start_date) + pd.offsets.MonthEnd(1)
df = pd.DataFrame(dict(date=jpd.date_range(start_date, end_date)))
weekdays = dict(enumerate("月火水木金土日"))
@ksomemo
ksomemo / abbreviation.csv
Last active March 9, 2019 04:00
Add a word and abbr
word japanese note
imo 自分の意見 in my opinion
@ksomemo
ksomemo / df_add_suffix.ipynb
Last active April 1, 2017 06:15
pandas.DataFrame.columnsにsuffixをつける ref: http://qiita.com/ksomemo/items/4d3346a7edc05f3bf9d2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksomemo
ksomemo / matplotlibrc
Created July 10, 2016 11:37
$HOME/.pyenv/versions/anaconda3-2.5.0//lib/python3.5/site-packages/matplotlib/mpl-data/matplotlibrc
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overwritten in your next install.
# If you want to keep a permanent local copy that will not be
# overwritten, place it in the following location:
# unix/linux:
# $HOME/.config/matplotlib/matplotlibrc or
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksomemo
ksomemo / LogisticRegression.ipynb
Last active July 24, 2017 18:00
今更ながらoddsとlogitとlogistic関数
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksomemo
ksomemo / PairGrid.ipynb
Last active August 11, 2017 00:13
seabornのpairplotを実現しているPairGridのメモ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.