Skip to content

Instantly share code, notes, and snippets.

View piyo7's full-sized avatar

Takatomo Torigoe piyo7

View GitHub Profile
@piyo7
piyo7 / build.properties
Created December 3, 2018 01:06
SparkのDataFrame/Datasetって型安全なの? ref: https://qiita.com/piyo7/items/15a37e300e78795b09db
sbt.version=1.2.6
@piyo7
piyo7 / file0.scala
Created November 27, 2018 03:54
スレッドセーフな連想カウンタをリセットしたい人生だった ref: https://qiita.com/piyo7/items/81d1d395733b3cea072c
val counter = TrieMap[Key, LongAdder]()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@piyo7
piyo7 / file0.txt
Last active January 1, 2019 11:22
D-Waveの制約式をイジングモデルに変換するライブラリの仕組みを追ってみた ref: https://qiita.com/piyo7/items/5782576aa97b7449a3cf
a, b, c \in \{-1, 1\} \\
abc = 1 \\
a+b+c < 3
@piyo7
piyo7 / file0.txt
Created November 21, 2017 03:23
N次元のいかつい極座標変換もメソッドチェーンでしゅっと実装できるお ref: https://qiita.com/piyo7/items/73023be87fef02b32132
\begin{align}
x &= r \cos(\phi) \\
y &= r \sin(\phi) \\
\end{align}
@piyo7
piyo7 / file0.txt
Last active December 13, 2017 09:32
吾輩は量子プログラミング言語である。名前はまだ無い。 Microsoftで生れ量子テレポーテーションした事だけは記憶している。 ref: https://qiita.com/piyo7/items/0c80181c567b3075c00f
\newcommand{\ket}[1]{\left| #1 \right\rangle}
\frac{1}{\sqrt{2}}\ket{00} + \frac{1}{\sqrt{2}}\ket{11}
@piyo7
piyo7 / file0.css
Last active July 23, 2017 16:35
ゆるふわチャット小説をGitHubで構築しましたので╭( ・ㅂ・)و ̑ 〜初めてのフロントエンド編〜 ref: http://qiita.com/piyo7/items/f9217292fd8224f7e9f2
.voice-left, .voice-right {
border-radius: 1em;
}
.voice-left {
border-top-left-radius: 0;
}
.voice-right {
border-top-right-radius: 0;
@piyo7
piyo7 / file0.txt
Created June 22, 2017 09:00
Python Pandasはバッチ処理に向いてない ref: http://qiita.com/piyo7/items/2d4444d3e8e7d385c809
>>> s = pd.Series([0, 1, 2])
>>> s[2]
2
>>> s[1] = np.nan
>>> s[2]
2.0
@piyo7
piyo7 / file0.txt
Last active March 26, 2020 16:44
Visual Studio Codeの拡張機能を自作して、理想の執筆環境を手に入れた 〆(゚_゚*) ref: http://qiita.com/piyo7/items/4202189d523572da736a
const decorationIconsColor = vscode.window.createTextEditorDecorationType({
'color': '#c0c0c0'
})
let decorationIconsDict: { [key: string]: TextEditorDecorationType } = {}
function decorateIcons(editor: TextEditor) {
let match: RegExpExecArray = null
let iconLineDict: { [key: string]: number[] } = {}
let iconLines: number[] = []