Skip to content

Instantly share code, notes, and snippets.

View Lewuathe's full-sized avatar
🈂️
👍

Kai Sasaki Lewuathe

🈂️
👍
View GitHub Profile
@summerwind
summerwind / README.md
Last active June 22, 2016 01:57
L3DSR Test Client

L3DSR Test Client

This code is tested on Ubuntu 16.04.

Setup

Install scapy.

$ sudo apt-get install scapy
@EderSantana
EderSantana / CATCH_Keras_RL.md
Last active June 22, 2024 17:07
Keras plays catch - a single file Reinforcement Learning example
@dave-andersen
dave-andersen / kmeans.py
Last active September 1, 2022 11:15
k-means in Tensorflow
import tensorflow as tf
import numpy as np
import time
N=10000
K=4
MAX_ITERS = 1000
start = time.time()
@staltz
staltz / migration-guide.md
Last active December 19, 2023 22:14
How to show migration guides in GitHub Markdown

How to show migration guides in GitHub Markdown

Use the diff code highlighting tag.

  ```diff
  - foo
  + bar

Example:

@sunaot
sunaot / writing_unit_test.md
Last active February 20, 2022 06:57
テストを書くか書かないかの判断の話

ユニットテストでテストを書くか書かないかの判断の話

お題

メソッドの出力の結果が、true か false のどちらでも返ってくる可能性がある場合、assert 文を書く時は true の場合だけで良いのだろうか

テストとは

まず、基本の考えとしてなぜテストをするのか?というのがあります。

@SpainTrain
SpainTrain / circle.yml
Created September 21, 2015 17:26
CircleCI machine config for node-gyp with Node v4.X
machine:
node:
version: 4.1
pre:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install gcc-4.9 g++-4.9
post:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
@scova0731
scova0731 / scala-learning-resource.md
Created February 27, 2015 04:02
Scala 学習リソース (2015/2版)

定番、および比較的最近の学習リソースを集めてみました (2015/2)。

リファレンス

記事等

@descico
descico / presto-code-split.md
Last active August 13, 2017 01:50
Presto の話。ただし最近ほとんど触っていなかったので情報は古いので注意せよ。

Split を worker Node に割り当てる処理について

  • やっているのは NodeScheduler のcomputeAssignments のようだ。
  • locationAwareScheduling と isRemotelyAccessible() によって処理は分岐する、と考えておいて良い
  • ここでしばしば紹介される minCandidates パラメータが登場する。コードを読む限り、これ、「Split を処理する Node の候補をいくつ選ぶか」というだけであるっぽい。
  • 少なくとも minCandidates の数だけ Node を選び、その中から現在持っているタスクが少ない Node を選んでいるのである。
  • だから、 minCandidates は別に並列度とは関係ないわけで、結果的にパフォーマンスに寄与するかどうかは微妙な感じもある。
  • "max number of workers to run a stage in parallel (default: 10) " という説明は誤りなのではないか、という話。
  • この minCandidates が node-scheduler.min-candidates であることも確認済みである。
  • 指摘もあったが誰も反応していない https://groups.google.com/forum/#!msg/presto-users/Ft71bkwElkQ/v85ROXC82hIJ
@gakuzzzz
gakuzzzz / 1_.md
Last active August 2, 2023 01:59
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();