credentials not available via listener after authentication

when using the JS bundle I am unable to get my credentials.
The authentication to the oAuth works and I do receive an access_token.
I would like to persist this.

Spark test

Cisco Spark
login

This is the output I get:
spark.html:37 xxxxxxxxxxx starting spark xxxxxxxxxxx
2016-07-28 17:34:53.210 spark.html:46 loading cached credentials
2016-07-28 17:34:53.210 spark.html:82 initializing spark
2016-07-28 17:34:53.215 spark.html:60 initializing listeners
2016-07-28 17:34:53.216 spark.html:63 change:device:  {"services":{},"features":{"developer":[],"entitlement":[],"user":[]}}
2016-07-28 17:34:53.217 spark.html:68 change:credentials:  {}
2016-07-28 17:34:53.217 spark.html:73 change:isAuthenticated:  false
2016-07-28 17:34:53.218 spark.html:77 change:isAuthenticating:  undefined
2016-07-28 17:34:53.218 spark.html:100 starting authentication
2016-07-28 17:34:53.218 spark.html:112  => NOT authenticated
2016-07-28 17:34:53.218 spark.html:42 xxxxxxxxxxx done starting spark xxxxxxxxxxx
2016-07-28 17:34:55.935 spark.js:36811 credentials(shim): authenticating
2016-07-28 17:34:55.936 spark.js:36960 credentials(shim): generating csrf token
2016-07-28 17:34:55.937 spark.html:77 change:isAuthenticating:  true
2016-07-28 17:34:55.938 spark.html:68 change:credentials:  {}
2016-07-28 17:34:55.939 spark.js:36853 credentials(shim): initiating implicit grant flow
2016-07-28 17:34:56.246 Navigated to https://idbroker.webex.com/idb/saml2/jsp/doSSO.jsp?type=login&goto=https%3A…eams_write%2520spark%253Amemberships_write%26service%3Dspark&service=spark
2016-07-28 17:35:02.596 Navigated to https://idbroker.webex.com/idb/oauth2/oauth2Consent.jsp?clientID=C8da597e01…520spark%253Ateams_write%2520spark%253Amemberships_write%26service%3Dspark
2016-07-28 17:35:04.091 Navigated to http://localhost:5555/spark.html
2016-07-28 17:35:04.480 spark.html:37 xxxxxxxxxxx starting spark xxxxxxxxxxx
2016-07-28 17:35:04.483 spark.html:46 loading cached credentials
2016-07-28 17:35:04.483 spark.html:82 initializing spark
2016-07-28 17:35:04.489 spark.html:60 initializing listeners
2016-07-28 17:35:04.490 spark.html:63 change:device:  {"services":{},"features":{"developer":[],"entitlement":[],"user":[]}}
2016-07-28 17:35:04.490 spark.html:68 change:credentials:  {}
2016-07-28 17:35:04.491 spark.html:73 change:isAuthenticated:  false
2016-07-28 17:35:04.491 spark.html:77 change:isAuthenticating:  undefined
2016-07-28 17:35:04.491 spark.html:100 starting authentication
2016-07-28 17:35:04.491 spark.html:112  => NOT authenticated
2016-07-28 17:35:04.491 spark.html:42 xxxxxxxxxxx done starting spark xxxxxxxxxxx
2016-07-28 17:35:04.524 spark.js:36967 credentials(shim): verifying csrf token
2016-07-28 17:35:04.525 spark.js:36710 credentials: received authorization
2016-07-28 17:35:04.528 spark.js:36987 credentials(shim): updating browser location http://localhost:5555/spark.html

After the 'credentials: received authorization' I am unable to get my access_token and I am not authenticated.

ok, i think you've stumbled across several subtle bugs. Can you change initSpark() to the below and (a) let me know if it works and (b) share the new logs?
function initSpark() {
    console.log('initializing spark');
    return new ciscospark.init({
        credentials: credentials,
        device: device,
        config: {
            credentials: {
                clientType: 'confidential',
                oauth: {
                    client_id: client_id,
                    client_secret: client_secret,
                    scope: scope,
                    redirect_uri: redirect_uri
                }
            }
        }
    });
}

I tried clientType  'confidential' before too.
The error is still the same.
This is with a new bundle (0.7.0) and the clientType added to the init function.
The output is:
Navigated to http://localhost:5555/spark.html
2016-07-28 19:34:32.853 spark.html:37 xxxxxxxxxxx starting spark xxxxxxxxxxx
2016-07-28 19:34:32.856 spark.html:46 loading cached credentials
2016-07-28 19:34:32.856 spark.html:82 initializing spark
2016-07-28 19:34:32.862 spark.html:60 initializing listeners
2016-07-28 19:34:32.863 spark.html:63 change:device:  {"services":{},"features":{"developer":[],"entitlement":[],"user":[]}}
2016-07-28 19:34:32.863 spark.html:68 change:credentials:  {}
2016-07-28 19:34:32.864 spark.html:73 change:isAuthenticated:  false
2016-07-28 19:34:32.864 spark.html:77 change:isAuthenticating:  undefined
2016-07-28 19:34:32.864 spark.html:101 starting authentication
2016-07-28 19:34:32.864 spark.html:113  => NOT authenticated
2016-07-28 19:34:32.864 spark.html:42 xxxxxxxxxxx done starting spark xxxxxxxxxxx
2016-07-28 19:34:34.490 spark.js:36812 credentials(shim): authenticating
2016-07-28 19:34:34.491 spark.js:36961 credentials(shim): generating csrf token
2016-07-28 19:34:34.492 spark.html:77 change:isAuthenticating:  true
2016-07-28 19:34:34.493 spark.html:68 change:credentials:  {}
2016-07-28 19:34:34.494 spark.js:36877 credentials(shim): initiating authorization code grant flow
2016-07-28 19:34:35.444 Navigated to https://idbroker.webex.com/idb/oauth2/oauth2Consent.jsp?clientID=C8da597e01…520spark%253Ateams_write%2520spark%253Amemberships_write%26service%3Dspark
2016-07-28 19:34:36.786 Navigated to http://localhost:5555/spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5M…MzNi&state=Y3NyZl90b2tlbj1hN2NjYTRkYy0wMDM1LTRjZWYtYmU3NS04NWUzZDY4ZmMyMDg
2016-07-28 19:34:37.162 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:37 xxxxxxxxxxx starting spark xxxxxxxxxxx
2016-07-28 19:34:37.165 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:46 loading cached credentials
2016-07-28 19:34:37.165 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:82 initializing spark
2016-07-28 19:34:37.172 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:60 initializing listeners
2016-07-28 19:34:37.173 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:63 change:device:  {"services":{},"features":{"developer":[],"entitlement":[],"user":[]}}
2016-07-28 19:34:37.173 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:68 change:credentials:  {}
2016-07-28 19:34:37.174 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:73 change:isAuthenticated:  false
2016-07-28 19:34:37.174 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:77 change:isAuthenticating:  undefined
2016-07-28 19:34:37.174 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:101 starting authentication
2016-07-28 19:34:37.174 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:113  => NOT authenticated
2016-07-28 19:34:37.174 spark.html?code=M2JhOWM5YzEtOTQzNy00N2Q3LTgwMmMtZWI5MThlZDVkMDBhMmRlNjViYjQtMzNi&state=Y3NyZl90b2tl…:42 xxxxxxxxxxx done starting spark xxxxxxxxxxx
2016-07-28 19:34:37.208 spark.js:36988 credentials(shim): updating browser location http://localhost:5555/spark.html
2016-07-28 19:34:37.209 spark.js:36812 credentials(shim): authenticating
2016-07-28 19:34:37.211 spark.js:36342 credentials: auth code received, exchanging for access_token
2016-07-28 19:34:37.212 spark.js:36464 credentials: requesting authorization code grant
2016-07-28 19:34:38.474 idbroker.webex.com/idb/oauth2/v1/access_token:1 POST https://idbroker.webex.com/idb/oauth2/v1/access_token 400 (Bad Request)
2016-07-28 19:34:38.481 spark.js:14360 Uncaught (in promise) SubType {error: "invalid_client", errorDescription: "Invalid client", errorUri: undefined, res: Object, name: "InvalidClientError"…}SubType @ spark.js:14360(anonymous function) @ spark.js:36493
2016-07-28 19:34:38.484 spark.js:14360 Uncaught (in promise) SubType {error: "invalid_client", errorDescription: "Invalid client", errorUri: undefined, res: Object, name: "InvalidClientError"…}SubType @ spark.js:14360(anonymous function) @ spark.js:36493
2016-07-28 19:34:38.484 spark.js:14360 Uncaught (in promise) SubType {error: "invalid_client", errorDescription: "Invalid client", errorUri: undefined, res: Object, name: "InvalidClientError"…}

Before when I tried this, I could get rid of the 400 error by removing the auth from the POST request and adding the client_id, client_secret and redirect_uri.
This needed to be hard-coded because it didn't get this from the this.config hash.
After adding this I the POST succeeds but I still have no access_token available.

can you try generating your bundle with the following environment variables set? (and pass nothing to the config hash)

CISCOSPARK_CLIENT_ID
CISCOSPARK_CLIENT_SECRET
CISCOSPARK_REDIRECT_URI
CISCOSPARK_SCOPE

Also, did you explicitly install 0.7.0 or did npm install it automatically? According to semver, 0.7.0-* should be prerelease versions that you have to explicitly opt into (and they may or may not be ready yet)

I build the bundle of master, version fa143e59 now.
I will test the building with the env variables.

I see. Building master is potentially dangerous, especially right now (i'm working on setting up tooling to make sure master always passes all tests, but at the moment, many tests are disabled).
You should use the latest stable version from npm: npm install ciscospark. Alternatively, c49ca68f5a88c2fc93b98e666ca122fad637d96a corresponds to the commit for that release.

using the environment vars and only passing clientType to the init works the same as before.
This is the log out it generates:
Navigated to http://localhost:5555/spark.html
2016-07-28 20:38:17.934 spark.html:37 xxxxxxxxxxx starting spark xxxxxxxxxxx
2016-07-28 20:38:17.938 spark.html:46 loading cached credentials
2016-07-28 20:38:17.938 spark.html:82 initializing spark
2016-07-28 20:38:17.949 spark.html:60 initializing listeners
2016-07-28 20:38:17.950 spark.html:63 change:device:  {"services":{},"features":{"developer":[],"entitlement":[],"user":[]}}
2016-07-28 20:38:17.951 spark.html:68 change:credentials:  {}
2016-07-28 20:38:17.952 spark.html:73 change:isAuthenticated:  false
2016-07-28 20:38:17.952 spark.html:77 change:isAuthenticating:  undefined
2016-07-28 20:38:17.953 spark.html:102 starting authentication
2016-07-28 20:38:17.953 spark.html:114  => NOT authenticated
2016-07-28 20:38:17.953 spark.html:42 xxxxxxxxxxx done starting spark xxxxxxxxxxx
2016-07-28 20:38:20.605 spark.js:36812 credentials(shim): authenticating
2016-07-28 20:38:20.606 spark.js:36961 credentials(shim): generating csrf token
2016-07-28 20:38:20.608 spark.html:77 change:isAuthenticating:  true
2016-07-28 20:38:20.608 spark.html:68 change:credentials:  {}
2016-07-28 20:38:20.609 spark.js:36877 credentials(shim): initiating authorization code grant flow
2016-07-28 20:38:21.187 Navigated to https://idbroker.webex.com/idb/oauth2/oauth2Consent.jsp?clientID=C8da597e01…520spark%253Ateams_write%2520spark%253Amemberships_write%26service%3Dspark
2016-07-28 20:38:23.031 Navigated to http://localhost:5555/spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlN…MzI5&state=Y3NyZl90b2tlbj1hMDQ4NzVhZi0yZTczLTRmNGYtYTgxZC03NzdkZDU1MTM1ZGQ
2016-07-28 20:38:23.503 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:37 xxxxxxxxxxx starting spark xxxxxxxxxxx
2016-07-28 20:38:23.507 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:46 loading cached credentials
2016-07-28 20:38:23.507 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:82 initializing spark
2016-07-28 20:38:23.515 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:60 initializing listeners
2016-07-28 20:38:23.516 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:63 change:device:  {"services":{},"features":{"developer":[],"entitlement":[],"user":[]}}
2016-07-28 20:38:23.517 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:68 change:credentials:  {}
2016-07-28 20:38:23.518 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:73 change:isAuthenticated:  false
2016-07-28 20:38:23.518 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:77 change:isAuthenticating:  undefined
2016-07-28 20:38:23.518 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:102 starting authentication
2016-07-28 20:38:23.518 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:114  => NOT authenticated
2016-07-28 20:38:23.519 spark.html?code=OTY3ZjdhMjUtZmM5MS00YmRhLWJkYmYtMmRlNzZiNWIwZTdkNzJmNzE5Y2UtMzI5&state=Y3NyZl90b2tl…:42 xxxxxxxxxxx done starting spark xxxxxxxxxxx
2016-07-28 20:38:23.573 spark.js:36988 credentials(shim): updating browser location http://localhost:5555/spark.html
2016-07-28 20:38:23.574 spark.js:36812 credentials(shim): authenticating
2016-07-28 20:38:23.575 spark.js:36342 credentials: auth code received, exchanging for access_token
2016-07-28 20:38:23.576 spark.js:36464 credentials: requesting authorization code grant
2016-07-28 20:38:24.692 spark.js:36710 credentials: received authorization

I know in step: 'requesting authorization code grant' the POST gets done, but after that the token is not handled.

ah, ok. I couldn't get the npm package build, but I have checked the version c49ca68f out and I will try this.

This gives the same result. After I get the code this is the output:
spark.js:36988 credentials(shim): updating browser location http://localhost:5555/spark.html
2016-07-28 20:53:26.092 spark.js:36812 credentials(shim): authenticating
2016-07-28 20:53:26.093 spark.js:36342 credentials: auth code received, exchanging for access_token
2016-07-28 20:53:26.094 spark.js:36464 credentials: requesting authorization code grant
2016-07-28 20:53:27.710 idbroker.webex.com/idb/oauth2/v1/access_token:1 POST https://idbroker.webex.com/idb/oauth2/v1/access_token 400 (Bad Request)
2016-07-28 20:53:27.716 spark.js:14360 Uncaught (in promise) SubType {error: "invalid_client", errorDescription: "Invalid client", errorUri: undefined, res: Object, name: "InvalidClientError"…}SubType @ spark.js:14360(anonymous function) @ spark.js:36493

ok. i have a guess: ciscospark is an initialized instance of the sdk; ciscospark.init creates a second instance. I'm pretty sure that the first instance is grabbing the token from the address bar but the second instance is the one that has the event handlers wired up.
try this:
function initSpark() {
  console.log('initializing spark');
  Object.assign(ciscospark.config.credentials.oauth, {
    client_id: client_id,
    client_secret: client_secret,
    scope: scope,
    redirect_uri: redirect_uri
  });
  return ciscospark;
}

I'm going to have to think about a proper solution a bit more, but I'm completely aware this area needs some cleanup.

Ok, this sounds plausible.
I will try it tomorrow morning and let you know.

Op 28 jul. 2016 om 21:38 heeft Ian Remmel<EMAIL_ADDRESS>het volgende geschreven:
ok. i have a guess: ciscospark is an initialized instance of the sdk; ciscospark.init creates a second instance. I'm pretty sure that the first instance is grabbing the token from the address bar but the second instance is the one that has the event handlers wired up.
try this:
function initSpark() {
console.log('initializing spark');
Object.assign(ciscospark.config.credentials.oauth, {
client_id: client_id,
client_secret: client_secret,
scope: scope,
redirect_uri: redirect_uri
});
return ciscospark;
}
I'm going to have to think about a proper solution a bit more, but I'm completely aware this area needs some cleanup.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

this seems to work! :-) the only thing I am missing is the loading of the credentials. How do I pass the credentials and device in the initSpark function?
I tried: Object.assign(ciscospark.credentials, credentials);
but this doesn't work.
The credentials variable gets filled from the localstorage where the authorization is saved.

I managed to get the credentials working.
Thx for the help. I will be able to get going with my app now.

 I've opened issues for the (what i believe to be) all of the causes of the confusion.


Ensuring that SQS publisher uses IMessageSerialiser to serialise messages

Note that JsonConvert.SerializeObject is still left as is, the final message pushed onto SQS queue must contain a Subject and Message fields. For SNS publishing, this is done automatically by AWS.

PR looks good. Thanks.


Pass stream to image manager when performing conversions

Allows images to be manipulated on cloud disks. Cherry picked from #18

Thanks for pushing these ones through!


WIP. Add search with NIP-50

This is an attempt to implement search for posts using NIP-50 like it's done in Snort/Iris. The only relay that supports that NIP properly atm is relay.nostr.band, so it had to be hard-coded.

Thank you for the feedback, I think you're right. Marking it as WIP for now.

Resolved in https://github.com/vitorpamplona/amethyst/commit/681e3eb44efe7ea6591815f3c29b851989e815e5


python 3.10+ ?

Curious, if there is a reason this requires python 3.10+?
https://github.com/trevorhobenshield/amazon_photos/blob/main/setup.py#L32
Would love to be able to install and use this on python 3.9 which is my default python version installed on macos 12 monterey

It requires 3.10 or above. if you dont want that and want to try it with 3.9, just change line 32 with "3.9". However, it can be the case that there are functions that are not working on versions below 3.10.10. It is recommended to upgrate to the latest stable version.


Expand Drag + Drop Target Area

bug
What is the current behavior?
When dragging in an image / file, the target area is tiny. You need to drag it exactly at the cursor, or the browser redirects to the file.
What is the expected behavior?
Make the drag target area the entire editor div.
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
v0.9, all browsers

Any solution to this?


How to get content of an index entry as result of watcher query?

Hi,
I have an entry in my index heartbeat-6.3.0-2018.11.27 like below;
{
  "_index": "heartbeat-6.3.0-2018.11.27",
  "_type": "doc",
  "_id": "rLHWVGcBz2XI4HlCvBwl",
  "_version": 1,
  "_score": 2,
  "_source": {
    "@timestamp": "2018-11-27T11:03:37.130Z",
    "type": "monitor",
    "beat": {
      "name": "ubuntu",
      "hostname": "ubuntu",
      "version": "6.3.0"
    },
    "host": {
      "name": "ubuntu"
    },
    "tcp": {
      "port": 9092
    },
    "monitor": {
      "ip": "<IP_ADDRESS>",
      "status": "down",
      "host": "<IP_ADDRESS>",
      "scheme": "tcp",
      "name": "tcp",
      "type": "tcp",
      "duration": {
        "us": 490
      },
      "id": "tcp-tcp@<IP_ADDRESS>:9092"
    },
    "error": {
      "type": "io",
      "message": "dial tcp <IP_ADDRESS>:9092: getsockopt: connection refused"
    }
  },
  "fields": {
    "@timestamp": [
      "2018-11-27T11:03:37.130Z"
    ]
  }
}

My watcher rule is simple;

Check monitor.status field of my index and check if it is down and count > 3
Publish to another index my_alarms if condition satisfies

Below is my watcher rule
{
  "actions": {
    "Webhook_c97167b3-0db5-4698-bb7c-e57b0f08eabd": {
      "name": "my watcher alarm",
      "throttle_period": "1m",
      "webhook": {
        "method": "POST",
        "host": "<IP_ADDRESS>",
        "port": 9210,
        "path": "/my_alarms/doc",
        "body": "{\"log\":\"ERROR\",\"message\": \"It is down\"}",
        "create_alert": true,
        "headers": {
          "content-type": "application/json"
        }
      }
    }
  },
  "input": {
    "search": {
      "request": {
        "index": [
          "heartbeat-*"
        ],
        "body": {
          "query": {
            "bool": {
              "filter": {
                "range": {
                  "@timestamp": {
                    "gte": "now-30s/s",
                    "lte": "now/s",
                    "format": "epoch_millis"
                  }
                }
              },
              "must": {
                "match": {
                  "monitor.status": "down"
                }
              }
            }
          },
          "size": 0,
          "aggs": {
            "dateAgg": {
              "date_histogram": {
                "field": "@timestamp",
                "time_zone": "GMT",
                "interval": "1m",
                "min_doc_count": 3
              },
              "aggs": {
                "termAgg": {
                  "terms": {
                    "field": "monitor.host"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "condition": {
    "script": {
      "script": "payload.aggregations.dateAgg.buckets.some(b => b.doc_count>=1)"
    }
  },
  "trigger": {
    "schedule": {
      "later": "every 30 seconds"
    }
  },
  "disable": false,
  "report": true,
  "title": "my_watcher",
  "wizard": {},
  "save_payload": true,
  "spy": false,
  "impersonate": false
}

What I am trying to achieve is, I want monitor.ip and tcp.port from my heartbeat index in my_alarms index's message section. Is this possible?
Thank you.

Yes, it is possible to access Elasticsearch data. Use mustache syntax in the webhook action body property for this. Look at this example for reference
https://sentinl.readthedocs.io/en/latest/HOWTO-Alerts-in-Nagios-NRDP/#mustache-playground
And here is a playground https://mustache.github.io/#demo
First try to put something simple like
"body" : "total: {{payload.hits.total}}"

@gitime You need to properly enter and process the objects, please refer to the Mustache documentation to understand the exact syntax - we just implement it as-is. If you feel there is an issue with Sentinl, please reopen this thread anytime.


can't complete with only leading @

package main;

import lombok.Data;

@A
public class Bar {
	private String message;
	private String description;
	private int age;
	private String living;
	private int sex;
	private String name;
}

This works fine but
package main;

import lombok.Data;

@
public class Bar {
	private String message;
	private String description;
	private int age;
	private String living;
	private int sex;
	private String name;
}

This return Pattern not found.

here is my vimrc set it can works together with YCM
https://github.com/wsdjeg/DotFiles/commit/2442a4a8482976dd63040522af53210fcb8207b6

and if i type @A
all the anocation whit starting "A" will be listed

No, It's plugin's bug.

@artur-shaik annotation will be completed when leading @ with one letter.
https://github.com/artur-shaik/vim-javacomplete2/blob/master/autoload/javacomplete/complete.vim#L104
is this your expected?
And I notice it should be g:RE_ANNOTATION.
https://github.com/artur-shaik/vim-javacomplete2/blob/4d4167d31850a8341b8fddf2f0aead9b4fd24ba8/autoload/javacomplete.vim#L74

Yeah, this is expected behavior. But I'm looking forward to add feature to load all annotations on @.

Added this in 2d1f0b22a196d5677e7469daf9716e2510d22f0a.
Looks like it is not really usefull when you have too much annotations.

thanks!


Update Casdoor.php

https://github.com/casdoor/wordpress-casdoor-plugin/issues/14

 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.

@geekyouth plz fix:


Feature Request: past_key_values landed in transformers, and could speed up generations

Transformers can now return past_key_values which can be used to speed up future calls:
https://github.com/huggingface/transformers/pull/25086
I've noticed in experiments that when I build a query function in LMQL, I thought I'd read in the docs that it caches previous runs to speed up future runs when the query text has a common prefix, but alas, timing it it was the same whether I built a query function once and reused it, or rebuilt it for each separate query.
Now, transformers will allow this speed up pretty trivially!

You can refer to the Guidance for the implementation of external support for key-value (KV) cache in the generate method for the transformer.
here is the link
(https://github.com/guidance-ai/guidance/blob/302a240b35b51a8626bfb7f8b9beb28fc6359bf4/guidance/llms/_transformers.py#L126)
In fact, you can directly copy the code from the guidance with minimal modifications. However, it is important to note that LMQL itself supports asynchronous batch computation, which means that the current computation progress cached behind each query may vary. If you want to use KV cache, batch computation cannot be used, and can only be performed serially under batch size=1. In fact, it is possible to simultaneously support batch computation and KV cache in LMQL, but it would be very cumbersome. Each generate would require the reassembly of the KV cache and adjusting their current computation progress, as well as handling padding for batch computation, which would involve both left and right shifts. This process is very cumbersome, prone to errors, and difficult to abstract into a common solution to support all backends. I think it's possible that the author has temporarily not supported KV cache due to these reasons.

Yes, this is precisely what is delaying KV caching support currently. We want to provide full batched support, but a simple non-batched variant may make it to main before then.


GUI scaling issues

All samples show the GUI incorrectly on a system with RX 5700 XT, windows, 4K and 200% scaling.
Setting the system to 100% scaling fixes it.

Hi @aurolou I can't remember for certain but I think you also experienced this issue? If so could you please check if this patch fixes it? https://github.com/KhronosGroup/Vulkan-Samples/pull/156

yes, it does fix it for me! :)

Great thanks for checking :)


[FEAT] Safely handle requiring Zap in the Studio environment

Describe your feature
Zap in its current state fails to account for the case where its modules (most significantly the client's) are required before runtime. When using plugins that may require modules that contain a require() to the client's Zap module you are currently met with an infinite yield.
This is because the client modules call WaitForChild on Zap's remotes:
local reliable = ReplicatedStorage:WaitForChild("ZAP_RELIABLE")
local unreliable = ReplicatedStorage:WaitForChild("ZAP_UNRELIABLE")

These remotes aren't created until Zap's server module is required for the first time.
I propose adding an environment check at the beginning of both modules to safely return some sort of mock table if they are required outside of a server or client context.
Alternatives
The alternative for this is creating the two events manually in ReplicatedStorage, either by requiring the server module or by constructing them yourself. As a temporary solution, in the current version (0.6) of Zap this is fairly simple and doable.
However, going forward with #72 for future versions (0.7+) this will introduce a problem as there will be an arbitrary number of events to keep up with. These events will increase and decrease in number between edits to the zap config.
Implementation Details
Zap should continue to return a table and maintain the typings regardless of whether it's loaded successfully or not. This load status of the module should be determined by whether the module is required in its correct environment (server or client) and not in the Studio environment.
This loaded state should be accessible outside of Zap module so that code that may be dependent on it can maneuver around any fatal errors that may arise from indexing for non-existent events.
An example implementation that should maintain typings:
-- Check context anything else
local loadedSuccessfully: boolean = --> Ensure context

if not loadedSuccessfully then
  local out = { Loaded = loadedSuccessfully }
  return (out :: any) :: ReturnType
end

-- Zap Module Code

-- Create return table:
local returns = {
  Loaded = loadedSuccessfully
  -- Event/Function Tables
}
type ReturnType = typeof(returns)

return returns

I'll typecast it for 0.6.x, and then return noop functions in 0.7.0.

I changed my mind, I'll go the noop route.


Fatal error: Uncaught Error: Class 'cxxt\Exchange'

my code is:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL | E_STRICT);
include "ccxt.php";
var_dump (\cxxt\Exchange::$exchanges);
?>

but my server give me an error:
Fatal error: Uncaught Error: Class 'cxxt\Exchange' not found in /var/www/html/trading bot/prova.php:6 Stack trace: #0 {main} thrown in /var/www/html/trading bot/prova.php on line `6```

See: https://github.com/kroitor/ccxt/tree/master/examples/php
There's only one simplest PHP example there, but we hope to extend PHP examples with your help )
If this does not work...
<?php
include 'ccxt.php';
$exchanges = \ccxt\Exchange::$exchanges;
echo 'Supported exchanges: ' . implode (', ', $exchanges);
?>

... then let us know your PHP version and your ccxt version )

Also, check your path to ccxt.php, you should link against ccxt_folder/build/ccxt.php not against ccxt_folder/ccxt.php.

Here's my output:
mbp:ccxt igorkroitor$ php --version
PHP 5.6.30 (cli) (built: Feb  7 2017 16:18:37)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
mbp:ccxt igorkroitor$ php -a
Interactive shell

php > include 'build/ccxt.php';
php > $exchanges = \ccxt\Exchange::$exchanges;
php > echo 'Supported exchanges: ' . implode (', ', $exchanges);
Supported exchanges: _1broker, _1btcxe, anxpro, binance, bit2c, bitbay, bitbays, bitcoincoid, bitfinex, bitfinex2, bitflyer, bitlish, bitmarket, bitmex, bitso, bitstamp, bittrex, bl3p, btcchina, btce, btcexchange, btcmarkets, btctradeua, btcturk, btcx, bter, bxinth, ccex, cex, chbtc, chilebit, coincheck, coinfloor, coingi, coinmarketcap, coinmate, coinsecure, coinspot, cryptopia, dsx, exmo, flowbtc, foxbit, fybse, fybsg, gatecoin, gdax, gemini, hitbtc, hitbtc2, huobi, itbit, jubi, kraken, lakebtc, livecoin, liqui, luno, mercado, okcoincny, okcoinusd, okex, paymium, poloniex, quadrigacx, quoine, southxchange, surbitcoin, therock, urdubit, vaultoro, vbtc, virwox, xbtce, yobit, yunbi, zaif
php > exit
mbp:ccxt igorkroitor$

i do not know if it can help you but this is my php version
coin@coin-pc:~$ php --version PHP 7.0.22-0ubuntu<IP_ADDRESS> (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies  with Zend OPcache v7.0.22-0ubuntu<IP_ADDRESS>, Copyright (c) 1999-2017, by Zend Technologies
now all work fine thank you!

ccxt version = 1.6.42

Thx for reporting back!

huobi has a new logo

Will update shortly, thx!


Switching Wallets Import Seed Issues - From Portis to Native iOS mobile

Overview
When switching wallets on mobile iOS, from portis to native, attempting to import a native seed won't allow you to type in the phrase, keyboard doesn't come up. Android works.
References and additional details

go to app.shapeshift.com
log in with your portis wallet.
switch to a native wallet, and choose import a wallet.
try typing in your seed and observe that you can't click inside the text box and a keyboard does not come up.

This is only happening on iOS devices, and will require that the bounty hunter have access to an iPhone

Acceptance Criteria
you should be able to click inside the text box on the import wallet page and a keyboard should come up, allowing you to type inside the box.
Need By Date
No response
Screenshots/Mockups
https://user-images.githubusercontent.com/99363597/162016350-dec6f48e-3240-45d5-b148-2dfbc453c6b0.mp4
Ownership

[X] If my bounty needs engineering or needs product I have added the respective labels on the right
[X] As the sponsor of this bounty I will review the changes in a preview environment (ops/product) or review the PR (engineering)

Estimated effort
Half a day.
Sponsor / Stakeholder
github: 0xApotheosis discord: 0xApotheosis#2503
Bounty Hunters

Join our discord
Include an expected timeline for you to complete work in the work plan when you apply for this bounty!
Please refer to this link for some basic info
Please do not start work on this issue until you are approved in Gitcoin.

This appears to be a bug. That keyboard should slide up. Maybe something weird with that text area.

@wesleygravess to be explicit here, it looks like this issue was observed on Safari?
And was it observed on any other browsers?

(curious about this; dropping a comment so I'll get a notification as it progresses)

(curious about this; dropping a comment so I'll get a notification as it progresses)

You can also "Subscribe" to issues directly in the right-side sidebar.

TIL!

I investigated!
Probably not the best way to fix it but it seems that the navigation Drawer has a focus trap, adding trapFocus={false} to the Drawer here fixes it: https://github.com/shapeshift/web/blob/develop/src/components/Layout/Header/Header.tsx#L94
Noticed that the WalletViewsSwitch modal has a trapFocus={false}, but removing it doesn't change anything...

Pretty intelligent, how would you manage that? I guess you need to use the useDisclosure hook with the Drawer id

Let me try something out, and get back to you @NeOMakinG

Nailed it @reallybeard 🦊


Futurize the codebase

This is the result of having run "futurize -1" and  "futurize -2" on the code base, and added a few bits and pieces to the Makefile to support running the tests and tidying up afterwards.
The result runs fine using Python 2 on Debian Sid and Fedora Rawhide. There are as yet some issues to resolve for it to run on Python 3.

This looks good to me!  I'm going to wait until the Travis build starts running and completes before merging (unless that takes another few hours, in which case I might just merge it and fire off nightly testing on pyChapel)

For reference, I intend to wait until asked or until a sufficient amount of time is passed to bundle a new pyChapel release rather than release a large number very quickly.  Let me know if you think that's a bad policy decision and I'm happy to change it


Link on this website no longer supported

https://master.kubeflow.org/docs/gke/deploy/deploy-ui/

@anton-wundeman For Kubeflow 1.0, the link to deploying with UI is: https://v1-0-branch.kubeflow.org/docs/gke/deploy/deploy-ui/ (you can switch branches in the docs to find the guides to older KF versions).
As far as I know, from Kubeflow 1.1:

... deploying Kubeflow via the click to deploy web application is no longer supported. Please use kustomize and kpt to deploy Kubeflow.

(It should say that in the docs).
Similar Issue https://github.com/kubeflow/website/issues/2103
/assign @Bobgy @8bitmp3 @RFMVasconcelos
cc @jlewi

Like the docs says, deploing with the UI is no longer supported.


Average and throughput statistics

Awesome, looks good :+1: but we'll need a CATVERSION bump since some function signatures changed.


Error CS0246 and CS0400: The type or namespace name 'FFImageLoading' could not be found (are you missing a using directive or an assembly reference?)

MAIN\Src\Xyz\App.xaml.cs(7):MAIN\Src\Xyz\App.xaml.cs(7,7): Error CS0246: The type or namespace name 'FFImageLoading' could not be found (are you missing a using directive or an assembly reference?)
AND
MAIN\Src\Xyz\obj\Release\Xyz.Views.EmployeeLoginPage.xaml.g.cs(24):MAIN\Src\Xyz\obj\Release\Xyz.Views.EmployeeLoginPage.xaml.g.cs(24,25): Error CS0400: The type or namespace name 'FFImageLoading' could not be found in the global namespace (are you missing an assembly reference?)
I do not get this error when I build Android locally on my Mac.
The error is being generated from a build agent as part of our CI
The package files are in source control and part of the solution
Any suggestions.  I saw something similar with the SVG component, not sure if it is the same issue?
We are using Xamarin Forms v<IP_ADDRESS>020
using FFImageLoading v2.2.20, FFImageLoading.Forms for image caching only.  Just to be clear we are not using the SVG component.
Additionally, these errors (34) in all, are in 17 different code files in our PCL (where our Views and ViewCells are located).
We cannot upgrade to a new version of XF (2.5.x)  or the FFImageLoading as it breaks the UI and images are no longer scaled correctly.

It was fixed in FFImageLoading v2.2.25, you can safely update, but just remember to disable fast renderer with CachedImageRenderer.Init(false).

Daniel,
Thank you for the quick response.
Thank you for the CachedImageRenderer.Init(false) tip.
Where can I find additional information on the new behavior (*.Init(true))
What are the advantages or Why
What are the side effects developers should consider in making the change
What might be the typical code change to have the *.Init(true) behavior?

true uses fast renderers, read more here: https://developer.xamarin.com/guides/xamarin-forms/under-the-hood/fast-renderers/


fix: add content-length middleware for operation that has codable conformance (AWS Query)

Issue #

Fixes https://github.com/awslabs/aws-sdk-swift/issues/619
Description of changes

Current SDK code checks whether there is a member in the request shape which doesn't target header, query, if yes add the Content-Length middleware because the member will go to body.
For operation like GetCallerIdentity in STS, it doesn't have any members defined which means there is no Content-Length middleware for it. However, per AWS Query protocol, during serialization Action and Version is always added to body.
Action=GetCallerIdentity&Version=2011-06-15

With this change, it makes sure if we have a Codable conformance to add something to body of the request, there must exist a Content-Length middleware.
Scope

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Should there be tests on this?

Fair call, nothing broke i.e. there are actually no tests for this. Let me see if I can add some.

Test case https://github.com/awslabs/aws-sdk-swift/pull/681/files


feat(routes): finalize routing

ヘ(￣ω￣ヘ)
what

moved nav down to login, register, and tracker components, removing it from home
if logged in, redirect from home, login, and register to your tracker page
change from /tracker -> /u/:username and load correct basic info (no captures yet) of the user

notes

this does not handle user 404's. that will be handled in #43
by moving nav, it messed up the flexbox configuration, so that needs to be fixed. i tried fixing it and other things broke so i'll leave that to you :)
when a tracker page is loading, i'm hiding the entire dex component (to simulate loading and because it'll err otherwise), causing some weird stuff (the info component starts at the top). when you add the loading gif, that'll be the time to fix that
the way it's set up right now, it would be possible to have multiple loading states (show the header after the user is done loading, then show the pokemon, then show the captures, etc). i don't know if that's desired or if you just wanna have one "loading state" that ends when everything is done loading. what do you think?

fixes #30
fixes #40

1 Q: should signing out route you back to /home? right now it shows you the "view only" version of your own tracker, which is slightly confusing.
re: gifs, i'd prefer to just have one gif that loads when everything's done. no point in using any one part of the tracker without any of the others.

technically, it just leaves you on the page you were on (regardless of whether it's your tracker or not), but i can see it maybe being better to redirect home. i dont have a preference.
cool, then we'll do one gif :+1:

ic. it might be less confusing once we actually have a separate design for "viewing" someone's dex, and maybe it'll be more clear. we'll see. begs the question if we should have some sort of indication of "viewing" vs. "editing". cause you could also be signed in but be viewing someone else's dex..
anyways lgtm!

hmm good point. yeah, we might need that distinction.
do you wanna wait to merge this until you can fix the styles or do you wanna do that in a separate PR?

Let's merge this one and I'll rebase my homepage PR and fix it there.


Add +prescient to company

Tested for a week or so now and it seems to make a decent difference. Mirrors the config that ivy does, also doesn't seem to have any open issues related to it.

[x] It targets the develop branch
[x] I've searched for similar pull requests and found nothing
[x] This change is NOT in Doom's do-not-PR list: https://doomemacs.org/d/do-not-pr
[x] If I've bumped any packages, I've done so according to https://doomemacs.org/d/how2bump
[x] I've linked any relevant issues and PRs below
[x] All my commit messages are descriptive and distinct

Unfortunately, I already intend to slowly replace prescient with the orderless + completion-styles support, both in the ivy module and the company module, so I must refuse this PR. Thanks for bringing it to my attention in any case.

No worries, one to add to DO NOT PR?


New serialized data format in testdata

New try to test new detached format added in testdata repo. See https://github.com/microsoft/FluidFramework/pull/18829 for more info

can you verify the new test data in running in a test, basically just look it up in the CI pipeline output, maybe add a link here if possible.

there are the new tests that use new serialized container data format. Links coming from passing CI pipeline:
Rehydrate container from newSerializedContainer.json and check contents before attach
https://dev.azure.com/fluidframework/public/_build/results?buildId=231355&view=ms.vss-test-web.build-test-results-tab&runId=5125622&resultId=100004&paneView=debug
Rehydrate container from newSerializedContainer.json round trip serialize/deserialize
https://dev.azure.com/fluidframework/public/_build/results?buildId=231355&view=ms.vss-test-web.build-test-results-tab&runId=5125622&resultId=100005&paneView=debug

test data repo PR: https://github.com/microsoft/FluidFrameworkTestData/pull/64


Haccp food safety diary/logs

I work in a restaurant and for safety and food management you have to keep track of fridges temperatures, food labels, maintainance etc... It would be much easier to keep track of those with an app on a smartphone, rather than paper. It would be also interesting to make it shareable with co workers. There are few apps on the play store to accomplish this, but they are paid services and with close source, stored on a third-party server somewhere.
My idea is of an app that connects to a self hosted database or webserver to keep track of food labels, chores and equipment cleaning, fridges temperature. Where you can take a photo of the label or maybe with an implementation like grocy of barcodes, but the lot number is also important so maybe photo is faster.
Also to set deadlines for chores and get a notification when they are due. Keep track of ingredients in the menu and make a list to buy them later.
The self hosted webserver would be the core of the peoject and maybe a day there will be also an app for smartphones.

Hello everyone 👋
I hope this message finds you well. As you may know, the original repository for app ideas has not been updated in a while and is no longer actively maintained. However, I'm excited to let you know that a new repository has been created to continue this project (https://github.com/vincent0426/app-ideas).
The new repository aims to provide a comprehensive list of practical and achievable app ideas that developers of all levels can work on to improve their skills and build their portfolios. We welcome contributions from anyone who wants to add their own app ideas or improve the existing ones, and we are also looking for volunteers who can help maintain the repository and keep it up to date.
If you are interested in contributing or maintaining this project, please head over to the new repository (https://github.com/vincent0426/app-ideas) ⭐ and take a look at the existing issues and pull requests. Feel free to open a new issue if you have an app idea to suggest or if you have any questions about the project.
Thank you for your attention, and I hope to see you in the new repository soon! 💖

⚠ This message was generated by a robot 🤖, if this message reached you, consider leaving a star for this robot, repository link
⭐ https://github.com/aldairandre/github-bot ⭐

Hello everyone 👋
I hope this message finds you well. As you may know, the original repository for app ideas has not been updated in a while and is no longer actively maintained. However, I'm excited to let you know that a new repository has been created to continue this project (https://github.com/vincent0426/app-ideas).
The new repository aims to provide a comprehensive list of practical and achievable app ideas that developers of all levels can work on to improve their skills and build their portfolios. We welcome contributions from anyone who wants to add their own app ideas or improve the existing ones, and we are also looking for volunteers who can help maintain the repository and keep it up to date.
If you are interested in contributing or maintaining this project, please head over to the new repository (https://github.com/vincent0426/app-ideas) ⭐ and take a look at the existing issues and pull requests. Feel free to open a new issue if you have an app idea to suggest or if you have any questions about the project.
Thank you for your attention, and I hope to see you in the new repository soon! 💖

⚠ This message was generated by a robot 🤖, if this message reached you, consider leaving a star for this robot, repository link
⭐ https://github.com/aldairandre/github-bot ⭐

Hello everyone 👋
I hope this message finds you well. As you may know, the original repository for app ideas has not been updated in a while and is no longer actively maintained. However, I'm excited to let you know that a new repository has been created to continue this project (https://github.com/vincent0426/app-ideas).
The new repository aims to provide a comprehensive list of practical and achievable app ideas that developers of all levels can work on to improve their skills and build their portfolios. We welcome contributions from anyone who wants to add their own app ideas or improve the existing ones, and we are also looking for volunteers who can help maintain the repository and keep it up to date.
If you are interested in contributing or maintaining this project, please head over to the new repository (https://github.com/vincent0426/app-ideas) ⭐ and take a look at the existing issues and pull requests. Feel free to open a new issue if you have an app idea to suggest or if you have any questions about the project.
Thank you for your attention, and I hope to see you in the new repository soon! 💖

⚠ This message was generated by a robot 🤖, if this message reached you, consider leaving a star for this robot, repository link
⭐ https://github.com/aldairandre/github-bot ⭐


feat: add wechat living

新增微信直播接口

Codecov Report

Merging #726 (d30b1e2) into master (399d23f) will decrease coverage by 0.18%.
The diff coverage is 45.45%.

@@            Coverage Diff             @@
##           master     #726      +/-   ##
==========================================
- Coverage   75.06%   74.88%   -0.19%
==========================================
  Files         107      108       +1
  Lines        5274     5307      +33
==========================================
+ Hits         3959     3974      +15
- Misses       1315     1333      +18

Flag
Coverage Δ

unittests
74.88% <45.45%> (-0.19%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

wechatpy/work/client/api/living.py
41.93% <41.93%> (ø)

wechatpy/work/client/__init__.py
100.00% <100.00%> (ø)

wechatpy/work/client/api/__init__.py
100.00% <100.00%> (ø)

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 399d23f...d30b1e2. Read the comment docs.

lgtm, thanks!


Ensure support for different Access Token formats

PR (#7) that does some of the work in this PR, and I'm a bit concerned about conflicts, etc. How do you want to proceed?

I will do a manual merge and bring in parts of code from PR #7

My position (basically) is that use of JWT does not imply OAuth2

Agreed, JWT can be used alone without the use of OAuth. However, in our case, the JWT/JOSE support we are adding in the framework is required by the different OAuth/OIDC feature implementations. Also, the intent with Spring Security is not to provide a JWT/JOSE library that can be used standalone. Our intent is not to compete against providers like Nimbus.

Note, there are a couple of points here where @jgrandja and I still need to come together on, and so I've logged issues for both of those: https://github.com/spring-projects/spring-security/issues/5237 and and https://github.com/spring-projects/spring-security/issues/5241
Otherwise, the PR looks good, so merging.


Meta ticket for running gci on Kubernetes

GCI can run on Kubernetes now as long as the Docker socket is mounted, but it's not very useful. Here are some things that would make it more so

[ ] An API server that lets you submit a tarball to be un-tarred and built & tested (#35, #44)

The server should allow the client to send all, or pieces, of a gci.yaml file in the request body. Example use cases:

They don't have a gci.yaml and want to do a cross-compile
They have a gci.yaml but want to override output-binary

[ ] A facility to run appropriate tasks in different pods, rather than containers. This has a few considerations:

The new pod will have to stream logs back to the origin server. We could use the Kubernetes logs API for this, or possibly have the new pod open a websocket connection back to the requesting pod, and stream logs that way
If the target produces an artifact, like build, there will need to be a mechanism for returning it back to the GCI process that submitted it. We could use s3 for this, or maybe have the new pod POST the completed artifact to the requesting pod when it's done

[ ] The ability to run builds based in response to Github webhooks

This includes authentication, which may imply a UI. Here be dragons

[ ] The ability to resolve dependencies. Here are some dependency management systems I think we should support

glide (see https://github.com/arschles/gbs/pull/28 for inspiration)
godep

closing as gci doesn't run a server anymore


Fix the problem where a wrong branch is cloned

If several branch names starts the same way (ex: MyBranch and MyBranchBis), git tfs can return MyBranchBis instead of MyBranch when asked to clone MyBranch
This PR closes #1454

Sorry for the long delay, it is quite a busy time and the change wasn't obvious at all from staring at it.
I was trying to understand what the old existing code is doing and what changed with your code and I don't think the new code is correct.
For example, the BranchTreeContainsPathVisitor uses case insensitive comparison by lowercasing the involved strings but your check uses a case sensitive check.
I also tried to dig deep where the code came from, and it was from https://github.com/git-tfs/git-tfs/issues/267.
Overall, my understanding is that what the code wants to check that having the following branch structure
graph TD;
    $/Project/Main-->$/Project/Dev;
   $/Project/Dev-->$/Project/Dev/TeamA;
   $/Project/Dev-->$/Project/DevTeamB;

classDef orange fill:#f96,stroke:#333
classDef yellow fill:#ff6,stroke:#333
class Dev orange

and when requesting a clone for the $/Project/Dev/docs then the docs folder (which is not a branch at all) is cloned. Nevertheless, I believe the existing code before your change  wrongly assumes that a as soon as a prefix matches, it is a subfolder of the existing branch. So $/Project/Develop would match $/Project/Dev, which is wrong.
Furthermore, in https://github.com/git-tfs/git-tfs/blob/36be5582a611dcb708fe1b88f16b0399e05a352c/src/GitTfs/Commands/Clone.cs#L175 is the only caller where the searchExactPath parameter is set to false. All other callers use exact path matching. Changing the above mentioned line to
var tfsTrunkRepository = remote.Tfs.GetRootTfsBranchForRemotePath(tfsRepositoryPath, true); should also fix the error you are seeing.
@Odalrik : Could you please test if this would also solve your problems?
I don't believe it is the correct fix, but at least would be another breadcrumb for me to correctly understanding the code.
If my understanding is correct, changing it to require exact matching would break the above mentioned case of cloning a subfolder of a branch, meaning we would not reach  this code path anymore:
https://github.com/git-tfs/git-tfs/blob/36be5582a611dcb708fe1b88f16b0399e05a352c/src/GitTfs/Commands/Clone.cs#L203-L204

Having dug around at the weekend a little more, some more insights:

The branch name alone being a prefix is not enough, it must be reachable by a second root (or must have been a root on its own)
Making the change var tfsTrunkRepository = remote.Tfs.GetRootTfsBranchForRemotePath(tfsRepositoryPath, true); proposed above is therefore not the right approach


Upgrade CI

Needs #8 to be fully 🍏

I have not yet reviewed this PR, but the v3 branch (which is php 8.0 only because the generated container uses the match expression to speed itself up) contains a fully working, composer 2 compatible CI setup, using https://github.com/shivammathur/setup-php/. Unfortuantely, php-cs doesn't support php 8 only syntax thus the failures.

I have not yet reviewed this PR, but the v3 branch (which is php 8.0 only because the generated container uses the match expression to speed itself up) contains a fully working, composer 2 compatible CI setup, using https://github.com/shivammathur/setup-php/. Unfortuantely, php-cs doesn't support php 8 only syntax thus the failures.

In this PR only php-version:  - "7.4" needs to be changed.
Would you like me to do this with the v3 workflow file?

In this PR only php-version:  - "7.4" needs to be changed.
Would you like me to do this with the v3 workflow file?

Please tell me what should I modify.

Please tell me what should I modify.

@szepeviktor I've cherry-picked your commit, and then made a few changes. Thank you for your contribution, the CI config became much better this way! That said, I'm closing this PR.

@szepeviktor I've cherry-picked your commit, and then made a few changes. Thank you for your contribution, the CI config became much better this way! That said, I'm closing this PR.

You're welcome.

You're welcome.

It is controversial to use php-version: "${{ matrix.php-versions }}" then php-version: "8.0".
It makes CI jobs inconsistent.

It is controversial to use php-version: "${{ matrix.php-versions }}" then php-version: "8.0".
It makes CI jobs inconsistent.


PHP Fatal error:  Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutionFailureException'

We are getting issue in cutting up a video. Issue is ffmpeg works perfectly for a single cut request from browser but for multiple cut requests from browser (multiple users using the system) creates this except for atleast one process or all.
PHP Fatal error:  Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutionFailureException' with message 'ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-i' '/var/www/html/videosity/content/videosity-org-45/courses/455cf62cd1f12dc/video/v0.1/455cf62cd1f12dc.mp4' '-ss' '00:00:24.00' '-t' '00:05:24.00' '-vcodec' 'libx264' '-acodec' 'aac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-strict' '-2' '-b:a' '128k' '-pass' '2' '/var/www/html/videosity/content/videosity-org-45/courses/455cf62cd1f12dc/video/topics/v0.1/455cf62cd1f12dc1559643263905.mp4'' in /var/www/html/videosity/designer/server/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:101 Stack trace: #0 /var/www/html/videosity/designer/server/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(74): Alchemy\BinaryDriver\ProcessRunner->doExecutionFailure(''/usr/bin/ffmpe...') #1 /var/www/html/videos in /var/www/html/videosity/designer/server/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Video.php on line 169
Here is our cut function
`
function clipVideo($startPoint, $duration, $inputPath, $outputPath){
$ffmpeg = FFMpeg\FFMpeg::create(array(
	'ffmpeg.binaries' => '/usr/bin/ffmpeg',
	'ffprobe.binaries' => '/usr/bin/ffprobe',
	'timeout'          => 7200, // The timeout for the underlying process
	'ffmpeg.threads'   => 12
));

$format = new FFMpeg\Format\Video\X264();

$video = $ffmpeg->open($inputPath);

$video->filters()->clip(FFMpeg\Coordinate\TimeCode::fromSeconds($startPoint), FFMpeg\Coordinate\TimeCode::fromSeconds($duration));

 $video->save($format, $outputPath);

}
`
Tried running multiple ffmpeg commands in parallel from server and it works perfectly.
Also tried running this clipVideo function simultaneously from different terminal sessions and it works perfectly.
Issue occurs only when multiple requests comes from browsers. For single request it works perfectly irrespective of video length.
Permissions are also set to www-data (for php).

To be honest: I've got no clue, too. Maybe the user may only open one external pipe(i.e. a terminal)?

Thanks @jens1o  for looking into it.
I didn't get what you mean by 'Maybe the user may only open one external pipe(i.e. a terminal)?'

Hey man you are missing the streams of video and audio in the format, just try once by adding the audio and video streams in format field. Example code
new \FFMpeg\Format\Video\X264('libmp3lame', 'libx264')

Hey..!!
$ffmpeg = FFMpeg\FFMpeg::create(array(         'ffmpeg.binaries'  => '/usr/local/bin/ffmpeg',         'ffprobe.binaries' => '/usr/local/bin/ffprobe',         'timeout'          => 3600, // The timeout for the underlying process         'ffmpeg.threads'   => 12,   // The number of threads that FFMpeg should use     ));
This code worked for me.

Hey..!!
$ffmpeg = FFMpeg\FFMpeg::create(array(         'ffmpeg.binaries'  => '/usr/local/bin/ffmpeg',         'ffprobe.binaries' => '/usr/local/bin/ffprobe',         'timeout'          => 3600, // The timeout for the underlying process         'ffmpeg.threads'   => 12,   // The number of threads that FFMpeg should use     ));
This code worked for me.


esx: Allow to configure static IPs

esx: Allow to configure static IPs
The default ESXi setup does not have a DHCP server but expects
static IPs to be used (e.g., see https://www.packet.com/resources/guides/esxi/).
Allocate static IPs for each machine from a number of addresses
starting with a specific address given inside the subnet (in Packet this
is the next IP address after the host's IP, see link above).
A networkd configuration file is used with Ignition but cloud-config writes its
own networkd configuration file based on the guestinfo.interface* variables.
The coreos-metadata service uses the COREOS_CUSTOM_* variables that are known
to the Container Linux Config Transpiler, too, and got some robustness fixes.

How to use
./kola run -d --platform esx --esx-config-file esx.json --esx-ova-path flatcar_production_vmware_ova.ova  --esx-first-static-ip A.B.C.D --esx-first-static-ip-private E.F.G.H --esx-static-ips 4 --esx-gateway I.J.K.L --esx-gateway-private M.N.O.P --esx-subnet-size 29

Because we only have 4 static IPs, do not set --parallel X because kola will wait anyway until a machine terminates again and frees an IP.
Testing done
Use an ESX server on Packet and use the gateways as visible in the network setting of the Packet web UI, and use the next IP after the server IP as available first static IPs (see link above). When the ESX server is provisioned, a /28 subnet can be specified instead of the defautl /29 but I didn' test this.
I fixed most test failures and skipped tests that rely on network connectivity in the initramfs.

This is ready for review now. I'll switch back to ignition.config variables ones https://github.com/flatcar-linux/coreos-cloudinit/pull/4 is referenced in coreos-overlay.


Added my data

Please accept my PR under Hacktoberfest.

Congrats 🎉, your PR got merged. To be eligible for the swags from iNeuron X ClueLess. Follow this steps.

SignIn / SignUp in ClueLess Website .

Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.
@AnandSY


ci: Clippy configuration

Pick clippy lints to enable. Not all currently pass.

Pick clippy lints to enable. Not all currently pass.

In certain situations I can imagine, fixing the code wouldn't be too bad. We were introduced to this and then we minimally changed the code to get it to work.

Looks like the newly enabled lints now pass with #179


Debian Sid InitalizeSandbox fault

Describe the bug
When launching ungoogled chromium on Debian Sid fully updated:
To Reproduce
Steps to reproduce the behavior:

Build ungoogled chromium using the debian-minimal target as building.md states you should use on Debian Sid using LLVM 8 as building.md states.

Install ungoogled chromium.

Run chromium.

Get something like:
[19256:19256:1227/112524.089289:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.
[1]    19201 illegal hardware instruction  chromium

Expected behavior
Ungoogled chromium launches sucessfully.
Environment (please complete the following information):

OS and version: Debian Sid fully updated amd64
ungoogled-chromium version: 70.0.3538.110-4
If this is a custom build, please specify the following:

Configuration bundle: ?
Packaging type: debian_minimal
OS and version for building: Debian Sid fully updated amd64 (exact same machine exact same debian installation)
Compiler toolchain: LLVM 8.0.0 from apt.llvm.org

The build was ~a week ago, I just hadn't got around to doing a bug report. I will rebuild shortly to ensure that the problem still exists, seeing as llvm has been updated.
I think this is related to #612 .

Have you tried starting it using gdb? And: self-build kernel?
FYI: yesterday I successfully built 71.0.3578.98-2 using the buster target on a sid machine. It starts and runs smoothly.

@dackelblut self-built kernel? no. I'll try again, maybe this got fixed?

No, I was thinking that your (possible) self-built kernel lacks a symbol (USER_NS) needed for sandbox. But the sandbox error can't be the problem anyway, I get that with vivaldi (based on chromium) too without the browser crashing.
What cpu do you have? Many search results point at older cpus, without newer SSE-Versions.

I don't have a self-build kernel; I'm running 4.19.0-2-amd64 from Debian Testing.
I'm trying on a Dell Latitude 7480, with a Intel i5-7200U.
I'm planning to try compiling it again tonight, in about 4-5 hours.

Closing due to inactivity.

Wow, I completely forgot about this; seems to be resolved now on my end.


fix: escape special chars in passwords for replication

escape pipe (delimiter), ampersand (reference) and backslash (escape character) so that passwords with these characters are handled correctly
fix #464

@BertrandGouny Hi, could this be merged? It should be a non-breaking fix.

@BertrandGouny Hi, is this project alive?


Support Query Variables

So we can do things like
query invoiceStates($ids: [ID!], $partner_id: String!) {
      invoices(ids: $ids, partner_id: $partner_id)
      {
        id
      }
}

I think this is the next important thing. Basically what is the equivalent of
          post '/api/graphql', params: {
            variables: {
              input: {
                email<EMAIL_ADDRESS>              }
            },
            query: %{
              mutation($input: createRsvpInput!) {
                createRsvp(input: $input) {
                  id
                  total_count
                }
              }
            }
          }


git clone ssh to https change

You can only git clone using ssh if you have ssh keypair and pub key uploaded to github. Otherwise, you will get "Permission denied (publickey)."
it's recommended to use https e.g. git clone https://github.com/bitpay/bitcoind.js.git

ACK


UnsavedRelationList::first() / last() return false instead of null when list is empty

Affected Version
5.x
Description
UnsavedRelationList::first() and UnsavedRelationList::last() return false instead of null when the list is empty. This is inconsistent with DataList and co, which return null. Cause is the use of reset() and end():
https://github.com/silverstripe/silverstripe-framework/blob/809f9e7ae06e4e3999ef2670aa322aacdddb7def/src/ORM/UnsavedRelationList.php#L238-L248
https://github.com/silverstripe/silverstripe-framework/blob/809f9e7ae06e4e3999ef2670aa322aacdddb7def/src/ORM/UnsavedRelationList.php#L255-L262
I suppose there’s a minor BC risk to changing this, open to feedback on whether this is appropriate for a patch release.

Thanks all, PR raised

Merged. Will be automatically tagged and merged up by GitHub actions


Cannot apply transformations in DIODE

Describe the bug
Cannot apply more than one transformation on SDFG in DIODE.
Applied transformations do not show up in the History tab.
To Reproduce
Load the following code into DIODE while on commit https://github.com/spcl/dace/commit/68b667ff107f49631dbbf550be3b5826f9478353 and try to apply MapReduceFusion and MapTiling.
from __future__ import print_function

import argparse
import dace
import numpy as np

M = dace.symbol('M')
K = dace.symbol('K')
N = dace.symbol('N')

@dace.program(dace.float64[M, K], dace.float64[K, N], dace.float64[M, N])
def gemm(A, B, C):
    tmp = dace.define_local([M, N, K], dtype=A.dtype)

    @dace.map(_[0:M, 0:N, 0:K])
    def multiplication(i, j, k):
        a << A[i, k]
        b << B[k, j]
        out >> tmp[i, j, k]

        out = a * b

    dace.reduce(lambda a, b: a + b, tmp, C, axis=2, identity=0)

if __name__ == "__main__":
    n = 64
    M.set(n)
    K.set(n)
    N.set(n)

    A = np.random.rand(M.get(), K.get()).astype(np.float64)
    B = np.random.rand(K.get(), N.get()).astype(np.float64)
    C = np.zeros([M.get(), N.get()], dtype=np.float64)
    C_regression = np.zeros_like(C)

    gemm(A, B, C)

This bug was introduced recently (not sure which commit caused it), it's great to have an issue for it. Thanks.

Fixed in #376.


crash in ConvertFromUnicode

While testing the proxy, it crashed in function ConvertFromUnicode called in rdp_recv_client_info.
There's ASAN output.

@kubistika thanks, looks like I already found the bug.


[BUG] Windows icon generation error

:information_source: Info
Latest version: 1.1.7
:speech_balloon: Description
The following error is returned:
FileSystemException: Cannot open file, path = 'windows/Runner/resources/app_icon.ico' (OS Error: No such file or directory, errno = 2)

On my system (linux), the correct path would be windows/runner/.....
:scroll: Pubspec.yaml
dev_dependencies:
icons_launcher: ^1.1.7
flutter_icons:
image_path: 'assets/icons/my.png'
adaptive_icon_round: 'assets/icons/my.png'
adaptive_icon_background: 'assets/icons/my.png'
adaptive_icon_foreground: 'assets/icons/my.png'
remove_alpha_ios: true
remove_alpha_macos: true
ios: true
android: true
macos: true
windows: true
linux: true
web: true

After you run the command  icons_launcher:main. Did you get icon file name app_icon.ico in the directory windows/runner/resources/app_icon.ico?
Sorry I don't have a Linux system to verify it but I test with the Windows system and it looks fine. This example I already tested with platform (android, ios, macos, windows and web)

The thing is that the folder inside windows is not called 'Runner' but 'runner'. I don't know if this is platform specific, which it shouldn't.
In the official Flutter Gallery example, the runner folder is named in lowercase: https://github.com/flutter/gallery/tree/master/windows/runner

Ohh, thank you I will update it to lowercase in the next version. I test with the windows system it's not restricted case-sensitive but Linux strongly restricts case-sensitive.

This issue has been fixed on v1.1.8. Thanks


Lag

Whenever you go to far from spawn the lag in the game makes it unplayable.


The time of the downloaded HTML report is not correct

Proposed Changes

Update the response from the server to provide a UTC timestamp as the start time and end time
On the frontend, format the provided UTC date to locale time

This fixes #2691, right?

LGTM, apart from that one thing.


In-Code documentation.

As in:
/// <summary>
///
/// </summary>
/// <param name="image"></param>
/// <param name="x"></param>
/// <param name="y"></param>
public void functionName(int argument)
{}

This makes it easier for people when actually coding.

This would be ideal eventually, may take some time to implement though

I started to make progress on this with commit 0010f0f, especially in the Shape, Scene, WindowsControl, Prop, and a few more


AVX-512 UTF-32 to UTF-16

[ ] AVX512 validating UTF32->UTF16
[ ] AVX512 non-validating UTF32->UTF16

Completed.


Reporting to wrong repository

The following ticket was created by this reporting (afaik): atom-community/sync-settings#291
But the stacktrace doesn't mention sync-settings anywhere but gist-it. Shouldn't the ticket have been created against that repo instead?

I guess this is the wrong repo. I move this to an already existing ticket: https://github.com/atom/notifications/issues/66#issuecomment-244432275


JS: add query for detecting suspicious method names in TypeScript

The query detects suspicious uses of the method names function/constructor/new.
For example, the below is suspicious as the interface describes 2 named methods and no constructor.
interface Foo {
   constructor(name: string): Foo; // <- The syntax highlighting is wrong, "constructor" is not a keyword in this context.
   getName(): string;
}

The developer likely meant to write the below:
class Foo {
   constructor(name: string): Foo; // <- Here "constructor" is a keyword.
   getName(): string;
}

There are reasons for having these suspicious method names, but the TP rate with the current filters is decent (12/14 TP in DefinitelyTyped).
There is also a bunch of suspiciously looking methods throughout LGTM: https://lgtm.com/query/4371860611928531736/
Performance is ridiculously good due to the simplicity of the query.

Ping @shati-patel for a doc-review of a new query (while mc is away).

LGTM. But tests are failing.

LGTM. But tests are failing.

The expected output hadn't been changed since the doc reviews, fixed with https://github.com/Semmle/ql/pull/2056/commits/3a55880d51100a95a2a6d15206360c8c10af94be.

Hmm. Perhaps we should run a small performance evaluation for the latest changes..

Hmm. Perhaps we should run a small performance evaluation for the latest changes..

Everything still looks good.
https://git.semmle.com/erik/dist-compare-reports/tree/domitian.ti.semmle.com_1570521830339
I think we're ready to merge.


[AutoPR containerinstance/resource-manager] New APIs for container instance

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/4643

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/3979


Fix crash in apply() if maxTimeout is set

In our environment, onMethodResult getting declared inside parenthesis changed its scope and the function in setTimeout was throwing a no reference error.

Thanks!


Added alias for count(*) to make it work with mysql

Description of what I changed
Added alias for count(*) to make it work with mysql
E2E test
Tested
TESTED:
Verified locally to makes sure that it works with postgres.
Checklist: I completed these to help reviewers :)

[x] I have read and will follow the review process.

[x] I am familiar with Google Style Guides for the language I have coded in.
No? Please take some time and review Java and Python style guides.

[x] My IDE is configured to follow the Google code styles.
No? Unsure? -> configure your IDE.

[ ] I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)

[x] I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.

[x] All new and existing tests passed.

[x] My pull request is based on the latest changes of the master branch.
No? Unsure? -> execute command git pull --rebase upstream master

Codecov Report

Merging #742 (fb0e272) into master (a57f13b) will increase coverage by 2.00%.
The diff coverage is 10.16%.

@@             Coverage Diff              @@
##             master     #742      +/-   ##
============================================
+ Coverage     34.04%   36.05%   +2.00%
+ Complexity      291      256      -35
============================================
  Files            71       55      -16
  Lines          3818     2879     -939
  Branches        437      326     -111
============================================
- Hits           1300     1038     -262
+ Misses         2397     1718     -679
- Partials        121      123       +2

Impacted Files
Coverage Δ

...h/src/main/java/org/openmrs/analytics/FhirEtl.java
0.00% <0.00%> (ø)

...ain/java/org/openmrs/analytics/FhirSearchUtil.java
31.46% <0.00%> (-2.08%)
:arrow_down:

.../src/main/java/org/openmrs/analytics/DwhFiles.java
65.24% <0.00%> (-12.07%)
:arrow_down:

...java/org/openmrs/analytics/JdbcConnectionUtil.java
0.00% <0.00%> (ø)

...main/java/org/openmrs/analytics/ApiController.java
6.06% <0.00%> (-3.04%)
:arrow_down:

...ain/java/org/openmrs/analytics/MainController.java
7.40% <0.00%> (-0.29%)
:arrow_down:

...java/org/openmrs/analytics/metrics/TextFormat.java
0.00% <0.00%> (ø)

...in/java/org/openmrs/analytics/PipelineManager.java
12.42% <9.01%> (-2.42%)
:arrow_down:

...mrs/analytics/metrics/PipelineMetricsEndpoint.java
43.47% <43.47%> (ø)

...main/java/org/openmrs/analytics/JdbcFetchHapi.java
32.19% <100.00%> (ø)

... and 1 more

... and 29 files with indirect coverage changes


openai.error.AuthenticationError: Incorrect API key provided<EMAIL_ADDRESS>You can find your API key at https://platform.openai.com/account/api-keys.

Describe the bug
I am trying the example code from https://github.com/openai/openai-python
openai.api_key = os.getenv("OPENAI_API_KEY")
        # list models
        models = openai.Model.list()

        # print the first model's id
        print(models.data[0].id)

        # create a chat completion
        chat_completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hello world"}])

        # print the chat completion
        print(chat_completion.choices[0].message.content)

I have checked my API key with:
curl https://api.openai.com/v1/chat/completions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -d '{
       "model": "gpt-3.5-turbo",
       "messages": [{"role": "user", "content": "Say this is a test!"}],
       "temperature": 0.7
     }'

which returns:
{
  "id": "chatcmpl-7TsXvCYItiGrF46Ljo26yS9BgsZWt",
  "object": "chat.completion",
  "created":<PHONE_NUMBER>,
  "model": "gpt-3.5-turbo-0301",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "This is a test!"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 5,
    "total_tokens": 19
  }
}

To Reproduce
macOS Big Sur 11.6.2
Darwin Kernel Version 20.6.0
python --version
Python 3.10.8

save the codesnippet below as testopenai and run
./testopenai

which gives the error message:
openai.error.AuthenticationError: Incorrect API key provided<EMAIL_ADDRESS>You can find your API key at https://platform.openai.com/account/api-keys.

The payment plan has been setup, the key has been created after setting the plan and the curl command works - so why doesn't the python one? See also https://stackoverflow.com/a/76523513/1497139
Code snippets
#!/bin/bash
# WF 2023-06-21
if [ "$OPENAI_API_KEY" == "" ]
then
  echo "OPENAI_API_KEY env variable needs to be set to a key see https://platform.openai.com/account/api-keys"
  echo "export OPENAI_API_KEY="
  exit 1
fi
#if [ "$OPENAI_API_ORG" == "" ]
# then
#  echo "OPENAI_API_ORG env variable needs to be set  see https://platform.openai.com/account/org-settings"
#  echo "export OPENAI_API_ORG="
#  exit 1
#fi

#
# test via curl
#
viacurl() {
  curl https://api.openai.com/v1/chat/completions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -d '{
       "model": "gpt-3.5-turbo",
       "messages": [{"role": "user", "content": "Say this is a test!"}],
       "temperature": 0.7
     }'
}

#
# test via python
#
viapython() {
  code="/tmp/testopenai.py"
cat << EOF > $code
import openai
import os
openai.api_key = os.getenv('OPENAI_API_KEY')

# list models
models = openai.Model.list()

# print the first model's id
print(models.data[0].id)

# create a chat completion
chat_completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hello world"}])

# print the chat completion
print(chat_completion.choices[0].message.content)
EOF
python $code
}

viacurl
viapython

OS
macOS
Python version
Python 3.10
Library version
openai-python 0.27.8

On my ubuntu machine the testopenai script works

A test with a docker environment also works:
Dockerfile
# openai python library test environment
FROM python:3.10.0-alpine
RUN pip install openai
RUN apk add bash curl

#!/bin/bash
# WF 2023-06-21
tag="python/openai"
name="python"
docker build --tag $tag .
docker stop $name
docker rm $name
docker run -d -v "$(pwd):/opt/scripts" --name $name $tag tail -f /dev/null
docker exec -it python /bin/bash

a brand new key gives the exact same error

when debugging i see that at some point basic auth settings
<class 'tuple'>: ('anonymous'<EMAIL_ADDRESS>
are create dout of blue air which contain part of the error message's content - why would this happend and spoil the request which seems to loose the original api-key header information while at it ...

+1 I can confirm this bug. It also manifests when doing a manual HTTP API call using the requests library.
Using the standard library's urllib.request works.

This should be fixed in v1; please upgrade to the latest version of the library and reopen if the problem persists.


Refactor rebase.sh

Refactors scripts/rebase.sh so that individual steps (download release, updating go.mod, updating images, etc.) can be called individually.
Updates downloading of release to use oc adm release tooling. As a consequence, uses as parameter the URI of the release image, no longer the release version (e.g. scripts/rebase.sh download quay.io/openshift/okd@sha256:6667...).
Adapts updating of manifests to the reorganised asset directory structure.

/approve

I pulled this commit into the okd->ocp PR #686 to make sure that will still rebase cleanly, watching that now. Once this merges, I'll rebase #686

also, with the stable release the script allows this without the need for the full url:
./scripts/rebase.sh 4.10.16

I verified the service-ca is running/all tests green w/ #686 also!
/lgtm


Is it possible to place an order on test endpoint ?

I see on this page that we can place an order on a test endpoint for trial purpose:
https://binance-docs.github.io/apidocs/spot/en/#spot-account-trade
The test endpoint is:
/api/v3/order/test
instead of
/api/v3/order
With this library, is it possible to do so ?
thanks

Hi there!
The latest version is available here https://github.com/jaggedsoft/node-binance-api
You can enable test mode like this:
const Binance = require('node-binance-api');
const binance = new Binance({
  APIKEY: '<key>',
  APISECRET: '<secret>',
  test: true
});

This works for margin and spot trading.
Please note that test mode for futures trading isn't automatic yet, and requires manually setting the endpoint url to test. See https://github.com/jaggedsoft/node-binance-api/pull/404

Ok thanks for your answer, i've updated my bookmark.
I see both repositories install with:
npm install node-binance-api --save
I'm not entirely familiar with Git. If i ran this command 2 weeks ago, am I running the correct version then ?

Yeah you should be good to go, just add the test flag to your constructor. You'll know it's working if it returns an empty response. You can view the changelog on the other branch and monitor major changes on the releases page. Cheers!


Simplify GitHub Action for AZP Triggering

Update the AZP trigger script to use the canonical GitHub event payloads rather than generating or parsing them from API endpoints.
Signed-off-by: Brett Logan<EMAIL_ADDRESS>

LGTM
@lindluni Is this what they teach you at Github? :-)

This is a product of learning to read documentation 😂


Sleuth corrupts Error message in Spring integration

This problem is related with the issue 761 of garyrussell.
I have a application with rabbit and spring integration, i read a message call a service and send a response. When the service work fine i have no problem but if the service throw an exception the response message is not released.
I obtain the message: Reply message received but the receiving thread has exited due to an exception while sending the request message:GenericMessage
If i put the propertie spring.sleuth.integration.enabled=false my application works fine in all cases.
Thanks.

Which version of Sleuth are you using?

Also can you provide an example?

version is 2.0.0.M9

Hello, i have in local spring-cloud-sleuth 2.0.0.BUILD-SNAPSHOT branch master.
If in the class TracingChannelInterceptor in the line:
295 MessageHeaderAccessor headers = MessageHeaderAccessor.getMutableAccessor(getMessage(message));
change for MessageHeaderAccessor headers = MessageHeaderAccessor.getMutableAccessor(message);
works fine, the method
private Message getMessage(Message message) {
Object payload = message.getPayload();
if (payload instanceof MessagingException) {
MessagingException e = (MessagingException) payload;
return e.getFailedMessage();
}
return message;
}
change the HEADERS.

If i build an interceptor and copy message headers into messagingexception header works too.
@Override
public Message preSend(Message message, MessageChannel channel) {
if (!(message instanceof ErrorMessage)) {
return message;
}
MessagingException payload = (MessagingException) message.getPayload();
Message<?> failedMessage = payload.getFailedMessage();
failedMessage = MessageBuilder.fromMessage(failedMessage).copyHeaders(message.getHeaders()).build();
return new ErrorMessage(new MessagingException(failedMessage, payload), message.getHeaders());
}


GitHub added add-co-authored-by

I think we can safely disable/remove the add-coauthored-by feature
This should be handled by the recent change, see the changelog:
https://github.blog/changelog/2019-12-19-improved-attribution-when-squashing-commits/

Can’t confirm at the moment but this would be great! PR welcome to remove it

Tested and worked:

I specially disabled Refined GitHub and closed and reopend the tab before clicking squash and merge.


e2e: in core dump, add delta to waitgroup outside of goroutine

The waitgroup needs to be set up outside of the goroutines; otherwise, the number of items to wait for may not be increased before Wait() is called, and the ssh commands will never get a chance to execute.

nit: I'd prefer
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
for {
wg.Add(1)
defer wg.Done()
...
}
wg.Done()
wg.Wait()
}
as I think it is cleaner, but don't really care.

LGTM
Putting an Add(1) inside the loops but before the go ... works, too.

Actually, I thought about that, but it actually doesn't, b/c you have to add the Done() somewhere before the Wait() and there's no guarantee that you won't
wg.Add(1)
...
wg.Done()
wg.Wait()

before the go routines run.

I changed it to go with @lavalamp's suggestion. It seems like it'll be less bug-prone should the loops ever change.
It should still fix the bug, since the Add() call will happen synchronously, before Wait().

@brendandburns as long as the Add() happens in the loops, all of the adds will happen before it gets to Wait(). It doesn't matter if some of the Done() calls also happen.
The constraints are:

No calls to Add() after Wait() has been called
No more calls to Done() than to Add()

e2e failed due to issue being fixed by #9744, arg.

@k8s-bot test this please

@saad-ali Can we get it merged? It'd be really useful to have the log files available.

Merged.


Type for Promises + domain instance

Not sure where to report this. But I think a promise in Node.js may have a domain instance attached to it, especially if the promise is passed to unhandledRejection handler. See this screenshot:

It says property 'domain' does not exist on type Promise<any>...but I think it does, at least as an optional property.

it seems like this should be a PR submitted to npm:@types/node package on DefinitelyTyped.
Something like
interface Process {
    on("unhandledRejection", (r, p: Promise<{}> & {domain: Domaib}) => void): void;
}

I feel validated

@aluanhaddad how  do I submit a PR for just one package on DefinitelyTyped? They all go into the same issue bucket right? do I tag it with npm:@types/node?

The README explains everything. but to the specific question know the npm: prefix is not something you would use in your issue or pull request on DT. I have just have gotten into the habit of writing it.

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

Can we open issues that are particular to @types/node?


[Minor Bug]: Adjust alignment of "Voice Over Language" and "Mute Audio" in the Honkai Impact 3rd settings panel

Affected Version
Collapse v1.72.10 Preview
Bug Behavior
In the small window size configuration, the "Voice Over Language" and "Mute Audio" titles are practically touching each other.
Expected Behavior
The titles could be equally distant as they are in the large window size configuration — there is plenty of horizontal space to do so.
Steps to reproduce

Open Collapse's settings panel
Change Collapse's window size to Small
Open Honkai Impact 3rd's settings panel
The "Voice Over Language" and "Mute Audio" titles are touching

Related Issues
No response
Screenshot(s)

Additional Information
I don't know if there is a mute option for the other miHoYo games, but I can confirm that this is a visual problem for Honkai Impact 3rd.

Eyyo~
Thank you for submitting bug report and sorry for taking quite a long time to come around and look at this.
I have fixed this by making the mute audio section centers in its region.
Here's how it looks on small window

and here is how it looked on normal window

The fix will come on next preview version, possibly sometime after either Genshin or HSR update
Sorry for the inconvenience and thanks again for reporting~


Increase mac ios execution timeouts and add ios32 tests.

Bug: https://github.com/flutter/flutter/issues/74920

Adding ios32 to staging while we visit the lab to recover the mac/ios32 test bed in prod.

Adding ios32 to staging while we visit the lab to recover the mac/ios32 test bed in prod.

LGTM, I guess when the iOS 14 devices update we'll have a window where they will be updating and os = "iOS-14.3" will be out of sync with some of them? Sounds like logistics to be figured out later.

Yes, it will be added to the process for hardware/software updates documentation.

LGTM, I guess when the iOS 14 devices update we'll have a window where they will be updating and os = "iOS-14.3" will be out of sync with some of them? Sounds like logistics to be figured out later.

Yes, it will be added to the process for hardware/software updates documentation.


you can't use lift or right keys to forward the video

you can't use lift or right keys to forward the video
as in all players you can use right or left keys to back or move in video you watch so i think it will be a nice touch if you make it possible in the next version of the player

Hey, I'll make this an option. Currently if you're focused on the seek bar then the left/right arrows will seek (as is default browser behaviour when focusing an <input type="range"> element.

yeah i know but it will be more flexible if you add this feature it will be nice rather than focus on the seek bar

But what I mean is; when should left and right arrows trigger the seek? It needs some more thought around the interactions. Like mouse over the player but no control focused? It's not simple. I don't want to break standard keyboard interactions for accessibility reasons.

On 26 Jun 2016, at 11:40 AM, Mohamed Salem<EMAIL_ADDRESS>wrote:
yeah i know but it will be more flexible if you add this feature it will be nice rather than focus on the seek bar
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.

Maybe we could do if focus is "inside" the player and the option is set to true then left / right would seek and up / down would adjust volume?

Another suggestion would be to allow shortcut keys only in fullscreen mode, as it can not interfere with normal browser behaviour...

Merging this with #309


electric field force

create a force to simulate the electric field on the charged particles.
will also need to add charge property to the particles

Added a Lorenz force method


we do it on colab but torch can't install correctly

Hi, advimman, we do it on colab but torch can't install correctly,,
ERROR: Could not find a version that satisfies the requirement torch==1.8.0 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch==1.8.0
how to solve this problem? PLZ

Change to this:
#@title Run this sell to set everything up
print('\n> Cloning the repo')
!git clone https://github.com/advimman/lama.git
print('\n> Install dependencies')
!pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 torchtext==0.15.2
!pip install -r lama/requirements.txt --quiet
!pip install wget --quiet
!pip install torch==2.0.1+rocm5.4.2 torchvision==0.15.2+rocm5.4.2 torchaudio==2.0.2 -f https://download.pytorch.org/whl/torch_stable.html --quiet
print('\n> Changing the dir to:')
%cd /content/lama
print('\n> Download the model')
!curl -L $(yadisk-direct https://disk.yandex.ru/d/ouP6l8VJ0HpMZg) -o big-lama.zip
!unzip big-lama.zip
print('>fixing opencv')
!pip uninstall opencv-python-headless -y --quiet
!pip install opencv-python-headless==<IP_ADDRESS> --quiet
print('\n> Init mask-drawing code')
import base64, os
from IPython.display import HTML, Image
from google.colab.output import eval_js
from base64 import b64decode
import matplotlib.pyplot as plt
import numpy as np
import wget
from shutil import copyfile
import shutil
canvas_html = """

Finish

"""
def draw(imgm, filename='drawing.png', w=400, h=200, line_width=1):
display(HTML(canvas_html % (w, h, w,h, filename.split('.')[-1], imgm, line_width)))
data = eval_js("data")
binary = b64decode(data.split(',')[1])
with open(filename, 'wb') as f:
f.write(binary)

Copy_of_LaMa_inpainting.ipynb.zip

Download my colab
edit /content/lama/saicinpainting/training/modules/fake_fakes.py, you need to change from kornia import SamplePadding to
from kornia.constants import SamplePadding
edit /content/lama/bin/predict.py, you need to change device = torch.device(predict_config.device) (line 43) to device = torch.device("cpu")


Disable auto-scroll while generating answers if user scrolls up.

Right now, while generating long responses, it's impossible to read the beginning of the response because the page is forced to scroll down multiple times per second.

That's the fastest response I've ever got on GitHub.
Cheers and thank you.


Rule no-duplicate-on

The linter throws an error
"ESLint: Method .on is called on store undefined more than once for inputs.changeReturnDate.(effector/no-duplicate-on)"
when .on is applied to a store through an object property (outputs.$something). The error goes away when the store containing object is destructured

Thanks for report. It's definitely a bug.
I'm working on #82 PR, so I'll fix it right after that. Fix will be released in 0.6.0.


Added option random_cb for images in edit fields

Hi,
this is a small addition to let the developer generate image names.
I wanted to add a function possible value to the naming option and add a naming_cb option, but this requires some refactoring to keep the code clean*.
So, this just adds the possibility to provide a callback, but it is of-course not mandatory for the callback to provide actual-random names. (md5 of the file content is what I personnally do !).
Also if you like this and would rather set the defaults-options/rules in the Field\File class, just tell me.
(* I wish that Multup does not generate names by itself, only using the callbacks it's given or a name (string) it's given.)

Hi, could you tell me if you're interested or not ?

@niahoo I'm interested just trying to decide the full need v/s if this is the best way.

The full need is to be able to specify the file name with a function. The best thing to do imho is to allow a function as a value for the naming option.
I can code that if you want.


Repo sync for protected CLA branch

The pull request is created from main638089885318570234sync_temp to main to fix git push error for protected CLA branch

Learn Build status updates of commit 3daf1ba:
:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel


fix: subdomain to domain

BREAKING CHANGE

Fixes Issue
fixes #8795

Changes proposed

Check List (Check all the applicable boxes)

[ ] My code follows the code style of this project.
[ ] My change requires changes to the documentation.
[ ] I have updated the documentation accordingly.
[ ] All new and existing tests passed.
[ ] This PR does not contain plagiarized content.
[ ] The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

Thank you @kumarsonsoff3  👍


application for time series data with trend

Hi, I am trying to use this package for air passenger dataset the result as follow :

is it good to use this package for this typical dataset (with seasonal and trend) ?
my model is look like this :
model = ESRNN(max_epochs=250, freq_of_test=5, batch_size=1, learning_rate=1e-3,               per_series_lr_multip=0.8, lr_scheduler_step_size=10,               lr_decay=0.1, gradient_clipping_threshold=50,               rnn_weight_decay=0.0, level_variability_penalty=100,               testing_percentile=0, training_percentile=100,               ensemble=False, max_periods=25, seasonality=[12],               input_size=12, output_size=40,               cell_type='LSTM', state_hsize=40,               dilations=[[1], [6]], add_nl_layer=False,               random_seed=1, device='cuda')
Is there any advice to tune the model in order to get good result ?
thank you

If there is a clear seasonality for example in your case a seasonality of [12] is reasonable. I recommend you to use the hyperopt library for hyperparameter selection (https://anaconda.org/conda-forge/hyperopt). Good luck!

If there is a clear seasonality for example in your case a seasonality of [12] is reasonable. I recommend you to use the hyperopt library for hyperparameter selection (https://anaconda.org/conda-forge/hyperopt). Good luck!


Change 'the TSF' to 'authorized users'

The current wording of this EA is very puzzling to me. According to Section 1.3.1 in the SD, TSF is defined as: "A set consisting of all hardware, software, and firmware of the TOE that must be relied upon for the correct enforcement of the SFRs. [CC1]"
That seems to imply to me that the TSF is part of the TOE boundary, so why is the EA talking about "data while it resides outside the TOE"? Perhaps I'm just mistaken about my interpretation of TSF.

The SFR states who can access the data, only the TSF or authorized users. I think the description is assuming that "authorized users" is pretty clear and would be handled elsewhere, but when the TSF is selected more explicit description is required. It probably needs something that may be "if authorized users is selected, this is tested as part of XYZ".
I do not think it is correct though to change it from one to the other directly without and other change.

@woodbe so TSF here includes locations outside the TOE?

No, the TSF is the only thing that can access the data. So if you encrypt the blob with something that only the TSF can access as opposed to encrypting is such that a user can access it. This is where the propagate terms is weird because I would normally think of that meaning that the data is sent to another system while here it is just that it is being stored someplace that the TOE does not have full control over (i.e. main storage on an Android device instead of some dedicated storage area that isn't part of the main flash).
Here "the TSF" is a user, the TOE itself. Maybe it should be TOE, and not TSF, since that makes more sense (i.e. storing it such that only the TOE can access it).

Change the selection from "TSF" to "TOE"
Adjust the SD to remove the "if the TSF" so it applies to both
can add that authorized users means all roles (CApps, etc)

@woodbe what do you think of this suggestion?