Skip to content

Instantly share code, notes, and snippets.

@westoshy
westoshy / rename_jpeg.bat
Created November 18, 2018 09:36
フォルダ以下のjpegをjpgにリネームするバッチ
for /r /d %i in (*) do ren %i\*.jpeg *.jpg
@westoshy
westoshy / bovw.py
Last active April 30, 2019 13:49
[Bag of Visual Words] #Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import scipy.cluster.vq as vq
from sklearn.datasets import load_digits
from sklearn.cross_validation import train_test_split
def main():
digits = load_digits()
@westoshy
westoshy / memo.md
Last active February 16, 2019 10:47
Juliaの設定

Juliaを使う

IJulia

pkg> add IJulia
using IJulia
notebook()
@westoshy
westoshy / genColorCode.py
Created October 27, 2018 12:18
[RGB値のカラーコード変換] #python
def genColorCode(r, g, b):
return '#' + format(r, 'x') + format(g, 'x') + format(b, 'x')
@westoshy
westoshy / 01_運動方程式の変換.ipynb
Created September 17, 2018 12:57
Sympyによる力学演習
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@westoshy
westoshy / Colaboratory.bat
Created August 12, 2018 12:18
Launch Colaboratory with Google Chrome
:: Open Colabolatory with Google Chrome App Mode
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=https://colab.research.google.com/
@westoshy
westoshy / note.md
Created June 3, 2018 07:54
Jupyterあれこれ

jupyterをappモードで起動する(windows)

次のコマンドで%HOME%/.jupyter/jupyter_notebook_config.pyを生成する.

jupyter notebook --generate-config

c.NotebookApp.browser = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe --app=%s'と設定する.

@westoshy
westoshy / encodeSDmovie.bat
Last active May 30, 2018 14:50
ffmpeg用バッチファイル
@echo off
: 複数の動画ファイルをドラッグ&ドロップしてSD画質の動画像に変換する
if not exist low mkdir SD
for %%f in (%*) do (
ffmpeg -y -i %%f -vf scale=320:-1 SD/%%~nf.mp4
)
@westoshy
westoshy / dijkstra.c
Created April 30, 2018 10:48
ダイクストラ法
#include <stdio.h>
#include <conio.h>
#define MAX_NODES 1024 /* 最大ノード数 */
#define INFINITY 1000000000 /* 無限大 */
// ノードを設定する。
#define TOKYO 0 /* 東京 */
#define YURAKUCHO 1 /* 有楽町 */
#define SHINBASHI 2 /* 新橋 */
@westoshy
westoshy / 等角写像.ipynb
Created January 5, 2018 14:22
等角写像
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.