This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr> | |
<td class="data"><small>100-0001</small></td> | |
<td class="data"><small>東京都</small></td> | |
<td class="data"><small>千代田区</small></td> | |
<td> | |
<div class="data"> | |
<p><small><a href="zipcode.php?pref=13&city=1131010&id=46366&merge=">千代田</a></small></p> | |
<p class="comment"><small>チヨダ</small></p> | |
</div> | |
</td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "open3" | |
require "time" | |
task :add_release_tag do | |
day = Time.now.strftime("%Y%m%d") | |
ver = 0 | |
tag = "#{day}.#{ver}" | |
while Open3.capture3("git show #{tag}")[2].exitstatus == 0 | |
ver += 1 | |
tag = "#{day}.#{ver}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.math | |
import scala.util.Random | |
import MatrixImplicits._ // 自作のimplicit classによるSeqラッパ | |
class dA(train_N: Int, n_visible: Int, n_hidden: Int, seed: Int) { | |
val rng = new Random(seed) | |
var W = Seq.fill(n_hidden, n_visible)(uniform(-1.0 / n_visible, 1.0 / n_visible)) | |
var hbias = Seq.fill(n_hidden)(0.0) | |
var vbias = Seq.fill(n_visible)(0.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (size_t i = 1; i < 10; i++) { | |
std::cout | |
<< "[csv] " | |
<< i | |
<< ", " << std::string(i, 'x') | |
<< ", " << std::boolalpha << (i % 2 == 0) | |
<< "\n"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.mapbox.accessToken = '<your access token here>' | |
# MIT-licensed code by Benjamin Becquet | |
# https://github.com/bbecquet/Leaflet.PolylineDecorator | |
class L.RotatedMarker extends L.Marker | |
constructor: (pos, options) -> | |
super(pos, options) | |
@angle = 0 | |
_setPos: (pos) -> | |
super(pos) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val vec = (1 to 10). | |
filter(i => i % 2 != 0). | |
map(i => i * i). | |
toVector | |
print(vec.mkString(",")) // 1,9,25,49,81 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
// vectorのラッパークラス | |
template<typename T> | |
class Foo { | |
std::vector<T> data_; | |
public: | |
Foo(const std::vector<T>& data) : data_(data) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class QiitaTeamUser(url_name: String) | |
case class QiitaTeamPost(title: String, user: QiitaTeamUser, raw_body: String) | |
object Main extends App { | |
splitQiitaTeamJson("C:\\TEMP\\123456789.json") // エクスポートしたJSONファイルのパス | |
def splitQiitaTeamJson(file: String) { | |
using(scala.io.Source.fromFile(file, "UTF-8")) { source => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> Seq(1, 2, 3).view.map(_ + 1).map(_ * 2) | |
res0: scala.collection.SeqView[Int,Seq[_]] = SeqViewMM(...) | |
scala> res0.force | |
res1: Seq[Int] = List(4, 6, 8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sbt.version = 0.13.6 |