Migrating plugin API endpoints

Currently, all plugins have followed the same convention of prefixing all APIs with _opendistro/* to represent that they were APIs supported by the Open Distro for Elasticsearch project. Now, these plugins are more closely associated with the core OpenSearch/OpenSearch Dashboards source code itself.
One option is removing the _opendistro prefix entirely, and allowing the OpenSearch plugins to shorten and simplify their paths. Example: _opendistro/_anomaly_detection/* ->  _anomaly_detection/*.
Another option is to replace _opendistro with _opensearch, but I feel this may be a bit unnecessary and repetitive in this case.
If something like the first option is decided upon, we may apply similar strategies for other areas that need migration from opendistro, including system indices, cluster settings, etc. as mentioned in #12
Creating this issue as a point of discussion on possible solutions to migrate the current plugin REST APIs.

Thanks for the issue @ohltyler! Great thought, love the idea.
My thoughts on this:

All plugins part of the opensearch-project are first class citizens and having the brand of opensearch in APIs, indices helps us differentiate.
The customers who were already running ODFE plugins, can intuitively rename them to opensearch.

Here is a similar discussion in security plugin: https://github.com/opensearch-project/security/pull/1149#issuecomment-832409159

By adding _opensearch, we provide specific namespace for all opensearch plugins. It may provide some convenience for future extension to support custom plugins from third party. For example, community build similar anomaly detection plugin and want to install it into OpenSearch cluster together with our OpenSearch AD plugin. We can avoid name conflict for API, index and cluster settings by adding _opensearch.

By adding _opensearch, we can provide specific namespace for all opensearch plugins. It may provide some convenience for future extension to support custom plugins from third party. For example, community build similar anomaly detection plugin and want to install it into OpenSearch cluster together with our OpenSearch AD plugin. We can avoid name conflict for API, index and cluster settings by adding _opensearch.

While I agree, on the other hand it also makes it harder for clients using this API to migrate in the future, doesn't it? What If Elasticsearch had _elasticsearch prefix in all the core plugins?

Seems that the different opinions rely on how closely we want to tie these plugins to OpenSearch the software vs. OpenSearch the project/organization.
Seems to me that:

associating more with the software => removing _opendistro
associating more with the project/organization => replacing with _opensearch to treat plugins within the opensearch-project organization as first-class citizens as @saratvemulapalli has mentioned

I think either solution can extend in some way to support future use cases. Just a matter of effort and who will pay for the effort. Needs to consider the long term goal and vision to minimize the future effort and make tradeoff.

Food for thought:
Does the namespacing as _opensearch or no namespacing at all put these plugins at an advantage that no one else gets?
The 'first-party' plugins probably should play by the same rules as anyone else. E.g. If another organization creates a competing functionality, does the namespacing proposed create an advantage? If someone else created a plugin without namespacing would you be okay with this?
This might enter the danger zone on principles 3 and 8.
Regardless, I would make sure and post this in the forums for a wider reach - I'm not sure how many folks are hanging out in this repo.

Thanks for the issue @ohltyler! Great thought, love the idea.
My thoughts on this:

All plugins part of the opensearch-project are first class citizens and having the brand of opensearch in APIs, indices, namespaces etc helps us differentiate.
The customers who were already running ODFE plugins, can intuitively rename them to opensearch.

I would prefer to stick with _opensearch and as you said this will have similar implications in other places like indices, ENV variables etc.
Here is a similar discussion in security plugin: opensearch-project/security#1149 (comment)

@saratvemulapalli While this is a good topic to discuss on API paths, but the discussion in security plugin is not about API paths. It is about the class name, method name and variable name. The requirement in the SOP for migration is to rename all opendistro prefixes to "opensearch". Is that a requirement consistently apply to all plugins? Or the prefixes can be removed? Personally, I would like all plugins to follow the same naming conventions even for class name, method name and variable name. Can we have a consistent requirements on this for all plugins as soon as we can? We have a pending PR for those changes waiting for a decision.


Remove kafka lookup records when a record is tombstoned

Description

Lookups made using the druid-kafka-extraction-namespace extension do not currently handle records that have been deleted from a kafka topic. Deleting a record from a kafka topic involves sending a record with a null payload and the same key as the record you want to delete to the topic. This is also known as sending a tombstone. This PR aims to handle key value records from kafka that have keys but also null values.

On receiving a key value record that has a key and a null value, the corresponding record stored in the factory map will be removed.

Key changed/added classes in this PR

KafkaLookupExtractorFactory.java

This PR has:

[x] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[ ] added documentation for new or modified features or behaviors.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[ ] been tested in a test Druid cluster.

Travis didn't trigger for some reason. I closed and re-opened the PR. changes LGTM. I will merge once CI passes.

The docs are actually buried in the extensions area. I've updated them to mention this new behaviour.

thank you. I will merge this once CI is green.

@hwball @cloventt  - Thank you for your contribution. I have merged the PR.


Add props to display tooltip in QuickActions

I just thought 1 last detail: what do you think about adding stories for disabled tooltip and this new QuickActions component?


Consolidate scene3D with ign-gui

🎉 New feature
This PR is part of the consolidation of Scene3D with ign-gazebo's GzScene3D https://github.com/ignitionrobotics/ign-gui/issues/137
Related to:

https://github.com/ignitionrobotics/ign-rendering/pull/311

Summary
Make the ign-gui plugin extensible
I have create a new Plugin to test this new structure called Scene3DNew. I tried to launch it with ign gui -s Scene3dNew but for some reason it crash.
The other option is to use the windows example an change the plugin to Scene3DNew
Right now supports:

Models in the scene
Sky
moveTo
follow
Fullscreen
Engine
Ambient light
background
camera pose

Test it
Checklist

[x] Signed all commits for DCO
[ ] Added tests
[ ] codecheck passed (See contributing)
[ ] All tests passed (See test coverage)

Note to maintainers: Remember to use Squash-Merge

Closing this PR in favour of this other PR https://github.com/ignitionrobotics/ign-gui/pull/221


Austral Government

Australia Central and Australia Central 2 should be under Australia since there is no Australia Government

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b29b475d-056b-ba43-5309-dd1ee50b4318
Version Independent ID: 55d5f203-32ef-40a1-62fa-83e8c81cdb14
Content: Routing requirements for Azure ExpressRoute
Content Source: articles/expressroute/expressroute-routing.md
Service: expressroute
GitHub Login: @ganesr
Microsoft Alias: ganesr

We are carving the 2 regions out as a separate geo from a billing perspective. Hence the name.

@manaccar We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Ensure that contact details forms are pre-loaded with existing data

Context
In some circumstances the forms that make up the contact details flow are rendered without loading existing data giving the impression that state has been reset.
Changes proposed in this pull request

[x] Ensure that data is loaded on new actions as well as edit actions in the various contact details controllers. (The normal distinction between new and edit actions doesn't really apply here because the data manipulations here are always updates to ApplicationForm records).
[x] System spec to assert that forms always display latest data.

Guidance to review

Are there any good reasons for presenting an empty form that I'm missing?

Link to Trello card
https://trello.com/c/xTS5cO2C/4482-fix-issues-with-contact-details-flow
Things to check

[x] If the code removes any existing feature flags, a data migration has also been added to delete the entry from the database
[x] This code does not rely on migrations in the same Pull Request
[x] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[x] API release notes have been updated if necessary
[x] Required environment variables have been updated added to the Azure KeyVault

@frankieroberto . Thanks again for the review, going to merge this one, there's a new card for the issue that you spotted with validations on the address type form: https://trello.com/c/27PybOhn/4528-validations-errors-not-rendered-correctly-on-address-type-form


Create a test scenario

We need a small but complex enough scenario to test a future data converter.
The task:
Crop a suitable part of the map and generate a sumo test scenario using the netconvert

St.Magdalena_Linz.zip
This is one cropped area of Linz, I do not know if it is good or not but how can I upload the real data of Linz traffic into that for real traffic simulation?

Hello, could you please consider using Git Pull requests instead of zip files for future submissions? I was able to run your work, and I have a few questions:

Did you utilize the City of Linz source files? Upon reviewing your net file, I noticed that the routes' IDs have different formats. I do not think we will be able to convert traffic from the CityOfLinz data to SUMO if we have different IDs in our network map.
When attempting to run the simulation, I encountered the following errors:

Loading net-file from 'osm.net.xml.gz' ...
Error: Unknown vehicle class 'container' encountered.
Error: Unknown vehicle class 'cable_car' encountered.
Error: Unknown vehicle class 'subway' encountered.
Error: Unknown vehicle class 'aircraft' encountered.
Error: Unknown vehicle class 'wheelchair' encountered.
Error: Unknown vehicle class 'scooter' encountered.
Error: Unknown vehicle class 'drone' encountered.
Error: Unknown vehicle class 'container' encountered.
Error: Unknown vehicle class 'cable_car' encountered.
Error: Unknown vehicle class 'subway' encountered.
Error: Unknown vehicle class 'aircraft' encountered.
Error: Unknown vehicle class 'wheelchair' encountered.
Error: Unknown vehicle class 'scooter' encountered.
Error: Unknown vehicle class 'drone' encountered.

Could you clarify the need for these vehicle classes? Perhaps we should focus on regular vehicles initially, and then consider incorporating aircraft, drones, etc.
3. Could you explain the necessity of polygons and other aesthetic elements? These additions may significantly impact simulation performance as we scale up.

Hello Nikita,
This was primarily a test without a specific purpose, intended to gather your feedback and determine the direction I should take.

No, I didn't use those files as it was just a test, and I should have utilized your real dataset, but I'm not entirely familiar with its structure.
That's correct, we require regular ones.
There's no scientific reason behind this—just a test, and you're right.

As you can tell, I'm not well-versed in SUMO, and I realize numerous mistakes were made, even in this test. I'd like to mention that I could also follow the hints you provided, but it's more time-consuming than employing AI tools on the data we can extract from this simulation for further analysis.
You're aware that at this time, Cristina needs a paper from this project, and I'm unsure if you have commenced writing something in a paper format for your findings and work on this project. If you haven't started yet, and considering it also takes time, I could handle it, or we could divide the tasks. For instance, if I have the data from SUMO from all the agents, I could perform several tasks with AI to be at least helpful in this project, because, as you mentioned before, and even now, I believe that time is limited, and we require a paper. Given that I'm new to SUMO, should we focus on using AI methods and commence writing the paper, or anything else you think is suitable? Because Cristina has repeatedly emphasized the need for a paper and analysis involving AI, which I can conduct.
I eagerly anticipate your thoughts on the best and quickest solution to tackle this paper.
Kind regards,
Amirhesam


Non-english char fix

Short Description: Non-english char fix
Changes:

Fixes UTF-8 encoded characters causing bot to crash

@OpenPoGo/maintainers

:+1:

:+1:


postinstall failing

https://github.com/interledger/rafiki/runs/4168593074?check_suite_focus=true
tigerbeetle-node@npm:0.4.1 STDOUT Installing Zig 0.8.0 release build...
tigerbeetle-node@npm:0.4.1 STDOUT Downloading https://ziglang.org/builds/zig-linux-x86_64-0.9.0-dev.1599+008b0ec5e.tar.xz
tigerbeetle-node@npm:0.4.1 STDOUT https://ziglang.org/download/0.8.0/zig-linux-x86_64-0.8.0.tar.xz...
tigerbeetle-node@npm:0.4.1 STDOUT Extracting zig-linux-x86_64-0.8.0.tar.xz...
tigerbeetle-node@npm:0.4.1 STDOUT Installing zig-linux-x86_64-0.8.0 to 'zig' in current working directory...
tigerbeetle-node@npm:0.4.1 STDERR  40200K .......... .......... .......... .......... .....     100%  136M=0.4smv: cannot stat 'zig-linux-x86_64-0.8.0': No such file or directory
tigerbeetle-node@npm:0.4.1 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-92ba0a68/build.log)

It looks like it's trying to get 0.8.0 from a 0.9.0 url?
Not sure if updating the tigerbeetle submodule to include this will solve it
https://github.com/coilhq/tigerbeetle/commit/3f572cb446294ff35e79919a4a18bc99bbda8109

@wilsonianb I haven't been able to reproduce this locally. @matdehaast reran the pipeline and it passed. Feel free to post here if it happens again.

:confused: Re-running also passed for me
https://github.com/interledger/rafiki/runs/4226819382?check_suite_focus=true
It looks like that 0.9.0-dev url is back to 0.8.0.
tigerbeetle-node@npm:0.4.1 STDOUT Installing Zig 0.8.0 release build...
tigerbeetle-node@npm:0.4.1 STDOUT Downloading https://ziglang.org/download/0.8.0/zig-linux-x86_64-0.8.0.tar.xz...

Hopefully it was just a blip. Thanks!


api/projects is missing

Hi, I believe somehow the /api/projects folder has not been uploaded, is it intentional?

You mean the api/products folder? There shouldn't be any api/projects folder.

the url here refers to that right?

https://github.com/MarcosCamara01/ecommerce-template/blob/master/src/components/products/ProductForm.jsx#L103

Exactly, the "/create" path will soon be removed because I'm going to include the functionality in the ecommerce-dashboard project I'm currently developing.
Perhaps I should not have deleted this path until I had finished creating it in the dashboard.
Here is the code that should be in "/api/products/route.ts":
import { NextRequest, NextResponse } from 'next/server';
import { Product } from '@/models/Products';
import { connectDB } from '@/libs/mongodb';

connectDB();

export async function PUT(req: NextRequest) {
    const { searchParams } = new URL(req.url);
    const id = searchParams.get('id');

    try {
        const dataToUpdate = await req.json();
        const updatedProduct = await Product.findByIdAndUpdate(id, dataToUpdate, { new: true });

        return NextResponse.json(updatedProduct);
    } catch (error) {
        console.error('Failed to update product.', error);
        return NextResponse.json({ error: 'Failed to update product.' }, { status: 500 });
    }
}

export async function POST(req: NextRequest) {
    try {
        const dataToSave = await req.json();
        const savedProduct = await Product.create(dataToSave);
        return NextResponse.json({ _id: savedProduct._id });
    } catch (error) {
        console.error('Failed to save product.', error);
        return NextResponse.json({ error: 'Failed to save product.' }, { status: 500 });
    }
}

export async function DELETE(req: NextRequest) {
    const { searchParams } = new URL(req.url);
    const id = searchParams.get('id');
    try {
        const deletedProduct = await Product.findByIdAndDelete(id);
        return NextResponse.json(deletedProduct);
    } catch (error) {
        console.error('Failed to remove product.', error);
        return NextResponse.json({ error: 'Failed to remove product.' }, { status: 500 });
    }
}


bump hal's version

We already introduced some breaking changes so we might as well already increase the version number on git a while before the release.
That may help users using the git repo be warned about more upcoming breakage.

I pushed a branch of rp-hal-boards using this version to https://github.com/rp-rs/rp-hal-boards/tree/hal-0.9


Concurrent calls to save() can fail

This issue requests fixing save() so that it doesn't fail with concurrent calls.
This could be fixed by protecting this file handling with a mutex from async-mutex package, or other means.

Resolved in v0.10.0 which synchronizes calls to save.


dvc changed to http

Hi @umutekingezer @dinarakurmangaliyeva
I changed DVC protocol to HTTP so that it is easier to work

Hi @umutekingezer @dinarakurmangaliyeva
I changed DVC protocol to HTTP so that it is easier to work

Done


feat(basic card): added hover colour and svg icon treatment

affects: @buildit/gravity-ui-nunjucks, @buildit/gravity-ui-web
Description
Adds rollover (hover) effects to the basic card component when it is being used with a link.

@james-nash i've added the transition mixin along with updating the transition speeds and using the mixin where appropriate throughout.

I've marked this as WIP again, as now the typography is merged there's a few changes to make.

:tada: This PR is included in version 3.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Pure imgui crate examples

I could only find examples using all/most of the crates in the repo. It'd be nice to have examples of how to use just imgui (I was looking to maybe use it with https://github.com/Lokathor/beryllium )

To run the examples, you always need renderer and platform support, so pure imgui crate examples would not be very useful since they would not be runnable.

I feel frustrated when setting up imgui. I know the most case is integrate imgui in some game, while could I run it as a gui framework?
If imgui could include basic glue code like support mod in example that would be great. So that we could start a new project just add dependencies and run the code in REAMDE:
[dependencies]
imgui = "0.4.0"
imgui_support = "0.4.0" # cross-platform config for imgui
# or imgui = { version = "0.4.0", features = [ "support" ] }

use imgui::*;

fn main() {
    // provide glue code in imgui
    // so that we could use it like a gui library
    let system = imgui_support::Builder::new().init();
    system.main_loop(move |_, ui| {
        Window::new(im_str!("Hello world"))
            .size([300.0, 110.0], Condition::FirstUseEver)
            .build(ui, || {
                ui.text(im_str!("Hello world!"));
                ui.text(im_str!("こんにちは世界！"));
                ui.text(im_str!("This...is...imgui-rs!"));
                ui.separator();
                let mouse_pos = ui.io().mouse_pos;
                ui.text(format!(
                    "Mouse Position: ({:.1},{:.1})",
                    mouse_pos[0], mouse_pos[1]
                ));
            });
    });
}

I think this could make imgui more attractive for people to try.

That support layer in examples can be quite restrictive iirc, you probably can start off from it but eventually will run into something you can't do without changing it (And if it's in your own code you can do that easily). I'm not sure using imgui as a general GUI toolkit is a super good idea in the general case, but there's plenty written about that on the internet already.

I agree that it would be nice to have a minimalistic support library. All examples use this support module and it's a non-trivial amount of code. If it's too restrictive, maybe with lesser functionality included.

That support layer in examples can be quite restrictive iirc, you probably can start off from it but eventually will run into something you can't do without changing it

I found the same when first using the imgui-rs - having not used much imgui/winit/glium, the extra layer of the support module made it harder to work out how/if I could do even simple things like change the window title (because in the context of the example code, you couldn't get mutable access to the window). When I eventually unwrapped all the support module code into my application, it became much clearer
This aspect will be helped a lot by #495 - it has a 01_basic.rs example which is completely self contained.

When writing the new glow renderer, which has now been merged to master, I made sure to include an entirely self-contained minimal example because I like to know how things are put together more-or-less end to end. I hope this helps

Closing; the glow render example linked above is about the most minimal amount of code possible to use imgui-rs in a practical manner :partying_face:


New version: octobuild.octobuild version 0.9.0

[ ] Have you signed the Contributor License Agreement?
[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.5 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Automatic Validation ended with:

Installation failed with exit code -1978335187 2023-12-03 23:57:27.031 [FAIL] Installer failed security check. Url: https://github.com/octobuild/octobuild/releases/download/0.9.0/octobuild-0.9.0-x86_64.msi Result: 0x80004005

Hi @slonopotamus,
This package didn't pass a Defender scan. It might be a false positive and we can retry tomorrow.

This was gathered from a script I've been working to automate for some time. it gathers the build run from the GitHub API, uses this to extract a zip of logs from the run artifacts, unzips this, and adds potential errors and failures from the logs into a comment. The last step is to automate image uploading or attaching.

This is a second time a false positive is reported. And again, the file is absolutely green on Virus Total.

@stephengillie how do I rerun validation?

/AzurePipelines run

@slonopotamus,
Sorry for the repeated concern. What about this package causes the false positives?
A pipeline run can be triggered by any change to the PR. This can be something arbitrary, such as adding a space or line break.

What about this package causes the false positives?

I believe this is because binaries inside are in Rust. Kaspersky Antivirus heuristic analysis is also very nervous about Rust.


feat: implements "getSetCookie" method on Headers

Related to https://github.com/mswjs/msw/pull/1711#issuecomment-1693949312
This PR implements the getSetCookie method on the Headers class, adds a few tests as well.
Notice a few red squiggles in the editor, in the test files, so added type annotations to avoid seeing them
Extracted the ', ' join delimiter used when appending headers to avoid potential typos, since it's used in a few places, including the newly added code
updates .get() to properly return empty string values, where it previously would return null

Looks like there's a mixed expectation toward the .getSetCookie() return value, based on the failed CI tests:
FAIL src/Headers.test.ts
  ● .getSetCookie() › returns [] given a non-existing Set-Cookie header

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 3

    - Array []
    + Array [
    +   "",
    + ]

      344 |   it('returns [] given a non-existing Set-Cookie header', () => {
      345 |     const headers = new Headers()
    > 346 |     expect(headers.getSetCookie()).toEqual([])
          |                                    ^
      34[7](https://github.com/mswjs/headers-polyfill/actions/runs/5980986731/job/16228102099?pr=57#step:6:8) |   })
      34[8](https://github.com/mswjs/headers-polyfill/actions/runs/5980986731/job/16228102099?pr=57#step:6:9) | })
      34[9](https://github.com/mswjs/headers-polyfill/actions/runs/5980986731/job/16228102099?pr=57#step:6:10) |

      at Object.<anonymous> (src/Headers.test.ts:346:36)

For some reason, the actual value is [""]. May be something related to how we split the value.
Perhaps a more bullet-proof solution would be to handle the absence of the Set-Cookie header explicitly?
getSetCookie() {
  const setCookie = this.get(SET_COOKIE_HEADER_NAME)

  if (!setCookie) {
    return []
  }

  return setCookie.split(HEADER_VALUE_DELIMITER)
}

Updated this PR, CI looks good now and running these changes across multiple versions of the ts playground looks like it accepts them well.

This issue also got me thinking about this https://github.com/mswjs/interceptors/issues/406. Unless I'm missing something, it should be possible to deprecate the usage of the HeadersPolyfill class entirely across the entire MSW dependency chain. Easier to maintain in the future.

This issue also got me thinking about this mswjs/interceptors#406. Unless I'm missing something, it should be possible to deprecate the usage of the HeadersPolyfill class entirely across the entire MSW dependency chain. Easier to maintain in the future.

oh yeah!  I definitely think that's reasonable - if we don't need the polyfill anymore, dropping it should just work instead, since it doesn't add anything ontop of Headers as I understand.   I imagine there might be test environments where fetch is polyfilled, but those should have Headers polyfilled already as well, right?

Released: v3.2.0 🎉
This has been released in v3.2.0!

📄 Release notes
📦 npm package

Make sure to always update to the latest version (npm i headers-polyfill@latest) to get the newest features and bug fixes.

Predictable release automation by @ossjs/release.

I imagine there might be test environments where fetch is polyfilled, but those should have Headers polyfilled already as well, right?

Correct. The main reason behind this library was to provide a common interface to represent HTTP headers in environments that didn't have support for the Fetch API. We have since dropped those environments (technically, will only drop in MSW 2.0) so this library in its current state isn't necessary.
It does still ship with a couple of useful utility functions to construct/deconstruct headers so its application is possible even in modern Node.js environments. This may be a good first issue to address after the 2.0 release.


Server-side routing not working; globalState's router attribute is null on server

I just cloned a fresh version of this project and added this console.log in App.js:
function fetchData(getState, dispatch) {
  const promises = [];
  console.log(getState());
  ...
  return Promise.all(promises);
}

And on the server, this is what's logged out:
[1] { router: null,
[1]   auth: { loaded: false },
[1]   form: {},
[1]   multireducer:
[1]    { counter1: { count: 0 },
[1]      counter2: { count: 0 },
[1]      counter3: { count: 0 } },
[1]   info: { loaded: false },
[1]   widgets: { loaded: false, editing: {}, saveError: {} } }

Why does router === null? This makes me very sad. I don't know how to fix it, and in my app I need to actually know what the route params are in order to make the correct API query before rendering my components.

Is there some other way I'm supposed to access the current route from my components? If so, what's the point of redux-router?

Logging out state in a couple more spots:
function fetchData(getState, dispatch) {
  const promises = [];
  console.log('App state in @connectData:', getState());
  ...
  return Promise.all(promises);
}

@connectData(fetchData)
@connect(
  state => {
    console.log('App state in @connect:', state);
    return ({user: state.auth.user});
  },
  {logout, pushState})
export default class App extends Component {

results in these logs:
[1] App state in @connectData: { router: null, ... }
[1] App state in @connect: { router:
[1]    { routes: [ [Object], [Object] ],
[1]      params: {},
[1]      location:
[1]       { pathname: '/',
[1]         search: '',
[1]         hash: '',
[1]         state: null,
[1]         action: 'POP',
[1]         key: 'fuazfx',
[1]         query: {},
[1]         '$searchBase': [Object] },
[1]      components: [ [Object], [Function: Home] ] },
[1]   ... }

Well bugger! I need those routes while fetching the data! How do I get access to the current route while in @connectData?

I figured out from looking at the middleware definition that I can do this:
function fetchData(getState, dispatch, location, params) {
  const promises = [];
  ...
  return Promise.all(promises);
}

I'm still confused as to why the router state in @connectData should be null.

The version specified in package.json four days ago.

I am experiencing the same problem and using params passed in the fetchData until then. Though I would love to understand if router should indeed be null, and why so.

running into the same issue


Required property "hosts" missing for CassandraCQLClient

Hi,
I have installed and prepared table and keyspace for my Cassandra 3.11.4 and I am using YCSB 0.15.0, first doubt I have is if the latest version of Cassandra is supported by the latest YCSB cassandra binding interface?
Anyway I still would like to ask in order to understand things a bit better, I am initiating a loading of core workload A with the line:
$ ./bin/ycsb load cassandra-cql -P workloads/workloada
I get the following error:
Loading workload...
Starting test.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
com.yahoo.ycsb.DBException: com.yahoo.ycsb.DBException: Required property "hosts" missing for CassandraCQLClient
at com.yahoo.ycsb.db.CassandraCQLClient.init(CassandraCQLClient.java:225)
at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:86)
at com.yahoo.ycsb.ClientThread.run(Client.java:424)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.yahoo.ycsb.DBException: Required property "hosts" missing for CassandraCQLClient
at com.yahoo.ycsb.db.CassandraCQLClient.init(CassandraCQLClient.java:154)
... 3 more
com.yahoo.ycsb.DBException: com.yahoo.ycsb.DBException: Required property "hosts" missing for CassandraCQLClient
at com.yahoo.ycsb.db.CassandraCQLClient.init(CassandraCQLClient.java:225)
at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:86)
at com.yahoo.ycsb.ClientThread.run(Client.java:424)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.yahoo.ycsb.DBException: Required property "hosts" missing for CassandraCQLClient
at com.yahoo.ycsb.db.CassandraCQLClient.init(CassandraCQLClient.java:154)
My understanding is that this is directly related to the hosts property as adviced on readme.md for Cassandra binding.
Cassandra Configuration Parameters

'hosts' (required)
-Cassandra nodes to connect to.
-No default.

Where can I find and edit correctly this property on Cassandra Configuration files?
Thanks very much,

you can set it in a properties file (same format as workloads/workloada) and then pass that via e.g. -P /some/path/to/my/cassandra_ycsb.properties or you can just pass it in the cli to ycsb, e.g. if Cassandra is running on localhost then ./bin/ycsb load cassandra-cql -P workloads/workloada -p hosts=localhost

Thanks will try, do i need to reduce my Cassandra to a previous version 2.x?

The release notes for the YCSB you're using should include what versions of Cassandra are expected to work.

Hi, it worked passing the hosts in command line . Also I can confirm Cassandra 3.11.4 can be benchmarked with ycsb 0.15.0


save button and other functions

Some cool functionality added in this PR:

compute box (area volume, curvature and face quality)
save button to export mesh directly from vedo interface
fix initial window size
add inset histogramming

Codecov Report

Merging #14 (724144c) into main (77c6fc5) will decrease coverage by 2.32%.
The diff coverage is 30.86%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   33.33%   31.01%   -2.32%
==========================================
  Files           3        3
  Lines         147      216      +69
==========================================
+ Hits           49       67      +18
- Misses         98      149      +51

Impacted Files
Coverage Δ

src/napari_vedo_bridge/_cutter_widget.py
28.70% <30.86%> (-1.30%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Hi @marcomusy ,
Looks like a lot has changed while I was on vacation only a week  💯
Some observations:

Doubleclicking (selecting a cutter and clicking again) no longer disables the buttons, but rather directly starts a new cutter
The histogram is pretty cool
I'm not sure whether I'd put the measurements directly into the widget - there's a LOT of measurements in vedo, so maybe there's a better way of making these accessible? At napari-process-points-and-surfaces there's some functionality to measure all the vedo qualities, put them into a pandas dataframe and attach them to the respective layer in napari. In the code we could check whether this table exists and populate a dropdown combobox. Depending on what's selected, we could update the display?

Doubleclicking (selecting a cutter and clicking again) no longer disables the buttons, but rather directly starts a new cutter

yes - the cutter thingy it's still not perfect... (especially the key-shortcuts)

I'm not sure whether I'd put the measurements directly into the widget - there's a LOT of measurements in vedo, so maybe there's a better way of making these accessible?

totally open to that! sounds fine, except I dont' know how to do it :)
next 2 weeks i'll be probably to busy to have a look...

totally open to that! sounds fine, except I dont' know how to do it :)
next 2 weeks i'll be probably to busy to have a look...

The measurements already exist in napari-process-points-and-surfaces, so I think all we'd have to do is to either load the values assigned to the vertices in the mesh (formated as (vertices, faces, values)) into the MeshCutter or check whether a table of features has been assigned to the mesh in napari (pandas DataFrame attached to the layer in the viewer like layer.features).

totally open to that! sounds fine, except I dont' know how to do it :)
next 2 weeks i'll be probably to busy to have a look...

The measurements already exist in napari-process-points-and-surfaces, so I think all we'd have to do is to either load the values assigned to the vertices in the mesh (formated as (vertices, faces, values)) into the MeshCutter or check whether a table of features has been assigned to the mesh in napari (pandas DataFrame attached to the layer in the viewer like layer.features).
Do you mind if I copy the other parts of this PR (wider window, loading mesh button, etc) into separate PRs?

Sure. Go ahead with it!


Javascript registered in renderDynamic doesn't appear anywhere when PageCache is used

JS or CSS registered with registerJS, registerJSFile etc will not work in renderDynamic. This problem causes, that it is not possible to use any widgets in renderDynamic on a cached page which has JavaScript or CSS assets. This issue is basically #16051 re-opened with simple step-step reproducing.
What steps will reproduce the problem?

Create a YII2 system with the Basic Template and go there:

composer create-project --prefer-dist yiisoft/yii2-app-basic basic
cd basic

Add the following line as line 2 in views/site/index.php:

$this->renderDynamic('$this->registerJs("alert(\'JS started\')");');

Start the simple WEB server

php yii serve --port=8888

Go in browser to http://localhost:8888 Te alert box will appear, and you can find the following lines also in the page source:

<script src="<script>jQuery(function ($) {
alert('JS started')
});</script>

Now add PageCache to the Index action. Add the following code in the function behaviors in  controllers/SiteController.php:

'indexCache' => [
    'class' => 'yii\filters\PageCache',
    'only' => ['index'],
    'duration' => 86400,    // 1 day
    'enabled' => true,
],

Check again the Home page. The JS code and the alert IS NOT INCLUDED anymore.

What is the expected result?
The registered JavaScript  should appear in the HTML page.
What do you get instead?
All Javascript registered in renderDynamic is missing.
Additional info

Q
A

Yii version
2.0.29

PHP version
PHP 7.2.24-1+ubuntu16.04.1+deb.sury.org+1

Operating system
Ubuntu 16.04

@yiisoft/reviewers what do you think?

I'd not change the default behavior for Yii 2.x (as always :smiley:) - if available, it should be optional.

Overall it looks like a massive change in behavior so I agree it's not a good idea to solve it like that.
@nagyt234 I'm closing the issue as "won't fix" but if there's a way I can't see please let me know.

OK, I agree, that to solve this issue generally is very difficult and would decrease the effectiveness of the cache. But than at least the documentation of renderDynamic should mention, that the functions register... have no effect.
What could be quite easy, if we would have a 2nd set of functions, like register...Dynamic which could work also with placeholders and with the limitation that assets already on the cached page are not analyzed.

Where would you document that? Actually too many methods do not work with dynamic rendering. Basically everything except meta-tags.

@samdark I would write exactly what you wrote here in the description of renderDynamic and probably in  The Definitive Guide to Yii 2.0:
Methods that indirectly modify layout (registerJS, registerJSFile, etc.)  do not work with dynamic rendering. Basically everything except meta-tags.


Blog post about eleventy folder structure

Hi, I'm recently write blog post about 11ty, Where must add it to accessible as eleventy tutorial?
Mastering Eleventy Folder Structures: From Default Setups to Real-World Best Practices in @njfamirm blog.

Explore the essentials of Eleventy's folder structure in this guide, perfect for optimizing your project's efficiency and scalability. Learn from basic setups to advanced custom structures, ensuring your 11ty site is perfectly organized for peak performance.

Great post. While not the official Eleventy site, I have added your post to a site that I have that collects resources all focused on Eleventy. You'll find it in 3 categories: Getting Started, Configuration, and Performance. Check out the Getting Started category here where your post is the most recent:
https://11tybundle.dev/categories/getting-started/

Great post. While not the official Eleventy site, I have added your post to a site that I have that collects resources all focused on Eleventy. You'll find it in 3 categories: Getting Started, Configuration, and Performance. Check out the Getting Started category here where your post is the most recent:
https://11tybundle.dev/categories/getting-started/

This is great, thank you


Frame timing seems to be calculated incorrect

Description
The event timing feature in the Event Browser seems to not be working correctly when it comes to calculating the overall frame time. See the attached screenshot. It reports a zero time for the entire frame, despite it also reporting the frame has a renderpass that takes 124us.
The screenshot includes some logging I've added to EventItemModel::CalculateTotalDuration(), which is what is ultimately producing the numbers in that tree column. I think it might prove helpful in showing what's going wrong. Specificaly, I wonder if the root action node shouldn't have ActionDescriptions for 6,14,15,16, instead of 6,17,15,16
Steps to reproduce
I cannot share the rdc file, but I will describe how I created it, using our Android platform.

installed the GAPID apk that comes with AGI (spinning cube app)
capture a frame
press the Timing button in the Event Browser

Environment

RenderDoc version: 1.24
Operating System: host=linux, target=Android-arm64
Graphics API: Vulkan

This only applied in the case of fake markers, because their EIDs are out of order so it wasn't properly recalculating the root after them. That commit should fix it.


Fixed a small typo.

Hi. I found a minor typo. It doesn't really matter though... Please fix it anyway. :D
Best regards,
Angel

Thanks. If perfectionism could make this thing just a little better, I will be fine.


fix: 🐛 handle lack of proper acccess checks in the webapp

The access check on content-types is slightly buggy in the web app and needs to be addressed separately.

@suevalov correct.


[FEATURE] add hwinfo to supportbundle

Gather hwinfo or dmidecode output to supportbundle.
The hwinfo would need to be added to SLE Micro for Rancher and hwinfo added to the bundle. This is to understand any potential hardware issues, compatibility and scheduling availability for virtual machines. Also to understand longhorn-available hardware like controllers, SSDs. But not limited because we may also need to see GPUs, chipsets and further information for SR-IOV, etc.

added in baseos.
It would be fixed in https://github.com/harvester/harvester-installer/pull/367

Included. Feel free to close.


New Landscape Entry - RISCV-VP

Project Name
RISCV-VP
Description
RISCV-VP is a configurable and extensible platform to build Virtual Prototypes (VP) for RISC-V using C++/SystemC and TLM. Features include support for all standard RISC-V extension for the 32 and 64 bit architecture including the M/S/U privileged architecture, advanced software debugging capabilities using a GDB interface with an optional Eclipse GUI, a HiFive1 configuration and support for graphical environment models, and support for several operating systems including RIOT, Zephyr, FreeRTOS and Linux.
The VP can be used for early Software development and verification, as well as Hardware design space exploration and prototyping on the basis of SystemC TLM 2.0.
Homepage URL
https://agra.informatik.uni-bremen.de/projects/risc-v/
Crunchbase URL (https://www.crunchbase.com/)
https://www.crunchbase.com/organization/university-of-bremen-2
Repository URL
https://github.com/agra-uni-bremen/riscv-vp
Organization hosting or owning the project
Group of Computer Architecture, University of Bremen
Evidence of RISC-V ecosystem support
On the homepage we host an updated list of our peer reviewed related publications, which were published in journals, conferences and workshops. Additionally, other research groups utilize our implementations in various degrees for education and lecturing, as well as research work on their own.
We can provide more information if needed.
Logo
No logo available at this time
Category
Design Tools

+1

+1, we are good to go @bprestonlf !


fix(security): vulnerabilities found in fabric-all-in-one

Fixes #2056

Thanks for the contribution. This looks more likely a nice to have sort of thing, rather than a vulnerability fix as we dont call the AIO images as production ready, those are just for testing purposes. But yes, still the base image change is a good update.

@izuru0 @sanvenDev following up for your review. Thank you.

@petermetz DCO is now fixed


Translate error messages from auth.js

In #22 I've added a Dutch translation for one single message ('press button').
However, I didn't translate the error messages (yet): https://github.com/darookee/u2f-two-factor-bundle/blob/master/Resources/public/js/auth.js#L10
What's the best way to translate error messages in a Javascript file? I know how translations in Symfony/Twig work, but I'm not sure what's the best way to translate strings from a Javascript files.

I'm not aware of any best practices for translating string ins JS files in a symfony environment, but this bundle looks promising. But using it would add another dependency to this bundle...

Using a bundle to translate just a couple of short error messages seems somehow overkill to me.
Maybe we should do something like this:
<script type="text/javascript">
    var translations = {
       // ...
       'yes' : {{ 'yes' | trans }},
       // ...
    }
</script>

Stolen from https://stackoverflow.com/questions/6940433/what-is-the-best-way-to-translate-javascript-literal-strings-in-assetic-assets/42175123

Yes, that sounds reasonable.

Let's pick this up together with #25.
I think we should translate the types, not the codes:
https://github.com/grantila/u2f-api#user-content-errors

OK = 0 // u2f-api will never throw errors with this code
OTHER_ERROR = 1
BAD_REQUEST = 2
CONFIGURATION_UNSUPPORTED = 3
DEVICE_INELIGIBLE = 4
TIMEOUT = 5


Review how accessible editor place holders are

@isidorn need your brain here
When I enabled editor place holders to appear when an editor fails to open, I also pushed a change to remove the error toast that would appear in that case, so as a user all you get is an editor that you first have to figure out that an error is presented.
For someone that relies on screen reader this maybe now harder to figure out compared to before, because every notification toast is announced as alert and thus was clearly different from a normal editor opening successfully.
I think the question is mainly: what should the accessible text be announcing in case of an error and should we also send out an ARIA alert like we did before with the toasts?
Here is a recording how macOS behaves:

Btw we have the exact same problem already for workspace trust editors where we were never showing a toast, so I wonder if this was ever discussed @sbatten @lszomoru ?

Oh! I just figured out I can tweak the label via ARIA, can do that for all our placeholders:

I think we are good then?

@bpasero love your fix. It is always better to not use aria alerts, but labels based on focus.
So yeas we are good. Ideally tab goes to the actions, and if that is the case I think it is fine that we do not announce in advance number of actions.


Product images not displaying ?

How can i display product images in front end  ??? below is my code but it's not displaying ?
@foreach($product->images as $image)
{{dd($image->path)}}
@endforeach

Hi, did you check if the image are attached to the product?
Will this give you anything?
@foreach ($product->images as $image)
{{ var_dump($image) }}
@endforeach

The images should be stored in the location specified in src/config/image.php.
By default it's at "public/assets/img".
To get the full URL, you can use the helper function:
use Redooor\Redminportal\App\Classes\Imagine;

$imagine = new Imagine;

foreach ($product->images as $image) {
$imagine->getUrl($image->path)
}

I want to integrate your dashboard with my own created html template and  i want to display images in view called frontend.blade.php when i use below code
@foreach ($product->images as $image)
{{ var_dump($image) }}
@endforeach
it is giving me an error
Trying to get property of non-object (View: C:\laragon\www\myproject\resources\views\welcome.blade.php)
and i am also unable to get full Url of image.
And i also created a new model to display data in frontend with same name.

And can't display categories image. with above code where i am fetching data from category table.
Controller
$sub_categories = DB::table('categories')->whereNotNull('category_id')->orderBy('name')->paginate(20);
View

                @foreach($category->images as $image)
                    id }}">
                        path}}" alt="" />

                                <?php echo $category->name; ?>

                            shop now

                  @endforeach

        <?php endforeach; ?>

Hi,
You're using the model wrongly, that's why you can't get the images.
In order to use the Eloquent model, you need to call the model directly.
To get Category, you should do this instead:
use Redooor\Redminportal\Models\Category;

$sub_categories = Category::whereNotNull('category_id')->orderBy('name')->paginate(20);

Notice I didn't use DB::Table('categories') because all the properties won't be available if you use DB class. You have to use Category class.
As for the layout of images, it's up to you to develop the frontend code to display them. You could use a list to hide all but first image with CSS, and then use Javascript to display one at a time when user click the next button.

Great.
and how can i show first image as i add multiple images to product  in frontend??? image share above.

Hi,
You can do all things Eloquent to the model.
$product = Product::find($some_id);

// Get first image of the product, it'll return null if no image found
$first_image = $product->images()->first();

// You can even get certain number of images like this
$get_3_images = $product->images()->get(3);

I had created bundle products and want to show bundle products image with below code but getting Null resutl... help needed.?
$bundle = Bundle::find($id)->first();
//dd($bundle);
$first_image = $bundle->images()->first();
dd($first_image);

Hi @ZaheerAbbasAghani , you probably need to explore more about Laravel framework first before attempting to use this package.
Bundle::find($id) will give you the object if the ID is found. You don't need to use first() on it.
Bundle::find($id);
Is the same as
Bundle::where('id', $id)->first();


http500 first run selenium/standalone-firefox

Expected behavior
image selenium/standalone-firefox downloads
Actual behavior
We're sorry, there seems to be an error
Information about the Issue
(HTTP code 500) server error - {"message":"Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:53693->[::1]:53: read: connection refused"}
Steps to reproduce the behavior
type in console docker run --rm -p 10044:4444 --name selenium-firefox  selenium/standalone-firefox

Are you behind a firewall or VPN?
See our wiki for possible solutions:
https://github.com/docker/kitematic/wiki/Common-Proxy-Issues-&-Fixes


Cleanup Code

Including

Make object expected in constructor use proskomma not pk
Check whether documents is still used now that we have history
Check for skew between mainSequence and mainSequenceId between here and HTML subclass

Also add some sort of linter and make sure that the code conforms to it.


[Caloris 2] Move Notion to chunking V2 with structure

Related task
Notes

differs a bit from framing => rather than 1 section per block, uses the already-rendered markdown with pre-existing lib function renderMarkdownSection

as a consequence, no extra line return between blocks (one line return only)

Wondering about removing last editor / last edited to lighten the prefix size?

Rendered content ======

Notion page =======

@spolu PMRW


PWA: Splitting main.JS into 2 files - libraries & business logic

Ionic version:  (check one with "x")
[x ] 2.x
I'm submitting a ...  (check one with "x")
[ x] feature request
Current behavior:

Currently when we run ionic build browser --prod we get 1 main.js file that contains both libraries (Angular, Ionic, etc.) and application logic/UI(AOT).
Expected behavior:

Developers often update application without changing libraries. Having production bundle split in 2 (for example libraries.js & app.js) would allow:

Speedup deployment as most of the time developers can upload just changed app.js part. (for example when deploy to Google AppEngine just changed files are uploaded).  On 2G connection few extra MB do make a difference.
Minimize traffic & response time for clients for requests after an app updated.

An additional 1 HTTP(s) request should not be a big deal and not a problem at all for those who use HTTP2 (you should).
Of course a proper lazy loading with multiple modules would be a more generic and a preferable solution but splitting into 2 bundles can be a good interim or "settings free by default" alternative.
Steps to reproduce:
ionic build browser --prod
Other information:
Ionic RC4

This issue was moved to driftyco/ionic-app-scripts#623


friends tab

you can put in other peoples usernames and then their going/maybe cards go into the feed too?

acutally makes more sense if this puts cards in your feed with artists you both track?


kvstore: Add TLS support for consul

Fixes:#5138

This change is

Coverage decreased (-0.02%) to 43.936% when pulling 2531086bb8fbdd6730689073960e11cac88d019e on nirmoy:consul_tls into e5f84759ed9085d466592787eccee7d5968a088a on cilium:master.

@aanm  I am bit new to the go/cilium test framework, shall I do the unit test in another PR ?

@nirmoy I was just thinking on having consul being set up with a tls certificate and cilium being configured with it.

test-me-please

test-me-please

test-me-please

test-me-please

@nirmoy I assume the PR is ready to be reviewed again?

test-me-please


Extracting region proposals

Really a great work. Helped me to understand better. Can you please tell me the steps to follow to get region proposals for a test image?

Hello, I feel your pain. I believe the regions are in the following file and line: https://github.com/kentaroy47/frcnn-from-scratch-with-keras/blob/master/test_frcnn.py#L170
where:
	# convert from (x1,y1,x2,y2) to (x,y,w,h)
	R[:, 2] -= R[:, 0]
	R[:, 3] -= R[:, 1]

I think these are the raw region proposals relative to the feature map size (not the image image) thus a transformation is needed. Maybe multiply them by C.rpn_stride*x, C.rpn_stride*y, C.rpn_stride*(x+w), C.rpn_stride*(y+h) as in line 217 of the same file? Let me know how it goes.

@praisethemoon Actually I have only gone-through the code. I believe the line python train_rpn.py --network mobilenetv1 -o simple -p /path/to/your/dataset/ given in README.md is training the RPN module on my own data set. I have only some images of which I have to extract the region proposals. Could you explain me in detail the commands to run/portions to edit for acheiving the same?
Thanks in advance.
Waiting for a reply.

@djongpo  I also faced a similar issue while implemeting the paper 'Perceptual GAN for small object detection' where I need to do RoI pooling on a feature map for that I need the proposals. I wonder if you would help me out?

@GauravKrRoy
https://github.com/kentaroy47/frcnn-from-scratch-with-keras/blob/master/train_frcnn.py#L212-L214
RPNs and ROIs are extracted in the above lines.
You should take the outputs there and use it in your part of research.

When I run python train_rpn.py it asks for dataset path. I see that you have used VOC dataset. Can you provide the dataset you have used or a link to download the same?

Hey @kentaroy47 I see that you have predicted the region proposals and then found out the region of interest bounding boxes in https://github.com/kentaroy47/frcnn-from-scratch-with-keras/blob/6d173775b94879e9b7cb36f31bc75a0b99b72485/train_rpn.py#L213-L216 . I really appreciate your work of separately training the RPN network. It will be very helpful in my research work if I can use the train_rpn.py file for predicting on my test images. I wonder if these lines(L213-L216) would do my work? I also want to save the model of RPN training, I believe that I should include model_rpn.save() before https://github.com/kentaroy47/frcnn-from-scratch-with-keras/blob/6d173775b94879e9b7cb36f31bc75a0b99b72485/train_rpn.py#L224

@GauravKrRoy
yes, you should save the model at the end of training.
then, if you load the model and use model.predict, you can get the roi for the input images.
I can write the script but will take some time..

Hey, @kentaroy47  @GauravKrRoy  I wrote a separate code, where I load the saved trained model and predict the region proposals from that. Here is the code:
`from future import division
import random
import pprint
import keras
import sys
import time
import numpy as np
from optparse import OptionParser
import pickle
from keras import backend as K
from keras.optimizers import Adam, SGD, RMSprop
from keras.layers import Input
from keras.models import Model
from keras_frcnn import data_generators
from keras_frcnn import config
from keras_frcnn import losses as losses
import keras_frcnn.roi_helpers as roi_helpers
from keras.utils import generic_utils
import cv2
from keras.models import load_model
image = cv2.imread("/home/pg2017/cse/17071016/img_519.jpg")
model = load_model("RPN_model1.h5")
P_rpn = model.predict(image)
R = roi_helpers.rpn_to_roi(P_rpn[0], P_rpn[1], C, K.image_dim_ordering(), use_regr=True, overlap_thresh=0.7, max_boxes=300)
X2, Y1, Y2, IouS = roi_helpers.calc_iou(R, img_data, C, class_mapping)
print(X2, Y1, Y2, IouS)`
but it gives error as:
Traceback (most recent call last):   File "rpn_test.py", line 23, in <module>     model = load_model("RPN_model1.h5")   File "/home/pg2017/cse/17071016/.conda/envs/myenv/lib/python3.7/site-packages/keras/engine/saving.py", line 419, in load_model     model = _deserialize_model(f, custom_objects, compile)   File "/home/pg2017/cse/17071016/.conda/envs/myenv/lib/python3.7/site-packages/keras/engine/saving.py", line 312, in _deserialize_model     sample_weight_mode=sample_weight_mode)   File "/home/pg2017/cse/17071016/.conda/envs/myenv/lib/python3.7/site-packages/keras/engine/training.py", line 137, in compile     loss_functions = [losses.get(l) for l in loss]   File "/home/pg2017/cse/17071016/.conda/envs/myenv/lib/python3.7/site-packages/keras/engine/training.py", line 137, in <listcomp>     loss_functions = [losses.get(l) for l in loss]   File "/home/pg2017/cse/17071016/.conda/envs/myenv/lib/python3.7/site-packages/keras/losses.py", line 133, in get     return deserialize(identifier)   File "/home/pg2017/cse/17071016/.conda/envs/myenv/lib/python3.7/site-packages/keras/losses.py", line 114, in deserialize     printable_module_name='loss function')   File "/home/pg2017/cse/17071016/.conda/envs/myenv/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 165, in deserialize_keras_object     ':' + function_name) ValueError: Unknown loss function:rpn_loss_cls_fixed_num
I can't figure it out. Can you help @kentaroy47 ? Did you do it @GauravKrRoy ?

when loading custom loss functions, we need to pass that during model loading.
https://github.com/keras-team/keras/issues/5916
from keras_frcnn.losses import rpn_loss_cls_fixed_num, rpn_loss_cls
model = load_model("RPN_model1.h5", custom_objects={'loss_function': rpn_loss_cls_fixed_num})

may work.

@kentaroy47 Thank you for the great repo! It is a pleasure reading through the code.
I cannot seem to figure out how to extract the region proposals and put bounding boxes around them. The script djongpo wrote does not work on my machine because it cannot load the model for some reason. Also, my model was saved as a .hdf5 instead of .h5?
Have you worked on the script to do test_rpn.py? I would love to see what I am doing wrong in loading the model and then applying it to an image.
thanks @kentaroy47 !

@djongpo
when loading custom loss functions, we need to pass that during model loading.
keras-team/keras#5916
from keras_frcnn.losses import rpn_loss_cls_fixed_num, rpn_loss_cls
model = load_model("RPN_model1.h5", custom_objects={'rpn_loss_cls_fixed_num': rpn_loss_cls_fixed_num})

should work. just define rpn_loss_cls_fixed_num and pass it to the model.
BTW, I'm not sure why that pops up when loading rpns (didn't happen to me).
might be a Keras version issue?

when iam predicting region proposals using model.predict it is showing that  expected input_1 to have 4 dimensions, but got array with shape (1632, 1280, 3).how can i solve that can you please help me

@kentaroy47 @marvision-ai @GauravKrRoy can i use the same load_model method for the main frcnn? has anyone tried to load the main model and predict? any help will be greatly appreciated!


importing parse_execution_engine

importing parse_execution_engine otherwise prefect-fugue doesnt work

As I mentioned in https://github.com/fugue-project/fugue/issues/519, the change needs to be make inside prefect-fugue, I will let you know.

This change is not necessary because prefect-fugue has been updated.


CommandProcessor.process() never ends (race condition and EGL error: 0x3003)

I'm using GLCapture to record a video. But I noticed that sometimes (about 50% percent of the times) generated video is not readable.
Navigating through source code and debugging, I noticed that sometimes, commandProcessor.process() inside CapturePipeline.java never ends, because commandProcessor.stop() has not been called. If commandProcessor.process() never ends, then pipeline.release() is not called. Inside pipeline.release() is where sources and sinks are closed (where file writing is finished). So the result is that commandProcessor.process() is stuck in while (!stopped) doing nothing, and files are not readable.
So, where is commandProcessor.stop() called? In Pipeline.java, when the sink is set (setSink), a stop listener is assigned to it, and commandProcessor.stop() is called when sink is stopped. The sink is an instance of MuxRender, and I saw that onStopListener.onStop() is executed when MuxRender.drain method is executed exactly the same number of times that plugins are connected to it. In our case, these are 2 (for video and audio). To sum up, commandProcessor.stop() is not called because MuxRender.drain method is only called 1 time.
Who have to call MuxRender.drain method? It's PullDataCommandHandler.handle (command handlers are executed in CommandProcessor.process()). PullDataCommandHandler.handle calls output.getFrame(), and if result is Frame.EOF, then input.drain is called. The input is always MuxRender, and outputs are AudioEncoder and VideoEncoder. I can advance that the problem is with video, so I will focus on video.
When all works correctly, it's like that:
To stop video capturing, we call GLCapture.stop(), who calls CapturePipeline.stop(), who calls Pipeline.stop(), who calls CaptureSource.stop() (mediaSource.stop()), who adds Command.EndOfFile to its commandQueue, and it's processed and it makes that DrainCommandHandler is executed, so VideoEncoder.drain() is executed. So, the next time that PullDataCommandHandler is executed to pass data from VideoEncoder to MuxRender, it will call getFrame() on VideoEncoder, who responds with Frame.EOF() (because it's drained), so such command handler will call MuxRender.drain(). And this is all we need: that MuxRender.drain() is called, so onStopListener is called, and commandProcessor.stop() is called, and pipeline.release() is a called, and all the work is stopped and files are finished correctly.
So, when is not working correctly? Let's see:
To stop video capturing, we call GLCapture.stop(), who calls CapturePipeline.stop(), who calls Pipeline.stop(), who calls CaptureSource.stop() (mediaSource.stop()), who adds Command.EndOfFile to its commandQueue. But before it's processed, this time the queue will process PushSurfaceCommandHandler (to pass data from CaptureSource to VideoEncoder), who calls CaptureSource.getFrame(), who returns Frame.EOF() and clears the commandQueue. As commandQueue has been cleared, Command.EndOfFile never is processed, so VideoEncoder is not drained, and PullDataCommandHandler won't call MuxRender.drain(), so it's onStopListener won't be called, and commandProcessor will be processing forever... and video file is not readable.
How to solve it? @jhognon suggests removing commandQueue.clear() method call from CaptureSource.java in Issue #41 to solve this race condition. It worked, because then Command.EndOfFile is processed, and everything goes fine. Is it the correct solution? Well, we don't know. But it works.
I executed it several times, it seemed it was working, but it happened again: commandProcessor never ends, and file is unreadable. But this time the generated file is 0KB. Debugging the project again, I found that an error is generated after calling EGL14.eglCreateContext in InputSurface.java. So no video data is processed, and of course, MuxRender.drain method is never called.
The generated error was EGL error: 0x3003 (BAD_ALLOC), which is generated if there are not enough resources to allocate the new context.
So, now the problem is that there are no enough resources to call EGL14.eglCreateContext. This lead to question: is EGL14.eglDestroyContext being called to free resources? I found it's called inside InputSurface.release(). InputSurface is instantiated in Surface.java. And... guess what? Surface never calls InputSurface.release(), so EGL14.eglDestroyContext is never called... I added a call to inputSurface.release() (and outputSurface.release()) inside Surface.release(), and now everything is working like a charm!
But, what if there is another error that makes commandProcessor() run forever? To ensure it won't happen again, I'm stoping pipeline's commandProcessor inside CapturePipeline.stop() method. With this call, I'll be sure that all the processing stops, and file is readable (so I reverted deleting commandQueue.clear() inside CaptureSource.java, because such modification is not needed).
I know it's not the correct solution, but a workaround until someone finds the correct solution.
I pushed these modifications to my github: https://github.com/sjvc/media-for-mobile
Is anyone maintaining this library? Please, take a look to this issue. Let me know if I can help.

@sjvc  Hi,do you know how to improve the output video quality when compress video?
If I enlarged bitrate, it's not work as expect.

I don't know, sorry @gzgang

@gzgang same problem
it just sets maximum allowed bitrate:
videoFormat.setVideoBitRateInKBytes(maxBitRate); but not recording bitrate..

This didn't work for me. It causes 0kb videos to be generated.
The other solution (commenting out commandQueue.clear()) works most of the time, but does occasionally time out causing the "Cannot stop capture thread" error to appear.
I've modified the m4m source to allow exporting videos larger than 1280 resolution. The timeout issues seem to happen more frequently for larger videos.
Thanks for the attempt though.


Supporting verifying KZG Commitments for Protodanksharding - EIP-4844

This may not be a priority

@wborgeaud We should get an estimate on the work for this by the way, iirc the KZG commitment verification was gonna be a bit of a PITA?

Here are the components of EIP-4844 that we'll need to implement:

New transaction type "blob transaction". This shouldn't be too hard, as this new txn type is very similar to the existing ones.
Gas market for blob transactions. Should be pretty easy, just amounts to adding a couple of fields to the block metadata.
New BLOBHASH opcode. Should be easy, just need to store the blob hashes in the global metadata.
New POINT_EVALUATION precompile. This new precompile verifies a KZG evaluation proof over the BLS12-381 curve. This will be harder to implement, but should be doable if we take the existing BN254 precompiles implementation and modify them for the BLS curve. This will be very costly though and thus the prover cost will be totally misaligned with the 50k gas cost of the precompile. So we should be sure we really need to support this precompile before starting the implementation.

Here are the components of EIP-4844 that we'll need to implement:

New transaction type "blob transaction". This shouldn't be too hard, as this new txn type is very similar to the existing ones.
Gas market for blob transactions. Should be pretty easy, just amounts to adding a couple of fields to the block metadata.
New BLOBHASH opcode. Should be easy, just need to store the blob hashes in the global metadata.
New POINT_EVALUATION precompile. This new precompile verifies a KZG evaluation proof over the BLS12-381 curve. This will be harder to implement, but should be doable if we take the existing BN254 precompiles implementation and modify them for the BLS curve. This will be very costly though and thus the prover cost will be totally misaligned with the 50k gas cost of the precompile. So we should be sure we really need to support this precompile before starting the implementation.

Thanks for the detail!

So are we good to just implement the first 3 items of Will's list fully, and have some kind of unchecked prover-provided result for the POINT_EVALUATION precompile for now?
@pgebheim @bpfarmer


Forward/rel/6.2.1

@ironman-machine go

Hello @alexandre-merle
Starting end to end procedure using the following payload:
{"REPO_NAME": "S3", "SCALITY_S3_BRANCH": "forward/rel/6.2.1", "DEFAULT_BRANCH": "master"}
Please follow http://ci.ironmann.io/gh/scality/Integration/6167 for CI status.

Merging on behalf of @LaurenSpiegel


Allow to run multiple tasks concurrently

Didn't find this issue. Allow to run multiple tasks concurrently. Currently it ask s to terminate running one.
This actually for watching tasks. And also seem that tasks are run some way differently that upcoming workbench terminal as they do not keep colors inside running scripts. Terminal and task runner seem to be very relative technically.

Dups #981

@dbaeumer
I've seen this issue, I thought that the question was a little bit different, it is about defining multiple tasks, a this issue is about concurrent execution, including tasks that are supposed to run "forever" like server/watching/etc.

The reason why I folded them is that if we allow running multiple tasks supporting multiple commands is almost a must. That we we plan to solve them together in one go.

I want to use 2 tasks concurrently:

tsc watch
tslint watch

They have different problemMatchers, so can not define as one task.

@twoeo this is possible with the task 2.0.0. It can run multiple tasks in parallel.

I think what @k8w meant and what I'm facing is starting multiple tasks in one command. I now have two tasks that I want to start at build, but I can only choose one default task. The other one I have to start independently via the Command Palette or by choosing it through Tasks -> Run Task. If I set both tasks as default build tasks with "group": {                 "kind": "build",                 "isDefault": true             }, they don't start automatically after using Ctrl+Shift+B and I have to choose one and repeat the process and choose the other.

@ceituna are your tasks watching tasks. If not you can define a new tasks that depends on the two others and mark that one as the default build task. However this is currently not possible if they are watching tasks.

@dbaeumer Only one of them is (a tsc watch). I wasn't aware of the dependsOn option. Couldn't find it in the docs. I've now setup a new task which depends on the other two as the default build task and everything works as expected. Thanks for the hint!

You are welcome. Agree that this should be documented as well.


How to visualize Metaworld simulation results?

Great job and need help~     I wanna to know how to view Metaworld simulation results and specify the corresponding weight model for running in Metaworld?

The metaworld results can be saved locally to videos, or can be exported to wandb for viewing.

The metaworld results can be saved locally to videos, or can be exported to wandb for viewing.

Could you be more specific and provide an example of how to set it up?

This can be a starting point to save and visualize the videos


Is Visiond now fully open source ?

In the last release, Version 0.5.8 (2019-01-17), we can see some code in the visiond parts and a comment on the release file that tell "Open source visiond".
So does it tell that now, openpilot is fully open source ?
I didn't see any announcement of that, but it's a great new if it's the case.
Thanks

I think all code (mainly C/C++) is now optimized for Snapdragon 820 platform. This means when porting to another platform you will have to deal with the differences. This means that porting within ARM platform will be easier than for example porting to x86. I have no experience in porting code between various ARM platforms, I am sure openpilot uses all possible HW acceleration like NEON (ARM's SIMD) etc. I have no idea how portable for exampe ARM's NEON code is.


Automatic differentiation JuliaDiff

This sounds right choice for us: http://www.juliadiff.org/
Probably this decision would mean that we need to implement more lower level code. Anyway it seems that these JuliaDiff packages are under active development.

http://nbviewer.ipython.org/github/joehuchette/OR-software-tools-2015/blob/master/6-nonlinear-opt/Nonlinear-DualNumbers.ipynb
Main difference between FAD and RAD:
FAD:
Dual numbers can be used to compute the gradient of a function $f: \mathbb{R}^n \to \mathbb{R}$. This requires $n$ evaluations of $f$ with dual number input, essentially computing the partial derivative in each of the n dimensions.
RAD:
When n is large, there's an alternative procedure called reverse-mode automatic differentiation which requires only O(1) evaluations of f to compute its gradient.

Ok, after studying this subject a bit closer I have good and bad news. Good news is that it's possible to implement. Bad news is that it's not that easy. Here's how it's used in FENiCS: http://arxiv.org/pdf/1211.4047.pdf
They have put a lot of effort for this thing to get it working. In 6.4, p. 32 they are talking about forward automatic differentiation (FAD). According to my studies (see notebook 2015-05-31-...) this needs n function calls by default and it's not going to work if we have n=million, so at least linearising the whole system of equations is indeed out of scope. In principle it should be possible to linearise just one element and use that information to assemble global matrices. But the tangent stiffness depends of the geometry of element ...

@ahojukka5 did you check this package: https://github.com/JuliaDiff/ReverseDiffSource.jl

I did but didn't get it working. I need to re-evaluate these packages and
do some timing to find out the performance of automatic differentiation
compared to the precalculated tangent stiffness matrix. This is still a
good idea but needs more work than I originally thought.
"Currently rdiff() will not work with for loops in the function definition.
This is caused by uncompressed_ast call not giving access to the original
function definition but to an interpreted version that is more challenging
to parse."
On Mon, Jun 1, 2015 at 7:37 AM, Tero Frondelius<EMAIL_ADDRESS>wrote:

@ahojukka5 https://github.com/ahojukka5 did you check this package:
https://github.com/JuliaDiff/ReverseDiffSource.jl
—
Reply to this email directly or view it on GitHub
https://github.com/ovainola/JuliaFEM/issues/14#issuecomment-107302720.

--
terveisin,
Jukka Aho

If this is the case, I change the milestone to 0.1.0 release. Maybe we will later post pone this even further.

Ok, it seems that development of automatic differentiation is accepted to Julia summer of code: https://groups.google.com/forum/#!topic/julia-users/bolLGcSCrs0
Jarrett Revels (@jrevels), Automatic differentiation (mentors: Miles Lubin @mlubin and Theodore Papamarkou @scidom).
There's already some development going on: https://github.com/JuliaDiff/NDuals.jl
Hopefully we are having soon something super fast that's comparable to FeNICS AD solution.

Could you describe at a high level what you're trying to differentiate?

@mlubin are you familiar with Finite Element Method? (https://en.wikipedia.org/wiki/Finite_element_method)
Basically we are trying to get solutions for a very large system of nonlinear equations, maybe ~10000 dofs/cpu. Equations rise from energy balance of some physical system. After linearisation of nonlinear residual vector the resulting matrix (jacobian) has a sparse structure (each "element" has a local support to neighbouring elements). Unknown field is approximated using polynomials so differentiating it is basically well defined task.
Due to the nature of finite element method the resulting global matrix can be assembled from smaller elements, which have 5~60 dof/element.
I mainly see two different options to differentiate the global system. One is to differentiate the whole system after assembly (~10000 degrees of freedom/cpu, sparse matrix) but I think it's too hard task. Another more common option is to linearise each single element (5-60 dofs, dense matrix) and after linearisation assemble them to global matrix (sparse matrix) which should be easy enough. I'm experimenting both strategies in notebooks:
https://github.com/ovainola/JuliaFEM/blob/master/docs/2015-05-23-one-element-solution.ipynb
https://github.com/ovainola/JuliaFEM/blob/master/notebooks/2015-05-31-two-element-solution.ipynb
Traditionally each element is linearised analytically before assembly and it needs a lot of cumbersome math. We however believe that this can be done in automatic sense with comparable performance because working proof of concept already exists in FENiCS. (See http://arxiv.org/pdf/1211.4047.pdf, 6.4 from p. A:32 for description how it is done there). I'm happy to give more information about this problem if needed.

Ok so I did some performance studies comparing how much FAD is slower than analytical solution, see
https://github.com/ovainola/JuliaFEM/blob/master/notebooks/2015-06-15-performance-studies.ipynb
Interestingly FAD version 12.6s is just a bit slower than analytical 10.0s. But I think both of them are quite slow. Could @ovainola do some optimisation and profiling for notebook ..?
Anyway the performance is easily in same decade at the moment for both cases.

@ahojukka5 ye sure, I'll get on it after I compile my julia again..

@ahojukka5 this might be an interesting package for us: https://github.com/ajt60gaibb/FastGaussQuadrature.jl

I've been using https://github.com/JuliaDiff/ForwardDiff.jl for a while an it seems to be quite promising. It has some bugs atm, but 27 is coming within couple of weeks and it fixes quite a lot of things.

If you have seen my latest notebooks, thanks to multiple dispatch, user must define
function get_lhs(eq::Equation, xi::IntegrationPoint) ... end
function get_rhs(eq::Equation, xi::IntegrationPoint) ... end

and basically that's it. If there's something cumbersome stuff which is hard to linearize analytically there's always an option to use ForwardDiff. It's not harder than define some potential energy / residual function and say
get_lhs(eq::Equation, xi::IntegrationPoint) = ForwardDiff.jacobian(R, xi)

Is there anything relevant in this issue left or should we close it? We are already using ForwardDiff in several parts in code. And it's doing very good job, see it in action, for example, in
https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/src/lagrange.jl#L43
where we can generate partial derivatives for the whole family of finite elements automatically.

Sorry for stomping in here but I am also trying to use Automatic Differentiation a bit for my FEM code. Do you guys know if it is possible to generate the algorithmic tangent stiffness(ATS)-tensor using AD when you have a nonlinear material model?
I have tried using AD for the residuals in the material model and this work perfectly but ideally you would also like to be able to get dσ / dε as well. However, since σ is implicitly defined by ε maybe it is not possible to use AD? Have you tried anything along those lines?

Yeah it should be possible, why not. You maybe need to use Voigt notation for this however.

Yeah, I think I figured it out. I can post an example later for reference.

I tried to calculate dσ / dε like this, notice Voigt notation:
# function for sigma: σ = C * (ε_total - ε_plastic)
function sigma(material_tensor, total_strain, plastic_strain)
    return material_tensor * (total_strain - plastic_strain)
end

# Just for an example, let's define plastic strain vector and material tensor
>> plastic_str = rand(6)
>> material_ten = rand(6, 6)

# curried function for AD
>> curried_sigma(strain) = sigma(material_ten, strain, plastic_str)

# creating function for dσ / dε
>> ds_de = ForwardDiff.jacobian(curried_sigma)

# now we have some arbitrary strain vector tot_str
>> tot_str = rand(6)
>> ds_de(tot_str)
6x6 Array{Float64,2}:
 0.377843   0.107897  0.487201   0.256884   0.265148  0.872675
 0.517356   0.361257  0.174381   0.0559181  0.968225  0.985205
 0.600921   0.521765  0.642977   0.972733   0.163498  0.878121
 0.0888618  0.618082  0.0763775  0.782576   0.748793  0.0722524
 0.867195   0.665913  0.134167   0.107381   0.446633  0.214419
 0.166873   0.830051  0.398876   0.362889   0.333876  0.154155

I believe that would give you the "continuum tangent stiffness". However, when you have non linear material models that you have to iterate to get the stress you need to have a tangent that is consistent with the way you integrate the flow rules, usually called Algorithmic or Consistent Tangent Matrix.
Here is an example where I use forward diff to both compute the jacobians for the residuals in the non linear system for the stress, and for the ATS tensor for the following problem: http://imgur.com/a/BvE4y
https://gist.github.com/KristofferC/b70949c284d7c0330deb

If anyone is interested I put up a small package about constitutive modeling. Some of the example material routines use automatic differentiation. https://github.com/KristofferC/ConstLab.jl

I'll take a look. I have a interest in modelling material models though I'm not very good yet.

I'm not so good either hehe. I started a Phd project about modeling crystal plasticity so I have to get good fast :P

Nice :D I'm doing my masters also from crystal plasticity. I'm doing the writing part atm. but I'll try to practice a bit more this material modelling in my free time.

Well no responses here regarding to this subject. I'm closing this. I'm not interested of how lhs is returned as long it is, it can be calculated analytically or doing hard math.


Update production bundle versions for v0.19.8 patch release:

Issue #, if available:
Description of changes:
v0.19.8 patch release.
Testing (if applicable):
Documentation added/planned (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve


Feat: Added insert new to components

Feat: You can now replace the default InsertNew component via Components prop.
Feat: The InserNew component now gets children ids as a prop.

:tada: This PR is included in version 2.2.8 :tada:
The release is available on:

v2.2.8
GitHub release

Your semantic-release bot :package::rocket:


Refactor KvTree trait, engine, functions, etc to be async

This is required for a proper Postgresql, Redis, etc implementation.

I'm pretty sure this is solved at this point.


Update docker scripts under Windows

Update create_container.sh
Update login_container.sh
Update start_container.sh
Special casing for Windows, nor winpty, are not needed so long as docker is on terminal path.

The "//" are odd, but appear to work on Mac and Linux as well as Windows.


custom filters with async_true enabled giving 'coroutine' object is not subscriptable error

Description
When applying a custom (synchronous) filter to a passed in object in a for loop, we are getting a TypeError: 'coroutine' object is not subscriptable Error. It seems to be an extension of this issue: https://github.com/pallets/jinja/issues/1141
Reproduction
Very similar to the above issue, you can minimally reproduce like:
{% for item in (a.b|add_two(5))[:1] %}{{ item }}{% endfor %}
with a jinja environment of:
jinja_env = jinja2.Environment(enable_async=True)
jinja_env.filters.update({'add_two': lambda x, y: [i+y for i in x]})

rendering with a=dict(b=[1,2,3]) will result in the 'coroutine' object is not subscriptable
We tried removing the parenthesis around the method call:
{% for item in a.b|add_two(5)[:1] %}{{ item }}{% endfor %}
but that results in a different jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got '[' error
Environment

Python version: 3.9
Jinja version: 3.0.3

I was about to report this issue as well. This is occurring with filters and custom functions. Below is a simple test we used to reproduce both cases:
def load_template(name: str):
    if name == 'filter':
        return '{%- set sorted = (data  | sort)[:1] -%}{{ sorted }}'
    elif name == 'call':
        return '{%- set sorted = external_call(data)[:1] -%}{{ sorted }}'

env = Environment(loader=FunctionLoader(load_template), enable_async=True)
env.globals.update(external_call=lambda lst: sorted(lst))

# Failure with filter
template = env.get_template('filter')
asyncio.run(template.render_async({'data': ['a', 'c', 'b']}))

# Failure with call
template = env.get_template('call')
asyncio.run(template.render_async({'data': ['a', 'c', 'b']}))

Our workaround was to set a custom code_generator_class for our environment. This custom class is a subclass of CodeGenerator. We override the visitor for visit_Call to add the extra ( before the await in self.write("await auto_await(") so it is self.write("(await auto_await("). Of course, we had to add an extra ) at the end as well so the code reads:self.write("))")
We added a similar workaround for the _filter_test_common context manager to make it work for filters.
Here is our workaround code
class CustomCodeGenerator(CodeGenerator):
    @optimizeconst
    def visit_Call(self, node: nodes.Call, frame: Frame, forward_caller: bool = False) -> None:
        if self.environment.is_async:
            self.write("(await auto_await(")
        if self.environment.sandboxed:
            self.write("environment.call(context, ")
        else:
            self.write("context.call(")
        self.visit(node.node, frame)
        extra_kwargs = {"caller": "caller"} if forward_caller else None
        loop_kwargs = {"_loop_vars": "_loop_vars"} if frame.loop_frame else {}
        block_kwargs = {"_block_vars": "_block_vars"} if frame.block_frame else {}
        if extra_kwargs:
            extra_kwargs.update(loop_kwargs, **block_kwargs)
        elif loop_kwargs or block_kwargs:
            extra_kwargs = dict(loop_kwargs, **block_kwargs)
        self.signature(node, frame, extra_kwargs)
        self.write(")")
        if self.environment.is_async:
            self.write("))")

    @contextmanager
    def _filter_test_common(
        self, node: Union[nodes.Filter, nodes.Test], frame: Frame, is_filter: bool
    ) -> Iterator[None]:
        if self.environment.is_async:
            self.write("(await auto_await(")

        if is_filter:
            self.write(f"{self.filters[node.name]}(")
            func = self.environment.filters.get(node.name)
        else:
            self.write(f"{self.tests[node.name]}(")
            func = self.environment.tests.get(node.name)

        # When inside an If or CondExpr frame, allow the filter to be
        # undefined at compile time and only raise an error if it's
        # actually called at runtime. See pull_dependencies.
        if func is None and not frame.soft_frame:
            type_name = "filter" if is_filter else "test"
            self.fail(f"No {type_name} named {node.name!r}.", node.lineno)

        pass_arg = {
            _PassArg.context: "context",
            _PassArg.eval_context: "context.eval_ctx",
            _PassArg.environment: "environment",
        }.get(
            _PassArg.from_obj(func)  # type: ignore
        )

        if pass_arg is not None:
            self.write(f"{pass_arg}, ")

        # Back to the visitor function to handle visiting the target of
        # the filter or test.
        yield

        self.signature(node, frame)
        self.write(")")

        if self.environment.is_async:
            self.write("))")

class CustomEnvironment(Environment):
    code_generator_class = CustomCodeGenerator

Thanks for the good examples and investigation. It looks like other parts that use auto_await add surrounding parentheses, but the parts for filters/tests and calls missed it.


Simplify workflows, build example app apk

Since there were some android build errors in the recent PRs, I thought it would be nice to catch these automatically.
This can probably also be done for iOS.
Btw, what is the reason for the two separate workflow files here? As far as I can see, they're doing the same. Except for the triggers.

@fdietze it seems there is something wrong as the action is not run for this PR, any ideas why? I will take a look as well

@wolfenrain has been upgrading our github actions on other repos as well, would love if you could take a look!

@fdietze it seems there is something wrong as the action is not run for this PR, any ideas why? I will take a look as well

Indeed. I had a syntax error. ": " in values is not allowed in yaml.

@wolfenrain has been upgrading our github actions on other repos as well, would love if you could take a look!

Did a quick look, and if you are thinking of reworking the actions, I would recommend splitting it up in separate jobs(in a single file). And create fake stages.
So you have a stage for linting:
jobs:
  dartdoc:
    ...dartdoc stuff

  format:
    ...format stuff

  analyze:
    ...analyze stuff

After that you can add a stage for testing, these jobs will then have a needs keyword filled with the jobs from the linting stage:
  test:
    needs: [dartdoc, format, analyze]
    ...test stuff

And after that you can have your build/driver stage:
  ios:
    needs: [test]
    ...build ios stuff

  android:
    needs: [test]
    ...build android stuff

  web:
    needs: [test, drive]
    ...build web stuff

This allows for quicker action fails, and allows for quick overview in github when a job fails instead of a job that fails because one of its inbetween steps failed.

@wolfenrain I love it! let me merge this and I will try to break it down like that
@fdietze I think we can do flutter build ios --release --no-codesign. I will merge this and try to uncomment the iOS build


added linkedin automation with python and selenium

Description
added linkedin automation with python and selenium
Fixes #5
linkedin  automation
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Documentation Update
[ ] Frontend
[X] Backend

Checklist
Please tick all the boxes that are fulfilled by your Pull Request.
These checkboxes can be checked like this: [X]

[X ] I have named my files and folder, according to this project's guidelines.
[X] My code follows the style guidelines of this project.
[X] My Pull Request has a descriptive title. (not a vague title like Update index.md)
[X] I have commented on my code, particularly in hard-to-understand areas.
[X] My code additions/changes do not produce any warnings.

Have a separate branch for it

Have a separate branch for it

it is in a seperate branch only, it is in linkedin-automation branch


[Docs] a minor grammatical typo get_started.md

Motivation
Improve the docs.
Modification
a minor grammatical typo.
Checklist

[x] Pre-commit or other linting tools are used to fix the potential lint issues.
[x] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
[x] If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
[x] The documentation has been modified accordingly, like docstring or example tutorials.

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


Initialize 2.3.1.dev0 version

Coverage remained the same at 88.958% when pulling 3fcabe7474321587f5114b4eec5242fa02f92d3a on release/dev into 0ac52e7650d6a00b1a7b0512f1dc0aaf86e08da4 on master.


Setup: Encountered missing dependencies: cabal2nix ==2.10.*

Using latest nixpkgs (but shouldn't matter, because nixpkgs is pinned, right?) on Ubuntu 18.04.
Reproduce:
$ nix-build

Expected result: stack2nix builds.
Actual result:
Setup: Encountered missing dependencies:
cabal2nix ==2.10.*

Noticing that stack2nix.nix says:
      "cabal2nix" = callPackage
[ . . . ]
         mkDerivation {
           pname = "cabal2nix";
           version = "2.7.2";

Is it out of date and should be regenerated?

This is fixed in https://github.com/input-output-hk/stack2nix/pull/108, sorry :)


swift5

please update it to swift5, thanks!

Pull request is found here. Feel free to review!

https://github.com/SwiftyJSON/SwiftyJSON/releases/tag/4.3.0


Improve raven-node docs ...

Remove install.rst – the information was deprecated (e.g. supported node versions), and it was not linked to except in the sidebar
Add missing var raven = require('raven') in "Configuring the Client"
Move "Configuring the HTTP Transport" to the bottom of usage.rst (shouldn't be at top of page)
Remove redundant configuration example from usage.rst
Add Raven.captureException example to usage.rst

Hmm, I shouldn't remove the middleware / integrations link. Need to fit that back into the conversation somewhere.

As you mentioned, the middleware/integrations link should be there somewhere. Other than that, it's fine.


fix figure sizes in Nonconvex_scalar.ipynb

And clean up text and cross references a bit.
In particular I changed references such as [Burgers.ipynb](Burgers.ipynb) to [Burgers](Burgers.ipynb) to be consistent with what we do elsewhere and I think it looks a bit nicer in the notebooks.
There was also a hidden cell that should not have been.

Have you checked that those links still get converted correctly in the pdf?  I think they may not.

Yes, it seems to work fine in both the pdf and html versions.  But looking at other notebooks I see we have used both styles and both seem to work, so we should decide which we prefer.
The changes I made to Burgers and Traffic_flow in #187 also include dropping the .ipynb.

What I observe is this:

If .ipynb is included in the link text, then in the PDF it appears as "Chapter X", where X is determined automatically by Latex, with a working hyperlink to that chapter in the PDF.
If .ipynb is removed, it appears in the PDF with whatever the link text was and is a link to the .ipynb file, rather than to a location in the PDF.

Closing this since we should not make the changes to other notebooks in this PR.
I will fix the figsize issues in a new PR.


🐛[ Bug ] : JavaScript Cookie and Local Storage Implementation

Discussed in https://github.com/iammuhammedfuhad/PhishGuard/discussions/20

Originally posted by iammuhammedfuhad May 22, 2023
Description:
We have recently added JavaScript code to our application in order to create a cookie and use local storage to save the user's current level. Unfortunately, we have encountered a problem with this implementation, and we are actively working to resolve it. We are seeking assistance from the community to help us identify and fix the issue.
Current Behavior:

JavaScript code added to create a cookie and utilize local storage.
User's current level is intended to be saved using these mechanisms.
However, we have discovered a bug in this implementation.

Expected Behavior:

The cookie should be created successfully.
Local storage should accurately store and retrieve the user's current level.

Steps to Reproduce:

Load the application.
Perform actions that trigger level changes.
Check if the cookie is being created and the level is being stored in local storage.
Observe any unexpected behavior or errors encountered.

Additional Context:

We have examined the code and believe the issue lies within our JavaScript implementation.
We have reviewed relevant documentation and attempted to troubleshoot the problem internally.
However, we have been unable to pinpoint the root cause and resolve the issue.
Any assistance or guidance from the community would be greatly appreciated.

Expected Contribution:

Help with identifying the bug in our JavaScript code.
Suggestions or solutions to fix the issue related to cookie creation and local storage usage.
Feedback on potential improvements to the current implementation.

📝 Note: We are actively working on resolving this issue, but external assistance would be invaluable in expediting the process. Thank you in advance for your contributions!

can you assign it to me?

@Rahulditi Yaa sure, you can work on it👍🏻.
Anyway a big thanks for contributing to our project 😊.

Thank you, I'm currently working on it. Is there a way to contact you?

You can contact me here, else you can contact me on Instagram id :- iam.muhammedfuhad.
The better way for contacting and discussion is github. Anyway your choice 🙃

Thank you, is it a mandatory to use both cookies and local Storage?

or can i use only local Storage Alone?

Yaa you can👍🏻

Its not mandatory to use both.

Can you come on a specific time, so I can connect with you to talk about the problems and our project.

I opened a pull request on this issue kindly check it.

I checked it. First of all I appreciate you for solving this bug 👏.
This issue will be closed when we complete solving the award page. If you wish to work with it you can 😊.

Thank you, I will be looking into the award page issue too....👍

Hhm😊

This is small appreciation certificate for contribution. Share it ✨

@Rahulditi I worked on the bug and now it's fixed. Thankyou for your contribution.