fix(entities): use field verbose_names in help_text

While trying to update the list of fields added to the search field's help_text in ModelSearchFilter to use verbose_names names instead of the fields' names, I ran into an error with how the list of fields is put together.
This PR fixes both how the list is constructed and changes the (default) field names to verbose_names.

The error I encountered read:
TypeError: sequence item 0: expected str instance, __proxy__ found

I actually also wanted to convert the field names provided via _default_search_fields to verbose_names  + update some of the documentation (docstrings, comments), but I'm unclear on how _default_search_fields is supposed to work.
A comment which mentions it makes it sound like it's supposed to be a list on the model, but non-field data types aren't really a thing on Django models, or are they? I was thinking it should probably be a class method (?), in which case it would need to be referenced differently.

Fair enough on logging & variable name change – was already preparing to split commits for a follow-up PR for docs off in order to separate concerns.
Regarding the other points:
Re: consistency in returned values: as said, I meant to update the fields from _default_search_fields as well, but while trying to do so, I ran into the issue of not understanding how it is meant to be set on the model in the first place. The comment I referenced says:
# check if the model has a `_default_search_fields`
# list and use that as searchfields

What does that mean? The Django docs don't make mention of using regular data types as quasi constants. Even if they are technically allowed, attributes set on Django models are expected to point to fields. Extra information goes either into Meta or in methods. If _default_search_fields was meant to be a method, it isn't currently being referenced correctly. So, confusing either way.
And I disagree that the switch from fields to get_fields() needs to be explained. The latter is the standard way of retrieving information about fields...
Also, the string conversion is necessary. Our verbose_names are of type <class 'django.utils.functional.lazy.<locals>.__proxy__'>, not str. They are translated strings.

What does that mean? The Django docs don't make mention of using regular data types as quasi constants.

A Django model is a Python class. A Python class can have attributes.

Even if they are technically allowed, attributes set on Django models are expected to point to fields.

Is there some documentation that states this? We discussed the approach of the _default_search_fields at length in the the JFX, I'm a bit astonished that this was not mentioned back then? If thats not allowed, we have to rework this whole approach

Extra information goes either into Meta or in methods. If _default_search_fields was meant to be a method, it isn't currently being referenced correctly. So, confusing either way.

We can not put custom attributes into Meta.

And I disagree that the switch from fields to get_fields() needs to be explained. The latter is the standard way of retrieving information about fields...

Well, but does it make a difference regarding the change you want to implement? Or is it just a separate unrelated change thats just piggybacked in this commit?

Also, the string conversion is necessary. Our verbose_names are of type <class 'django.utils.functional.lazy.<locals>.__proxy__'>, not str. They are translated strings.

Then this is exactly what should be explained in the commit message

Even if they are technically allowed, attributes set on Django models are expected to point to fields.

Is there some documentation that states this? We discussed the approach of the _default_search_fields at length in the the JFX, I'm a bit astonished that this was not mentioned back then? If thats not allowed, we have to rework this whole approach

Actually it would be pretty bad if we were violating some rule, given that we also use class attributes that are not fields in the new relations app.

I don't understand how you arrive at them not being allowed when I said the opposite in the bit you quoted. Not sure if this is a language/communication issue.

I'm not sure what you meant by "Django models are expected to point to fields". This is what I'm referring to. "Technically allowed" does not mean it makes sense to write code that way, especially if it leads to misunderstandings. We can do better. If this is some kind of best practice I would like to know about it so we can adapt our code so its more usable.

I'm not sure what you meant by "Django models are expected to point to fields". This is what I'm referring to. "Technically allowed" does not mean it makes sense to write code that way, especially if it leads to misunderstandings. We can do better. If this is some kind of best practice I would like to know about it so we can adapt our code so its more usable.

Ah, ok.
I was basing my wording on:

the Django docs starting out with, "Each attribute of the model represents a database field." when they first introduce models (top of the page),
the docs not addressing or demonstrating meta information about models or "random" data being stored that way,
the fact "attributes" are rarely mentioned at all – and when they are, it's primarily in the context of:

data that feeds into fields (like constants for Choices) or
more "under the hood" stuff (like objects/Managers).

Online examples of using attributes for other things are also few and far between.
I didn't really give much thought to _default_search_fields' implementation details when ModelSearchFilter was discussed at the JF because AFAIR we already had our custom search fields at that point and I was more concerned with integrating the new default search fields with the existing ones in filtersets.py.
Now I'm reminded of our old approach of storing settings in APIS_ENTITIES and how even alternative approaches discussed at the time, like storing fields alongside the models, are cumbersome because 1) of how easily they (accidentally) go out of sync and 2) they require updates to code files and redeployments for the smallest adjustments to business rules.
It seems like ModelAdmin is the one built-in thing that deals with models on a "meta" level, but it serves a specific, different purpose – driving the admin UI – and is probably not meant to (or too complex to) have only some of its functionality reused for similar needs.

you're importing logging and creating a logger without using it. please remove those, adding logging to the filters is a separate change, different from the one you want to implement.

Removed.

you're mixing stylistic changes with a functionality change. please don't do that. quote from CONTRIBUTING.md: "Please try to keep your commit changes focused on the change you want to implement - don't start fixing typos if your commit is actually about adding a feature."

Moved to separate commit.

_default_search_fields is a list of fieldnames that is used for searching. In the current state, the filters help text lists either fieldnames (if _default_search_fields is set) or verbose names (if _default_search_fields is not set). This should be harmonized to show verbose names in both cases

Extended fix to use verbose_names in both cases.

The commit message should explain why the switch from fields to get_fields() is necessary

Well, but does it make a difference regarding the change you want to implement? Or is it just a separate unrelated change thats just piggybacked in this commit?

Summarised what the switch is about.
This is a case of repeated (mis)use of Django internals, which severely limits the usefulness/further processability of the resulting code. I don't think it needs continued spelling out in detail, much as I wouldn't expect e.g. every fix for built-in functionality being called with an incorrect argument to always discuss what exactly is wrong with it/how it is incorrect or to mention it by (its old, incorrect) name.

Also, the string conversion is necessary. Our verbose_names are of type <class 'django.utils.functional.lazy.<locals>.__proxy__'>, not str. They are translated strings.

Then this is exactly what should be explained in the commit message

Gave translation strings (type) as reason for change.

The commit message should explain why the switch from fields to get_fields() is necessary

Well, but does it make a difference regarding the change you want to implement? Or is it just a separate unrelated change thats just piggybacked in this commit?

Summarised what the switch is about.

Oke, you write in the commit message: "Requires fixing of retrieval of field meta information from Django-internal fields method to get_fields". But at the same time, in the code you now pushed dropped the switch to get_fields. So is it required in the sense, that it does NOT work without the switch? At least in my tests I did right now the code worked without the switch. Which makes me think, that this still is a purely stylistic change, that is NOT required to make the change work?

This is a case of repeated (mis)use of Django internals, which severely limits the usefulness/further processability of the resulting code.

Thanks for the valuable feedback! Its nice to hear that we actually have no idea what we are doing! It would be so great if someone with wisdom would help us write more useful code, by, for example, doing more contributions themselves or doing PR reviews!

I don't think it needs continued spelling out in detail, much as I wouldn't expect e.g. every fix for built-in functionality being called with an incorrect argument to always discuss what exactly is wrong with it/how it is incorrect or to mention it by (its old, incorrect) name.

If you want someone to review your code, you should describe your changes in the commit message, so the person reviewing the code knows why the change happened.
Please change entities scope to apis_entites - there is no entitites app in apis_core.
(It would have been great to have an issue where we could discuss this approach beforehand - a similar block of code is also used in the generate_search_filter function. If there is a generic method that returns the search fields for a model, that could be used in two places)


unexpected crash -- message requested a bug

First thing I tried generated a crash::
npm install -g dts-gen
npm install -g antlr4
dts-gen -m antlr4

Versions:
<EMAIL_ADDRESS><EMAIL_ADDRESS>node v6.3.1
npm v3.10.6

Results:
Unexpected crash! Please log a bug with the commandline you specified.
C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:107
        throw e;
        ^

TypeError: Cannot read property 'sourceName' of undefined
    at Lexer.sourceName (C:\Users\Burt_\AppData\Roaming\npm\node_modules\antlr4\Lexer.js:240:21)
    at C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:272:143
    at Array.map (native)
    at getClassPrototypeMembers (C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:272:75)
    at getResult (C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:138:17)
    at getTopLevelDeclarations (C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:126:15)
    at getResult (C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:198:33)
    at getTopLevelDeclarations (C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:126:15)
    at Object.generateModuleDeclarationFile (C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:49:17)
    at Object.<anonymous> (C:\Users\Burt_\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:52:24)

I note that the file it's processing (Lexer.js) is effectively an abstract class with a mandatory constructor parameter which sets _input to an instance of another class.   At Lexer.js line 240, it's trying to retrieve a property from the object that should have been passed into the constructor (but wasn't).

Thanks for the report. There are some libraries that will throw on certain property reads (sigh!) so we need to try/catch everywhere when probing fields.

Yea, that's the case for sure.   But (in addition to trapping) it seems like there should be a way giving the tool more guidance on how the library is to be used.   In the case of ANTLR case there's a few lines of common usage constructor invocation that might helpful to inject into the tool
   var input = "your text to parse here"
   var chars = new antlr4.InputStream(input);
   var lexer = new MyGrammarLexer.MyGrammarLexer(chars);    // Derived from antlr4.Lexer
   var tokens  = new antlr4.CommonTokenStream(lexer);
   var parser = new MyGrammarParser.MyGrammarParser(tokens); // Derived from antlr4.Parser
   ...

Yea, I plan to expose this with a more friendly API as a library so you can just write that code in the node REPL and then write something like require('dts-gen').generate(obj, 'Parser').emit('dts')


Installation fails with iconv linking error (libgit2-related)

I am using Rust on macOS, and I am using MacPorts for most of my OSS ecosystem otherwise.
When I try to cargo install cargo-generate (which worked in the past on this system), I am now getting
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/73/k6n5hpxs7w74p7l_dr34xvl00000gn/T/cargo-installNoJmj9/release/deps/cargo_generate-e1c064111566251f.cargo_generate.8ac09665-cgu.12.rcgu.o" "-L" "/var/folders/73/k6n5hpxs7w74p7l_dr34xvl00000gn/T/cargo-installNoJmj9/release/deps" "-L" "/var/folders/73/k6n5hpxs7w74p7l_dr34xvl00000gn/T/cargo-installNoJmj9/release/build/libgit2-sys-0baa398ee29b6214/out/build" "-L" "/var/folders/73/k6n5hpxs7w74p7l_dr34xvl00000gn/T/cargo-installNoJmj9/release/build/libssh2-sys-31e2464928b60fc3/out/build" "-L" "/opt/local/lib" "-L" "/Users/hmeine/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/var/folders/73/k6n5hpxs7w74p7l_dr34xvl00000gn/T/rustcHsruLt/liblibgit2_sys-5363a1b497fa402b.rlib" "/var/folders/73/k6n5hpxs7w74p7l_dr34xvl00000gn/T/rustcHsruLt/liblibssh2_sys-8dd3782a02c72331.rlib" "/Users/hmeine/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-1ce642d447892a2b.rlib" "-liconv" "-framework" "Security" "-framework" "CoreFoundation" "-lssl" "-lcrypto" "-lz" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/Users/hmeine/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/73/k6n5hpxs7w74p7l_dr34xvl00000gn/T/cargo-installNoJmj9/release/deps/cargo_generate-e1c064111566251f" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: Undefined symbols for architecture x86_64:
            "_iconv", referenced from:
                _git_path_iconv in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
               (maybe you meant: _git_path_iconv_clear, _git_path_iconv , _git_path_iconv_init_precompose )
            "_iconv_open", referenced from:
                _git_path_direach in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
                _git_path_iconv_init_precompose in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
                _git_path_diriter_init in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
            "_iconv_close", referenced from:
                _git_path_direach in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
                _git_path_iconv_clear in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
                _git_path_diriter_free in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
                _git_path_dirload in liblibgit2_sys-5363a1b497fa402b.rlib(path.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

I noticed that -liconv comes twice, which maybe suggests that different dependencies try to pull in potentially different libiconv's?  I mainly have the MacPorts-provided /opt/local/lib/libiconv.2.dylib, as well as what appear to be more than a hundred copies in individual application directories, none of which should be related here.

#67 might be related, but that issue has apparently grown and changed its nature, so I'll just draw the connection here by linking the issues and leave the discussion to others.

liblibgit2-sys has quite some problems in the not so distant past, see #461
Shelling out to git, as proposed in #67 is very likely to cause significant more harder problems to solve.
So my suggestion is to use the tracking issue #461 and close this one here.


Users need include_body to correctly pass the request body to ext_authz

Describe the bug
Request body not being passed through auth service
Re-open the below,
https://github.com/datawire/ambassador/issues/1595
To Reproduce
This config for auth service:
kind: Service
metadata:
  name: {{ template "fullname" . }}
  labels:
    app: {{ template "name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v1
      kind:  AuthService
      name:  authentication
      auth_service: {{ template "fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.externalPort }}
      include_body:
        max_bytes: 4096
        allow_partial: true

Post this request to service:
  http://localhost/v1/partner/token \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: ada5bd12-fed6-4ecd-bce6-07d15505d010' \
  -H 'cache-control: no-cache' \
  -d '{
    "username": "redacted",
    "password": "redacted"
}'

Expected behavior
The auth service should receive this request body.
Instead, the request body is blank:

Versions (please complete the following information):

Ambassador: [0.72]
Kubernetes environment [docker for mac]
Version [<IP_ADDRESS>]

Additional context
Add any other context about the problem here.

@digressionary I can't reproduce what you are describing for ambassador:0.72.0. I can see the external authorization service receiving the exact amount of bytes configured.
---
apiVersion: ambassador/v1
kind: Module
name: ambassador
config: {}
---
apiVersion: ambassador/v1
kind: AuthService
name: authentication
auth_service: "auth-service:8080"
path_prefix: "/extauth"
proto: http
allowed_request_headers:
- requested-status
- requested-body-info
allowed_authorization_headers:
- auth-request-body
include_body:
  max_bytes: 5
  allow_partial: true
---
apiVersion: ambassador/v1
kind:  Mapping
name: echo-service
prefix: /
service: http://httpbin.org
host_rewrite: httpbin.org

Thank you for your response.
I am seeing the same thing with echo service.  However, the body is not
recognized as a body by nodejs express.
Versions:
nodejs: 10.16.0
express: 4.17.1
example tiny express app:
https://gist.githubusercontent.com/digressionary/86c48ccf89fc210d05ae5e76d8390b7d/raw/fa66d729927ce594ee146cf444b168eec170fc32/index.js
example curl command:
curl -X POST
http://localhost/example/
-H 'Content-Type: application/json'
-H 'Postman-Token: bffb0110-5d31-4225-badb-4d79a3a4ee9c'
-H 'cache-control: no-cache'
-d '{
"username": "redacted",
"password": "redacted"
}'
echo server output:
Request served by echo-deployment-b6b6878c-7vmnh
HTTP/1.1 POST /example/
Host: localhost
Accept-Encoding: gzip, deflate
Content-Length: 58
X-Forwarded-For: <IP_ADDRESS>
X-Envoy-Internal: true
User-Agent: PostmanRuntime/7.6.0
Accept: /
X-Envoy-Original-Path: /example/
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: a84556f9-ef2d-4821-9f1c-33bfe77d93c8
X-Envoy-Expected-Rq-Timeout-Ms: 3000
X-Forwarded-Proto: http
X-Request-Id: 7464d276-eb3b-41df-a2ef-434fede4f1b4
{
"username": "redacted",
"password": "redacted"
}
express STDOUT:
Wed, 19 Jun 2019 19:33:15 GMT express:router dispatching POST /example/
Wed, 19 Jun 2019 19:33:15 GMT express:router query  : /example/
Wed, 19 Jun 2019 19:33:15 GMT express:router expressInit  : /example/
Wed, 19 Jun 2019 19:33:15 GMT express:router corsMiddleware  : /example/
Wed, 19 Jun 2019 19:33:15 GMT express:router helmet  : /example/
Wed, 19 Jun 2019 19:33:15 GMT express:router logger  : /example/
Wed, 19 Jun 2019 19:33:15 GMT express:router urlencodedParser  : /example/
Wed, 19 Jun 2019 19:33:15 GMT express:router jsonParser  : /example/
{ host: 'localhost',
'content-length': '5',
'x-forwarded-proto': 'http',
'x-forwarded-for': '<IP_ADDRESS>,<IP_ADDRESS>',
'user-agent': 'PostmanRuntime/7.6.0',
'x-envoy-internal': 'true',
'x-envoy-expected-rq-timeout-ms': '5000' }
{}
Note that the echo service does receive the body, but it doesn't make it
through the express stack.
Is there something different about the body? Is it stored under a different
key name?
On Tue, Jun 18, 2019 at 6:46 PM Gabriel Sagula<EMAIL_ADDRESS>wrote:

@digressionary https://github.com/digressionary I can't reproduce what
you are describing for ambassador:0.72.0. I can see the external
authorization service receiving the exact amount of bytes configured.

apiVersion: ambassador/v1
kind: Module
name: ambassador
config: {}
apiVersion: ambassador/v1
kind: AuthService
name: authentication
auth_service: "auth-service:8080"
path_prefix: "/extauth"
proto: http
allowed_request_headers:

requested-status
requested-body-info
allowed_authorization_headers:
auth-request-body
include_body:
max_bytes: 5
allow_partial: true

apiVersion: ambassador/v1
kind:  Mapping
name: echo-service
prefix: /
service: http://httpbin.org
host_rewrite: httpbin.org
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/datawire/ambassador/issues/1630?email_source=notifications&email_token=AHIX5HLOFWHV6VFAJDY7NALP3FQUTA5CNFSM4HYMUH5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYAFUVA#issuecomment-503339604,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHIX5HI3TAH4CQSXHZ22U6LP3FQUTANCNFSM4HYMUH5A
.

--
Vemba https://www.vemba.com/?=sig
*Drin Brown | *Sr Engineer & Systems Analyst
888.899.2117 <+18888992117>
1502-480 University Avenue, Toronto, Canada
https://goo.gl/maps/dMDYVdkyejK2
[image: Vemba Twitter] https://twitter.com/VembaCorp [image: Vemba
Facebook] https://www.facebook.com/vembacorp/ [image: Vemba LinkedIn]
https://www.linkedin.com/company/vemba

Closed as the underlying issue was different.


hack/vendor.sh: remove old hacks for etcd

etcd uses standard vendoring now

LGTM

Need to remove it from hack/vendor.sh too, no?

@cpuguy83 https://github.com/docker/docker/pull/25643 already did that.

Oh, glorious!
LGTM


DocEng '24 paper on tagging publications list, tagged

(Part (a) of this is sufficiently obvious that I imagine it's on someone's mental issue list anyway).
It would be useful (a) if the DocEng 2024 update paper (Mittelbach et al, 'Automatically producing accessible and reusable PDFs with LATEX', https://doi.org/10.1145/3685650.3685670) were included in the project publications list, and (b) if this page noted that (presumably) the papers in this list were tagged using the new support.
A link to the paper appeared on an accessible-maths list I read, and prompted some useful discussion. But one of the list participants did the obvious and sensible thing and checked to see what tagging was present in the paper, and how it read in an assistive-technologies reader.  There's none, of course because (I'm guessing) the PDF was produced using a publisher workflow which (of course) doesn't include the new support; the commenter drew some negative inferences from that.  Though I doubt much can be done about the proceedings version, it would be a good look if there were a canonical alternative version of the paper, here, which was an advert for itself  [insert some remark about dogfood here...].
I presume it's on someone's to-do list to add the paper here, so this issue is just to log the obvious suggestion that this should be an author-prepared preprint produced with tagging, rather than the proceedings version; and that this list somehow notes that these papers have that tagging, encouraging potential readers to confirm that the PDFs illustrate the support they're describing.  I suppose it would be useful to additionally indicate which version/phase of the system they're using, to avoid confusion when later phases become available.

Thanks for this, Ulrike: I've passed on a pointer to your comments in the list thread.

A link to the paper appeared on an accessible-maths list I read, and prompted some useful discussion.

Hi Norman, is there a simple way to join that list discussion for any of us? (I have somewhat limited internet connections right now and it is difficult to research that for me).

I looked at this possibility, but gave up!
So I too hope that there is an "easy way" to access elements in this truly vast collection of lists!

On the list archive page, I'm seeing a ‘subscribe or unsubscribe’ link in the top left, which seems to link to a subscription page, when I try it.  If you're seeing something different, something might be amiss – perhaps we should resolve that offline.

A PDF/UA-2 compatible version of the paper is now on the LaTeX project site at:
https://www.latex-project.org/publications/indexbytopic/pdf/


Second client join always fails

Hi,
Just got into fishnet and am trying to use this package for development to test over the network with a friend.  I'm using the FishyUnityTransport 0.2.0, Unity 2021.3.23f1 and I've hooked it up to FPSLand (Pro), Lobby and Worlds (Pro), and the https://github.com/RidefortGames/FishNet-ThirdPersonPrediction projects and in each of them I swap out tugboat for this and switch the transport over. I'm starting a server and multiple clients.
I start up the server using the editor. I start up the first client, which connects. I start up a second client, but it fails to connect, and I get an error in my editor(running as a server) Error sending message: -2, 0. This error runs repeatedly forever. If I try joining with a third, 4th etc clients they are able to join. Its just the second client that always fails, and it happens on each project I've tried to integrate FishUnityTransport with.

I tried using the editor as the second client to see if it would produce any error logs for more information, but it doesn't, though the same issue of the second client failing to connect still occurs.
I'll also note if I'm using Tugboat, this issue does not occur.
Thanks

Did a little digging around, error is happening in the CommonSocket.cs file
if (result != (int)StatusCode.Success) {     Debug.LogError($"Error sending message:{result}, {FishyUnityTransport.ParseClientIdToTransportId(clientId)}");     return; }
BeginSend is returning a -2 which is a NetworkVersionMismatch
var connection = m_ConnectionList[id.m_NetworkId]; if (connection.Version != id.m_NetworkVersion)     return (int)Error.StatusCode.NetworkVersionMismatch;
This is pretty odd as the Unity definition of this is when the protocol version is different. I don't know why that would be the case here. https://docs.unity3d.com/ScriptReference/Networking.NetworkError.VersionMismatch.html

Hi, thanks for the bug report! I found the cause of the bug and will release a new version soon.

Fixed in version 0.2.1


Product Image is displayed twice on the Product page in offline mode

Current behavior
The image of the product is duplicated in offline mode. There are two components used in m-product-gallery, SfImage and SfGallery. The SfImage component is rendered in offline mode and SfGallery is rendered in both the online and offline mode
Expected behavior
Only one of there needs to be rendered in offline mode.
Steps to reproduce the issue

Go to Product Page for any product
Change your network to offline
See the duplicated image

Can you handle fixing this bug by yourself?

[x] YES
[ ] NO

Environment details

Browser:
OS:
Code Version:

Additional information
Screenshot

I want to work on it.

Sure, go for it @ymaheshwari1


NFOV

Hello,
Thanks, your solution helped me a lot :)!
How do you define the normal field of view, how does it depend from the input image?

I got the same question...
What is the domain of the FOV? ([0~1]? [0~0.9]?)
Also, the values in FOV is degree or radian or normalized value?

Hi NitishMutha!
Thanks, your solution helped me aaaaa looooooot :)!


Fix #296: wall placement around large Kremlin/drab pieces incorrect

Wall placement is done using four bits. In all cases, the edges represented by 4 (bit 2) were not properly set, so had to be added.

@ZeeMaji can you do a first review/test, please?

Seems to be working fine, nicely done.


.NET SDK Developer documentation

Problem description
There should be a way for guide users on how to integrate .NET SDK and use it.
Preferred Solution
Have a documentation README within the project repository. And optionally have a comprehensive guide within WSO2 Identity Sever public docs.

@sherenewso2 @gomathyk will help on reviewing final content.

Followed the documentation https://github.com/asgardio/asgardio-dotnet-oidc-sdk and tried out the SDK using given sample. No issues were found in the documentation.


duration arg on turn_off_smoothly

Description of the Change
Minor change. Added an optional parameter so that turn_off_smoothly has a variable duration.
Possible Drawbacks
Server shutdown because of the extraordinary number of new users this will draw

Let's hope our servers can handle it!


Use with existing MDS data?

This is a really cool looking project!
Apologies if I have missed something (reading through the docs and code), is there a way to get started having already collected some MDS data? E.g. from JSON files or a database connection?

@thekaveman To run the tooling out of the box, you need to have credentials to an active MDS endpoint (I have a feeling you have these, so feel free to email me for help setting up securely: morgan@sharedstreets.io).  There is a generic stream interface we use for status_changes and trips, and we have implemented a couple providers, with more on the way soon:
https://github.com/sharedstreets/sharedstreets-mobility-metrics/blob/master/src/providers/
The generic stream interface is subject to change a bit, but the basics are that each provider needs a changes and trips function that takes a stream to write to, a start timestamp, and a stop timestamp. Using this interface has made it easier to smooth over the auth and pagination quirks of each provider, as I've seen you and Hunter run into elsewhere. This project currently runs tests against a live MDS endpoint, which the stream interface has worked well to enable, but it also means only people with a specific set of provider creds can run the tests. This is far from ideal.
I have been working on another project called sharedstreets/trip-simulator, which aims to provide highly realistic synthetic trip data. I'm currently working to add support for MDS compliant data, with synthesized status_change events, in addition to the existing raw GPS. The goal is to be able to safely demo this for any city interested in implementing MDS, before having to get providers & legislators/regulators on board to acquire credentials. This would also allow for running tests against the metrics, guaranteeing that everyone (agencies & providers) is calculating regulatory heuristics with an aligned set of algorithms, regardless of implementation, helping with overall trust of the systems. All that said, trip-simulator essentially outputs giant line-delimitted JSON files, so I'll be digging into this shortly. Feel free to email me if you would like a hand writing a custom provider for the private data you have available for testing.

All that said, trip-simulator essentially outputs giant line-delimitted JSON files, so I'll be digging into this shortly. Feel free to email me if you would like a hand writing a custom provider for the private data you have available for testing.

Interesting plans indeed. I may take a stab at an implementation for JSON files. You mention line-delimited, what are your thoughts on support for something closer to the raw MDS output format? e.g. for /trips:
{
     "version": "x.y.z",
     "data": {
         "trips": [{
               "provider_id": "...",
               "device_id": "...",
          },
          {
              "provider_id": "...",
               "device_id": "...",
          }]
     }
}

(or potentially an array of these objects, representing each of the "pages" of an API request)

Yep, something like this would totally work. Line delimitted is used by trip-simulator just to make it easier to generate and ingest very large datasets, but normal JSON works too (and can be streamed with a bit more effort).
Assuming you had two files in your root directory that were simply big arrays of MDS trips and changes, something like this should do the trick:
const trips = require('../../trips.json')
const changes = require('../../changes.json')

function trips(stream, start, stop) {
  trips.forEach(trip => {
    stream.write(trip)
  })

  stream.end();
}

function changes(stream, start, stop) {
  changes.forEach(change => {
    stream.write(change)
  })

  stream.end();
}

module.exports.trips = trips;
module.exports.changes = changes;

This is now officially supported. To use a local provider, config a provider with local paths for trips and status_changes, then change the type to "local". Data should be line delimited JSON items in the MDS record level format.
"Synth": {
      "type": "local",
      "trips": "./sample/trips.json",
      "status_changes": "./sample/changes.json",
      "enabled": true
    }


Code generation issues with reflectable 1.0.1

Description

Building a (large) polymer.dart app after upgrading to reflectable 1.0.1 causes an incorrectly generated HTML file in release mode.  Certain components (dom-module HTML files) are not included in the generated HTML file.
Steps to Reproduce

upgrade a project to reflectable 1.0.1
build in release mode
observe dom-module definitions are missing

Expected Results
dom-module definitions (i.e. paper-input) are included.

Hi, probably this is the same of https://github.com/dart-lang/web-components/issues/54 .
There's a fix for initialize package pending to be merged

That looks like it is the issue I am seeing.  I will try running with that patch and post the results.

I can confirm this is the same issue as  dart-lang/web-components#54.  Using https://github.com/dam0vm3nt/initialize/commit/a0388461274df89b9fffd6bfe781c95132704b64 fixes this issue for me.


failure to use Prange with @njit(parallel=True) on loop which can be parallelised

I am using a function func1 which is as follows :-
def func1(k, indexes, child0, child1, T_node, T_child0, T_child1, B_child0, B_child1):
    R_min, R_max = np.maximum(1, indexes-T_child0), np.minimum(T_child1, indexes-1)
    B_ret, R_ret = np.zeros((min(k, T_node)-1,)), np.zeros((min(k, T_node)-1,), dtype=np.int32)

    for i in prange(2, min(k, T_node)+1):

        B_right = B_child1[R_min[i-2]-1:R_max[i-2]]
        B_left = B_child0[i-R_max[i-2]-1:i-R_min[i-2]]
        B_left = B_left[::-1]

        B_node = B_right+B_left

        R_ret[i-2] = R_min[i-2]+np.argmax(B_node)
        B_ret[i-2] = B_node[R_ret[i-2]-R_min[i-2]]

    return B_ret, R_ret

The for loop can be parallelised and has no inter dependencies.
To compile this function, and to use a Numba  function for the same, I write
numba_func = jit(nopython=True, parallel=True)(func1)

I call this numba_func inside another function. I am getting an error running this code as follows
TypeError: Failed in nopython mode pipeline (step: convert to parfors)
object of type 'NoneType' has no len()

Please suggest changes to fix this

Can you provide a minimal reproducer, i.e. a script that calls func1? Numba will specialize the function with respect to the argument types. Thus, the error you see can be specific to the types that you have.

What I can do is describe to you types of all the arguments.
k ---> int
indexes ---> 1d np array
child0, child1 ---> int, int
T_node, T_child0, T_child1 ---> int
B_child0, B_child1 ---> a 1d np array

I am able to run this code without parallel=True and I am getting the expected by speedup with Numba as well. But only when setting parallel=True I get the error.

Do you think issue #5601 and this issue are similar, ie. I also use slicing inside my for loop?

I am now able to run my implementation after building from source using the master branch. But setting parallel=True increases my time of implementation as compared to not setting it(serial implementation). This shouldn't be the case, should it? Please advice.

Hi, I have a similar issue here - the following code works without any error when decorated with @njit(parallel=False) but crashes when parallel=True with the same error:
TypeError: Failed in nopython mode pipeline (step: convert to parfors)
object of type 'NoneType' has no len()

> /home/maxime/anaconda3/envs/spy/lib/python3.7/site-packages/numba/parfors/array_analysis.py(2792)<listcomp>()
   2790         asserts = []
   2791         new_shape = []
-> 2792         max_dim = max([len(shape) for shape in shapes])
   2793         const_size_one = None
   2794         for i in range(max_dim):

and interestingly enough a different error when decorated with @jit(parallel=True):
File "<timed exec>", line 1, in <module>
NameError: global name 'numba' is not defined
> <timed exec>(1)<module>()

Here is the function that I am running (spk1 and spk2 are arrays of int64, available_memory is a float):
def cisi_numba_para(spk1, spk2, available_memory):
    spk1=np.sort(spk1).astype(np.float64)
    spk2=np.sort(spk1).astype(np.float64)
    memory_el=(0.01*available_memory)//spk1.itemsize
    if memory_el<((len(spk1)*len(spk2))*0.1):
        s=int(len(spk1)//((len(spk1)*len(spk2))//memory_el))
        chunks=split(List(spk1), sample_size=s, return_last=True, overlap=0)
    else:
        s=len(spk1)
        chunks=np.expand_dims(spk1, 0)
    # the trick to make things fast is to only consider
    # the relevant slice of spk2, which is possible assuming that spk1 and spk2 are sorted
    isi_1to2=np.zeros(len(spk1))
    n=chunks.shape[0]
    for i in range(n):
        chunk=chunks[i]
        if i==n-1:chunk=chunk[~np.isnan(chunk)]

        m1=np.array(list(spk2>=chunk[0])[1:]+[True]) # shift left to add spike right before
        m2=np.array([True]+list(spk2<=chunk[-1])[:-1]) # shift right to add spike right after
        chunk2=spk2[m1&m2]

        a1=(chunk*np.ones((chunk2.shape[0], chunk.shape[0]))).T
        a2=chunk2*np.ones((chunk.shape[0], chunk2.shape[0]))
        d=np.abs(a1-a2)
        for di in range(d.shape[0]):
            isi_1to2[i*s+di]=np.min(d[di])

    return isi_1to2

@m-beau thanks for the report.  Please could you provide more information about what caused this problem:

The code that you were running (as a minimal working reproducer, if you are unsure how to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports). Current code is missing the split() function and some example input.
Any data needed to run the code.

Once we have a reproducer someone can take a look and work on a fix. Thanks for your help.

It seems that issue #5601 and this are similar, please add duplicate label

@ritvik06 Please could you provide a minimal working reproducer so that we can verify it is the same problem,  if you are unsure how to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports. Thanks for your help.

Yes, sorry - here you go:
import psutil
import numpy as np
from numba import jit, njit, prange
from numba.typed import List

spk1=np.arange(1000)
spk2=spk1+3
available_memory=psutil.virtual_memory().available

@njit(cache=True)
def make_2D_array(arr_lis, accept_heterogeneous=False):
    """Function to get 2D array from a list of lists
    """
    lis=[np.asarray(l) for l in arr_lis]
    n = len(lis)
    lengths = [len(l) for l in lis]
    if accept_heterogeneous:
        max_len = max(lengths)
        arr = np.zeros((n, max_len))*np.nan
        for i,l in enumerate(lis):
            arr[i, :lengths[i]] = l
    else:
        assert max(lengths)==min(lengths)
        arr = np.zeros((n, len(lis[0])))*np.nan
        for i,l in enumerate(lis):
            arr[i, :] = l
    return arr

@njit(cache=True)
def split(arr, sample_size=0, n_samples=0, overlap=0, return_last=True, prnt=True):
    '''
    Parameters:
        - arr: array to split into EITHER n_samples OR samples of size sample_size.
               samples_size has priority over n_samples.
        - s_samples: int, size of of samples to split the array into.
        - n_samples: int, number of samples to split the array into.
        - overlap: 0<=float<1, fraction of overlapping between consecutive samples | Default 0
        - return_last: bool, whether to return the last sample (whose size usually does not match the ones before).
    Returns:
        samples: array or list of samples
    '''
    arr=np.asarray(arr)
    assert n_samples!=0 or sample_size!=0, 'You need to specify either a sample number or size!'
    assert 0<=overlap<1, 'overlap needs to be between 0 and 1, 1 excluded (samples would all be the same)!'

    if n_samples!=0 and sample_size!=0:
        print('''WARNING you provided n_samples AND sample_size!
              By convention, sample_size has priority over n_samples. n_samples ignored.''')
        n_samples=0

    if n_samples==0: n_samples=len(arr)//sample_size+1
    if sample_size==0: sample_size=len(arr)//(n_samples)

    assert n_samples<=len(arr)

    # step=1 for maximum overlap (every sample would be the first sample for step = 0);
    # step=s for 0 overlap; overlap is
    s=sample_size
    step = s-round(s*overlap)
    real_o=round((s-step)/s, 2)
    if overlap!=real_o and prnt: print('Real overlap: ', round(real_o, 2))
    samples = List([arr[i : i + s] for i in range(0, len(arr), step)])

    # always return last sample if len matches
    if len(samples[-1])==s:
        return make_2D_array(samples)

    if return_last:
        return make_2D_array(samples, accept_heterogeneous=True)

    lasti=-1
    sp=samples[lasti]
    while len(sp)!=s:
        lasti-=1
        sp=samples[lasti]
    return make_2D_array(samples[:lasti+1])

@njit(cache=True, parallel=True)
def cisi_numba_para(spk1, spk2, available_memory):
    spk1=np.sort(spk1).astype(np.float64)
    spk2=np.sort(spk1).astype(np.float64)
    memory_el=(0.01*available_memory)//spk1.itemsize
    if memory_el<((len(spk1)*len(spk2))*0.1):
        s=int(len(spk1)//((len(spk1)*len(spk2))//memory_el))
        chunks=split(List(spk1), sample_size=s, return_last=True, overlap=0)
    else:
        s=len(spk1)
        chunks=np.expand_dims(spk1, 0)
    # the trick to make things fast is to only consider
    # the relevant slice of spk2, which is possible assuming that spk1 and spk2 are sorted
    isi_1to2=np.zeros(len(spk1))
    n=chunks.shape[0]
    for i in prange(n):
        chunk=chunks[i]
        if i==n-1:chunk=chunk[~np.isnan(chunk)]

        m1=np.array(list(spk2>=chunk[0])[1:]+[True]) # shift left to add spike right before
        m2=np.array([True]+list(spk2<=chunk[-1])[:-1]) # shift right to add spike right after
        chunk2=spk2[m1&m2]

        a1=(chunk*np.ones((chunk2.shape[0], chunk.shape[0]))).T
        a2=chunk2*np.ones((chunk.shape[0], chunk2.shape[0]))
        d=np.abs(a1-a2)
        for di in prange(d.shape[0]):
            isi_1to2[i*s+di]=np.min(d[di])

    return isi_1to2

cisi=cisi_numba_para(spk1, spk2, available_memory)

Any optimization advice is welcome.

@m-beau thanks for submitting this. When running the full code listed above, I receive the following error:
Traceback (most recent call last):
  File "foo067.py", line 109, in <module>
    cisi=cisi_numba_para(spk1, spk2, available_memory)
  File "/Users/vhaenel/git/numba/numba/core/dispatcher.py", line 420, in _compile_for_args
    raise e
  File "/Users/vhaenel/git/numba/numba/core/dispatcher.py", line 353, in _compile_for_args
    return self.compile(tuple(argtypes))
  File "/Users/vhaenel/git/numba/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "/Users/vhaenel/git/numba/numba/core/dispatcher.py", line 794, in compile
    cres = self._compiler.compile(args, return_type)
  File "/Users/vhaenel/git/numba/numba/core/dispatcher.py", line 77, in compile
    status, retval = self._compile_cached(args, return_type)
  File "/Users/vhaenel/git/numba/numba/core/dispatcher.py", line 91, in _compile_cached
    retval = self._compile_core(args, return_type)
  File "/Users/vhaenel/git/numba/numba/core/dispatcher.py", line 104, in _compile_core
    cres = compiler.compile_extra(self.targetdescr.typing_context,
  File "/Users/vhaenel/git/numba/numba/core/compiler.py", line 568, in compile_extra
    return pipeline.compile_extra(func)
  File "/Users/vhaenel/git/numba/numba/core/compiler.py", line 339, in compile_extra
    return self._compile_bytecode()
  File "/Users/vhaenel/git/numba/numba/core/compiler.py", line 401, in _compile_bytecode
    return self._compile_core()
  File "/Users/vhaenel/git/numba/numba/core/compiler.py", line 381, in _compile_core
    raise e
  File "/Users/vhaenel/git/numba/numba/core/compiler.py", line 372, in _compile_core
    pm.run(self.state)
  File "/Users/vhaenel/git/numba/numba/core/compiler_machinery.py", line 341, in run
    raise patched_exception
  File "/Users/vhaenel/git/numba/numba/core/compiler_machinery.py", line 332, in run
    self._runPass(idx, pass_inst, state)
  File "/Users/vhaenel/git/numba/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "/Users/vhaenel/git/numba/numba/core/compiler_machinery.py", line 291, in _runPass
    mutated |= check(pss.run_pass, internal_state)
  File "/Users/vhaenel/git/numba/numba/core/compiler_machinery.py", line 264, in check
    mangled = func(compiler_state)
  File "/Users/vhaenel/git/numba/numba/core/typed_passes.py", line 288, in run_pass
    parfor_pass.run()
  File "/Users/vhaenel/git/numba/numba/parfors/parfor.py", line 2590, in run
    self._pre_run()
  File "/Users/vhaenel/git/numba/numba/parfors/parfor.py", line 2585, in _pre_run
    self.array_analysis.run(self.func_ir.blocks)
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 1117, in run
    self._run_on_blocks(topo_order, blocks, cfg, init_equiv_set)
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 1137, in _run_on_blocks
    pending_transforms = self._determine_transform(
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 1218, in _determine_transform
    pre, post = self._analyze_inst(
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 1253, in _analyze_inst
    result = self._analyze_expr(scope, equiv_set, inst.value)
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 1473, in _analyze_expr
    return guard(fn, scope, equiv_set, expr)
  File "/Users/vhaenel/git/numba/numba/core/ir_utils.py", line 1450, in guard
    return func(*args, **kwargs)
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 2055, in _analyze_op_arrayexpr
    return self._analyze_broadcast(
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 2814, in _analyze_broadcast
    return self._broadcast_assert_shapes(
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 2824, in _broadcast_assert_shapes
    max_dim = max([len(shape) for shape in shapes])
  File "/Users/vhaenel/git/numba/numba/parfors/array_analysis.py", line 2824, in <listcomp>
    max_dim = max([len(shape) for shape in shapes])
TypeError: Failed in nopython mode pipeline (step: convert to parfors)
object of type 'NoneType' has no len()

This is using:
@njit(cache=True, parallel=True)
def cisi_numba_para(spk1, spk2, available_memory):

But when I use:
@njit(cache=True, parallel=False)
def cisi_numba_para(spk1, spk2, available_memory):

The code runs fine. So it is probably something to do with parallel indeed.
The next step would be to reduce the code example to be minimal. I.e. to remove any code that is not involved in reproducing the error message.

Have you tried running the code by building Numba from source using the master branch? There was a recent change regarding the parallel accelerator. Numba is unable to handle slicing of np arrays using parallel and maybe hence the error, in the recent version this error is ignored.

I just ran the code above again with 0.50.0dev0-328-ge3002f06ff just to be sure and it  is indeed still not working. The error is still object of type 'NoneType' has no len().
@ritvik06 thanks for following up and confirming that the issue is now resolved for you.

Yes, sorry - here you go:
import psutil
import numpy as np
from numba import jit, njit, prange
from numba.typed import List

spk1=np.arange(1000)
spk2=spk1+3
available_memory=psutil.virtual_memory().available

@njit(cache=True)
def make_2D_array(arr_lis, accept_heterogeneous=False):
    """Function to get 2D array from a list of lists
    """
    lis=[np.asarray(l) for l in arr_lis]
    n = len(lis)
    lengths = [len(l) for l in lis]
    if accept_heterogeneous:
        max_len = max(lengths)
        arr = np.zeros((n, max_len))*np.nan
        for i,l in enumerate(lis):
            arr[i, :lengths[i]] = l
    else:
        assert max(lengths)==min(lengths)
        arr = np.zeros((n, len(lis[0])))*np.nan
        for i,l in enumerate(lis):
            arr[i, :] = l
    return arr

@njit(cache=True)
def split(arr, sample_size=0, n_samples=0, overlap=0, return_last=True, prnt=True):
    '''
    Parameters:
        - arr: array to split into EITHER n_samples OR samples of size sample_size.
               samples_size has priority over n_samples.
        - s_samples: int, size of of samples to split the array into.
        - n_samples: int, number of samples to split the array into.
        - overlap: 0<=float<1, fraction of overlapping between consecutive samples | Default 0
        - return_last: bool, whether to return the last sample (whose size usually does not match the ones before).
    Returns:
        samples: array or list of samples
    '''
    arr=np.asarray(arr)
    assert n_samples!=0 or sample_size!=0, 'You need to specify either a sample number or size!'
    assert 0<=overlap<1, 'overlap needs to be between 0 and 1, 1 excluded (samples would all be the same)!'

    if n_samples!=0 and sample_size!=0:
        print('''WARNING you provided n_samples AND sample_size!
              By convention, sample_size has priority over n_samples. n_samples ignored.''')
        n_samples=0

    if n_samples==0: n_samples=len(arr)//sample_size+1
    if sample_size==0: sample_size=len(arr)//(n_samples)

    assert n_samples<=len(arr)

    # step=1 for maximum overlap (every sample would be the first sample for step = 0);
    # step=s for 0 overlap; overlap is
    s=sample_size
    step = s-round(s*overlap)
    real_o=round((s-step)/s, 2)
    if overlap!=real_o and prnt: print('Real overlap: ', round(real_o, 2))
    samples = List([arr[i : i + s] for i in range(0, len(arr), step)])

    # always return last sample if len matches
    if len(samples[-1])==s:
        return make_2D_array(samples)

    if return_last:
        return make_2D_array(samples, accept_heterogeneous=True)

    lasti=-1
    sp=samples[lasti]
    while len(sp)!=s:
        lasti-=1
        sp=samples[lasti]
    return make_2D_array(samples[:lasti+1])

@njit(cache=True, parallel=True)
def cisi_numba_para(spk1, spk2, available_memory):
    spk1=np.sort(spk1).astype(np.float64)
    spk2=np.sort(spk1).astype(np.float64)
    memory_el=(0.01*available_memory)//spk1.itemsize
    if memory_el<((len(spk1)*len(spk2))*0.1):
        s=int(len(spk1)//((len(spk1)*len(spk2))//memory_el))
        chunks=split(List(spk1), sample_size=s, return_last=True, overlap=0)
    else:
        s=len(spk1)
        chunks=np.expand_dims(spk1, 0)
    # the trick to make things fast is to only consider
    # the relevant slice of spk2, which is possible assuming that spk1 and spk2 are sorted
    isi_1to2=np.zeros(len(spk1))
    n=chunks.shape[0]
    for i in prange(n):
        chunk=chunks[i]
        if i==n-1:chunk=chunk[~np.isnan(chunk)]

        m1=np.array(list(spk2>=chunk[0])[1:]+[True]) # shift left to add spike right before
        m2=np.array([True]+list(spk2<=chunk[-1])[:-1]) # shift right to add spike right after
        chunk2=spk2[m1&m2]

        a1=(chunk*np.ones((chunk2.shape[0], chunk.shape[0]))).T
        a2=chunk2*np.ones((chunk.shape[0], chunk2.shape[0]))
        d=np.abs(a1-a2)
        for di in prange(d.shape[0]):
            isi_1to2[i*s+di]=np.min(d[di])

    return isi_1to2

cisi=cisi_numba_para(spk1, spk2, available_memory)

Any optimization advice is welcome.

This is not a minimal reproducer.  I simplified the example while retaining the error and got it down to 25 lines (and even that is not absolutely minimal).  As you can imagine, the less code we have to wade through to find the error, the easier it is on us.
In terms of optimization, isn't your first prange parallelizing over a very small number (1 in the case of expand_dims).

This is still an issue on 0.55 but the error has changed.

@njit(cache=True,parallel=True)
def jit_linsolve(A, b):
m = A.shape[0]
n=A.shape[-1]
k=b.shape[-1]
ret = np.empty((m, n,k))
for i in prange(m):
ret[i, :] = np.linalg.solve(A[i], b)
#print(ret)
return ret
def my_numba_solver(a,b):
return jit_linsolve(a,b)
this what my simple code is. When I am going to run this in HPC, getting error message:
return jit_linsolve(a,b)
TypeError: expected dtype object, got 'numpy.dtype[float64]'


Clean up duplicate CRD files

In https://github.com/kubernetes-sigs/about-api/pull/12 we reorganized the code but there are still some artifacts left over and this is making it confusing to update things properly in this repo. This issue is done when any duplicate CRD build and/or source not needed after the update in https://github.com/kubernetes-sigs/about-api/pull/12 is removed.

/assigne
Happily taking this over.

/assign


Accessing url has redirect loop

Hello,
I visited some website with this proxy. Some work normal, and the other has redirect loop. I've search some forum and i've no answer yet.
http://<IP_ADDRESS>/proxy/
(Proquest and Scopus link. That webpage has a redirect loop).
can you please take a look? And help me to solve this problems?
thank you
#sory my bad english

can you go into your config.php file and set url_mode parameter to 0? Like this:
$config['url_mode'] = 1;

I changed it to 0, but the output still the same....
I think it didn't solve my problem. Would u like to help me?

The problem must be on your side. I just installed php-proxy-app and added that template, and both Proquest and Scopus links work just fine. Can you try this on a fresh installation?

well, that links detect IP address of my university, that allow us to see or download abstract & full paper without login...
I tried it locally, and it work just fine too.
But when i take it in the server, it keeps redirect loop.
may be you can help us.

Okay, remove everything, and reinstall php-proxy-app with php-proxy-app once again. If it still doesn't work, then you'll have to give me access to your server so I can do some debugging to see what's wrong.

i removed and reinstall, and changed url_mode into 0, it keeps redirect loop. can i have private conversation to give you access to my server?

email me<EMAIL_ADDRESS>


ISSUE-138: Make json libraries pluggable for blacksheep

Fixes issue #138

Thanks, Nikita @Cdayz - this looks great! I leave only three small comments.

Hi @Cdayz, I created a second PR with your changes + the things I described above. I also used black and isort to apply the same formatting and sort import statements.


[Transforms] Adds profiler events for cpu profile analysis of the compiler

This change adds several profiler events that are picked up by the ts profiler for assist with analyzing cpu profiles of the compiler.

Is there a particular reason you've decided to make extendedDiagnostics require diagnostics? I'm pretty sure it's more like extendedDiagnostics should imply diagnostics, since it's useless without the latter.

These changes were made in master and merged back into transforms.


Choose the x-axis units for longitudinal profile graphs

The compare_long_profile and compare_xs_long_profile functions allow the user to choosethe units for the x-axis. This needs to be done for all current and future "longitudinal profile" graphs:

xs_profile_plot
xs_metric_plot
xs_metrics_plot_2

xs_profile_plot - 4d00c3a5b62159270d5e5056c113e5e53a232e82
xs_metric_plot - db68ba5fecd0d0efc8a729936612c5bd35ab4884
xs_metrics_plot_2- b6b5aa5e8a2feae0f0279f64a3f74a4be8af0d73


does Deep auto encoders in DL4J work with continuous values ?

Please take a look at this thread: https://groups.google.com/d/msg/deeplearning4j/IGmU_SXG8J8/pi91GNfbo-0J.

fantastic, thank you


Updated example 1 in New-ManagementRole.md

Closes https://github.com/MicrosoftDocs/office-docs-powershell/issues/6266.

Docs Build status updates of commit c667586:
:clock10: Full build: the average full build time is 17 min(s) 39 sec(s), this is based on the last 1000 build(s) for this repository.

Docs Build status updates of commit c667586:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/New-ManagementRole.md
:white_check_mark:Succeeded
View (exchange-ps)

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 in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


OkHTTP library - how to list in SBOM?

Hi,
I am evaluating at the moment how I can create SBOMs out of an APK and upload them to dependency-track to check for known vulnerabilities. I tried today blint.
I've got a simple Android app that has one vulnerable dependency that I added via build.gradle.kts.
               implementation ("com.squareup.okhttp3:okhttp:4.8.0")

The library is imported and I am creating a simple GET request by using OkHTTP. Afterwards I created an APK and scanned it with blint (without and with --deep):
$ blint sbom -i app-debug.apk -o app-debug.sbom
$ blint sbom -i app-debug.apk -o app-debug-deep.sbom --deep

When I search now for OkHttp in the 1st scan it cannot be found and there is no result.
$ grep -iRn okhttp app-debug.sbom

In the sbom generated with deep scan there are 1,854 matches for "okhttp". If I upload the SBOM with deepscan into dependency-track it will show me 51 dependencies, but it will not list OkHttp. So I hasn't identified OkHTTP as dependency in the APK.
My understanding is that the --deep is grepping through the DEX files to identify classes for dependencies, would this help to create an SBOM? Or is --deep not useful to create a SBOM?

And is it possible in this scenario to list a dependency that was added by Gradle into the SBOM created by blint?

@sushi2k could you kindly share the apk and the generated sbom. Also try cdxgen to generate an sbom from the source.

@prabhu  Here you go:

APK
app-debug.apk.zip

SBOM created with $ blint sbom -i app-debug.apk -o app-debug.sbom
app-debug.sbom.txt

SBOM created with $ blint sbom -i app-debug.apk -o app-debug-deep.sbom --deep
app-debug-deep.sbom.txt

And with cdxgen sbom.json.txt

$ cdxgen -t java -o sbom.json
Executing /Users/sushi2k/Documents/mastg-apps/MASTestApp-Android-MASWE-0076/gradlew --build-cache --console plain --no-parallel properties in .
Executing /Users/sushi2k/Documents/mastg-apps/MASTestApp-Android-MASWE-0076/gradlew --build-cache --console plain --no-parallel :app:properties in .
Executing /Users/sushi2k/Documents/mastg-apps/MASTestApp-Android-MASWE-0076/gradlew --build-cache --console plain --no-parallel dependencies :app:dependencies in .
Obtained 203 from this gradle project. De-duping this list ...


Should we recommend only one CustomTransform per GroupResource?

This issue is about a detail of the feature of Issue #1976 .
I got the idea that we were thinking that there would be at most one CustomTransform for a given metav1.GroupResource, but I do not recall explicitly discussing the question.
This question is about the mental model that users should have; it is not driven by implementation concerns (the implementation in #2060 supports multiple and logs an error when there are more than one).
It makes sense to me to recommend just one CustomTransform per GroupResource because there are not independent consequences if there are multiple: the effects of all of them get added together and applied to the same workload objects. If some user is writing and reading only a subset of those effects, then that user is not seeing and, more importantly, not thinking about the other CustomTransform(s) that apply to the same workload objects. If there were multiple independent users writing CustomTransform objects that apply to the same workload object, one user might put something in her CustomTransform that other users do not want. By recommending a single CustomTransform for a given GroupResource, we recommend that users act as coherently as the feature effectively supposes they are.

I think it makes sense to support chaining CustomTransforms (with importance to order). If not unlimited chaining, at the very least a 2-levels chain.
E.g., one CustomTransform can be thought of as cluster-wide, and one can be user specific. I understand that currently CustomTransforms are non-namespaced objects, and under this PoV it might make sense to change that.
In all cases, unless there is a concrete use-case such as implementing denaturing and allowing the user to override default behavior through the above, this wouldn't be high priority.

We do not have a use case that requires changing the binding semantics. With the current binding semantics, there is no differentiation among the CustomTransform objects that apply to a given kind of workload object.

@MikeSpreitzer I suggest we go forward with the simple approach (single) that we have now, we can change in that future if there is a concrete use case for that

+1

This has been settled in the affirmative.


Any tips for fonts not showing up in rxvt?

I'm using rxvt-unicode, and I can't get the fonts to show up, with the fallback method. I'm trying
echo -e "\uf175"

But this produces a square in rxvt. If I try it in xfce4-terminal, it works fine.

It doesn't work because the characters have different widths. You can read about this in man 7 urxvt (Section "Why does rxvt-unicode leave pixel droppings").
Here someone had the same problem with a different font: https://bbs.archlinux.org/viewtopic.php?id=184089

I will consider this closed since the OP hasn't said anything in almost a year


Why is the loss divided by (nb_coord_box + 1e-6) / 2?

nb_coord_box is the count of total value in the tensor that has the condition, in this case coord_mask > 0. To put it in other words, it counts how many value that are more than 0 in coord_mask. The coord mask is then added by a small number, and divided by 2 (the addition is to make it a float, I guess). What's the purpose of dividing the loss with this value?

That's done to avoid the division by zero, in case the value becomes zero.

Iirc, there is no division at all in the loss function of the paper. Why is the loss divided by a value? Am I missing something?

The function in the paper doesn't note it explicitly, but in general for losses, it is common to 'normalize' by dividing the values by number of data samples so that the loss doesn't blow up by using higher number of input samples.

Ah, that clears up the confusion I had, thanks. I do still have another question regarding the loss function though, if you don't mind answering. In the loss there is the """adjust prediction""" part where tf.sigmoid and tf.exp is applied to the prediction tensor, I can't seem to understand why this operation takes place, and the purpose of it. IIRC, there is nothing about this operation on the paper too. Am I missing something again?

Nice observation.
I am also not really sure why it is done for wh and xy. For conf, taking sigmoid makes sense as it gets you the probability.
Anyone else might have more insight?

Yes, I would like to have an answer to why sigmoid and exp are applied to pred xy and pred wh respectively. I really hope that @experiencor would give an explanation on this.

Well, I guess the loss function matches very much with the following implementation:
https://github.com/allanzelener/YAD2K/blob/a42c760ef868bc115e596b56863dc25624d2e756/yad2k/models/keras_yolo.py#L152
So I guess they may have some more suggestions. If you find out, @vin-liao the please post your understanding here too.
Thanks

After fiddling it for few days, this is how I think about the sigmoid and exp on prediction, CMIIW. So in the ground truth, the NN must predict the xy positioning and wh prediction size, and in my implementation, I organize the xy and wh ground truth to be a range between 0...1 (not so sure about how this repo organize it).
Predicting the value 0...1 directly is not an easy thing, because it requires the the weights needs to be very precise in order to do that. By applying sigmoid, the value 0...1 is "stretched" from around -6 to 6. So instead of predicting the value between 0...1, the NN can learn to predict a value between -6 and 6, which when applied sigmoid, becomes 0...1.
I'm currently not so sure about the tf.exp part, since I don't use it (I'm using sigmoid for both xy and wh). The link that you sent greatly helps @bkanaki thank you.

I don't think there's that much difference between this repo and mine, the concept is still the same.

How are your training stats with your implementation?

I haven't successfully train it yet, right now I have a bad data and the detection isn't good yet.

Have you provided the source on your fork? If no, can you?

I'm not sure what you mean by this, I created my project from scratch, so I didn't fork anyone's project. I learn a lot of things by reading this repo and this repo.

Hey u guys seem to know a lot abt the loss function can anyone explain to me why we are calculating IOU 2 times in loss function


FEATURE: Kegsmarts Support

I don't own one, but would it be worth it to add Kegsmarts support to this server?
https://github.com/AppleDoc/picobrew-kegsmarts-api/blob/master/PicoBrew KegSmarts API.md

I'm going to take a try at adding this. Digging in to the project code now but any pointers definitely appreciated!

I would love to see this as well.  I have a Kegsmarts and can help test

@chrisscott let me know how I can help. Basically we have a single "routes.py" file per device series to keep things manageable. Model.py is where all the "models" are stored. For kegsmarts we need a new "draft/tower/keg" model and a "beer" model where the "active session" for a kegsmarts would be the beer status in said tower under a unique file structure under "/sessions/kegsmarts/active" and then when that keg is tipped it goes into "/sessions/kegsmarts/archive".

I don't own one, but would it be worth it to add Kegsmarts support to this server?
https://github.com/AppleDoc/picobrew-kegsmarts-api/blob/master/PicoBrew KegSmarts API.md

I recently acquired one and I would also love to see this feature added!


Use local FFmpeg instead of Jave's

Important: the current implementation has a concurrency issue: n concurrent calls involving videos will result in n invocations of the command to retrieve FFmpeg installation path.


Vectorize distance calculation at MacOS

Problem
Summary of changes
Checklist before requesting a review

[ ] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.
[ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
[ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

[ ] Do not forget to reformat commit message to not include the above checklist

Please add it to https://github.com/neondatabase/pg_embedding. We're going to deprecate hnsw extension.

Added in https://github.com/neondatabase/pg_embedding/pull/5


Add Dockerization command

Add configuration files for dockerize in runtimes
Add stub for postgres and redis options
Add docker-compose generator artisan comand

I'm closing it so that you can make the changes and send a new pull request.


Disable two time social media verification

https://discord.com/channels/1025416762835095674/1026138967323717705/1042488006147317870
People don't necessarily see the verified icon. If it's verified then disable the button

Close with #64


Captcha loading failed when "refreshing JOJ"

I installed joj-tools through VS Code Extension Market under joj-submit version 0.0.9 and ji-auth 0.0.6 . And then when I tried to refresh the status of JOJ in the tool, captcha failed to load.
It happens both with or without network system proxy.
The environment is Ubuntu 20.04 , Python 3.8.10 , VS Code 1.72.2 .

can you first uninstall joj-submit and ji-auth and then run the extension again?

can you first uninstall joj-submit and ji-auth and then run the extension again?

Then after the extension showing "installing joj-submit / ji-auth ", it jumped to a captcha page in the VS Code and required captcha. This captcha still fails to load.

paste the result of ji-auth joj --help here.

After totally re-install ji-auth, joj-submit and this tool and reset the proxy settings, it worked.


Update the configuration for CMAQ and WRF

The motivation
It will be easier for future users to create a correct configuration file if we define the requirements for the individual entries and types in detail and include them in the documentation.
The proposed solution

[ ] Store the requirements for the configuration in the docstring of the CMAQConfig and WRFConfig Class
[ ] Update the docstring in the class definition according to the latest requirements
[ ] Test what is the appropriate type for each variable

Also the NCI configuration for the CMAQ setup should be extracted to JSON file as a starting point for NCI users


Pass implied type to TypeScript language service

Test tour #23385
Not necessarily something we need to do, but maybe you know how to do this:
.vue files have a script part that assigns a particular type to module.exports. There should be a way to tell the TypeScript language service about that.
Relevant source: https://github.com/octref/vetur/blob/master/server/src/modes/javascriptMode.ts

Closing as upstream since it's not clear that any action is needed on the VSCode side here. I know some folks on the TS team have been working to improve vetur so they should be able to help out with this functionality if needed


Performance OP Bringup

Need a dedicated test plan to bringup ops in performance mode. There have been many gotcha's + investigation into how perf works.
Currently supported ops in ttmlir runtime are listed below. For each op, need to test

ttnn runtime using perf (outside of ttmlir)
ttmlir runtime using perf (using ttrt)
CI unit test case

[x] ttnn.empty
[x] ttnn.multiply
[x] ttnn.subtract
[x] ttnn.div
[x] ttnn.relu
[x] ttnn.ge
[x] ttnn.reshape
[x] ttnn.reciprocal
[x] ttnn.sigmoid
[x] ttnn.sqrt
[x] ttnn.softmax
[ ] ttnn.transpose
[x] ttnn.sum
[x] ttnn.mean
[x] ttnn.max
[x] ttnn.max_pool2d
[x] ttnn.matmul
[x] ttnn.concat
[x] ttnn.neg
[x] ttnn.rsqrt
[x] ttnn.typecast
[x] ttnn.maximum
[x] ttnn.conv2d
[x] ttnn.full
[x] ttnn.eq
[x] ttnn.ne
[x] ttnn.gt
[x] ttnn.le
[x] ttnn.lt
[x] ttnn.squeeze

branch: tpatel/issue-884

ops entirely done on host (no device data)
ttnn::empty
ttnn::reshape
ttnn::full
ttnn::squeeze
ops with workarounds in ttmlir
ttnn::maximum

all logical ops work as well in the branch

merged: e1ccf6f06162ea84df8d89c0cca7a17a93bbd3e9


fix: check domain if supplied address is correct

:tada: This PR is included in version 0.6.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Collect PScout results from 20x batch

Cesar holding off on PScout results for now. Focusing on Stowaway for now.


Fixed NavBar : Login and Register options not working fixed with Working proof

To address the issue of the NavBar's Login and Register options not working here's a plan for resolving it:
The issue  with the "Login" and "Register" links not reloading the pages is due to the JavaScript logic that prevents default behavior and implements smooth scrolling to sections based on id attributes. Since the login.html and register.html pages don't correspond to sections with IDs, they aren't loading as expected.
I have fixed the issue Please assign me the task .
Before :
https://github.com/user-attachments/assets/aaa76e65-0544-4452-a1a9-0554b07a4f89
please @anuragverma108 assign me with this issue with labels "hactoberfest"

After 👍  : Login and Register Link works successfully
https://github.com/user-attachments/assets/0b16a8d9-f16b-411d-9544-9a2b53cf1490
Closes Issue #946 , #942 , #945
Now the Register and login links work well


[Broadcaster] Remove pointer to data in broadcast message struct

Signed-off-by: Bariq<EMAIL_ADDRESS>Description
This PR fixes https://github.com/meshery/meshery/issues/4250
Notes for Reviewers
Modify field of Data in BroadcastMessage struct to be not a pointer.
Signed commits

[x] Yes, I signed my commits.

// Commenting here, so that I can get notified when this PR gets merged and I can initiate my PRs

@bariqhibat @Revolyssup  is this PR good to go?


⚠ Jenkins Plugins Artifactory has degraded performance

In 9b5d0ef, Jenkins Plugins Artifactory (https://get.jenkins.io/plugins/artifactory/) experienced degraded performance:

HTTP code: 200
Response time: 1266 ms

Resolved: Jenkins Plugins Artifactory performance has improved in 289fad1 after 12 minutes.


telegraf: 1.23.3 -> 1.23.4

Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

@ofborg test telegraf

Please have a look at #191056

Closing as this is a duplicate of https://github.com/NixOS/nixpkgs/pull/191056 which has been merge.


Tomlm/port perf connector

Port Token refresh changes from v3 connector
make sure we use singleton HttpClient
fix Mention casing

                new Claim(AuthenticationConstants.AudienceClaim, botAppId),

This comment seems wrong. Neither of these claims are for the emulator.

Refers to: libraries/Microsoft.Bot.Builder/BotFrameworkAdapter.cs:117 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

            throw new ArgumentNullException(nameof(context));

Codeing style in the C# SDK (and even in this file) is to use single-line if statements for these test/throw for aguements. aka: consider removing the {}

Refers to: libraries/Microsoft.Bot.Builder/BotFrameworkAdapter.cs:239 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

        }

.configureAwait(falsE);

Refers to: libraries/Microsoft.Bot.Builder.Ai.LUIS/Client/LuisService.cs:265 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

    }

.ConfigureAwait(falsE)

Refers to: libraries/Microsoft.Bot.Builder.Ai.LUIS/Client/LuisService.cs:297 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

Strongly consider moving to it's own file.

Refers to: libraries/Microsoft.Bot.Builder.Ai.LUIS/Client/LuisService.cs:19 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

Strongly consider moving to it's own file.

Refers to: libraries/Microsoft.Bot.Builder.Ai.LUIS/Client/LuisService.cs:177 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

I don't think this is needed, and we can delete the interface. Building Mocks for tests doesn't require interfaces.

Refers to: libraries/Microsoft.Bot.Builder.Ai.LUIS/Client/LuisService.cs:177 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

            Fix(result);

Note: There is an outstanding GitHub issue around this code. The Sentiment Score is being dropped on the floor. The LUIS team has yet to engage to fix this, but we may want to add it while we're in here.

Refers to: libraries/Microsoft.Bot.Builder.Ai.LUIS/Client/LuisService.cs:270 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

This class should be deleted along withthe ILuisService interface. Just put these methods on LuisService.

Refers to: libraries/Microsoft.Bot.Builder.Ai.LUIS/Client/LuisService.cs:285 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

1 class per file.

Refers to: libraries/Microsoft.Bot.Builder.Ai.QnA/QnAMaker.cs:172 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

1 class per file.e

Refers to: libraries/Microsoft.Bot.Builder.Ai.QnA/QnAMaker.cs:193 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

1 class per file.

Refers to: libraries/Microsoft.Bot.Builder.Ai.QnA/QnAMaker.cs:229 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

{

1 class per file.

Refers to: libraries/Microsoft.Bot.Builder.Ai.QnA/QnAMaker.cs:273 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)

using System;

This entire file needs a thorough cleanup. We'll ahve to get the relevant team to clean it up.

Refers to: libraries/Microsoft.Bot.Builder.Ai.Translation/Translator.cs:5 in 3733ea0. [](commit_id = 3733ea0586119d4d36a6765dc191b2abe71d907f, deletion_comment = False)


Add a verbose flag to the compressInterface

For debug purposes I'd like to list the files as they are progressed in compression and decompression by setting a verbose flag. It would be helpful if this lib would provide such.

v0.4.5: add debug flag
tar
import { tar } from<EMAIL_ADDRESS>// or only import tar
// import { tar } from<EMAIL_ADDRESS>export interface compressInterface {
  excludeSrc?: boolean;      // does not contain the src directory
  debug?: boolean;           // list the files and folders
}
export interface uncompressInterface {
  debug?: boolean;           // list the files and folders
}
tar.compress(src, dest, options?: compressInterface): Promise<void>;
tar.uncompress(src, dest, options?: uncompressInterface): Promise<void>;

tgz
import { tgz } from<EMAIL_ADDRESS>// or only import tgz
// import { tgz } from<EMAIL_ADDRESS>export interface compressInterface {
  excludeSrc?: boolean;      // does not contain the src directory
  debug?: boolean;           // list the files and folders
}
export interface uncompressInterface {
  debug?: boolean;           // list the files and folders
}
tgz.compress(src, dest, options?: compressInterface): Promise<void>;
tgz.uncompress(src, dest, options?: uncompressInterface): Promise<void>;

I have switched to golang development for more than 2 years.
If you want, I am very happy to merge your pull request.

@martin-braun

@martin-braun  Take care of yourself, you'll be fine soon.


Throttling support for all redshift databases

Currently redshift metrics are exported only for one database. Redshift system tables return response for only the database the connection is for. Since Redshift does not support cross db queries for System tables.
We are doing below:

The scan_query_total view would need to be created for all dbs.
The --databases needs to be passed to the operator.
The operator would run the fetch for query_total for all dbs then. Default is still to use the one database based on config.

Image is available as: v1.0.0-beta.1-9-gaeae0df
practodev/redshiftbatcher:v1.0.0-beta.1-9-gaeae0df
practodev/redshiftloader:v1.0.0-beta.1-9-gaeae0df
practodev/redshiftsink:v1.0.0-beta.1-9-gaeae0df


Indicate that Physical deployment is ONLY for Intel CPUs

I created my entire management infrastructure using the guides (which are very well written - both GUI and PowerShell), before I learned that nested virtualization is not supported on AMD CPUs.  It's by far the most requested feature on User Voice (https://windowsserver.uservoice.com/forums/295047-general-feedback/suggestions/31734808-nested-virtualization-for-amd-epyc-and-ryzen), and I'm sure this will be a frequent issue for testers.  The official documentation that states this is at https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/nested-virtualization.  There may be other issues that users will run into, so referencing that document might be useful.
I'd recommend adding the restriction information to the very beginning of the physical deployment guide (along with the discussion of hardware memory requirements and other caveats).  Depending on steps taken, this could waste many hours of IT Pros' time.
The good (or at least, better) news is that support has reportedly been added in recent preview builds (I haven't checked this myself).  As of right now, though, AMD-based users can't take advantage of any of the "physical" deploment options.   Had I known, I would have considered setting up an Azure test environment, instead.

Hi Anil,
My apologies - I'll take care of this right now.  You are correct, support for Nested Virtualization with AMD CPUs has been added to Windows 10 Insider builds, as per here: https://techcommunity.microsoft.com/t5/virtualization/amd-nested-virtualization-support/ba-p/1434841, however I don't believe this is in the Windows Server Insider builds at this time.
I'll update the guide to reflect this additional option.
Apologies again.

Thanks, Matt - especially for responding within minutes!  If I can help with providing error message or any other testing, please feel free to let me know!  If anyone's interseted, it is possible to set up the management infrastructure (DC01 and MGMT01) for testing purposes using the great GUI and PowerShell guides.

One thing to note, you only need nested if you want to start VMs on your Azure Stack HCI hosts, otherwise you should still be able to deploy the Azure Stack HCI nodes, and enable Hyper-V with the PowerShell command (I think!) however I'm not 100% sure what will happen when you run this:
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

on an AMD system, so if you could validate that, that would be great! If that command works, and the Hyper-V role enables correctly, Windows Admin Center should allow you to build the cluster. You just wouldn't be able to deploy a VM onto your nested nodes as the hypervisor wouldn't run. I'm speculating a bit here, so apologies if that doesn't work - I don't have an AMD system to test on unfortunately.
I'm about to PR the edit to the changes - apologies again, and thanks for your understanding.

Matt,
      Thanks, again for you quick response.  Actually, the specific line you mentioned is the first one that failed for me.  I was starting to setup the nodes and was able to create the VMs (I had DC01 and MGMT01 already running fine).  I forgot the exact error message that appeared, but it is in the documentation somewhere (about being unable to enable virtualization extensions).  I’m running on a 3rd Generation AMD Ryzen 5-3600 with 32GB of RAM.  I think the issue is lack of support for AMD-V extensions (vs. Intel’s VT).

      I’d be happy to send you a SystemInfo or any a screenshot or text of the complete message if it would help.  I still have my test environment setup up to that step.  I have done lot of writing/speaking about Hyper-V and Azure stuff (and I was 14-time MVP, most recently in the Cloud/Datacenter area), so I’d be happy to help!

      Thanks, again!

Anil

From: Matt McSpirit<EMAIL_ADDRESS>Sent: Monday, July 27, 2020 10:18 PM
To: Azure/AzureStackHCI-EvalGuide<EMAIL_ADDRESS>Cc: Anil Desai<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [Azure/AzureStackHCI-EvalGuide] Indicate that Physical deployment is ONLY for Intel CPUs (#18)
One thing to note, you only need nested if you want to start VMs on your Azure Stack HCI hosts, otherwise you should still be able to deploy the Azure Stack HCI nodes, and enable Hyper-V with the PowerShell command (I think!) however I'm not 100% sure what will happen when you run this:
Set-VMProcessor -VMName  -ExposeVirtualizationExtensions $true
on an AMD system, so if you could validate that, that would be great! If that command works, and the Hyper-V role enables correctly, Windows Admin Center should allow you to build the cluster. You just wouldn't be able to deploy a VM onto your nested nodes as the hypervisor wouldn't run. I'm speculating a bit here, so apologies if that doesn't work - I don't have an AMD system to test on unfortunately.
I'm about to PR the edit to the changes - apologies again, and thanks for your understanding.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Azure/AzureStackHCI-EvalGuide/issues/18#issuecomment-664751998, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB3BZKE32IQQU5CIT3PI6ADR5Y7ORANCNFSM4PJ7C2OQ.

Hey - I thought it might fail, however, if you skip/comment that line, were you able to enable Hyper-V, at this step?
https://github.com/Azure/AzureStackHCI-EvalGuide/blob/main/nested/steps/3b_AzSHCINodesPS.md#enable-the-hyper-v-role-on-your-azure-stack-hci-node
I'm curious if you skip the extensions, and successfully enable Hyper-V, whether WAC will allow you to start the cluster creation.  The section where it checks for "Hyper-V enabled" is right at the start of the cluster creation wizard.  In the past, I've seen a message that the Virtualization extensions aren't enabled on a node, so it wouldn't allow you to continue, but with the Hyper-V role already enabled, it may allow you to proceed.
Could you see if that works?
Also, if it doesn't, it may work for Gen1 nodes, so that may be an alternative approach.
The alternative to all of this could be to export your existing DC01 and MGMT01 VMs, reimage the host with the W10 Insider, then re-import them and proceed on from there?

OK, could you try this?  For the enable Hyper-V role with PowerShell command, run this one instead:
# Provide the domain credentials to log into the VM
$domainName = "azshci.local"
$domainAdmin = "$domainName\labadmin"
$domainCreds = Get-Credential -UserName "$domainAdmin" -Message "Enter the password for the LabAdmin account"
# Define node name
$nodeName = "AZSHCINODE01"
Invoke-Command -VMName "$nodeName" -Credential $domainCreds -ScriptBlock {
    # Enable the Hyper-V role within the Azure Stack HCI OS
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
    Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -restart
}

The first one enables Hyper-V without doing the "full checks" and the second enables the PowerShell stuff (which the first command won't do for some reason).
When you reboot, and try to add to WAC, it will recognize that the Hyper-V role is enabled, and should allow you to proceed, or at least it has for me, but with an Intel system.  I haven't run the Set-VMProcessor -VMName  -ExposeVirtualizationExtensions $true command, so we should be in a similar place.

Matt,
      Sure – I’ll try this in about an hour or so and get back to you with the results.

      Thanks,

Anil

From: Matt McSpirit<EMAIL_ADDRESS>Sent: Tuesday, July 28, 2020 1:50 PM
To: Azure/AzureStackHCI-EvalGuide<EMAIL_ADDRESS>Cc: Anil Desai<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [Azure/AzureStackHCI-EvalGuide] Indicate that Physical deployment is ONLY for Intel CPUs (#18)
OK, could you try this? For the enable Hyper-V role with PowerShell command, run this one instead:
Provide the domain credentials to log into the VM
$domainName = "azshci.local"
$domainAdmin = "$domainName\labadmin"
$domainCreds = Get-Credential -UserName "$domainAdmin" -Message "Enter the password for the LabAdmin account"
Define node name
$nodeName = "AZSHCINODE01"
Invoke-Command -VMName "$nodeName" -Credential $domainCreds -ScriptBlock {
# Enable the Hyper-V role within the Azure Stack HCI OS

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -restart

}
The first one enables Hyper-V without doing the "full checks" and the second enables the PowerShell stuff (which the first command won't do for some reason).
When you reboot, and try to add to WAC, it will recognize that the Hyper-V role is enabled, and should allow you to proceed, or at least it has for me, but with an Intel system. I haven't run the Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true command, so we should be in a similar place.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Azure/AzureStackHCI-EvalGuide/issues/18#issuecomment-665214234, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB3BZKCLQEOCX455Y3FOIRDR54MUBANCNFSM4PJ7C2OQ.

Matt,
      I do have some more information for you.  The MGMT01 and DC01 are working fine, as I left them yesterday.  First, when I try to startup AZSHCINODE01, I receive the following error message via Hyper-V (on the my local, physical host):

<EMAIL_ADDRESS>      It does appear that the configuration change (enabling Hyper-V) was attempted, but now I can’t start that VM.  Also, it looks like the command I ran yesterday did seem to run properly from the physical host (I got the expected response of “VERBOSE: Set-VMProcessor will configure the processor settings of the virtual machine "AZSHCINODE01").  I just happened to have this console window still open.

      I think there are several options for troubleshooting.  One option would be to start by creating a NODE02 VM using the same evaluation version of Windows Server 2019.  I think I’d run into the same problem, though: Whether or not the command returned an error, I wouldn’t be able to start it on my AMD-based host.  I could also move the VM to an Intel-based host machine (I’ll need to configure onbe), and try moving it back.  However, it seems like the same issue would occur.

      It seems like the most likely workaround is to try the Windows Server Insider build, as you mentioned.  I have read several blog posts and comments from people stating that nested virtualization is working properly for them on AMD-based machines on that build (all have been posted within the last month or so).  I can try following the steps using the latest Insider build that’s available to me to see if that works.

      Let me know if/how you’d like me to proceed.

      Thanks,

Anil

From: Matt McSpirit<EMAIL_ADDRESS>Sent: Tuesday, July 28, 2020 1:50 PM
To: Azure/AzureStackHCI-EvalGuide<EMAIL_ADDRESS>Cc: Anil Desai<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [Azure/AzureStackHCI-EvalGuide] Indicate that Physical deployment is ONLY for Intel CPUs (#18)
OK, could you try this? For the enable Hyper-V role with PowerShell command, run this one instead:
Provide the domain credentials to log into the VM
$domainName = "azshci.local"
$domainAdmin = "$domainName\labadmin"
$domainCreds = Get-Credential -UserName "$domainAdmin" -Message "Enter the password for the LabAdmin account"
Define node name
$nodeName = "AZSHCINODE01"
Invoke-Command -VMName "$nodeName" -Credential $domainCreds -ScriptBlock {
# Enable the Hyper-V role within the Azure Stack HCI OS

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -restart

}
The first one enables Hyper-V without doing the "full checks" and the second enables the PowerShell stuff (which the first command won't do for some reason).
When you reboot, and try to add to WAC, it will recognize that the Hyper-V role is enabled, and should allow you to proceed, or at least it has for me, but with an Intel system. I haven't run the Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true command, so we should be in a similar place.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Azure/AzureStackHCI-EvalGuide/issues/18#issuecomment-665214234, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB3BZKCLQEOCX455Y3FOIRDR54MUBANCNFSM4PJ7C2OQ.

Hmm - i can't see the image but nonetheless, if you could test with a new VM (just follow the PowerShell guide, and don't worry about a domain join) it should only take a few mins to create the new node and run the scripts to try to enable Hyper-V.  If that still doesn't work to get Hyper-V enabled and configured, I'd just go ahead and go with the Insider build - entirely your choice!

No problem - I'll try that now.  I think I might need to correct something below.  Based on the issues that I’m experiencing, the issue seems to be with the physical host OS (Windows 10, in my case).  Based on the Microsoft post AMD Nested Virtualization Support, I would need to upgrade my version of Windows 10.  Unfortunately, I can’t upgrade my current Windows 10 host at the moment due to other work dependencies.
I've attached a copy of the screenshot with the error message via GitHub, so hopefully you can see it now.

I was just following the guide for testing purposes, so I will try the Insider build when I get a chance.  Just let me know if you want me to send you any further feedback (I might not be able to get to it until tomorrow).
Thanks, again!

Anil

Can you disable the virtualization extensions for the VM, and try launching again?
Set-VMProcessor -VMName  -ExposeVirtualizationExtensions $false

I just tried that, and it does resolve the issue with the VM not starting.  With the NODE01 VM offline (since I couldn't start it), I ran the following (added -Verbose since I didn't get any output):
Set-VMProcessor AZSHCINODE01 -ExposeVirtualizationExtensions $false -Verbose
Response:
VERBOSE: Set-VMProcessor will configure the processor settings of the virtual machine "AZSHCINODE01".
I retried enabling Hyper-V with the script you provided, and I got the following error after about a minute:
An error has occurred which Windows PowerShell cannot handle. A remote session might have ended.
+ CategoryInfo          : OpenError: (AZSHCINODE01:String) [], PSRemotingDataStructureException
+ FullyQualifiedErrorId : PSSessionStateBroken
The VM remained running, but the console shows it has power-cycled (restarted).     This time, it's just stuck at the black boot screen (attempting PXE or DVD-based booting).  It looks like the "trick" worked partially; at least my physical host will attempt to start the VM.  Unfortunately, it looks like the VM will not actually boot into the OS in this configuration.  I hope this helps.  Let me know if you'd like me to try anything further.

How much memory does this VM have?

It's configured to 4096MB (4GB) with dynamic memory disabled for the Node01 VM.  The host has 32GB and is running on NVME storage.

OK - i had issues with Hyper-V enabled and memory configured with less than 4GB, but with 4GB set, all should be fine.
I'm stumped on that one - don't waste your time on it too much though - if you have a spare few mins, deploy a fresh node and enable Hyper-V with the step above, but short of that, perhaps deploy one in Azure to test further.
Thanks again for the support here!

Thanks for the update and quick response to the issue!  I will give it another shot when I get a chance.  Regardless, everything in the guides has been really well-written (I've reviewed both the GUI and PowerShell versions before getting started).  I think using Azure, an Intel-based host, or an Insider build should all work fine.


Adding tool-player basic interactions

Features added:

Equipe two tools - back tool and hand tool;
Switch tools between back and hand;
Switch hand tool for a new tool in the map;
Drop hand tool;

POG


Native compilation: C++ code generation generates malformed float constants on german systems

The c++ code generator currently generates malformed float constants if the current culture formats floats with a comma as decimal separator instead of a dot (such as on german systems). This of course leads to the code not compiling. For example:
_bb847: {

	double _123 = _l11;
	double _124 = _123 + 1,84467440737096E+19;
	_l11 = _124;
}

I tracked this down to the .ToString() call in ImportLoadFloat() in corert/src/ILCompiler.Compiler/src/CppCodeGen/ILToCppImporter.cs, which should be changed to .ToString(CultureInfo.InvariantInfo), just like it is done in ImportLoadInt().

Thanks for tracking it down - I will be super happy to take the PR with this fix!

Same problem here when building with spanish format selected in the region OS config.

We might want to audit all uses of the ToString override on integer/float types within the compiler. I know we're not very rigorous at using invariant culture. I don't think it will ever matter for integers, but floats/doubles are obviously a problem.
These should ideally be routed through helpers in src\ILCompiler.Compiler\src\Compiler\FormattingHelpers.cs - I created this file mostly to avoid polluting the namespace with using System.Globalization everywhere.

Fixed by #997