Skip to content

Instantly share code, notes, and snippets.

View ompugao's full-sized avatar

ompugao

View GitHub Profile
@mayataka
mayataka / introduction_to_numerical_optimal_control.ipynb
Last active May 17, 2024 10:25
数値最適制御入門の入門
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mayataka
mayataka / casadi_introduction.md
Last active July 19, 2024 07:59
How to Use CasADi

CasADi とは?

数値最適化用の自動微分&各種ソルバーへのインターフェースツールです. MPCなどでの活用が便利です.

なぜ CasADiを使うのか?

  • 定式化が非常に直感的で使いやすい.
  • かなり変わった定式化にも対応可能(一般的な数値最適化ソルバーであるため)
  • バックエンドソルバーが豊富
  • AutoGenU,ACADO Toolkitといったシンボリック計算MPCツールと比べてトータルの実装時間が圧倒的に高速
@gghatano
gghatano / Dockerfile
Last active December 14, 2021 07:28
atcoderで戦う環境
FROM python:3.8
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
&& apt-get -y install git iproute2 procps lsb-release gdb\
&& apt-get install -y sudo wget curl vim
RUN cd /tmp \
&& git clone https://github.com/atcoder/ac-library.git
@IshitaTakeshi
IshitaTakeshi / LICENSE
Last active December 11, 2019 05:15
Huber weighted IRLS
Copyright (C) 2006, Jonathan E. Taylor
All rights reserved.
Copyright (c) 2006-2008 Scipy Developers.
All rights reserved.
Copyright (c) 2009-2018 statsmodels Developers.
All rights reserved.
@voluntas
voluntas / shiguredo_azuki.rst
Last active January 10, 2022 06:51
WebRTC P2P+MCU Azuki (仮)

WebRTC P2P+MCU Azuki (仮)

日時:2020-05-06
作:時雨堂
バージョン:2020.5

このプロダクトに興味がある人はこの資料に Star をつけてもらえると嬉しいです。

@koron
koron / mydnsjp-update
Last active August 29, 2015 14:24
update mydnsjp entry.
#!/bin/sh
# vim:set sts=2 sw=2 tw=0 et:
(
export LANG=C
export PATH="/usr/local/bin:${PATH}"
id="$1" ; shift
passwd="$1" ; shift
@Bollegala
Bollegala / ADAMvsAdaGrad.py
Created March 10, 2015 18:33
ADAM vs AdaGrad
"""
This program compares ADAM vs AdaGrad. You can modify the function f and its gradient grad_f
in the code, run the two algorithms and compare their convergence. For the simple function
f(x1, x2) = (x1 - 2) ** 2 + (x1 + 3) ** 2, (alpha = 0.1 and tolerence 1e-3)
AdaGrad converged at 2023 iterations, whereas ADAM required only 83!
"""
import numpy
@spiralray
spiralray / 50-udev.rules
Last active October 12, 2016 06:43
install Eclipse and GNU Tools for ARM Embedded Processors on Ubuntu
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d9", MODE="0666"
SUBSYSTEM=="usb", KERNEL=="ttyUSB*", MODE="0666"
SUBSYSTEM=="usb", KERNEL=="ttyACM*", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="3748", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="374b", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", MODE="0666"
@wvengen
wvengen / extend.sh
Last active April 22, 2024 14:02
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@8bit-pixies
8bit-pixies / changeslope.py
Last active May 21, 2022 09:26
Interactive tkinter matlibplot example.
import Tkinter
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure
class App:
def __init__(self, master):
# Create a container
frame = Tkinter.Frame(master)
# Create 2 buttons
self.button_left = Tkinter.Button(frame,text="< Decrease Slope",