Take the SHA256 from pypi (not github release)

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


fix all race conditions in the session tests

Related: #2520.

Codecov Report

Merging #2525 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2525   +/-   ##
=======================================
  Coverage   86.14%   86.14%
=======================================
  Files         122      122
  Lines        9536     9536
=======================================
  Hits         8214     8214
  Misses        984      984
  Partials      338      338

Continue to review full report at Codecov.

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


Add Memory collection & vulkan layer loaded metric

This PR adds 2 metrics and does some refactoring (separate commits)
Memory metric bug: http://b/187285836
Vulkan metric bug: http://b/181650681
Test: run unit tests.

Cann you add to the refactoring commit message why it was changed from ns to ms?

Yes, I can. I will add this message when I rebase (after reviews)

@karupayun I requested your review again since I added the changes you requested and commented on the rest of your comments


config/initializers/rails_admin.rb:4:in block in <main>': undefined method horizontal_scroll_list=' for RailsAdmin::Config:Module (NoMethodError)

I tried this  to make the list view table show all of the columns on a single page, with horizontal scrolling and frozen header columns in the table.
RailsAdmin.config do |config|
  ...
  # Use default horizontal scroll settings of 3 frozen columns (checkboxes, links/actions, ID) with a border on the right:
  config.horizontal_scroll_list = true

  # Use horizontal scrolling, but without any frozen columns:
  config.horizontal_scroll_list = {num_frozen_columns: 0}

But getting error
/config/initializers/rails_admin.rb:4:in block in ': undefined method horizontal_scroll_list=' for RailsAdmin::Config:Module (NoMethodError)
rails_admin (1.3.0)

I'm also not able to use horizontal_scroll_list in 1.4.1 ...

Good point - sorry, apparently I didn't read the documentation closely enough!  I didn't realize it wasn't a merged feature yet.
I was also having trouble getting total_columns_width to do anything, which is why I quickly tried horizontal_scroll_list when I saw it was an option.  But I guess total_columns_width is unrelated to this issue, so I'll create a new one for that if I try again and still can't get it to work (I just have a bunch of checkbox fields that should really fit on one screen, but I can't get them to all show up)

You will have to play with column_width also, since its default is 120px. So if you have 10 columns, than you need total_columns_width at 1200px.

Hey, I figured it out!  (I think I was actually just setting it in the wrong place - or a couple of wrong places, actually) 😄 Thanks!

:+1:

What do we need to make progress on this, a pull request has been ready to migrate for a while already, Can we help?

#3017 is in the master now.


Add a HelloWorld example, document major types, hide misleading exports

I am trying to get to know the API from a very simple exercise, but I experienced some trouble.
Here is some of the code I had:
import {Issue, Node} from "@strumenta/tylasu";

This was wrong and caused many errors when I tried to create a parser by ripping off some code from unit tests (parsing.test.ts):
class MyLanguageCompilationUnit extends Node {}

class MyLanguageTylasuParser extends Parser<MyLanguageCompilationUnit, codetlParser, MyLanguageRuleContext> {
    protected createANTLRLexer(inputStream: CharStream): Lexer {
        return new myLanguageLexer(inputStream);
    }

    protected createANTLRParser(tokenStream: TokenStream): myLanguageParser {
        return new myLanguageParser(tokenStream);
    }

    protected parseTreeToAst(parseTreeRoot: MyLanguageRuleContext, considerPosition: boolean, issues: Issue[]): MyLanguageRuleContext | undefined {
        return new MyLanguageRuleContext().withParseTree(parseTreeRoot);
    }
}

The compiler was unhappy with several things, despite my MyLanguageParser being generated by the exact same version of antlr4ts -- this was fixed by changing the import to something like this:
import {Node} from "@strumenta/tylasu/src/model/model";
import {Issue} from "@strumenta/tylasu/src/validation";

It would be super helpful to have a Hello World example that isn't in the project's test cases, which may flush out issues with the experience from code that runs tylasu as a dependency.
Another major roadblock for integration is documentation. Some methods are documented, but some of the core types are not, which makes learning the API a bit of a struggle. Please consider documenting Node, NodeDefinition, Package, Origin, and all the types you might need to implement to get going.

We'll work on providing an hello world project.

Thanks! I would also add Parser to the list of types that could use more clarity on how to use.
For example, as an end user, it's not clear to me which of these methods is the right public method to "start with"?

It seems like some of the APIs are intended to be used in some order, but the order isn't clear to me (because I'm not great at DSLs). Maybe the library isn't meant for folks like me, which would be a fair answer -- but if it is trying to serve many different level users, maybe we could split this type into many types, with each having one clear public entry point? E.g.,
export class FirstStageLexer {
   lex(...) : SecondStageThing {

   }
}

With this model, it's very clear to the end user what their next step is, and what the result should be.
Looking forward to the hello world project!

There is indeed a problem with versions 1.1.x before 1.1.4 that supposedly made some dependencies optional but that was broken. So some classes would be unusable if you actually omitted those dependencies. I've now fixed that and we'll showcase it in the hello world app as soon as it's ready.

You all have made great progress in the hello world app, but I'm assuming you'll update this ticket when you feel like it's done? I'm happy to review and try to implement again when it's ready.

Hi, the hello world now is usable as a reference. It's still missing some more documentation, though. Is everything clear to you?
Regarding the parser API, it's supposed to be the same as Kolasu, but a few public methods slipped through when they should have been protected.
The method you're interested in is parse. lex and parseFirstStage are only there if you want to run only part of the parsing process, but they're not commonly used. The others should have been protected.

Unfortunately, it's not clear to me and I am struggling still with basics. That is definitely partly because of my limited experience in this domain, but also because there is no documentation on many of the core elements I'm supposed to be using (the ones listed above, and @Mapped, @Children, etc.  I am trying to work through it. =)

I think I got some simple code that should work, but I get this error that feels like it's not related to my code:
$ npm run build

><EMAIL_ADDRESS>build
> tsc -p .

node_modules/@strumenta/tylasu/dist/types/model/model.d.ts:48:9 - error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
  Type 'undefined' is not assignable to type 'Position'.

48     get position(): Position | undefined;
           ~~~~~~~~

Found 1 error in node_modules/@strumenta/tylasu/dist/types/model/model.d.ts:48

node: v16.14.2
npm: 8.5.0

Here is my tsconfig.json:
{
    "compilerOptions": {
      "target": "ES6",
      "module": "commonjs",
      "outDir": "out",
      "sourceMap": true,
      "strictNullChecks": true,
      "experimentalDecorators": true
    },
    "include": ["src", "test", "antlr-gen"]
  }

Closing because the main goal has been achieved. The hello-world project lives at https://github.com/Strumenta/tylasu-hello-world


(maint) Merge 5.5.x -> 6.0.x

Notes:

Puppet 6 should not require the pin for hashdiff since we support the following ruby versions:

2.5
2.4
2.3
jruby-<IP_ADDRESS>

The other conflict was for the docs that were that were deleted in Puppet 6.0.x, for example: https://github.com/puppetlabs/puppet/blob/5.5.x/man/man8/puppet-ca.8

CLA signed by all contributors.


[vite:build-import-analysis] Parse error with upper-case file-extensions

Describe the bug
build fails if (image-)file-extensions are in upper-case
Reproduction
https://stackblitz.com/edit/vitejs-vite-dhnjdh
Steps to reproduce

(vite.config.js:  build:{ minify: false, }  )
npm run build (npm run dev in reproduction also fails)

System Info
private/disclosed

Used Package Manager
npm
Logs

Click to expand!
$ npm run build

> build
> vite build

vite v4.4.9 building for production...
✓ 43 modules transformed.
✓ built in 235ms
[vite:build-import-analysis] Parse error @:5:114
file: /path/to/project/resources/images/favicon-16x16.PNG:5:113
IHD��asRGB���gAMA��
                   �a   pHYs���+▒▒IDAT8O��K�0
D�      ��y�k+`���Lpd>Q�$7����...
4: �l�*�a�.
5<EMAIL_ADDRESS>{�Ɇ������
         ��s���IEND�B`�
                                                                                ^
xterm-256colorxterm-256colorerror during build:
Error: Parse error @:5:114
    at parse$e (file:///path/to/project/node_modules/vite/dist/node/chunks/dep-df561101.js:16472:355)
    at Object.transform (file:///path/to/project/node_modules/vite/dist/node/chunks/dep-df561101.js:46579:27)

Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

I'm not seeing the same error as the logs shown in the stackblitz. I get this instead:
[vite]: Rollup failed to resolve import "/vite.svg" from "/home/projects/vitejs-vite-dhnjdh/main.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "/vite.svg" from "/home/projects/vitejs-vite-dhnjdh/main.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

Also I'm assuming this is a Linux-only error as the filesystem in case-sensitive by default? (The build pass for me on macos). However I think the issue could be that this regex doesnt have the i flag for insensitivity:
https://github.com/vitejs/vite/blob/1a2e5e6d9a6bb2531bf73be801c9778dbf39d51b/packages/vite/src/node/constants.ts#L133-L135

Closing as can't be reproduced.


[Feature] Support IoT Edge devices

[Feature request]
IoT Explorer should support IoT Edge devices. Can be done in multiple steps:

Show column in device list: "Edge: yes/no". Allow to filter on this column
Support showing modules (and module twins) from Edge devices

Hi @sebader ,
Thank you for opening the first issue in the repo!
The edge support is in our longer-term plan, as the current release majorly focus on Plug and Play scenarios (https://docs.microsoft.com/en-us/azure/iot-pnp/overview-iot-plug-and-play).
We will take your request into our future next milestone planning.
Best regards.

Hi @sebader,
Step 1 has been implemented in this new release https://github.com/Azure/azure-iot-explorer/releases/tag/v0.10.11 if you'd like to check it out, while step 2 is still further down the list.
We will close this issue for now, as eventually the tool should reach feature parity as the Azure IoT extension in Azure Portal.
Thanks for your input.


C/C++ intellisense not working with FileSystemProvider filesystem

VSCode Version: 1.25.0
OS Version: Windows 7 Enterprise

Steps to Reproduce:

install vscode-cpptools
install vscode-sshfs
configure c_cpp_properties.js includePath to use the ssh FileSystemProvider

vscode-sshfs works well for mounting remote directories, and editing files. However, intellisense fails to parse the files in these "mounted" directories. When I connect a remote directory as a workspace folder, I get an entry in my code-workspace setting that looks like this:
{
	"uri": "ssh://path_to_search/",
	"name": "SSH FS - itickers"
}

I added the folder to my c_cpp_properties.js like this:
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}",
                "ssh://path_to_search/"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "intelliSenseMode": "clang-x64"
             "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

Thanks. I'll followup with the extension engineer.
Cheers!

It seems that the author of the extension thinks that this is an issue should be fixed in VS Code... https://github.com/SchoofsKelvin/vscode-sshfs/issues/27

It's not an issue with the sshfs-extension but with the cpp-extension

A feature request is open to add support.
https://github.com/Microsoft/vscode-cpptools/issues/2268


IMPROVE: Make copying empty lines the default

Hi again,
this patch builds upon #127 and would enable the new copybutton_copy_empty_lines option by default. Do you believe this is reasonable?
With kind regards,
Andreas.

Closing because da08b04 was added to #127.


Add Microchip SAM D21/DA1 SCB peripheral

Add Microchip SAM D21/DA1 SCB peripheral (::picolibrary::Microchip::SAM::D21DA1::Peripheral::SCB).

[ ] The SCB class should be defined in the include/picolibrary/microchip/sam/d21da1/peripheral/scb.h/source/picolibrary/microchip/sam/d21da1/peripheral/scb.cc header/source file pair
[ ] The following SCB peripheral instances should be defined in the include/picolibrary/microchip/sam/d21da1/peripheral.h/source/picolibrary/microchip/sam/d21da1/peripheral.cc header/source file pair

[ ] ::picolibrary::Microchip::SAM::D21DA1::Peripheral::SCB0

[ ] Documentation

This peripheral will be provided by https://github.com/apcountryman/picolibrary-arm-cortex-m0plus.


Identify Palindromes

Ask user to enter a string, tell whether it is a palindrome Or not a palindrome
Note:Pallindrome is a word/number that remains the same when read from both ends
Eg :madam
Input:     madam
Output:  it is a palindrome.

Kasturi Mandlik.
I would like to work on this issue.

I am Arti Tambade.
I would like to work on this issue, Could you assign this issue to me?

I want to work on this issue.
Srushti Kage
UCE2022531
FY Comp


Faker

Assignee Tasks

[ ] added stock images WITH uniformed sizing
[ ] updated user security
[ ] updated product names!

Guidelines
After git pull origin master, run npm run seed and refresh browser to see all polish on app!
Your PR Notes Here
Hi team! I finalized the image sizes and names.

Amazing! I ended up just resizing all the images instead of playing with the component. This way they will be uniformed everywhere.


BUG: downcasting from complex in apply_unitary

The following code to multiply PauliY by the identity incorrectly casts the matrix representation of PauliY into the type of the input state (float):
import cirq
import numpy as np
from cirq import protocols

y0 = cirq.PauliString({cirq.LineQubit(0): cirq.Y})
state = 0.5 * np.eye(2)
args = protocols.ApplyUnitaryArgs(target_tensor=state,
                                  available_buffer=np.zeros_like(state),
                                  axes=(0,))
result = protocols.apply_unitary(y0, args)

gives
>>> print(result)
[[0. 0.]
[0. 0.]]

numpy correctly throws a warning about this casting, but this should really throw an error.

This feels like a case where the code should use the larger type.

Brought up again: Should just promote types as needed to complex.

Taking this.

Casting the types of target_tensor and available_buffer causes _incorporate_result_into_target to fail with the error:
    if not (
        np.may_share_memory(args.target_tensor, sub_args.target_tensor)
        and np.may_share_memory(args.available_buffer, sub_args.available_buffer)
    ):
        raise ValueError(
            'sub_args.target_tensor and subargs.available_buffer must be views of '
            'args.target_tensor and args.available_buffer respectively.'
        )

I don't know how to get around this so the solution i can think of right now is requiring that the types of target_tensor: np.ndarray and
available_buffer: np.ndarray be complex and fail otherwise.
Anyway, I will bring this up at the sync.


tabs / carousel content plugin

I was thinking of writing a tabs plugin (tabs as in https://getbootstrap.com/docs/4.0/components/navs/#tabs ). For this I would have to be able to somehow split the client rows so that it is clear what cells end up on what tab page.
What would you suggest as an approach here?

Tabs are difficult if you want to create and delete them with drag and drop offered by this editor - but you can obviously write a dialogue that allows creating/deleting tabs.

On 5. Sep 2018, at 16:16, Jauco Noordzij<EMAIL_ADDRESS>wrote:
I was thinking of writing a tabs plugin (tabs as in https://getbootstrap.com/docs/4.0/components/navs/#tabs ). For this I would have to be able to somehow split the client rows so that it is clear what cells end up on what tab page.
What would you suggest as an approach here?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Tabs in general is a good idea in my opinion! You can get some inspiration of how it could be done in https://github.com/ory/editor/tree/master/packages/plugins/layout/background . That plugin, (especially the gradient part) has some complex UI that I could easily imagine powering tabs.
However one side-note. We are likely going to improve the way plugins controls and rendering work in the upcoming weeks/months. If you want, you can check our this PR https://github.com/ory/editor/pull/587 . It will be a good change, but definitely a big change. So you might want to take that into consideration ;)

The new @react-page/create-plugin-materialui"package should make it easer to add a component with a custom dialog.
For this usecase i would probably create a layout plugin, where every tab contains a row. But we probably need some api to help creating new tabs.
I'll close this for now. @jauco if you still need help, feel free to reopen!


Manuscript on microCT scans & analysis of teeth

The manuscript itself was collaboratively written on https://www.manuscripts.io/ since I wasn't able to teach git to my co-authors in time, but the submitted copy was generated with manubot.

Thanks for adding your new manuscript.  If the thumbnail image isn't named thumbnail.png in your repository, it would need to be added as a line in metadata.yaml.  Or we can add back the thumbnail_url line here if that's easier.

If the thumbnail image isn't named thumbnail.png in your repository, it would need to be added as a line in metadata.yaml.

ah good catch. Yea I don't think the repo is setting the thumbnail. You can make it any image from the repo, but must specify in metadata as @agitter describes. Best to set on manuscript rather than here so it also works for other people sharing.

I don't think the repo is setting the thumbnail.

I did set it, but didn't git push it 😕
Now it should be all good: https://github.com/habi/zmk-tooth-cohort-method-manuscript/commit/16c3c7fff620746dfbdcde2c21b5423aca5be4f1

I don't see the thumbnail in the catalog, do you have to regenerate something that it shows up there?

yeah. CI is scheduling to run once per week. But I just initiated a rerun of the CI on the merged commit for this PR. So should show up soon.

amazing thumbnail

amazing thumbnail

Thanks!
I rendered an adapted version of one of the figures in the manuscript (done with MeVisLab especially for the thumbnail :)


204 Response when loading images from website

Hey,
Recently we started to get signals of images that were not loading on our websites. The weird thing is that accessing the image source url directly from the browser, everything works fine. The image is then also cached, after which it can be loaded by the webpage. After looking through the issues on this repo, I found this to be similar to issue #330.
Here is a screenshot of the request data when trying to load the image from the website:

And here is a screenshot of the request data when accessing the url same source url directly from the browser:

Repetition of #330
@kleisauke is looking into it now

Should be fixed now, could you verify this?

I've given it a quick look, everything seems to be fine now. Thanks for looking into it so quickly, it is very appreciated!


Update sf site info

adding host and location info for march 2024 nf-core hackathon in SF. Will add more logistical details later as needed.

@snafees Hey! Can you add my personal github account (@kpadm) as the reviewer instead of my work account? Thanks!

@nf-core-bot fix linting

Thank y'all! And sorry @kpadm!


Gutter causes column to wrap in MS Edge

Hi, I have my own compiled version of Bootstrap with modified settings. I need to set small gutter instead of 30px (in variables.less).
So when @grid-gutter-width = 4px, grid system doesn't work in some scenarios in MS Edge. Tried 6px or 0 and both works fine. But 4px is broken.
Example with gutter = 4px
https://jsfiddle.net/RaptorCZ/upx52moL/
Example with gutter = 6px
https://jsfiddle.net/RaptorCZ/1rdojhy0/
Simply set result window to be as wide as possible (to prevent breaks on lower viewport) and 2x click on 2nd panel to collapse and expand.
When gutter is 4px, 3rd label collapses under label 1. Why?
http://raptor.cestiny.cz/Temp/bootstrap_gutter_4.jpg
It is ok when gutter = 6px.
http://raptor.cestiny.cz/Temp/bootstrap_gutter_6.jpg

Hi @RaptorCZ!
You appear to have posted a live example (https://fiddle.jshell.net/RaptorCZ/upx52moL/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

line 6858, column 27: E042: .form-control cannot be used on non-textual <input>s, such as those whose type is: file, checkbox, radio, range, button
line 6870, column 27: E042: .form-control cannot be used on non-textual <input>s, such as those whose type is: file, checkbox, radio, range, button
line 6882, column 27: E042: .form-control cannot be used on non-textual <input>s, such as those whose type is: file, checkbox, radio, range, button

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)

Hi @RaptorCZ!
You appear to have posted a live example (https://fiddle.jshell.net/RaptorCZ/1rdojhy0/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

line 6857, column 27: E042: .form-control cannot be used on non-textual <input>s, such as those whose type is: file, checkbox, radio, range, button
line 6869, column 27: E042: .form-control cannot be used on non-textual <input>s, such as those whose type is: file, checkbox, radio, range, button
line 6881, column 27: E042: .form-control cannot be used on non-textual <input>s, such as those whose type is: file, checkbox, radio, range, button

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)

Errors fixed (I hope), problem persists :-)

Reposting to trigger revalidation:
https://jsfiddle.net/RaptorCZ/upx52moL/
https://jsfiddle.net/RaptorCZ/1rdojhy0/

@RaptorCZ Have you tested in non-Edge browsers?

Yes, IE 11, Chrome and FF works fine. Seems that only Edge is problem.
Maybe the problem has something to do with using -ms-overflow-style: scrollbar. Default behavior in Edge is -ms-autohiding-scrollbar.
Column wraps only when scrollbar is visible.

Any news on this, or any temporary workaround?

Bootstrap 3 is no longer being officially developed or supported.
All work has moved onto our next major release, v4. As such, this issue or pull request is being closed as a "won't fix." For additional help and support, we recommend utilizing our community resources. Thanks for your understanding, and see you on the other side of v4!
<3,
@mdo and team


set MTU size

Hi,
please add the ability to set the MTU size.
I have one client that can connect but the default mtu 1420 is too high for it's network (CGNAT).
I tried to include MTU: 1412 but in the log i can see that wg is starting with 1420.

Hi @photogeen , please try with this release: https://github.com/bigmoby/addon-wireguard-client/releases/tag/v0.2.1
I hope it could be useful for you


Validate sorting order for Referrer API

Resolves #205
Client-side sorting makes pagination useless. So client only verifies order but will not sort unordered results.
Signed-off-by: Wei Meng<EMAIL_ADDRESS>

Why does a client side sdk need to validate the sorting of the response? Will it give an opportunity to let the application layer skip the validation or ignore the error?

MUST is used in specification. So I think the error should not be ignored?

My understanding is the spec requirement should be honored by the producer who produce the data. I just try to understand the use case to enforce it on the consumer side, especially on a client side sdk.

MUST is used in specification. So I think the error should not be ignored?

My understanding is the spec requirement should be honored by the producer who produces the data. I just try to understand the use case to enforce it on the consumer side, especially on a client side sdk.
I don't notice other sdk (like storage, cosmosdb) to check the order of the response items so I'm a little curious about the practice.

Agreed. It looks like the spec does not require the client to sort or to verify the sorting results.

Make sense. The client-side sorting is not there in the spec.


[Ready for review] Add STRtree

Closes #9

There was some design decision to make here. I chose to let the GEOS strtree store a pointer to the actual GeometryObject, so that it can DECREF it before deallocation.
The other options would be copying the GEOSGeometry object at the strtree init, and destroying it on deallocation. I think this copy would give unwanted overhead.

@jorisvandenbossche  Do you know if there is any meaning to the order that is returned by tree.query? It might get inversed in my implementation.

There was some design decision to make here. I chose to let the GEOS strtree store a pointer to the actual GeometryObject, so that it can DECREF it before deallocation.
The other options would be copying the GEOSGeometry object at the strtree init, and destroying it on deallocation. I think this copy would give unwanted overhead.

Yeah, I don't know how costly cloning the GEOSGeometry would be. The increasing/decreasing of the ref count in the current code seems relatively straightforward (I am trying to think of cases where this could give problems, but not directly thinking of something).

Since there are probably good use cases of directly iterating over the geometries as well, it might make sense to return both? (eg with an option to toggle between both)

Looking at the code, that might not be that easy, as the object that is returned is actually inserted in the tree. So either you need 2 implementations the tree creation (creating code duplication), or either you need to convert the integer to the geometry in the query method (giving additional indexing overhead in case you only want the geometry)

@jorisvandenbossche  I took another shot at this. Now query returns the indices, which can be used directly on tree.geometries to get the geometries.
 So I defined a struct STRtreeElem that contains the index (for returning) and the geometry object (for garbage collecting).

Did a quick experiment with combining the STRTree with a contains predicate (1 million points /1 polygon), and here I get a speed-up of 2-3x by using a spatial index (assuming we have a "warm" tree): https://nbviewer.jupyter.org/gist/jorisvandenbossche/66d1d81935cf6084d77ae6d1158f6fae
In practice, it will of course depend a lot on the specifics (how many elements are be returned by the query (in this experiment it is 1%), how costly is the actual operation, ...). But this modest speed-up at least indicates it's not totally useless ;) (and there will be cases where it can be much more interesting)
One thing I noticed is that the first usage of the tree is actually very slow (more than 100x slower). It might be that GEOS only constructs the actual tree on first use? (not sure how I would otherwise interpret that)
If that is correct, it seems that creation of the tree is actually quite slow .. (outside of our control of course, but can limit practical usage)
Anyway, the current interface certainly seems to be useful / practical!

 So I defined a struct STRtreeElem that contains the index (for returning) and the geometry object (for garbage collecting).

Why is that? I understand from the C API that the caller remains ownership on the GEOSGeometry objects? Do we need to keep the geometries alive as long as the STRTree is alive?

One thing I noticed is that the first usage of the tree is actually very slow (more than 100x slower). It might be that GEOS only constructs the actual tree on first use? (not sure how I would otherwise interpret that)

You're correct, it gets constructed on the first query. There's one sentence in the docs from which you can derive that However, once the tree has been built (explicitly or on the first call to query), items may not be added or removed. (see https://geos.osgeo.org/doxygen/classgeos_1_1index_1_1strtree_1_1STRtree.html)

Why is that? I understand from the C API that the caller remains ownership on the GEOSGeometry objects? Do we need to keep the geometries alive as long as the STRTree is alive?

We can't ensure that the caller doesn't dereference the geometry array with which the STRtree is constructed. If that happens, we we get a crash. You need to keep references to the geometries on the tree object to solve this issue.

Hmm, it's a pity that a trigger to construct the tree is not included in the C-API (as I think it can be useful to control as a user when the tree gets build. So eg that you can do it in advance, and the first query will already be fast).

We can't ensure that the caller doesn't dereference the geometry array with which the STRtree is constructed. If that happens, we we get a crash. You need to keep references to the geometries on the tree object to solve this issue.

It seems that you both keep a reference to the array, and then also store each geometry of that array inside the tree. Is the first (keeping a reference to the array) not enough?
But to understand: so the geometries need to be kept alive as long as the tree exists?
I don't fully understand why that is. From the code, when inserting an item in the tree, it seems it only uses the envelope of the geometry, and for the rest does not store or reference it (https://github.com/libgeos/geos/blob/master/capi/geos_ts_c.cpp#L5939)

It seems that you both keep a reference to the array, and then also store each geometry of that array inside the tree. Is the first (keeping a reference to the array) not enough?
But to understand: so the geometries need to be kept alive as long as the tree exists?
I don't fully understand why that is. From the code, when inserting an item in the tree, it seems it only uses the envelope of the geometry, and for the rest does not store or reference it (https://github.com/libgeos/geos/blob/master/capi/geos_ts_c.cpp#L5939)

I did some tests, and it appears that you need to keep a reference to the geometry object until the first query has been executed. In no case I got a hard crash, worst case there are geometries missing from the result of the query. See below:
geometries = pygeos.points(np.arange(10), np.arange(10))
tree = pygeos.STRtree(geometries)
geometries[1] = None
tree.query(pygeos.box(0, 0, 2, 2))
>>> [0, 2]  # unexpected

geometries = pygeos.points(np.arange(10), np.arange(10))
tree = pygeos.STRtree(geometries)
tree.query(pygeos.box(0, 0, 2, 2))
geometries[1] = None
tree.query(pygeos.box(0, 0, 2, 2))
>>> [0, 1, 2]  # correct

Keeping the objects in the tree.geometries array is not 100% foolproof, as it could be changed inplace. But I think it is good enough, as long as we document that changing the array after constructing the tree will lead to bogus results (as is done in scipy.KDTree)>

But I think it is good enough, as long as we document that changing the array after constructing the tree will lead to bogus results

That sounds good to me as well

So the problem is that it is failing with creating/querying the tree if it was empty (not geometries or all None), and for older GEOS?
It might be this is a bug in GEOS that was fixed?
We could maybe return try to detect this case and return an error in that case when creating the tree? (eg keep a counter while inserting into the tree, and raise an error if the counter is 0 ?)

I did the work already to keep track of the count, only forgot to put the logic in place at the query()
Will have a look next time around (might take a while- feel free to wrap this up)

Ah, yes, I see there is already a count. Yep, I can wrap this up.
But do we always want to raise an error for an empty tree? Or only for older GEOS versions? Always is the easiest, but it could be useful to have it also work for empty trees (with recent GEOS it does the right thing).

I think it is best to return an empty array (of the correct type) when the tree count is zero. Checking the count is very cheap so I would not make a version conditional there.

Ah, I missed that as well ;) You are already using the count to return this empty array. OK, yes, that's a much better solution!

It turned out you already had everything in place, but it was not used because the count was not initialized ..

This is all green now. So going to merge! (we can always further refine with follow-up PRs if needed)


docs: add analytics script to mcap.dev

See it added to every page by visiting the preview site and viewing source.

For future reference, down here:

The link at Details should take you here
in the source:

Oh, I think maybe it just hadn't finished building then. Some of the pages-* were still pending.


[0.16] "branches of this case produce different types of values" compiler crash on windows

Compiling this with the 0.16 alpha 3 compiler crashes on windows
Code:
import Html exposing (text)

main =
  let
    x = 5

    s = case x of
      5 -> { name = "Hello, World!", nr = 42 }
      7 -> { nme = "Seven", nr = 7 }
      _ -> { name = "Dunno", nr = 0 }
  in
    text s.name

Error:
The 1st and 2nd branches of this `case` produce different types of values.

12│         case x of
13│       5 -> { name = "Hello, World!", nr = 42 }
14│>      7 -> { nme = "Seven", nr = 7 }
15│       _ -> { name = "Dunno", nr = 0 }

The 1st branch has this type:

    { elm-make.exe: <stderr>: hPutChar: invalid argument (invalid character)

On Mac, it prints { …, name : … } so I suspect Windows does not like the single-character ellipses.
This example also looks pretty bad on elm-lang/try (special port) because the various text color encodings are getting escaped into the HTML.

@phouchguk Which language and encoding settings do you have on windows? We have seen issues in the past with non-utf8 windows systems.

@laszlopandy It's English (United Kingdom). I had no issues with the 15.1 compiler on this same machine.

@laszlopandy Ok I've researched around and if I change the code page in the command prompt with 'chcp 65001' I no longer get the compiler error but some of the symbols still look strange (ellipses is ok, just after the ellipses and where it denotes the line number). That'll be the font I guess.  Do we really need to use Unicode chars in the compiler messages? I'd use linux at home but I'm trying to push Elm at work. Is this a barrier to entry for Windows users?

Aww, that is a shame. I figured the ellipsis would be a character that wouldn't be too crazy.
I want to release it and see how many folk show up with this problem. If it is a lot, we can do ... instead.
@phouchguk, what was the link you found that suggested the chcp 65001 command? What is that doing? The more we know about your setup, the easier it will be to figure out if this is a systematic issue.

@evancz I think this was the link https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how. I'm by no means a unicode on Windows expert! As far as I know my Windows settings are standard UK. I've used the pre-compiled windows binary for 0.16. The compiler crashes as above if i run elm make in node command prompt or git bash. If I run the chcp 65001 command the compiler doesn't crash but the output is still slightly mangled.

Lame! I'm testing what it looks like with ... and it looks worse, but acceptable.
Okay, can you say more about what "slightly mangled" means? Can you just put what you are seeing directly into this thread to check if there are other problems?

-- TYPE MISMATCH ------------------------------------------------------ Main.elm
The 1st and 2nd branches of this case produce different types of values.
7│��         case x of
8│��       5 -> { name = "Hello, World!", nr = 42 }
9│��>      7 -> { nme = "Seven", nr = 7 }
10│��       _ -> { name = "Dunno", nr = 0 }
The 1st branch has this type:
{ …��, name : …�� }

But the 2nd is:
{ …��, nme : …�� }

Hint: I compared the record fields and found some potential typos.
name <-> nme

Hint: All branches in a case must have the same type. So no matter which one
we take, we always get back the same type of value.
Detected errors in 1 module.
This is after I've run the chcp 65001 command. I'm away now until the morning (for me). Cheers.

Interesting! I am actually using some unicode box-drawing characters to do the vertical bars, so it looks like you get the question marks after non-ascii things now. What is cool is that the vertical bar worked in the original message!
I use these box characters (along with some arrows) for error messages for cyclic dependencies. I'm going to give you a test program in one second, hold on!

Okay, what do you see when you compile this program with alpha3?
type alias Comment =
  { message : String
  , upvotes : Int
  , downvotes : Int
  , responses : Responses
  }

type alias Responses = List Comment

Most importantly, can you show it with and without chcp 65001? I think it should work without but would like to make sure.

Without I get the same error:
-- ALIAS PROBLEM ---------------------------------------------------- Cyclic.elm

This type alias is part of a mutually recursive set of type aliases.

1│>type alias Comment =
2│>  { message : String
3│>  , upvotes : Int
4│>  , downvotes : Int
5│>  , responses : Responses
6│>  }

The following type aliases are mutually recursive:

┌─────┐
│    Comment
│     elm-make.exe: <stderr>: hPutChar: invalid argument (invalid character)

With chcp 65001 I get:
-- ALIAS PROBLEM ---------------------------------------------------- Cyclic.elm

This type alias is part of a mutually recursive set of type aliases.

1│��>type alias Comment =
2│��>  { message : String
3│��>  , upvotes : Int
4│��>  , downvotes : Int
5│��>  , responses : Responses
6│��>  }

The following type aliases are mutually recursive:

┌��─��─��─��─��─��┐��
│��    Comment
│��     ↓��
│��    Responses
└��─��─��─��─��─��┘��

You need to convert at least one `type alias` into a `type`. This is a kind of
subtle distinction, so definitely read how to fix it and have great
code:<https://github.com/elm-lang/elm-compiler/blob/0.16.0/hints/infinite-alias.
md>

Detected errors in 1 module.

This is with the build you posted to elm-dev in Oct. I don't know how to get a build that incorporates #1174 changes...

Okay, I am switching the arrows to be roughly this:
|
V

so it'll work for everyone. Thanks again for reporting this. Any negativity you are sensing from me is directed at windows for taking away my precious arrows and dots!

I sensed no negativity :) I lold at the issue title. Elm is a revelation to me. I'm on my second production Elm app (production means windows at my job :( ). Thank you for your hard work. Let me know if you need me to test a build or anything. Cheers.


fix(planning): add boolean field so that it can distinguish if the ego will stop

Description
Add boolean field so that it can distinguish if the ego will stop.

Tests performed

[x] PASS CI

Effects on system behavior

Nothing.
Interface changes

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

create another msgs in tier4_planning_msgs.


Fix: google analytics

fix: Google Analytics

Thanks for your contribution, I've tested it and it works perfectly.
Merged.


https://github.com/HardingPoint/jsftp  404

Package.json must be updated to get JSFTP with an other url.

Apologies, think that reference was archived by mistake. Will take care of this in a few hours and let you know.

hi any updates on this ?

Looks like the Node-RED package manager is still using the old package files. Any plans to fix this, or any tips for getting around it?

My apologies team did not publish update to NPM. Can you all please test now let me know if you have any issues.

Looks good. Thanks!

Great, let me know if you have any issues. Going to close this out.


Add shaderc bindings

Summary of the PR
Adds Shaderc bindings
Related issues, Discord discussions, or proposals
Closes #482

this looks good. whats it waiting on?

Native libraries, i have the Zig build script to do this, i just need to hook it up to our CI, and i have not found the time/energy to do so yet
build.zig.txt

Due to broken CLA check, merging manually


🐞 Bug: Code Redundancy in comments thread view.

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug

Previously the position of add comment button was decided by the order in which comments were sorted
:l (latest comment first)
but now it is placed always at the top but the code was not removed.
Steps To Reproduce

Go to app/views/commentator/threads/_show.html.erb
Examine Line No. 74

Expected Behavior

We can remove the conditions since add comment button will always be on top.
Screenshots
No response
Device Information [optional]
- OS:
- Browser:
- version:

Additional context
No response
Are you working on this issue?
Yes

Hey @tanmoysrt  i would like to work on this can you please assign this to me.

Hi @senbo1 you can work on the issue


next update

Documentation update
MySQLRepository and BinLogSocketConnect extract to interfaces
BinLogSocketConnect exception set as const
register slave use now hostname and port to be correct display in "SHOW SLAVE HOSTS"
dbname removed from configuration as is no more in use
added foreign keys info to events

Hi,
The original query for foreign keys information from this commit: https://github.com/b3k/php-mysql-replication/commit/d390cc01d3d35b891182c37af80d47f460b9f4c8 is quite faster (30-50x, tested on database with ~ 1200 tables). It's a little bit more complicated, but it's worth from performance POV. I suggest to change it to original form with subquery.
P.S. It would be nice next time to ask for pull request, not to copy the code. We're in the middle of developing and deploying our own tool and this is why we didn't try to merge it right now. Thx


C++ Tensorflow is very slower than Python Tensorflow

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
TensorFlow installed from (source or binary): source
TensorFlow version (use command below): 1.14 and 1.13
Python version: 3.6.8
Bazel version (if compiling from source): 0.21.0
GCC/Compiler version (if compiling from source): VC 14 (VS 2015)
CUDA/cuDNN version: 10.0/7.4
GPU model and memory: RTX 2080

Describe the current behavior
I exported a .pb graph file. I use it in python and it took 55 milliseconds to process. I also use it in C++ (both pre-build versions and self-build from source) it took 750 milliseconds. Everything is same!
Describe the expected behavior
both python and C++ take 55 ms to process.
Other info / logs
I build C++ API with below command:
bazel --output_user_root="C:/bazel/our" build -c opt --copt="-mavx" --config=opt --config=cuda //tensorflow:libtensorflow_cc.so then rename .so to .dll and .so.ifso to .lib
in #3471 (https://github.com/tensorflow/tensorflow/issues/3471#issuecomment-234671300) mentioned to add -c opt flag with --copt=-mavx. but it didn't make any difference. Also I found tons of warning as:
cl : Command line warning D9002 : ignoring unknown option '-mavx'

@concretevitamin would you please help?!

@fmmohammadi ,
Thanks for reporting the issue ,Can you share a standalone code to reproduce the error reported here?Thanks!

@fmmohammadi ,
Thanks for reporting the issue ,Can you share a standalone code to reproduce the error reported here?Thanks!

Thanks for your consideration. Actually this is not a error that may crashing the program. It is a performance bug. BTW, here is a sample code:
First include tensorflow:
#include "tensorflow/cc/ops/const_op.h"
#include "tensorflow/cc/ops/image_ops.h"
#include "tensorflow/cc/ops/array_ops.h"
#include "tensorflow/cc/ops/standard_ops.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/graph/default_device.h"
#include "tensorflow/core/graph/graph_def_builder.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/init_main.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/util/command_line_flags.h"
#include "tensorflow/cc/ops/io_ops.h"
#include <tensorflow/core/protobuf/meta_graph.pb.h>

Next,  Load the freez graph (.pb file) and create a session:
GraphPath = "../model.pb";
tensorflow::SessionOptions options;
tensorflow::ConfigProto & config = options.config;
config.mutable_gpu_options()->set_allow_growth(true);
tensorflow::Status status;
status = tensorflow::NewSession(options, &session);
if (!status.ok()) {std::cout << "error: " << status.ToString() << "\n";}
tensorflow::GraphDef graph_def;
status = ReadBinaryProto(tensorflow::Env::Default(), GraphPath, &graph_def);
if (!status.ok()) {std::cout << "error: " << status.ToString() << "\n";}
status = session->Create(graph_def);
if (!status.ok()) {std::cout << "error: " << status.ToString() << "\n";}

Then, load video frames with OpenCV and copy cvMat to a Tensor:
char VIDEO_FILE[] = "../data/Video.asf";
VideoCapture capture;
capture.open(VIDEO_FILE);
if (!capture.isOpened()) {throw "Error when reading VIDEO_FILE";}
Mat frame;
capture >> frame;
if (frame.empty()) {throw "Error when reading FRAME";}
Tensor Img_ten(tensorflow::DT_FLOAT, tensorflow::TensorShape({ 1, 3, height_des, width_des }));
CopyCvImage2Tensor(frame, Img_ten); //this function copy image to above tensor successfully!

Finally, run the session:
//input and output name. all is correct!
string input_layer = "input:0";
std::vector<string> output_layer = { "output:0", "output:1", "output:2",  "output:3", "output:4", "output:5", "output:6", "output:7", "output:8" };
std::vector<Tensor> net_out;
Status run_status = session->Run({ { input_layer, Img_ten } }, output_layer, {}, &net_out);
if (!run_status .ok()) {std::cout << "error: " << run_status .ToString() << "\n";}

Here, the final section (running session), with python tensorflow take about 50 to 60 milliseconds but with C++ tensorflow (which build with parameters as mentioned above) take about 700 to 720 milliseconds. about 12x slower!!!
Also, here is the python code:
import tensorflow as tf
tf_graph = self.load_pb('../model.pb')
sess = tf.Session(graph=tf_graph)
output_tensor = ["output:0", "output:1", "output:2",  "output:3", "output:4", "output:5", "output:6", "output:7", "output:8"]
input_tensor = tf_graph.get_tensor_by_name('input:0')
ret, frame = cap.read()
IMAGE_tensor = copy2Tensor(frame)
output_tf = self.sess.run(output_tensor, feed_dict={input_tensor: IMAGE_tensor})

Both are same version of tensorflow and run on RTX 2080. both allocate about 7GB memory of GPU but the main difference is than python API utilize about 40% of Cuda whereas C++ API utilize about 5% of Cuda in Performance tab of Task Manager (or even with nvidia-smi.exe). I think this is the cause of this performance bug. But I don't know what is the solution?!

@ymodak no idea?

Can you attach your .pb file as well?

Was this resolved later? I encountered the same problem.
@ymodak
@fmmohammadi

Was this resolved later? I encountered the same problem.
@ymodak
@fmmohammadi

Try rebuild tensorflow with mkl support
also make sure that the debugger of VS is not activate during running (even in release mode)


Interactive CLI describe input from terminal

The CLI currently allows for a file to be read into the cli and the iso8583 message to be described.
I would like to run the cli as an interactive session. Could we add a -i for interactive or -interactive
➜ ./bin/iso8583 -i describe -spec spec87ascii
➜ message: 0200323A40010841801038000000000000000004200508050113921208050420042251320720000010000001156040800411<PHONE_NUMBER>3156336000299

ISO 8583 Message:
MTI.............................: 0100
Bitmap..........................: A2380000008000000400000000000000
Bitmap bits.....................: 10100010 10100010 10100010 10100010 10100010 10100010 10100010 10100010
001 Processing Code.............: 000001
011 System Trace Audit Number...: 005835

➜ message:

This has been added.
https://github.com/moov-io/iso8583#cli


Check if current object belongs to selected region

Right now there is no decorator or other measure to check if an object belongs to the currently selected region.
e.g. there is a POI (id: 42) for region 1, and there is a user in region 2 who is allowed to edit POIs, this user can now go to /region-slug-2/pois/language/42/edit and change the content of the POI that actually belongs to region 1.
This is probably also true for events and pages (I did not verify this yet).

I'm not aware of any of Django's inbuilt principles which could enforce this:

Context Processors can only inject variables into the template context
Middlewares can only modify a request object in place
Model Managers do not have access to the current request

So, I see three options here:

We use one of these two statements every time we retrieve objects from the database:

Page.objects.get(id=page_id, region=current_region)
current_region.pages.get(id=page_id)

In this case, we'll always have the risk of making mistakes in the future by using the current syntax  Page.objects.get(id=id) - maybe another CircleCI job can check our code base for insecure calls without a region keyword? Sounds like messy regex-magic...

We install the dependency django-crequest, a middleware which passes the current request to a global scope:
class RegionPageManager(models.Manager):
    def get_queryset(self):
        current_region = Region.get_current_region(CrequestMiddleware.get_request())
        return super().get_queryset().filter(region=current_region)

This manager can then only be used from within views and won't work on the command line etc.
Also, the separation of models from the current request in Django was done on purpose, so this is definitely a suboptimal solution.

We install the dependency django-scopes which does exactly what we want:
from django_scopes import scope

with scope(region=current_region):
    Page.objects.get(id=page_id)

But this also comes which a few caveats, e.g. the default admin backend does not work anymore and testing gets more complicated in the future.

Does anybody have opinions on this?

In our call, we concluded that we favour solution 1 and do not want to interfere with the Django core too much. To minimize the risk of mistakes, we add a check to our CircleCI pipeline.


Add Partial Delta Lake Support for Databricks 13.3

This pull request aims to introduce support for Delta Lake on Databricks 13.3, enabling enhanced data management capabilities within the Databricks ecosystem. The integration of Delta Lake is essential for ensuring robust data handling and efficient data processing functionalities.
Known Issues:

There is identified code duplication, which will be resolved through the introduction of shims or a similar mechanism, as part of addressing issue 9643. This approach will streamline the codebase and ensure efficient management of shared functionalities.
Some integration tests are failing that will be addressed in future PRs. They are xfailed in this PR

Changes Made:
Delta Lake Integration: The PR includes the necessary modifications to seamlessly integrate Delta Lake functionality into the Databricks 13.3 environment, allowing users to leverage advanced data management features such as version control and transactional capabilities.
Contributes towards issue 9175

build

premerge will fail until a fix for #9681 is posted

Build

build


Sass variable table overlaps the preview demos

Seems the sass variable table is overlapping the device preview.

Closing as a duplicate of https://github.com/driftyco/ionic-site/issues/867


[YARN-6478] Fix a spelling mistake

Fix a spelling mistake in FileSystemTimelineWriter.java.
The "writeSummmaryEntityLogs" should be "writeSummaryEntityLogs".
https://issues.apache.org/jira/browse/YARN-6478

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
0
Docker mode activated.

-1
patch
14
https://github.com/apache/hadoop/pull/212 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.

Subsystem
Report/Notes

GITHUB PR
https://github.com/apache/hadoop/pull/212

JIRA Issue
YARN-6478

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-212/1/console

versions
git=2.7.4

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.


Option to use Nerd Font in place of Powerline Font.

I am requesting a feature to switch between Nerd Font and Powerline Font by using some variable like SPACESHIP_PROMPT_FONT in the .zshrc.
# To chose Nerd Font
SPACESHIP_PROMPT_FONT="nerdfont"

# To chose Powerline Font
SPACESHIP_PROMPT_FONT="poweerline-font"

I would like to suggest nerd font because it has rich collection of icon and symbols for example

Related matchai/spacefish/issues/177

Not the solution you're talking about, but you can set this up for yourself pretty easily: set your terminal app to use the font of your choice and then in your zshrc, below where Spaceship is loaded, redefine any symbols, e.g.
SPACESHIP_RUBY_SYMBOL="<your character>"

I can also recommand icons-in-terminal which allows you to use most of the iconic fonts (powerline, devicons, octicons, etc. (if you re-build it, you can add the one you wants I think)) without requiring to change the font of your terminal !

Section symbols are personal to every users. We define a standard set of icons for each section and users are free to customize them as they wish. Multiple icon configurations would also make it difficult to get on consensus which icon to bundle for each section.
That's my take on it, I'll leave the final call to @denysdovhan

For what it's worth:
I started using spaceship-prompt (which is stellar btw) recently and already had MesloLGS NF installed and I haven't seen any display issues yet inside VSCode terminal, Terminal (Mac) or iTerm2 all of which look similar to:

I have seen some glitch using that same font and other Hack Nerd Fonts in Alacritty and Hyper Term like:

MacOS Monterey Version 12.1 Beta (21C5039b)
Fonts used appear in Font Book without any visible warnings
MesloLGS NF fonts downloaded like so:
curl -fLo "${HOME}/Library/Fonts/MesloLGS-NF-Regular.ttf" --create-dirs https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
curl -fLo "${HOME}/Library/Fonts/MesloLGS-NF-Bold.ttf" --create-dirs https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
curl -fLo "${HOME}/Library/Fonts/MesloLGS-NF-Italic.ttf" --create-dirs https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
curl -fLo "${HOME}/Library/Fonts/MesloLGS-NF-Bold-Italic.ttf" --create-dirs https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf

If I could find a way to get Alacritty looking like VSCode/Terminal/iTerm2. But I'm to too worried about it personally.

If I could find a way to get Alacritty looking like VSCode/Terminal/iTerm2.

Because edit messages were a mistake when GH changed it, I'm just going to leave this here again unedited. 😆

If I could find a way to get Alacritty looking like VSCode/Terminal/iTerm2. But I'm to too worried about it personally.

... would be a happy camper. 🏕  ...not too worried*


Stop setting an id on the styleElement used with CSS font-loading

This is yet another small piece of clean-up of the FontLoader-code, since we've not used this id-property for anything ever since PR #6571 (which landed almost seven years ago). Furthermore, by default we're also not even using that code-path now since the Font Loading API will always be used when available.
Please note: This is tagged [api-minor] since it's technically observable from the outside, however no user ought to be directly interacting with these CSS font rules.

/botio test

Nice find!


build cross toolchain: use https:// URL

hm.. what is a blocker for this minor change, that holds it since May?

@swift-ci please smoke test


"Join" button instead of "Ask to join" for public lobbies

Is this a feature worth considering? This would be useful for matches where a room is a public lobby or a public server and it's not necessarily useful to ask for permission to join.

Thanks, that clarifies it more! In my case I've already started adding some settings for that just like you said; ignore all requests, accept all requests.
Also, I don't exactly know what the difference is between DISCORD_REPLY_IGNORE and DISCORD_REPLY_NO, which one would be more appropriate to use in the case of automatically dropping all requests?

They, uh...do the same thing right now. We should probably either deprecated one, or make no an instant denial rather than them waiting for the timeout (which is what currently happens). :ablobsweats:

https://github.com/discordapp/discord-rpc/issues/175


Artefacts spawns after some time and multiply till all screen will be light grey.

All games and SteamVR black world
Description

Artefacts spawns on my screen after some time of playing and how far in game the worst is. And at the end is grey screen. To repair it for some time I need to restart SteamVR client on Quest 2.
i don't have screen of full grey because the flashing artefacts makes me puke.
The artefacts progression.

BTW I have a router dlink DIR-2150 with 1.7Gbps transfer

General Troubleshooting

[X] I carefully followed the instructions in the README and successfully completed the setup wizard
[X] I read the ALVR Wikis here and here

Environment
KDE Plasma because Steam said on it normally works SteamVR ( and settings window works - and that's true )
Hardware
Note: for Linux, an upload to the hw-probe database is preferred: hw-probe -all -upload
https://linux-hardware.org/?probe=3911bdd51d
CPU:
i9-9900K
GPU:
GTX1070
GPU Driver Version:
nvidia-driver-535
Audio:
IDK
Installation
ALVR Version:
20.1.0
ALVR Settings File:
IDK
SteamVR Version:
1.27.2
Install Type:

[x] Packaged (exe, deb, rpm, etc)
[ ] Portable (zip)
[ ] Source

OS Name and Version (winver on Windows or grep PRETTY_NAME /etc/os-release on most Linux distributions):
Ubuntu 23.04

Okey, IDK why I was turned on a bitrate limmiter.


Not able to import any assets.

Not able to import any 3d models except FBX. Game studio is not even showing any errors/warnings. Just keeps quite. I am using the latest version: <IP_ADDRESS>-beta02-0635
Very unstable product.

Well I'm not an developer but comments like very unstable product are not for GitHub issues. Keep that for yourself or go to the Forums/Discord.

@oschakravarthi Does installing latest Visual C++ x64 redist helps?
Here is the link: https://aka.ms/vs/16/release/vc_redist.x64.exe

Duplicate of #465. Will be part of next release.

Should be fixed in latest beta (674)


Authenticate mongoserv

Current coverage is 83.05% (diff: 66.66%)

Merging #248 into master will decrease coverage by 7.70%

@@             master       #248   diff @@
==========================================
  Files             6          4     -2
  Lines           552        484    -68
  Methods           0          0
  Messages          0          0
  Branches         88         82     -6
==========================================
- Hits            501        402    -99
- Misses           34         64    +30
- Partials         17         18     +1

Powered by Codecov. Last update 485db65...ee3ad44

Coverage went down because we removed covered lines of code, but did not create any new misses.

Can you also add a note in the api_changes folder?
Something like
API: remove mds.commands & mds.api + add auth

Remove the singleton based API to metadatastore, use MDS / MDSRO instances instead
require auth when connecting to mongo by default

Good to go

@arkilic Can you please fix the bluesky (and I think ophyd) tests that will be broken by these api changes and update https://nsls-ii.github.io/fresh-installation.html with directions on how to set up authentication on the mongo server?
Why do we need an auth flag?  It would be simpler to just check if a username/password are included in the config?

Will do, I just need a day long detox from travis.
The flag is to be able to efficiently toggle between authenticated and open shells. I don't like the idea of just checking for username/pwd since someone can easily forget to populate these fields even when they're required.

@tacaswell This means we don't need to fix the databroker tests?

Did you link to the wrong thing?  That was my attempt to pre-emptively fix the bluesky tests.

Nope, the link is fine. Talked to @danielballan offline yesterday, the confusion is resolved.


Add warning: updating privacy policy

and terms of service:
https://ec.europa.eu/info/law/law-topic/data-protection/reform/rules-business-and-organisations/principles-gdpr/what-data-can-we-process-and-under-which-conditions_pt

https://ec.europa.eu/info/law/law-topic/data-protection/reform/rights-citizens/how-my-personal-data-protected/how-should-my-consent-be-requested_pt

https://ec.europa.eu/info/law/law-topic/data-protection/reform/rules-business-and-organisations/principles-gdpr/what-information-must-be-given-individuals-whose-data-collected_pt

#67


teams: vendor in new teamchain test vectors

FYI @heronhaye, just vendoring in the test cases you took a look at earlier

CI was taking close to an hour, going to merge without it.


Vithu changes to entities and files in MongoDB

Motivation and Context
To better align our code with what we want our entities to do and look like.
Your Changes
Restructuring of our entities to align with what we've discussed in our meetings. Substantial changes to the construction of Claims and Forms. Additionally, edits made to the createClaim Method (in DAO) to allow for automatic claimId generation by adding 1000 + # of claims in repository + 1 and calls to the new createLCInfoRequestForm method (in DAO). Now whenever createClaim is called, it creates a new claim object whose claimID is placed into the Database and the respective Client's claimsList, and a new LCInfoRequest form is created. In the creation of the new LCInfoRequest form (by means of the createLCInfoRequestForm method in the DAO), a formId is generated by adding # of forms in repository + 1. The generates a 'blank' form object that is added to the DB and whose formId is placed in the respective claim's list of forms.
**** Note that in order for this change to work, I had to change the files that are in the DB so your UseCases may currently run into error due to this.
I created a TestCreateNewClaimController to check that creation of new claim works (and it does!). You can try to run the controller on your end to verify but if you look in the DB you will see two claims in the claims collection and two forms in the forms collection generated by this controller call. The claimIds are placed in the respective client's list of claims.
Type of change (select all that apply):

[x] Breaking change (fix or feature that would cause existing functionality to change)

Notes for Reviewer
Please pull and run application as normal. You should be able to access the urls as indicated in the controllers. You can make a request through postman at localhost:8080/claims/new. I have attached a screenshot of my post request as well as the resulting objects in the DB.
Post Request

Claim Collection

Client Collection

Form Collection

Questions and Comments (if applicable)
Let me know what issues you find!
Checklist

[x] I have performed a self-review of my own code.

Nothing happens when I run FlexApplication and attempt to activate the TestController (I go to http://localhost:8080/claims/new and receive this error:

though http://localhost:8080/claims works as intended:

Postman also isn't working (I apologize if i'm doing something blatantly incorrect--this is my first time using postman):

Issues that Ben had were resolved. Small updates were pushed to branch. Ready to merge


Auto Switching Camera

Description
A quick way to mark multiple instances of objects as a camera. Set the target object and the cameras will automatically switch between all the instances of the camera object present in the scene to follow the target object.
How to use the extension
Right now the extension just contains one action.
It asks for the
"Camera Object" : The object that is gonna play as a camera. Place the instance of this object wherever you want to have a camera in the scene. These object instances will be auto-hidden.
"Target Object": The object that the Cameras are going to focus on.
"Switching speed" : Travel speed of the camera between the positions in mili-seconds
Checklist

[X] I've followed all of the best practices.
[X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
[X] I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?
Reviewed
Example file
Auto Switching Camera.zip
Extension file
Switching_camera.json.zip

@PihRealms You never addressed the issue raised by the bot. Are you still willing to submit your extension? If we do not hear from you, we'll assume you have abandoned the extension and close the submission. Please follow the bots instructions or create a new submission with the issue fixed.


Refactor LLM interfaces to prepare for multi-modal models

(discussion started in #410 and email)

I started looking at the chat vs. non-chat interfaces, beginning with OpenAI. These days, all OpenAI API calls are supposed to go through the chat endpoint -- see https://platform.openai.com/docs/guides/text-generation (the old non-chat endpoints are just for legacy models).
We can remove duplication stemming from these interfaces having overlapping but incompatible signatures:
// LLM is a langchaingo Large Language Model.
type LLM interface {
    Call(ctx context.Context, prompt string, options ...CallOption) (string, error)
    Generate(ctx context.Context, prompts []string, options ...CallOption) ([]*Generation, error)
}

// ChatLLM is a langchaingo LLM that can be used for chatting.
type ChatLLM interface {
    Call(ctx context.Context, messages []schema.ChatMessage, options ...CallOption) (*schema.AIChatMessage, error)
    Generate(ctx context.Context, messages [][]schema.ChatMessage, options ...CallOption) ([]*Generation, error)
}

As it is right now, a single type can't implement both, so everything is duplicated. Also, the LLM interface is unsuitable for multi-modals because it takes a string. This may require quite a bit of breaking interfaces, unfortunately.

There's another interface that seems related, with a somewhat similar signature:
// LanguageModel is the interface all language models must implement.
type LanguageModel interface {
	// Take in a list of prompt values and return an LLMResult.
	GeneratePrompt(ctx context.Context, prompts []schema.PromptValue, options ...CallOption) (LLMResult, error)
	// Get the number of tokens present in the text.
	GetNumTokens(text string) int
}

Unless I'm mistaken, it seems to only be used in in chains.

The idea of the main refactoring is to create a new interface for multimodal LLMs, with a single method, name TBD (could be Complete or Call or Generate, etc). The name of the interface is TBD as well (could be LLM, or MultiModal or maybe just Model?)
Looking at some of the backends that will end up being the most popular:

OpenAI: the API takes an array of messages, each one with a role and an option type that can specify text an image (as a URL).
Ollama: the API currently takes a single text prompt, but potentially an array of accompanying images, base64-encoded
Google's new generative AI: the SDK takes a slice of "parts", each part can be a text message or a binary blob (for images) etc.

All these can potentially be extended in the future with additional types of messages (videos, etc), and all are also (theoretically) able to return a sequence of multi-typed responses.
Therefore, the main interface should look something like this (once again, names TBD):
type Model interface {
  GenerateContent(ctx context.Context, params []*Param, options ...CallOption) (*Response, error)
}

Chat interfaces and various convenience wrapper (e.g. extract only the first response from a call, or some simple param combinations) can be built on top of this interace.
The work plan should be:

First define the interface and implement this method for all current LLMs; for the common ones we can implement it, for the more obscure ones we can just use it to call another underlying method for now and leave it to implementers to complete.
Implement chat on top of this new interface
Remove the existing LLM and ChatLLM interfaces. If we decide to name the new interface or its method in a way that conflicts with existing interfaces, we can give it a temporary name while working on the refactoring and then rename it after these are removed.

@tmc LMK what you think about this plan, and the naming. For naming, the names in the sample above seem good to me (Model for interface and GenerateContent for the method) because they clearly convey the goal and don't conflict with current methods/interfaces, which will make the transition easier. But I don't feel strongly about naming.

That plan sounds sensible to me and I'm comfortable with that proposed interface.

Update: the Model interface can now cover pretty much everything LLM and ChatLLM can, plus more (multi-modal inputs!)
One thing that's missing is functions support; that said, functions are currently deprecated in OpenAI - tools is the new way (#507)

Building on all the work in this issue, https://github.com/tmc/langchaingo/pull/521 is the big PR to finalize the refactoring (*)
The main interface to LLMs is now:
type Model interface {
	// Call is a simplified interface for Model, generating a single string
	// response from a single string prompt.
	//
	// It is here for backwards compatibility only and may be removed in the
	// future; please use GenerateContent instead.
	Call(ctx context.Context, prompt string, options ...CallOption) (string, error)

	// GenerateContent asks the model to generate content from a sequence of
	// messages. It's the most general interface for LLMs that support chat-like
	// interactions.
	GenerateContent(ctx context.Context, messages []MessageContent, options ...CallOption) (*ContentResponse, error)
}

The Call method is left for backwards compatibility so we don't break too many clients early on.
I recommend releasing a new version of langchaingo once this lands and then updating the examples to use GenerateContent directly. In a later release we can remove the legacy Call method
(*) minus some small cleanups that will follow up later


Request: Create a new branch based on a remote branch

Please, add git checkout --track <remote-branch>
Thank you.

I'll start on it let me know

do you guys still need to add this? i can take it.


No returning error on UploadFiles

Using the examples documented on the README.md to upload a files you can upload files but if there's an error it's not returned just logged.
Environment
go version go1.14.2 windows/amd64
Lib version 0.9.1
Personal Artifactory server

How to reproduce the error:
package main
import (
        "os"
        "fmt"

        "github.com/jfrog/jfrog-client-go/artifactory/auth"
        "github.com/jfrog/jfrog-client-go/config"
        "github.com/jfrog/jfrog-client-go/artifactory"
        "github.com/jfrog/jfrog-client-go/artifactory/services"
        "github.com/jfrog/jfrog-client-go/utils/log"
)

func main() {
    log.SetLogger(log.NewLogger(log.INFO, os.Stdout))
    rtDetails := auth.NewArtifactoryDetails()
    rtDetails.SetUrl("http://localhost:8081/artifactory")
    rtDetails.SetUser("wronguser")
    rtDetails.SetPassword("password")
    serviceConfig, err := config.NewConfigBuilder().
        SetArtDetails(rtDetails).Build()
    if err != nil {
        fmt.Printf("%v", err)
        return
    }

    rtManager, err := artifactory.New(&rtDetails, serviceConfig)
    params := services.NewUploadParams()
    params.Pattern = "/tmp/path"
    params.Target = "test/test/"
    params.Recursive = true
    params.IncludeDirs = false
    params.Regexp = false
    params.Flat = true
    info, _, _, err := rtManager.UploadFiles(params)
    if err != nil {
        fmt.Printf("Should print this error %v", err)
        return
    }
    fmt.Printf("%v", info)
}

Expected behavior:
$ go run main.go
[Info] [Thread 0] Uploading artifact: /tmp/test/test2
[Info] [Thread 2] Uploading artifact: /tmp/test/test.7z
[Error] [Thread 2] Artifactory response: 401 Unauthorized
[Error] [Thread 0] Artifactory response: 401 Unauthorized
[Error] Failed uploading 2 artifacts.

[]

The order will not match for the threads, but in order to do error handling the error should be returned if there's one.

Hello, I also met this issue today - started to use the library few days ago to let me able to upload files.
/cc @eyalbe4 Is it a possible solution?
diff --git a/artifactory/services/upload.go b/artifactory/services/upload.go
index 7034b12..5fe09c5 100644
--- a/artifactory/services/upload.go
+++ b/artifactory/services/upload.go
@@ -1,6 +1,7 @@
 package services

 import (
+       "errors"
        "net/http"
        "os"
        "path/filepath"
@@ -88,7 +89,9 @@ func (us *UploadService) performUploadTasks(consumer parallel.Runner, uploadSumm
        log.Debug("Uploaded", strconv.Itoa(totalUploaded), "artifacts.")
        totalFailed = totalUploadAttempted - totalUploaded
        if totalFailed > 0 {
-               log.Error("Failed uploading", strconv.Itoa(totalFailed), "artifacts.")
+               errFailed := errorutils.CheckError(errors.New("Failed uploading" + strconv.Itoa(totalFailed) + "artifacts"))
+               errorsQueue.AddError(errFailed)
+               log.Error(errFailed)
        }
        err = errorsQueue.GetError()
        return

Thanks for reporting this issue!
We're looking into it now.

Hi @malkam03 and @alex1989hu
After some investigation we noticed that this issue occurs only for HTTP errors returned from Artifactory.
Golang's HTTP client doesn't return an error for non-2xx responses, so jfrog-client-go will have to check the response's status code and throw an error accordingly.
To make these errors easier to handle, they will be of a new struct containing the status code, status definition and maybe some more useful information.
Pay attention that only the first error to be thrown is returned from the method, even if more than one error was thrown throughout the process.
Nowadays I'm working on a cool new feature of archiving and uploading files to Artifactory, so I'll start implementing this solution in the next few days.
Meanwhile I'll be happy to hear your thoughts about it.

cool new feature of archiving and uploading files to Artifactory, so I'll start implementing this solution in the next few days

Hello @asafgabai, I am happy that you checked what happens inside. I think throwing the first error only is much better, than the current behaviour which ignores - due to Go HTTP Client as you wrote - a set of ~errors.

@malkam03 @alex1989hu,
Thanks for reporting this issue.
This is resolved in 0.22.0 at https://github.com/jfrog/jfrog-client-go/pull/340/files#diff-fbe1867fd4ced5fcc9f3fd0a019edb80095566953e286e5e41e46439310ce228R437
However, I'd recommend upgrading to the latest version v1.10.0 to get better logging and a retry mechanism.
Please let me know if that helped.


AcceptListGrpcQuerier is not concurrent-safe

AcceptListGrpcQuerier is not concurrent-safe
Issue description
The AcceptListGrpcQuerier is not concurrent-safe. This leads to the state when one query changes the result of another. Or even worse, when a query changes the state of the transaction that uses the query  (leads to consensus failure).
The AcceptListGrpcQuerier accepts the map of the [request.Path]Response that is a singleton for the app. Hence there is a chance, when you query a smart contract (which uses the GRPC query to query the chain) to get the result of the query which is processing in parallel.
Example with step-by-step comments:
// 2 goroutines read bank balance of acc1 and acc2 concurrently, so they both get BalanceResponse{}
protoResponse, accepted := acceptList[request.Path]
if !accepted {
return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", request.Path)}
}

// the rote is also the same for both goroutines
route := queryRouter.Route(request.Path)
if route == nil {
return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("No route to query '%s'", request.Path)}
}

// the requests are different, so the res is different for each goroutine
res, err := route(ctx, &abci.RequestQuery{
Data: request.Data,
Path: request.Path,
})
if err != nil {
return nil, err
}

// but here, becasue of the race condition, one goroutine can get the result of another goroutine
return ConvertProtoToJSONMarshal(codec, protoResponse, res.Value)

Test that proves the statement:
package keeper_test

import (
  "fmt"
  "sync/atomic"
  "testing"

  abci "github.com/cometbft/cometbft/abci/types"
  "github.com/cosmos/cosmos-sdk/baseapp"
  "github.com/cosmos/cosmos-sdk/codec"
  sdk "github.com/cosmos/cosmos-sdk/types"
  banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
  "github.com/stretchr/testify/require"
  "golang.org/x/sync/errgroup"

  "github.com/CosmWasm/wasmd/app"
  "github.com/CosmWasm/wasmd/x/wasm/keeper"
  wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types"
)

const (
  denom1 = "denom1"
  denom2 = "denom2"
)

var _ keeper.GRPCQueryRouter = mockedQueryRouter{}

type mockedQueryRouter struct {
  codec codec.Codec
}

func (m mockedQueryRouter) Route(_ string) baseapp.GRPCQueryHandler {
  return func(ctx sdk.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error) {
    balanceReq := &banktypes.QueryBalanceRequest{}
    if err := m.codec.Unmarshal(req.Data, balanceReq); err != nil {
      return nil, err
    }

    coin := sdk.NewInt64Coin(balanceReq.Denom, 1)
    balanceRes := &banktypes.QueryBalanceResponse{
      Balance: &coin,
    }

    resValue, err := m.codec.Marshal(balanceRes)
    if err != nil {
      return nil, err
    }

    return &abci.ResponseQuery{
      Value: resValue,
    }, nil
  }
}

func TestGRPCQuerier(t *testing.T) {
  acceptedQueries := keeper.AcceptedQueries{
    "/bank.Balance": &banktypes.QueryBalanceResponse{},
  }
  cdc := app.MakeEncodingConfig(t).Codec
  router := mockedQueryRouter{
    codec: cdc,
  }
  querier := keeper.AcceptListStargateQuerier(acceptedQueries, router, cdc)

  eg := errgroup.Group{}
  //eg.SetLimit(1) // uncomment to check that the test passes with a single goroutine
  errorsCount := atomic.Uint64{}
  for range 50 {
    for _, denom := range []string{denom1, denom2} {
      denom := denom // copy
      eg.Go(func() error {
        queryReq := &banktypes.QueryBalanceRequest{
          Address: keeper.RandomBech32AccountAddress(t),
          Denom:   denom,
        }
        grpcData, err := cdc.Marshal(queryReq)
        if err != nil {
          return err
        }

        wasmGrpcReq := &wasmvmtypes.StargateQuery{
          Data: grpcData,
          Path: "/bank.Balance",
        }

        wasmGrpcRes, err := querier(sdk.Context{}, wasmGrpcReq)
        if err != nil {
          return err
        }

        queryRes := &banktypes.QueryBalanceResponse{}
        if err := cdc.UnmarshalJSON(wasmGrpcRes, queryRes); err != nil {
          return err
        }

        expectedCoin := sdk.NewInt64Coin(denom, 1)
        if queryRes.Balance == nil {
          fmt.Printf(
            "Error: expected %s, got nil\n",
            expectedCoin.String(),
          )
          errorsCount.Add(1)
          return nil
        }
        if queryRes.Balance.String() != expectedCoin.String() {
          fmt.Printf(
            "Error: expected %s, got %s\n",
            expectedCoin.String(),
            queryRes.Balance.String(),
          )
          errorsCount.Add(1)
          return nil
        }

        return nil
      })
    }
  }

  require.NoError(t, eg.Wait())
  require.Zero(t, errorsCount.Load())
}

The output is:
=== RUN   TestGRPCQuerier
Error: expected 1denom2, got nil
Error: expected 1denom1, got 1denom2
Error: expected 1denom2, got nil
Error: expected 1denom1, got nil
Error: expected 1denom1, got 1denom2
Error: expected 1denom2, got 1denom1
Error: expected 1denom2, got nil
Error: expected 1denom1, got nil
Error: expected 1denom1, got 1denom2
Error: expected 1denom1, got nil
Error: expected 1denom1, got nil
Error: expected 1denom1, got nil
Error: expected 1denom2, got nil
Error: expected 1denom2, got 1denom1
Error: expected 1denom1, got 1denom2
Error: expected 1denom2, got nil
Error: expected 1denom1, got nil
Error: expected 1denom1, got nil
Error: expected 1denom2, got nil
Error: expected 1denom2, got nil
Error: expected 1denom1, got 1denom2
Error: expected 1denom1, got nil
Error: expected 1denom2, got 1denom1
Error: expected 1denom2, got nil
Error: expected 1denom2, got 1denom1
Error: expected 1denom2, got nil
Error: expected 1denom1, got 1denom2
Error: expected 1denom1, got nil
Error: expected 1denom2, got 1denom1
Error: expected 1denom1, got 1denom2
Error: expected 1denom2, got nil
Error: expected 1denom1, got nil
Error: expected 1denom1, got 1denom2
Error: expected 1denom1, got nil
Error: expected 1denom2, got 1denom1
Error: expected 1denom1, got 1denom2
Error: expected 1denom1, got nil
Error: expected 1denom1, got 1denom2
Error: expected 1denom1, got 1denom2
    query_plugins_test.go:121:
        	Error Trace:	/go/src/github.com/CosmWasm/wasmd/x/wasm/keeper/query_plugins_test.go:121
        	Error:      	Should be zero, but was 39
        	Test:       	TestGRPCQuerier

Solutions

The best solution for the issue is to change the signature of the AcceptedQueries, and instead of the proto.Message, use the func()proto.Message to use a unique proto response per-goroutine/request.

AcceptedQueries map[string]func()proto.Message

Or, add a synchronization (locks), which is not the best solution, because it can be a bottleneck for the app.

Or, add a deep copy of the proto object before using it, which is not the best solution, because it might not work with all possible implementations of the proto.Message interface.

Great finding! So, basically the problem is that we are using the same Response object per path, right?
I agree with your three possible solutions.

The best solution for the issue is to change the signature of the AcceptedQueries, and instead of the proto.Message, use the func()proto.Message to use a unique proto response per-goroutine/request.

That requires an (addmitedly small) breaking change. Not the end of the world, but nice if we can avoid it.

Or, add a deep copy of the proto object before using it, which is not the best solution, because it might not work with all possible implementations of the proto.Message interface.

So, basically calling proto.Clone on the message in the map. Do you have an example where that would not work?
Because I think this would be the ideal solution otherwise.

It depends on the way you define the AcceptedQueries.
If you define it as in example:
acceptedQueries := keeper.AcceptedQueries{
  "/bank.Balance": &banktypes.QueryBalanceResponse{},
}

The proto.Clone works.
But if you parse the proto-files to find a tag "cosmos.query.v1.module_query_safe" and build the results dynamically using "google.golang.org/protobuf/types/dynamicpb", for example. The usage of the proto.Clone leads to panic. Because of the parallel access on the map used in the dynamicpb,
But it might be too specific use case. For such the developers can use their own implementation of the  querier.


docs: integrations/retrievers cleanup

Fixed format inconsistencies; added descriptions, links.

@eyurtsev Thanks!


undefined method `resource' for main:Object (NoMethodError)

Hi, I'm trying to use this gem, however, I get this error: undefined method 'resource' for main:Object (NoMethodError)
I tried using the example app and doing a similar setup to my app (I'm using a gem called api-versions) and it worked perfectly, but on my own app, this is the stack trace I get when I run bundle exec rake docs:generate:
/home/waleed/app/spec/acceptance/authenticates_spec.rb:3:in `<top (required)>': undefined method `resource' for main:Object (NoMethodError)
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
from /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/exe/rspec:4:in `<main>'
/usr/bin/ruby1.9.1 -I/home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/lib:/home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-support-3.2.2/lib /home/waleed/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.2.3/exe/rspec --pattern spec/acceptance/\*\*/\*_spec.rb --format RspecApiDocumentation::ApiFormatter failed

My spec looks like this:
require 'acceptance_helper'
resource "Authenticates" do
    post "/api/authenticates" do

    end
    get "/api/authenticates" do

    end

    put "/api/authenticates" do

    end

    delete "api/authenticates" do

    end
end

Did you require 'rspec_api_documentation/dsl' in acceptance_helper?

Hey thanks for getting back to me, yes I did, acceptance_helper looks like this:
require 'rails_helper'
require 'spec_helper'
require 'rspec_api_documentation'
require 'rspec_api_documentation/dsl'

RspecApiDocumentation.configure do |config|
  config.format = [:json, :combined_text, :html]
  config.curl_host = 'http://localhost:3000'
  config.api_name = "NexHealth API"
end

@waleedasif322 try to use RSpec.resource

@waleedasif322 I was getting the same error. Commenting out  config.disable_monkey_patching! in spec_helper.rb solved it for me.

Closing due to age

I just had a similar problem and really got confused. Neither the 'resource' got recognized nor the rake docs:generate command. After finding this thread it turned out that we had config.disable_monkey_patching! set in our spec_helper, too. Maybe we should update the docs that this option should not be set or try to add a fallback where people have to integrate the required monkey-patched features manually?

I am trying to remove rspec_api_documentation gem and still receiving same issue
NoMethodError:
undefined method `resource' for main:Object
Did you mean?  rescue


Fix memory load with limited bit width

This change fixes load instructions not respecting bit width parts. For example, i32.load8_u was loading all i32 bytes instead of a single byte.
Also, the page size was specified as 6K, while it's 64K according to the spec.
This increases the amount of spec tests passing from 25% in master to 33% in this branch.

Hi @MaxDesiatov, I’m happy to see you’re working on it!
It’s been a while since the last time I touched this repo and stopped keeping up with the WASM spec, and now I think it’s hard to make time to give my knowledge a brush-up enough to commit or review.
So, can I offer you the complete maintainer-ship of this project? Let me know if transferring the repository is desirable.
(Changes looks good to me btw :)

Many thanks for your previous work on this. It seems you've covered all of the foundational parts of the spec. I anticipate it's going to be relatively easy to get to 100% of the spec covered.
I really appreciate the offer! I hope to get to 100% spectests passing at some point and to potentially use WAKit as a Wasm debugger. Being written in Swift would allow to be easily embedded in GUI apps. My dream is to have a visual debugger that displays the current state of the VM with its memory and instructions executed.
Would you be open transferring the repo to the SwiftWasm org then?
I will also update README.md accordingly to credit your work and mention you as the original maintainer.

You can transfer to my account for now, but let me know if you'd like to join SwiftWasm in any capacity. Would be very happy to see you there as a member and a contributor!

Just noticed I had a fork of this repo with the same name on my account. I've deleted it. If that prevent transfers to my account previously, please try again.

@MaxDesiatov Sorry for the delay (and messing up your PR...,) I requested transfer of this repository!

I don't think anything is messed up, all looks great. Thank you so much!


Cannot reconfigure mapping for backslash

Hello,
First of all: this is a very nice plugin, thank you for making it!
I was trying to customize the \ mapping, but it seems like it's not working.
This is the way I added it to Packer:
    use {
        "nvim-neo-tree/neo-tree.nvim",
        branch = "v2.x",
        requires = {
            "nvim-lua/plenary.nvim",
            "kyazdani42/nvim-web-devicons", -- not strictly required, but recommended
            "MunifTanjim/nui.nvim"
        },
        config = function()
            -- Unless you are still migrating, remove the deprecated commands from v1.x
            vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])

            -- If you want icons for diagnostic errors, you'll need to define them somewhere:
            vim.fn.sign_define("DiagnosticSignError",
                {text = " ", texthl = "DiagnosticSignError"})
            vim.fn.sign_define("DiagnosticSignWarn",
                {text = " ", texthl = "DiagnosticSignWarn"})
            vim.fn.sign_define("DiagnosticSignInfo",
                {text = " ", texthl = "DiagnosticSignInfo"})
            vim.fn.sign_define("DiagnosticSignHint",
                {text = "", texthl = "DiagnosticSignHint"})
            -- NOTE: this is changed from v1.x, which used the old style of highlight groups
            -- in the form "LspDiagnosticsSignWarning"

            require("neo-tree").setup({
                window = {
                    position = "left",
                    width = 30,
                }
            })
        end
    }

then in my init.lua (after loading the plugins) I set this remap:
vim.api.nvim_set_keymap( 'n', "\\", ":Neotree toggle<cr>", {noremap = true} )

I saw that on the README the keymapping was inside the "config" function, at the end, but changing it there made no difference, so I tried to do it this way, but with no luck.
Basically, I just wanted to change the '' key from "reveal" to "toggle", but it looks like nothing I do is working...

It now seems that it started working by itself...
I had the same issue when I was trying to fix the window width. Is there something I have to do to make sure that changes in mappings/configs are actually taken into consideration?
(I always close and reopen nvim to try and see if it changes)

The mapping is not anything specific to Neotree, you are just using standard built-in vim techniques to map commands. The only reason I put the mapping in the config in the quickstart is for simplicity, but you can put it anywhere at all.

Is there something I have to do to make sure that changes in mappings/configs are actually taken into consideration?

If you are using Packer, you need to remember to source the changed file AND 'PackerCompile' or 'PackerSync' whenever you make a change to configuration.


numba compilation

Hi - I noticed that the even when using a small sample data file it is quite slow to run (say a few mins), because the time spent compiling the jitted code dominates. This makes it a bit frustrating iterating through different trials, did you find a way to avoid this cost? I was wondering if it is possible to compile ahead or drop back to pure python.
thanks

I am aware of the issue, but I couldn't find a solution.
Pure Python implementation is too slow for tick-by-tick data backtesting.
If you just want to test repeatedly with different parameters, you can compile Numba code ahead of time. Please see https://numba.pydata.org/numba-doc/dev/user/pycc.html
With regard to AOT, JIT compilation overhead can be reduced by rewriting the entire code in Cython, which can be callable in a Numba JIT'ed function. This would be the better design, but it would require abandoning some customizable features in latency models, queue models, and exchange models.
Currently, I recommend backtesting for at least several days as it would be more practical for general use cases.
Any suggestions about this issue are also welcome.

Did you get compile ahead working? I was thinking about trying it, mainly at the moment I wanted to quickly experiment with different parameters. thanks

FYI - I had a go here https://gist.github.com/griffiri/f98237f152f5ce568f7143d499925673 , there is a compile error which is not immediately obvious how to fix. Let me know if you have an idea. Otherwise I'll try to come back to it when i have a bit more free time (I've hard-coded a lot of things but it's just get it working as a proof of concept)

I haven't tried it. Please see my comment: https://gist.github.com/griffiri/f98237f152f5ce568f7143d499925673?permalink_comment_id=4528677#gistcomment-4528677

I added reset function. With Numba cache function, it might be helpful. Have a try.
from hftbacktest import reset

@numba.njit(cache=True)
def algo(hbt):
	... code ...

# Reset HftBacktest for reuse
reset(
    hbt,
    [
        'data/ethusdt_20221003.npz',
        'data/ethusdt_20221004.npz',
        'data/ethusdt_20221005.npz',
        'data/ethusdt_20221006.npz',
        'data/ethusdt_20221007.npz'
    ],
    snapshot='data/ethusdt_20221002_eod.npz'
)

algo(hbt)

Thanks, I'll have a look