{"status"=>-204, "error_message"=>"Market state is closed.", "data"=>nil}
This file contains 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
# | |
# | |
# * Async::Container [Getting Started](https://socketry.github.io/async-container/guides/getting-started/index.html) | |
# https://github.com/socketry/async-container/tree/main/examples | |
require 'async/container' | |
Console.logger.debug! | |
# container = Async::Container.new #ok. |
This file contains 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
# | |
# | |
# ==== Reference | |
# * Console [Getting Started](https://socketry.github.io/console/guides/getting-started/index.html) | |
# | |
require 'async' | |
ENV['CONSOLE_LEVEL'] ||= 'debug' | |
# ENV['CONSOLE_LEVEL'] ||= 'info' |
This file contains 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 'async' | |
# | |
clk = Async::Clock.new.tap{|c| c.start! } | |
sleep 1.14514 # pseudo processing. | |
p clk.total |
This file contains 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
# | |
# | |
# | |
# | |
# * [async-websocket](https://github.com/socketry/async-websocket/blob/master/examples/binance/client.rb) | |
# | |
# | |
require 'async' |
- async-websocketを使ったWebSocketクライアント・プログラム
- 2日程度稼働していると, WebSocketサーバからの切断が頻発し始める
- 最終的には下記のようなエラーでasync自体が落ちる
- サーバからの切断はfaye-websocketを使っても, 同様な症状がある
- Pythonではこのような症状は起きないらしい
誰か原因わかりませんか?- →エラーからの復帰の書き方がまずかったっぽい
- まず, 個々のタスクで
rescue
する必要がある.rescue
しないと, そのタスクだけ死んでその他のタスクが生きている限り・リアクターが動き続けるか, プログラム全体が落ちる.
This file contains 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
#! /usr/bin/env ruby | |
# | |
# | |
# ==== See Also | |
# * `../faye/faye-ohlc-plain.rb` | |
# | |
# ==== References | |
# * [Async](https://socketry.github.io/async/) | |
# * [Async Overview](https://socketry.github.io/async/source/index.html) |
This file contains 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 'numo/narray' | |
module Numo | |
module StatisticsPlus | |
def sigma |
This file contains 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
{ | |
"title": "半角/全角キーでIMEトグル2019", | |
"rules": [ | |
{ | |
"description": "JISキーボードの半角/全角キーをIMEのON/OFF切り替えキーに変換する2019", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { "key_code": "grave_accent_and_tilde" }, | |
"to": [ |
NewerOlder