Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Atsushi Sakai AtsushiSakai

:octocat:
View GitHub Profile
View ipopt_segmentation_fault_example.jl
import Base.Threads.@spawn
using Ipopt
# hs071
# min x1 * x4 * (x1 + x2 + x3) + x3
# st x1 * x2 * x3 * x4 >= 25
# x1^2 + x2^2 + x3^2 + x4^2 = 40
# 1 <= x1, x2, x3, x4 <= 5
# Start at (1,5,5,1)
@AtsushiSakai
AtsushiSakai / numerical_integration_py.ipynb
Last active Jun 29, 2017
Numerical Integration Sample
View numerical_integration_py.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View scipy.interpolate.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AtsushiSakai
AtsushiSakai / scipy.interpolate
Created May 30, 2017
scipy interpolate sample
View scipy.interpolate
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"toc": "true"
},
"source": [
"# Table of Contents\n",
" <p><div class=\"lev1\"><a href=\"#scipy.interpolate-sample\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>scipy.interpolate sample</a></div><div class=\"lev2\"><a href=\"#一次元の補間\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>一次元の補間</a></div><div class=\"lev3\"><a href=\"#線形補間\"><span class=\"toc-item-num\">1.1.1&nbsp;&nbsp;</span>線形補間</a></div><div class=\"lev3\"><a href=\"#最近傍補間\"><span class=\"toc-item-num\">1.1.2&nbsp;&nbsp;</span>最近傍補間</a></div>"
@AtsushiSakai
AtsushiSakai / eachZip.sh
Created Feb 15, 2015
Shell script to zip each directory in the current directory
View eachZip.sh
#!/bin/bash
# zip each directory
find . \! -name '*.zip' \! -name '.' -type d -exec zip -r {}.zip {} \;
View Topics2CSV.py
#!/usr/bin/env python
import rospy
import sys
import socket
import rosgraph
import roslib.message
def msgevalgen(pattern):
"""
Generates a function that returns the relevant field (aka 'subtopic') of a Message object
@AtsushiSakai
AtsushiSakai / AStarSamle.m
Last active Aug 29, 2015
A*による最短経路探索MATLABプログラム
View AStarSamle.m
function [] = AStarSample()
%AStarSample() A*法による最短経路探索プログラム
%
% Author: Atsushi Sakai
%
% Copyright (c) 2014, Atsushi Sakai
% All rights reserved.
% License : Modified BSD Software License Agreement
clear all;
close all;
@AtsushiSakai
AtsushiSakai / DijkstraSample.m
Last active Aug 29, 2015
ダイクストラ法による最短経路探索プログラム
View DijkstraSample.m
function [] = DijkstraSample()
%DijkstraSample() ダイクストラ法による最短経路探索プログラム
%
% Author: Atsushi Sakai
%
% Copyright (c) 2014, Atsushi Sakai
% All rights reserved.
% License : Modified BSD Software License Agreement
clear all;
@AtsushiSakai
AtsushiSakai / RvizRuler.py
Last active Aug 29, 2015
RvizRuler plugin.xml
View RvizRuler.py
#!/usr/bin/env python
#-*- coding:utf-8 -*-
#
# @brief rviz上で定規の機能をするrqtモジュール
# @author Atsushi Sakai
import roslib
roslib.load_manifest('RvizRuler')
import os
import rospy
@AtsushiSakai
AtsushiSakai / MontyHall.py
Last active Aug 29, 2015
モンティ・ホール問題をシミュレーションするPythonプログラム
View MontyHall.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @brief モンティ・ホールゲームを指定した回数実施し、
# 勝った回数を比較するシミュレーションソフト
#
# @Author Atsushi Sakai
import random #乱数発生用