[BEAM-3066] Add standalone version of seed job

Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

R: @jasonkuster

Diff of seed job versus this new standalone job:
 // Defines the seed job, which creates or updates all other Jenkins projects.
-job('beam_SeedJob') {
+job('beam_SeedJob_Standalone') {
   description('Automatically configures all Apache Beam Jenkins projects based' +
               ' on Jenkins DSL groovy files checked into the code repository.')

-  previousNames('beam_SeedJob_Main')
-
-  // Set common parameters.
-  common_job_properties.setTopLevelMainJobProperties(delegate)
-
-  // This is a post-commit job that runs once per day, not for every push.
-  common_job_properties.setPostCommit(
-      delegate,
-      '0 6 * * *',
-      false,
-<EMAIL_ADDRESS>-
-  // Allows triggering this build against pull requests.
-  common_job_properties.enablePhraseTriggeringFromPullRequest(
-    delegate,
-    'Seed Job',
-    'Run Seed Job')
+  properties {
+    githubProjectUrl('https://github.com/apache/beam/')
+  }
+
+  jdk('JDK 1.8 (latest)')
+
+  // Restrict to only run on Jenkins executors labeled 'beam'
+  label('beam')
+
+  logRotator {
+    daysToKeep(14)
+  }
+
+  scm {
+    git {
+      remote {
+        github('apache/beam')
+
+        // ${ghprBuildId} is not interpolated by groovy, but passed through to Jenkins where it
+        // refers to the environment variable
+        refspec(['+refs/head/*:refs/remotes/origin/*'
+                 '+refs/pull/${ghprPullId}/*:refs/remotes/origin/pr/${ghprPullId}/*']
+                .join(' '))
+
+        // The variable ${sha1} is not interpolated by groovy, but a parameter of the Jenkins job
+        branch('${sha1}')
+
+        extensions {
+          cleanAfterCheckout()
+        }
+      }
+    }
+  }
+
+  parameters {
+    // Setup for running this job from a pull request
+    stringParam(
+        'sha1',
+        defaultBranch,
+            'Commit id or refname (eg: origin/pr/4001/head) you want to build against.')
+  }
+
+  wrappers {
+    timeout {
+      absolute(5)
+      abortBuild()
+    }
+  }
+
+  triggers {
+    // Run once per day
+    cron('0 */6 * * *')
+
+    githubPullRequest {
+      admins(['asfbot'])
+      useGitHubHooks()
+      orgWhitelist(['apache'])
+      allowMembersOfWhitelistedOrgsAsAdmin()
+      permitAll()
+
+      // Also run when manually kicked on a pull request
+      triggerPhrase('Run Seed Job')
+      onlyTriggerPhrase()
+
+      extensions {
+        commitStatus {
+          context("Jenkins: Standalone Seed Job")
+        }
+
+        buildStatus {
+          completedStatus('SUCCESS', '--none--')
+          completedStatus('FAILURE', '--none--')
+          completedStatus('ERROR', '--none--')
+        }
+      }
+    }
+  }
+
+  // If anything goes wrong, mail the main dev list, because it is a big deal
+  publishers {
+<EMAIL_ADDRESS>false, true)
+  }

   steps {
     dsl {

The test results here indicate how urgent it is that we fix our testing situation - this PR touches nothing that is tested, yet both main precommits flaked. I think the first prerequisite step is to make it easy and safe to change testing rapidly to experiment.

retest this please

run seed job

run seed job

run seed job

run seed job

run seed job

LGTM

LGTM

Thanks!


[ListItemText]: Overflow issue with the secondary text

The ListItemText component with scondary overflows it's container.

Your issue has been closed because it does not conform to our issue requirements.
Please provide a full reproduction test case. This would help a lot 👷 .
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!


qiime sidle reconstruct-database output

Dear Justine,
Thanks for developing the implementation of Smurf in qiime2. You are amazing!
I have ran the whole pipeline following the tutorial but with my data and (I think) everything went ok.
However, I have some trouble understanding the output of qiime sidle reconstruct-database._ Can you tell me what the following columns stand for?
num-regions, total-kmers-mapped, mean-kmer-per-region,stdv-kmer-per-region,mapped-asvs
How do you calculate total-kmers-mapped?
One more question: since I defined --p-trim-length 150 for both for database and representative sequences trimming, does it mean that I am only using the first 150 nucleotides for both query and subject?
Thanks a lot for your time!
cheers,
Belen

[jwdebelius] has replied in the qiime2 forum, I close the issue. Reply below.
Hi @mbcarbonetto,
Thanks! It's been kind of fun!
However, I have some trouble understanding the output of qiime sidle reconstruct-database command.
Can you tell me what the following columns stand for?
num-regions, total-kmers-mapped, mean-kmer-per-region,stdv-kmer-per-region,mapped-asvs
These columns all describe the reconstructed database ID.
Let me see if I can give you a data dictionary
column name	data type	description
num-regions	int	The total number of regions covered by the reconstructed region
total-kmers-mapped	int	The number of database kmers mapped to the final resolved sequence
mean-kmer-per-region	int	The mean number of kmers per region.
stdv-kmer-per-region	int	The standard deviation in the number of kmers mapped per region. If only one kmer was mapped, this has a value of 0.
mapped-asvs	str	All ampicon sequence variant identifiers mapped to the database. (I'm not sure if this is still useful, since you can theoretically reconstruct in a computationally effecient way without needing the ASV maps, but eh, its there if you need it)
One more question: since I defined --p-trim-length 150 for both for database and representative sequences trimming, does it mean that I am only using the first 150 nucleotides for both query and subject?
Yes, if your trim length is 150, then it's the first 150nt from the end of the primer.


New version of to_size_t to get rid of an assert

We had a discussion here https://github.com/stan-dev/math/pull/1169 about potentially having a policy advocating for no asserts, which led to this PR.

[x] Copyright holder: (fill in copyright holder information)
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses: Columbia University
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

Yes, and thanks!

There were missing inlines and template parameters I missed :/, please review again @syclik when you have the time.

Semi related to this PR, can we a check for asserts with cpplint?

@SteveBronder: not sure. If it's possible, it'd be in the cpplint doc.


Add streaming support for local/global search

Description
This PR is an updated fork of https://github.com/microsoft/graphrag/pull/882. It adds streaming support for local/global search to the Query API. Thanks to 6ixGODD for the contribution!
Closes https://github.com/microsoft/graphrag/pull/882

Are you planning to submit a different PR with doc updates? Can we include those in this?

An update to the docs has been added, documenting the new --streaming CLI flag.


Arithmetic composition comes into builder

Closes #80

Awesome. Does op.moduleName and op.operand make the most sense do you think? Does this system expand to support brackets or order preferences (like the shared tree operator taking preference over addition)? We should make sure our API does expand to these cases.

Another nit here could be to move the operator function lookup earlier, so errors can be thrown before tracing preceding modules.

Since we've hidden the implementation now, I'm happy to revise as we go.
One thing - did you read my notes re removing configuration arguments in favour of a direct .config call. Thoughts?

Missed those notes. Yeah that would remove quite a bit of duplication. You're in a rush to hit 0.10.0? Hitler was right!

Cool, I think otherwise we're just duplicating it in every config call. Absolutely fine with keeping things breaking on this project. The API changes are simple enough to handle the upgrades fine.

Just hope SemVer 3.0 comes out before we run out of 32 bit minor versions


Token not found / apache / php

On my Slim setup (v3) with php 5.6.14, token can't be found, i need to get it via apache_request_headers() and set $_SERVER['HTTP_AUTHORIZATION']  in index.php. I've tried different .htaccess directives like the one provided here without success.
Would it be possible to check if  token can be found in 'apache_request_headers' ?
/**
 * Fetch the access token
 *
 * @return string|null Base64 encoded JSON Web Token or null if not found.
 */
public function fetchToken(RequestInterface $request)
{

   /* If using PHP in CGI mode and non standard environment */
    $server_params = $request->getServerParams();
    if (isset($server_params[ $this->options["environment"]]))
    {
        $message = "Using token from environent";
        $header = $server_params[ $this->options["environment"]];
    }

    $header = $request->getHeader("Authorization");
    if (isset($header[0]))
    {
        $message = "Using token from request header";
        $header = isset($header[0]) ? $header[0] : "";
    }

    /* FIX for apache */
    if (function_exists('apache_request_headers'))
    {
        $headers = apache_request_headers();
        $header = isset($headers['Authorization']) ? $headers['Authorization'] : "";
    }

    if (preg_match("/Bearer\s+(.*)$/i", $header, $matches))
    {
        $this->log(LogLevel::DEBUG, $message);
        return $matches[1];
    }

    /* Bearer not found, try a cookie. */
    $cookie_params = $request->getCookieParams();

    if (isset($cookie_params[ $this->options["cookie"]]))
    {
        $this->log(LogLevel::DEBUG, "Using token from cookie");
        $this->log(LogLevel::DEBUG, $cookie_params[ $this->options["cookie"]]);
        return $cookie_params[ $this->options["cookie"]];
    };

    /* If everything fails log and return false. */
    $this->message = "Token not found";
    $this->log(LogLevel::WARNING, $this->message);
    return false;
}

How does your .htaccess file look like?

Like this :
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^ index.php [QSA,L]
</IfModule>

Thanks for support :-)

Slim 3 don't keep $app instance anymore, you should save your JWT in container.

@ronaldo-systemar I've seen that i'm currently using an abstract class to get the SLIM instance through controllers but i will certainly pass the token through a DI container to be more "SLIM compliant". My main problem is that without apache_request_headers() the response's code is always 401.

I am also having a hard time trying to get my decoded JWT token inside my routes and controllers with Slim 3.1. I understand the concept that i have to inject it through the DI, but, i don't know exactly how to do it. The JwtAuthentication->fetchToken method needs the Request object to fetch the token, so i tried to get the Request object inside my container injection. But, the only way I could do it was returning a Closure from the DI container, and then passing my Request object as an argument of this closure to fetch and decode the token.
For now, i did it like this:

$container['jwt_token'] = function (Container $c) {
    $jwtAuth = new JwtAuthentication([
         'secret' => 'my-jwt-secret'
    ]);
    return function (Request $request) use ($jwtAuth) {
        return $jwtAuth->decodeToken($jwtAuth->fetchToken($request));
    };
};

Then, in my routes definition I do like this:

$app->get('/dump-jwt-token', function($request, $response, $args) {
	$closure = $this->get('jwt_token');
	$token = $closure($request);
	$response->write($token);
	return $response;
});

Ok, this works to get my JWT inside the routes. But, I don't feel that's the right way to do it. I would appreciate some help about the right (or better) way to do it. Also, how shoudl I do to get my token from inside any controller or AbstractController class?
I am grateful for any help.

Have you tried the example from README?
$app = new \Slim\App();

$app->add(new \Slim\Middleware\JwtAuthentication([
    "secret" => "supersecretkeyyoushouldnotcommittogithub",
    "callback" => function ($request, $response, $arguments) use ($app) {
        /* Do something with decoded token in here, for example: */
        $app->jwt = $arguments["decoded"];
    }
]));

Hi tuupola! Thanks for your answer.
Yes, that was the first thing I've tried and it just not worked for me. But now, after your answer, I tried it again and I just discovered that my $app->jwt was not defined because the route I was trying to test, was listed to be a passthrough route in my JwtAuthentication settings initial object. So, when I removed the route from the passthrough array, it just worked perfectly. I noticed that happens because, when a route is passthrough route, the Jwt callback function is not called at all. I am sorry for this misunderstanding...
Okay, now I am able to retrieve my $app->jwt from inside any route declared with closures using the function ($req,$res,$args) use ($app) statement. But, I am still unable to retrieve it from inside routes declared inside controllers. Because, when declaring routes with controllers, I can not pass the use ($app) statement.
So, I have a base AbstractController like this:

abstract class AbstractController
{
    protected $app;

    public function __construct(Container $container)
    {
        $this->app = $container;
    }

    public function getApp()
    {
        return $this->app;
    }

   // This does not work
    public function getJwt1()
    {
        return $this->app->jwt;
    }

   // Also this does not work
    public function getJwt2()
    {
        return $this->app->get('jwt');
    }

   // Also this does not work
    public function getJwt3()
    {
        return $this->jwt;
    }
}

So now, the question is, how can I get the $app->jwt variable from inside a route defined with controllers?

Now I understand how simple it is to retrieve an $app variable inside of the controllers. That is done using the container, and not the $app itself. So I just declared a container service like this:

$container['jwt'] = function (Container $c) use ($app) {
    return $app->jwt;
};

And then, I can get it from anywhere I have access to container instance (in these example from an abstract base controller):

abstract class AbstractController
{
    protected $app;
    public function __construct(Container $container) {
        $this->app = $container;
    }
    public function getJwt() {
        return $this->app->get('jwt');
    }
}

Thanks for the help! And sorry for my confusion about it.

Great and thanks for the example! It will help people coming here from Google.

I have the same problem. I want to access JWT token body in a function which is called on a route.
Here is the route:
$app->put('/transcript', '\Myclass:Myfunction');
if we put the following code in dependencies.php
$container['jwt'] = function (Container $c) use ($app) {
    return $app->jwt;
};

and include it like:
require_once('vendor/autoload.php');
require_once('classes.php');
require_once 'dependencies.php';

$app = new \Slim\App($container);

We can't access $app in dependencies.php. And if we include it after $app like:
require_once('vendor/autoload.php');
require_once('classes.php');

$app = new \Slim\App($container);

require_once 'dependencies.php';

How could we pass $container to The App instance?
I'm new to DI and services in general. Perhaps somebody could explain it to me. If possible, a minimal working example would be great

In callback store the token somewhere where you can fetch it later. Using $app is just an example.
$app = new \Slim\App();

$app->add(new \Slim\Middleware\JwtAuthentication([
    "secret" => "supersecretkeyyoushouldnotcommittogithub",
    "callback" => function ($request, $response, $arguments) use ($app) {
        print_r($arguments["decoded"]);
        /* Here save the decoded token somewhere. */
    }
]));

But this is more about Slim 3 general help and not directly related to JwtAuthentication middleware. Slim docs have some explanation on how the dependency injection works.

@kirtangajjar If you look a little up, @mateuslopes described a perfect example for your issue. Create a controller (base controller) that be extended by all your controllers, so, inject the container into it and voilà.
E.g:
Base.php
<?php
namespace Controllers;

class Base
{
    protected $container;

    public function __construct(\Slim\Container $container)
    {
        $this->container = $container;
    }
}

Users.php
<?php
namespace Controllers;

class Users extends Base
{
    /* Your controller actions */
}

Now, in your src/dependencies.php (if you have it, of course), do it:
$container = $app->getContainer();

// Controller container inject
$container['Base'] = function ($c) {
    return new Base($c);
};

Everytime Base controller is called, Slim will look into DI container and find the definition above, so, a new instance of Base is created with container injected, saving it into protected $container. Now, you can easy access container inside controller like this, e.g: $this->container->get('settings')['app']['key'];
If you are lost with file structure definition, as I said early src/dependencies.php , look at this skeleton project: https://github.com/slimphp/Slim-Skeleton
Good lucky and have a nice coding

Oh! Thanks @ronaldo-systemar for the example.
That piece of code really helped.
I was facing same fate as @mateuslopes and was unable to get token header. Later did I realized i had put it in passthrough for debugging.
Now that I have removed it, it works fine.
Thanks everyone for helping out!

@kirtangajjar You are welcome =)
A lot of Slim 2 users are facing this same problem, because $app instance was easy to get into old version. Since Slim 3 changed approach, basically everything is handled into container or middleware.

I updated the README example for callback to following. Thanks @ronaldo-systemar for the tips.
$app = new \Slim\App();

$container = $app->getContainer();

$container["jwt"] = function ($container) {
    return new StdClass;
};

$app->add(new \Slim\Middleware\JwtAuthentication([
    "secret" => "supersecretkeyyoushouldnotcommittogithub",
    "callback" => function ($request, $response, $arguments) use ($container) {
        $container["jwt"] = $arguments["decoded"];
    }
]));

Now you can access the decoded tokens in your routes with:
$app->get("/test", function ($request, $response, $arguments) {
    print_r($this->jwt);
});

:+1: Hope helped.
Nice coding for all.

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule (.+)$ api.php [L,QSA,env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Did this thread get off topic a little? When using that rewrite rule combination, I send everything over to api.php.  You'd think I would see $_SERVER['HTTP_AUTHORIZATION'], but instead I see $_SERVER['REDIRECT_HTTP_AUTHORIZATION'].  I'm using PHP-FPM with the Apache 2.4 module mod_proxy_fcgi.  I don't know if others have seen this or not, but Apache mangles the environment variable at some point in the htaccess rule processing apparently.  I had to make a kludge to check for the present of 'REDIRECT_HTTP_AUTHORIZATION' and then set 'HTTP_AUTHORIZATION' on _SERVER manually, which then allowed the fetchToken() method in JwtAuthentication.php to see it properly.
[http://stackoverflow.com/questions/3050444/when-setting-environment-variables-in-apache-rewriterule-directives-what-causes]
For some discussion on the redirection rule processor and environment variables about this same thing.

Further commenting on the OP, apache_request_headers() seems to not always be available.  It isn't for me when using PHP-FPM.  I think it might only be when using mod_php.  I'm not 100% sure on this, though....

@craigify That is an undocumented Apache feature. If you are affected by it you can set the environment to search the token from.
$app->add(new \Slim\Middleware\JwtAuthentication([
    "secret" => "supersecretkeyyoushouldnotcommittogithub",
    "environment" => "REDIRECT_HTTP_AUTHORIZATION"
]));

I actually thought this was documented in the README but seems I have forgotten it.

@craigify Actually when I think about it https://github.com/tuupola/slim-jwt-auth/commit/418bfa3edfee5d80e4d2ed01341956611f64cebd makes it more developer friendly. Now the middleware checks both HTTP_AUTHORIZATION and REDIRECT_HTTP_AUTHORIZATION by default.

The above examples are fine if you're injecting the container directly into your controllers. But what about if you're not injecting the container and doing DI (instead of service location)? How do I pass the token object to controllers?
Here's an example that doesn't work ... obviously because JWT is empty at the time it's passed to the controller.
$container['JWT'] = function() {
    return new StdClass;
};

$container['MAPT\Controllers\GroupController'] = function($ci) {
    return new MAPT\Controllers\GroupController(
        $ci->GroupRepository,
        $ci->JWT
    );
};


Showing multiple tooltips at different locations

Is your feature request related to a problem? Please describe.
When trying to render multiple tooltips at once they all have to be in the same location.
Describe the solution you'd like
Allow rendering multiple tooltips at different locations.
Describe alternatives you've considered
Hacky solution would be to render multiple windows instead of tooltips.

I am affected by this and want to try working on a fix.
Are there any advantages to tooltip stacking? Should tooltip stacking be removed entirely? And if not, how should the API look for it? - Should you be able to only stack certain tooltips but not others?

Disregard my last comment, i realized my problem was that i was abusing tooltips, not using them for their intended use case. I solved my problem with custom Areas together with Frame::popup.


Project status. Is it active?

I was checking the model and it misses concepts such as Capabilities which have been integrated in the latest version of the AAS. I was wondering if this will be updated or is this project abandoned/deprecated/inactive.
Regards
Victor

I have noticed that through a pull request @sebbader  has updated the model. I will close this issue and leave it as a evidence in case anyone else wants to test the latest updates.


secondary directory in dubbo's developer guide is not responding

I want to reflect a problem, the User doc secondary directory in dubbo's developer guide is not responding.
Address：http://dubbo.apache.org/en-us/docs/dev/build.html

The browser I am using is Chrome 70.0.3538.102. Upgrading to the latest version 70.0.3538.110 has the same problem. The operating system is macOS 10.14.1.
My access to Safari is normal.

https://github.com/apache/incubator-dubbo/issues/2806

The network is normal.

The page works fine from my side. This does not looks like an issue of Dubbo website.

Looks like not a website issue, I am closing it. Please feel free to reopen if it still exist.


Load assets during test from file system instead of manifest.

This is done to match the app's behavior of not expecting all assets to have an entry in AssetManifest.json.
The assumption is not true for internal customers, and issue #36552 is blocking us from fixing AssetManifest.json internally.

Thanks for the review. I was thinking about the tests too when I was submitting this PR.
I'll add tests internally for this, and hopefully after the AssetManifest loading issue is resolved we don't need to depend on this to accommodate the differences between the two versions.

Thanks for the review. I was thinking about the tests too when I was submitting this PR.
I'll add tests internally for this, and hopefully after the AssetManifest loading issue is resolved we don't need to depend on this to accommodate the differences between the two versions.

If you plan to change it back, please add a todo in the code

Oh I meant by the time there will be no difference between internal and external versions and the difference does not matter anymore.
I don't think we have to change it back if the functionality it provides is equivalent.


Question: Example Call?

Hi there,
Thank you so much for providing and maintaining this repository.
Do you happen to have an example call for
https://public-transport.github.io/gtfs-rt-inspector/

to see it in action with an example GTFS Realtime feed that I can expect to work?
I tried a few example GTFS Realtime feeds from this catalogue without success.
Cheers!

Issue #30 solves this issue for me. Cheers!

Yeah, the "log" view doesn't work for all feeds, see #30. The "inspector" view should though.


fix ：#3434

I don’t understand why there are changes. I didn’t change the style at all.

I don’t understand why there are changes. I didn’t change the style at all.
Solved by importing rmq_codeStyle.xml

@Cczzzz Would you like to change this PR target branch to develop?

@Cczzzz Would you like to change this PR target branch to develop?

to dev？

build fail @duhenglucky ,can you help me ? .

build fail @duhenglucky ,can you help me ? .

[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.12:check (default-cli) on project rocketmq-client: Too many files with unapproved license: 1 See RAT report in: /home/travis/build/apache/rocketmq/client/target/rat.txt -> [Help 1]

I add  license  to client/src/test/java/org/apache/rocketmq/client/consumer/HeartbeatServiceTest .but client/src/main/java/org/apache/rocketmq/client/impl/consumer/HeartbeatService Have it already

checks fail ， How do i fix it。

Who can help me

Who can help me

CI check passed now

why closed

why closed

@vongosling


Need to add a "passage of time" widget to the Advanced Diversity curve generator to show users that the system is working when it is taking time to process a large data set.

Fixed this in the same commit that fixed #100.


docs(nx-monorepo): include peer dependencies in example projen new command

Fixes #76

Thanks for this, I was planning to write a custom component that automatically adds them as deps for Projen constructs as in future there may be more peer deps than just these (hopefully not).

Thanks for this, I was planning to write a custom component that automatically adds them as deps for Projen constructs depending on whether they are stable (in aws-prototyping-sdk) or experimental (in their own package) as in future there may be more peer deps than just these (hopefully not).

 :)


Los event trigger in 2D

Triggers do not really work in 2D mode. I was not able to use LOS event trigger in 2D physics mode. It basically does not recognize the event. Triggers only works with 3D physics. I really need to use 2D physics system. Any suggestions?

In the LOSEventSource you would want to change the RaycastHit to a RaycastHit2D in the process method.


fix(template syntax): minor fixes

Should probably be reviewed with https://github.com/angular/angular.io/pull/535/files?w=0

LGTM. Important corrections. Ship it!


"IndexError: list index out of range" - while converting trained retinanet .h5 to onnx

Hi,
I have implemented transfer-learning on my own dataset on a retinanet model in keras.
When I try to convert this to an onnx file I get this error:
"IndexError: list index out of range"
my code is:
import keras
from keras_retinanet import models
import keras2onnx
import onnxruntime
import onnx

model_path = "/home/Projects/Documents/AI_models/resnet50_csv_20.h5"
ResNetModel = models.load_model(model_path, backbone_name = "resnet50")
onnx_model = keras2onnx.convert_keras(ResNetModel, ResNetModel.name)
onnx.save_model(onnx_model, "/home/Projects/Documents/AI_models/resnet50_csv_24_infer.onnx")

The full error message is:
Traceback (most recent call last):
  File "keras_resnet_model_to_onnx.py", line 24, in <module>
    onnx_model = keras2onnx.convert_keras(ResNetModel, ResNetModel.name)
  File "/home/Projects/.local/lib/python3.6/site-packages/keras2onnx/main.py", line 102, in convert_keras
    parse_graph(topology, sess.graph, target_opset, output_names)
  File "/home/Projects/.local/lib/python3.6/site-packages/keras2onnx/parser.py", line 668, in parse_graph
    return _parse_graph_scope(graph, keras_layer_ts_map, topo, top_level, output_names)
  File "/home/Projects/.local/lib/python3.6/site-packages/keras2onnx/parser.py", line 627, in _parse_graph_scope
    _infer_graph_shape(topology, top_scope, varset)
  File "/home/Projects/.local/lib/python3.6/site-packages/keras2onnx/parser.py", line 390, in _infer_graph_shape
    _finalize_tf2onnx_op(topology, oop, varset)
  File "/home/Projects/.local/lib/python3.6/site-packages/keras2onnx/parser.py", line 354, in _finalize_tf2onnx_op
    ov = varset.get_local_variable_or_declare_one(nodes[n0_][i_], _infer_variable_type(n_, varset.target_opset))
IndexError: list index out of range

Any pointers on how I can fix this?
Thanks!

I have the save problem when convert keras_retinanet to onnx, how to solve it?
File "convert_onnx.py", line 12, in
onnx_model = keras2onnx.convert_keras(model, model.name)
File "/home/ssd1/work/test/keras-onnx-master/keras2onnx/main.py", line 102, in convert_keras
parse_graph(topology, sess.graph, target_opset, output_names)
File "/home/ssd1/work/test/keras-onnx-master/keras2onnx/parser.py", line 668, in parse_graph
return _parse_graph_scope(graph, keras_layer_ts_map, topo, top_level, output_names)
File "/home/ssd1/work/test/keras-onnx-master/keras2onnx/parser.py", line 627, in _parse_graph_scope
_infer_graph_shape(topology, top_scope, varset)
File "/home/ssd1/work/test/keras-onnx-master/keras2onnx/parser.py", line 390, in _infer_graph_shape
finalize_tf2onnx_op(topology, oop, varset)
File "/home/ssd1/work/test/keras-onnx-master/keras2onnx/parser.py", line 354, in finalize_tf2onnx_op
ov = varset.get_local_variable_or_declare_one(nodes[n0][i], infer_variable_type(n, varset.target_opset))
IndexError: list index out of range

Can you share the model please?

here you go...
https://www.dropbox.com/s/isc4fc65tn2cjx1/resnet50_csv_20.h5?dl=0

I made the fix to resolve this error. Now the model can be converted. But when run with onnxruntime, it got the error that the nodes in Loop node are not topologically sorted. This bug happens in tf2onnx converter which we uses to convert custom layers. It may take time to fix this...

@jiafatom  hello i didn't understand  how to operate " IndexError: list index out of range"problem by  your fix. could u have a  rough description that how fix it? many thanks

@CHONGCHUANSHENG just pull the latest keras2onnx master, and then install it. When you convert, you need onnx_model = keras2onnx.convert_keras(model.keras_model, target_opset=10, custom_op_conversions=tf2onnx_contrib_op_conversion) to enable tf2onnx_contrib_op_conversion, just like test_mask_rcnn (we will have some refactoring to move tf2onnx_contrib_op_conversion, though).

@jiafatom  okay  thanks for your help.  I will keep an eye on your developments in time.

@jiafatom Thanks for coming back in this.
I'll close the issue for now.
Any timelines on when the onnxruntime will be able to run this?


Update scalaz-core to 7.3.8

About this PR
📦 Updates org.scalaz:scalaz-core from 7.3.5 to 7.3.8
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalaz", artifactId = "scalaz-core" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scalaz", artifactId = "scalaz-core" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Codecov Report

Merging #2776 (e099d2e) into main (d46cc5e) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2776      +/-   ##
==========================================
- Coverage   78.84%   78.82%   -0.02%
==========================================
  Files         466      466
  Lines       15903    15903
  Branches     2604     2570      -34
==========================================
- Hits        12539    12536       -3
- Misses       3364     3367       +3

see 2 files with indirect coverage changes
:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!


feat add connection close func

c.Quit will not always close tcp conn,because of the failure of the QUIT cmd
and it causes leak of  tcp conn
maybe we should change README example too

Ah, good spot. I think the better solution is to just add defer c.conn.close() in Quit() rather than adding a new method.

already pushed.

I'm not  familiar with pop3 protocol.
If there is no designed error which QUIT is not allowed,this is the best solution

Amended your PR and merged. It was missing the return. Thank you.


The tale of RaSCSI and SCSI RESERVE

Info

Which version of Pi are you using:
Raspberry Pi 3 Model B a02082 (Sony, UK)

Which github revision of software:
Current, pulled down 2021-03-03

Which board version:
FULLSPEC

Which computer is the RaSCSI connected to:
Sun SPARCstation 5

Describe the issue
Upon presenting a 120MB disk to a Sun Sparcstation, Solaris can see the disk without issue.
c0t5d0          Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor:  SEAGATE Product:           ST225N Revision: 0200 Serial No:
Size: 0.13GB <125644800 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

When trying to format the disk with the format tool in Solaris, it fails with "Reserve failed".
format> current
Current Disk = c0t5d0
<SEAGATE-ST225N-0200 cyl 1226 alt 2 hd 8 sec 25>
/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@5,0

format> format
Mode sense page(4) reports rpm value as 0, adjusting it to 3600
Ready to format.  Formatting cannot be interrupted
and takes 14 minutes (estimated). Continue? yes
Beginning format. The current time is Thu Feb 25 22:34:42 2021

Reserve failed
failed
format>

It looks like rascsi does not respond to the RESERVE command.
17.2.8 RESERVE command
The RESERVE command (see table 343) is used to reserve units or, if the element reservation option is implemented, elements within units for the use of the initiator. The third-party reservation allows units or elements to be reserved for another specified SCSI device. The RESERVE and RELEASE commands provide the basic mechanism for contention resolution in multiple-initiator systems.
https://www.staff.uni-mainz.de/tacke/scsi/SCSI2-17.html
I don't think Sun systems are the target audience for RASCSI, so this is a low priority issue.
Thank you!

This command has been declared obsolete by the T10 committee. However, it is included because it may be implemented on some products.

Pretty much all of the computers we're using with RaSCSI are obsolete, so it seems like we should support this command :-)
From my quick research, this command looks like its used when there are multiple initiators on a SCSI bus. Additional Background
Doing the full RESERVE/RELEASE function could be a non-trivial amount of work, and probably won't be used by anyone. So, for now, I propose that these commands will just be implemented where RaSCSI will just respond with "success" whenever a RESERVE or RELEASE command is received.
I'd recommend implementing RESERVE(6), RESERVE(10) and RELEASE(6), RELEASE(10), since they work the same way.
https://origin-www.seagate.com/files/staticfiles/support/docs/manual/Interface manuals/100293068j.pdf

Thank you for the suggestion.  I'm working on those changes right now.

@phrax0 I see that in https://github.com/akuker/RASCSI/commit/1fb0269645feda44d689a597339bef332efd9258#diff-50ff296f47000fe3386f4f6f6c81b58d784ef16b31ebb21833d0284cf5f14d09 you stubbed out the reserve and release calls.
Did you manage to re-test on your SPARCstation with these changes?

@phrax0 Any news on this?

Last I heard from @phrax0 , this was working. He's been AFK for a while, so we should probably leave this open until someone with a SPARCstation confirms.

I believe this issue is fixed. I just did a clean install of Solaris 2.6 onto a 2GB disk on the RaSCSI on a SPARCStation 5 with no issue. I also formatted a 200MB disk in Solaris after the install and it worked.

@nsafran1217 Which version of the RaSCSI software did you test with?  The master and develop branches have diverged a huge amount, and I'm curious to know if it works on develop in particular!

master. I cloned the repo on Sept. 16 and built from that.
I can test from develop if you want me to.

@nsafran1217 If you have the time, it would be hugely helpful to us!

@rdmark Seems like its working correctly on develop as well. Formatted a new disk in Solaris 2.6 and did another fresh install of Solaris 2.6 on a new disk image.
I also tested formatting a new disk on Solaris 8 on a Sun Ultra 1 and it worked as well.

@nsafran1217 That's wonderful, very encouraging!  Let me close out this ticket.  If you find other issues, don't hesitate to raise a new ticket, or connect over at Discord.


fix: monorepo release issues

Some issues that I encountered using the new packages in our projects.
Signed-off-by: Timo Glastra<EMAIL_ADDRESS>

Codecov Report

Merging #386 (c1deaaa) into main (ffaa3c0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #386   +/-   ##
=======================================
  Coverage   86.42%   86.42%
=======================================
  Files         234      234
  Lines        4803     4803
  Branches      750      750
=======================================
  Hits         4151     4151
  Misses        652      652

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 ffaa3c0...c1deaaa. Read the comment docs.


Unhandled exception trying to login to Azure SQL database

I'm testing out a solution using Grate (started with RH).  I'm trying to deploy to an Azure SQL Database and I get an unhandled exception with the login.
Unhandled exception: Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user
My current connection string looks like this, which is one that Azure gave me for the instance. Server=tcp:xxxxxxxx.database.windows.net,1433;Database=TestDB01;Uid=user;Pwd=xxxxxxxxxxx;Trusted_Connection=False;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
I've tried multiple versions of the connection string based on connectionstring.com and everything is returning the same exception.  I'm able to login to that Azure SQL DB from SSMS on my laptop.  I'm positive I'm using the correct Uid/Pwd.
The ps1 script I'm using looks like this:
$ConnectionString = "Server=tcp:xxxxxxxx.database.windows.net,1433;Database=TestDB01;Uid=user;Pwd=xxxxxxxxxxx;Trusted_Connection=False;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
$FileRoot = "C:\Code\AzureDB-test"
$FolderConfig = $FileRoot + "\FolderConfig.txt"
$Out = $FileRoot + "\MigrationOutput"

&grate --connectionstring $ConnectionString --files $FileRoot --folders $FolderConfig --version=1.0 --output $Out

Any suggestions would be most welcome.
Thanks!

Hi @JackGraber
I can see the $ConnectionString in the PowerShell script missing " at the end. Can it be a problem?
You can try several ways below:

Using double quote when passing the connectionString into grate like:

&grate --connectionstring "$ConnectionString" ...other parametter

Enable log with lower level

$env:LogLevel=Debug
&grate --connectionstring "$ConnectionString"  ...other parametter

Using docker version (it's not merged to the main branch yet). PR submitted

docker run -v $FileRoot:/db -v $Out:/output -e APP_CONNSTRING="$ConnectionString" -e VERSION=1.0 hoangthanh28/grate:latest

Hope it will help.

It had nothing to do with Grate.  Turns out there was a $ in the password to our Azure DB.  The powershell script was trying to read that as a variable and therefore blowing up the connection string.  After repairing the hole in the wall that my head created....it's on with more testing.  Thanks so much for the quick response and thanks for continuing to support this code base!

Glad to hear you resolved it, @JackGraber  - I have done this a lot of times myself as well. It's not always easy to remember all the special characters for every shell.
Thanks for looking into it, @hoangthanh28


chore(docs): Update getting started for webpack CLI

Updated to the latest and greatest with that webpack goodness.

@davideast we should remove the references to the puppy-love app while we're at it, since it's really out of date now.

@jelbourn Done.

LGTM


Double Puncuation

Responses in the Web App contain double punctuation.
Example:

In the Azure Open AI Studio Chat Playground, responses do NOT contain the double punctuation.  For example:

Happens for all punctuation types from what I can see, not just periods.

@sarah-widder The problem appears to be in app.py in stream_without_data() in this code:
def stream_without_data(response, history_metadata={}):
    responseText = ""
    for line in response:

responseText should be inside the loop and not outside. What appears to be happening is deltaText is returning 'None' at the end of the streamed output and the value for responseText is not being changed, and so the value from the last loop is being reused and so you get the duplicate.
If you wanted to be paranoid, it may make sense to explicitly initialize both reponseText and deltaText at the start of the loop, e.g.
def stream_without_data(response, history_metadata={}):
    for line in response:
        responseText = ""
        deltaText = ""


Swagger UI's stylesheets aren't loaded

Describe the bug
When accessing the /docs/swagger route, a blank page is loaded. It seems to be due to the defined stylesheets no longer existing.
Screenshots

To Reproduce
Load sanic-ext into your Sanic app and access the Swagger UI route.
Expected behavior
The Swagger UI is displayed.
Environment (please complete the following information):

OS: Windows 10 Home 21H1
Browser Mozilla Firefox
Version: 94.0.1 64-bit

Bummer. Guess we need some new CDN links.

https://pagecdn.com/public-cdn
It does not show up here anymore. I guess they pulled it :thinking:

There’s some Cloudflare hosted ones at https://cdnjs.com/libraries/swagger-ui which look like they could be an option.

Looks like it is versioned. No latest. Which is fine, we will just need to make that a configurable value.


Cloud-init problem

Describe the bug
After running the script on digital ocean droplet, and after taking a snapshot of the droplet, and creating a new droplet from the snapshot causes the new droplet to lose its public network connectivity because the changed network values can't be applied by digital ocean cloud-init.
To Reproduce
Steps to reproduce the behavior:

Create a droplet on DO
Run the script
Snapshot the droplet
Create new droplet from the snapshot
You will observe that the machine has no internet connectivity because the cis harden somehow disables cloud-init function.

Expected behavior

Create a droplet on DO
Run the script
Snapshot the droplet
Create new droplet from the snapshot
Cloud-init applied the new public ip settings to netplan config.

Software (please complete the following information):

Ansible Version: latest on apt repo
Role/Repo Version main

I know this couldn't be a bug, there is probably flag for this. Could you please direct me on how to achieve this?

DO provides a web shell for droplets. Log in there and search the logs for errors

Hello, after using this script the web shell is unavailable also. I have tested multiple times. There is no way to enter the droplet.

Did you invest some more time in your problem to support the community? I have tried it several times now and cannot recreate your problem on digital ocean. it works without errors.


Implment a secret store based on Huawei CSMS

Description
Add HuaweiCloud Cloud Secret Management Service (CSMS) as a secret component.
https://support.huaweicloud.com/intl/en-us/usermanual-dew/dew_01_9994.html
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[1704]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[x] Created/updated tests
[x] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[2428]#[2418]

Hi berndverst, The 1703 has been abandoned. To solve the signature issue, I recreated a new one.


MLDB-2088 tensorflow test gpu support

This adds a test for running a Tensorflow graph on a GPU, enabled when WITH_CUDA=1 and the machine has GPUS.
To enable the functionality, we also add a device affinity configuration to the Tensorflow graph.
Finally, the sessionsPerDevice, which used to need to be high to get good throughput, now causes a crash when > 1, and so it's set back to 1.
This passes on a GPU machine with WITH_CUDA=1.

I like the general idea.
Isn't that test very similar to MLDB-1203? Is there a way to pass an argument or something so that we don't duplicate the whole file just to add a single flag?
Also, I do not think we should enable that test since it relies on having inception_dec_2015.zip in the cwd.
If we want to enable it, I'd put inception_dec_2015.zip on public.mldb.ai and fetch it on every test. (we have a caching proxy for that use case)
If that file has an appropriate license, of course.
Same goes for all the other image fetches this test does. We should host a copy with our other testing data. (So that failure to fetch those are not dependent on a third party).
If you agree, I'll do the file copying and test fixing.

OK with me.
May want to consider merging first(since in effect no CI machine has GPUs and so the new test will always be manual) as the dod is meet and adding enhancements to address those points.

I'll have a look, I would very much like to avoid importing a new test that is the same as another test, but with 1 line change.
Especially when the original test is full of debug and commented out / dead code.
Do we have a way to pass flags to a test?
Or maybe the test could inspect argv[0] to see under what name it is called and enable the cpu test based on that?

FWIW using this branch and changing
TF_CUDA_CAPABILITIES=3.0
to
TF_CUDA_CAPABILITIES=6.1
I was able to use cpus and gpus!

I'm fine with whatever way makes sense to move this forwards.

So, I've tweaked the branch a little...

TF_CUDA_CAPABILITIES is now 6.0 and overridable at build time
MLDB-1203-tensorflow-plugin.js has been cleaned a bit.
It will now run on both CPU and GPU if  args.GPUS >= 1
The test assets (inception zip and test image) are now hosted on public.mldb.ai, so the test has been enabled by default.
If we're building with WITH_CUDA=1 and if there are GPUs in the build machine, the test will run on the CPU and GPU.

Along the way I had to add support for passing arguments to mldb_unit_test test cases.


Increased runtime memory usage in 1.9

What version of regex are you using?
1.9
Describe the bug at a high level.
The upgrade from 1.8.4 to 1.9 significantly increased runtime memory usage. (375MB vs 175MB)
Heap analysis suggests that this is due to regex_automata::nfa::thompson::backtrack::Cache::new::hc3a7922de221986c. (900 allocations at 256kb each, which a little more than the 200MB difference). Here's the full stack trace for those allocations:
alloc::alloc::Global::alloc_impl::hc0d2fbcc9e259c41
_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::hff80cfdf399332ed
alloc::raw_vec::finish_grow::h1d4f4e7469250062
alloc::raw_vec::RawVec$LT$T$C$A$GT$::grow_amortized::hb0b597f5657dcfe2
alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve::do_reserve_and_handle::hafd8f04576418cba
alloc::vec::Vec$LT$T$C$A$GT$::reserve::h9ddd934bc4485398
alloc::vec::Vec$LT$T$C$A$GT$::extend_with::h866264405059bb08
alloc::vec::Vec$LT$T$C$A$GT$::resize::h22b6e20adc554f2b
regex_automata::nfa::thompson::backtrack::Visited::reset::hcd3ecf9f7bc5e143
regex_automata::nfa::thompson::backtrack::Visited::new::h28c46b03d50c9004
regex_automata::nfa::thompson::backtrack::Cache::new::hc3a7922de221986c
regex_automata::nfa::thompson::backtrack::BoundedBacktracker::create_cache::heb005f34fc005666
regex_automata::meta::wrappers::BoundedBacktrackerCache::new::_$u7b$$u7b$closure$u7d$$u7d$::h66c74de55ee73b0e
core::option::Option$LT$T$GT$::map::hbfd3f56f2a53617b
regex_automata::meta::wrappers::BoundedBacktrackerCache::new::h6625b6730d32ff87
regex_automata::meta::wrappers::BoundedBacktracker::create_cache::h2c635eefad95c3ac
_$LT$regex_automata..meta..strategy..Core$u20$as$u20$regex_automata..meta..strategy..Strategy$GT$::create_cache::haf98298fa360833d
regex_automata::meta::regex::Builder::build_many_from_hir::_$u7b$$u7b$closure$u7d$$u7d$::ha3b32a0a124f1e6c
_$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..Fn$LT$Args$GT$$GT$::call::h2983e1b0fb6fda94
regex_automata::util::pool::inner::Pool$LT$T$C$F$GT$::get_slow::hd0a3e0958d9d9787
regex_automata::util::pool::inner::Pool$LT$T$C$F$GT$::get::hc70ab56136e5ccdb
regex_automata::util::pool::Pool$LT$T$C$F$GT$::get::h37bc82ca85a795cf
regex_automata::meta::regex::Regex::search_half::haad5eaf00688f9e3
regex::regex::string::Regex::is_match_at::hefc78212cd6a6e5e
regex::regex::string::Regex::is_match::h978417c482a3b499
_$LT$uaparser..parser..os..Matcher$u20$as$u20$uaparser..SubParser$GT$::try_parse::h3fac1011bb0e5792
_$LT$uaparser..parser..UserAgentParser$u20$as$u20$uaparser..Parser$GT$::parse_os::_$u7b$$u7b$closure$u7d$$u7d$::h034f173e256d694c
_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::find_map::h9db4b2cdc08ef062
_$LT$uaparser..parser..UserAgentParser$u20$as$u20$uaparser..Parser$GT$::parse_os::h102f7f7facbe3882

What are the steps to reproduce the behavior?
use std::{thread, vec};

use once_cell::sync::Lazy;
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
use uaparser::{Parser, UserAgentParser};

pub static USER_AGENT_PARSER: Lazy<UserAgentParser> =
    Lazy::new(|| UserAgentParser::from_bytes(include_bytes!("../regexes.yml")).expect("error constructing parser"));

fn main() {
    let uap = &USER_AGENT_PARSER;
    let mut handles = vec![];
    for _ in 0..10 {
        let handle = thread::spawn(move || {
            let mut android_count = 0;
            for _ in 0..100_000 {
                let rand_string: String = thread_rng()
                    .sample_iter(&Alphanumeric)
                    .take(30)
                    .map(char::from)
                    .collect();
                let os = uap.parse_os(&rand_string);
                if os.family == "Android" {
                    android_count += 1;
                }
            }
            println!("Android count: {}", android_count);
        });
        handles.push(handle);
    }
    for handle in handles {
        handle.join().unwrap();
    }
}

with dependencies:
[dependencies]
once_cell= "1.17.1"
uaparser = { version = "0.6.0", default-features = false }
rand = "0.8.5"
regex = "1.9"

and the regexes.yml file can be found here: https://gist.github.com/hamiltop/b010fb9e0189210796c526144b27bd99
What is the actual behavior?
On regex 1.9 that uses 375MB of memory on my machine.
What is the expected behavior?
On regex 1.8.4 that uses 175MB of memory on my machine.

This is fixed in regex 1.9.1 on crates.io.

Also, the uaparser crate doesn't seem to be compiling regexes in the most space efficient way possible. Just changing \d and \s to (?-u:\d) and (?-u:\s) got me a decent chunk of memory savings. Probably changing . to \p{ascii} would give you another bit of savings. (You could use (?-u:.), but that can match invalid UTF-8, so you'd have to switch to regex::bytes::Regex. Which is likely doable, but is probably also a bigger change.)

48 hours to get the first regression report after releasing a complete rewrite of a regex engine. Not bad. Haha. I was expecting more sooner.
Thanks for the report. :-)

Thanks for the fast fix! I'm honored to be first.
Re: uaparser there's definitely some room for improvement there and I want to jump in and try to optimize it at some point. In addition to your recommendations, I want to give RegexSet a try. Per https://docs.rs/regex/latest/regex/struct.RegexSet.html#limitations it sounds like I would compile a RegexSet with all of them and then do the capture in a second pass with the one that matched. It will be an interesting experiment at least.

Thank YOU for such a fast response (plus some bonus regex optimization tips)! I'm on the team with Peter that hit this issue, and it's pretty great to have a such a fast response. Appreciate all your work in the ecosystem.

If you don't mind, I want to keep digging around on these optimizations. If anything, I wanted to capture the results from testing them all out for others to see.
Background context
ua-parser  is a collection of user agent parsers across many platforms all built from the same yaml files. As the yaml file gets updated by the community you can easily pull in the updates. The benefit: we don't have to deal with the ever-changing world of user agents (it's a mess). The downside, we don't have as much control over these regexes.
Outside ua-parser, our specific use case for all of this is just OS detection on mobile devices. We send a link over sms and when they click the link we send them to the appropriate app store. We could do a very naive check for Android or iOS in the user agent, but I've dealt with user agents before and it's never that simple. Custom/skinned browsers on cheap android devices
Optimizations

And if you do that, you might as well leave the regexes as they are just disable Unicode mode entirely via RegexBuilder.

This seems not possible, as the docs say:

Note that if Unicode mode is disabled, then the regex will fail to compile if it could match invalid UTF-8. For example, when Unicode mode is disabled, then since . matches any byte (except for \n), then it can match invalid UTF-8 and thus building a regex from it will fail.

So it seems like we can't disable Unicode via RegexBuilder and leave the regexes as they are. (Indeed, it fails to compile the regex). We'd have to adjust the regexes in all cases (except if we used regex::bytes::Regex).
Data
I did some quick hacks on uaparser to test things out and got some early results on memory usage:

regex 1.9.1 - 110MB
regex::bytes::Regex - 25MB
regex::RegexSet - 2GB
regex::bytes::RegexSet - 600MB
using \p{ascii} instead of . - 45MB
using \p{ascii} and (?-u:\d) and (?-u:\s) - 31MB
regex::RegexSet with improved regexes - 730MB
regex_lite - 15MB but took more than 10x the time

Questions

Is there some other way we could disable unicode without changing the regexes? Or is regex::bytes::Regex the path here?
Is there an easy way to do the shift from . to \p{ascii} accurately and easily? Given the exposure available via meta::Regex that might be something we can do at a higher level than string search and replace.
Similar to the above: The regexes here are very capable and can capture specific OS versions. We don't actually care that much about those specifics. Is there a way to programmatically tweak the regex to remove unneeded capture groups and other complexity? I would love a single RegexSet for "iOS" and one for "Android", but memory usage when naively combining everything was just too high. Stripping out the extraneous parts might reduce that memory usage considerably.

Is there some other way we could disable unicode without changing the regexes? Or is regex::bytes::Regex the path here?

Yes, regex::bytes::Regex is the right path here.
Technically an alternative path exists where you parse the regexes using regex-syntax and rewrite Unicode classes as ASCII classes. It would be a fair bit of work. Likely much more than using regex::bytes::Regex. I don't know exactly how you're using regexes, but it seems like using regex::bytes::Regex should be pretty simple? But I sense hesitancy from you.

Is there an easy way to do the shift from . to \p{ascii} accurately and easily? Given the exposure available via meta::Regex that might be something we can do at a higher level than string search and replace.

Yeah as I mentioned above you'd have to parse the regex with regex-syntax and then rewrite the Ast to use the thing you want. Then translate to Hir and build a meta::Regex from there. (Or convert the Hir back to a string and build a regex::bytes::Regex.)

Similar to the above: The regexes here are very capable and can capture specific OS versions. We don't actually care that much about those specifics. Is there a way to programmatically tweak the regex to remove unneeded capture groups and other complexity? I would love a single RegexSet for "iOS" and one for "Android", but memory usage when naively combining everything was just too high. Stripping out the extraneous parts might reduce that memory usage considerably.

Yeah again, the way to do this is on an Ast. Note that an Ast is complex.
With that said, I expect it won't help much for a RegexSet. The problem is that the techniques that regex-automata uses for multi-pattern regexes don't scale well. It's a problem with a rather large design space, but it's one I hope to tackle. But we're talking years here.

No major hesitancy on regex::bytes::Regex, just wanted to understand the full scope before heading down that path.
I'm also working through your recent blog post about the internals and tinkering with regex-cli, mostly just for my own edification. It's a great explanation and demystified a lot of the magic.
Much thanks for your time here.

Awesome. Feel free to ask more questions! Even if they are tangential. Opening a new Discussion would be great. :)


prioritized looting

the reason for this pr is because i watched the bot skip desirable items when there is a lot of gold drops with the desirable items like the end squares in arcane sanctuary where gold piles already sit on game creation.  currently looting fails because it hits the timeout when there are lots of gold piles potentially before good items are picked.  to fix this i made three attempts to loot; the first skips gold, the second skips potions, the third skips potions and gold.  the reason for this is to lessen the chances of leaving desirable loot behind that clipped off the screen.
it doesn't hurt anything and in anecdotal tests when i dropped a rune and enough gold to push the rune's label off the screen this method successfully achieved picking it up

Could you benchmark this for us vs. 0.6.4?
I could see calling item_finder.py multiple times to be time-consuming. I think you could accomplish this same thing but more efficiently by implementing this logic in an inner loop... perhaps modifying the logic of the else statement in pickit.py
            if len(item_list) == 0:
                # if twice no item was found, break
                found_nothing += 1
                if found_nothing > 1:
                    break
                else:
                    # Maybe we need to move cursor to another position to avoid highlighting items
                    pos_m = self._screen.convert_abs_to_monitor((0, 0))
                    mouse.move(*pos_m, randomize=[90, 160])
                    time.sleep(0.2)
            else:
                found_nothing = 0
                closest_item = item_list[0]
                for item in item_list[1:]:
                    if closest_item.dist > item.dist:
                        closest_item = item

thank you for the reply and comment.  it is important to understand that if enough loot piles exist on the ground item labels are clipped.  not all loot piles on screen will have labels.  the whole point of this change is to call item_finder again after taking a new screenshot after some loot has already been picked up.  the point of the change in behavior is to clear some of the gold so that new labels of items on the ground for potentially higher value loot have room to appear.
the change would also makes parameterizing the timeout for looting gold and potions trivial.
this is applicable anywhere but where it is especially applicable is on the platform at the end of arcane sanctuary.  gold piles are generated on the ground during map generation.  in addition, there are monster drops.  and on top of that there are chest drops.  this is a very high potential for item labels to clip off screen.  i watched the bot leave behind a high rune because it didn't see it initially.  it was uncovered only after picking up some piles of gold and then it didn't prioritize it because it was far away.  the only way for it to know about an item that is coming onto the screen later is to take a new screenshot and call item_finder again, correct?
as far as benchmarking goes, it makes the finding items part of looting exactly three times more expensive because it calls item_finder three times.  it increases from N time to find items to 3N time to find items.  It still takes exactly the same amount of time per item but it may on occasion find additional items that it couldn't have found before.  on my system, the call to item_finder takes just under 1 second so it adds just under 2 seconds per call to pick_up_items.  this is very worthwhile to me because the entire point of the bot is to pickup valuable items.  there is absolutely no prioritization right now and this, at the very least, is a stop gap.
if this blocks merging i would agree to calling item_finder just twice; once for gold/potions/items and then once more for just items (no gold, no potions).

the whole point of this change is to call item_finder again after taking a new screenshot after some loot has already been picked up. the point of the change in behavior is to clear some of the gold so that new labels of items on the ground for potentially higher value loot have room to appear.
If the point of the update is to clear gold first to make room for more valuable item labels, then why do you prioritize gold last?

i watched the bot leave behind a high rune because it didn't see it initially. it was uncovered only after picking up some piles of gold. even though it was on the screen after looting began it wasn't initially so the bot never knew about it.
A new screenshot is captured and item_finder.search() is repeated already for every item that is picked up in vanilla. It generates a new item_list with a new screenshot until no items with any template matches remain on screen. If a monster dies while you are in the middle of picking items, you will see the new drops. Even if no items are found in the first pass, it tries again just in case.

        while not time_out:
            if (time.time() - start) > 28:
                time_out = True
                Logger.warning("Got stuck during pickit, skipping it this time...")
                break
            img = self._screen.grab()
            item_list = self._item_finder.search(img)

the only way for it to know about an item that is coming onto the screen later is to take a new screenshot and call item_finder again, correct?
Yep, this is exactly how pickit already works as discussed above.

as far as benchmarking goes, it makes the finding items part of looting exactly three times more expensive because it calls item_finder three times.
This is too expensive. Pickit processing already takes a long time, and affecting every use of pickit throughout the entire bot by tripling the calls to item_finder would be too much to ask. Part of the difficulty with this is that there are several areas where pickit is called while you are still potentially being hit by monsters and would greatly increase the risk of death/chicken.

there is absolutely no prioritization right now and this, at the very least, is a stop gap.
I don't see how prioritizing items in the fashion you have solves the problem you describe. Let's say you have a HR drop, but that HR doesn't have an item label because there are too many stacks of gold/pots on the ground. Now you run pickit. Item_finder finds THE SAME items regardless of what you prioritize. So if you prioritize gold first, it'll pickup all the gold and hopefully the HR will come into view. But if you prioritize HR first, then pots, then gold; you will skip HR, pick pots, and still pick the same gold. Then botty, as it already does before this PR, will take a new screenshot and see the HR. You end up picking the exact same items.

If the point of the update is to clear gold first to make room for more valuable item labels, then why do you prioritize items before gold? Logger.debug("Looting all but gold") is first.

this one is easy.  the bot does chicken frequently and if a high rune is visible immediately i want the bot to pick it up before it ends up having to chicken.  in addition, sometimes the potions are waning by the end of the fight so i allow the bot to pick those up immediately as well so they can be available if necessary while it is being popped in the head by the remaining monsters while it is trying to grab what's important.  this is more well thought out than you realize.

A new screenshot is captured and item_finder.search() is repeated already for every item that is picked up in vanilla. It generates a new item_list with a new screenshot until no items with any template matches remain on screen. If a monster dies while you are in the middle of picking items, you will see the new drops. Even if no items are found in the first pass, it tries again just in case.

that's not the entire story.  it generates a new screenshot until no items with any template matches OR it hits the time out.  if it is going to timeout, which it will easily and frequently do in the situations i have mentioned, it will simply take what is near (label-wise near) which could be gold and leave valuable loot.  i know this is true because i've seen it and it's clearly that way in the code.

This is too expensive. Pickit processing already takes a long time, and affecting every use of pickit throughout the entire bot by tripling the calls to item_finder for an edge case would be too much to ask. Part of the difficulty with this is that there are several areas where pickit is called while you are still potentially being hit by monsters and would greatly increase the risk of death/chicken.

the characters (two at the same time) that i bot are poor man's sorceress' that are fragile to say the least and they rarely are killed while looting except on nil and this change hasn't made that any worse.

I don't see how prioritizing items in the fashion you have solves the problem you describe. Let's say you have a HR drop, but that HR doesn't have an item label because there are too many stacks of gold/pots on the ground. Now you run pickit. Item_finder finds THE SAME items regardless of what you prioritize.

If you prioritize gold first, it'll pickup all the gold and hopefully the HR will come into view.
If you prioritize HR first, then pots, then gold; you will skip HR, pick pots, and still pick the same gold. The HR still comes into view.
Botty, as it already does, will just check for any pickable item on the screen and pick the closest one, take a new screenshot, pick the next closest, etc. until all the closest drops are picked and will eventually see the HR.

You end up picking the exact same items in all 3 cases and in all 3 cases you get the HR

it doesn't pick up the same items at all.  as it stands today the bot will frequently hit the looting timeout and just leave high quality loot if it didn't start near (label-near) the high quality loot.  i mention "label-near" again because the label of an item right at the bot's feet may actually be an item at the edge of the screen and in fact a label at the very edge of the screen may be the closest item to the bot.  the bot can and does teleport away to pick up items because its label was nearer even when high quality items are within reach without teleport.  this may actually put good items closer or farther way depending on layout and how d2r deals with label clipping.
anyway, this PR addresses the issue of leaving seen loot behind.  regardless of the players misc_gold setting in pickit the first and third calls strip all gold from the item_lists.  the bot always has time to pick the high quality loot before the timeout because it doesn't share a timeout with gold.  this is because i moved gold to its own timeout (the second call).
as i mentioned previously, during the first pass the bot strips gold and is allowed to pick only pots and items.  this allows the bot to pull any important items and potions if it is still getting hit.  then, if the player has gold pickup enabled it does a gold pass on a separate timeout.  it will hit this timeout in the scenarios i have provided nearly always.  instead of quitting back to town it does another (third) pass that strips gold and pots just in case the gold pick made more labels appear.
you aren't considering timeouts in any of your scenarios and it is the timeouts that are killing the capability of picking the quality item in the situations i have outlined.  this PR gives you the ability to tweak timeouts and ensures that items are on a different timeout than the gold and pots at least once.
if the PR can't pass as is then i can implement something definitely cheesier where during the single timeout at certain amounts of passed time i switch between clearing/ignoring gold or potions so that by the end it's never allowed to consider gold.
at any rate, the pr does solve the issue i outlined albeit expensive in your opinion.  i think much more expensive is leaving behind high runes.  also, i think it's hardly fair to call this an edge case.  a non-infinity sorceress (and i think all the generic caster classes without infinity which is the bulk of the characters in the game) can run 6 or fewer scripts currently; nihl, pindle, eldritch, shenk, trav, and arcane.  my blizz sorc can't do shenk and my fake lightning sorc can't do trav so really and neither one reliably succeeds against nihl.  so really they do 4.1 scripts successfully (about a 10% success rate on nil but they also fail on the others often enough).
arcane is really up to 4 scripts/loots in one because it runs all cardinal directions until it find the pedestal platform.  you can barely say that 1 in 5 is an edge case and you definitely can't say that 4 in 8 or 4 in 9 is an edge case.  if it helps 1 in 5 chances to loot i think that's kind of a big deal.  if it helps 4 in 8 chances to loot i think that's a really big deal.

@codahq
I think that prioritizing higher value items is a reasonable idea.
I don't agree with your solution though. As I see it, you can still prioritize items by sorting the results of item_finder without having to call item_finder.py to segment every screenshot multiple times and run through every item template for each item contour needlessly. Just adjust the logic of these lines in pickit.py:
            else:
                found_nothing = 0
        ---> add logic to sort item_list here, make the highest priority items earliest in the list.
                closest_item = item_list[0]
                for item in item_list[1:]:
                    if closest_item.dist > item.dist:
                        closest_item = item

The other thing you're asking for is to increase the pickit timeout. This will also have dangerous side effects as the pickit timer is there for a reason. If you get stuck during pickit at all (unreachable items at trav, walking characters, inventory filled but not detected, etc.) this will ruin run efficiency and cause more chickens, deaths. Do you have any creative solutions to address both scenarios?
I won't plan to merge as-is, but if @aeon0 wants to review this PR and give his thoughts that'd be welcome.

would you merge this then?
for item in item_list[1:]:
    if (item.name != "misc_gold" and closest_item.name == "misc_gold") or (closest_item.dist > item.dist and (item.name != "misc_gold" or closest_item.name == "misc_gold")):
        closest_item = item```

always replace gold with non-gold or look at the distance as long as closest item isn't replaced by closer gold.  this gets my goal accomplished as well.


IHaskell installer fails to install libmagic on Mac OS X + Homebrew

libmagic was installed, but turns out that homebrew installs libmagic headers onto /usr/local/include and libraries into /usr/lib/include that was causing the installer to fail at
cabal: Error: some packages failed to install:
ihaskell-magic-<IP_ADDRESS> depends on magic-1.1 which failed to install.
magic-1.1 failed during the building phase. The exception was:
ExitFailure 1

However, the fix was really simple. Just point cabal to the right folders:
cabal install magic-1.1  --extra-lib /usr/local/lib --extra-include /usr/local/include
Resolving dependencies...
Configuring magic-1.1...
Building magic-1.1...
Installed magic-1.1

I can send a pull request if that's cool :) Thanks!

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28331652-ihaskell-installer-fails-to-install-libmagic-on-mac-os-x-homebrew?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github).

I can send a pull request if that's cool

That's always cool :smile:


added username

Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[ ] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

Automation for azure-sdk-for-python

Can one of the admins verify this patch?

@solhaile is going to be working with me on maintaining Network specs so please add him as code owner

Automation for azure-sdk-for-go


mising parent class errors in data.tsv -> data.js conversion by script/make_data.py

Error: parent class  history/tillage doesn't exist as section or field for term. Make sure parent term is trimmed of whitespace. zonal tillage

history/tillage column should be a multi-select pulldown


Just Ignorant.

Nice app!
But what if I was like, totally:

...?

You can always try a quick fix!

Knowing is half the battle, bruh


Returning more than one implementation of HTMLDocument

I've encountered the problem illustrated in the code below. When I want to return more than one kind of page from one endpoint, I'm struggling with the type system. The return value expects HTMLResponse to be parametrised with a concrete type, but that only lets me return one type of page.
The only workaround I could find was to switch on the page type inside of the HTMLDocument implementation, but that's pretty awful.
struct TodoController: RouteCollection {

    func boot(routes: RoutesBuilder) throws {

        routes.get("todo", ":todoId", use: getTodos)
    }

    @Sendable func getTodo(req: Request) async throws -> HTMLResponse<???> {

        let todoId = req.parameters.get("todoId")!

        guard let todo = try await Todo
            .query(on: req.db)
            .filter(\.$id == todoId)
            .first() else {
            return HTMLResponse { NotFoundPage() }
        }

        return HTMLResponse { TodosPage(todo: todo) }
    }
}

struct TodosPage: HTMLDocument {

    var todo: Todo

    var title: String = "Todo"

    var head: some HTML {
        meta(.name(.viewport), .content("width=device-width, initial-scale=1"))
    }

    var body: some HTML {
        todo.description
    }
}

struct NotFoundPage: HTMLDocument {

    var title: String = "Not found"

    var head: some HTML {
        meta(.name(.viewport), .content("width=device-width, initial-scale=1"))
    }

    var body: some HTML {
        "Todo Not Found"
    }
}

hi, sorry for the late response, I somehow did not see or get a notification for this.
this is a very good question, and I haven't come to a good "this is the way" conclusion yet.
for errors specifically, I could imagine throwing specific errors and use a middleware to convert them to proper html responses, this way the return type of the handler can stay a single discrete type for the "normal" case.
for cases where the page simply shows conditional content, I think a switch inside the HTML struct is actually the best way.
if both these methods do not fit well, there will be no way around a type-erased return type of some sort. a simple way I can think of is to return Response directly, like so:
@Sendable func myHandler(request: Request) async throws -> Response {
    return try await HTMLResponse {
        "I will be type-erased"
    }.encodeResponse(for: request)
}

the latest release uses a type-erased HTMLResponse type, which should resolve the ergonomics issue here.
https://github.com/vapor-community/vapor-elementary/releases/tag/0.2.0

Thank you!


Bug: keyboard key color

The "e" on the keyboard here should be green

Another instance of this reported by a user. The S should be green

Another instance of this reported by a user. The S should be green


[MenuItem]: add prop for ListItem classes

[x] I have followed (at least) the PR section of the contributing guide.

As far as I could tell, there was no way to modify the ListItem classes. I used the same methodology as the Menu does for changing the child Popover classes.

@zsalzbank What's your objective?

I'd like to be able to change the focusVisible class so that it matches the menu item hover when navigating with the keyboard. Figured other components expose similar functionality, so this couldn't hurt.

Why not using the focusVisibleClassName prop?

If we move forward with #15140. You will no longer need it. At least, in the most simple case, you could target .focus-visible.

Why not using the focusVisibleClassName prop?

That works - I guess I didn't notice it because it was so far down the chain. It would be cool if the documentation was expandable or something so that all props (nested and far down the chain) were exposed on one page.

Feel free to close if this isn't desirable.

I think that we should limit as much as possible the nested classes API usage. The focusVisibleClassName property was added for your use case.

It would be cool if the documentation was expandable or something so that all props (nested and far down the chain) were exposed on one page.

We agree, we were thinking of documenting the whole prop spread chain. In the case of the MenuItem, it would be:
MenuItem > ListItem > ButtonBase > button.

@zsalzbank I'm closing for now. Thank you for taking the time.


Error with 0.48.1 on Android

I have just upgraded RN from 0.45.1 to 0.48.1 and after that I can't compile the app.
The error that I receive is
my-path/node_modules/react-native-mixpanel/android/src/main/java/com/kevinejohn/RNMixpanel/RNMixpanel.java:28: error: method does not override or implement a method from a supertype
    @Override
    ^
1 error
:react-native-mixpanel:compileReleaseJavaWithJavac FAILED

Any ideas?

Fixed it, sending a pull request

Someone has already done it, this one https://github.com/davodesign84/react-native-mixpanel/pull/104
Please merge


Set priority with additional headers.

More headers are added to cope with different MUA.

could clarify which muas/mda this works with, if there's a good reference link an inline comment next to the priority mapping would be useful.

Hi @kapilt ; I added the reference information for the mail headers.
Do you think it may be merged or do you want me to add something else ?

there's one test failure it looks like that needs addressing on this one.


Merge branch 'turn.rest' of https://github.com/mgherghe/gateway into …

…sonartest

created by mistake


Scan rotating issue

Hi, thank you for sharing your good project.
I am applying to change robot to Jackal and 2D laserscan.
My scan data has been rotating and the robot cannot reach to goal position.
Goal position is in the map's boundary, but laserscan data is going out of the boundary.
As I change robot,laser and code, I guess it is affected by

difference of diff drive between Pioneer and Jackal

Laserscan data
I adjusted your velodyne_callback function.

Jackal's different IMU which makes laser rotates.

Laserscan data is getting far from the main grid. I want to locate it on the right position.
I hope you can help me, Thank you.

Hi,
I am not sure if I get the issue here. Is it that the laser scan drifts over time?
In any case, it looks like something is off with your transforms. How did you replace the robot model? What steps did you take for that?
I am not quite getting the point 3. Is the laser scan somehow "tied" to the IMU positioning? What does your rqt_tf_tree look like?

Hi,
First of all, I changed "pioneer3dx.gazebo.launch" to "jackal.gazebo.launch".
I adjusted some codes to fit with Jackal model.
Codes are below.
`

<!-- Load the URDF into the ROS Parameter Server -->
<include file="$(find jackal_gazebo)/launch/spawn_jackal.launch">
  <arg name="x" value="-1.0" />
  <arg name="y" value="5.0" />
  <arg name="z" value="0.01" />
  <arg name="yaw" value="0" />
</include>

<include file="$(find jackal_navigation)/launch/include/move_base.launch" />
<!-- <include file="$(find jackal_navigation)/launch/gmapping_demo.launch">
  <arg name="scan_topic"    value="dokuyo/scan" />
</include> -->

`
and this is rqt_tf_graph
![drl_nav_tftree](https://github.com/reiniscimurs/DRL-robot-navigation/assets/60081287/67e10552-3652-44e5-8bea-42def7ac2e21)
I also changed velodyne_callback function liike below code.
`    def velodyne_callback(self, v):
self.velodyne_data = np.ones(self.environment_dim) * 10
    for i in range(len(v.ranges)):
        dist = v.ranges[i]
        # angle = dist + v.angle_min + v.angle_increment * i
        angle = v.angle_min + v.angle_increment * i
        beta = angle
        # beta = angle - np.pi/2.0

        for j in range(len(self.gaps)):
            # if self.gaps[j][0] <= beta < self.gaps[j][1]:
            #     self.velodyne_data[j] = min(self.velodyne_data[j], dist)
            #     break
            if 0.1 <= dist <= 30.0 and self.gaps[j][0] <= beta < self.gaps[j][1]:
                self.velodyne_data[j] = min(self.velodyne_data[j], dist)
                break`

You can ignore number3(about IMU).
I would not fully understand your proejct, so, there would be some problems.

Hi, thank you for sharing your good project.
I am applying to change robot to Jackal and 2D laserscan. My scan data has been rotating and the robot cannot reach to goal position. Goal position is in the map's boundary, but laserscan data is going out of the boundary.
As I change robot,laser and code, I guess it is affected by

difference of diff drive between Pioneer and Jackal
Laserscan data
I adjusted your velodyne_callback function.
Jackal's different IMU which makes laser rotates.

  Laserscan data is getting far from the main grid. I want to locate it on the right position.
I hope you can help me, Thank you.

Hello, I also have the same issue. Have you managed to resolve it?


Automated cherry pick of #4217: bugfix(notify): Fix the bug of notify config and verify

Cherry pick of #4217 on release/2.13.
#4217: bugfix(notify): Fix the bug of notify config and verify

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.13@9adf57e). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             release/2.13   #4219   +/-   ##
==============================================
  Coverage                ?   6.87%
==============================================
  Files                   ?     519
  Lines                   ?   88082
  Branches                ?       0
==============================================
  Hits                    ?    6053
  Misses                  ?   81530
  Partials                ?     499

Flag
Coverage Δ

#aFlag
6.87% <ø> (?)

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 9adf57e...cb995d8. Read the comment docs.


btrfs file system unmounts itself after a brief delay

From @lorenzo-stoakes on August 10, 2016 9:23
After a short delay from user app start the btrfs file system unmounts for no obvious reason, resulting in all units that depend on the mount exiting, i.e. supervisor, docker, openvpn.
This renders the device 'soft-bricked' and therefore unusable. Additionally, attempts to mount the btrfs partition to /mnt/data result in no error, no dmesg entries but no mounting actually taking place. Attempting to mount the file system to another path succeeds, though any attempt to 'cheat' by symlinking, etc. results in the same issue recurring.
This has been reproduced on production (1.1.0 fido) and tip (1.8.0) resin OS.
Copied from original issue: resin-os/resin-ts#34

No further development is planned for this board.


Can't launch TextGrab

Windows 10
NET 6.0.23 installed
All elevations (smartscreen) are accepted
When we click on TextGrab.exe nothing is displayed but the program is in the task manager.
2 computers / 6 tests meet this trouble.
What's up doc ?

Do you see the Text Grab icon in the system tray? Also what happens when you kill Text Grab from the Task Manager and launch the EXE again?

Good morning,
There is no icon in the taskbar, even on PCs where the application works.
Killing the stain has no effect.
We even emptied the Windows registry of all TextGrab information, when we restart TextGrab the smartscreen activates, we authorize and no activity again.
If we launch TextGrab several times, there are several processes activated
THANKS

Are you running the small exe or the self-contained exe?

Both versions have the same result (networkframework 6 and 7 are updated)

I wonder if having both .NET 6 and .NET 7 would have some conflict. That is very odd though because I have several different versions on my device.

I have the same issue

Windows 10
.NET 6.0.26 x64 installed
I'm getting this issue with both small exe and self-contained exe (v4.4.1)

Check Event Viewer and see what is happening that prevents it from launching

Hello,
The same thing is happening for me for both packages. (Windows 11 x64)
The program creates many entries in the task manager whenever I click on the executable, but it is not showing anywhere.
No warnings or errors in the event manager.
Any solution?

I installed version 4.4.0 and it works for me now.
On Mon, Aug 26, 2024 at 4:55 AM muhammadjawadulhassan <
@.***> wrote:

Hello,
The same thing is happening for me for both packages. (Windows 11 x64)
The program creates many entries in the task manager whenever I click on
the executable, but it is not showing anywhere.
No warnings or errors in the event manager.
Any solution?
—
Reply to this email directly, view it on GitHub
https://github.com/TheJoeFin/Text-Grab/issues/351#issuecomment-2309699031,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEOKSBVYWNHBEPDU76RE4TZTLUQNAVCNFSM6AAAAAA6FZQHP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBZGY4TSMBTGE
.
You are receiving this because you commented.Message ID:
@.***>

Hello,
Yes, it worked for me.
Now I can see the program is also running in the background with the taskbar icon active.

@muhammadjawadulhassan @timwillhack can you test this build from the GitHub Action and see if it works: https://github.com/TheJoeFin/Text-Grab/actions/runs/10550900309

it works for me if I pin it to my task bar for some reason.  thank you
On Mon, Aug 26, 2024 at 11:45 AM muhammadjawadulhassan <
@.***> wrote:

Hello,
Yes, it worked for me.
Now I can see the program is also running in the background with the
taskbar icon active.
@timwillhack https://github.com/timwillhack can you test this build
from the GitHub Action and see if it works:
https://github.com/TheJoeFin/Text-Grab/actions/runs/10550900309
—
Reply to this email directly, view it on GitHub
https://github.com/TheJoeFin/Text-Grab/issues/351#issuecomment-2310519018,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEOKSB7COMFXXFJGGQEFKLZTNERJAVCNFSM6AAAAAA6FZQHP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJQGUYTSMBRHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@timwillhack @muhammadjawadulhassan I have updated artifacts in the release for 4.5.1, please test and see if these work for you

@TheJoeFin
Yes, it works fine for me now, directly downloaded from the releases section.
Thank you for the fix.

@TheJoeFin
The problem is still there; first, I downloaded the released executable, opened it, and ran fine.
https://github.com/TheJoeFin/Text-Grab/actions/runs/10550900309
Then I deleted this folder to ensure everything was working fine, restarted my computer, and again the same situation. It only shows in the task manager, but no GUI or taskbar icon exists.
Please recheck this.
Thanks

Hello all,
Any solution for this issue?

Hello @muhammadjawadulhassan Text Grab was recently updated, can you try version 4.6.0 and let me know if the issue persists?

Hello @muhammadjawadulhassan Text Grab was recently updated, can you try version 4.6.0 and let me know if the issue persists?

Hello, I hope you are doing well.
I have tried the recent update, and for now, it's working fine. I hope so for the future too.


cloudhsmv2 DeleteBackup not implemented

The operation DeleteBackup of the service cloudhsmv2 is not currently implemented.

The available operations in botocore are driven by what operations are available in the services API as defined by the model provided by the service. You should raise this concern on the service forums.


Stronger trigger-fire typing

Hi, is it possible to have the trigger firing be more strongly typed/parameterised?
Specifically - to the params provided. It would be nice to force using of a certain number and type of args for a particular trigger. As I understand, currently I can 'fire' with or without any params. I then need to deal with that in my onEntryBlocks
I had a think about how you might achieve this:

After making a TriggerWithParameters - you call a method on it to generate a concrete instance of the trigger. I.e. you have a trigger factory of sorts that you use to get triggers when firing events. This way, you can only fire an event if you made a trigger the 'right' way.

Use a reflection method similar to Retrofit. Supply an interface of events that is parsed down into TriggerWithParameters objects. This might be a Java 8 only option because to configure the onEntryBlock you might have to use a method refs to identify the event methods.

Update: I've just found the setTriggerParameters method which allows what I proposed in option 1. This might be a good case for some more example code/docs.
Perhaps making the constructor of TriggerWithParameters package-private might help - I was instantiating one...

I agree, this should be in the documentation. I might write something up on this later today.


No way to download partial files from google cloud storage.

See http://stackoverflow.com/questions/36886537/how-to-download-part-of-file-from-google-storage

Added a DownloadRange() sample.


App crashes when attempting to create submissions as a Viewer

(24.4.1) [WriteStream]: (5709729) Stream closed with status: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}.
(24.4.1) [Firestore]: Write failed at surveys/<id>/submissions/<id>: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}

@gino-m @vittorino Need inputs for UX mocks.

mocks

For viewers I think as a baseline we'd need to do the following:

Disable tap on bottom cards
Hide the "Collect data" chips
Hide the "Suggest new LOI" card if present

@vittorino @shobhitagarwal1612 Wdyt?

Note that this is low priority for pilots; we won't need view-only access there.

The crash has been fixed, only UX improvements are left. Closing this one in favor of https://github.com/google/ground-android/issues/1838


Add data-tracking-url attribute to radio inputs

https://trello.com/c/CbTYssq1/478-enable-cross-domain-tracking-for-cysp-govuk-sign-in-pages
In order to track choices made in service sign in pages
across domains we need to expose the destination of the chosen
option.
Related: https://github.com/alphagov/govuk-content-schemas/pull/817
Remember to update the CHANGELOG if your change needs to be listed in the next version of the gem.

Component guide for this PR:
https://govuk-publishing-compon-pr-539.herokuapp.com/component-guide/

I think we also need a CHANGELOG entry for this

@rubenarakelyan component guide example and changelog entry added.


downstream mpath dependency vulnerability

GitHub's dependabot has started issuing warnings for projects that have a downstream dependency on versions of mpath <0.8.4 (due to CVE-2021-23438), which affects anything that depends on connect-mongodb-session at the moment — archetype 0.12.0, the latest version, depends on mpath 0.5.1.
I've flagged this over in archetype's issues, so if/when an update is made to archetype's dependencies, if the archetype version number is incremented to 0.13.x or higher, an update would be needed here as well.

I see same issues

Fixed and released in v3.1.1 :+1:


Create your first component.

Create a /components folder and add Header.tsx.
Create your dragons header in it .
Add it to your two pages

Do #32 first


Configuration of "Domain Names"

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
Hi,
I'm also having difficulties with the configuration of my domain names (Apache).
I have a domain name managed by Cloudflare (my-domain.com).
I have a private server (<IP_ADDRESS>) with Apache and Uptime-Kuma.
I have uptime.my-domain.com configured like this :
<VirtualHost *:443>
    ServerName uptime.my-domain.com
    ServerAlias www.uptime.my-domain.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine on
    SSLCertificateFile /etc/cloudflare/my-domain.com.pem # Generated from Cloudflare
    SSLCertificateKeyFile /etc/cloudflare/my-domain.com.key # Generated from Cloudflare

    Protocols h2 http/1.1
    ProxyPass / http://localhost:3001/
    RewriteEngine on
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L]
</VirtualHost>

I have a status page created accessible by default at this address : https://uptime.my-domain.com/status/default
But I want to remove this /status/default for public.
So I added status.my-domain.com to the "Domain names" in the settings.
status.my-domain.com is configured like this :
<VirtualHost *:443>
    ServerName status.my-domain.com
    ServerAlias www.status.my-domain.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine on
    SSLCertificateFile /etc/cloudflare/my-domain.com.pem # Generated from Cloudflare
    SSLCertificateKeyFile /etc/cloudflare/my-domain.com.key # Generated from Cloudflare

    Protocols h2 http/1.1
    ProxyPass / http://localhost:3001/
    RewriteEngine on
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L]
</VirtualHost>

But as soon as we access to status.my-domain.com we are redirected to status.my-domain.com/status/default
Did I forget something?
Thank you 😃
🐻 Uptime-Kuma Version
1.15.1
💻 Operating System and Arch
Debian 11 x86-64
🌐 Browser
Google Chrome
🐋 Docker Version
No response
🟩 NodeJS Version
v16.15.0

I found the solution here : https://github.com/louislam/uptime-kuma/issues/1505#issuecomment-1101276175
Sorry!