bethebest0622

Results 39 issues of bethebest0622

I see the demo self-defined loss function: ``` class RMSEObjective(object): def calc_ders_range(self, approxes, targets, weights): assert len(approxes) == len(targets) if weights is not None: assert len(weights) == len(approxes) result =...

objectives and metrics

Hi, sir or madam. could you provide a demo for async get/post client request with a custom response handle function? assume the request url is: https://api.coinex.com/v1/market/detail\?market\=BTCUSDT the response is a...

libcurl easy_perform is easy to use, buy it's sync. so, can curlpp do async easily, could you let me know which example show that?

I am using libwebsockets to build connection with ws server, and receive data from server (Binance) after i built connection, I got these event type regularly (every several minutes): ```...

你好,感谢开源,学习到很多。 目前有一个棘手的问题,就是我的程序,接收外部输入,每一次输入,对应一次http请求,服务器响应比较慢,同步的请求会使得程序io阻塞500ms,这500ms中可能有其他请求要处理,或者是需要进行其他操作,所以我希望http请求的操作是异步的。 异步的意思是我希望我的http请求函数可以立刻返回,在http请求返回数据的时候(500ms之后会返回json),通过事先注册的回调处理返回的json数据。 希望的函数签名是这样: ``` void http_request(const std::string & request_url, const std::string & header, std::function & func) { } ``` 之前有过一些调研,奈何码力不足,一直没有解决,应该是要使用协程 + http网络操作实现,不知道可否给予一些指导?感谢 ps. 比较注重性能和速度

Hi, good job on wrapping libcurl. could you also provide a async call like this? `async_get(const std::string & url, std::functioncallback)` thanks a lot

``` int main() { co_sched.goStart(0); timeval t; gettimeofday(&t, NULL); go [] {}; timeval t2; gettimeofday(&t2, NULL); int latency = (t2.tv_sec - t.tv_sec) * 1000000 + (t2.tv_usec - t.tv_usec); printf("cost %d\n",...

你好,libgo非常友好。 我是初学者,想请教一个实际场景: 我有一个不定时的命令接收模块,每次有命令时 我需要: 发送http post请求,并处理返回的json 最基础的版本是同步处理这些请求,问题是: http post请求比较慢(100ms),有的时候命令非常密集(1s内有1000个) 我不希望程序阻塞在http post请求这里,希望借用libgo协程处理的方式,做到比较好的性能。 可是我发现libgo的tutorial里面,都是先创建好go对象,然后调用调度器start,这一点似乎和go语言不尽相同,go语言只需要在函数前面加上go,它就会自动调度执行,而libgo,需要显式调用start,对于流式数据,有没有更好的办法呢? 有相应的demo或者您是否愿意指教一下呢? 万分感谢

could you add a async demo which just send get/post requests? assume the url is `https://api.binance.com` the operation is `GET /api/v3/time`?

I read the async demo, it's very easy and elegant. ``` void fun(Context& ctx) { auto reply = ctx.Get("http://jsonplaceholder.typicode.com/posts/1"); auto json = reply->GetBodyAsString(); } rest_client->Process(fun); ``` but, can i pass...

question