2018-01-01から1年間の記事一覧
slashbox.styを用いる。 以下のサイトからダウンロードできる https://ctan.org/tex-archive/macros/latex/contrib/slashbox \usepackage{slashbox} \backslashbox{A}{B} 参考 https://www.biwako.shiga-u.ac.jp/sensei/kumazawa/tex/slashbox.html
# tlidは信号機のid time = traci.trafficlight.getNextSwitch(tlid) - traci.simulation.getCurrentTime() print(time)
# スクリーンショット用↲ ids = traci.gui.getIDList() traci.gui.screenshot(ids[0],"test.pdf")
サンプルコード 省略 plt.legend(bbox_to_anchor=(1.05, 1), loc='upper left', borderaxespad=0) # 右上に出す plt.subplots_adjust(left = 0.1, right = 0.7) # ここで、図がキャンバス内に収まるように調整する
サンプルコード from xml.dom import minidom 省略 xmlstr = minidom.parseString(ET.tostring(root)).toprettyxml(indent=" ") with open("xml.xml", "w") as f: f.write(xmlstr) 参考 https://stackoverflow.com/questions/28813876/how-do-i-get-pythons-…
モデルの保存 # モデルの保存 json_model = model.to_json() with open("model.json", "w") as f json.dump(text, f) # パラメータの保存 model.save_weights("param.hdf5") 保存したモデルの読み込み from keras.models import model_from_json # モデルの…
サンプルコード import xml.etree.ElementTree as ET tree = ET.ElementTree(file="file.xml") # xmlを読み込む root = tree.getroot() element = ET.Element("vType") # 要素の作成 element.set("A", "a") # 属性の追加 root.insert(0, element) # 作成した…
まずは、信号機の設定が記述してあるファイル net.xml <tlLogic id="1/2" type="static" programID="0" offset="2">↲ <phase duration="33" state="GGGggrrrrrGGGggrrrrr"/>↲ <phase duration="3" state="yyyggrrrrryyyggrrrrr"/>↲ <phase duration="6" state="rrrGGrrrrrrrrGGrrrrr"/>↲ <phase duration="3" state="rrryyrrrrrrrryyrrrrr"/>↲ </phase></phase></phase></phase></tllogic>
サンプルコード \begin{document} \tableofcontents % 目次の表示 \section{}
以下のサイトからzip のダウンロード https://ctan.org/pkg/todonotes ダウンロードしたzipを解凍して、以下のコマンドを実行 latex todonotes.ins 生成されてtodonotes.styを読み込んで使う
oandpyをpipでインストールする方法 pip install git+https://github.com/oanda/oandapy.git
以下のコードを同じフォルダにいれる。 基本的に、最初のサンプルプログラムであるhello サンプルを変更しただけ。 manifest.json { "name": "Hello Extensions", "description" : "Base Level Extension", "version": "1.0", "browser_action": { "default_…
nkf のインストール sudo apt-get install nkf 文字コードのチェック nkf -g data.csv utf-8に変換 nkf -w --overwrite data.csv
基本的に以下のサイト通りにやればできる http://d.hatena.ne.jp/akishin999/20131024/1382569289 http://cohama.hateblo.jp/entry/2013/08/11/020849
記号関連 ドイツ文字など 括弧関連 なぜなら 等号関連 集合関連 参考 max 比例 定義 参考 記号関連 入力 出力 メモ \widetilde{a} $\widetilde{a}$ \bar{a} $\bar{a}$ \tilde{a} $\tilde{a}$ \because $\because$ なぜなら ドイツ文字など https://phasetr.c…
条件付き確率について 以下の参考サイトがものすごくわかりやすい。 https://mathtrain.jp/jyokentsuki 上記のサイトのベン図を元に $$ P(B \mid A) = \frac{P(A \cap B)}{P(A)} $$ を導出する。 参考サイトからわかるように、 $$ P(A) = \frac{|A|}{|n|} \\…
sudo apt-get install libxerces-c-dev
sudo apt-get install libtool
sudo apt-get install autotools-dev
以下のようなコマンドをzshで実行すると pip install gym[atari] 以下のようなエラーが発生する zsh: no matches found: gym[atari] かっこ([])などはエラーで引っかかる エスケープする必要がある なので、以下のようにする pip install gym\[atari\]
File -> setting -> Tools -> terminal Shell pathをcmd.exe からbash.exeにする
gitの操作方法のメモ remote branchをローカルでチェックアウトする git checkout -b local_branch_name origin/remote_branch_name 参考 https://qiita.com/YusukeSuzuki@github/items/3bd5752783fd2c2f8805
以下の手順で、図形の設定を行う画面がでる 書式 スタイル 影月オブジェクト
http://www.dlr.de/ts/en/desktopdefault.aspx/tabid-9883/16931_read-41000/ 上記のサイトのDownloadsのSUMO * for Windowsをクリックし、msiファイルをダウンロード 後はダウンロードしたmsiファイルを実行すれば良い
https://www.archlinux.site/2018/03/windows-10ubuntuusb.html 上記のサイトが通りに行うのが一番容易だった
import random random.randint(a,b) # a以上b未満のランダムな整数を返す
一様収束 D上で定義された関数列 ${f_n}$ に対し $f_n \rightarrow f$が一様収束する必要十分条件は $$ | f_n(x) - f(x) | \rightarrow 0 $$ 例 次のような関数列を考える $$ f_n (x) = \frac{x}{n}, 0 \leq x \leq -6 $$ の極限関数fはf(x) = 0 nを固定して…
chrome インストール skype インストール ソフトウェアマーケットで検索すれば出てくる terminator のインストール sudo apt-get install terminator gitのインストール sudo apt-get install git git config --global core.editor vim ctrl capslock入れ替…
参考サイト https://www.hiroom2.com/2017/09/15/ubuntu-1604-android-studio-2-3-ja/
参考文献 基本的に参考文献通りにインストールすれば良い https://www.poly-rhythm.com/install-swift-to-ubuntu/ 手順(完全に自分用) sudo apt-get install clang libicu-dev https://swift.org/download/#releases からダウンロード ダウンロードしたファ…