How to get NRDP configured for State=0, State=1, State=2 and State=3

Hi
I am trying to get NRDP configure for alerts on nagios and tried with the example available online but it's not working and not sure how to get other states too.
Version
kibana-6.2.4-1
/usr/share/kibana/bin/kibana-plugin list
<EMAIL_ADDRESS>but the version I have downloaded is
https://github.com/sirensolutions/sentinl/releases/download/tag-6.2.3-1/sentinl-v6.2.2.zip
NRDP check states:
State can only be one of 4 statuses:
0 => OK
1 => Warning
2 => Critical
3 => Unknown
What I am expecting from the NRDP watch run is
When the "payload.hits.total > 10" the State should be as warning =1 and collect the data from that hits and send it to nagios.
On next watcher run check if the "payload.hits.total is below or equal to 10 then it should change the state to OK=0 and send OK message or no errors found.
When the "payload.hits.total > 30" the State should be as Critical =3 and collect the data from that hits and send it to nagios.
Here is my watchers code
{
    "New webhook action h0r0p2zatnu": {
      "throttle_period": "0h0m1s",
      "webhook": {
        "method": "POST",
        "host": “nagios.domain.com”,
        "port": 80,
        "proxy": false,
        "path": ":/nrdp",
        "body": "\"token=‘some-token’ & cmd=submitcheck & XMLDATA=<?xml version='1.0'?><checkresults>{{#ctx.payload.hits.total}} <checkresult type='service' checktype='1'>\"{{#payload.hits.hits}}\"<hostname>{{node3}}</hostname><servicename>Cron_Error</servicename><state>1</state><output>\"{{#payload.hits.hits}} {{ _source.message }}\"</output></checkresults></xml>\"",
        "use_https": false
      }
    }
  },
  "input": {
    "search": {
      "request": {
        "index": [],
        "body": {
          "query": {
            "bool": {
              "must": {
                "term": {
                  “Cron_function”: "Cron_Error"
                }
              },
              "should": [
                {
                  "term": {
                    "tag": “cron”
                  }
                }
              ],
              "filter": {
                "range": {
                  "@timestamp": {
                    "gt": "now-5m"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "condition": {
    "script": {
      "script": "payload.hits.total > 10"
    }
  },
  "transform": {},
  "trigger": {
    "schedule": {
      "later": "every 1 minutes"
    }
  },
  "disable": true,
  "report": false,
  "title": “CronErr_query"
}

Any help is really appreciated.
Thank You,

@manish2479 So you're trying to preserve state generated from one level to another? Script conditions are very flexible in my opinion, though I think some with more experience should step up here and provide some input. Another solution would be to create different for each level ?

@manish2479 please provide a sample of data you have in Elasticsearch?
If you query Elasticsearch manually, do you receive the results you want? Do this
curl -X GET "localhost:9200/_search?pretty" -H 'Content-Type: application/json' -d'
{
  "query": {
    "bool": {
      "must": {
        "term": {
          “Cron_function”: "Cron_Error"
        }
      },
      "should": [
        {
          "term": {
            "tag": “cron”
          }
        }
      ],
      "filter": {
        "range": {
          "@timestamp": {
            "gt": "now-5m"
          }
        }
      }
    }
  }
}
'

Hi Sergi,
Yes I do get data and here is the query sample output.
{
  "took" : 71,
  "timed_out" : false,
  "_shards" : {
    "total" : 1177,
    "successful" : 1177,
    "skipped" : 1172,
    "failed" : 0
  },
  "hits" : {
    "total" : 80,
    "max_score" : 0.63436246,
    "hits" : [
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "Tp1TRGYBBxA34FsmbQWs",
        "_score" : 0.63436246,
        "_source" : {
          "offset" : 1940728,
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:03:29.108Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:03:22 noden6 kernel: [1535572967.071651] Cron_Error: Skipped 2 previous similar messages",
          "cron_source" : "check_crons",
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          }
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "Sp1TRGYBBxA34FsmbQWl",
        "_score" : 0.63436246,
        "_source" : {
          "offset" : 1942305,
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:03:29.108Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:03:24 noden1 kernel: [1535572966.978553] Cron_Error: Skipped 2 previous similar messages",
          "cron_source" : "check_crons",
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          }
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "UJ1TRGYBBxA34FsmbQWt",
        "_score" : 0.63436246,
        "_source" : {
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          },
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:03:29.108Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:03:26 noden7 kernel: [1535572967.084495] Cron_Error: Skipped 2 previous similar messages",
          "offset" : 1942461,
          "cron_source" : "check_crons"
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "U51TRGYBBxA34FsmbQWv",
        "_score" : 0.63436246,
        "_source" : {
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          },
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:03:29.108Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:03:26 noden2 kernel: [1535572967.009380] Cron_Error: Skipped 2 previous similar messages",
          "offset" : 1942760,
          "cron_source" : "check_crons"
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "X51TRGYBBxA34FsmbQW0",
        "_score" : 0.63436246,
        "_source" : {
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          },
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:03:29.108Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:03:26 noden4 kernel: [1535572966.906165] Cron_Error: Skipped 1 previous similar message  ",
          "offset" : 1942902,
          "cron_source" : "check_crons"
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "Wp1TRGYBBxA34FsmbQWz",
        "_score" : 0.63436246,
        "_source" : {
          "offset" : 1940428,
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:03:29.108Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:03:19 noden9 kernel: [1535572966.894810] Cron_Error: Skipped 1 previous similar message",
          "cron_source" : "check_crons",
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          }
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "ep1URGYBBxA34Fsm-AUw",
        "_score" : 0.63436246,
        "_source" : {
          "offset" : 1946477,
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:05:10.111Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:05:05 noden10 kernel: [1535572967.112690] Cron_Error: Skipped 3 previous similar messages",
          "cron_source" : "check_crons",
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          }
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "g51URGYBBxA34Fsm-AU2",
        "_score" : 0.63436246,
        "_source" : {
          "offset" : 1946321,
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:05:10.111Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:05:03 noden17 kernel: [1535572966.671520] Cron_Error: Skipped 1 previous similar message",
          "cron_source" : "check_crons",
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          }
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "aZ1URGYBBxA34FsmAwUX",
        "_score" : 0.63436246,
        "_source" : {
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          },
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:04:06.110Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:04:05 noden13 kernel: [1535572966.613536] Cron_Error: Skipped 5 previous similar messages",
          "offset" : 1943883,
          "cron_source" : "check_crons"
        }
      },
      {
        "_index" : "filebeat-2018.10.05",
        "_type" : "doc",
        "_id" : "o51VRGYBBxA34Fsm7gWG",
        "_score" : 0.63436246,
        "_source" : {
          "offset" : 1950420,
          "Cron_function" : "Cron_Error",
          "source" : "/var/log/messages",
          "tags" : [
            "beats_input_codec_plain_applied",
            "cron"
          ],
          "@timestamp" : "2018-10-05T13:06:13.114Z",
          "prospector" : {
            "type" : "log"
          },
          "@version" : "1",
          "host" : "node8",
          "message" : "Oct  5 06:06:12 noden7 kernel: message repeated 2 times: [ [1535572967.084495] Cron_Error: Skipped 2 previous similar messages]",
          "cron_source" : "check_crons",
          "beat" : {
            "hostname" : "node8",
            "version" : "6.2.4",
            "name" : "node8"
          }
        }
      }
    ]
  }
}

Thank you

If you get results from the watcher query, then watcher should work. Can you trigger it manually? Is it triggered automatically? If not, please look in the Kibana logs for errors and paste the errors here.
In the end you should have 3 separate watcher with the same query but different conditions and severity levels defined in the webhook action body.
P.S.
Yesterday the v6.2.4 release packages were updated to fix several bugs. Please get the latest package and reinstall Sentinl if you want to get those fixes https://github.com/sirensolutions/sentinl/releases/tag/tag-6.2.4

Hi Sergi,
I don't get any errors from kibana logs, and same code works for email action alerts. So problem seems to be with NRDP configuration or something else. I would like to try the new release but will that overwrite my old watchers or configurations and how I can do upgrade without losing the watchers configurations and where does those watchers configurations are saved.
Thank You

Hi,
I was trying to get sentinl upgraded to new version and now I am not able to install it. Here is what error I get.
 /usr/share/kibana/bin/kibana-plugin install https://github.com/sirensolutions/sentinl/releases/download/tag-6.2.4/sentinl-v6.2.4.zip
Attempting to transfer from https://github.com/sirensolutions/sentinl/releases/download/tag-6.2.4/sentinl-v6.2.4.zip
Transferring 221510865 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation was unsuccessful due to error "Config schema already has key: sentinl"

Thank You

I would like to try the new release but will that overwrite my old watchers or configurations and how I can do upgrade without losing the watchers configurations and where does those watchers configurations are saved.

Watchers are saved in the main Kibana index, .kibana by default. They remain and you have them again after Sentinl installation.

...I am not able to install it.

Remove Sentinl dir from the Kibana first, then install Sentinl again
rm -rf kibana/plugins/sentinl

Hi Sergi,
Manually deleting the directory and re-installing helped.
Now with the new version, when I try to edit the old watchers I only see the raw edit section which is advanced mode and not the other tabs like General, Input, Condition, Transform, Actions which helps a lot to have individual setting to be saved like Input I have several conditions which I can pull down and reuse it from saved data. If possible it would be nice to see the old ways of editing options also available with new advanced option for sentinl.
Also I tried to create a new watcher and I can't edit anything in chart query unless I save it and go to advanced way using raw edit method.
Now coming to the NRDP issues, now I do see an in Alarms section error for NRDP  as
 "message": "webhook action: Error: Unclosed section \"payload.hits.hits\" at 345"
I have also set the email alert for that same watchers and that works fine as expected.
I am not sure where I am missing '#' or what's wrong other than that.
Thank You

Now with the new version, when I try to edit the old watchers I only see the raw edit section which is advanced mode and not the other tabs like General, Input, Condition, Transform...

We deprecated this form. Now we have wizard instead. And it is going to be better.

Also I tried to create a new watcher and I can't edit anything in chart query unless I save it and go to advanced way using raw edit method.

Yes, this is an indendent behaviour. The main goal of wizard is fast prototyping of queries with aggregations and show the matched data stats. If you want to make the query more complex, turn the wizard into the advanced one.

Now coming to the NRDP issues, now I do see an in Alarms section error for NRDP as
"message": "webhook action: Error: Unclosed section \"payload.hits.hits\" at 345"

You have this error because of an error in mustche syntax in the webhook action body.
   "New webhook action h0r0p2zatnu": {
      "throttle_period": "0h0m1s",
      "webhook": {
        "method": "POST",
        "host": “nagios.domain.com”,
        "port": 80,
        "proxy": false,
        "path": ":/nrdp",
        "body": "\"token=‘some-token’ & cmd=submitcheck & XMLDATA=<?xml version='1.0'?><checkresults>{{#ctx.payload.hits.total}} <checkresult type='service' checktype='1'>\"{{#payload.hits.hits}}\"<hostname>{{node3}}</hostname><servicename>Cron_Error</servicename><state>1</state><output>\"{{#payload.hits.hits}} {{ _source.message }}\"</output></checkresults></xml>\"",
...

In mustache if you want to loop through an array elements, you should have the opening and closing tags.
For example, if you want to loop through the payload.hits.hits docs and display some of their propperties from _source you can do the following thing

Hits:

{{#payload.hits.hits}}

{{_source.@timestamp}} {{_source.host}} {{_source.message}}

{{/payload.hits.hits}}

And mustache creates this template

Total hits: 80

Hits:

2018-10-05T13:03:29.108Z node8 Oct  5 06:03:22 noden6 kernel: [1535572967.071651] Cron_Error: Skipped 2 previous similar messages

2018-10-05T13:03:29.108Z node8 Oct  5 06:03:24 noden1 kernel: [1535572966.978553] Cron_Error: Skipped 2 previous similar messages

...

Please use this site to test your mustache syntax first http://mustache.github.io/#demo
And here are mustache docs https://www.npmjs.com/package/mustache
PS
Also, double check your XML syntax, it is wrong. For example I see the closing tag </xml> and don't see the opening tag <xml>.

Hi
I have fixed my mustache syntax and here is my body line for nrdp.
"body": "\"token=‘some-token’ &  cmd=submitcheck & XMLDATA=<?xml version='1.0'?><checkresults>{{#payload.hits.total}}<servicename>Cron_Error</servicename><state>0</state><output>Cron_Error hits {{payload.hits.total}}</output>{{/payload.hits.total}}</checkresults></xml>\"",
But still I am not able to get output to Nagios and not even getting anything in the logs related to NRDP check. Can someone please provide more information on how to debug this and also do some test based on my query sample output https://github.com/sirensolutions/sentinl/issues/553?_pjax=%23js-repo-pjax-container#issuecomment-427372445.
Thank You

Hi,
No errors in Sentinl Alarms tab and here are the logs from kibana
{"type":"log","@timestamp":"2018-12-24T21:28:37Z","tags":["debug","Sentinl"],"pid":32680,"message":"processing action"}
{"type":"log","@timestamp":"2018-12-24T21:28:37Z","tags":["debug","Sentinl"],"pid":32680,"message":"processing action"}
{"type":"log","@timestamp":"2018-12-24T21:28:37Z","tags":["info","Sentinl","watcher 23ddc800-5808-11e8-8542-ad59b173227f"],"pid":32680,"message":"successfuly executed"}
{"type":"response","@timestamp":"2018-12-24T21:28:37Z","tags":[],"pid":32680,"method":"post","statusCode":200,"req":{"url":"/api/sentinl/watcher/_execute","method":"post","headers":{"host":"kibana.domain.com:5601","connection":"keep-alive","content-length":"1249","accept":"application/json, text/plain, */*","origin":"http://kibana.domain.com:5601","kbn-version":"6.5.2","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","content-type":"application/json;charset=UTF-8","referer":"http://kibana.domain.com:5601/app/sentinl","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9"},"remoteAddress":"nagios.domain.com","userAgent":"nagios.domain.com","referer":"http://kibana.domain.com:5601/app/sentinl"},"res":{"statusCode":200,"responseTime":93,"contentLength":9},"message":"POST /api/sentinl/watcher/_execute 200 93ms - 9.0B"}
{"type":"log","@timestamp":"2018-12-24T21:28:37Z","tags":["info","Sentinl"],"pid":32680,"message":"sending email"}
{"type":"log","@timestamp":"2018-12-24T21:28:37Z","tags":["debug","Sentinl"],"pid":32680,"message":"webhook response: \tSubmit Nagios Command:
\n\t<form action=\"\" method=\"get\">\n\t<input type=\"hidden\" name=\"cmd\" value=\"submitcmd\">\n\tToken: <input type=\"text\" name=\"token\" value=\"\" size=\"15\">
\n\tCommand: <input type=\"text\" name=\"command\" size=\"50\" value=\"DISABLE_HOST_NOTIFICATIONS;somehost\">
\n\t<input type=\"submit\" name=\"btnSubmit\" value=\"Submit Command\">\n\t</form>\n\t\n\t
\n\t\n\tSubmit Check Data
\n\t<form action=\"\" method=\"post\">\n\t<input type=\"hidden\" name=\"cmd\" value=\"submitcheck\">\n\tToken: <input type=\"text\" name=\"token\" value=\"\" size=\"15\">
\n\tCheck Data:
\n<textarea cols=\"80\" rows=\"15\" name=\"XMLDATA\">\n<?xml version='1.0'?> \n<checkresults>\n\t<checkresult type='host'>\n\t\t<hostname>somehost</hostname>\n\t\t<state>0</state>\n\t\t<output>Everything looks okay!|perfdata</output>\n\t</checkresult>\n\t<checkresult type='service'>\n\t\t<hostname>somehost</hostname>\n\t\t<servicename>someservice</servicename>\n\t\t<state>1</state>\n\t\t<output>WARNING: Danger Will Robinson!|perfdata</output>\n\t</checkresult>\n</checkresults>\n</textarea>
\n\t<input type=\"submit\" name=\"btnSubmit\" value=\"Submit Check Data\">\n\t</form>\n"}
{"type":"log","@timestamp":"2018-12-24T21:28:39Z","tags":["plugin","debug"],"pid":32680,"message":"Checking Elasticsearch version"}
{"type":"log","@timestamp":"2018-12-24T21:28:40Z","tags":["debug","legacy","proxy"],"pid":32680,"message":"\"getConnections\" has been called."}
{"type":"ops","@timestamp":"2018-12-24T21:28:40Z","tags":[],"pid":32680,"os":{"load":[1.03515625,0.92431640625,0.95166015625],"mem":{"total":16723709952,"free":777007104},"uptime":2158102},"proc":{"uptime":339809.673,"mem":{"rss":271171584,"heapTotal":205856768,"heapUsed":162471824,"external":355062},"delay":1.0095329284667969},"load":{"requests":{"5601":{"total":2,"disconnects":0,"statusCodes":{"200":2}}},"concurrents":{"5601":0},"responseTimes":{"5601":{"avg":48.5,"max":93}},"sockets":{"http":{"total":0},"https":{"total":0}}},"message":"memory: 154.9MB uptime: 94:23:30 load: [1.04 0.92 0.95] delay: 1.010"}

It looks like the webhook is not sending the data to nagios server. I have checked the sentinal nrdp  and nagios server it seems the both are able to communicate with eachother, but there is not data sent  from Sentinl NRDP webhook during that alert trigger.
One more thing, I have also upgraded ELK stack version  to 6.5.2-1 and Sentinl with same version and still I get same problem.
Thank You

I got the conditional state working but got one issues. When the payload.hits.total is 0 the action doesn't takes place as the condition is set to 1 ...

Try this
 "condition": {
    "script": {
      "script": "payload.hits.total >= 0"
    }
  }

Also is it possible to have two different conditional statement for each action section

To achieve this, you need 2 watchers, 1 per action.

Hi Sergi,
How would be the JSONDATA format for this webhook, specially for the body part.
"actions": {
    "New webhook action h0r0p2zatnu": {
      "throttle_period": "0h0m1s",
      "webhook": {
        "method": "PUT",
        "host": "nagios.domain.com",
        "port": 80,
        "use_https": false,
        "proxy": false,
        "path": "/nrdp/",
        "priority": "high",
        "body": "token=TOKEN&cmd=submitcheck&XMLDATA=<?xml version='1.0'?><checkresults><checkresult type='service' checktype='1'><hostname>Cron_Error</hostname> <servicename>Cron_Error</servicename><state>1</state><output>Cron_Error in Warning state</output></checkresult></checkresults>",
        "headers": {
          "Content-Type": "application/x-www-form-urlencoded"
        }
      }
    }

Just put stringified JSON as body value. Test against the webhook site to make sure it works https://webhook.site/#/0cd03fcd-60b5-45fe-8f27-544c990ce76c

Hi Sergi,
I got this code working using the curl command but not sure how it should be in body section for webhook.
curl -f -d 'token=TOKEN&cmd=submitcheck&JSONDATA={
  "checkresults": [
    {
      "checkresult": {
        "type": "service",
        "checktype": "1"
      },
      "hostname": "node2",
      "servicename": "Cron_Err",
      "state": "1",
      "output": "Cron_Err in Warning state"
    }
  ]
}'  http://nagios.domain.com/nrdp/

Here is the error I get.
TypeError: Invalid template! Template should be a \"string\" but \"object\" was given as the first argument for mustache#render(template, view, partials)\n
Here is my Webhook
        "body": {
          "dataType": "json",
          "data": {
            "cmd": "submitcheck",
            "token": “TOKEN”,
            "JSONDATA": {
              "checkresults": [
                {
                  "checkresult": {
                    "type": "service",
                    "checktype": "1"
                  },
                  "hostname": “node2",
                  "servicename": "Cron_Err",
                  "state": "1",
                  "output": "Cron_Err in Warning state"
                }
              ]
            }
          }
        }

I am not sure what should be the right body section.

Hi Sergi,
I have tried using "json.stringify" but it doens't accepts that option or may be I am not doing it in right way. Can you please provide one example of JSON check so I can follow it in right way. I have already tried the above webhook but it doesn't works.
Thank You

Hi Sergi,
Any help on Jsondata check webhook.
Thank You


Disable capital letter for first word linting rule

The capital letter linting rule in the godot linter doesn't consider parameter names. A common convention when documenting APIs is to reference parameter names including with the first word for a sentence.

/approve

/lgtm


Fixes #96 - Eliminate extraneous includes.

Eliminated Foo* types in include/types directory.
These were originally introuced during development for testing, but
were eventually replaced by analogous types in the tests subdirectory.
The ones in the top include dir are unused and thus deleted.
...

Closing - a separate PR that works has now been created.


EEG Classifier

Thank you for your excellent work. Could you please tell me if you do EEG classification in 40 categories? Can you provide more details on the accuracy of the EEG classifier?

Classification is an important component of our work. Table 3 in the paper presents the classification results, and we evaluate the effectiveness of the model in extracting EEG features through classification.

Thanks for your reply!

Thanks for your reply!

Welcome!


Consider removing the explicit Env argument from contractimpl functions

Note: subjective developer ergonomics. low priority
Contract implementations currently support both contract functions that include an Env as their first argument, and ones that don't. In practice, I can't think of any meaningful contract functions that don't interact with Env.
This gets very verbose and (subjectively) I find it an eyesore. Especially when defining and documenting contract traits, such as the token interface, which we're about to do a lot of for ecosystem standard.
Is this important enough to change? And if so, how? Maybe place the Env inside the struct? (cc @leighmcculloch)

I agree, it's a bit of a shame the Env is littered through the functions. A side-effect is that clients for contracts and contracts themselves don't adhere to the same interface. If we removed the Env from the function parameters they would match and we could do things like have clients implement the trait of a contract. There's no big wins from that, so I wouldn't jump at doing something just for that reason, but it would just look nice/convenience/predictable.
We could move the Env into the struct for the contract. It would require either the developer to manually specify it on their struct, or for the developer to manually use a new macro on their struct. Neither would be very ergononomic though, because the contractimpl macro would have no way of checking that Env existed on the struct. contractimpl cares about this because it generates code that instantiates the contract struct, and that generated code would inject the Env. If a developer left Env off or didn't use the extra macro, the compiler will probably display cryptic messages saying an Env is missing somewhere, but the 'where' wouldn't be clear because it is being generated by macro generated code not visible to the developer.
Does anyone have alternative ideas?

Would a good old global variable work? Semantically, Env is just a namespace for a bunch of functions (and it should be stripped in Wasm builds). I know that it resolves to a stateful variable when we're building tests, but probably there is some way to work around that.  So the end result would look like soroban_sdk::ENV.do_stuff().
Another spin on that would be to distribute Env as class with a collection of static methods, that would use the global implementation internally (so that we don't need to expose the global variable to the contracts at all), so calls would look like soroban_sdk::Env::do_stuff().
Adding Env to struct might be simpler implementation-wise, but that doesn't make much sense semantically - there aren't many Envs out there, there is just one set of host fns instead.


Add sbt-i18n plugin

Hi @ant8e,
Thank you for your contribution! We really value the time you've taken to put this together.
Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:
http://www.lightbend.com/contribute/cla


web_debranding: TypeError: openerp.Model is not a constructor

After installing web_debranding module, getting TypeError: openerp.Model is not a constructor when I tried to Reconcile bank statements from Accounting Dashboard.

Thank you for reporting. It's fixed now. Try latest version

You are always welcome and thanks for fixing it!


VS Code Ignore (hide) Warnings in Problems Tab

I wondering if there is already a feature to hide all warnings from problems tab.
If not here's the feature request. In my case I use unity with a few 3rd party assets.
There are "many" warnings about deprecated usage of Unity features. Whatever ...
It would be great if I could hide these warnings on the problems tab.
I want "Problems 0" but on the bottom of VS Code the indicator errors and warnings is ok.
There I can see the amount of warnings. Only the problems tab should be clean.
So we need filter options (buttons, menu, etc) to simple hide all warnings and / or errors.

I don't want to touch the 3rd party source code. It's dangerous and a lot of work. So just hide all warnings.
Current version: 1.27.2
Sorry if this is a duplicate. I overlooked it. (#50449, #41114)

Duplicate of #47354


hover highlight of bars sometimes invisible

In the following bar chart, if you hover over row 1 in the legend, the thickening highlight isn't visible in the chart because the bars only expand to the right, and the right side of the orange bars is blocked by the yellow bars.
they should expand in all 4 directions.


Inconsistent progress states retrieved from backend

I'm not sure what's going on here, but I have two logins with nearly full play throughs. Sometimes when I log in on production, and now even locally, I am locked out of all challenges.
I'm attaching a file of a sample response for https://api.savingsatoshi.com/progress. It says my progress is  "progress": "CH8OUT1",, but none of the lessons are complete. Example:
{
    "account": 609,
    "progress": "CH8OUT1",
    "progress_state": {
        "chapters": [
            {
                "id": 1,
                "lessons": [
                    {
                        "id": "CH1INT1",
                        "path": "/chapter-1/intro-1",
                        "completed": false
                    },
                    {
                        "id": "CH1INT2",
                        "path": "/chapter-1/intro-2",
                        "completed": false
                    },

...

            {
                "id": 2,
                "lessons": [
                    {
                        "id": "CH2INT1",
                        "path": "/chapter-2/intro-1",
                        "completed": false
                    },
                    {
                        "id": "CH2INT2",
                        "path": "/chapter-2/intro-2",
                        "completed": false
                    },

...

                    {
                        "id": "CH9PRP4",
                        "path": "/chapter-9/proposal-4",
                        "completed": false
                    },
                    {
                        "id": "CH9OUT1",
                        "path": "/chapter-9/outro-1",
                        "completed": false
                    }
                ],
                "completed": false,
                "hasDifficulty": false
            }
        ],
        "currentLesson": "CH1INT1",
        "currentChapter": 1
    }
}

For those with access to the shared drive, you can find the credentials for the accounts I am using here: https://docs.google.com/document/d/1PPT1OrRRZogcn-FXSk8cE-RQKV5hKkTq8fANRiy9WnQ/edit
One of the accounts was created about a week and a half ago.
Worth mentioning that it seems to be inconsistent. I tried raising this issue in Discord, and after refreshing the page I wasn't locked out of the challenges anymore. Also, I've been doing a lot of work in chapter 6 today and pressing the reset terminal button a lot.
Locally, if I add ?dev=true my correct progress history is restored, but I wonder if this has more to do with refreshing.
EDIT: it reverted back to locking me out of everything
I apologize that I have no other steps to reproduce other than just trying to log into prod with the credentials.

Did some digging and I think I might be experiencing the same issue as this comment: https://github.com/saving-satoshi/saving-satoshi/pull/968#pullrequestreview-2176700008
After briefly looking at state/progressState.ts, is it possible the front end made a PUT call to the backend to set my account(s) to the defaultProgressState? @daviroo
Sorry to make a big stink about this but I am very worried that this could be happening to all users right now. Hopefully it's just me though.

Closed by #1063


TensorBoard session creation tests fail with "Cannot read property '0' of undefined"

Unhandled Promise Rejection with the message TypeError: Cannot read property '0' of undefined, TypeError, Cannot read property '0' of undefined, TypeError: Cannot read property '0' of undefined
    at VirtualEnvironmentManager.getWorkspaceRoot (/home/runner/work/vscode-python/vscode-python/path with spaces/out/client/interpreter/virtualEnvs/index.js:89:53)
    at /home/runner/work/vscode-python/vscode-python/path with spaces/out/client/interpreter/virtualEnvs/index.js:42:122
    at /home/runner/work/vscode-python/vscode-python/path with spaces/out/client/pythonEnvironments/discovery/subenv.js:84:30
    at Object.getType (/home/runner/work/vscode-python/vscode-python/path with spaces/out/client/pythonEnvironments/discovery/subenv.js:18:29)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at VirtualEnvironmentManager.getEnvironmentType (/home/runner/work/vscode-python/vscode-python/path with spaces/out/client/interpreter/virtualEnvs/index.js:49:17)
    at async Promise.all (index 1)
    at InterpreterService.collectInterpreterDetails (/home/runner/work/vscode-python/vscode-python/path with spaces/out/client/interpreter/interpreterService.js:265:30)

@karthiknadig can this be closed now?

@karthiknadig can this be closed now?

@joyceerhl if you think it can be closed, then I am going to close it 😁


vm-builder: makefile targets to introduce cross-compilation of the linux kernel

#1079
Introduces kernel arm 64 builds (not used anywhere).
Signed-off-by: Misha Sakhnov<EMAIL_ADDRESS>

For the future: note that this PR did not affect vm-builder, and instead just changed how we build the kernel.


Feature | Added closure mocking

Closes https://github.com/Sammyjo20/saloon-laravel/issues/13
This PR introduces the ability to define a callable that can act as your mock response. This is useful if you want to define a mock response for a given request, like if you have a particular fixture for that request.
$mockClient = new MockClient([
    UserRequest::class => function (SaloonRequest $request): MockResponse {
        return new MockResponse(['request' => $request->getFullRequestUrl()]);
    },
]);

Yes you can @Gummibeer !!


How Do i know where the Whatsapp Connector is running?

first of all thank you very much for giving us this connector @maharanasarkar .
My question is you said ,,Replace the webhook_url with the appropriate endpoint where your WhatsApp connector is running""
but how do i know where this connector is running?
when i open  http://localhost:5005/webhooks/whatsapp i get {"status":"ok"}
so is the connector running on 5005/webhooks/whatsapp?
Thank you very much.

@Matilii You don't have to , just enter the webhook url on Meta as https://your-domain.com/webhooks/whatsapp/webhook. Do keep in mind that Meta may not accept http(Non-SSL), hence use Nginx and Let's Encrypt.
If you're trying it on local server , use ngrok. Let me know , if you need more help.
Try to keep the whatsapp.py in rasa/core/channels/whatsapp.py and also modify init.py as below
from typing import Text, Dict, List, Type

from rasa.core.channels.channel import (  # noqa: F401
    InputChannel,
    OutputChannel,
    UserMessage,
    CollectingOutputChannel,
)

# this prevents IDE's from optimizing the imports - we need to import the
# above first, otherwise we will run into import cycles
from rasa.core.channels.socketio import SocketIOInput
from rasa.core.channels.botframework import BotFrameworkInput
from rasa.core.channels.callback import CallbackInput
from rasa.core.channels.console import CmdlineInput
from rasa.core.channels.facebook import FacebookInput
from rasa.core.channels.mattermost import MattermostInput
from rasa.core.channels.rasa_chat import RasaChatInput
from rasa.core.channels.rest import RestInput
from rasa.core.channels.rocketchat import RocketChatInput
from rasa.core.channels.slack import SlackInput
from rasa.core.channels.telegram import TelegramInput
from rasa.core.channels.twilio import TwilioInput
from rasa.core.channels.twilio_voice import TwilioVoiceInput
from rasa.core.channels.webexteams import WebexTeamsInput
from rasa.core.channels.hangouts import HangoutsInput
from rasa.core.channels.whatsapp import WhatsAppInput

input_channel_classes: List[Type[InputChannel]] = [
    CmdlineInput,
    FacebookInput,
    SlackInput,
    TelegramInput,
    MattermostInput,
    TwilioInput,
    TwilioVoiceInput,
    RasaChatInput,
    BotFrameworkInput,
    RocketChatInput,
    CallbackInput,
    RestInput,
    SocketIOInput,
    WebexTeamsInput,
    HangoutsInput,
    WhatsAppInput,
]

@thatcuteseller thank you for your answer. Ive got one more question. Is is that important to have the whatsapp.py in the rasa/core/channels/ and not some custom connector folder?
Im quite new to this rasa world and trying to stay to the best practices.
Thanks in advance.

@Matilii You can keep it in the custom connector folder, I am also new to RASA. It decided to keep whatsapp.py with other native channels that come with RASA.

@thatcuteseller One thing that im asking myself is now how to handle this when trying to put it into a docker container. Afaik this custom connector will not work when you dont manually copy the venv/lib/python3.10/site-packages/rasa/core/channels/init.py into the image. But i guess thats a problem for another day. Thanks

I am not using docker


Multiple instances

Expected Behavior
run multiple instances of insomnia
Actual Behavior
only one instance of insomnia is opened
Reproduction Steps
No response
Is there an existing issue for this?

[X] I have searched the issue tracker for this problem.

Additional Information
before the last update I managed to keep several instances of insomia open for queries, but since the last update (where there was a major UI update), I can no longer open another instance
Insomnia Version
2022.7.0
What operating system are you using?
Windows
Operating System Version
Windows 10
Installation method
chocolatey package
Last Known Working Insomnia version
No response

Thanks for the report @JoaoPedroCJ in the process of fixing deep linking from the browser to insomnia in windows and linux, and in order to keep things simpler for us to maintain we restricted the number of open instances to one. I'm curious what specific UX having a second open instance provided for you, perhaps there is another way we can accomodate.

I usually use multiple instances to help integrate with different APIs, I usually download the json to the workspace, having to go back and forth between each one to see the results is quite annoying

I see so you need to compare json in request body or responses. I have a couple ideas in order of difficulty,

use a hotkey to toggle between the two requests you want to compare
add multiple instances for all platforms with an argument like "-n"
add split screen support within insomnia
add a diff mechanism

I'll make a ticket for the second "-n" approach since I think it sounds reasonable.
Thanks again for the thoughtful feedback @JoaoPedroCJ

Thanks for making that ticket, @jackkav Do you have a timeline on when it will be worked on?  The -n approach works best for my usecase also, which is opening multiple collections at a time (e.g. send a POST request to one API, then sending a GET request to the downstream API to verify data was processed on the backend correctly)


How to check if a key exists without silently generating null objects on the path

I have a deep nested JSON data model with a lot of optional keys and optional sub- structures.
When trying to read a non-existing optional key in a not yet existing path the library silently creates this path. When parts of the branch are not existing 'null' keys / 'null' structures are silently generated into the JSON model.
Even checking for a key generates the elements on its path:
...
if (jm["Elements"]["Comments"].contains("Comment")
{ /* Key is existing */
   bOk = !FALSE;
}
...

This generates following JSON output:
{
   "Elements": {
      "Comments": null
   }
}

I tried also the 'find' method with the same result. Addressing a non-existing key generates it.
To check each sub-level with 'contain' or 'find' before accessing the next sub-key is not a real option
because the nesting depth is 10 and the model contains a few thousand 1000 optional keys.
Is there any hint how to check if a key exists without checking each key on its path?
Any help is welcome
Christian

The contains function does that.

I used the contains method in the example above. The JSON object was initially empty .
Checking with 'contains' in the not before existing ["Elements"]["Comments"] 'path' for the key ["Comment"] generates the content of the JSON output above including the "Comments": null  pair.
I could check step-by-step if ["Elements"] exists, then if ["Comments"] exists and finally if ["Comment"] exists. My hope is that I can check for the last key without generating the others.
My model is really huge and this step-by-step generates many lines of code.

You mix operator[] and contains. The former does create elements, the latter does not.
You need to go
if (jm.contains("Elements") and jm["Elements"].contains("Comments") and jm["Elements]["Comments"].contains("Comment")
{ /* Key is existing */
   bOk = !FALSE;
}

Alternatively, you may want to try JSON Pointers:
if (jm.cointains("/Elements/Comments/Comment"_json_pointer)
{...}

Json Pointer is the solution :-)
if (jm.cointains("/Elements/Comments/Comment"_json_pointer)
{...}
The first proposal needs to be slightly modified.
The tests in the if condition are all called even if the first test (jm.contains("Elements")) is FALSE.
So the following tests generate the keys. Nested 'if' calls would work.
Ok, from today Json pointers are my friends.
Thanks for the lightspeed fast solution.
Christian


Using the new osmcha API to download changeset labels

The new osmcha is here! 🎉

https://osmcha.mapbox.com/

With it comes some changes to the API, specially render_csv=True being deprecated. 😞 The documentation of the API is at the link below:

https://osmcha.mapbox.com/api-docs/

Changes

The API is paginated so, we will have to do multiple requests
The format of the csv is different and changeset_id is not the first column anymore

geometry.coordinates
geometry.type
id
properties.area
properties.check_date
properties.check_user
properties.checked
properties.comment
properties.create
properties.date
properties.delete
properties.editor
properties.harmful
properties.imagery_used
properties.is_suspect
properties.modify
properties.source
properties.uid
properties.user
type

cc: @anandthakker @batpad @geohacker

I used the json endpoint of the osmcha API instead of the csv endpoint. The advantages are:

We need changeset_id and changeset_harmful, others come from real changeset
Has a next parameter with URL for the next set in the paginated results
The next parameter is null when the last page is reached


Update documentation on new dependency management

Complements #195 which was missing one part.

Pull Request Test Coverage Report for Build 647

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 646:
0.0%

Covered Lines:
308

Relevant Lines:
308

💛  - Coveralls


access-control: allow to suspend keys

What does this pull request do? Explain your changes. (required)
Allow to suspend keys
Specific updates (required)

How did you test each of these updates (required)

Does this pull request close any open issues?

Screenshots (optional)

Checklist

[ ] I have read the CONTRIBUTING document.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.

closing in favor of https://github.com/livepeer/catalyst-api/pull/1048


Fail to share resource

I'm encountering an error at https://beta.hydroshare.org and at my local instance when trying to share a resource. I get the following error:

Edit: also happens at https://www.hydroshare.org

@pkdash, could you check if you are also getting this error?

@mauriel133 I am aware of this error. If you try to add any other user who is not a super user you should not see this error. It's   a bug in access control.

This is only for superusers


Can't update youtube-dl to its latest version (I'm a noob who needs help)

I know issues with older versions are rejected, but please help me out because the update command (youtube-dl -U) doesn't seem to be working for me! Once it starts the process, it's interrupted when it says "system cannot find the specified path". And that's super weird because I'm in the exact path where I installed youtube-dl for Windows.
What could be going wrong? Shouldn't I be able to update it from the command prompt with the aforementioned line? Could it be related to the fact that I installed ffmpeg in the same path?
I'd really appreciate some assistance.

Where did you install it?

In a random folder in C:\User. Is that wrong?

Post the exact log of error.

It's in spanish so I hope you can forgive that.
C:\Users\José>cd C:\Users\José\Downloads\Youtube
C:\Users\José\Downloads\Youtube>youtube-dl -U
Updating to version 2017.03.10 ...
Waiting for file handle to be closed ...
C:\Users\José\Downloads\Youtube>El sistema no puede encontrar la ruta especificada.
Updated youtube-dl to version 2017.03.10.
The output says it's been updated but it really hasn't and there's a new file in the folder called youtube-dl.exe.new

Put it in folder without non-ASCII in path.

Post the output of youtube-dl -v.

What is a non-ASCII path?? Sorry for my ignorance.
This is the output:
C:\Users\José\Downloads\Youtube>youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2016.10.07
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: ffmpeg N-81960-g1bda0ee, ffprobe N-81960-g1bda0ee
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
C:\Users\José\Downloads\Youtube>

Put it in folder with only english letters.

So should I move the whole folder out of the Users subfolder?
It's weird, because I didn't have any trouble running the program in this folder before the update...

It's probably the é in José confusing youtube-dl or one of the other systems it uses. Move the youtube-dl executable somewhere like C:\Users and run the update from there.

@phihag: The problem is here. youtube-dl writes updating bat file in CP1252 whereas windows expects CP850.


Add dependency map support

IDEA

Make it possible to automatically detect plugins dependencies,
Draw a visual map of the dependencies which make it easier for developers to improve the design .

moved to the new project repo
@ https://github.com/nodearch/arch


Does support custom some properties?

Such as Video resolution、type of compress or no-compress  and type of encode.

Yes, you can very easily add extra options using this


Tensorflowsharp and Tensorflow 1.9 support for Unity

Hello,
I've been trying to use Tensorflowsharp for Unity (using Nuget package) in order to support TF 1.9, but then as I add ML-agents it tells me that multiple plugins exist with the name libtensorflow. What is the proper way to fix this?
I tried using the TensorflowSharp plugin from here but it looks like this version only support TF 1.4.
Sorry if this is not the proper place to ask this as this is probably not an "issue" but I really don't know what to do.
Thank you so much.

Is your problem getting ml-agents to work with any Tensorflow version? or do you need  v1.9?
ml-agents v0.5 only support Tensorflow 1.7.1 - I believe that you can train with later versions, but not for inference (running the trained model within unity)
This may all change with ml-agents v0.6 as Unity are releasing a new inference engine.

Is your problem getting ml-agents to work with any Tensorflow version? or do you need v1.9?
ml-agents v0.5 only support Tensorflow 1.7.1 - I believe that you can train with later versions, but not for inference (running the trained model within unity)
This may all change with ml-agents v0.6 as Unity are releasing a new inference engine.

Thanks for the reply, buddy. And sorry for the late anwer. Finally I was able to make it run by importing Tensorflowsharp 1.11 from Nuge package through Unity, along with the ML-agents package it no longer gave me any problems.
Now the only issue that Im having is running it and making it work on Android. I just tested it on my phone and it's not classifying anything at all, so I guess it's some tensorflow issue.
Anyway, thank you so much!

I believe Unity has a custom fork of TensorFlowSharp that they distribute.


Admin command line supports list server command

Why are the changes needed?

Support to list server with kyuubi-admin/kyuubi rest client.
How was this patch tested?

[x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

UT for AdminRestAPI

UT for AminCtlArgument

UT for AdminCtl

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

cc @zwangsheng

tests passed @pan3793

Codecov Report

Merging #4889 (0a01315) into master (aee9b94) will not change coverage.
The diff coverage is 0.00%.

:exclamation: Current head 0a01315 differs from pull request most recent head bfd13fb.  Learn more

merged to master, thanks


Update README with example of how to create a custom theme

Added example for inline custom theme.
Fixed #73 .

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


[front] cleanup: remove gpt3-5 model

fixes: https://github.com/dust-tt/tasks/issues/1153
Description
Remove gpt3.5 from supported models and default assistant
Risk
Ensure all assistants are correctly migrated before removing from supported models. Can be reverted if needed
Deploy Plan
deploy front

LGTM
But we have to migrate as well as deploying front right, otherwise assistant builder will fail on assistants with gpt35? Can you explicit the deploy plan accordingly?
I think the assistant builder does not really fail but moves back to the default so it's fine to migrate deploy migrate or even deploy and migrate.

yes, migration description was here :
https://github.com/dust-tt/tasks/issues/1153#issuecomment-2288686230 . Adding this here, migrate - deploy - migrate looks fine


Use goimports prior to v1.22.0 bump.

Signed-off-by: Tiger Kaovilai<EMAIL_ADDRESS>Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #(issue)
Please indicate you've done the following:

[ ] Accepted the DCO. Commits without the DCO will delay acceptance.
[ ] Created a changelog file (make new-changelog) or comment /kind changelog-not-required on this PR.
[ ] Updated the corresponding documentation in site/content/docs/main.

/lgtm


[User Story] Add bot conversation history to RethinkDB

User Story
Add bot conversation history to RethinkDB

User Story Title
Add bot conversation history to RethinkDB

T-shirt size: S(mall), M(edium), L(arge)
M

Story Points - Fibonacci (1,2,3,5,8,13)
5

User Story
As a user, I want conversation history stored for later retrieval in the UI

Acceptance Criteria/Tests
?

clearing milestone since Sprint 8 is done.
@pgobin Do you see us keeping ALL chat history for all time?  Or is there a line count max or a time max?  Would "later retrieval in the UI" be as simple as scrolling back up in the chat conversation or are you thinking of a 'search chat history' somehow?

migrated to new tmobile/sawtooth-next-directory repo


This has been fixed.


README WordPress the code is overflowing #6679

README WordPress the code is overflowing #6679

CI failed

Codecov Report

Merging #6696 into master will decrease coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6696      +/-   ##
==========================================
- Coverage   40.79%   40.73%   -0.07%
==========================================
  Files         421      421
  Lines       57570    57866     +296
==========================================
+ Hits        23487    23572      +85
- Misses      30955    31166     +211
  Partials     3128     3128

Impacted Files
Coverage Δ

modules/context/permission.go
20.63% <0%> (-20%)
:arrow_down:

modules/log/colors.go
58.38% <0%> (-8.53%)
:arrow_down:

routers/api/v1/api.go
69.78% <0%> (-5.54%)
:arrow_down:

routers/repo/issue.go
35.75% <0%> (-1.4%)
:arrow_down:

routers/repo/wiki.go
49.68% <0%> (-1.27%)
:arrow_down:

modules/log/logger.go
65.06% <0%> (-1.22%)
:arrow_down:

routers/repo/view.go
41.6% <0%> (-1.01%)
:arrow_down:

models/org_team.go
50.38% <0%> (-0.69%)
:arrow_down:

routers/user/home.go
38.03% <0%> (-0.58%)
:arrow_down:

routers/repo/pull.go
36.13% <0%> (-0.54%)
:arrow_down:

... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b83114f...682da74. Read the comment docs.

In this file :
public/less/_repository.less
Line 330
Add this code for resolve this issue :

        pre {
            overflow: scroll;
        }

I can not see the diff for the changes that have been made.
Note that in my opinion, you only need to add the following code:
If it's OK to display the WordPress README ...
If it's OK to display files (PHP for example) and the lines are always correctly numbered, then for me this problem is solved.
https://github.com/go-gitea/gitea/issues/6679


File names

If two files from two different links have the same name , it crashes because it tries to save the first file to storage and the second file with same name is still in use .
Also if same link is repeated in the input file, the program will crash.
Maybe use set or
 if val in list:      continue    else:     list.append(val)

@D0T7 Thanks for the report. Can you give me the two links with files with the same name?

https://gofile.io/d/TGMFNT(text file named test.txt)
https://gofile.io/d/aY5TCz(different text file with the same name)
One thing that I seem to have overlooked is that if we don't use --flatten there is no error since all the files are stored in separate folders with unique name.
Anyways , the command I used was:
gofile-dl -o ".\test" --flatten https://gofile.io/d/TGMFNT https://gofile.io/d/aY5TCz
Output error: FileExistsError: [WinError 183] Cannot create a file when that file already exists: '.\test\test.txt.temp' -> '.\test\test.txt'


API proposal

A reworked proposal for an API design.

I really want to push ahead with this.  @squillace is it too soon?  Do you want to get more partner input?  I worry that if we procrastinate too long it will become too late...

@bnookala I'd love to see you map your extension to this api and see what isn't there. IIRC, there were a few things @itowlson mentioned he hadn't exposed yet.

@bnookala I think this might be ready for merging - do you want to take another look?

I'm going to merge this to unblock other API work in progress.  If it turns out to be a disaster then we can always change the committer so it looks like Ralph did it amend or remove it before going to release.


Fix bug "...has already joined the endpoint"

In case of sandboxAdd() failure, drive.Leave() call
in first executed defer resets err to nil. Secondly
executed defer in charge of resetting ep.container to nil
will not be executed, leaving endpoint thinking it is still
joined by the container.

Signed-off-by: Alessandro Boch<EMAIL_ADDRESS>

LGTM


proto_utils.h uses deprecated ByteSize API

When compiling grpc against a new version of protobuf (3.11.2), gcc complains that ByteSize is deprecated because it is used in proto_utils.h.
proto_utils.h:52:31: error: ‘int google::protobuf::MessageLite::ByteSize() const’ is deprecated: Please use ByteSizeLong() instead [-Werror=deprecated-declarations]

Currently this can only be remedied by disabling the warning with -Wno-deprecated-declarations.

I also stumbled upon this yesterday.
grpc version 1.26.0 x64 on Windows 10 - installed via vcpkg.
using Visual Studio 2019 C++ console application.
Temporary workaround for this is to disable SDL Checks in the VS C++ project properties. But disabling SDL (which is enabled by default) has other implications.


transition to python 3

This doesn't work.. I have no idea what i'm doing

closing. as i think #336 is a better fix.


Allow specifying what the default value is in FirstOrDefaultAsync, LastOrDefaultAsync

Typically this would be doing with a null coalescing operator. Can you please provide more detail and reopen?


add email to setup file

use author_email kwarg to go on line 11

I added mine, could put everyones

added<EMAIL_ADDRESS>to setup.py


CBV does not resolve free variables before checking RHS for value

This issue also makes the Y combinator impossible to evaluate.


Question about controlling the RC car

I am trying to control the car using my laptop but when I run rc_control_test.py I get the following error

No protocol specified
No protocol specified
No protocol specified
xcb_connection_has_error() returned true
Home directory not accessible: Permission denied
No protocol specified
xcb_connection_has_error() returned true
Home directory not accessible: Permission denied
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave

I am using Ubuntu.

Is it "permission" related?

xhost si:localuser:root
This line of code solved my problem

@tkajbaje what you did for connecting the rc with laptop. I also cannot run rc_control_test.py
Having following error
C:\Python27\python.exe C:/Users/Aakash/Desktop/AutoRCCar-master/test/rc_control_test.py
Traceback (most recent call last):
File "C:/Users/Aakash/Desktop/AutoRCCar-master/test/rc_control_test.py", line 69, in
RCTest()
File "C:/Users/Aakash/Desktop/AutoRCCar-master/test/rc_control_test.py", line 12, in init
self.ser = serial.Serial('/dev/tty.usbmodem1421', 115200, timeout=1)
File "C:\Users\Aakash\AppData\Roaming\Python\Python27\site-packages\serial\serialwin32.py", line 31, in init
super(Serial, self).init(*args, **kwargs)
File "C:\Users\Aakash\AppData\Roaming\Python\Python27\site-packages\serial\serialutil.py", line 240, in init
self.open()
File "C:\Users\Aakash\AppData\Roaming\Python\Python27\site-packages\serial\serialwin32.py", line 62, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '/dev/tty.usbmodem1421': WindowsError(3, 'The system cannot find the path specified.')
Process finished with exit code 1

/dev/.... File location is invalid
Open arduino software and connect your arduino and check for the port eg
:COM1 . It will be on the bottom right of your arduino software. Replace
/dev... To that port value. It will fix it
On Sat 31 Mar, 2018, 9:31 AM aakashm301<EMAIL_ADDRESS>wrote:

@tkajbaje https://github.com/tkajbaje what you did for connecting the
rc with laptop. I also cannot run rc_control_test.py
Having following error
C:\Python27\python.exe
C:/Users/Aakash/Desktop/AutoRCCar-master/test/rc_control_test.py
Traceback (most recent call last):
File "C:/Users/Aakash/Desktop/AutoRCCar-master/test/rc_control_test.py",
line 69, in
RCTest()
File "C:/Users/Aakash/Desktop/AutoRCCar-master/test/rc_control_test.py",
line 12, in init
self.ser = serial.Serial('/dev/tty.usbmodem1421', 115200, timeout=1)
File
"C:\Users\Aakash\AppData\Roaming\Python\Python27\site-packages\serial\serialwin32.py",
line 31, in init
super(Serial, self).init(*args, **kwargs)
File
"C:\Users\Aakash\AppData\Roaming\Python\Python27\site-packages\serial\serialutil.py",
line 240, in init
self.open()
File
"C:\Users\Aakash\AppData\Roaming\Python\Python27\site-packages\serial\serialwin32.py",
line 62, in open
raise SerialException("could not open port {!r}:
{!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port
'/dev/tty.usbmodem1421': WindowsError(3, 'The system cannot find the path
specified.')
Process finished with exit code 1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/hamuchiwa/AutoRCCar/issues/89#issuecomment-377660114,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgOJukaqVa9lSfNfP3g0wq9Uc18PWyNwks5tjuy9gaJpZM4S8phh
.

@aakashm301 Gooose1909 is right,replace '/dev/tty.usbmodem1421' with the port you are using to connect arduino to your pc e.g. COM1.

Anyone has modified rc_driver.py code for opencv3.0 ?

Hello Everyone,so I modified rc_driver.py for opencv3.0 as guided by @hamuchiwa in another thread.but when I run rc_driver.py and connect with the car,my car moves out of track,it seems that the rate at which the frames are received from the camera and the speed of the car does not match,is there any way I can stop the car for some time unless a new frame is received and prediction is made on that so as to synchronise the speed of car and speed of receiving images from picam

Thank you so much guys for your help, it worked.

So I solved the synchronization problem by adding stop() after every move of RC Car in rc_driver.py.and changing the value of delay in Arduino sketch to 150 ms .the car now moves slowly (actually very slowly) but runs on track.

Can you please share the code because I will also be facing the same problem because my RC runs really fast.

Here is the link to the modified code.
https://drive.google.com/drive/folders/10iQPYrRAZ98uMOC_vT-8OojYjL9NWkYj?usp=sharing

Thank you so Much. One last question what you did for running rc_control_test.py after changing the specified address of port in Arduino it worked but nothing happened. It just ran and keeps running no window popped up nothing.

No pygame window opened??
On Sun 1 Apr, 2018, 5:33 PM aakashm301<EMAIL_ADDRESS>wrote:

Thank you so Much. One last question what you did for running
rc_control_test.py after changing the specified address of port in Arduino
it worked but nothing happened. It just ran and keeps running no window
popped up nothing.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hamuchiwa/AutoRCCar/issues/89#issuecomment-377782020,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgOJuoyBw9x5SJEUCdvt1a8YPOWYcNYnks5tkMIcgaJpZM4S8phh
.

No nothing happened.

pygame.init()
size = [70, 50]
screen = pygame.display.set_mode(size)
Makw sure this line is there in your code
On Sun 1 Apr, 2018, 6:25 PM aakashm301<EMAIL_ADDRESS>wrote:

No nothing happened.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hamuchiwa/AutoRCCar/issues/89#issuecomment-377785001,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgOJuic-UZQbIoC94HJoucNpipTX08kfks5tkM5KgaJpZM4S8phh
.

I have added the rc_control_test.py script to above the above link (https://drive.google.com/drive/folders/10iQPYrRAZ98uMOC_vT-8OojYjL9NWkYj?usp=sharing) change the port no. to your desired port and run the script.

Thank you so much it worked

Okay so now there is error in connecting the. I am successfully able to control car with keys but i cannot connect my raspberry pi with laptop.
When I try connecting with this IP and port (<IP_ADDRESS>', 8000) it gives me this error
C:\Python27\python.exe "C:/Users/Aakash/Desktop/AutoRCCar-master/AutoRC Car/collect_training_data.py"
Traceback (most recent call last):
File "C:/Users/Aakash/Desktop/AutoRCCar-master/AutoRC Car/collect_training_data.py", line 173, in
CollectTrainingData()
File "C:/Users/Aakash/Desktop/AutoRCCar-master/AutoRC Car/collect_training_data.py", line 18, in init
self.server_socket.bind(('<IP_ADDRESS>', 8000))
File "C:\Python27\lib\socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 10049] The requested address is not valid in its context
Process finished with exit code 1
SO i tried another IP and PORT ('<IP_ADDRESS>', 5560)
the server starts but it gives error CONNECTION REFUSED

Replaces that IP with your laptop's Ip address
U can find it running "ipconfig" command on CMD
On Tue 3 Apr, 2018, 12:14 PM aakashm301<EMAIL_ADDRESS>wrote:

Okay so now there is error in connecting the. I am successfully able to
control car with keys but i cannot connect my raspberry pi with laptop.
When I try connecting with this IP and port (<IP_ADDRESS>', 8000) it
gives me this error
C:\Python27\python.exe "C:/Users/Aakash/Desktop/AutoRCCar-master/AutoRC
Car/collect_training_data.py"
Traceback (most recent call last):
File "C:/Users/Aakash/Desktop/AutoRCCar-master/AutoRC
Car/collect_training_data.py", line 173, in
CollectTrainingData()
File "C:/Users/Aakash/Desktop/AutoRCCar-master/AutoRC
Car/collect_training_data.py", line 18, in init
self.server_socket.bind(('<IP_ADDRESS>', 8000))
File "C:\Python27\lib\socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 10049] The requested address is not valid in its
context
Process finished with exit code 1
SO i tried another IP and PORT ('<IP_ADDRESS>', 5560)
the server starts but it gives error CONNECTION REFUSED
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hamuchiwa/AutoRCCar/issues/89#issuecomment-378145326,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgOJuv2uOgV9DTOUPju-6AyqPVpR9wpZks5tkxpagaJpZM4S8phh
.


Spacing Around Spread Operator

Would love to see some controls over spacing around spread operators in JSX:
Not warnings:
<CompanyInfo { ...props.company } />
<CompanyInfo
  { ...props.company }
/>

Warnings:
<CompanyInfo {...props.company} />
<CompanyInfo {...props.company } />
<CompanyInfo { ...props.company} />
<CompanyInfo
  {...props.company}
/>

Can you add some non-spread props into your examples, so they can be compared?
Airbnb's style guide requires that the spaces be omitted for all props, including spread props. Are you proposing making an exception when it's a spread?

I am thinking this should be included in jsx-curly-spacing when always is set so that the spacing matches.

@casesandberg but specifically - do you want the spacing around spread but not around non-spread props?

I would like spacing around both spread and non-spread props.

@casesandberg ok so doesn't jsx-curly-spacing set to "always" do what you want already?

See https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md#always

It doesn't work on spreads

Ahhh ok so it's a bug - sorry, that wasn't clear :-)


Internal Python Language Server error

Description
What steps will reproduce the problem?

Fail after adding kwarg:
self.celery_task=self.celery_task,
Then planned to change this line to
celery_task=self.celery_task,
Traceback
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pyls_jsonrpc/endpoint.py", line 113, in consume
    self._handle_request(message['id'], message['method'], message.get('params'))
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pyls_jsonrpc/endpoint.py", line 182, in _handle_request
    handler_result = handler(params)
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pyls_jsonrpc/dispatchers.py", line 23, in handler
    return method(**(params or {}))
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pyls/python_ls.py", line 345, in m_text_document__signature_help
    return self.signature_help(textDocument['uri'], position)
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pyls/python_ls.py", line 283, in signature_help
    return self._hook('pyls_signature_help', doc_uri, position=position)
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pyls/python_ls.py", line 153, in _hook
    return hook_handlers(config=self.config, workspace=workspace, document=doc, **kwargs)
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/manager.py", line 92, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/manager.py", line 335, in traced_hookexec
    return outcome.get_result()
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/callers.py", line 52, in from_call
    result = func()
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/manager.py", line 333, in <lambda>
    outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/manager.py", line 86, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/pyls/plugins/signature.py", line 42, in pyls_signature_help
    if s.index is not None and s.params:
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/jedi/api/classes.py", line 618, in index
    return self._call_details.calculate_index(self._signature.get_param_names())
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/jedi/api/helpers.py", line 181, in calculate_index
    args = list(_iter_arguments(self._children, self._position))
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/jedi/api/helpers.py", line 238, in _iter_arguments
    for x in _iter_arguments(nodes_before[-1].children, position):
  File "/home/kai/Projects/spyder/4/lib/python3.7/site-packages/jedi/api/helpers.py", line 251, in _iter_arguments
    yield 0, first.value, True

AttributeError: 'PythonNode' object has no attribute 'value'Failed to send bug report on Github. response={'code': 401, 'json': {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}}

Versions

Spyder version: 4.0.0rc1
Python version: 3.7.3
Qt version: 5.12.4
PyQt5 version: 5.12.3
Operating System: Linux 4.19.0-6-amd64

Dependencies
cloudpickle >=0.5.0          :  1.2.2 (OK)
pygments >=2.0               :  2.4.2 (OK)
qtconsole >=4.5.5            :  4.5.5 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
sphinx >=0.6.6               :  2.2.1 (OK)
pylint >=0.25                :  2.4.4 (OK)
psutil >=0.3                 :  5.6.5 (OK)
qtawesome >=0.5.7            :  0.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
zmq >=17                     :  18.1.1 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
numpydoc >=0.6.0             :  0.9.1 (OK)
spyder_kernels >=1.7.0;<2.0.0:  1.7.0 (OK)
qdarkstyle >=2.7             :  2.7 (OK)
atomicwrites >=1.2.0         :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
watchdog                     :  None (OK)
keyring                      :  None (OK)
pexpect >=4.4.0              :  4.7.0 (OK)
pympler                      :  None (OK)
sympy >=0.7.3                :  None (NOK)
cython >=0.21                :  None (NOK)
IPython >=4.0                :  7.9.0 (OK)
matplotlib >=2.0.0           :  None (NOK)
pandas >=0.13.1              :  None (NOK)
numpy >=1.7                  :  None (NOK)
scipy >=0.17.0               :  None (NOK)
pyls >=0.29.3;<0.30.0        :  0.29.3 (OK)
xdg >=0.26                   :  0.26 (OK)

Thanks for reporting. We'll try to fix it in a future release.

This should be fixed now.


Switch to a different delivery mechanism than CodePlex

CodePlex is shutting down, so we'll need an alternate way to host the installer for NuGet Package Explore.

The codeplex link is present in the ReadMe.md file that is displayed below the code explorer on the welcome page for this site.

Currently the alternatives are chocolatey and Windows store.
Clickonce has too many install issues and without code certificate it also shows security warnings.
If you think a Wix installer is also a good alternative, feel free to create a PR.

Maybe the resolution for this issue is to remove the link to the click once installer link and text from the readme, if the plan is to part ways with that installation option?

@304NotModified sooo all corporation stuck on Win7 wont be able to install it ?

No way i will be able to authorize and want to use Choco over Forward proxy / firewall
Windows store is not available

I think a portable version is a good idea. Currently very busy, still look at this next month

i thought so but found PInvoke in the actual code, i'll have to take a deep dive in the code to understand all of it

it's on windows store  / chocolatey.

it means not accessible for company behind proxy ;)


backend rpc ability, including GPT, Entity Recognition, graph db build and search

[x] RPC ability
[x] GPT
[x] Aliyun Entity Recognition through FaaS
[ ] graph db build and search

It is sad that, aliyun has a poor document, and only support E-commerce cluster. And others like baidu and nlp api are also not very good at NER. Consider train our own model.

It is sad that, aliyun has a poor document, and only support E-commerce cluster. And others like baidu and nlp api are also not very good at NER. Consider train our own model.

And maybe all on chatGPT is a nice choice.

The fact is that chatGPT is so cool that can finish all the job including formula convert and nlp tasks.


doc: config provider missing available props - initialData

Describe the bug
The context ReactQueryConfigProvider can provide default config for all useQuery
And it only accept one params - config which is ReactQueryProviderConfig
When i am unit testing, i will prefer make use of the initialData feature in order to mocking API response.
So i try following code in my test
import { ReactQueryConfigProvider, ReactQueryProviderConfig } from "react-query"
    <ReactQueryConfigProvider
      config={{
        queries: {             initialData: { data: { id: "spaceId1" } } },
      }}
    >
<MyComponentNeedToTest/>
</ReactQueryConfigProvider>

Expected behavior
above code is working perfectly
But the typescript compiler will complain type error and that method never mention in doc.
May this is not expected usage ?  If so, what should i do ?

To pass initialData to a query, use the useQuery hooks' initialData option.


importing dat time picker only

HI, can i import only the dat time picker to my library is that possible or do i have to import the whole thing, will my bundler tree shake the dependency ?
Many thanks!

Hey @cubecleveland, thank you for reaching out. Currently, we do not export single components. If you want to use the datepicker, you'd have to install the whole @tremor/react library. Happy coding :)


How do I display a video?

How can I just get the video, camera matrix, and projection matrix? Your project is very good, but for me, I only need one of them, I don't need laser pointer detection.

i also have these problems.


Bias current estimation

Hi
In the jAER bias config panel, an estimated ampere value is shown when setting coarse and fine values (I think those estimates are calculated here. Is there any way in libcaer to 1. estimate a current from a coarse/fine value set, and 2. get the best matching coarse/fine value set for a given current?

Currently this does not exist, but it is in our long-term plans to provide such conversion for Dynapse and DAVIS.

Added in commit e654c20f5f08619705b231aee42db6387ed57e17.


fix: Implement updates to Polar API

Description
Birk from Polar here 👋🏼 We're in the process of updating our API to reach a stable and fully documented v1.0. Unfortunately, we've had to introduce some breaking changes in that process. Causing sponsorkit to no longer work with Polar in the current version. Caused by:

sponsorkit using our deprecated /subscriptions/subscriptions/search endpoint vs. /subscriptions

This PR fixes the above and makes sponsorkit work with Polar again. However, I also took the opportunity to ensure the implementation is more accurate & uses our 1.0 endpoints to be more future proof. Below are the changes in full:

Updated base URL to https://api.polar.sh/v1/(.*) from legacy https://api.polar.sh/api/v1/(.*)
Require SPONSORKIT_POLAR_ORGANIZATION in .env if using Polar (see more context below)
Fetch the requested organization from /organizations to respect the same sponsorkit implementation API, but going against our updated API endpoints vs. passing an organization name to subscriptions directly (no longer supported)

Breaking change to sponsorkit
SPONSORKIT_POLAR_ORGANIZATION is now required and will throw in error if not present, but Polar is used. The former implementation stated we default to the users organization if not present. That was not the case nor is it supported now. We require an organization to be fetched and an explicit organization ID to be used in filtering /subscriptions
So we need to require it here. However, I don't suspect any active sponsorkit user would be impacted since using it with Polar now is broken & specifically an empty SPONSORKIT_POLAR_ORGANIZATION would not have defaulted to the users personal one - it needs to be explicit.
Linked Issues
Additional context

I should clarify: We made these changes a few weeks ago, but only recently learned about them breaking sponsorkit from some users vs. us making this PR now in parallell as intentionally updating our API & breaking sponsorkit 😅
However, since this PR uses 1.0 endpoints it should be future proof against until major updates. We're also going to be mindful of sponsorkit in any future changes to these endpoints - to avoid breakage as best as we can 🙏🏼

Thanks for the PR and explanation!

Thank you @antfu for your great work and contributions to the OSS ecosystem ♥


empty classes.jar

With the last stable version 0.0.8 im getting an  empty classes.jar file inside aar.
Using this configurations:
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

afterEvaluate {
  publishing {
    publications {
      maven(MavenPublication) {
        from(components.release)
      }
    }
  }
}

tried to use publish varient with no success.
With previous 0.0.8-SNAPSHOT from last week using from(components.releaseEmbedAar)  was working fine.
The sample project sample_aaraar that i game you, has the same problem.
Am I missing something?

Another odd new issue
  publication.from(components.release)
  publication.artifact androidSourcesJar

using artifact androidSourcesJar from task androidSourcesJar(type: Jar) gets this error when publishing

What went wrong:
Execution failed for task ':library:publishMavenPublicationToMavenLocal'.

Failed to publish publication 'maven' to repository 'mavenLocal'
Invalid publication 'maven': multiple artifacts with the identical extension and classifier ('jar', 'sources').

Should you be running proguard that early? I suspect that proguard thinks many of the things in your library module aren't being used (maybe because they're used by another project depending on it) and probably strips everything out. What you probably should be doing is instead embedding your proguard rules (if any) into your aar and running proguard in a higher-level module. Can you try with something like this instead?
android {
  defaultConfig {
    consumerProguardFiles 'proguard-rules.pro'
  }

  buildTypes {
    release {
      minifyEnabled false
    }
  }
}

See this post for more info: https://stackoverflow.com/a/50819864/1403479

For the second issue (and next time, please file a separate ticket for unrelated issues) this perhaps looks like an issue in your project. Perhaps you are trying to add sources to the publication in more than one place. I just added a commit to the sample app to verify that adding sources as an artifact works as expected.

Same result with R8 turned off. the only change I did was switching from the old 0.0.8-SNAPSHOT to the new 0.0.8. and switch to componente.release.
Maybe this only happens with already compiled AARs just like tha sample that i gave you.
Sorry about the 2º issue. I will do more investigations on Monday.

It looks like both of the originally-reported issues are actually related, and only present when using AGP 8. The old method of adding a source jar as an artifact now only needs to be done inside the singleVariant(...) block, so I think you should be able to delete the custom androidSourcesJar task that used to generate this artifact.
You can look at how I changed the sample library in this commit to see how it seems to work now. Let me know if that solves your issues and we can resolve this issue if that's the case.

The second issue was a side a affect of the first problem....
But yeah, this looks mandatory, and if there is no custom stuff, withSourcesJar and withJavadocJar can be simplified this way.
publishing {
    singleVariant('release') {
    withSourcesJar()
        withJavadocJar()
    }
}

Thanks for the help. the plugin is stable ;)
And I learned how to use Gradle Module Metadata the right way in the process.


Add missing apiVersion property

This change will enable changing the API version when using the SDK in a view. The TS types are already in place, so I guess this is a bugfix, not a new feature.

Solves https://github.com/mondaycom/monday-sdk-js/issues/95


Questions regarding this project

I am thinking of using berry but I have questions regarding this tiling window manager.

Does it use XCB or Xlib?
Am I able to do round corners around the Window? For example like this:

Am I able to add window decorations, for example maximise, minimise and close, example:

Is berry like XMonad where the user is given the source code and they just code whatever they want in a main file in a high level manner?
If 4 is true, am I able to use Rust?

Hi,
I'm not the developer, and I only discovered this WM myself a few days ago, but I think I can answer some of your questions.
First of all, berry is not a tiling WM. It is a classic stacking window manager.
Also the dev doesn't plan to implement a tiling mode directly, instead you can write a script for this yourself. See 4. of issue #92
Now to your questions:

According to the website, it uses Xlib.

berry doesn't support rounded corners. I don't know it you could achieve this effect with an external program.

Buttons in window decorations are not supported either. See proposal 2 in this comment and the following answer by the dev. They said they would look into it, but that was over a year ago.

Of course you can fork the project and modify the source code to your liking. But I don't think this is expected from us. Instead you can use shell scripts and the client berryc to manipulate windows and everything else. See usage and advanced usage.

See previous answer. Also berry is written in C so if you plan to edit the source code directly, you'll have to use that.

I hope I could help you. Also, once again, I'm not the dev, so please correct me if I said anything wrong.

Thanks man :)

thanks to @Akito98 for their answer - yes there are all good responses (sorry for the delayed response).


ASP.NET Core Blazor - App Code rewrite

Describe the issue or suggestion
I need to support the ASP.NET Core team, by helping to rewrite a few bits of Blazor learning/training module content.

Associated WorkItem - 292418

Got a bit further, thanks to @halter73. Nearly done, will create a new issue for next sprint to finish up.


enhancement: eslint config test files

Description
Update eslint config for test files, projectRoot/test/[app|service].

Closing as done.


window crashed (reason: 'crashed', code: '-1073741819')

Does this issue occur when all extensions are disabled?: No

VS Code Version: <IP_ADDRESS>
OS Version: Windows 10 21H1 (19043.1237) Professional

Steps to Reproduce:

issue #132945 does not give a solution
dmp files below
reports.zip

I've been having this same issue repeatedly and can't leave it open. Let me know if you figure out how I can fix this.

I have also encounter the same problem, If you solved,please tell me how  ,thank you so much.

Thanks for the crash logs, can you also attach the output of code --verbose.

Thanks for the crash logs, can you also attach the output of code --verbose. Also are you running the application as administrator ?

surprisingly, my VSCode back to normal two days ago. I have no idea how it fixed itself.

Thanks for checking back, I will close the issue for now. Can reopen if the issue persists.


Update docs with new optimizers.

Codecov Report

Merging #190 into master will decrease coverage by 1.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #190      +/-   ##
==========================================
- Coverage   86.22%   85.17%   -1.06%
==========================================
  Files          21       21
  Lines        1220     1214       -6
  Branches      282      282
==========================================
- Hits         1052     1034      -18
- Misses         92      103      +11
- Partials       76       77       +1

Impacted Files
Coverage Δ

torch_optimizer/swats.py
72.50% <ø> (-15.00%)
:arrow_down:

torch_optimizer/sgdp.py
76.71% <0.00%> (-0.92%)
:arrow_down:

torch_optimizer/adamp.py
89.87% <0.00%> (-0.38%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2308555...d31dbc9. Read the comment docs.


[FEATURE] [META] Security Analytics OCSF integration

Security Analytics workflows based on log types
Logs based on raw log types
In order to run Detectors on raw logs, the fields of these raw log documents are first mapped to ECS fields using field aliases.
Logs based on ECS schema
Users can also ingest logs in ECS schema format. In this case, Detectors will not require any explicit mappings to match rules with logs.
Logs based on OCSF schema
In future, Security Analytics plan to allow users to ingest data in OCSF schema format. In this case, the fields of these log documents in OCSF format are mapped back to ECS fields again using field aliases.
ECS remains the base format for all log types for which detectors run & matches rules with logs.
Proposed Data Structure to store mappings
A flat table is used to store field mappings from raw log fields to ECS fields to OCSF fields. The Raw Log Types field serve as the primary key for this flat table.

This will help in switching the base log type from ECS to OCSF in future easily without any backward compatibility issues.
Support for custom log types
Security Analytics today only support 13 pre-defined log types. But in future, we extend Security Analytics to support custom log types.
Users can define their own custom mappings, custom Sigma Rules & use them to run Detectors  on logs from a custom datasource.
Design
The Log Type object will be stored in an OpenSearch index named .opensearch-sap-log-types-config.
The mappings for the index will be defined as follows:
[{
  "name": "Cloudtrail",
  "description": "",
  "mappings": [
    {
      "raw_field": "userIdentity.arn",
      "ecs": "aws-cloudtrail-user_identity-arn",
      "ocsf": "actor.user.uuid"
    },
    {
      "raw_field": "",
      "ecs": "",
      "ocsf": ""
    }
  ]
}]

Proposing to add below Static Mapping Dictionary to start with (as resource file), which can be loaded by the plugin on startup for usage across the system during rule configuration and execution.
Sigma Rule Field || Log Type || Raw Log Field || ECS Field || OCSF Field || Agent 1 Schema || Agent 2 Schema
AuthenticationPackageName|| Windows || winlog.event_data.AuthenticationPackageName || <<ECS (optional)>> || OCSF ||<<Optional>>

In addition to the mapping, the Custom Log Type interface will allow users to create additional mappings which will then persisted by the system. The combination of static (pre-defined) and user-defined mappings can be then used all together for rule execution.

Hashing out the OCSF Integration from the parent issue here https://github.com/opensearch-project/security-analytics/issues/459


⚠ Bofrost.at has degraded performance

In 84addfd, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1091 ms

Resolved: Bofrost.at performance has improved in 1a661a3.


Microsoft Defender ATP renamed to Defender

Alter recipes to reflect the name change (old recipes from rtrouton-recipes have been deprecated)

Completed with 91c92a1c9c61ff0d2ae37f16e9be0b5e057278bc


Check schema of the object to determine the type

This PR checks the schema of the communicationIdentifierObject to determine the type during serialization.
It also changes the schema of the UnknownIdentifier model class as it has the exact same schema as CommunicationUserIdentifier

/azp run python - communication - tests

closing this one, as we created one against preview4 branch


Will there be a README or other documentation?

It would be awesome to have a README or documentation on this tool. A lot what you've described in this answer could simply be copied over.
Are you willing to answer questions about the tool? What's the best forum for it? Issues here on github? Questions on stackoverflow? Somewhere else?

@travisdowns Yessir, will get down to writing it. This Github repo would probably be the best place to discuss it. In the README or in the Wiki page. I don't want to just copy over what I wrote there, since I was explaining why the counters must have been set to count in OS mode, but I'll certainly inspire myself from them.

@travisdowns There's the beginnings of a README.md in the repo now, though much remains unsaid, especially about the kernel code.

Awesome, reading it now.
What's the approximate cost of the PFCSTART/PFCEND calls? Do the make a kernel transition, or does the LKM enable user-space setting & reading of the PMC counters?
How does this compare to agner fogs testp program:
http://www.agner.org/optimize/#testp
?
How does this compare to PAPI?
I'm actually looking for a lightweight way to time smallish sections of code. My current approach is to use Linux perf, but it doesn't have an API (you could, in principle, use the underlying perf_events syscalls, but I haven't looked into how hard that would actually be). It seems like libpfc could be that way.

@travisdowns They are defined here. pfcRemoveBias() automatically computes the costs for the current counter configuration. In particular, both sequences cost precisely the same (Assuming add/sub with memory operands cost the same), and both cost 37 instructions, ~240 unhalted core cycles and 0 branches (at least on my systems). There is no other overhead, and no system calls. In my experience, n pairs of PFCSTART() and PFCEND() followed by pfcRemoveBias(, n) produces essentially exact counts; For instance, if they sandwich no code, they'll reliably measure about 0 on all metrics.
The software does allow userspace to write configurations and counts to the hardware MSRs, and makes a kernel transition when doing so, but the macros PFCSTART() and PFCEND(), which employ rdpmc instructions, specifically do not make kernel transitions in order to ensure their deterministic run-time and cost. This determinism is relied upon by pfcRemoveBias() to compensate that deterministic cost.
testp is software in the same vein as libpfc, and supports more OSes and more CPUs. But it is not library-based, and its overhead estimation is not as deterministic as mine. The overhead estimation is written in C and involves loops; The code size for this is much greater, touches more icache lines, involves loops (and therefore branches) and there is no guarantee that the code for overhead estimation is exactly the same as the actual hot code timing. Moreover, the start code and end code are not precisely the same (the former involves an assignment, the latter a subtraction). Lastly, the rdpmc readouts from testp are int, which is 32 bits, while my macros perform full-bitwidth reads as reported by CPUID (On Haswell, 48-bit) and accumulate them into a 64-bit integer. However, it does correctly set the User bit and clear the Operating System bit, like me.
The PFCSTART() and PFCEND() macros are written in inline assembler. The instructions within them are precisely the same (except for the add/sub distinction), have the same cost and instruction size and are branchless. pfcRemoveBias() contains an single inline assembler chunk with both of them, to measure precisely their overhead. The PFCSTART() macro subtracts while the PFCEND() macro adds the current readouts of rdpmc, which means you can use multiple pairs to perform fine-grained performance measurements within the code, then invoke pfcRemoveBias(, n) with n equaling the number of such pairs to remove the overhead precisely.
IIRC, PAPI is the interface perf uses, in which case it would suffer from the same overcounting problem as perf.
My pfcdemo code should get you started using my library; The "hot section" is where you'd place your code for isolated snippets, but alternately you can ditch that and use my code as a library within your larger projects. For that, call my initialization, thread-pinning and counter setup code in your main, define a global array of 7 64-bit integers, and sandwich my PFC* macros around any chunk of code you wish to time. Then at program exit call pfcRemoveBias(, n) with the number of times nthat chunk of code was executed, divide the counts byn` to compute an average, and print out this value.

The 240 cycles is for reading all 8 counters, right? Is there an option to only read a subset?

@travisdowns Well, technically, 7 counters (3 fixed, 4 general-purpose).
It would be possible to read a subset by hacking the inline asm macros, but I wanted to avoid branches in them for reasons of predictability and avoiding incrementing counters if I could avoid it (like # of branches encountered and (mis)-predicted). Avoiding branches in that code while allowing any subset of 7 counters would require 2^7 versions of the macro, a bit painful.
Is the overhead of 7 counter reads that considerable?

@travisdowns Other thing to note, certain performance events can only be counted on certain counters (Some L1/L2 events can only be counted in GP1, for instance). I've no idea why.

I can't build through the readme.d, the meson.py ..  -Dbuildtype=release --prefix=/path/to/prefixdir  # Such as $HOME/.local is hard to understand