Python code failing type checking

Reported in another issue

@dmartin-gh

I am also experiencing the interface issues described above. We're looking to adopt the CDK for our main platform and as a mostly Python/C++ shop the Python CDK seemed like a great choice for us. I didn't make it very far into my first sample app to test things out before mypy started throwing errors.
from aws_cdk.core import Construct, Stack
from aws_cdk import aws_ec2 as ec2

class MyEC2Stack(Stack):

    def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        ec2.Instance(self, 'my-app',
            instance_type=ec2.InstanceType('m5.4xlarge'),
            machine_image=ec2.MachineImage.generic_linux({
                'us-east-1': 'ami-0affd4508a5d2481b', # CentOS 7 (x86_64) - with Updates HVM
            }),
            vpc=ec2.Vpc(self, "my-app-vpc"))

I would love to see this fixed so we can start building out our application stack with confidence that we're passing the right level of constructs around!

Is this still a problem today? I have been trying to reproduce this (with CDK v2, though), and am not getting the MyPy error you report here... if you still happen to have the error, maybe this is because of your specific MyMy version or configuration (in which case, I would like to know what these are so I can reproduce).

Indeed it is still a problem. For example try loading up apigw-http-api-lambda-dynamodb-python-cdk in vscode, then pyright reports for
        # Create the Lambda function to receive the request
        api_hanlder = lambda_.Function(
            ...
        )

        ...

        # Create API Gateway
        apigw_.LambdaRestApi(
           ...
            handler=api_hanlder,  # Pyright error: Argument of type "Function" cannot be assigned to parameter "handler" of type "IFunction"
        )

typecheck error
Argument of type "Function" cannot be assigned to parameter "handler" of type "IFunction" in function "__init__"
  "Function" is incompatible with protocol "IFunction"
    "IFunction" is incompatible with "Function"
    "IFunction" is incompatible with "Function"
    "IFunction" is incompatible with "Function"
    "IFunction" is incompatible with "Function"
    "IFunction" is incompatible with "Function"
    "IFunction" is incompatible with "Function"
    "IFunction" is incompatible with "Function"Pylance[reportArgumentType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportArgumentType)
(variable) api_hanlder: Function

as shown in this screenshot

That project uses aws-cdk-lib==2.77.0 however the same issue exists after updating to recent aws-cdk-lib==2.143.1. On my machine it happens with the following configuration
pyright 1.1.364
pylance 2024.5.103
aws-cdk-lib 2.143.1
python 3.11.2
vscode 1.89.1

Originally posted by @mariogalic in https://github.com/aws/jsii/issues/1919#issuecomment-2142047331

Also related to this issue:

https://github.com/aws/jsii/issues/3931 (another user experience report)
https://github.com/aws/jsii/pull/3350 (perhaps a fix?)

I'm also still seeing this issue in a JetBrains IDE (Intellij IDEA Ultimate with Python plugin): https://github.com/aws/jsii/issues/2877 (says it's fixed, but I see the same Expected type 'str | str | None', got '() -> str | str' instead  error in my IDE today using CDK v2.144.0).
These two typing issues combined make Python experience really rough because your IDE thinks you have a lot of invalid types and sometimes its hard to see which typing issue is an actual problem unless you run cdk synth/deploy.

I took a look at apigw-http-api-lambda-dynamodb-python-cdk and was able to root cause at least one issue causing these type checker errors.
When you implement an interface in TS, the method names have to match, but the method argument names do not, as long as the argument types are in the correct order. In Python however, when you implement a Protocol (which is how we do interfaces), the method argument names do have to match. So when our TS library has things like IPrincipal.addToPrincipalPolicy(statement: PolicyStatement) and an implementation of PrincipalBase.addToPrincipalPolicy(_statement: PolicyStatement) the former generates an IPrincipal Protocol in python, and the latter generates a class that's incompatible, and we get the PyRight error:
...
        "AnyPrincipal" is incompatible with protocol "IPrincipal"
          "IPrincipal" is incompatible with "AnyPrincipal"
          "IPrincipal" is incompatible with "AnyPrincipal"
          "IPrincipal" is incompatible with "AnyPrincipal"
          "add_to_principal_policy" is an incompatible type

The suggested fix here is to always use the method argument names in the base (Protocol) class, when generating subclasses. In the example above, PrincipalBase.addToPrincipalPolicy() would use the method argument statement instead of what's in the TS code, _statement. I didn't get as far as implementation but hopefully this context is useful.

I have this issue too in Intellij IDEA Ultimate w/ Python. Super annoying. I don't get the error in VS Code.

I used typing.cast(aws_iam.IPricipal, principal) as a muffler, but got fed up with it. So, upvote.

I used typing.cast(aws_iam.IPricipal, principal) as a muffler, but got fed up with it. So, upvote.

Yeah there shouldn't be a need to do that. It seems to not throw the same type errors in VS Code, but it's definitely a bug with jsii due to how it transforms TypeScript code to other languages. Python is weird in general IMHO.

Possible duplicate of https://github.com/aws/jsii/issues/2927 / https://github.com/aws/jsii/issues/4541

This issue has become hard to follow because it surfaces many different issues. I am closing it out as all issues have dedicated issues for them. See:

https://github.com/aws/jsii/issues/3633
https://github.com/aws/jsii/issues/2927
https://github.com/aws/jsii/issues/3931


Back from submenu

When returning from the submenu it does not return to the same line from which it was called

I will add this feature in a future release

@jcvillegasfernandez  You can pull the experimental branch and test if this feature works as expected

I tried experimental history version and it works

I tried experimental history version and it works

Thanks  a lot, I will update the master branch

Doesn't seem to work for me. When I go back in the menu, I get throw onto the first menu item, not from the one I came in.

Oh... I didn't merge experimental with master

Tested. Working now.


Cannot read properties of undefined (reading 'reference')

Your environment

op-vscode version: 1.0.1

VS Code version: 1.70.2 (Apple Silicon)

CLI version: 2.6.2

OS: macOS Monterey v12.5.1
Steps to reproduce
When using the Save in 1Password feature in the command palette or json file.

Select a secret
⌘+⇧+P
Select 1Password: Save in 1Password
Enter a name: MyEntry
Enter field name: password
Use TouchID to allow 1Password

What happened?
A notification with: Cannot read properties of undefined (reading 'reference')
An entry in 1Password is created with just the title and without the secret.
What did you expect to happen?
Saving the secret in 1Password entry.
Notes & Logs
[2022-08-26 15:34:40.657] [exthost] [error] TypeError: Cannot read properties of undefined (reading 'reference')
at /Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:6016
at Object.edit (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:54197)
at Ct.insertSavedItem (/Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:5994)
at Ct.saveItem (/Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:4340)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at /Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:2298
at a._executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:63914)
at a._executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:63914) op-vscode.saveValueToItem {"value":"1Password.op-vscode","_lower":"1password.op-vscode"}
[2022-08-26 15:34:40.658] [exthost] [error] TypeError: Cannot read properties of undefined (reading 'reference')
at /Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:6016
at Object.edit (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:54197)
at Ct.insertSavedItem (/Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:5994)
at Ct.saveItem (/Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:4340)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at /Users/thiago/.vscode/extensions/1password.op-vscode-1.0.1/dist/extension.js:53:2298
at a._executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:63914)
at a._executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:63914) _vscode_delegate_cmd_l7akmsrm undefined

Also, getting this error
+1

Same here.
+1

its not useful to leave a +1 comment but not +1 on the actual issue. upvote the issue and it bubbles up and gets fixed quicker 🤷♂.

its not useful to leave a +1 comment but not +1 on the actual issue. upvote the issue and it bubbles up and gets fixed quicker 🤷♂.

There are only 3 open issues on this repository, are you really worried about visibility here?

its a general faux pas. are you really trying to argue on github about this?
On Sep 13, 2022 at 10:26 PM -0700, Mandeep Singh @.***>, wrote:

its not useful to leave a +1 comment but not +1 on the actual issue. upvote the issue and it bubbles up and gets fixed quicker 🤷♂.
There are only 3 open issues on this repository, are you really worried about visibility here?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

Hi folks, thanks for raising this issue. I haven't yet been able to identify the root cause, but I'm hoping to spend more time on it shortly here.

Hey all, just wanted to follow up to note that I'm able to replicate this issue now, and it looks related to newer versions of the CLI. You could try downgrading to an older version in the meantime, but that's not ideal, and at any rate I'll be getting a fix out as soon as possible. I'll update this thread once a fix is out. Thanks for your patience.

thank you fir the update @jodyheavener

v1.0.2 of the extension is rolling out now, which should address this issue. Please let me know if you continue to encounter it!


Create a PR on source repo PR

To trigger a preview URL in Vercel

Solved in https://github.com/zetxek/adritian-free-hugo-theme/pull/55 🎉


We need a virtual keyboard

We could maybe use https://www.npmjs.com/package/vue3-emoji-picker
Or it is at least a source of inspiration.

@simar0at Isn't this a duplicate of #33 ?

Ups, yes.


Travis + Coveralls

Builds on travis and report and coveralls with some basic tests.

A rebase may be required before merging.


vimPlugins: use lib.getName instead of plugin.pname

Motivation for this change
buildVimPlugin does not mandate the need of pname being set but it is used here while linking causing builds to fail
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

@ofborg build neovim.tests


merge from konsum-frontend-svelte

package.json

chore(deps): add ^3.49.0 remove ^3.48.0 (devDependencies.svelte)

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

npm package (@latest dist-tag)
v1.32.0
GitHub release

Your semantic-release bot :package::rocket:


"Always Emote On First Encounter"Setting Not work

I found that even when the ‘Always Emote On First Encounter’ setting is set to False, the first MaskedEnemy encountered will definitely perform an emote.
Here are my configuration settings:

Huh, I can take a look at this soon. It's likely my logic is not quite correct, or maybe I forgot to reference that config option? We will see, but thanks!

Btw, I just checked on this, and it seems like I'm not even referencing that config in my logic. Thanks for letting me know! I'll get this fix added to the next update!


Added KuCoin v2

Added support for KuCoin

ticker
trades
l2Updates

Awesome!  Thanks so much for the excellent pull request.  I will give it a review shortly.

@bmancini55 thanks! I've updated the PR with the requested changes.

Thanks!!


Ignore a preceding /host_mnt in the Hyper-V mount path

I'm not sure if this was a change in my environment or a change in Docker, but I had to make this change recently in order to keep it working. Without this, I'd get errors such as
WARNING:root:Bind of container website_web_run_13 was skipped since it has invalid source path /host_mnt/c/Users/...
WARNING:root:Bind of container website_web_1 was skipped since it has invalid source path /host_mnt/c/Users/...
WARNING:root:No mounts match container name pattern * and host directory pattern *

Hi Bob Ippolito!
Thanks for doing this. The new mount path style seems to appear between versions 17.09.1-ce-win42 and 17.12.0-ce-rc4-win44 of Docker for Windows. I have double checked that your patch works well with both old and new docker versions.


Preformed vs Regenerated carbon

Could you explain how to do this calculation from clip available output? I could try to help. Cheers
Sent with GitHawk

From UKESM1-0-LL.historical

See notebooks/jml_dissic_prereg.ipynb and notebooks/jml_dissic_prereg_allmodels.ipynb for examples of total dissolved, preformed, and regenerated carbon calculations and linear trends over the historical period (1850-2014).


Dist path to assets

Maybe it's just me, npm run build looks good... except it builds for the website root
http://myserver.foo/path/to/index.html -- works fine
http://myserver.foo/vite.svg -- 404, this is the generated URL
http://myserver.foo/path/to/vite.svg -- this is the actual URL
npm run dev is groovy and testing npm run build locally with node's http-server works because we start that server from cd /src/vite-phaser-ts/dist
I hope this is clear and correctable. When I find the fix I'll come back and add it.
Thanks!

Hey hey I think this fixes it! Added vite.config.ts
/** @type {import('vite').UserConfig} */
import { defineConfig } from 'vite'
export default defineConfig({
  base: './'
});


Lapce fails to start on Wayland and complains about openGL

Describe the bug
Lapce fails to launch complaining about libGL or libEGL. used under gnome wayland.
Steps To Reproduce
Steps to reproduce the behavior:

Use Gnome with wayland in your nix configuration
Launch Lapce, either with command line or directly with the gnome launcher
notice it fails to start.

Expected behavior
Adding the lapce package should also include all dependancy to run on any Nix desktop.
Screenshots
Output of command line when lauching lapce from gnoe-terminal
[perard@NixAF:~]$ lapce
thread 'main' panicked at 'launch failed: Other(window build error: Received multiple errors. Errors: `[NotSupported("lacking either libGL or libEGL so could not fallback to other"), NotSupported("both libGL and libEGL are not present")]` srgb false)', lapce-ui/src/app.rs:54:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additional context
here is my full configuration for context.
Notify maintainers

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[perard@NixAF:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.18.14-zen1, NixOS, 22.05 (Quokka), 22.05.3050.d86a4619b7e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - channels(root): `"nixos-22.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Built from source on Fedora 37, it just does not start silently.

Closing, as both NixOS and non-NixOS users seem to be able to use this normally.


Create 0x8564a5592a97333decc42d980bd0a859657984c6.json

你好，提交的信息有误，请查看，谢谢。

您好！我们的相关信息在附件中。请您查收。拜托了
------------------ Original ------------------
From<EMAIL_ADDRESS>Date:  Sat, Sep 15, 2018 10:33 AM
To<EMAIL_ADDRESS>Cc<EMAIL_ADDRESS><EMAIL_ADDRESS>Subject:  Re: [consenlabs/token-profile] Create0x8564a5592a97333decc42d980bd0a859657984c6.json (#2367)
你好，提交的信息有误，请查看，谢谢。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

json.txt
电影链pr.docx


Records from resources not showing

When I search for a record for it's title it doesn't show up in the spotlight results

Did you select the Edit/View entry first before searching? The navigation is nested.

I got the same. At first I select "Website - Edit" and then records on list shows only when I type letters containing "website":

If I translate it in my WebsiteResource:
protected static ?string $label = 'strona';

then it searchs in my translated word: "strona" and presents it in search results.
I don`t see anything special in my resource, which could be connected.
Thought it might make a difference to not use Model::unguard(); and list attributes in $fillable in model, but that didn't help either.

Thanks @studiowizjo. I just checked it and confirm that this is a bug. I think it used to work, so maybe there was a change in Filament that broke this. I will look into this.

i would be happy as will, if you could fix that 😏

@michabbb Are you on the latest version? I think this should have been fixed with v0.3.6. I just tested with the Filament Demo and it works.

@pxlrbt pardon, a few minutes ago i found out that i had to set $recordTitleAttribute in my resource to get any findings 😏

I updated the readme to explain this.


⚠ Fetchers has degraded performance

In 03b9ab8, Fetchers ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 266 ms

Resolved: Fetchers performance has improved in c87a8e1.


Documentation needed

Thank you for this module, it looks great!
However, it really lacks documentation. You do not get far with the information in the readme.
I just started to use this, and the things I would like to know now to get started is:
How should I use the commands? They are not available after loading the Service Provider. I tried to copy them from src/Console into my app/Console/Commands folder and that works.
Now when I run the create index command, it seams like it needs a configuration file. There's not even a mention about that in the readme. The only config file that is mentioned seams to missing all the configuration values needed for indexing.
Could you please provide a better step by step guide for getting started with this? Or at least specify the what configuration file I should provide to the create the index.
Thanks in advance!

For the configuration, I guess it's elasticsearch-php and elasticsearch documentation I should look at.

Here is a sample index configuration:
<?php
return [
    'index' => 'my-index',
    'body'  => [
        'mappings' => [
            'my-model' => [
                'properties' => [
                    'id' => ['type' => 'string', 'index' => 'not_analyzed'],
                    'name' => ['type' => 'string'],
                ],
            ],
        ],
        'settings' => [
            'analysis' => [
                'filter' => [
                    'finnish_stop' => [
                        'type' => 'stop',
                        'stopwords' => '_finnish_',
                    ],
                    'finnish_stemmer' => [
                        'type' => 'stemmer',
                        'language' => 'finnish',
                    ],
                ],
                'analyzer' => [
                    'finnish' => [
                        'tokenizer' => 'standard',
                        'filter' => [
                            'lowercase',
                            'finnish_stop',
                            'finnish_stemmer',
                        ],
                    ],
                ],
            ],
        ],
    ],
];

As you can see it's all Elasticsearch configuration, please refer to the official documentation for more information.
Also, to run the console command simply add the commands to your Kernel (app/Console/Kernel.php) command map.

Thank you.
I will try to learn the Elasticsearch configuration format from the Elasticsearch documentation.
Yes, and regarding the commands I thought about adding the commands directly without copying them. This worked fine:
    protected $commands = [
        \Nord\Lumen\Elasticsearch\Console\CreateCommand::class,
        \Nord\Lumen\Elasticsearch\Console\DeleteCommand::class
    ];

I do think that both issues here should be clarified in the readme for the next person. I could write this and make a PR if you want.
Another somewhat unrelated question. Will this module update the indexes when a new database record is saved (using Lumen models) automatically? If not, how do should this be handled?

We really need to improve the documentation, so if you could submit a PR it would be awesome!
As for the index updates, this module only provides the tools for doing the job, so you need to do the index updates yourself. I would create a service class in your app, that handles modifying the index (add/update/delete). Something like:
$this->getMyIndexingService()->indexMyModel($myModel);
That service can the call the helper methods here https://github.com/nordsoftware/lumen-elasticsearch/blob/develop/src/ElasticsearchService.php#L43 to preform the operations in elasticsearch. The elasticsearch documentation provides good enough guides on what parameters are needed etc. https://www.elastic.co/guide/en/elasticsearch/guide/current/index-doc.html

I've been looking some more into this now, and I'm starting to get a grip on how this works.
For updating the indexes I think I'm going for a solution with Event Listeners similar to this: http://stackoverflow.com/a/30540207/951744
What do you think about that?
The only thing I don't really understand now is what I should do with the Index command. I have created the index and I can add data, but I'm not sure how I should use your Index command for bulk adding.
Why is the index command class abstract? How should I implement that?
I have started to write some documentation to set up all of this. Should I write this on a wiki page or add it into the readme? I'm doing this as a hobby project and I don't have so much time, but I should probably be done with this within 2-3 weeks.

I think its best put into a .md file rather than a wiki, that way the info stays with the repo if it's forked or moved to other hosts.
Depending on the size/scope, either put it in README.md, or in a new .md file.

@hugovk: Sure sounds good.
Could you give me some guidance about the Index command I asked about?
Otherwise I could just make my own command that loops though the models and pushes it in one by one.

@crisu83 or @kryysler, could you give me some guidance on how to implement the index command class to map my models?

@pelmered Sorry for the radio silence, just got back from my summer vacation :) The index command is intended as a helper to bulk index your models. You need to do create an implementation class that could look something like:
<?php

namespace App\Console\Commands;

use Nord\Lumen\Elasticsearch\Console\IndexCommand;

class MyIndexCommand extends IndexCommand
{
    /**
     * @inheritdoc
     */
    protected $signature = 'app:stuff:index';

    /**
     * @inheritdoc
     */
    protected $description = 'Indexes stuff to Elasticsearch.';

    /**
     * @inheritdoc
     */
    public function getData()
    {
        // Array of models from your db to index.
        return [];
    }

    /**
     * @inheritdoc
     */
    public function getIndex()
    {
        return 'my_index';
    }

    /**
     * @inheritdoc
     */
    public function getType()
    {
        return 'my_type';
    }

    /**
     * @inheritdoc
     */
    public function getItemBody($item)
    {
        // $item is one instance of your models returned in "getData" method. The "getItemBody" is called for each model in that list.

        // Build the index document data for this item based on your schema.
        // https://www.elastic.co/guide/en/elasticsearch/guide/current/index-doc.html
        return [];
    }

    /**
     * @inheritdoc
     */
    public function getItemId($item)
    {
        // $item is one instance of your models returned in "getData" method. The "getItemId" is called for each model in that list.

        // Unique ID for the document.
        // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-id-field.html
        return 0;
    }

    /**
     * @inheritdoc
     */
    public function getItemParent($item)
    {
        // $item is one instance of your models returned in "getData" method. The "getItemId" is called for each model in that list.

        // This is only needed if you use parent-child relationships. Otherwise null is what you should return.
        // https://www.elastic.co/guide/en/elasticsearch/guide/current/parent-child.html
        return null;
    }
}

This solution is not perfect, and I have been thinking of improving this but not got around to it yet. If you have some good ideas on how to make it easier to bulk index stuff, please share.
Hope this clears things up! :)

@pelmered Regarding your suggestion of of using event listeners to keep your models up to date in the index, I think it is a good idea. Personally I usually have everything related to creating and updating wrapped in a service class where I manually invoke the indexing when a model is wither created or updated. This gives a bit more flexibility in case you don't always want to re-index the model even if it is updated etc. But this is just personal preference and your suggestion works just as well.

No, problem. I've been away for most of the time since that as well.
Thank you for the help @kryysler!
As for example the getType() method is hard coded and does not get a parameter, am I supposed to create one command for each Model/type in Elasticsearch?
Should the getData() method just return collection, like return MyModel::get();?
I will see if can come up with some improvements regarding this when after I have played around with it some more.
Regarding the solution for indexing changes I ended upp with a pretty good and clean solution where I created a trait that I can use on the models that I want to index in Elasticsearch. The traits adds some helper methods and adds events for all write operations that is handled by a event listener. If the trait and this handler would be added to this module you would only need to add three events in your EventServiceProvider.  I will add the relevant generic code to the documentation. It's probably not perfect and as flexible as some people would need it to be, but I think it's a good start.


Add support for flashing the Bluemchen example as part of the build process

Currently, flashing the Bluemchen example to a Daisy seed is a two step manual process: run make to build a binary, then open up the Daisy Web Programmer in Chrome, connect to the Seed, open the binary file, and click the Program button.
As far as I know, the Daisy community has support for building, flashing, and debugging directly in VS Code. My understanding is that their code generation scripts require a project to be located within a checkout of the DaisyExamples repository (weird), but I'm sure it can be customized to work with the path layout of this project.

Flashing without having to put the Daisy Seed into DFU mode requires a programmer. Using Daisy's core Makefile, a binary can be flashed by running make program.


Comments in pyproject.toml are removed

👓 What did you see?
I was intending to put a comment in pyproject.toml to explain the reasoning for a setting. But pyprojectsort apparently removes comments:
$ pyprojectsort --diff
---

+++

@@ -40,7 +40,6 @@

 [tool.pytest.ini_options]
 filterwarnings = [
-    # https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1970
     "ignore:pkg_resources is deprecated:DeprecationWarning:opentelemetry.instrumentation.dependencies:4",
 ]
 markers = [

'pyproject.toml' would be reformatted

✅ What did you expect to see?
I'd like comments to be preserved, as far as possible.
📦 Which package version are you using?
Python 3.12.4, pyprojectsort 0.3.0
🔬 How could we reproduce it?

Create a pyproject.toml containing a comment:
 [tool.pytest.ini_options]
 # some comment
 filterwarnings = []

Run pyprojectsort

Observe that the comment is removed

📚 Any additional context?
No response

@sersorrel, thank you for your interest in the project and for raising! 🙌 The library presently parses in the TOML - which excludes comments in its internal representation - and thus is stripped in the rendered output. Update needed to retain that information - which is important. Would love to see a pull request on this or any other contributions on best way to implement. Should time a rise, also hope to take a look at some point.

Does Tomli-W support writing documents with comments?
No.

well, that's not super promising.
per https://github.com/hukkin/tomli-w/issues/45, tomlkit may be worth investigating ("includes a parser that preserves all comments, indentations, whitespace and internal element ordering, and makes them accessible and editable via an intuitive API.")

Awesome, will look into it - thanks @sersorrel!


how to install semantic-ui for a second project

the method of installed semantic-ui in [getting started] (http://semantic-ui.com/introduction/getting-started.html#install-semantic-ui) can only be used for one project.
When you try to run it a second time in a new project folder, you get this error  Current version of Semantic UI already installed
How to install semantic again for a second project?
maxMBP:wrehome-semantic maxhodges$ sudo npm install semantic-ui
npm WARN excluding symbolic link tests/withsymlinks/.hidden -> ../shown/.hidden
npm WARN excluding symbolic link tests/withsymlinks/bar.txt -> ../shown/bar.txt
npm WARN excluding symbolic link tests/withsymlinks/.hidden -> ../shown/.hidden
npm WARN excluding symbolic link tests/withsymlinks/bar.txt -> ../shown/bar.txt
|
><EMAIL_ADDRESS>install /Users/maxhodges/node_modules/semantic-ui
> gulp install

[00:13:09] Using gulpfile ~/node_modules/semantic-ui/gulpfile.js
[00:13:09] Starting 'install'...

Current version of Semantic UI already installed
<EMAIL_ADDRESS>../../../node_modules/semantic-ui
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>└──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>maxMBP:wrehome-semantic maxhodges$ gulp install
[00:13:18] No gulpfile found
maxMBP:wrehome-semantic maxhodges$ ls
maxMBP:wrehome-semantic maxhodges$

nothing installed

Semantic crawls up folder structure looking for a semantic.json file.
This is the file that defines the root of a project using SUI. If  one already exists and the versions match, then the install script will do nothing.

so how to install semantic for a new, empty  project folder?
create a semantic.json file in the root with a different version so that the installer doesn't do nothing?
or do I misunderstand something? should I just copy my old project to a new folder and copy the src files manually from the semantic  repo?

On Jul 30, 2015, at 01:30, Jack Lukic<EMAIL_ADDRESS>wrote:
Semantic crawls up folder structure looking for a semantic.json file.
This is the file that defines the root of a project using SUI. If one already exists and the versions match, then the install script will do nothing.
―
Reply to this email directly or view it on GitHub.

If your project has semantic.json and the path specified in that file points to valid definition files, the installer will stop. If you are creating a new project by copying another folder, you'll already have all the files required.

Semantic crawls up folder structure looking for a semantic.json file.

OK so the first time I installed semantic here /Users/maxhodges/
Now I have a new project where I'd like to use semantic
/Users/maxhodges/Documents/github/wrehome
So yes, if you crawl up the folder structure eventually will find semantic, and therefore do nothing.
But you could give me a more direct answer to my direct question
How to install semantic again for a second project?
Because if you use the installer you can pick components to install, but when creating a second project, it seems if I can only install by copying then I lose the ability to selectively choose which components to install right?
I hate to keep asking the same question three times, but I still don't see the way forward in your two replies.

my original project was only 14MB when checked into git.
My second project is 100MB, after setup by cloning the semantic-ui repo (since the installer wouldn't work a second time)
Based on the information you provided, I guess I can still use the installer as long as I never nest a new project under an older project
/Users/maxhodges/newProject/oldProject/oldestProject
This is ok because you always install a newer project higher up in the folder hierarchy
so when created a new project, first move the previous project down and insert a new folder above it for the new project. seems a bit weird, but that's basically what you are implying right?

Basically you're answer provides a bit of context, but I'm still left trying to figure out the solution based on the implications of your reply (moving folders around). Is that your recommended way to get started with semantic on a second web design project?

My recommendation is just make sure to have your projects in adjacent directories
i.e.

`~/myhome/project-one/
~/myhome/project-two/

This is intended to work with git and generally git operates off the same principle. Having an initialized git repository in a parent folder will make changes appear to occur as part of that project.

OK thanks for your help! I found a semantic.json file in /Users/maxhodges which had been orphaned. that was pretty much screwing up all the installation attempts.

@jlukic , Maybe we should document this?

Yeah I feel like a lot of things are not really explained at all, and a lot of the explanations are rather 'fragile'. Explaining some of the more difficult concepts two or three different ways is likely to help more people.
I try to rewrite a section of the docs to show you what I mean. I have technical writing experience, and as a Semantic UI newbie, I might be in a good position to understand what kind of traps and pitfalls new users will experience.

@Maxhodges PRs to docs are very welcome!

Please let me know @Maxhodges what you think. If you prefer to write in markdown or another format that works as well. I'll happily convert the code for docs.

just got started here
https://github.com/Semantic-Org/Semantic-UI/wiki/Unofficial-Supplemental-Guide-to-Semantic-UI
but launching a new product today, so will back to come back to this!


Xcode 12.0 Deployment target warning

Starting with Xcode 12.0, I get a deployment target warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99.
Any idea how to silence or 'fix' this? This is the only dependency in my project doing that.

Can be solved by updating to DeviceKit v4.0.0 using your Package Manager.


Add helper to update workflows using Github or a remote server

Adds a new module to let workflow authors update their workflow's
bundle using either github.com or some other remote service.
Adds documentation for the new helper module.
Add tests and update .travis.yml
Use cargo doc --features updater to generate docs.

BTW you can force-push to your branch instead of closing the PR and opening a new one.


Added getsockname for TcpSocket.

Also changed moving to borrowing in TcpSocket::getpeername.
I had problems building it with latest nix-rust:
/Users/aleksandrpak/Projects/nix-rust/src/sched.rs:65:22: 65:23 error: obsolete syntax: ``|uint| -> bool`` closure type syntax /Users/aleksandrpak/Projects/nix-rust/src/sched.rs:65 pub type CloneCb<'a> = ||:'a -> int; note: use unboxed closures instead, no type annotation needed
I have not found usage of this type so I just removed and it was OK for building mio but don't know about other projects. If you want I can send PR for this too.

nix-rust is already fixed so CI should pass now

Sorry for the delay. I pushed this here 022c9f6f1a46a725c2f3da6f3eca237b30ebfc35


Memory leak

Am I missing something or is c8e38df now causing the llvm::MemoryBuffer to be leaked?

The code as it was didn't compile on our flavor of Linux (against LLVM 3.5). So it seemed most prudent to roll it back to what it was.
Are you sure about the ownership semantics here?

The code you added seems to only be for LLVM-3.5. I have no idea who owns it on 3.5.
Everything above is returning a unique_ptr from getMemBuffer and takes one as an argument to getLazyBitcodeModule (to avoid this issue I presume).
So if getMemBuffer returns a unique_ptr, which is then converted to a raw pointer, isn't it actually worse and returned unique_ptr is actually a temporary therefore deleting after assignment?

I'll submit a PR.

#703

Fixed by #703


Support for Shared Drives

Currently, gdrivefs doesn't support shared drives.
I have a setup like:
    root_folder: str = "gdrive://Discovery Folder/Worksheets"
    storage_options: dict = {
        "token": "service_account",
        "access": "read_only",
        "creds": json.loads(os.environ["GOOGLE_APPLICATION_CREDENTIALS"]),
        "root_file_id": "0123456789ABCDEFGH",
    }

If I attempt to access that file (using commit 2b48baa11d1697401c914e5ff239dbab4d9c8f71), I get the error:
FileNotFoundError: Directory<PHONE_NUMBER>ABCDEFGH has no child named Discovery Folder

  File "./pipelines/assets/base.py", line 210, in original_files
    with p.fs.open(p.path, mode="rb") as f:
  File "./lib/python3.10/site-packages/fsspec/spec.py", line 1295, in open
    f = self._open(
  File "./lib/python3.10/site-packages/gdrivefs/core.py", line 249, in _open
    return GoogleDriveFile(self, path, mode=mode, **kwargs)
  File "./lib/python3.10/site-packages/gdrivefs/core.py", line 270, in __init__
    super().__init__(fs, path, mode, block_size, autocommit=autocommit,
  File "./lib/python3.10/site-packages/fsspec/spec.py", line 1651, in __init__
    self.size = self.details["size"]
  File "./lib/python3.10/site-packages/fsspec/spec.py", line 1664, in details
    self._details = self.fs.info(self.path)
  File "./lib/python3.10/site-packages/fsspec/spec.py", line 662, in info
    out = self.ls(path, detail=True, **kwargs)
  File "./lib/python3.10/site-packages/gdrivefs/core.py", line 174, in ls
    files = self._ls_from_cache(path)
  File "./lib/python3.10/site-packages/fsspec/spec.py", line 372, in _ls_from_cache
    raise FileNotFoundError(path)

The root_file_id is set to the folder id of a GDrive Shared Drive (i.e. https://support.google.com/a/users/answer/7212025?hl=en).
As per https://developers.google.com/drive/api/guides/enable-shareddrives#:~:text=The supportsAllDrives%3Dtrue parameter informs,require additional shared drive functionality. we need to set supportsAllDrives=True and includeItemsFromAllDrives=True when calling files.list in order for the API client to find the files.
In my case, if I change the existing:
    def _list_directory_by_id(self, file_id, trashed=False, path_prefix=None):
        all_files = []
        page_token = None
        afields = 'nextPageToken, files(%s)' % fields
        query = f"'{file_id}' in parents  "
        if not trashed:
            query += "and trashed = false "
        while True:
            response = self.service.list(q=query,
                                         spaces=self.spaces, fields=afields,
                                         pageToken=page_token,
                                         ).execute()
            for f in response.get('files', []):
                all_files.append(_finfo_from_response(f, path_prefix))
            more = response.get('incompleteSearch', False)
            page_token = response.get('nextPageToken', None)
            if page_token is None:
                break
        return all_files

to
    def _list_directory_by_id(self, file_id, trashed=False, path_prefix=None):
        all_files = []
        page_token = None
        afields = 'nextPageToken, files(%s)' % fields
        query = f"'{file_id}' in parents  "
        if not trashed:
            query += "and trashed = false "
        while True:
            response = self.service.list(
                q=query,
                spaces=self.spaces, fields=afields,
                pageToken=page_token,
                includeItemsFromAllDrives=True,  # Required for shared drive support
                supportsAllDrives=True,    # Required for shared drive support
            ).execute()
            for f in response.get('files', []):
                all_files.append(_finfo_from_response(f, path_prefix))
            more = response.get('incompleteSearch', False)
            page_token = response.get('nextPageToken', None)
            if page_token is None:
                break
        return all_files

(note the change in the call to self.service.list)
then my code works, and the filesystem can find the file and open it successfully.
I am happy to prepare an MR, but you would need to decide whether you are happy for me to enable shared drive support in all cases, or whether you want to control it via storage_options. And if via storage_options whether it should default to off (completely backwards compatible) or on (may show new files to existing users with shared drives that they don't currently get returned from gdrivefs).

Actually, I see there was already a request for this in #26.

YEs, exactly so - I believe this is well worth adding, but I am unsure how to expose the possibility to users. I believe simply checking all possible drives every time is probably a substantial slowdown, but I am happy to be told otherwise.

@martindurant when you say "checking all possible drives" do you mean in the drives property, or in _list_directory_by_id?
I've only just started using gdrivefs, but it seems that you need to specify an exact path from the root folder set in the storage options, so I don't think enabling shared drives universally would be any slower - if you don't set the shared drive folder (or one of its subfolders) as the root_drive_id in storage_options then the filesystem won't be searching it.
And the mechanism that finds the exact file id executes one request/response per path segment, so the performance of that seems to be dependent on how many levels deep your path is from the root_folder_id rather than how many other folders there are that don't match the path.


Add badges

Below the title please add badges this help a lot.
If your component is compatible:

with SwiftPM add

Indicated:

the Swift version
Platforms supported
License

Thanks! Had a couple of badges there already, but couldn't find those others. Now all there.


test: missing package details

catching missing package detail + test (Resolves #11)

Pull Request Test Coverage Report for Build 103

8 of 9 (88.89%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-2.8%) to 88.889%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/announce-it.ts
8
9
88.89%

Totals

Change from base Build 99:
-2.8%

Covered Lines:
23

Relevant Lines:
26

💛  - Coveralls

:tada: This PR is included in version 1.1.0-next.3 :tada:
The release is available on:

GitHub release
npm package (@next dist-tag)

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Initial commit of GEOSPLIT

Reason in terms of defining a polygon around each area, with coordinates within [-180,180] and [-90,90] not doable otherwise.

OK. ->GEOJSON handle shapes around IDL very well with a multipolygon, and GEOSPLIT uses the same logic behind.
It just needs a good documentation.


Add -i id_rsa to the scp command as well

This change is

FYI, I had looked for all of the ssh invocations when reviewing your PR. I completely forgot to look for scp. Pretty sure this is the cause of this failure: https://teamcity.cockroachdb.com/viewLog.html?tab=buildLog&logTab=tree&filter=debug&expand=all&buildId=969760&_focus=2476
I'm going to merge this so I can kick off another test run.

D’oh! Good catch. We should really centralize all the SSH flag stuff somewhere.


Create node with nested lists exception.

When i was trying to create a node in tinysnb person table using the following statement:
CREATE (:person {ID: 99, workedHours: [1], courseScoresPerTerm: [[7,20],[],[]]})

A conversion exception will be thrown due to the '[[7,20],[],[]]' casting error.

Should be fixed in #3444


Create react ecsal layer

Fixes: nmkataoka/adv-life#101
Checklist

[ ] PR is of reasonable size

Going to merge this even though it may not be finished (created react-ecsal layer but it isn't being used anywhere yet) because it is a good stopping place and I want to do EntityManager method renaming and related.


[0.25pt] Create a class from UML (MusicAlbum)

Create MusicAlbum class in a separate .rb file.

@coker2019 all is well in the file.


Text wrap on profiles is not working properly

The current  text wrapping on profiles results in words getting cut off and makes it very difficult to read the profile. See screenshot below:

Words should not be cut off like that at the end of a line.

This is fixed on next

Actually it is supposed to be fixed but still seems dodgy for me

Nevermind


user snippet code lose effective

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

VS Code Version: 1.75.0
OS Version: Mac OS 12.3 (21E230)

Steps to Reproduce:

open vscode
edit a .go suffix file
input "tys" snippet code suggest and self create snippet didn't show

It works well before upgrade

/duplicate of https://github.com/microsoft/vscode/issues/173244

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


New User: EveryDollar

Name: EveryDollar
Homepage url: https://www.everydollar.com
Brand Guidelines/Licensing: N/A
Logo: https://www.everydollar.com/images/logo/horizontal.svg

I'm having a lot of trouble with this logo. The svg seems to render weird in every app I open it in:

Could you try re-exporting it differently, or simply resize it into a 500x200 image? e.g.

ping

Yes, I'll get on this tomorrow when I get into the office. Thanks!

@thejameskyle how about this one? seems to work better in sketch and in the browser. https://dl.dropboxusercontent.com/u/200135/everydollar/everydollar_horizontal_logo.svg
thanks, and i appreciate your work!

Thanks!


fix(cli): config cache invalidation + refactors

Types of changes

[x] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description
Currently changing nuxt.config.js needs a full server reload as cache invalidation is broken since 2.5.0 after typescript additions.

Refactor some utils into their own file (utils/config and utils/banner)
Add CJS cache invalidation

This PR also introduces fixes and enhancements for users that split config file into multiple files.

Correctly invalidate cache for all config related files
Watch all dependencies of nuxt.config.js (outside node_modules) and reload nuxt dev if they have changed

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly. (PR: #)
[ ] I have added tests to cover my changes (if not applicable, please state why)
[ ] All new and existing tests are passing.

Codecov Report

Merging #5500 into dev will decrease coverage by 0.28%.
The diff coverage is 84.37%.

@@            Coverage Diff             @@
##              dev    #5500      +/-   ##
==========================================
- Coverage   96.09%   95.81%   -0.29%
==========================================
  Files          74       76       +2
  Lines        2563     2580      +17
  Branches      652      657       +5
==========================================
+ Hits         2463     2472       +9
- Misses         84       91       +7
- Partials       16       17       +1

Impacted Files
Coverage Δ

packages/cli/src/command.js
98.97% <ø> (ø)
:arrow_up:

packages/cli/src/commands/dev.js
84.61% <ø> (ø)
:arrow_up:

packages/cli/src/index.js
100% <ø> (ø)
:arrow_up:

packages/cli/src/utils/index.js
88.88% <ø> (-4.77%)
:arrow_down:

packages/cli/src/commands/start.js
100% <ø> (ø)
:arrow_up:

packages/config/src/options.js
100% <100%> (ø)
:arrow_up:

packages/cli/src/utils/config.js
78.57% <78.57%> (ø)

packages/cli/src/utils/banner.js
94.73% <94.73%> (ø)

packages/vue-renderer/src/spa-meta.js
86.2% <0%> (-0.24%)
:arrow_down:

packages/cli/src/imports.js
100% <0%> (ø)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

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

Codecov Report

Merging #5500 into dev will decrease coverage by 0.28%.
The diff coverage is 84.37%.

@@            Coverage Diff             @@
##              dev    #5500      +/-   ##
==========================================
- Coverage   96.09%   95.81%   -0.29%
==========================================
  Files          74       76       +2
  Lines        2563     2580      +17
  Branches      652      657       +5
==========================================
+ Hits         2463     2472       +9
- Misses         84       91       +7
- Partials       16       17       +1

Impacted Files
Coverage Δ

packages/cli/src/command.js
98.97% <ø> (ø)
:arrow_up:

packages/cli/src/commands/dev.js
84.61% <ø> (ø)
:arrow_up:

packages/cli/src/index.js
100% <ø> (ø)
:arrow_up:

packages/cli/src/utils/index.js
88.88% <ø> (-4.77%)
:arrow_down:

packages/cli/src/commands/start.js
100% <ø> (ø)
:arrow_up:

packages/config/src/options.js
100% <100%> (ø)
:arrow_up:

packages/cli/src/utils/config.js
78.57% <78.57%> (ø)

packages/cli/src/utils/banner.js
94.73% <94.73%> (ø)

packages/vue-renderer/src/spa-meta.js
86.2% <0%> (-0.24%)
:arrow_down:

packages/cli/src/imports.js
100% <0%> (ø)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

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


For a brief moment, wrong parameters show up on a node

https://github.com/enso-org/enso/assets/1436948/5b4a8149-8e45-4c9f-ae05-726af7df9687
Repro:

Create some table (e.g. load a CSV/Excel)
Press Tab to open the CB.
Type join and press Enter.

The join node shows up. For a brief moment we can see it has only 1 parameter - selector. But the Table.join method does not have such a parameter at all. After a short time, this is replaced with the proper parameters (right, join_kind etc.).
The node should not display incorrect parameters. Ideally, it should somehow indicate that the parameter metadata is still being loaded so that I know I have to wait for it to be displayed.

Duplicate of #6349

Duplicate of #6349

I thought that #6349 was about wrong ports being stuck there, here they appear only for a brief moment, so it looked like a separate problem to me. Possibly, they both may have the same solution.


rust!

btw if reviewed for hacktoberfest pls don't count this towards me as im just pushing my friends changes to my repo that he forgot to do.


feat: sqlite database implementation

Describe Your Changes
Use sqlite database to replace model.list

Library: SQLiteCpp
Keep the data structure the same as model.list

model_id: Unique identifier for the model
author_repo_id: Author or repository identifier
branch_name: Branch name in the repository
path_to_model_yaml: Path to the model's YAML file
model_alias: Shortened alias for the model

Use cpp:result for return value

Fixes Issues

Closes https://github.com/janhq/cortex.cpp/issues/1241

Self Checklist

[ ] Added relevant comments, esp in complex areas
[ ] Updated docs (for bug fixes / features)
[ ] Created issues for follow-up changes or refactoring needed

@gabrielle-ong We will need to account for this in the QA checklist - i.e. ensuring that model list etc is persisted correctly in sqlite


Wrong predictions from PINN for SEIR Model

The objective
Hello,
I've been trying to use the library for the last couple of days but I'm encountering difficulties with my problem.
I'm trying to model pandemic dynamics through a SEIR model (susceptible, exposed, infected, recovered). In my problem, I have 4 outputs, 4 main equations that are interdependent, and the initial conditions. While the PINN successfully minimizes the loss function, the resulting predictions are wrong. I'm not sure if the problem is related to the hyperparameters since the loss is minimized, but I've tried different hyperparameter combinations without improvements. I also noticed that even in the simple ODE example in tutorial 1, as soon as you increase the domain interval it gets really hard to get correct results. In my problem, I'm using a temporal domain interval of [0, 200].  First of all, I wanted to ask if I am using the API correctly. I would appreciate any suggestions that could help resolve these issues. Thank you.
Already tried tests
This is my code. You can see from the function plot_real_results() the pandemic dynamics I'm trying to replicate with the PINN.
import torch
from pina.problem import TimeDependentProblem
from pina.operators import grad
from pina import Condition
from pina.geometry import CartesianDomain
from pina.equation import SystemEquation
import argparse
from torch.nn import Softplus
import matplotlib.pyplot as plt
from pina import Plotter, Trainer
from pina.model import FeedForward
from pina.solvers import PINN
from pina.callbacks import MetricTracker

class SEIR(TimeDependentProblem):

    # assign output/ temporal variables
    output_variables = ['S', 'E', 'I', 'R']
    temporal_domain = CartesianDomain({'t': [0, 200]})

    # define the SEIR equations
    def susceptible(input_, output_):
        S_t = grad(output_.extract('S'), input_, components=['S'], d=['t'])
        return S_t - (- beta * output_.extract(['S']) * output_.extract(['I'])/N)

    def exposed(input_, output_):
        E_t = grad(output_.extract('E'), input_, components=['E'], d=['t'])
        return E_t - (beta * output_.extract(['S']) * output_.extract(['I'])/N - sigma * output_.extract(['E']))

    def infected(input_, output_):
        I_t = grad(output_.extract('I'), input_, components=['I'], d=['t'])
        return I_t - (sigma * output_.extract(['E']) - gamma * output_.extract(['I']))

    def recovered(input_, output_):
        R_t = grad(output_.extract('R'), input_, components=['R'], d=['t'])
        return R_t - (gamma * output_.extract(['I']))

    # define initial conditions
    def initial_S(input_, output_):
        return output_.extract(['S']) - S0

    def initial_E(input_, output_):
        return output_.extract(['E']) - E0

    def initial_I(input_, output_):
        return output_.extract(['I']) - I0

    def initial_R(input_, output_):
        return output_.extract(['R']) - R0

    # problem condition statement
    conditions = {
        'initial': Condition(location=CartesianDomain({'t': 0}), equation=SystemEquation([initial_S, initial_E, initial_I, initial_R])),
        'domain': Condition(location=CartesianDomain({'t': [0, 200]}), equation=SystemEquation([susceptible, exposed, infected, recovered]))
    }

def plot_real_results(timesteps, S0, E0, I0, R0, beta, sigma, gamma):
    S = torch.tensor(S0)  # Convert initial S to a tensor
    E = torch.tensor(E0)
    I = torch.tensor(I0)
    R = torch.tensor(R0)
    N = S + E + I + R
    tt = torch.empty(timesteps)
    SEIR = torch.empty(timesteps, 4)
    compartment_values = torch.stack([S, E, I, R])
    SEIR[0] = compartment_values
    tt[0] = torch.tensor(0.)

    for t in range(1, timesteps):

        nS = S - beta * S * I/N
        nE = E + beta * S * I/N - sigma * E
        nI = I + sigma * E - gamma * I
        nR = R + gamma * I

        S = nS
        E = nE
        I = nI
        R = nR

        compartment_values = torch.stack([S, E, I, R])

        SEIR[t] = compartment_values
        tt[t] = torch.tensor(float(t))

    S = SEIR[:, 0]
    E = SEIR[:, 1]
    I = SEIR[:, 2]
    R = SEIR[:, 3]
    # Plot the results
    plt.figure(figsize=(10, 6))
    plt.plot(tt, S, label='Susceptible')
    plt.plot(tt, E, label='Exposed')
    plt.plot(tt, I, label='Infected')
    plt.plot(tt, R, label='Recovered')

    plt.xlabel('Time')
    plt.ylabel('Population')
    plt.title('SEIR Model')
    plt.legend()
    plt.grid(True)
    plt.show()

if __name__ == "__main__":
    N = 1001.
    S0 = 1000.  # Initial susceptible population
    E0 = 0.  # Initial exposed population
    I0 = 1.  # Initial infected population
    R0 = 0. #Initial recovered population
    beta = 0.2  # Infection rate
    sigma = 0.5  # Incubation rate
    gamma = 0.1  # Recovery rate

    plot_real_results(200, S0, E0, I0, R0, beta, sigma, gamma)

    parser = argparse.ArgumentParser(description="Run PINA")
    parser.add_argument("--load", help="directory to save or load file", type=str)
    parser.add_argument("--epochs", help="extra features", type=int, default=2000)
    args = parser.parse_args()

    # create problem and discretise domain

    seir_problem = SEIR()
    seir_problem.discretise_domain(10, 'grid', locations=['initial'])  # Increase initial condition points
    seir_problem.discretise_domain(2000, 'lh', locations=['domain'])  # Increase domain points

    # make the model
    model = FeedForward(
        layers=[10, 10, 10],
        output_dimensions=len(seir_problem.output_variables),
        input_dimensions=len(seir_problem.input_variables),
        func=Softplus,
    )

    # make the pinn
    pinn = PINN(
        seir_problem,
        model,
        optimizer_kwargs={'lr': 0.001}
    )

    # create trainer
    directory = 'pina.seir'
    trainer = Trainer(solver=pinn, callbacks=[MetricTracker()], accelerator='cpu', max_epochs=args.epochs, default_root_dir=directory)

    trainer.train()
    # inspecting final loss
    print(trainer.logged_metrics)
    # plotting the solution
    plotter = Plotter()
    plotter.plot_loss(trainer=trainer, label='mean_loss', logy=True)

    plotter.plot(solver=pinn, components='S')
    plotter.plot(solver=pinn, components='E')
    plotter.plot(solver=pinn, components='I')
    plotter.plot(solver=pinn, components='R')

Hi 👋🏻 @verobianca, thanks for the PR! Your code looks good, and your use of the API is perfect👍🏻

Hi 👋🏻 @verobianca, thanks for the PR! Your code looks good, and your use of the API is perfect👍🏻 I don't think there is any problem with the software.
The problem you are facing I think is due to the complexity of the equation you are trying to solve, and specific ad hoc considerations must be taken. For example, the neural net you are using is currently outputting 4 variables whose ranges are really different (and this is usually hard for a single network). Maybe Fourier Random Features or MultiFeedForward approaches could help... Here there are some nice tips on how to train PINNs for complex equations!

Hi @dario-coscia, thanks for the reply.
I will have a look at you suggestions :)

Hi @verobianca ! Did you manage to solve your problem? I think it would greatly benefit the community (maybe if interested we can also make a tutorial on it😁)

Hi @dario-coscia , I was on holiday for almost a month and went back to work yesterday 😅 I will start working on it again and let you know if I solve the problem😊

Hi @verobianca I hope you solved the problem, let me know if further help is needed otherwise I will close the issue

Hi @dario-coscia , unfortunately I didn't solve the problem :( I tried different things and tips that were in the guide for PINNs, but I didn't manage to make it work. I'm currently not working on it anymore, so you can close the issue.


Quantize training flow in TF 2.0

Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information

TensorFlow version (you are using):2.0.0
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
In TF 1.x I use quantize training flow to create fixed point models that run faster on edge devices without GPU. I certainly want that be available in TF 2.0.
Will this change the current api? How?
It shouldn't.
Who will benefit with this feature?
IoT & mobile AI practitioners.
Any Other info.

Any plan for adding this feature back to TF?

https://www.tensorflow.org/model_optimization close issue


add log line when exiting due to --end param falling in the past

Description
Log a message explaining why ElastAlert 2 is exiting, when --end param is in the past.
Checklist

[x] I have reviewed the contributing guidelines.
[N/A] I have included unit tests for my changes or additions.
[x] I have successfully run make test-docker with my changes.
[x] I have manually tested all relevant modes of the change in this PR.
[N/A] I have updated the documentation.
[x] I have updated the changelog.

Questions or Comments

New Output:
$ elastalert --rule rules/test.yaml --start 2023-06-08T17:05:00 --end 2023-06-08T19:15:00 --verbose
2023-06-08 21:18:33,749     INFO           elastalert 1 rules loaded
2023-06-08 21:18:33,756     INFO apscheduler.scheduler Adding job tentatively -- it will be properly scheduled when the scheduler starts
2023-06-08 21:18:33,756     INFO           elastalert Starting up
2023-06-08 21:18:33,756     INFO apscheduler.scheduler Adding job tentatively -- it will be properly scheduled when the scheduler starts
2023-06-08 21:18:33,756     INFO apscheduler.scheduler Adding job tentatively -- it will be properly scheduled when the scheduler starts
2023-06-08 21:18:33,756     INFO apscheduler.scheduler Added job "Rule: test5" to job store "default"
2023-06-08 21:18:33,756     INFO apscheduler.scheduler Added job "Internal: Handle Pending Alerts" to job store "default"
2023-06-08 21:18:33,756     INFO apscheduler.scheduler Added job "Internal: Handle Config Change" to job store "default"
2023-06-08 21:18:33,756     INFO apscheduler.scheduler Scheduler started
2023-06-08 21:18:33,756    DEBUG apscheduler.scheduler Looking for jobs to run
2023-06-08 21:18:33,756    DEBUG apscheduler.scheduler Next wakeup is due at 2023-06-08 21:18:35.756103-04:00 (in 1.999319 seconds)
2023-06-08 21:18:33,756     INFO           elastalert End time '2023-06-08 19:15:00+00:00' falls before the next run time '2023-06-09 01:19:33.756870+00:00', exiting.


Long term URI access rights

The app should use long term URI access rights.
When one terminates the app, one can't access the previously selected pass images etc.

Now we use Intent.ACTION_OPEN_DOCUMENT and have long-term access rights. Sadly, also the image picker changed.


adding quotes

@lucasagra  your branch has merge conflicts, can you pls solve and pr again.

done


idrac7 have  use this?

hi  admin
idrac7 have  use this?

iDRAC 7 already features a HTML 5 console, you do not need this.

because we use no vnc
we still  no success build a new images.

FYI, idrac7 still tries to use the java jnpl file, so no interactive console is usable

Ignore previous
For anyone not familiar with idrac like me, idrac7 DOES work without java.  You need to go to the Virtual Console settings via the idrac web config and change Plugin Type to HTML5


Revert "Fix warnings for llvm::Triple::Wasm after updating LLVM to upstream"

Reverts apple/swift#7052
This apparently causes failures. Just putting this out there in case the branches haven't synced or something. Strange that that PR passed the tests...

@swift-ci please smoke test

It is already fixed on master: https://github.com/apple/swift/commit/1b141d368e7f03a5c05b8854196e8e340d7596a0

@swiftix could you try clean testing your Pr that failed. Odd that it wouldn't work on osx but does on Linux

I think the problem was that two people committed the fix roughly at the same time, but independently.

My PR is passing now, with the fix on  master

Oh right - I'm on mobile so can't fix it soon if it needs an immediate fix btw

I see @bitjammer FYI


Target class [router] does not exist

Pint Version: 0.1.5
PHP Version: 8.0.20

Description:
I've tried this in two local Lara projects.  Running ./vendor/bin/pint results in an error shown below

Steps To Reproduce:
composer require laravel/pint --dev
then
./vendor/bin/pint
Am I missing something?

I don't get this issue. What Laravel version are you using?

First attempt was 8.83.16. Second attempt was 9.17.0

Heya, thanks for reporting.
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as separate commits on the main/master branch and share the repository here? Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.
laravel new bug-report --github="--public"

Please do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.
Thanks!

Can you share your global "composer.lock" please?

We will re-open the issue once you share your "composer.lock" file.

@nunomaduro I just faced the same issue.
My composer.lock: https://gist.github.com/deniscsz/5c2a05a4046e648643bcd403f10295de
The output of php artisan about:

I didn't know why but after recreate my docker's containers the error is gone. I believe it wasn't an issue of Pint.

@kb6673 @deniscsz
Did any of you recently install the New Relic PHP agent? Does removing the New Relic config from the CLI conf allow Pint to run?

@flxsource Yes! When I removed the new relic php agent, the problem was gone.

Did any of you recently install the New Relic PHP agent?
Not recently - it's always bee there :)

I'll disable it for the CLI and confirm @deniscsz's findings

@flxsource @kb6673 @deniscsz Do you know why disabling new relic solved the pint error ? I am trying to install pint in our core php project and we have new relic already installed. We cannot disable new relic for our system. If you could provide some insights that would be very helpful


Add misc to list of repos which have _REV params sent to jenkins

We added MISC_REV to pr-pipeline and vagrant-pr jobs to accomodate checking misc repo changes to vagrant-quickstart in a PR/jenkins run.

Thanks for submitting a PR! Maybe @olehermanse can review this?


Relax formats rfcs 453 454

Ignore unrecognized formats rather than rejecting their messages

I should get to it later today. I will include it here and ping you again @TimoGlastra before I merge it

@TimoGlastra how about now? I think this is better overall - in any list of formats, getting an attachment without specifying a format picks the first recognized rather than trying what's at index zero.


#393 Select with multiple and required attributes .has-error in pristine mode

Fixed #393
Also, now test a run two times, one for jquery 1.10.2 and one for jquery 3.1.1

@1000hz can we merge it to master with new version?

Yes, I will try to get this out soon. Thanks for the PR, @desfero! Great fix.

@1000hz can we merge it?


Change Provider environment prefix from "OCM_" to "RHCS_"

Please change it also in the makefile, README files and CI files

/lgtm


Updated forum link

Description
Updated forum link from  https://discuss.layer5.io/ to  http://discuss.meshery.io/
This PR fixes #1133
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

@Savio629 @leecalcote Please review this pr.


Add an option to automatically import not installed dependencies from a CDN like Skypack

Is your feature request related to a problem? Please describe.
Each time I need a dependency I have to stop what I am doing, install it, restart everything. It's not a big deal but...
Describe the solution you'd like
...I just saw the feature on Snowpack 3 and thought that it was really neat. I understand that there are drawbacks to that solution but if optional, for example if the user opts-in for this feature and Vite detects that the dependency is missing from node_modules, it could provide a way to automatically look for a dependency without having to install it or store it locally on your device and in all your vite projects.
Describe alternatives you've considered
I guess importing using the URL ? But you have to look for it which takes even longer that installing the dependency locally.
Additional context
None

See

https://twitter.com/youyuxi/status/1349187003087286275
https://gist.github.com/yyx990803/341b4bfc84086ad092e619ee70ee1d8d
https://twitter.com/youyuxi/status/1349197081668411392
https://github.com/vitejs/vite/tree/plugin-cdn/packages/plugin-cdn

See

https://twitter.com/youyuxi/status/1349187003087286275
https://gist.github.com/yyx990803/341b4bfc84086ad092e619ee70ee1d8d
https://twitter.com/youyuxi/status/1349197081668411392
https://github.com/vitejs/vite/tree/plugin-cdn/packages/plugin-cdn

Note: you don't really want to implicitly mix node_modules with a CDN like Skypack, because Skypack modules are pre-compiled to link to other Skypack modules and mixing both sources will cause inconsistencies when dependencies cross import one another.
I also wouldn't really recommend implicitly downloading from CDNs without version control. It may be easy when you add a new dependency, but you will have to revert to explicit version control when any one of the deps needs a specific version. Downloading from CDN also does not provide typing since it only downloads the module code.

Auto install to node_modules can be resolved once https://github.com/vitejs/vite/issues/1500 is fixed.
If you just want to use the CDN for prototyping, you can alias deps to a CDN link.
Alternatively you can take a look at https://github.com/vitejs/vite/tree/plugin-cdn/packages/plugin-cdn (not released yet)

Note: you don't really want to implicitly mix node_modules with a CDN like Skypack, because Skypack modules are pre-compiled to link to other Skypack modules and mixing both sources will cause inconsistencies when dependencies cross import one another.
I also wouldn't really recommend implicitly downloading from CDNs without version control. It may be easy when you add a new dependency, but you will have to revert to explicit version control when any one of the deps needs a specific version. Downloading from CDN also does not provide typing since it only downloads the module code.

Auto install to node_modules can be resolved once https://github.com/vitejs/vite/issues/1500 is fixed.
If you just want to use the CDN for prototyping, you can alias deps to a CDN link.
Alternatively you can take a look at https://github.com/vitejs/vite/tree/plugin-cdn/packages/plugin-cdn (not released yet)

You're right, those are very fair points.
The auto install plugin is exactly what I'm looking for ! I'll wait for the fix, thank you.

You're right, those are very fair points.
The auto install plugin is exactly what I'm looking for ! I'll wait for the fix, thank you.

Just in case someone else wanted this you can do this
vite.config.js:
/**
 * @type {import('vite').UserConfig}
 */
export default {
  alias: {
    '/skypack/': 'https://cdn.skypack.dev/',
  }

App.vue:
<template>
    <button @click="confetti"> Confetti </button>
</template>

<script setup>
    import confetti from '/skypack/canvas-confetti'
</script>

Just in case someone else wanted this you can do this
vite.config.js:
/**
 * @type {import('vite').UserConfig}
 */
export default {
  alias: {
    '/skypack/': 'https://cdn.skypack.dev/',
  }

App.vue:
<template>
    <button @click="confetti"> Confetti </button>
</template>

<script setup>
    import confetti from '/skypack/canvas-confetti'
</script>


How do /docs can be accessed?

There is no /docs directory in flarum.github.io repository, what is the method that makes https://flarum.org/docs/ exists? Don't docs repository need to be compiled?

We use nginx directory rules for the /docs directory I believe.

It looks like the flarum site is hosted on github.io, but I don't see the compiled /docs directory and any html files for the documents in the flarum.github.io repository, does it means that the website hosted on github.io can directly access the uncompiled vuepress document repository and then compile it online?

No. I don't know of this repository is used for anything anymore. We have another repo with the website that compiles the docs every time it's deployed - not through GitHub Pages.

@datitisev It appears that this repo is strictly here to redirect flarum.github.io to flarum.org at this point. We could probably empty all the actual contents and leave only the config and basic readme.

If that's an option, we should do it. We should avoid confusing community members who want to contribute to the site. We should also probably disable the issue tracker for this repo.

We'll want to keep the issues because there's nowhere else for issue reporting.

That would work too, but we should specify that in the Readme then.

Can this be closed then?

Agreed, the purpose of this repo is now clear in the README.


New package: SalesForceBulkApi v0.0.1

Registering package: SalesForceBulkApi
Repository: https://github.com/GregorMatheis/SalesForceBulkApi.jl
Created by: @GregorMatheis
Version: v0.0.1
Commit: c5699d0a13a0f6bcb855fb24584b2f1ab450073b
Reviewed by: @GregorMatheis
Reference: https://github.com/GregorMatheis/SalesForceBulkApi.jl/commit/c5699d0a13a0f6bcb855fb24584b2f1ab450073b#commitcomment-33700397

Can you add
[compat]
julia = "1"

to the project file and retrigger the bot?


Add additional PHP extensions

Add additional PHP extensions from @ethicalhack3r

Ah! I hadn't realised I had forked a fork, thanks for the re-pull request @albinowax :)


Issue #52: add CRLF converter for exception messages

PR for Issue #52
It uses a ThrowableProxyConverter to replace CR & LF in exception messages
With this converter, we need to add in the logback configuration:
    <conversionRule conversionWord="ex"
                    converterClass="org.owasp.security.logging.mask.CRLFThrowableConverter"/>

and then add an %ex in the pattern

Codecov Report

Merging #53 into master will increase coverage by 0.90%.
The diff coverage is 76.47%.

@@             Coverage Diff              @@
##             master      #53      +/-   ##
============================================
+ Coverage     38.56%   39.46%   +0.90%
- Complexity       96      106      +10
============================================
  Files            36       38       +2
  Lines           695      712      +17
  Branches         87       88       +1
============================================
+ Hits            268      281      +13
- Misses          407      409       +2
- Partials         20       22       +2

Impacted Files
Coverage Δ
Complexity Δ

...wasp/security/logging/mask/CRLFThrowableProxy.java
73.33% <73.33%> (ø)
8.00 <8.00> (?)

.../security/logging/mask/CRLFThrowableConverter.java
100.00% <100.00%> (ø)
2.00 <2.00> (?)

Continue to review full report at Codecov.

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


SSH key generation and bootstrap may happen on different hosts

Sometimes we see a bootstrap failure, where cephadm cannot read the previously generated SSH key. This seems to be because it generates the key on one host, then tries to bootstrap on another.
This seems to be some bug with run_once and delegate_to.

I think we may just need to set ansible_host similarly to how it's done in kayobe.


Stop logging trivial commands to syslog by default

The main motivation was to reduce the noise in logs that resulted
from having one log line per container per second thanks to
nomad-pot-driver calling "pot get-rss" on each container.
After the change, commands that modify things will still
be logged with severity "info", while trivial commands likei
get-rss will only be logged if verbosity is set to debug
and use syslog severity "debug".
I didn't bother to wrap "info" logging into a vebosity check,
as right now it defaults to info anyway. There is probably room
for improvement here.

I agree with this settings.
Full logging, useful for testing, can be enabled using the flag -v.

That was fast, thank you!


Datepicker 'mmmm' format options returns month in short form

Materialize Release: 1.0.0-alpha.3
Chrome Version 64.0.3282.140 (Official Build) (64-bit)
Windows 10 desktop

When initializing Datepicker with "format" option "dd mmmm yyyy", instance.toString() method returns "15 Feb 2018", for example.
The problem appears to be in _setupVariables method where you have:
mmmm: () => {      return this.options.i18n.monthsShort[this.date.getMonth()]; }
instead of:
mmmm: () => {      return this.options.i18n.months[this.date.getMonth()]; }

It was added after 1.0.0-alpha.3 release.  It will be available in the next alpha version


pkg-config support

It would be great if a pkg-config metadatafile can be installed:
man pkg-config(1)
https://people.freedesktop.org/~dbn/pkg-config-guide.html

I have now added support for pkg-config.

thanks a lot.


where are the conflow flow ops like abort used?

Previous, TF control flow primitives are Switch, Merge, Enter, NextIteration, and Exit, we can see them in a simple while_loop graph. Currently, in your r1.13 and r2.0 docs, seems the control flow ops changed a lot, how could I see this ops in a graphdef? are they still in while_loop and cond?

Tried to use while_loop and tf 2.0, the graphdef is still the same as previous tf versions, haven't seen abort, RefNextIteration, RefSelect, RefSwitch. Please help share a simple model example which uses these ops in your new docs.

FYI, in general, questions like these are best asked on Stack Overflow, since we GitHub issues to track bugs and features.
The docs you linked to are to the C++ API, which contains many lower-level (and sometimes outdated ops) than the Python API. For example, in TF 2.0, the Python API no longer produces Ref ops. So you won't see all the control flow ops still included in the C++ API when using the Python API.
These resources should help you learn more about control flow in the TF Python API:
New tf.cond doc: https://github.com/tensorflow/community/blob/master/rfcs/20180507-cond-v2.md
New tf.while doc: https://github.com/tensorflow/community/blob/master/rfcs/20180821-differentiable-functional-while.md
Old-style control flow doc (using switch, merge, etc.): http://download.tensorflow.org/paper/white_paper_tf_control_flow_implementation_2017_11_1.pdf

@skye  thanks!


Add 'luck play' task

@paulcsmith Is this what you had in mind for https://github.com/luckyframework/web/issues/70?

Uhm, yeah, it got late here last night and I confused myself a bit with the project layout and dependencies. Makes much more sense to put it into web. I'll start over there and see if I can figure out how to get Crystal to play nicely with this (see what I did there? 😉 )


Wildcard route - load component dynamically

Hi guys, I'm trying to accomplish full wildcard routing as my routes are generated by a CMS so I have an API that takes a route and will return some data about the page and which component to use for rendering so a request to /api/content/getcontent?route=/work
gives me back
{ "id": 1068, "name": "Work", "component": "work" }
then I have created a _.vue file to catch all routes with the following code (my first vue app, be gentle)
<template>

{{page.name}} - {{page.id}}

</template>

so now all I want to do is use the result of state.page.component to find a component with that name and render it. Can someone please help?

@piehouserat you are looking for the :is attribute of <component>, see https://vuejs.org/v2/api/#component

Thank you Sébastien and many thanks for NUXT!

@piehouserat how do you solve this problem, i think i meet the same question, thank you very much

@piehouserat I'm also desperate to do the same thing and would love to know your solution. :)


[GJ-65] Update Substrait

This pr updated Substrait to the latest available commit: Substrait commit.
Closes https://github.com/oap-project/gazelle-jni/issues/65.

Verified with CH as Lib, it worked. LGTM.


Update version from 0.0.65 to 0.0.66

This is an automated update of version in pyproject.toml. This action is performed by publish.yml.

updated version from 0.0.65 to 0.0.66, @SuleyNL pls review


Add Retryinator class with retry logic

Adding a facility for retrying requests that use idempotent http methods.

released as 4.2.0


Unicore bootloader causes extra reset with multi core app (IDFGH-9336)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v4.4.4
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
Custom Board
Power Supply used.
Battery
What is the expected behavior?
When booting should not trigger RTC Watchdog when using bootloader built with unicore and app with multicore.
What is the actual behavior?
On first boot it trigger RTC watchdog the first time, then the second time boto is succesfull
Steps to reproduce.
Software or hardware reset.
Debug Logs.
No response
More Information.
No response

I have found a workaround by overriding the app entry point and initializing the second core in the app.
I cannot call the mmu_init(1): that leads to crashes. Is this a problem, if so, what to do to be able to call this?
Overriding the entry in CmakeLists.txt with:
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,-eapp_entry")
and then somewhere in the app:
extern "C" void call_start_cpu0(void);

extern "C" void IRAM_ATTR app_entry(void)
{
    ESP_EARLY_LOGW(TAG, "app_entry");

#ifndef CONFIG_FREERTOS_UNICORE
    Cache_Read_Disable(1);
    Cache_Flush(1);

    DPORT_REG_SET_BIT(DPORT_APP_CACHE_CTRL1_REG, DPORT_APP_CACHE_MMU_IA_CLR);
//    mmu_init(1);
    DPORT_REG_CLR_BIT(DPORT_APP_CACHE_CTRL1_REG, DPORT_APP_CACHE_MMU_IA_CLR);

    DPORT_REG_CLR_BIT(DPORT_APP_CACHE_CTRL1_REG, DPORT_APP_CACHE_MASK_DROM0);

    ESP_EARLY_LOGW(TAG, "app_entry: call_start_cpu0");
#endif

    call_start_cpu0();
}

Hi @arjanmels!
Could you describe the example that you ran? and please provide sdkconfig. We need to reproduce this issue first.
What logs did you get? please share them as well.
Thanks.

You can simply use esp-idf\examples\getting_started\sample_project.
First time build & flash it with the default sdkconfig. Flash with idf.py flash
Check with idf.py monitor. App will boot normally. Last two entries in the log are:
I (303) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

Second time build it with only change in sdkconfig  CONFIG_FREERTOS_UNICORE=y. Flash with idf.py app-flash (so do NOT write the bootloader again).
Check with idf.py monitor. Note that the APP CPU does NOT start. Last entry in the log is:
I (293) cpu_start: Starting scheduler on PRO CPU.

Hi @KonstantinKondrashov,
All below is using esp-idf 4.4.4:
You can just use the empty "esp-idf/examples/getting_started/sample_project"

You need to compile it with the default sdkconfig, with only ``CONFIG_FREERTOS_UNICORE=y``` set (see attached sdkconfig_1.txt)
Program with idf.py flash (to program unicore bootloader + app)
Optional: check the app is booting properly in one go
Compile with the default sdkconfig, with # CONFIG_FREERTOS_UNICORE is not set (see attached sdkconfig_2.txt)
Program with idf.py app-flash (to only program the app, not the new bootloader)
See the app failing to boot the first time (after a hard reset), then the RTC Watchdog kick in and app successfully boots only the second time (see attached log)
boot_fail_log.txt

Best Regards,
Arjan

Hi @arjanmels! Thanks for bringing up this question.
As I can say it is not an appropriate way for having different core settings for the app and bootloader. Better to have the bootloader and app with the same FREERTOS_UNICORE settings. If possible update the bootloader, otherwise need to use a workaround. Your workaround looks good, you just do those things that the bootloader should do for multicore settings.
I will be back once we made a final decision about this.

On my workaround, I'm a bit concerned that I cannot execute the  "mmu_init(1)". Any feedback on that specifically?
I realize it is not a very common scenario and not best practise. What happened is that I initially developed for unicore (as I was not yet certain of the target chip) and that I programmed and put into the field a limited number of devices with unicore bootloader (but dualcore devices). Later I decided to start using the multicore features and that is when I encountered this problem.
Possible solutions I see:

Bootloader always initializes all cores; irrespective of unicore setting
Bootloader always unicore; second core initialization always done by the app
No change, then at least this issue documents a possible workaround.

Hi @KonstantinKondrashov,
Thank you for the confirmation on the mmu_init(1). For me the workaround is then ok for the moment (I do not plan to migrate to v5.0.1 yet).

I would be very grateful for a workaround for v5.0.1 since I mistakenly shipped some devices with CONFIG_FREERTOS_UNICORE=y.
Here is the log output when I tried the previously mentioned workaround:
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:2, clock div:2
secure boot v2 enabled
secure boot verification succeeded
load:0x3fff00b8 len:0x268
load:0x40078000 len:0x4cd8
load:0x40080400 len:0xab8
0x40080400: _init at ??:?

entry 0x4008054c
W<PHONE_NUMBER>) app_boot: app_entry
W<PHONE_NUMBER>) app_boot: app_entry: call_start_cpu0
I (339) cpu_start: Pro cpu up.
I (340) cpu_start: Starting app cpu, entry point is 0x4008cfb8
0x4008cfb8: call_start_cpu1 at /COMPONENT_ESP_SYSTEM_DIR/port/cpu_start.c:152

Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4011064c: bad00bad bad00bad bad00bad
0x4011064c: bootloader_common_get_active_otadata at /COMPONENT_BOOTLOADER_SUPPORT_DIR/src/bootloader_common_loader.c:58

Core  1 register dump:
PC      : 0x40110652  PS      : 0x00060030  A0      : 0x80007c18  A1      : 0x3ffe7d90
0x40110652: bootloader_init_mem at /COMPONENT_BOOTLOADER_SUPPORT_DIR/src/bootloader_mem.c:22

A2      : 0x3ffc22ac  A3      : 0x40006840  A4      : 0x00000044  A5      : 0x3ffe7e04
A6      : 0x3ff9eae0  A7      : 0x3ff9eac9  A8      : 0x8008cfdc  A9      : 0x3ffe7d70
A10     : 0x40000de8  A11     : 0x40000de8  A12     : 0x3ffe4358  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000000  EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000

Hi @revtronix !
Could you try this at the top of call_start_cpu0? Does it work for you? I need some time to verify it from our side as well.
diff --git a/components/esp_system/port/cpu_start.c b/components/esp_system/port/cpu_start.c
index abd5dc8..68309c7 100644
--- a/components/esp_system/port/cpu_start.c
+++ b/components/esp_system/port/cpu_start.c
@@ -241,12 +241,24 @@ static void start_other_core(void)
 }
 #endif // !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE

+#include "hal/cache_ll.h"
+#include "hal/mmu_hal.h"
+#include "hal/mmu_ll.h"
+
 /*
  * We arrive here after the bootloader finished loading the program from flash. The hardware is mostly uninitialized,
  * and the app CPU is in reset. We do have a stack, so we can do the initialization in C.
  */
 void IRAM_ATTR call_start_cpu0(void)
 {
+#if 1
+    Cache_Read_Disable(1);
+    Cache_Flush(1);
+    DPORT_REG_SET_BIT(DPORT_APP_CACHE_CTRL1_REG, DPORT_APP_CACHE_MMU_IA_CLR);
+    DPORT_REG_CLR_BIT(DPORT_APP_CACHE_CTRL1_REG, DPORT_APP_CACHE_MMU_IA_CLR);
+    uint32_t bus_mask = DPORT_REG_READ(DPORT_PRO_CACHE_CTRL1_REG);
+    DPORT_REG_WRITE(DPORT_APP_CACHE_CTRL1_REG, bus_mask);
+#endif
 #if !CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
     soc_reset_reason_t rst_reas[SOC_CPU_CORES_NUM];
 #else

Yes, I can confirm that this patch works!
Here is the startup log output:
`ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:2, clock div:2
secure boot v2 enabled
secure boot verification succeeded
load:0x3fff00b8 len:0x268
load:0x40078000 len:0x4cd8
load:0x40080400 len:0xab8
0x40080400: _init at ??:?
entry 0x4008054c
I (339) cpu_start: Pro cpu up.
I (339) cpu_start: Starting app cpu, entry point is 0x40080f38
0x40080f38: call_start_cpu1 at /COMPONENT_ESP_SYSTEM_DIR/port/cpu_start.c:147
I (0) cpu_start: App cpu up.
I (353) cpu_start: Pro cpu start user code
I (353) cpu_start: cpu freq: 240000000 Hz
I (353) cpu_start: Application information:
I (358) cpu_start: ELF file SHA256:  70dd69eec8d2f9fa...
I (364) cpu_start: ESP-IDF:          v5.1-dev-3541-g778aeae99e-dirty
I (371) cpu_start: Min chip rev:     v3.0
I (376) cpu_start: Max chip rev:     v3.99
I (381) cpu_start: Chip rev:         v3.0
I (386) heap_init: Initializing. RAM available for dynamic allocation:
I (393) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (399) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (405) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (411) heap_init: At 3FFD5828 len 0000A7D8 (41 KiB): DRAM
I (417) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (423) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (430) heap_init: At 4009BCD0 len 00004330 (16 KiB): IRAM
I (437) spi_flash: detected chip: gd
I (440) spi_flash: flash io: dio
I (444) flash_encrypt: Flash encryption mode is RELEASE
W (451) ADC: legacy driver is deprecated, please migrate to esp_adc/adc_oneshot.h
I (459) app_start: Starting scheduler on CPU0
II (n_t) kpp_tarrtd Starting[scheduler on CPU1
I (469) main_task: Calling app_main()`

@KonstantinKondrashov The workaround https://github.com/espressif/esp-idf/issues/10714#issuecomment-1478024111 not work if app bin enable PSRAM (ESP32, IDF 5.1.2)
it will stuck in the main_task: Calling app_main(), then TG0WDT SYS RESET will be triggered


Throw error on corrupt PDF

I've written some tests for code that uses poppler-simple to make sure it can gracefully handle corrupt PDF files. I'd tried surrounding new PopplerDocument() in a try/catch to catch an error for a bad PDF, but poppler-simple doesn't seem to throw any errors if the document is bad. Is there anyway to catch an error for a corrupt PDF?

Yes it is:
> try{ new p.PopplerDocument('file:///tmp/adb.log') } catch(e) { console.log("Exception", e);}
Syntax Warning: May not be a PDF file (continuing anyway)
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table
Exception [Error: Couldn't open file - damaged.]
undefined

But it highly depends on poppler itself. I know that it just crashes on some bad pdfs.
Here is the logic: PopplerDocument.cc:117
Can you give me your corrupt pdf?

Ahhh, thanks. I was able to corrupt my PDF enough so that is crashed.
Poppler is pretty resilient... I thought adding in some random characters near the top of the file would throw off the data in the XREF table and Poppler wouldn't be able to parse it, but it still did. Crazy...
Btw, I'm loving poppler-simple! Came in handy for https://github.com/lob/calipers. :+1:


Fix refresh token generate username with blank space

Fixes wso2/product-is#4818 and https://github.com/wso2/product-is/issues/1352

Re-opened with https://github.com/wso2/carbon-kernel/pull/2014/files


Option to easily exclude an study from the result

The possibility that we see now is to include a 'tick' into the study tables in which the user can select 'tick' or unselect 'untick' a specific study, so we can ignore the unselected ones.

I couldn't find how to apply this type of filter using rHandsontable package (https://handsontable.com/docs/7.4.2/demo-moving.html)

maybe it helps https://stackoverflow.com/questions/37875078/shiny-checkbox-in-table-in-shiny

The recommended package above (DT) https://rstudio.github.io/DT/shiny.html doesn't seem to allow row insertion,


az monitor scheduled-query is missing the optional parameter --override-query-time-range

Related command
az monitor scheduled-query create
az monitor scheduled-query update
Is your feature request related to a problem? Please describe.
The schedule query create and update az cli commands are missing the property for --override-query-time-range which should ultimately create or update the overrideQueryTimeRange property of the alert rule json.

This property seems to exist in the azure cmdlet so it would make sense that the az cli command should have it as well.
Like the cmdlet, this property should only apply for LogAlert rules.
Describe the solution you'd like
A new optional parameter named --override-query-time-range with a default value. This parameter could alternatively be short-handed with -oqtr.

Thank you for opening this issue, we will look into it.

Hello,
Any update on this?

@sean09lee CLI needs to update api version to include this new arg. We will take this into our sprint planning in the future. Thanks for reminding.


Ledger device crashes when using transfer schema v2 or v3

While implementing ledger support for the official LTO Wallet UI, I came across an issue where the ledger device just stops responding and reboots if I send a transaction using the v2 or v3 schema. Even using the proper v1 schema doesn't work, I had to modify it slightly in order to work correctly. So far I only tested with transfer transactions, not sure if it happens with other types.
We want to have latest schema support for ledger transactions, while also supporting older schemas. So v1, v2 and v3 should all work.

Hello,
Only the v1 schema is currently supported. Also, the payload needs to be modified before sending the data to the Ledger device. You can check how the payload is constructed with the script located here: https://github.com/Stakely/lto-network-ledger-wallet-ui/blob/master/scripts/transactions.js
Also, there is additional data sent to the device which includes the network id and the BIP path: https://github.com/Stakely/lto-network-ledger-wallet-ui/blob/master/pages/index.vue#L527

Thank you for the response. Indeed I saw the payload is slightly different on the device, and modified my code accordingly. We want to support later versions though, so the code needs to be changed. I will mess around with this repository to see what can be done, maybe I'll create a PR with support for v2-v3 :) Any help/feedback would be appreciated!


RF Monitor does not support large (long) RF storage

The RF Monitor block does not properly emit Redstone when used together with large RF storages (such as the Draconic Evolution one). Looking at the source it uses EnergyTools.getEnergyLevel(...) instead of EnergyTools.getEnergyLevelMulti(...). I'm not sure if theres a good reason for that, but I suspect its the source of the issue.

The RF API is using integer, if someone provides an energy storage which uses long, he has to provide the compatibility by himself and not have it so the authors of mods providing displaying methods.

RFTools already has working support for the large rf storage fromDraconic evolution (and lots of other mods), see https://github.com/McJty/RFTools/blob/815c358fddb1e91816b25450d97f2e66ac663b9c/src/main/java/mcjty/rftools/varia/EnergyTools.java#L62. My point here is that RFMonitorBlockTileEntity .checkStateServer() uses the "normal" method instead of the multiblock storage compatible one.

Oh, ok, didn't know that.


Not conversant with Homebrew so install is hard. Managed Halfway...

I got here:
Now a userconfig.sh file must be copied to ~/.config/dynamic-island-sketchybar/ directory. This can be done by copying an appropriate config file for your machine.
E.g. for 2021 MacBook Pro 14 Inch:
cp ~/.config/dynamic-island-sketchybar/userconfigs/mbp2021_14.sh ~/.config/dynamic-island-sketchybar/userconfig.sh
The file must be called userconfig.sh and located right under dynamic-island-sketchybar directory for dynamic island to function.
PLEASE HELP ME. THIS IS GIBBERISH TO ME  AND COPY PASTE SAYS NO SUCH FILE OR DIRECTORY

Installation can now be done with homebrew:
brew tap crissnb/dynamicisland
brew install DynamicIslandSketchybar

then, a userconfig.sh file must be copied to ~/.config/dynamic-island-sketchybar/userconfig.sh.
cp /opt/homebrew/etc/dynamic-island-sketchybar/userconfigs/mbp2021_14.sh ~/.config/dynamic-island-sketchybar/userconfig.sh

(if the dynamic-island-sketchybar directory does not exist, create one)
and can be started with:
dynamic-island

See README.md for more details.